/* Questline — design tokens
   Cool slate chrome, white work surfaces, cobalt for actions, quest-gold reserved for milestones. */
:root {
  --bg: #ECEEF3;
  --panel: #F5F6F9;
  --surface: #FFFFFF;
  --surface-2: #F7F8FB;
  --sunken: #E9EBF1;
  --ink: #171B26;
  --ink-2: #4A5266;
  --ink-3: #848CA0;
  --line: #E0E3EA;
  --line-2: #CDD1DC;
  --accent: #3F4CF0;
  --accent-ink: #FFFFFF;
  --accent-soft: #E7E9FE;
  --accent-text: #2F3AD0;
  --gold: #D9A10B;
  --gold-soft: #FBF1D3;
  --danger: #D2365C;
  --danger-soft: #FCE6EC;
  --ok: #0E9F87;
  --c-doc: #3F4CF0;
  --c-board: #E8792B;
  --c-roadmap: #D9A10B;
  --c-table: #0E9F87;
  --c-mood: #E0446A;
  --c-file: #5F6B85;
  --rail: #12152B;
  --rail-ink: #A8AECB;
  --mb-bg: #F4F5F8;
  --mb-dot: #D5D9E3;
  --shadow-1: 0 1px 2px rgba(23, 27, 38, .06), 0 1px 1px rgba(23, 27, 38, .04);
  --shadow-2: 0 8px 28px rgba(23, 27, 38, .14), 0 2px 6px rgba(23, 27, 38, .08);
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r-s: 6px;
  --r-m: 9px;
  --r-l: 14px;
  --sb-w: 264px;
  --panel-w: 360px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1016; --panel: #12141B; --surface: #181B24; --surface-2: #1D202B; --sunken: #0B0D12;
    --ink: #E7E9F1; --ink-2: #AEB4C4; --ink-3: #757D91; --line: #262A36; --line-2: #333847;
    --accent: #7D87FF; --accent-ink: #0E1016; --accent-soft: #23274D; --accent-text: #A9B0FF;
    --gold: #F0B935; --gold-soft: #3A2F12; --danger: #F0638A; --danger-soft: #3D1A26; --ok: #2BC2A6;
    --c-doc: #8790FF; --c-board: #F29A5C; --c-roadmap: #F0B935; --c-table: #2BC2A6; --c-mood: #F0638A; --c-file: #8A93AA; --rail: #090B14; --rail-ink: #8B91AE; --mb-bg: #12141B; --mb-dot: #262A36;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 34px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1016; --panel: #12141B; --surface: #181B24; --surface-2: #1D202B; --sunken: #0B0D12;
  --ink: #E7E9F1; --ink-2: #AEB4C4; --ink-3: #757D91; --line: #262A36; --line-2: #333847;
  --accent: #7D87FF; --accent-ink: #0E1016; --accent-soft: #23274D; --accent-text: #A9B0FF;
  --gold: #F0B935; --gold-soft: #3A2F12; --danger: #F0638A; --danger-soft: #3D1A26; --ok: #2BC2A6;
  --c-doc: #8790FF; --c-board: #F29A5C; --c-roadmap: #F0B935; --c-table: #2BC2A6; --c-mood: #F0638A; --c-file: #8A93AA; --rail: #090B14; --rail-ink: #8B91AE; --mb-bg: #12141B; --mb-dot: #262A36;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 34px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, textarea, select { font: inherit; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 650; letter-spacing: -.01em; margin: 0; }
mark { background: var(--gold-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
kbd { font: 500 11px var(--mono); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--ink-3); background: var(--surface); }
.icon { flex: none; display: block; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.pad { padding: 16px; }
.pad-xl { padding: 80px 16px; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gold { color: var(--gold); display: inline-block; vertical-align: -2px; }
.error-text { color: var(--danger); font-size: 14px; margin: 4px 0 8px; }
.link { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 600; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); color: var(--ink-2); border-radius: var(--r-m); padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.note .icon { color: var(--accent-text); margin-top: 2px; }

/* boot */
.boot { height: 100vh; display: grid; place-items: center; }
.boot-mark, .brand-mark { --fm: var(--accent); --fs: 22px; width: var(--fs); height: var(--fs); flex: none; position: relative; border: calc(var(--fs) * .17) solid var(--fm); border-radius: calc(var(--fs) * .22); box-sizing: border-box; display: inline-block; }
.boot-mark::after, .brand-mark::after { content: ''; position: absolute; width: 46%; height: 46%; right: -36%; top: -36%; background: #F0B935; border-radius: 22%; box-shadow: 0 0 0 calc(var(--fs) * .08) var(--panel); }
.boot-mark { --fs: 34px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.86); } }
@media (prefers-reduced-motion: reduce) { .boot-mark { animation: none; } * { transition: none !important; animation-duration: 0s !important; } }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; box-shadow: var(--shadow-1); }
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-3); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.08); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: var(--sunken); border-color: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); box-shadow: none; }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.is-active { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.btn.wide { width: 100%; height: 42px; font-size: 15px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-s); border: 0; background: transparent; color: var(--ink-2); flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--sunken); color: var(--ink); }
.icon-btn.is-active { background: var(--accent-soft); color: var(--accent-text); }
.icon-btn.fav-on { color: var(--gold); }
.icon-btn.fav-on svg { fill: currentColor; }
.spinner { display: inline-block; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: inline-flex; background: var(--sunken); border-radius: var(--r-s); padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 4px 11px; border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg.wide { display: flex; margin-bottom: 14px; }
.seg.wide button { flex: 1; padding: 7px; }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
.field > span em { font-weight: 500; font-style: normal; }
input:not([type=checkbox]):not([type=range]):not([type=color]), textarea, select {
  border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-s); padding: 8px 10px; min-height: 36px; width: 100%; outline: none;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-2); color: var(--ink-2); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); }
.input-prefix span { padding-left: 10px; color: var(--ink-3); font-weight: 600; }
.input-prefix input { border: 0 !important; box-shadow: none !important; }

/* avatars */
.avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #fff; font-weight: 700; letter-spacing: .02em; line-height: 1; user-select: none; }
.avatar-ring { box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar + .avatar { margin-left: -7px; }
.avatar-more { background: var(--sunken); color: var(--ink-2); font-size: 11px; margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.avatar-pending { background: var(--sunken); color: var(--ink-3); }

/* menus */
.menu-trigger { display: inline-flex; }
.menu { position: fixed; z-index: 1000; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 5px; max-height: min(460px, 80vh); overflow: auto; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; padding: 7px 9px; border-radius: var(--r-s); text-align: left; font-size: 14px; color: var(--ink); }
.menu-item:hover:not(:disabled), .menu-item.is-active { background: var(--sunken); }
.menu-item.danger { color: var(--danger); }
.menu-item .icon { color: var(--ink-3); }
.menu-item.danger .icon { color: var(--danger); }
.menu-item.active > .icon:last-child { color: var(--accent-text); }
.menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-hint { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 2px; }
.menu-heading { padding: 7px 9px 3px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; display: inline-block; }
.swatch.big { width: 26px; height: 26px; border-radius: var(--r-s); cursor: pointer; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(14, 16, 22, .44); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow: auto; animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-2); display: flex; flex-direction: column; max-height: 86vh; animation: rise .16s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: .6; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px 22px; gap: 12px; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 12px 22px 18px; overflow: auto; }
.modal-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); }
.modal-foot.inline { padding: 14px 0 0; margin-top: 4px; }

/* toasts */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(560px, calc(100vw - 32px)); }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); border-radius: var(--r-m); padding: 10px 14px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow-2); font-size: 14px; animation: rise .16s ease-out; max-width: 100%; }
.toast-error { background: var(--danger); color: #fff; }
.toast-action { background: transparent; border: 0; color: var(--gold); font-weight: 700; padding: 0; white-space: nowrap; }

.color-row { display: flex; flex-wrap: wrap; gap: 8px; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.color-dot.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.color-dot.auto { background: var(--sunken); color: var(--ink-2); font-size: 12px; font-weight: 700; }

.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--chip); background: color-mix(in srgb, var(--chip) 13%, transparent); border: 0; }
.chip-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-picker .chip { height: 26px; padding: 0 10px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.chip-picker .chip.on { background: color-mix(in srgb, var(--chip) 16%, transparent); color: var(--chip); box-shadow: inset 0 0 0 1px var(--chip); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12.5px; font-weight: 600; color: var(--chip); background: color-mix(in srgb, var(--chip) 14%, transparent); white-space: nowrap; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--chip); }
.pill { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.pill-chat { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 70%, var(--ink)); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--sunken); border-radius: 10px; padding: 2px 9px; white-space: nowrap; }
.who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }

.empty { max-width: 420px; margin: 9vh auto; text-align: center; padding: 0 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-1); display: grid; place-items: center; color: var(--accent-text); }
.empty h3 { font-size: 20px; }
.empty p { margin: 0 0 6px; color: var(--ink-2); }
.panel-empty { padding: 26px 20px; color: var(--ink-3); font-size: 14px; text-align: center; line-height: 1.55; }

/* ---------------------------------------------------------------- app shell */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { width: var(--sb-w); flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 750 19px var(--display); letter-spacing: -.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .brand-mark { --fs: 18px; }
.me-btn { border: 0; background: transparent; padding: 2px; border-radius: 50%; }
.sb-search { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; padding: 0 10px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-s); color: var(--ink-3); font-size: 14px; }
.sb-search span { flex: 1; text-align: left; }
.sb-new { display: flex; align-items: center; justify-content: center; gap: 7px; width: calc(var(--sb-w) - 24px); margin: 0 12px 10px; height: 36px; border-radius: var(--r-s); border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; }
.sb-new:hover { filter: brightness(1.08); }
.sidebar > .menu-trigger { display: block; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.sb-link { display: flex; align-items: center; gap: 9px; min-height: 31px; padding: 4px 8px 4px 12px; border-radius: var(--r-s); color: var(--ink-2); font-size: 14px; font-weight: 500; position: relative; }
.sb-link > span:not(.count):not(.dot):not(.menu-trigger):not(.doc-icon):not(.avatar) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-link:hover { background: var(--sunken); color: var(--ink); text-decoration: none; }
.sb-link.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.sb-link.unread { color: var(--ink); font-weight: 700; }
.sb-link > .icon { color: var(--ink-3); }
.sb-section { margin-top: 14px; }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 2px 4px; }
.sb-head-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 3px 4px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); border-radius: 4px; }
.sb-head-btn:hover { color: var(--ink); }
.sb-head .icon-btn { width: 24px; height: 24px; }
.sb-sub { font-size: 12px; color: var(--ink-3); padding: 8px 12px 2px; }
.sb-hint { display: block; width: 100%; text-align: left; border: 1px dashed var(--line-2); background: transparent; border-radius: var(--r-s); padding: 9px 11px; font-size: 13px; color: var(--ink-3); line-height: 1.4; margin: 2px 0 4px; }
.sb-hint:hover { border-color: var(--accent); color: var(--ink-2); }
.sb-empty { font-size: 12.5px; color: var(--ink-3); padding: 3px 0; }
.folder-link { padding-left: 6px; gap: 2px; }
.folder-link .chev { border: 0; background: transparent; color: var(--ink-3); width: 20px; height: 22px; display: grid; place-items: center; padding: 0; border-radius: 4px; }
.folder-link .chev:hover { background: var(--line); }
.folder-a { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: inherit; padding: 2px 0; }
.folder-a:hover { text-decoration: none; }
.folder-a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-more { opacity: 0; }
.folder-link:hover .sb-more, .folder-link:focus-within .sb-more { opacity: 1; }
.sb-more .icon-btn { width: 22px; height: 22px; }
.sb-foot { border-top: 1px solid var(--line); padding: 8px; display: flex; align-items: center; }
.sb-foot .sb-link { flex: 1; }
.hub { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); padding: 0 8px; }
.conn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.hub-live .conn-dot, .conn-live .conn-dot, .conn-connected .conn-dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.hub-offline .conn-dot, .conn-offline .conn-dot, .conn-disconnected .conn-dot { background: var(--danger); }
.conn-connecting .conn-dot, .hub-connecting .conn-dot { background: var(--gold); }

.content { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.content.is-doc, .content.is-chat { overflow: hidden; }
.mobile-bar { display: none; }
.scrim { display: none; }

/* pages */
.page { max-width: 1120px; width: 100%; margin: 0 auto; padding: 26px 32px 60px; }
.page.narrow { max-width: 720px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-title h1 { font-size: 28px; line-height: 1.15; }
.page-title .sub { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; color: var(--ink-3); min-height: 18px; }
.crumbs span { display: inline-flex; align-items: center; gap: 4px; }
.crumbs a { color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
.crumbs a:hover { color: var(--ink); }
.folder-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--fc); background: color-mix(in srgb, var(--fc) 14%, var(--surface)); flex: none; }
.folder-badge.small { width: 36px; height: 36px; border-radius: 10px; }
.member-btn { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 20px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.member-btn:hover { background: var(--sunken); }

.view-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.view-bar.plain { background: transparent; border: 0; padding: 0 0 12px; }
.view-stat { font-size: 13px; color: var(--ink-3); margin-left: 4px; }
.view-stat strong { color: var(--ink-2); }
.search-inline { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 0 8px; height: 30px; background: var(--surface); color: var(--ink-3); width: 190px; }
.search-inline input { border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; height: 28px; font-size: 13px; }

/* folder items */
.items.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.items.is-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); overflow: hidden; }
.item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px; background: var(--surface); border-radius: var(--r-m); color: var(--ink); box-shadow: var(--shadow-1); border: 1px solid transparent; min-width: 0; }
.item:hover { text-decoration: none; border-color: var(--line-2); }
.item-top { display: flex; align-items: center; gap: 7px; }
.item-kind { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.item-top .icon-btn { width: 26px; height: 26px; margin: -4px -6px -4px 0; }
.item-title { font-size: 15.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-snippet { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; min-height: 3.6em; }
.item-meta { font-size: 12.5px; color: var(--ink-3); margin-top: auto; }
.item.is-unread .item-title { color: var(--accent-text); }
.item-folder { flex-direction: row; align-items: center; gap: 12px; }
.item-main { display: flex; flex-direction: column; min-width: 0; }
.item-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items.is-list .item { flex-direction: row; align-items: center; box-shadow: none; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; gap: 12px; }
.items.is-list .item:hover { background: var(--surface-2); }
.items.is-list .item-top { order: 0; flex: none; }
.items.is-list .item-top .item-kind, .items.is-list .item-top .grow { display: none; }
.items.is-list .item-title { flex: 1; -webkit-line-clamp: 1; }
.items.is-list .item-meta { margin: 0; white-space: nowrap; }
.items.is-list .item-top > span:last-child { order: 3; }

/* updates feed */
.feed { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); overflow: hidden; }
.feed:empty { display: none; }
.feed-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--ink); }
.feed-item:last-child { border-bottom: 0; }
.feed-item:hover { background: var(--surface-2); text-decoration: none; }
.feed-item .doc-icon { margin-top: 2px; }
.feed-main { flex: 1; min-width: 0; }
.feed-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-title strong { font-weight: 600; }
.feed-item.is-unread .feed-title strong { font-weight: 750; }
.feed-item.is-unread { box-shadow: inset 3px 0 0 var(--accent); }
.feed-snippet { margin: 3px 0 0; color: var(--ink-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-meta { display: flex; flex-direction: column; align-items: flex-end; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.feed-meta em { font-style: normal; }
.welcome { background: var(--surface); border-radius: var(--r-l); padding: 30px; box-shadow: var(--shadow-1); margin-bottom: 20px; }
.welcome h2 { font-size: 24px; }
.welcome p { color: var(--ink-2); max-width: 60ch; }
.starter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 18px; }
.starter { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface-2); }
.starter .icon { color: var(--tc); margin-bottom: 4px; }
.starter span { font-size: 13px; color: var(--ink-3); }
.starter:hover { border-color: var(--tc); background: var(--surface); }

/* search */
.search-big { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 6px 6px 6px 14px; margin-bottom: 18px; color: var(--ink-3); }
.search-big input { border: 0 !important; box-shadow: none !important; font-size: 16px; }
.search-results h3 { font-size: 14px; color: var(--ink-3); margin: 18px 0 8px; font-family: var(--font); font-weight: 700; }
.result { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border-radius: var(--r-m); margin-bottom: 6px; color: var(--ink); box-shadow: var(--shadow-1); }
.result:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--line-2); }
.result p { margin: 4px 0; color: var(--ink-2); font-size: 14px; }
.result .icon { margin-top: 3px; color: var(--ink-3); }

.trash-list { display: flex; flex-direction: column; gap: 6px; }
.trash-row { display: flex; align-items: center; gap: 12px; background: var(--surface); padding: 12px 14px; border-radius: var(--r-m); box-shadow: var(--shadow-1); }
.trash-row > div { display: flex; flex-direction: column; min-width: 0; }
.settings-card { background: var(--surface); border-radius: var(--r-l); padding: 22px 24px; box-shadow: var(--shadow-1); margin-bottom: 16px; }
.settings-card h2 { font-size: 18px; margin-bottom: 14px; }
.settings-card p { margin: 0 0 12px; }
.profile-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-preview div { display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- doc page */
.doc-page { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.doc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 14px 20px 12px 26px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.doc-head-main { min-width: 0; flex: 1 1 360px; }
.doc-title-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.doc-title { font: 700 24px/1.2 var(--display); letter-spacing: -.015em; border: 0 !important; background: transparent !important; padding: 2px 4px !important; margin-left: -4px; min-height: 0 !important; box-shadow: none !important; flex: 1; min-width: 0; text-overflow: ellipsis; border-radius: var(--r-s) !important; }
.doc-title:hover:not([readonly]) { background: var(--surface-2) !important; }
.doc-title:focus { background: var(--surface-2) !important; }
h1.doc-title { padding: 2px 0 !important; }
.doc-head-side { display: flex; align-items: center; gap: 8px; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; margin-right: 4px; }
.conn-live span:last-child { }
.doc-body { flex: 1; display: flex; min-height: 0; }
.doc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); }
.type-board .doc-main, .type-roadmap .doc-main, .type-table .doc-main { background: var(--bg); }
.side-panel { width: var(--panel-w); flex: none; border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.panel-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 8px 0 10px; border-bottom: 1px solid var(--line); }
.panel-tabs button[role=tab] { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.panel-tabs button[role=tab].on { color: var(--ink); border-bottom-color: var(--accent); }
.panel-sub { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.activity { overflow-y: auto; padding: 8px 16px 20px; }
.activity section { margin-top: 14px; }
.activity h4 { font: 700 12.5px var(--font); color: var(--ink-3); margin-bottom: 8px; }
.who-line { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 14px; }
.who-line span { flex: 1; }
.act-line { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); padding: 6px 0; line-height: 1.4; }
.act-line .icon { margin: 2px 3px 0; color: var(--ink-3); }
.act-line em { color: var(--ink-3); font-style: normal; }
.act-line strong { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- rich text */
.rich { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.toolbar { display: flex; align-items: center; gap: 1px; flex-wrap: wrap; padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: 2; }
.toolbar .icon-btn { width: 32px; height: 32px; }
.tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 5px; }
.tb-select { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 0; border-radius: var(--r-s); background: transparent; font-size: 13.5px; font-weight: 600; color: var(--ink-2); min-width: 104px; justify-content: space-between; }
.tb-select:hover, .tb-select.is-active { background: var(--sunken); }
.rich-scroll { flex: 1; overflow-y: auto; }
.rich-page { max-width: 780px; margin: 0 auto; padding: 34px 40px 30vh; }
.history-preview .rich-page { padding: 24px; }
.prose { outline: none; font-size: 16px; line-height: 1.68; color: var(--ink); caret-color: var(--accent); }
.prose > * + * { margin-top: .7em; }
.prose p { margin: 0; }
.prose h1, .prose h2, .prose h3 { line-height: 1.25; }
.prose h1 { font-size: 30px; margin-top: 1.2em; }
.prose h2 { font-size: 22px; margin-top: 1.5em; padding-bottom: 4px; }
.prose h3 { font-size: 18px; margin-top: 1.3em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.5em; margin-bottom: 0; }
.prose li > p { margin: 0; }
.prose li + li { margin-top: .2em; }
.prose ul[data-type=taskList] { list-style: none; padding-left: .2em; }
.prose ul[data-type=taskList] li { display: flex; gap: 10px; align-items: flex-start; }
.prose ul[data-type=taskList] li > label { margin-top: .26em; flex: none; user-select: none; }
.prose ul[data-type=taskList] li > div { flex: 1; min-width: 0; }
.prose ul[data-type=taskList] li[data-checked=true] > div { color: var(--ink-3); text-decoration: line-through; }
.prose blockquote { margin-left: 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--gold); color: var(--ink-2); }
.prose code { font: 500 .88em var(--mono); background: var(--sunken); border-radius: 4px; padding: .1em .35em; }
.prose pre { background: var(--sunken); border-radius: var(--r-m); padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: 14px; line-height: 1.55; }
.prose hr { border: 0; border-top: 1px solid var(--line-2); margin: 1.6em 0; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.prose img { max-width: 100%; border-radius: var(--r-m); display: block; }
.prose img.ProseMirror-selectednode { outline: 3px solid var(--accent); }
.prose mark { background: #FDEB9C; color: #1B1500; padding: 0 1px; }
.prose table { border-collapse: collapse; width: 100%; table-layout: fixed; margin: 1em 0; overflow: hidden; }
.prose td, .prose th { border: 1px solid var(--line-2); padding: 7px 10px; vertical-align: top; position: relative; min-width: 60px; }
.prose th { background: var(--surface-2); font-weight: 650; text-align: left; }
.prose .tableWrapper { overflow-x: auto; }
.prose .selectedCell::after { content: ''; position: absolute; inset: 0; background: var(--accent-soft); opacity: .6; pointer-events: none; }
.prose .column-resize-handle { position: absolute; right: -2px; top: 0; bottom: 0; width: 4px; background: var(--accent); pointer-events: none; }
.prose.resize-cursor { cursor: col-resize; }
.prose p.is-empty:first-child::before, .prose .is-empty::before { content: attr(data-placeholder); color: var(--ink-3); float: left; height: 0; pointer-events: none; }
.prose .ProseMirror-gapcursor::after { border-top-color: var(--ink); }
.comment-mark { background: color-mix(in srgb, var(--gold) 26%, transparent); border-bottom: 2px solid var(--gold); cursor: pointer; border-radius: 2px; }
.comment-mark.is-focused { background: color-mix(in srgb, var(--gold) 50%, transparent); }
.collaboration-cursor__caret { border-left: 2px solid; border-right: 0; margin-left: -1px; margin-right: -1px; pointer-events: none; position: relative; word-break: normal; }
.collaboration-cursor__label { position: absolute; top: -1.45em; left: -2px; font: 600 11.5px/1 var(--font); color: #fff; padding: 3px 6px; border-radius: 4px 4px 4px 0; white-space: nowrap; user-select: none; pointer-events: none; }
.ProseMirror-selectednode { outline: none; }
.is-readonly .prose ul[data-type=taskList] input { pointer-events: none; }
.slash-menu { position: fixed; z-index: 950; width: 250px; max-height: 310px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 5px; }

/* comments */
.comments { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding-bottom: 20px; }
.comment-card { margin: 10px 12px 0; border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; background: var(--surface); cursor: pointer; }
.comment-card.is-focused { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.comment-quote { margin: 0 0 8px; padding-left: 9px; border-left: 3px solid var(--gold); color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-reply { display: flex; gap: 9px; margin: 8px 0; }
.comment-reply p { margin: 2px 0 0; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.comment-meta { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.comment-meta span { color: var(--ink-3); font-size: 12px; }
.comment-compose textarea { font-size: 14px; min-height: 0; }
.comment-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }

/* ---------------------------------------------------------------- board */
.board-wrap, .roadmap-wrap, .table-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.board { flex: 1; display: flex; gap: 12px; padding: 16px 20px 20px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; }
.column { width: 286px; flex: none; background: var(--sunken); border-radius: var(--r-m); display: flex; flex-direction: column; max-height: 100%; border: 1px solid transparent; }
.column.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--sunken)); }
.column-head { display: flex; align-items: center; gap: 8px; padding: 10px 8px 6px 12px; }
.column-head h3 { font: 700 14px var(--font); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; display: inline-block; }
.col-count { font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--surface); padding: 0 7px; border-radius: 9px; }
.col-count.is-over { color: #fff; background: var(--danger); }
.cards { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 6px; overflow-y: auto; min-height: 20px; }
.card { background: var(--surface); border-radius: var(--r-s); padding: 9px 11px 8px; box-shadow: var(--shadow-1); cursor: pointer; border: 1px solid transparent; display: flex; flex-direction: column; gap: 6px; }
.card:hover { border-color: var(--line-2); }
.card.is-dragging { opacity: .4; }
.card.is-watched { border-color: var(--watch); box-shadow: 0 0 0 2px color-mix(in srgb, var(--watch) 30%, transparent); }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.card-title { font-size: 14px; font-weight: 550; line-height: 1.35; word-break: break-word; }
.card-meta { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--ink-3); min-height: 22px; flex-wrap: wrap; }
.card-meta > span { display: inline-flex; align-items: center; gap: 3px; }
.prio { font-weight: 600; }
.due.is-overdue { color: var(--danger); font-weight: 600; }
.check.is-done { color: var(--ok); }
.points { min-width: 20px; height: 18px; border-radius: 9px; background: var(--sunken); color: var(--ink-2); font-weight: 700; justify-content: center; padding: 0 6px; }
.drop-line { height: 3px; border-radius: 2px; background: var(--accent); margin: -3px 0; }
.add-card { display: flex; align-items: center; gap: 6px; margin: 2px 8px 8px; padding: 7px 8px; border: 0; background: transparent; border-radius: var(--r-s); color: var(--ink-3); font-size: 13.5px; font-weight: 600; }
.add-card:hover { background: var(--surface); color: var(--ink); }
.add-card-form { padding: 2px 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.add-card-form textarea { font-size: 14px; }
.column-add { align-items: center; justify-content: center; gap: 8px; flex-direction: row; height: 48px; border: 1px dashed var(--line-2); background: transparent; color: var(--ink-3); font-weight: 600; }
.column-add:hover { color: var(--ink); border-color: var(--accent); }
.card-modal .modal-body { padding-top: 18px; }
.card-modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-title-input { font: 700 21px var(--display) !important; border-color: transparent !important; padding: 4px 6px !important; margin-left: -6px; background: transparent !important; }
.card-title-input:hover:not(:disabled), .card-title-input:focus { border-color: var(--line-2) !important; }
.watching { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.kind-icon { display: grid; place-items: center; }
.card-modal-grid { display: grid; grid-template-columns: 1fr 220px; gap: 24px; }
.card-side { display: flex; flex-direction: column; }
.card-side .field { margin-bottom: 12px; }
.progress { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.progress div { height: 100%; background: var(--ok); transition: width .2s; }
.checklist { list-style: none; margin: 6px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.checklist li { display: flex; align-items: center; gap: 9px; padding: 3px 0; font-size: 14px; }
.checklist li span { flex: 1; }
.checklist .is-done { text-decoration: line-through; color: var(--ink-3); }
.checklist .icon-btn { opacity: 0; width: 24px; height: 24px; }
.checklist li:hover .icon-btn { opacity: 1; }
.label-editor { display: flex; flex-direction: column; gap: 8px; }
.label-row { display: flex; align-items: center; gap: 8px; }
.label-row .chip { min-width: 70px; justify-content: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .span2 { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- roadmap */
.timeline { flex: 1; overflow: auto; position: relative; background: var(--surface); margin: 14px 20px 0; border-radius: var(--r-m); box-shadow: var(--shadow-1); user-select: none; touch-action: pan-x pan-y; }
.tl-inner { position: relative; min-height: 100%; }
.tl-head { position: sticky; top: 0; z-index: 4; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
.tl-corner { position: sticky; left: 0; z-index: 2; width: 200px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; align-items: flex-end; padding: 0 14px 7px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.tl-scale { position: relative; height: 52px; }
.tl-row { position: absolute; left: 0; right: 0; }
.tl-row.top { top: 0; height: 27px; }
.tl-row.bottom { top: 27px; height: 25px; }
.tl-cell { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); padding: 4px 7px; font-size: 12px; white-space: nowrap; overflow: hidden; color: var(--ink-3); }
.tl-row.top .tl-cell { font-weight: 700; color: var(--ink-2); font-size: 12.5px; }
.tl-body { position: relative; }
.tl-grid { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 0; }
.tl-gridline { position: absolute; top: 0; bottom: 0; border-left: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.tl-milestone-line { position: absolute; top: 0; bottom: 0; border-left: 2px dashed color-mix(in srgb, var(--gold) 55%, transparent); }
.tl-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--danger); z-index: 3; }
.tl-today em { position: absolute; top: 2px; left: 4px; font: 700 10.5px var(--font); font-style: normal; color: var(--danger); background: var(--surface); padding: 0 3px; border-radius: 3px; }
.tl-lane { display: flex; border-bottom: 1px solid var(--line); position: relative; }
.tl-lane.is-target .tl-lane-track { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.tl-lane-name { position: sticky; left: 0; z-index: 3; width: 200px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; align-items: flex-start; gap: 8px; padding: 12px 6px 8px 14px; box-shadow: inset 3px 0 0 var(--lane); }
.lane-title { flex: 1; font-weight: 650; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-lane-name .col-dot { margin-top: 6px; }
.tl-lane-name .icon-btn { width: 24px; height: 24px; margin-top: -2px; }
.tl-lane-track { position: relative; z-index: 1; }
.tl-bar { position: absolute; height: 28px; border-radius: 6px; background: color-mix(in srgb, var(--bar) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--bar) 55%, transparent); display: flex; align-items: center; gap: 6px; padding: 0 8px; overflow: hidden; cursor: grab; touch-action: none; }
.tl-bar:active { cursor: grabbing; }
.tl-bar.st-in-progress { background: color-mix(in srgb, var(--bar) 28%, var(--surface)); }
.tl-bar.st-done { background: color-mix(in srgb, var(--bar) 12%, var(--surface)); border-style: solid; opacity: .85; }
.tl-bar.st-at-risk { border-color: var(--danger); background-image: repeating-linear-gradient(-45deg, transparent 0 7px, color-mix(in srgb, var(--danger) 12%, transparent) 7px 10px); }
.tl-bar.st-planned { border-style: dashed; }
.tl-bar.is-dragging { box-shadow: var(--shadow-2); z-index: 5; }
.tl-bar.is-watched, .tl-ms.is-watched { outline: 2px solid var(--watch); outline-offset: 1px; }
.tl-progress { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--bar) 30%, transparent); pointer-events: none; }
.tl-bar-label { position: relative; flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.tl-bar.is-narrow { overflow: visible; }
.tl-bar.is-narrow .tl-bar-label { position: absolute; left: calc(100% + 6px); overflow: visible; }
.tl-bar .avatar, .tl-bar .avatar-stack { position: relative; }
.tl-handle { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.tl-handle.l { left: 0; }
.tl-handle.r { right: 0; }
.tl-handle:hover { background: color-mix(in srgb, var(--bar) 40%, transparent); }
.tl-ms { position: absolute; display: flex; align-items: center; gap: 8px; cursor: grab; touch-action: none; white-space: nowrap; }
.tl-diamond { width: 17px; height: 17px; transform: rotate(45deg); border-radius: 3px; flex: none; box-shadow: 0 0 0 2px var(--surface), 0 1px 4px rgba(0,0,0,.2); }
.tl-ms.st-done .tl-diamond { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ok); }
.tl-ms.st-at-risk .tl-diamond { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--danger); }
.tl-ms-label { font: 700 13px var(--display); display: inline-flex; gap: 6px; align-items: baseline; background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 0 4px; border-radius: 4px; }
.tl-ms-label em { font: 500 11.5px var(--font); font-style: normal; color: var(--ink-3); }
.hint-line { margin: 0; padding: 8px 22px 12px; font-size: 12.5px; color: var(--ink-3); }
.rm-list { flex: 1; overflow: auto; padding: 16px 20px 30px; }
.rm-list section { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); margin-bottom: 14px; overflow: hidden; }
.rm-list h3 { display: flex; align-items: center; gap: 9px; font-size: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rm-list h3 .muted { font: 600 13px var(--font); }
.plain-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.plain-table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 700; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.plain-table td { padding: 9px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.plain-table tr:last-child td { border-bottom: 0; }
.plain-table tr.clickable:hover td { background: var(--surface-2); cursor: pointer; }
.mini-progress { display: inline-block; width: 80px; height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; vertical-align: middle; }
.mini-progress span { display: block; height: 100%; background: var(--ok); }

/* ---------------------------------------------------------------- table */
.grid-scroll { flex: 1; overflow: auto; margin: 14px 20px 20px; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); }
.grid { border-collapse: separate; border-spacing: 0; font-size: 14px; table-layout: fixed; min-width: 100%; }
.grid th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-weight: 650; color: var(--ink-2); font-size: 13px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line); padding: 0; height: 38px; }
.th-inner { display: flex; align-items: center; gap: 6px; padding: 0 4px 0 10px; height: 100%; }
.th-inner > .icon { color: var(--ink-3); }
.th-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-inner .icon-btn { width: 24px; height: 24px; opacity: .6; }
.grid th:hover .icon-btn { opacity: 1; }
.col-resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 3; }
.col-resize:hover { background: var(--accent); }
.grid th.add-col { text-align: center; }
.grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); height: 38px; padding: 0; position: relative; vertical-align: middle; }
.grid tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.grid .rownum { width: 44px; text-align: center; color: var(--ink-3); font-size: 12px; font-weight: 600; background: var(--surface-2); position: sticky; left: 0; z-index: 1; }
.grid th.rownum { z-index: 3; }
.rownum-btn { border: 0; background: transparent; width: 100%; height: 36px; color: var(--ink-3); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.rownum-btn .icon { display: none; }
.rownum-btn:hover span { display: none; }
.rownum-btn:hover .icon { display: block; }
.cell-edit { border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0 !important; height: 37px; min-height: 0 !important; padding: 0 10px !important; width: 100%; font-size: 14px; }
.cell-edit:focus { box-shadow: inset 0 0 0 2px var(--accent) !important; background: var(--surface) !important; }
.t-number .cell-edit { text-align: right; font-variant-numeric: tabular-nums; }
.cell-btn { border: 0; background: transparent; width: 100%; height: 37px; padding: 0 10px; text-align: left; display: flex; align-items: center; overflow: hidden; }
.cell-btn:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); }
.cell-menu { display: flex; width: 100%; }
.cell-check { margin-left: 12px; }
.t-checkbox { text-align: left; }
.cell-link { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.placeholder { color: var(--line-2); }
.cell.is-watched { box-shadow: inset 0 0 0 2px var(--watch); }
.cell-who { position: absolute; top: -9px; right: 4px; font-size: 10.5px; font-weight: 700; color: #fff; padding: 0 5px; border-radius: 3px; z-index: 2; line-height: 16px; }
.group-row td { background: var(--surface-2) !important; height: 34px; padding: 0 12px; font-size: 13px; }
.group-row td > * { margin-right: 8px; vertical-align: middle; }
.add-row td { border-right: 0; }
.add-row button { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; height: 36px; color: var(--ink-3); font-weight: 600; font-size: 13.5px; position: sticky; left: 0; }
.add-row button:hover { color: var(--ink); }
.grid tfoot td { background: var(--surface-2); font-weight: 700; font-size: 13px; color: var(--ink-2); }
.grid .sum { text-align: right; padding: 0 10px; font-variant-numeric: tabular-nums; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.type-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); font-size: 14px; font-weight: 500; }
.type-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

/* ---------------------------------------------------------------- chat */
.chat-page { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--surface); }
.chat-page .page-head { padding: 14px 22px; margin: 0; border-bottom: 1px solid var(--line); }
.chat-page .page-title h1 { font-size: 21px; }
.hash-badge { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.topic { border: 0; background: transparent; padding: 0; color: var(--ink-3); font-size: 13.5px; text-align: left; }
.topic:hover { color: var(--ink); }
.topic.static:hover { color: var(--ink-3); }
.messages { flex: 1; overflow-y: auto; padding: 12px 0 8px; min-height: 0; }
.load-older { display: block; margin: 0 auto 10px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 14px; padding: 4px 12px; font-size: 13px; color: var(--ink-2); }
.day-sep { display: flex; align-items: center; gap: 10px; margin: 14px 18px 6px; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.msg { display: flex; gap: 11px; padding: 6px 18px 4px; position: relative; }
.msg.is-grouped { padding-top: 1px; }
.msg:hover { background: var(--surface-2); }
.msg-gutter { width: 34px; flex: none; display: flex; justify-content: center; }
.is-compact .msg-gutter { width: 28px; }
.msg-time-hover { font-size: 10.5px; color: var(--ink-3); opacity: 0; margin-top: 3px; white-space: nowrap; }
.msg:hover .msg-time-hover { opacity: 1; }
.msg-main { flex: 1; min-width: 0; }
.msg-head { display: flex; gap: 8px; align-items: baseline; }
.msg-head strong { font-size: 14.5px; }
.msg-head span { font-size: 12px; color: var(--ink-3); }
.msg-body { font-size: 14.5px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; }
.msg-body code { font: 500 .88em var(--mono); background: var(--sunken); padding: .05em .35em; border-radius: 4px; }
.msg-edited { font-size: 11.5px; color: var(--ink-3); }
.mention { color: var(--accent-text); font-weight: 600; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.mention.is-me { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 65%, var(--ink)); }
.reactions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.reaction { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 1px 8px; font-size: 13px; }
.reaction span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.reaction.on { border-color: var(--accent); background: var(--accent-soft); }
.msg-actions { position: absolute; top: -12px; right: 14px; display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); box-shadow: var(--shadow-1); padding: 1px; }
.msg:hover .msg-actions, .msg-actions:focus-within { display: flex; }
.msg-actions .icon-btn { width: 28px; height: 28px; }
.msg-edit textarea { font-size: 14px; }
.msg-edit .row { margin-top: 6px; }
.chat-foot { padding: 0 14px 14px; }
.typing { height: 18px; font-size: 12px; color: var(--ink-3); padding: 0 6px 2px; }
.composer { position: relative; display: flex; align-items: flex-end; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r-m); background: var(--surface); padding: 5px 5px 5px 12px; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer textarea { border: 0 !important; box-shadow: none !important; padding: 6px 0 !important; resize: none; min-height: 30px !important; max-height: 200px; font-size: 14.5px; background: transparent !important; }
.composer .send { color: var(--accent-text); }
.composer .send:not(:disabled):hover { background: var(--accent); color: var(--accent-ink); }
.mention-pop { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 4px; z-index: 5; }
.people-pick { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 4px; }
.person-opt { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 6px 8px; border-radius: var(--r-s); text-align: left; }
.person-opt span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.person-opt em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.person-opt:hover { background: var(--sunken); }
.person-opt.on { background: var(--accent-soft); }
.person-opt.on .icon { color: var(--accent-text); }

/* ---------------------------------------------------------------- dialogs */
.share-form { display: flex; gap: 8px; margin-bottom: 16px; }
.share-input { flex: 1; position: relative; }
.share-form select { width: 120px; flex: none; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-2); padding: 4px; }
.share-list { display: flex; flex-direction: column; }
.share-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; border-top: 1px solid var(--line); }
.share-row:first-child { border-top: 0; }
.share-row.inherited { opacity: .8; }
.who-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.who-text strong { font-weight: 600; font-size: 14.5px; }
.who-text em { font-style: normal; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 5px 8px; border-radius: var(--r-s); }
.role-btn:hover { background: var(--sunken); }
.role-static { font-size: 13.5px; color: var(--ink-3); padding: 0 8px; }
.folder-picker { border: 1px solid var(--line); border-radius: var(--r-m); max-height: 320px; overflow-y: auto; padding: 4px; }
.pick-row { display: flex; align-items: center; gap: 2px; border-radius: var(--r-s); }
.pick-row.on { background: var(--accent-soft); }
.pick-row .chev { width: 22px; height: 26px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-3); padding: 0; flex: none; }
.pick-label { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 6px 6px; text-align: left; font-size: 14px; border-radius: var(--r-s); }
.pick-row:not(.on) .pick-label:hover { background: var(--sunken); }
.pick-heading { font-size: 12px; color: var(--ink-3); font-weight: 700; padding: 10px 8px 4px; }
.pick-wrap { margin-bottom: 12px; }
.new-doc .modal-body { padding-top: 6px; }
.type-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.type-tab { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.type-tab .icon { color: var(--tc); }
.type-tab.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 1px var(--tc); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.tpl { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.tpl strong { font-size: 14px; }
.tpl span { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.tpl:hover { border-color: var(--line-2); background: var(--surface-2); }
.tpl.on { border-color: var(--accent); background: var(--accent-soft); }
.where { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--sunken); padding: 6px 10px; border-radius: var(--r-s); font-size: 13px; font-weight: 600; color: var(--ink-2); max-width: 260px; }
.history-modal .modal-body { padding: 0; display: flex; min-height: 0; }
.history { display: flex; flex: 1; min-height: 60vh; max-height: 70vh; width: 100%; }
.history-list { width: 260px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.version { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: var(--r-s); }
.version strong { font-size: 14px; }
.version span { font-size: 12.5px; color: var(--ink-3); }
.version:hover { background: var(--sunken); }
.version.on { background: var(--accent-soft); }
.history-preview { flex: 1; min-width: 0; overflow: auto; display: flex; flex-direction: column; background: var(--bg); }
.history-preview .rich { background: var(--surface); }
.history-preview .timeline, .history-preview .grid-scroll { margin: 12px; }
.palette .modal-body { padding: 0; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette-input input { border: 0 !important; box-shadow: none !important; font-size: 17px; padding: 4px 0 !important; }
.palette-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent; padding: 9px 10px; border-radius: var(--r-s); text-align: left; }
.palette-item.on { background: var(--sunken); }
.pi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pi-text strong { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-text em { font-style: normal; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item.all { color: var(--accent-text); }
.doc-icon { display: inline-grid; place-items: center; flex: none; }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: #151933; color: #E7E9F6; padding: 40px 56px; display: flex; flex-direction: column; justify-content: center; gap: 22px; position: relative; overflow: hidden; }
.auth-brand { position: absolute; top: 34px; left: 56px; display: flex; align-items: center; gap: 11px; font: 750 20px var(--display); }
.auth-brand .brand-mark { --fs: 20px; --fm: #7D87FF; }
.auth-brand .brand-mark::after { box-shadow: 0 0 0 2px #151933; }
.auth-art h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.025em; max-width: 15ch; font-weight: 750; }
.auth-art p { color: #A8AED0; max-width: 46ch; font-size: 16px; margin: 0; }
.quest-map { position: relative; padding: 26px 0 8px; margin-bottom: 18px; }
.qm-lane { position: relative; height: 34px; border-bottom: 1px solid rgba(255,255,255,.07); }
.qm-lane span { position: absolute; left: 0; top: 9px; font-size: 12px; color: #7E85AE; width: 50px; }
.qm-lane i { position: absolute; top: 8px; height: 18px; border-radius: 5px; background: color-mix(in srgb, var(--c) 55%, #151933); border: 1px solid color-mix(in srgb, var(--c) 80%, white); margin-left: 54px; max-width: calc(100% - 54px); }
.quest-map b { position: absolute; top: 0; bottom: 0; border-left: 2px dashed rgba(240, 185, 53, .55); margin-left: 54px; }
.quest-map b::before { content: ''; position: absolute; top: 4px; left: -8px; width: 13px; height: 13px; background: #F0B935; transform: rotate(45deg); border-radius: 2px; }
.quest-map b em { position: absolute; top: 2px; left: 12px; font: 700 12px var(--display); font-style: normal; color: #F0B935; white-space: nowrap; }
.auth-form-wrap { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h2 { font-size: 28px; }
.auth-form > p.muted { margin: 6px 0 22px; }
.auth-form .switch { text-align: center; color: var(--ink-3); font-size: 14px; margin-top: 18px; }


/* ---------------------------------------------------------------- friends & profiles */
.avatar { position: relative; }
.avatar.has-img { background: var(--sunken) !important; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar .presence { position: absolute; right: -1px; bottom: -1px; width: 32%; height: 32%; min-width: 9px; min-height: 9px; max-width: 18px; max-height: 18px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 2px var(--surface); }
.avatar .presence.on { background: var(--ok); }
.online-count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--ok); white-space: nowrap; }
.handle-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 18px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }
.handle-chip strong { color: var(--ink); }
.handle-chip:hover { border-color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { border: 0; background: transparent; padding: 10px 14px 11px; font-weight: 600; font-size: 14.5px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 7px; }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab .count { margin-left: 2px; }
.search-inline.wide { width: 100%; max-width: 360px; height: 36px; margin-bottom: 14px; }
.list-head { font: 700 13px var(--font); color: var(--ink-3); margin: 18px 0 8px; }
.list-head:first-of-type { margin-top: 0; }
.pad0 { margin: 0 0 8px; }
.people-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); overflow: hidden; }
.people-list:empty { display: none; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }
.person-row:hover { background: var(--surface-2); }
.person-link { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; color: var(--ink); }
.person-link:hover { text-decoration: none; }
.person-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.person-text strong { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-text strong em { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: 13.5px; }
.person-text > span { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.status-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.status-emoji { font-size: 14px; }
.add-friend-form { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); padding: 6px 6px 6px 14px; color: var(--ink-3); margin-bottom: 8px; }
.add-friend-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.add-friend-form input { border: 0 !important; box-shadow: none !important; font-size: 16px; }
.add-friend > .muted { margin: 0 0 14px; }

.profile-card { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); overflow: hidden; margin-bottom: 16px; }
.profile-banner { height: 120px; background: linear-gradient(120deg, var(--pc), color-mix(in srgb, var(--pc) 45%, var(--gold))); }
.profile-main { padding: 0 28px 26px; position: relative; }
.profile-main > .avatar { margin-top: -54px; box-shadow: 0 0 0 5px var(--surface); font-size: 38px !important; }
.profile-main > .avatar .presence { box-shadow: 0 0 0 4px var(--surface); right: 4px; bottom: 4px; }
.profile-actions { position: absolute; right: 24px; top: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.profile-main h1 { font-size: 28px; margin-top: 12px; }
.profile-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-3); margin: 4px 0 0; font-size: 14.5px; }
.online-text::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); margin-right: 6px; vertical-align: 1px; }
.online-text.on { color: var(--ok); }
.online-text.on::before { background: var(--ok); }
.profile-status { margin-top: 12px; display: inline-flex; background: var(--sunken); border-radius: 16px; padding: 5px 12px; }
.profile-status .status-line { font-size: 14px; color: var(--ink); }
.profile-role { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--ink-2); font-size: 15px; }
.profile-bio { white-space: pre-wrap; max-width: 62ch; margin: 12px 0 0; line-height: 1.6; }
.profile-facts { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-2); font-size: 14px; }
.profile-facts li { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.profile-facts .icon { color: var(--ink-3); }
.profile-facts a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.mutual { display: flex; flex-wrap: wrap; gap: 10px; }
.mutual-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; text-align: center; font-size: 13px; color: var(--ink-2); }
.mutual-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.settings-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.settings-head h2 { margin: 0; }
.photo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.photo-actions p { width: 100%; margin: 0; }
.link-row { display: grid; grid-template-columns: 180px 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.save-bar { display: flex; align-items: center; gap: 12px; position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 2px; border-top: 1px solid var(--line); margin-top: 6px; }
.status-input { display: flex; gap: 8px; margin-bottom: 12px; }
.emoji-btn { width: 40px; height: 38px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--surface); font-size: 19px; }
.status-presets { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.preset { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 7px 8px; border-radius: var(--r-s); text-align: left; font-size: 14px; }
.preset:hover { background: var(--sunken); }
.msg-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.msg-avatar-link { display: block; border-radius: 50%; }
@media (max-width: 860px) {
  .profile-actions { position: static; margin-top: 12px; justify-content: flex-start; }
  .profile-main { padding: 0 18px 20px; }
  .person-row { flex-wrap: wrap; }
  .person-actions { width: 100%; padding-left: 55px; }
  .link-row { grid-template-columns: 1fr auto; }
  .link-row input:first-child { grid-column: 1 / -1; }
  .handle-chip { font-size: 12px; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  :root { --panel-w: 320px; }
  .doc-page.has-panel .side-panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 60; box-shadow: var(--shadow-2); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 80; transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow-2); }
  .sidebar.is-open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(14,16,22,.4); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .mobile-bar .brand { font-size: 17px; }
  .page { padding: 18px 16px 50px; }
  .page-title h1 { font-size: 23px; }
  .doc-head { padding: 10px 12px; }
  .doc-title { font-size: 20px; }
  .conn span + * { display: none; }
  .conn { font-size: 0; gap: 0; }
  .side-panel { width: 100% !important; }
  .card-modal-grid, .form-grid { grid-template-columns: 1fr; }
  .board { padding: 12px; }
  .column { width: 82vw; max-width: 300px; }
  .timeline, .grid-scroll { margin: 10px 10px 0; }
  .tl-corner, .tl-lane-name { width: 120px; }
  .rich-page { padding: 22px 18px 40vh; }
  .toolbar { overflow-x: auto; flex-wrap: nowrap; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 90px 24px 34px; }
  .auth-brand { left: 24px; top: 26px; }
  .type-tabs { grid-template-columns: repeat(2, 1fr); }
  .history { flex-direction: column; max-height: none; }
  .history-list { width: auto; max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  .feed-meta { display: none; }
  .view-bar { padding: 8px 10px; }
  .search-inline { width: 150px; }
  .share-form { flex-wrap: wrap; }
}


/* ================================================================ new shell: rail + context panel */
.rail { width: 76px; flex: none; background: var(--rail); color: var(--rail-ink); display: flex; flex-direction: column; align-items: center; padding: 14px 0 12px; gap: 6px; z-index: 40; }
.rail-logo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 10px; }
.rail-logo .brand-mark { --fs: 22px; --fm: #7D87FF; }
.rail-logo .brand-mark::after { box-shadow: 0 0 0 2px var(--rail); }
.rail-logo:hover { background: rgba(255,255,255,.06); }
.rail-items { display: flex; flex-direction: column; gap: 4px; width: 100%; align-items: center; }
.rail-btn { width: 64px; border: 0; background: transparent; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 7px; border-radius: 14px; position: relative; }
.rail-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.rail-btn.on { color: #fff; }
.rail-btn.on .rail-ic { background: rgba(125,135,255,.22); color: #fff; }
.rail-btn.on::before { content: ''; position: absolute; left: -6px; top: 14px; bottom: 26px; width: 4px; border-radius: 0 4px 4px 0; background: #F0B935; }
.rail-ic { width: 42px; height: 32px; display: grid; place-items: center; border-radius: 10px; position: relative; transition: background .15s; }
.rail-label { font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.rail-badge { position: absolute; top: -3px; right: -1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #F0638A; color: #fff; font: 700 10.5px/18px var(--font); box-shadow: 0 0 0 2px var(--rail); }
.rail-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail-btn.small { padding: 4px 0; }
.rail-create { width: 46px; height: 46px; border-radius: 15px; border: 0; background: #F0B935; color: #171B26; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(240,185,53,.28); transition: transform .12s; }
.rail-create:hover { transform: translateY(-1px) rotate(90deg); }
.rail-me { border: 0; background: transparent; padding: 3px; border-radius: 50%; margin-top: 4px; }
.rail-me .avatar { box-shadow: 0 0 0 2px var(--rail); }
.rail-me .presence { box-shadow: 0 0 0 2px var(--rail) !important; }
.ctx { width: 280px; flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; animation: ctx-in .14s ease-out; z-index: 30; }
@keyframes ctx-in { from { transform: translateX(-10px); opacity: .5; } }
.ctx-head { display: flex; align-items: center; gap: 2px; padding: 16px 10px 10px 18px; }
.ctx-head h2 { font-size: 20px; letter-spacing: -.02em; }
.ctx-body { flex: 1; overflow-y: auto; padding: 0 8px 16px; }
.ctx-body > .sb-link { margin-top: 2px; }
.ctx-foot { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; }
.ctx-label { font-size: 12px; font-weight: 700; color: var(--ink-3); padding: 14px 10px 4px; }
.ctx-scrim { display: none; }
.pad-side { padding: 4px 12px; }
.friend-row { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 8px; border-radius: var(--r-s); }
.friend-row:hover, .friend-row.on { background: var(--sunken); }
.friend-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--ink); }
.friend-link:hover { text-decoration: none; }
.friend-text { display: flex; flex-direction: column; min-width: 0; }
.friend-text strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-text em, .friend-text .status-line { font-style: normal; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-actions { display: flex; opacity: 0; }
.friend-row:hover .friend-actions, .friend-row:focus-within .friend-actions { opacity: 1; }
.friend-actions .icon-btn { width: 26px; height: 26px; }
.sidebar { display: none; }

/* home */
.page.home { max-width: 1240px; }
.home-hero { display: grid; grid-template-columns: minmax(260px, 1fr) auto; gap: 24px; align-items: end; padding: 8px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.home-date { margin: 0 0 4px; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.home-hero h1 { font: 750 clamp(30px, 3.4vw, 42px)/1.05 var(--display); letter-spacing: -.03em; }
.home-status { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--line-2); background: var(--surface); border-radius: 18px; padding: 6px 13px; font-size: 13.5px; color: var(--ink-2); }
.home-status:hover { border-color: var(--accent); color: var(--ink); }
.home-create { display: grid; grid-template-columns: repeat(6, 96px); gap: 8px; }
.create-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 11px 11px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-height: 104px; }
.create-tile strong { font-size: 13.5px; margin-top: 6px; }
.create-tile span:last-child { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.create-tile .ct-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, var(--surface)); }
.create-tile:hover { border-color: var(--tc); box-shadow: 0 4px 16px color-mix(in srgb, var(--tc) 16%, transparent); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.home-main { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.home-h { font: 700 15px var(--font); color: var(--ink); margin-bottom: 12px; letter-spacing: 0; }
.home-h-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.home-h-row .home-h { margin: 0; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.recent-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); overflow: hidden; min-height: 112px; border: 1px solid transparent; }
.recent-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tc); }
.recent-card:hover { text-decoration: none; border-color: var(--line-2); }
.recent-card strong { font-size: 15px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rc-type { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--tc); }
.rc-meta { margin-top: auto; font-size: 12px; color: var(--ink-3); }
.recent-card.is-unread strong::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: 3px; }
.home-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.side-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-1); padding: 16px; }
.side-friend { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.sf-text { display: flex; flex-direction: column; flex: 1; min-width: 0; color: var(--ink); }
.sf-text:hover { text-decoration: none; }
.sf-text strong { font-size: 14px; font-weight: 600; }
.sf-text em, .sf-text .status-line { font-style: normal; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-requests { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: var(--r-s); background: var(--accent-soft); font-weight: 600; font-size: 13.5px; }
.side-note { display: flex; gap: 10px; padding: 7px 0; font-size: 13px; color: var(--ink-2); line-height: 1.4; border-top: 1px solid var(--line); }
.side-note:first-of-type { border-top: 0; }
.side-note em { font-style: normal; color: var(--ink-3); }
.side-note.is-unread strong { color: var(--accent-text); }
.side-card .count { margin: 0; }
.wrap-center { flex-wrap: wrap; justify-content: center; }

/* notifications panel */
.notif-head { display: flex; align-items: center; gap: 4px; padding: 0 4px 10px; }
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; }
.notif:hover { background: var(--sunken); }
.notif.is-unread { background: var(--accent-soft); }
.notif.nk-ping.is-unread { background: color-mix(in srgb, var(--gold) 16%, var(--surface)); }
.notif-main { display: flex; gap: 10px; flex: 1; min-width: 0; color: var(--ink); }
.notif-main:hover { text-decoration: none; }
.notif-av { position: relative; flex: none; }
.notif-av i { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 0 0 2px var(--panel); }
.nk-ping .notif-av i { background: var(--gold); color: #171B26; }
.nk-friend_request .notif-av i, .nk-friend_accepted .notif-av i { background: var(--ok); }
.notif-text { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.notif-text em { font-style: normal; color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.notif-text time { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.notif .row { flex-direction: column; gap: 4px; }

/* ping */
.toast-ping { background: #F0B935; color: #171B26; font-weight: 600; }
.toast-ping .toast-action { color: #171B26; text-decoration: underline; }
.ping-explain { margin: 0 0 12px; }
.ping-attach { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 14px; font-size: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 14px; padding: 4px 11px; font-size: 13px; color: var(--ink-2); }
.quick-chip:hover { border-color: var(--gold); color: var(--ink); }

/* add existing + uploads */
.palette-input.boxed { border: 1px solid var(--line-2); border-radius: var(--r-m); margin-bottom: 10px; padding: 8px 12px; }
.pick-list { max-height: 52vh; overflow-y: auto; }
.pick-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-s); cursor: pointer; }
.pick-item:hover { background: var(--sunken); }
.pick-item.on { background: var(--accent-soft); }
.pick-text { display: flex; flex-direction: column; min-width: 0; }
.pick-text strong { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-text em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.add-existing .modal-foot .muted { max-width: 260px; }
.upload-tray { position: fixed; right: 18px; bottom: 18px; z-index: 1050; width: 320px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-2); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.upload-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 4px 8px; align-items: center; padding: 6px 8px; font-size: 13px; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-state { color: var(--ink-3); font-size: 12px; }
.up-done .icon { color: var(--ok); }
.up-error .icon, .up-error .up-state { color: var(--danger); }
.up-bar { grid-column: 2 / -1; height: 4px; border-radius: 2px; background: var(--sunken); overflow: hidden; }
.up-bar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.folder-page { position: relative; min-height: 100%; }
.folder-drop { position: fixed; inset: 12px; z-index: 800; border: 3px dashed var(--accent); border-radius: 18px; background: color-mix(in srgb, var(--accent) 10%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--accent-text); font-size: 18px; pointer-events: none; backdrop-filter: blur(1px); }
.item-thumb { width: 100%; height: 108px; object-fit: cover; border-radius: 8px; background: var(--sunken); }

/* file viewer */
.file-view { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--bg); }
.file-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; }
.file-stage img, .file-stage video { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: var(--shadow-2); background: repeating-conic-gradient(var(--sunken) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px; }
.file-stage iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #fff; box-shadow: var(--shadow-1); }
.fk-pdf { padding: 12px; }
.fk-text { align-items: stretch; justify-content: stretch; }
.file-text { flex: 1; margin: 0; background: var(--surface); border-radius: 10px; padding: 18px 20px; font: 13px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; overflow: auto; box-shadow: var(--shadow-1); }
.file-audio { display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--ink-3); background: var(--surface); padding: 40px; border-radius: 16px; box-shadow: var(--shadow-1); }
.file-generic { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.file-big-icon { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-1); color: var(--c-file); }
.file-info { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.file-info > span { display: inline-flex; align-items: center; gap: 6px; }
a.btn:hover { text-decoration: none; }

/* ================================================================ moodboard */
.mb-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mb-viewport { position: relative; flex: 1; overflow: hidden; background-color: var(--mb-bg); background-image: radial-gradient(var(--mb-dot) 1.2px, transparent 1.3px); background-size: var(--grid) var(--grid); touch-action: none; outline: none; user-select: none; }
.mb-viewport.is-dropping { box-shadow: inset 0 0 0 3px var(--accent); }
.mb-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mb-ink { position: absolute; left: 0; top: 0; overflow: visible; z-index: 100000; pointer-events: none; }
.mb-ink .mb-hit { pointer-events: none; }
.tool-select .mb-ink .mb-hit, .tool-eraser .mb-ink .mb-hit { pointer-events: stroke; cursor: pointer; }
.tool-eraser .mb-ink g:hover path:last-child { stroke-opacity: .35; }
.mb-stroke-sel { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 4; }
.mb-item { position: absolute; box-sizing: border-box; }
.mb-item.is-selected { outline: 2px solid var(--accent); outline-offset: 3px; }
.mb-item.is-watched { box-shadow: 0 0 0 3px var(--watch); }
.tool-eraser .mb-item:hover { opacity: .45; }
.mb-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.14); pointer-events: none; }
.mb-note { border-radius: 3px; padding: 14px 14px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 18px -8px rgba(0,0,0,.22); color: #171B26; font: 500 15px/1.45 var(--font); overflow: hidden; }
.mb-body { white-space: pre-wrap; word-break: break-word; height: 100%; overflow: hidden; }
.mb-item.mb-text { font-family: var(--display); font-weight: 650; line-height: 1.15; letter-spacing: -.01em; }
.mb-placeholder { opacity: .4; font-weight: 400; }
.mb-editing { width: 100%; height: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; resize: none; font: inherit; color: inherit; outline: none; min-height: 0 !important; line-height: inherit; }
.mb-swatch { background: var(--surface); border-radius: 10px; padding: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 18px -8px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.mb-swatch-chip { flex: 1; border-radius: 6px; min-height: 20px; }
.mb-swatch-label { padding: 6px 4px 2px; display: flex; flex-direction: column; font-size: 12px; line-height: 1.25; color: var(--ink-2); height: 38px; }
.mb-swatch-label strong { color: var(--ink); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-swatch-label span { font-family: var(--mono); font-size: 11px; }
.mb-swatch .mb-editing { font-size: 12.5px; font-weight: 600; height: 16px; }
.mb-handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 4px; background: var(--surface); border: 2px solid var(--accent); cursor: nwse-resize; transform: scale(var(--s)); transform-origin: center; }
.mb-who { position: absolute; top: -20px; left: 0; color: #fff; font: 700 11px/18px var(--font); padding: 0 6px; border-radius: 4px; white-space: nowrap; }
.mb-marquee { position: absolute; border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); pointer-events: none; z-index: 100001; }
.mb-cursor { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 20; transition: transform .08s linear; display: flex; align-items: flex-start; }
.mb-cursor span { margin: 14px 0 0 -2px; background: var(--c); color: #fff; font: 600 11.5px/1 var(--font); padding: 4px 7px; border-radius: 4px 9px 9px 9px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.mb-empty { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; display: flex; flex-direction: column; gap: 6px; color: var(--ink-3); pointer-events: none; max-width: 420px; padding: 0 20px; }
.mb-empty strong { font: 650 20px var(--display); color: var(--ink-2); }
.mb-drop-hint { position: absolute; inset: 16px; border: 3px dashed var(--accent); border-radius: 18px; display: grid; place-items: center; font: 650 20px var(--display); color: var(--accent-text); pointer-events: none; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.mb-tools { position: absolute; left: 14px; top: 64px; z-index: 5; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-2); padding: 6px; }
.mb-tool { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.mb-tool:hover { background: var(--sunken); color: var(--ink); }
.mb-tool.on { background: var(--accent); color: var(--accent-ink); }
.mb-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.mb-bar { position: absolute; left: 14px; right: 14px; top: 12px; z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.mb-bar > * { pointer-events: auto; }
.mb-bar > .icon-btn, .mb-bar > .seg, .mb-colors, .mb-zoom, .mb-count, .mb-here { background: var(--surface); box-shadow: var(--shadow-1); border-radius: 10px; }
.mb-bar > .icon-btn { width: 36px; height: 36px; }
.mb-count, .mb-here { font-size: 12.5px; font-weight: 600; padding: 8px 11px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.mb-colors { display: flex; gap: 5px; padding: 6px 8px; align-items: center; }
.mb-color { width: 22px; height: 22px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); padding: 0; position: relative; }
.mb-color.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.mb-color.custom { background: conic-gradient(#E0446A, #E8792B, #D9A10B, #0E9F87, #2B8FD6, #8A4FE0, #E0446A); overflow: hidden; cursor: pointer; display: inline-block; }
.mb-color.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; min-height: 0 !important; }
.mb-bar > .seg { padding: 3px; }
.mb-zoom { display: flex; align-items: center; padding: 0 2px; }
.mb-zoom .icon-btn { width: 32px; height: 36px; }
.mb-zoom-val { border: 0; background: transparent; font: 600 12.5px var(--font); min-width: 46px; color: var(--ink-2); }
.mb-touch-toggle { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 12px var(--font); box-shadow: var(--shadow-1); }
.mb-touch-toggle.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mb-gesture-hint { position: absolute; left: 80px; bottom: 12px; pointer-events: none; padding: 6px 10px; border-radius: 8px; color: var(--ink-3); background: var(--surface); font-size: 11px; }
.type-moodboard .doc-main { background: var(--mb-bg); }

@media (max-width: 1100px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-side { position: static; }
  .home-hero { grid-template-columns: 1fr; }
  .home-create { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .rail { position: fixed; left: 0; right: 0; bottom: 0; width: auto; height: calc(62px + env(safe-area-inset-bottom)); flex-direction: row; padding: 4px 6px env(safe-area-inset-bottom); gap: 0; justify-content: space-around; }
  .rail-logo, .rail-bottom .rail-btn.small, .rail-create { display: none; }
  .rail-items { flex-direction: row; justify-content: space-around; width: auto; flex: 1; }
  .rail-btn { width: auto; flex: 1; padding: 6px 0 4px; }
  .rail-btn.on::before { display: none; }
  .rail-bottom { margin: 0; flex-direction: row; }
  .rail-me { margin: 0 6px; }
  .content { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .ctx { position: fixed; left: 0; top: 0; bottom: calc(62px + env(safe-area-inset-bottom)); width: min(340px, 88vw); box-shadow: var(--shadow-2); z-index: 60; }
  .ctx-scrim { display: block; position: fixed; inset: 0; bottom: calc(62px + env(safe-area-inset-bottom)); background: rgba(14,16,22,.4); z-index: 55; }
  .mobile-bar { display: flex; gap: 2px; }
  .friend-actions { opacity: 1; }
  .mb-tools { top: auto; bottom: max(10px, env(safe-area-inset-bottom)); left: 8px; right: 8px; transform: none; flex-direction: row; overflow-x: auto; overscroll-behavior-x: contain; max-width: calc(100% - 16px); border-radius: 12px; }
  .mb-tool { width: 44px; height: 44px; flex: 0 0 44px; touch-action: manipulation; }
  .mb-bar { left: 8px; right: 8px; top: 8px; gap: 6px; max-height: 35%; overflow-y: auto; }
  .mb-bar > .icon-btn, .mb-zoom .icon-btn { width: 44px; height: 44px; flex-shrink: 0; }
  .mb-touch-toggle, .mb-zoom-val { min-height: 44px; }
  .mb-bar .grow { display: none; }
  .mb-zoom { margin-left: auto; }
  .mb-colors { max-width: 100%; overflow-x: auto; min-height: 44px; }
  .mb-color { width: 30px; height: 30px; flex: 0 0 30px; }
  .mb-gesture-hint { left: 8px; right: 8px; bottom: calc(96px + env(safe-area-inset-bottom)); text-align: center; font-size: 10px; }
  .mb-empty { width: calc(100% - 40px); }
  .mb-handle { width: 24px; height: 24px; right: -12px; bottom: -12px; }
  .mb-sep { width: 1px; height: auto; margin: 6px 4px; }
  .mb-bar .mb-here { display: none; }
  .upload-tray { bottom: 76px; right: 10px; left: 10px; width: auto; }
}

/* ---------------------------------------------------------------- print */
@media print {
  .sidebar, .mobile-bar, .doc-head-side, .side-panel, .toolbar, .view-bar, .toasts, .hint-line, .crumbs { display: none !important; }
  .app, .content, .doc-page, .doc-body, .doc-main, .rich, .rich-scroll { display: block !important; height: auto !important; overflow: visible !important; }
  body { background: #fff; }
  .doc-head { border: 0; padding: 0 0 12px; }
  .rich-page { padding: 0; max-width: none; }
  .timeline, .grid-scroll { overflow: visible; box-shadow: none; margin: 0; }
  .board { flex-wrap: wrap; overflow: visible; }
}
.field > .btn { align-self: flex-start; }
.seg button { white-space: nowrap; }
.notif .badge { flex: none; }

/* Public Frame-zi landing page */
.landing { background: var(--bg); color: var(--ink); min-height: 100vh; overflow: clip; }
.lp-container { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.landing a:hover { text-decoration: none; }
.lp-header { height: 92px; display: flex; align-items: center; gap: 42px; border-bottom: 1px solid var(--line); }
.lp-brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); font: 750 24px var(--display); letter-spacing: -.8px; white-space: nowrap; }
.lp-brand .brand-mark { --fs: 25px; }
.lp-header nav { display: flex; gap: 28px; margin-left: auto; }
.lp-header nav a, .lp-signin { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.lp-header a:hover, .lp-footer a:hover { color: var(--accent-text); }
.lp-header-actions { display: flex; align-items: center; gap: 24px; }
.lp-button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; border: 1px solid var(--line-2); border-radius: 9px; min-height: 50px; padding: 0 22px; font-weight: 650; font-size: 15px; transition: transform .15s, background .15s; }
.lp-button:hover { transform: translateY(-2px); }
.lp-button span { font-size: 21px; }
.lp-primary { background: var(--accent); color: var(--accent-ink) !important; border-color: var(--accent); box-shadow: var(--shadow-1); }
.lp-secondary { background: var(--surface); color: var(--ink); }
.lp-header .lp-button { min-height: 42px; padding: 0 16px; font-size: 13px; gap: 12px; }
.lp-hero { padding-top: 82px; text-align: center; }
.lp-eyebrow { font: 600 11px/1.6 var(--mono); letter-spacing: 1.8px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; margin: 0 0 22px; }
.lp-hero > .lp-eyebrow { justify-content: center; }
.lp-spark { display: inline-block; height: 12px; width: 12px; background: var(--gold); border-radius: 2px; transform: rotate(15deg); }
.lp-hero h1 { font-size: clamp(64px, 8vw, 110px); font-weight: 750; line-height: .99; letter-spacing: -6px; margin: 0; }
.lp-hero h1 > span { color: var(--accent); position: relative; }
.lp-hero h1 > span::after { content: ''; position: absolute; height: 4px; width: 100%; left: 0; bottom: -8px; background: var(--gold); transform: rotate(-2deg); border-radius: 50%; }
.lp-hero-copy { max-width: 620px; margin: 32px auto 28px; color: var(--ink-2); font-size: 19px; line-height: 1.65; }
.lp-hero-actions { display: flex; justify-content: center; gap: 12px; }
.lp-hero-note { color: var(--ink-3); font-size: 12px; margin: 17px 0 50px; }
.lp-demo { text-align: left; border: 1px solid var(--line-2); background: var(--surface); border-radius: 16px; box-shadow: 0 22px 70px -28px rgba(15,20,44,.4); overflow: hidden; }
.lp-demo-top { min-height: 66px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; padding: 14px 24px; }
.lp-demo-project { display: flex; align-items: center; gap: 11px; font-weight: 650; font-size: 14px; }
.lp-project-icon { width: 32px; height: 32px; border: 1px solid var(--line-2); background: var(--gold-soft); color: var(--gold); border-radius: 8px; display: grid; place-items: center; }
.lp-demo-project small { display: block; font-size: 10px; font-weight: 400; color: var(--ink-3); }
.lp-live { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--ink-2); }
.lp-live > span { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.lp-demo-avatars { display: flex; padding-left: 5px; }
.lp-demo-avatars span { width: 27px; height: 27px; margin-left: -5px; display: grid; place-items: center; font-size: 9px; font-weight: 750; background: var(--accent-soft); color: var(--accent-text); border: 2px solid var(--surface); border-radius: 50%; }
.lp-demo-avatars span:nth-child(2) { background: var(--gold-soft); color: var(--gold); }
.lp-demo-avatars span:nth-child(3) { background: var(--danger-soft); color: var(--danger); }
.lp-demo-layout { display: grid; grid-template-columns: 64px 1fr; min-height: 430px; }
.lp-demo-rail { display: flex; flex-direction: column; align-items: center; gap: 26px; background: var(--rail); padding: 25px 0; color: var(--rail-ink); font-size: 22px; }
.lp-demo-rail .brand-mark { --fs: 20px; margin-bottom: 9px; }
.lp-demo-rail .active { background: var(--accent-soft); padding: 2px 10px; border-radius: 8px; color: var(--accent-text); }
.lp-demo-content { min-width: 0; padding: 28px; background: var(--panel); }
.lp-demo-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lp-demo-title small { font: 500 9px var(--mono); color: var(--ink-3); letter-spacing: 1px; }
.lp-demo-title h2 { font-size: 23px; margin: 6px 0 18px; font-weight: 650; }
.lp-demo-share { font-size: 10px; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 9px; white-space: nowrap; }
.lp-demo-tabs { display: flex; gap: 7px; margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.lp-demo-tabs button { background: transparent; border: 0; color: var(--ink-2); font-size: 12px; padding: 7px 12px; border-radius: 6px; min-height: 34px; }
.lp-demo-tabs button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
.lp-demo-panel[hidden] { display: none; }
.lp-board-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; min-height: 306px; }
.lp-board-column h3 { display: flex; align-items: center; gap: 7px; font-family: var(--font); font-size: 11px; margin: 0 0 12px; }
.lp-board-column h3 > span { margin-left: auto; color: var(--ink-3); font: 10px var(--mono); }
.lp-dot { height: 7px; width: 7px; border-radius: 50%; display: inline-block; background: var(--ink-3); }
.lp-dot.amber { background: var(--gold); }.lp-dot.green { background: var(--ok); }
.lp-task { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-1); }
.lp-tag { display: inline-block; font: 600 8px/1.5 var(--mono); letter-spacing: .5px; padding: 3px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-text); }
.lp-tag.pink { background: var(--danger-soft); color: var(--danger); }.lp-tag.orange { background: var(--gold-soft); color: var(--c-board); }.lp-tag.green { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); }
.lp-task h4 { font: 650 13px/1.4 var(--font); margin-top: 9px; }
.lp-task p { font-size: 11px; line-height: 1.6; color: var(--ink-2); margin: 7px 0; }
.lp-task footer { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 9px; display: flex; justify-content: space-between; align-items: center; color: var(--ink-3); font-size: 9px; }
.lp-task footer b { height: 20px; width: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-size: 8px; }
.lp-check { font-size: 10px; color: var(--ink-2); margin-top: 10px; }.lp-check span { color: var(--ok); margin-right: 5px; }
.lp-mini-palette { display: flex; gap: 4px; margin-top: 12px; }.lp-mini-palette i { height: 22px; flex: 1; border-radius: 4px; background: #514966; }.lp-mini-palette i:nth-child(2) { background: #8572a5; }.lp-mini-palette i:nth-child(3) { background: #c2a6be; }.lp-mini-palette i:nth-child(4) { background: #eabf76; }
.lp-board-note { text-align: center; padding: 24px 10px; color: var(--ink-3); font-size: 11px; }.lp-board-note > span { display: block; font-size: 28px; color: var(--gold); margin-bottom: 8px; }
.lp-preview-caption { font-size: 11px; color: var(--ink-3); margin: 16px 0 0; }
.lp-mood-preview { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 215px 60px; gap: 16px; min-height: 306px; align-items: start; }
.lp-landscape { position: relative; overflow: hidden; background: #b6a1cd; border-radius: 10px; min-height: 200px; }
.lp-landscape::before, .lp-landscape::after { content: ''; position: absolute; inset: 35% -20% -10%; background: #6f618a; clip-path: polygon(0 80%, 30% 0, 55% 65%, 75% 20%, 100% 90%, 100% 100%, 0 100%); }
.lp-landscape::after { inset: 60% -20% -10%; background: #423c59; }
.lp-landscape i { position: absolute; width: 58px; height: 58px; border-radius: 50%; background: #f3ce8c; left: 62%; top: 12%; }
.lp-landscape > span { position: absolute; z-index: 2; bottom: 18px; left: 20px; color: white; font: 650 24px var(--display); }
.lp-mood-note { background: #f6d890; color: #29243c; padding: 24px; transform: rotate(2deg); border-radius: 3px; }
.lp-mood-note small { font: 9px var(--mono); letter-spacing: 1px; }.lp-mood-note strong { font: 650 22px/1.2 var(--display); display: block; margin: 12px 0; }.lp-mood-note p { font-size: 12px; }
.lp-mood-swatches { display: flex; gap: 7px; }.lp-mood-swatches > span { width: 42px; height: 42px; border-radius: 50%; background: #423c59; }.lp-mood-swatches > span:nth-child(2) { background: #6f618a; }.lp-mood-swatches > span:nth-child(3) { background: #b6a1cd; }.lp-mood-swatches > span:nth-child(4) { background: #f3ce8c; }
.lp-mood-caption { font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.lp-doc-preview { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; min-height: 306px; }.lp-doc-preview article { padding: 12px 20px; border-left: 2px solid var(--accent); }.lp-doc-preview h3 { font-size: 25px; margin: 10px 0; }.lp-doc-preview p { font-size: 12px; color: var(--ink-2); }.lp-doc-preview h4 { font-size: 14px; margin-top: 18px; }.lp-doc-callout { background: var(--gold-soft); color: var(--gold); padding: 10px; font-size: 11px; border-radius: 6px; }.lp-doc-preview aside { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }.lp-doc-preview aside strong { font-size: 12px; }.lp-doc-preview aside b { color: var(--ink); display: block; }.lp-doc-preview aside small { color: var(--ink-3); font-size: 10px; }
.lp-features { padding-top: 120px; scroll-margin-top: 32px; }
.lp-section-head { margin-bottom: 42px; }.lp-section-head h2, .lp-together h2, .lp-faq h2, .lp-final h2 { font-size: clamp(34px, 4.5vw, 54px); line-height: 1.08; letter-spacing: -1.9px; }.lp-section-head > p:last-child { color: var(--ink-2); font-size: 17px; max-width: 540px; margin: 20px 0 0; }
.lp-feature-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px; }
.lp-feature { grid-column: span 3; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 35px; overflow: hidden; min-height: 430px; }
.lp-feature-number { font: 500 10px var(--mono); letter-spacing: 1.2px; color: var(--accent-text); }.lp-feature h3 { font-size: 32px; line-height: 1.1; letter-spacing: -.9px; margin: 21px 0 14px; }.lp-feature > p { font-size: 14px; color: var(--ink-2); max-width: 410px; line-height: 1.7; }
.lp-doc-lines { margin-top: 30px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; transform: rotate(-1deg); }.lp-doc-lines strong { font-size: 15px; font-family: var(--display); }.lp-doc-lines strong > span { color: var(--accent); margin-left: 3px; }.lp-doc-lines i { display: block; height: 5px; margin-top: 13px; width: 92%; background: var(--line-2); border-radius: 2px; }.lp-doc-lines i:nth-of-type(2) { width: 77%; }.lp-doc-lines i:nth-of-type(3) { width: 60%; }.lp-doc-lines small { display: block; margin-top: 22px; color: var(--ok); font-size: 11px; }
.lp-feature-mood .lp-feature-number { color: var(--c-mood); }.lp-mood-mini { height: 160px; position: relative; margin-top: 28px; }.lp-mood-mini .lp-landscape { width: 63%; min-height: 145px; transform: rotate(-4deg); }.lp-mood-mini .lp-landscape i { width: 32px; height: 32px; }.lp-mood-mini > span { position: absolute; right: 0; top: 20px; padding: 22px 16px; background: #f6d890; color: #423c59; font: 600 17px/1.3 var(--display); transform: rotate(5deg); box-shadow: var(--shadow-1); }.lp-mood-mini > b { position: absolute; right: 22%; bottom: -9px; font-size: 40px; color: var(--c-mood); }
.lp-feature-small { grid-column: span 2; padding: 25px 12px 0 0; }.lp-feature-glyph { display: inline-grid; place-items: center; width: 40px; height: 40px; background: var(--accent-soft); color: var(--accent-text); border-radius: 10px; font-size: 25px; }.lp-feature-glyph.gold { background: var(--gold-soft); color: var(--gold); }.lp-feature-glyph.green { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); }.lp-feature-small h3 { font-size: 22px; line-height: 1.2; margin: 22px 0 12px; }.lp-feature-small p { font-size: 14px; line-height: 1.75; color: var(--ink-2); max-width: 330px; }
.lp-together { padding-block: 110px; margin-top: 90px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center; }.lp-together > div > p:not(.lp-eyebrow) { color: var(--ink-2); line-height: 1.8; font-size: 16px; margin: 24px 0; }.lp-text-link { font-size: 14px; font-weight: 650; }.lp-text-link span { margin-left: 10px; }
.lp-conversation { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: var(--shadow-2); }.lp-conversation-title { display: flex; gap: 9px; align-items: center; font-weight: 650; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }.lp-conversation-title .lp-tag { margin-left: auto; }.lp-message { display: flex; gap: 12px; margin-top: 24px; }.lp-message > b { background: var(--accent-soft); color: var(--accent-text); border-radius: 50%; display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; font-size: 11px; }.lp-message:nth-of-type(3) > b { background: var(--gold-soft); color: var(--gold); }.lp-message strong { font-size: 12px; }.lp-message small { color: var(--ink-3); margin-left: 8px; font-weight: 400; }.lp-message p { font-size: 12px; color: var(--ink-2); line-height: 1.7; margin: 5px 0; }.lp-attached { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); padding: 12px; border-radius: 8px; margin: 20px 0 12px 42px; }.lp-attached > span { color: var(--accent-text); font-size: 24px; }.lp-attached > span:last-child { margin-left: auto; font-size: 16px; }.lp-attached strong, .lp-attached small { display: block; font-size: 11px; }.lp-attached small { color: var(--ink-3); font-size: 9px; margin-top: 3px; }.lp-illustration-label { display: block; color: var(--ink-3); text-align: right; font-size: 9px; }
.lp-workflow { padding-block: 110px; scroll-margin-top: 30px; }.lp-workflow ol { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; gap: 50px; padding: 0; margin: 50px 0 0; }.lp-workflow li > span { font: 500 13px var(--mono); color: var(--gold); display: block; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 24px; }.lp-workflow h3 { font-size: 25px; line-height: 1.15; }.lp-workflow li p { color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.lp-faq { border-top: 1px solid var(--line); padding-top: 90px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; scroll-margin-top: 30px; }.lp-faq details { border-bottom: 1px solid var(--line); }.lp-faq summary { padding: 22px 28px 22px 0; cursor: pointer; font-size: 16px; font-weight: 600; list-style: none; position: relative; }.lp-faq summary::-webkit-details-marker { display: none; }.lp-faq summary::after { content: '+'; position: absolute; right: 2px; color: var(--accent); font-size: 22px; top: 16px; }.lp-faq details[open] summary::after { content: '−'; }.lp-faq details p { color: var(--ink-2); font-size: 14px; line-height: 1.8; margin: 0 0 24px; }
.lp-final { text-align: center; padding: 100px 20px 90px; margin-top: 100px; border-radius: 20px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }.lp-final > .lp-spark { width: 22px; height: 22px; margin-bottom: 24px; }.lp-final .lp-eyebrow { justify-content: center; }.lp-final h2 { margin-bottom: 30px; }.lp-final > p:last-child { font-size: 13px; color: var(--ink-2); margin-top: 20px; }
.lp-footer { padding-block: 40px; display: flex; align-items: center; gap: 30px; }.lp-footer .lp-brand { font-size: 19px; }.lp-footer .brand-mark { --fs: 20px; }.lp-footer > p { color: var(--ink-3); font-size: 12px; }.lp-footer nav { margin-left: auto; display: flex; gap: 20px; font-size: 12px; }.lp-footer nav a { color: var(--ink-2); }
.lp-back { display: inline-block; font-size: 13px; color: var(--ink-2); margin-bottom: 26px; }
.lp-skip { position: fixed; top: -80px; left: 15px; padding: 12px 18px; z-index: 100; background: var(--surface); color: var(--ink); border-radius: 6px; }.lp-skip:focus { top: 12px; }
@media (max-width: 860px) {
  .lp-container { width: calc(100% - 40px); }.lp-header { height: 78px; gap: 20px; }.lp-header nav { display: none; }.lp-header-actions { margin-left: auto; gap: 18px; }.lp-brand { font-size: 21px; }.lp-hero { padding-top: 62px; }.lp-hero h1 { letter-spacing: -3px; }.lp-hero-copy { font-size: 17px; max-width: 540px; }.lp-demo-content { padding: 22px; }.lp-demo-share { display: none; }.lp-demo-layout { grid-template-columns: 46px 1fr; }.lp-demo-rail { gap: 24px; }.lp-demo-rail .active { padding: 2px 6px; }.lp-board-preview { gap: 9px; }.lp-task { padding: 11px; }.lp-demo-title h2 { font-size: 20px; }.lp-together { gap: 35px; }.lp-feature { padding: 26px; }.lp-feature h3 { font-size: 28px; }.lp-features { padding-top: 85px; }.lp-workflow ol { gap: 25px; }.lp-footer { gap: 20px; }.lp-footer > p { display: none; }
}
@media (max-width: 600px) {
  .lp-container { width: calc(100% - 32px); }.lp-header { height: 74px; gap: 12px; }.lp-brand { font-size: 21px; gap: 10px; }.lp-brand .brand-mark { --fs: 21px; }.lp-header-actions { gap: 14px; }.lp-signin { font-size: 12px; }.lp-header .lp-button { min-height: 38px; font-size: 11px; padding: 0 11px; gap: 6px; }.lp-hero { padding-top: 55px; }.lp-hero > .lp-eyebrow { font-size: 8px; letter-spacing: 1px; gap: 8px; }.lp-hero h1 { font-size: clamp(54px, 14.8vw, 83px); letter-spacing: -3px; }.lp-hero-copy { font-size: 16px; line-height: 1.65; margin: 28px auto 22px; }.lp-hero-actions { flex-direction: column; width: min(300px,100%); margin: auto; gap: 10px; }.lp-button { min-height: 48px; font-size: 14px; }.lp-hero-note { font-size: 10px; margin-bottom: 34px; }.lp-demo { border-radius: 10px; }.lp-demo-top { padding: 12px; min-height: 58px; }.lp-live { display: none; }.lp-demo-avatars { margin-left: auto; }.lp-demo-layout { display: block; }.lp-demo-rail { display: none; }.lp-demo-content { padding: 18px 12px; }.lp-demo-title h2 { font-size: 19px; line-height: 1.25; }.lp-demo-title small { font-size: 8px; }.lp-demo-tabs { gap: 3px; margin-bottom: 16px; }.lp-demo-tabs button { font-size: 11px; padding: 8px 10px; min-height: 40px; }.lp-board-preview { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 9px; }.lp-board-column { flex: 0 0 79%; scroll-snap-align: start; }.lp-board-column h3 { font-size: 12px; }.lp-task { padding: 14px; }.lp-task h4 { font-size: 14px; }.lp-task p { font-size: 12px; }.lp-task footer { font-size: 10px; }.lp-preview-caption { font-size: 10px; max-width: 260px; margin-inline: auto; }.lp-mood-preview { grid-template-columns: 1fr; grid-template-rows: auto; gap: 18px; }.lp-mood-note { transform: none; }.lp-mood-swatches { justify-content: center; }.lp-mood-caption { text-align: center; }.lp-doc-preview { grid-template-columns: 1fr; gap: 18px; }.lp-doc-preview article { padding: 8px 14px; }.lp-features { padding-top: 76px; }.lp-section-head { margin-bottom: 28px; }.lp-section-head h2, .lp-together h2, .lp-faq h2, .lp-final h2 { font-size: 36px; letter-spacing: -1.1px; }.lp-section-head > p:last-child { font-size: 15px; }.lp-feature-grid { display: block; }.lp-feature { padding: 26px; margin-bottom: 18px; min-height: 410px; }.lp-feature h3 { font-size: 29px; }.lp-feature-small { padding: 25px 0 10px; }.lp-feature-small p { max-width: none; }.lp-feature-small h3 { margin-top: 16px; }.lp-together { margin-top: 45px; padding-block: 65px; grid-template-columns: 1fr; gap: 32px; }.lp-together > div > p:not(.lp-eyebrow) { font-size: 15px; }.lp-conversation { padding: 20px; }.lp-attached { margin-left: 0; }.lp-workflow { padding-block: 70px; }.lp-workflow ol { grid-template-columns: 1fr; gap: 26px; margin-top: 32px; }.lp-workflow li > span { margin-bottom: 18px; }.lp-workflow h3 { font-size: 25px; }.lp-faq { grid-template-columns: 1fr; gap: 24px; padding-top: 65px; }.lp-faq summary { font-size: 15px; }.lp-final { margin-top: 65px; padding: 60px 20px; border-radius: 14px; }.lp-final h2 { font-size: 33px; }.lp-final .lp-eyebrow { font-size: 9px; letter-spacing: 1px; }.lp-footer { flex-wrap: wrap; padding-block: 30px; gap: 15px; }.lp-footer nav { gap: 17px; font-size: 11px; }.lp-eyebrow { font-size: 10px; }
}
