:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --sidebar: #FAFAFB;
  --col: #EDEFF2;
  --hover: #F0F2F5;
  --border: #E3E6EA;
  --border-strong: #CFD5DC;
  --ink: #1B2430;
  --ink-2: #3F4A5A;
  --muted: #667180;
  --faint: #98A2B0;
  --accent: #2463EB;
  --accent-hover: #1C50C8;
  --accent-soft: #E8EFFD;
  --danger: #C7302B;
  --ok: #187A3E;
  --warn: #A15C07;
  --r-chip: 4px;
  --r-input: 6px;
  --r-btn: 8px;
  --r-card: 10px;
  --r-col: 12px;
  --shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 1px 1px rgba(27, 36, 48, .03);
  --shadow-pop: 0 10px 30px rgba(27, 36, 48, .14), 0 2px 6px rgba(27, 36, 48, .08);
  --header-h: 52px;
  --sidebar-w: 248px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
code { font: 12.5px var(--mono); background: var(--hover); padding: 1px 5px; border-radius: var(--r-chip); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.i { flex: none; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); font-weight: 400; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hint { color: var(--muted); font-size: 13px; }
.count { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); flex: none; display: inline-block; }
.tool-spacer { flex: 1; }
.mobile-only { display: none !important; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: var(--r-btn);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: background-color .12s, border-color .12s;
  touch-action: manipulation;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #A82622; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; height: 40px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--r-input); background: transparent; color: var(--muted);
  cursor: pointer; transition: background-color .12s, color .12s; list-style: none;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn-sm { width: 26px; height: 26px; }
.icon-btn::-webkit-details-marker { display: none; }
.link-btn { border: 0; background: none; padding: 0; color: var(--muted); font-size: 12px; cursor: pointer; }
.link-btn:hover { color: var(--danger); }
.link-muted { color: var(--muted); font-size: 13px; }

/* forms */
.input {
  width: 100%; height: 36px; padding: 0 10px; border-radius: var(--r-input);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font: inherit; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.45; }
select.input { padding-right: 28px; appearance: none; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667180' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 99, 235, .15); }
.input::placeholder { color: var(--faint); }
.input-sm { height: 30px; font-size: 13px; padding: 0 8px; }
select.input-sm { padding-right: 26px; }
.input-plain { border-color: transparent; background-color: transparent; width: auto; min-width: 140px; }
.input-plain:hover { background-color: var(--hover); }
.input.is-overdue { color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-error { color: var(--danger); font-size: 12.5px; }
.has-error .input { border-color: var(--danger); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 12px; }
.inline-add { display: flex; gap: 8px; align-items: center; }
.inline-add .input { flex: 1; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.0); transition: transform .1s; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }
.swatches-sm { gap: 6px; }
.swatch-btn { width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; padding: 0; }
.swatch-btn.is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--c); }

/* notices */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-input); border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; }
.notice .i { margin-top: 2px; }
.notice-warn { border-color: #EBD3A8; color: var(--ink); }
.notice-warn .i { color: var(--warn); }
.notice-error { color: var(--danger); border-color: #EFC2C0; }
.notice-ok { color: var(--ok); border-color: #BFE0CB; }

/* auth */
.auth-body { background: var(--bg); }
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 20px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-col); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 20px; }
.auth-foot { color: var(--muted); font-size: 13px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; font-size: 15px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; }
.brand-lg { font-size: 17px; }
.brand-lg .brand-mark { width: 30px; height: 30px; }

/* shell */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.sb-head { height: var(--header-h); display: flex; align-items: center; padding: 0 14px; flex: none; }
.sb-search { position: relative; margin: 0 10px 8px; display: flex; align-items: center; }
.sb-search .i { position: absolute; left: 9px; color: var(--faint); }
.sb-search input { width: 100%; height: 32px; border: 1px solid var(--border); border-radius: var(--r-input); background: var(--surface); padding: 0 8px 0 30px; font: inherit; font-size: 13px; color: var(--ink); }
.sb-search input:focus { outline: none; border-color: var(--accent); }
.sb-actions { padding: 0 10px 6px; }
.sb-new { width: 100%; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px dashed var(--border-strong); border-radius: var(--r-input); background: transparent; color: var(--ink-2); font-weight: 500; font-size: 13px; cursor: pointer; }
.sb-new:hover { background: var(--hover); color: var(--ink); }
.sb-group { padding: 6px 8px; display: flex; flex-direction: column; gap: 1px; }
.sb-label { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 4px 8px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); }
.sb-link { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px; border-radius: var(--r-input); color: var(--ink-2); font-weight: 500; font-size: 13.5px; text-decoration: none; }
.sb-link .i { color: var(--muted); }
.sb-link:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.sb-link.is-active { background: var(--accent-soft); color: var(--accent); }
.sb-link.is-active .i { color: var(--accent); }
.sb-link .dot { margin: 0 4px; }
.sb-projects { flex: 1; }
.sb-empty { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; border-radius: var(--r-input); }
.sb-empty:hover { background: var(--hover); color: var(--ink); }
.sb-foot { display: flex; align-items: center; gap: 4px; padding: 10px; border-top: 1px solid var(--border); flex: none; }
.sb-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 4px; border-radius: var(--r-input); color: var(--ink); text-decoration: none; }
.sb-user:hover { background: var(--hover); text-decoration: none; }
.sb-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sb-user-text strong { font-size: 13px; font-weight: 600; }
.sb-user-text small { font-size: 11.5px; color: var(--muted); }

.avatar { display: inline-grid; place-items: center; width: var(--sz, 24px); height: var(--sz, 24px); border-radius: 50%; background: var(--c); color: #fff; font-size: calc(var(--sz, 24px) * .4); font-weight: 600; flex: none; letter-spacing: 0; line-height: 1; user-select: none; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--bg); }
.avatar-stack .avatar + .avatar { margin-left: -6px; }
.avatar-more { --c: var(--faint); --sz: 26px; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.topbar { height: var(--header-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.page-title { font-size: 15px; font-weight: 600; }
.ph { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ph-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex: none; }
.ph-key { color: var(--muted); font-size: 12px; background: var(--hover); padding: 2px 6px; border-radius: var(--r-chip); }
.tabs { display: flex; gap: 2px; margin-left: 12px; height: 100%; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; height: 100%; color: var(--muted); font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; text-decoration: none; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.crumbs a:hover { color: var(--ink); text-decoration: none; }
.crumbs .sep, .tp-crumb .sep { color: var(--faint); }

.content { flex: 1; overflow-y: auto; padding: 24px; }
.content-narrow > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.content-narrow > * + * { margin-top: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 10px; }
.section-head h2 { font-size: 14px; }
.section-head .muted { font-size: 13px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-col); padding: 20px; box-shadow: var(--shadow); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.card-head h2 { font-size: 15px; }
.card-head .muted { font-size: 13px; }
.card-head-pad { padding: 18px 20px 0; margin-bottom: 8px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); }
.card-danger { border-color: #EFC9C7; }
.card-danger .row-between { padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }

.flash-stack { padding: 12px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 12px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13.5px; }
.flash-icon { margin-top: 1px; }
.flash-success .flash-icon { color: var(--ok); }
.flash-warning .flash-icon { color: var(--warn); }
.flash-error .flash-icon { color: var(--danger); }
.flash-text { flex: 1; min-width: 0; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; }

/* menus */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; top: calc(100% + 4px); right: 0; z-index: 40; min-width: 190px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-pop); padding: 5px; display: flex; flex-direction: column; }
.menu-pop-wide { min-width: 250px; }
.menu-pop > button, .menu-pop form > button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 0; background: none; border-radius: var(--r-input); font-size: 13px; text-align: left; cursor: pointer; color: var(--ink); }
.menu-pop > button:hover, .menu-pop form > button:hover { background: var(--hover); }
.menu-pop .danger { color: var(--danger); }
.menu-pop .danger .i { color: var(--danger); }
.menu-pop .i { color: var(--muted); }
.menu-form { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }

/* dialogs */
.dialog { border: 0; padding: 0; border-radius: var(--r-col); width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-pop); color: var(--ink); }
.dialog::backdrop { background: rgba(19, 28, 43, .35); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0 20px; }
.dialog-head h2 { font-size: 16px; }
.dialog-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }

/* board */
.board-tools { display: flex; align-items: center; gap: 10px; padding: 12px 20px; flex: none; }
.filter { position: relative; display: flex; align-items: center; width: 220px; }
.filter .i { position: absolute; left: 9px; color: var(--faint); pointer-events: none; }
.filter input { width: 100%; height: 30px; border: 1px solid var(--border-strong); border-radius: var(--r-input); background: var(--surface); padding: 0 8px 0 29px; font: inherit; font-size: 13px; color: var(--ink); }
.filter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 99, 235, .15); }
.filter-lg { width: 100%; }
.filter-lg input { height: 40px; font-size: 14px; }
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-btn); background: var(--col); }
.seg-btn { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: var(--r-input); font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg-btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.board { flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden; padding: 0 20px 20px; }
.cols { display: flex; align-items: flex-start; gap: 12px; height: 100%; }
.col { flex: 0 0 286px; max-height: 100%; display: flex; flex-direction: column; background: var(--col); border-radius: var(--r-col); }
.col-head { display: flex; align-items: center; gap: 7px; padding: 10px 6px 6px 8px; flex: none; }
.col-grip { width: 6px; height: 16px; flex: none; cursor: grab; opacity: 0; transition: opacity .12s;
  background: radial-gradient(circle, var(--faint) 1.2px, transparent 1.3px) 0 0 / 6px 5px; }
.col-head:hover .col-grip { opacity: 1; }
.col-name { font-size: 13.5px; font-weight: 600; }
.col-count { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.col-done { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: var(--ok); }
.col-head-actions { margin-left: auto; display: flex; align-items: center; }
.col-body { flex: 1 1 auto; min-height: 8px; overflow-y: auto; padding: 2px 8px 4px; display: flex; flex-direction: column; gap: 8px; }
.add-task-btn { display: flex; align-items: center; gap: 6px; margin: 2px 8px 8px; height: 32px; padding: 0 8px; border: 0; background: none; border-radius: var(--r-input); color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; }
.add-task-btn:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.add-task { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.add-task textarea { resize: none; }
.add-task-row { display: flex; gap: 6px; }
.col-new { background: transparent; flex-basis: 260px; }
.add-col { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px dashed var(--border-strong); border-radius: var(--r-col); color: var(--muted); cursor: text; }
.add-col input { border: 0; background: none; font: inherit; font-size: 13.5px; width: 100%; color: var(--ink); }
.add-col input:focus { outline: none; }
.add-col:focus-within { border-style: solid; border-color: var(--accent); background: var(--surface); }

.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 10px 11px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .12s; user-select: none; }
.tcard:hover { border-color: var(--border-strong); }
.tcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 16px; }
.tcard-ref { color: var(--faint); font-size: 11.5px; }
.tcard-title { font-size: 13.5px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.tcard.is-done .tcard-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.tcard-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.tcard-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tcard-people { margin-left: auto; display: flex; }
.tcard-people .avatar { box-shadow: 0 0 0 2px var(--surface); }
.tcard-people .avatar + .avatar { margin-left: -5px; }
.meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.meta.is-overdue { color: var(--danger); font-weight: 500; }
.meta.is-complete { color: var(--ok); }
.label { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.label .dot { width: 7px; height: 7px; }
.tcard.is-hidden { display: none; }
.sortable-ghost { opacity: .35; }
.sortable-chosen.tcard { box-shadow: var(--shadow-pop); }
.sortable-drag { transform: rotate(1.5deg); }
.is-dragging .tcard { cursor: grabbing; }

.prio { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.prio-urgent { color: #D9480F; }
.prio-high, .prio-medium, .prio-low { color: var(--ink-2); }
.prio-none { color: var(--faint); }

/* task panel */
.panel { position: fixed; inset: 0; z-index: 50; }
.panel-scrim { position: absolute; inset: 0; background: rgba(19, 28, 43, .18); }
.panel-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; animation: slide-in .16s ease-out; }
@keyframes slide-in { from { transform: translateX(24px); opacity: .6; } }
.panel-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.panel-loading { padding: 40px; color: var(--muted); }
.tp { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.tp-head { height: var(--header-h); flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 20px; border-bottom: 1px solid var(--border); }
.tp-crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.tp-actions { display: flex; align-items: center; gap: 2px; }
.tp-scroll { flex: 1; overflow-y: auto; padding: 18px 24px 40px; }
.tp-title { width: 100%; border: 0; resize: none; font: inherit; font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--ink); padding: 4px 6px; margin: 0 -6px; border-radius: var(--r-input); overflow: hidden; }
.tp-title:hover { background: var(--hover); }
.tp-title:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 2px var(--accent-soft); }
.tp-sub { color: var(--muted); font-size: 12.5px; margin: 4px 0 14px; }
.tp-section { margin-top: 24px; }
.tp-section-head { display: flex; align-items: center; justify-content: space-between; }
.tp-h { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.tp-h .muted { font-size: 12px; }

.props { display: grid; grid-template-columns: 120px 1fr; align-items: center; row-gap: 4px; column-gap: 8px; }
.prop-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; height: 32px; }
.prop-value { min-width: 0; }
.prop-inline { display: flex; align-items: center; gap: 2px; }
.prop-inline .prio { margin-left: 8px; }
.picker { position: relative; }
.picker > summary { list-style: none; }
.picker > summary::-webkit-details-marker { display: none; }
.picker-btn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px; border-radius: var(--r-input); cursor: pointer; font-size: 13px; }
.picker-btn:hover { background: var(--hover); }
.pick-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--hover); font-size: 12.5px; font-weight: 500; }
.picker-pop { position: absolute; z-index: 45; top: calc(100% + 4px); left: 0; min-width: 240px; max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-pop); padding: 5px; }
.pick-row { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--r-input); cursor: pointer; font-size: 13px; }
.pick-row:hover { background: var(--hover); }
.pick-row input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.pick-empty { padding: 8px; font-size: 13px; }
.label-new { display: flex; gap: 6px; margin: 6px 0 0 128px; }
.label-new .input:not(select) { flex: 1; }
.label-color { width: 104px; flex: none; }

.progress { height: 4px; border-radius: 4px; background: var(--col); overflow: hidden; margin: 2px 0 8px; }
.progress span { display: block; height: 100%; background: var(--ok); transition: width .2s; }
.checklist { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 5px 4px; border-radius: var(--r-input); }
.checklist li:hover { background: var(--hover); }
.check { width: 18px; height: 18px; flex: none; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--surface); color: transparent; cursor: pointer; }
.check.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.check-text { flex: 1; font-size: 13.5px; overflow-wrap: anywhere; }
.checklist li.is-done .check-text { color: var(--muted); text-decoration: line-through; }
.hover-show { opacity: 0; }
li:hover .hover-show, .comment:hover .hover-show, .hover-show:focus-visible { opacity: 1; }

.comments { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment-main { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.comment-meta .muted { font-size: 12px; }
.comment-body { font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; color: var(--ink-2); }
.comment-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

/* images */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.img-tile { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.img-thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--hover); overflow: hidden; cursor: zoom-in; }
.img-thumb img, .img-overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.img-overlay { pointer-events: none; }
.img-hint { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(19, 28, 43, .78); color: #fff; font-size: 11.5px; font-weight: 500; opacity: 0; transition: opacity .12s; }
.img-thumb:hover .img-hint, .img-thumb:focus-visible .img-hint { opacity: 1; }
.img-tile figcaption { display: flex; align-items: center; gap: 2px; }
.caption-input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--ink-2); padding: 3px 4px; border-radius: var(--r-chip); }
.caption-input:hover { background: var(--hover); }
.caption-input:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 2px var(--accent-soft); }
.img-actions { display: flex; }
.img-drop { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-card); color: var(--muted); text-align: center; font-size: 13px; cursor: pointer; transition: border-color .12s, background-color .12s; }
.img-drop small { color: var(--faint); }
.img-drop:hover, .img-drop.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.img-drop.is-busy { pointer-events: none; opacity: .6; }

/* annotator */
.annot { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: #131C2B; }
.annot-bar { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.annot-tools, .annot-colors, .annot-sizes { display: flex; align-items: center; gap: 2px; }
.annot-tools button, .annot-sizes button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: var(--r-input); background: none; color: var(--ink-2); cursor: pointer; }
.annot-tools button:hover, .annot-sizes button:hover { background: var(--hover); }
.annot-tools button.is-on, .annot-sizes button.is-on { background: var(--accent-soft); color: var(--accent); }
.annot-colors button { width: 22px; height: 22px; margin: 0 2px; border-radius: 50%; border: 1px solid rgba(27,36,48,.18); background: var(--c); cursor: pointer; padding: 0; }
.annot-colors button.is-on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.annot-sizes i { display: block; width: var(--s); height: var(--s); border-radius: 50%; background: currentColor; }
.annot-sep { width: 1px; height: 22px; background: var(--border); margin: 0 6px; }
.annot-spacer { flex: 1; }
.annot-status { color: var(--muted); font-size: 12.5px; margin-right: 4px; }
.annot-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 20px; overflow: auto; }
.annot-canvas { position: relative; line-height: 0; box-shadow: 0 8px 40px rgba(0,0,0,.35); touch-action: none; }
.annot-canvas img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
.annot-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.annot-canvas svg.is-select { cursor: default; }
.annot-canvas svg .shape { cursor: inherit; }
.annot-canvas svg.is-select .shape { cursor: move; }
.annot-text-input { position: absolute; z-index: 2; min-width: 60px; padding: 2px 4px; border: 1.5px dashed var(--accent); background: rgba(255,255,255,.85); font-family: var(--font); font-weight: 600; line-height: 1.2; outline: none; white-space: pre; }

/* docs */
.list-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.list-filter { display: flex; align-items: center; gap: 8px; }
.list-filter .filter { width: 280px; }
.list-filter select { width: 200px; }
.doc-list, .task-list, .mini-list { list-style: none; margin: 0; padding: 0; }
.doc-list li + li, .task-list li + li, .mini-list li + li { border-top: 1px solid var(--border); }
.doc-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 170px 120px 100px; align-items: center; gap: 12px; padding: 11px 16px; color: var(--ink); text-decoration: none; }
.doc-row:hover { background: var(--hover); text-decoration: none; }
.content:has(.doc-list) .doc-row { grid-template-columns: 24px minmax(0, 1fr) auto auto 100px; }
.doc-icon { color: var(--muted); display: grid; place-items: center; }
.doc-main { display: flex; flex-direction: column; min-width: 0; }
.doc-title { font-weight: 550; font-size: 13.5px; }
.doc-excerpt { color: var(--muted); font-size: 12.5px; }
.doc-where { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.doc-updated { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.doc-id { color: var(--faint); font-size: 11.5px; text-align: right; }
.chip-id { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--r-input); background: var(--surface); color: var(--muted); font-size: 12px; cursor: pointer; }
.chip-id:hover { color: var(--ink); border-color: var(--border-strong); }
.save-state { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.save-state.is-saving { color: var(--muted); }
.save-state.is-error { color: var(--danger); }

.doc-page { flex: 1; overflow-y: auto; padding: 32px 24px 80px; background: var(--surface); }
.doc-page > * { max-width: 820px; margin-left: auto; margin-right: auto; }
.doc-title { display: block; width: 100%; border: 0; resize: none; overflow: hidden; background: none; font: inherit; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); padding: 0; }
.doc-title:focus { outline: none; }
.doc-title::placeholder { color: var(--faint); }
.doc-meta { color: var(--muted); font-size: 12.5px; margin: 8px auto 18px; }
.doc-images { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.doc-images .section-head { flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 14px; }
.doc-images h2 { font-size: 16px; }
.conflict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 16px; border: 1px solid #EBD3A8; border-radius: var(--r-card); background: var(--surface); font-size: 13.5px; }
.conflict .i { color: var(--warn); }
.conflict span { flex: 1; }

/* quill overrides */
.editor .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--border); padding: 6px 0; font-family: var(--font); position: sticky; top: -32px; z-index: 5; background: var(--surface); }
.editor-doc .ql-toolbar.ql-snow { top: -33px; }
.editor .ql-container.ql-snow { border: 0; font: inherit; font-size: 15px; }
.editor .ql-editor { padding: 16px 0; line-height: 1.65; color: var(--ink); min-height: 280px; }
.editor .ql-editor.ql-blank::before { left: 0; right: 0; color: var(--faint); font-style: normal; }
.editor .ql-editor h1 { font-size: 24px; margin: 1.1em 0 .4em; }
.editor .ql-editor h2 { font-size: 19px; margin: 1em 0 .35em; }
.editor .ql-editor h3 { font-size: 16px; margin: .9em 0 .3em; }
.editor .ql-editor p, .editor .ql-editor li { margin: 0; }
.editor .ql-editor img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); margin: 6px 0; }
.editor .ql-editor blockquote { border-left: 3px solid var(--border-strong); color: var(--ink-2); padding-left: 14px; }
.editor .ql-editor pre.ql-syntax, .editor .ql-editor .ql-code-block-container { background: #F1F3F6; color: var(--ink); border-radius: 8px; padding: 10px 14px; font: 13px/1.55 var(--mono); }
.editor .ql-editor a { color: var(--accent); }
.editor .ql-editor li[data-list="checked"] > .ql-ui::before, .editor .ql-editor li[data-list="unchecked"] > .ql-ui::before { color: var(--accent); }
.editor .ql-editor li[data-list="checked"] { color: var(--muted); text-decoration: line-through; }
.editor .ql-snow .ql-stroke { stroke: var(--ink-2); }
.editor .ql-snow .ql-fill { fill: var(--ink-2); }
.editor .ql-snow .ql-picker { color: var(--ink-2); }
.editor .ql-snow.ql-toolbar button:hover .ql-stroke, .editor .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent); }
.editor .ql-snow.ql-toolbar button:hover .ql-fill, .editor .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--accent); }
.editor .ql-snow.ql-toolbar button.ql-active, .editor .ql-snow .ql-picker-label.ql-active { color: var(--accent); }
.editor .ql-snow .ql-tooltip { border-radius: var(--r-card); box-shadow: var(--shadow-pop); border-color: var(--border); color: var(--ink); z-index: 10; }
.editor-compact { border: 1px solid var(--border); border-radius: var(--r-card); padding: 0 12px; }
.editor-compact .ql-toolbar.ql-snow { position: static; padding: 4px 0; }
.editor-compact .ql-editor { min-height: 90px; font-size: 14px; padding: 10px 0; }

/* lists on home and members */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; align-content: start; }
.home-side .section-head:not(:first-child), .archived { margin-top: 24px; }
.archived > summary { list-style: none; cursor: pointer; }
.archived > summary::-webkit-details-marker { display: none; }
.archived > summary h2::after { content: " +"; color: var(--faint); }
.archived[open] > summary h2::after { content: " \2212"; }
.task-row { display: grid; grid-template-columns: 16px 72px minmax(0, 1fr) auto 140px 80px; align-items: center; gap: 12px; padding: 10px 16px; color: var(--ink); text-decoration: none; }
.task-row:hover { background: var(--hover); text-decoration: none; }
.task-ref { color: var(--faint); font-size: 12px; }
.task-title { font-weight: 500; font-size: 13.5px; }
.task-col { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.task-proj { font-size: 12.5px; color: var(--muted); }
.task-due { font-size: 12.5px; color: var(--muted); text-align: right; }
.task-due.is-overdue { color: var(--danger); font-weight: 500; }
.mini-list a { display: flex; align-items: center; gap: 9px; padding: 10px 14px; color: var(--ink); font-size: 13.5px; text-decoration: none; }
.mini-list a:hover { background: var(--hover); text-decoration: none; }
.mini-list .i { color: var(--muted); }
.mini-list .muted { margin-left: auto; font-size: 12px; white-space: nowrap; }

.empty { text-align: center; padding: 56px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-sm { padding: 36px 20px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-col); }
.empty h2 { font-size: 15px; }
.empty .muted { max-width: 420px; font-size: 13.5px; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); margin-bottom: 4px; }

.invite-form { display: flex; flex-direction: column; gap: 14px; }
.chip-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chip-pick span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chip-pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.chip-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 20px; }
.person + .person { border-top: 1px solid var(--border); }
.person.is-disabled { opacity: .55; }
.person-main { flex: 1; min-width: 0; }
.person-name { font-weight: 550; font-size: 13.5px; }
.person-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { font-size: 12px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-active { color: var(--ok); }
.status-invited { color: var(--warn); }
.status-disabled { color: var(--muted); }
.role { font-size: 12.5px; color: var(--muted); width: 56px; }
.label-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.label-item { display: inline-flex; align-items: center; gap: 0; }
.delete-form { margin-top: 0; }
.radio-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.radio-row input { accent-color: var(--accent); margin: 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; padding: 9px 14px; border-radius: var(--r-btn); background: #1F2A3A; color: #fff; font-size: 13px; box-shadow: var(--shadow-pop); }

.sidebar-scrim { display: none; }

@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .doc-row, .content:has(.doc-list) .doc-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .doc-where, .doc-id { display: none; }
  .task-row { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .task-ref, .task-proj, .task-col { display: none; }
}

@media (max-width: 760px) {
  :root { --header-h: 52px; }
  .mobile-only { display: inline-grid !important; }
  .hide-sm { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(290px, 86vw); transform: translateX(-100%); transition: transform .18s ease-out, visibility 0s .18s; visibility: hidden; }
  .app.sidebar-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-pop); transition: transform .18s ease-out, visibility 0s; }
  .app.sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(19, 28, 43, .3); }
  .topbar { padding: 0 10px; gap: 8px; overflow-x: auto; }
  .tabs { margin-left: 4px; }
  .tab { padding: 0 8px; }
  .ph-key { display: none; }
  .content { padding: 16px; }
  .board-tools { padding: 10px 12px; flex-wrap: wrap; }
  .filter { width: auto; flex: 1; }
  .avatar-stack { display: none; }
  .board { padding: 0 12px 12px; scroll-snap-type: x mandatory; }
  .col { flex-basis: calc(100vw - 48px); scroll-snap-align: start; }
  .panel-sheet { width: 100vw; border-left: 0; }
  .tp-scroll { padding: 16px 16px 40px; }
  .props { grid-template-columns: 96px 1fr; }
  .label-new { margin-left: 0; flex-wrap: wrap; }
  .list-tools, .list-filter { flex-wrap: wrap; }
  .list-filter .filter, .list-filter select { width: 100%; }
  .doc-page { padding: 20px 16px 60px; }
  .doc-title { font-size: 24px; }
  .crumbs a { display: none; }
  .crumbs .sep { display: none; }
  .save-state { display: none; }
  .annot-bar { gap: 2px; padding: 6px; }
  .annot-sep { margin: 0 2px; }
  .person { flex-wrap: wrap; padding: 12px 16px; }
  .role { display: none; }
  .img-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* inbox, files, planning, sharing */
.badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.presence { display: flex; }
.presence .avatar { box-shadow: 0 0 0 2px var(--surface); }
.presence .avatar + .avatar { margin-left: -6px; }
.btn.is-shared { border-color: var(--accent); color: var(--accent); }
.link-accent { color: var(--accent); font-size: inherit; }
.link-accent:hover { color: var(--accent-hover); text-decoration: underline; }
.notice-info .i { color: var(--accent); }
.tp-banner { align-items: center; margin-bottom: 12px; }
.tp-banner span { flex: 1; }
.filter-select { width: auto; min-width: 120px; }
.group-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.group-label:first-of-type { margin-top: 0; }
.group-label.is-overdue { color: var(--danger); }
.group-card + .group-label { margin-top: 18px; }

.files { display: flex; flex-direction: column; gap: 8px; }
.file-rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; }
.file-row + .file-row { border-top: 1px solid var(--border); }
.file-ext { flex: none; width: 40px; height: 26px; display: grid; place-items: center; border-radius: var(--r-chip); background: var(--hover); color: var(--ink-2); font-size: 10.5px; text-transform: uppercase; }
.file-name { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.file-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.file-drop { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px dashed var(--border-strong); border-radius: var(--r-card); color: var(--muted); font-size: 13px; cursor: pointer; }
.file-drop small { color: var(--faint); }
.file-drop:hover, .file-drop.is-over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.file-drop.is-busy { opacity: .6; pointer-events: none; }

.mention { color: var(--accent); font-weight: 600; }
.mention-menu { position: absolute; z-index: 90; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-pop); padding: 4px; }
.mention-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: var(--r-input); font-size: 13px; text-align: left; cursor: pointer; }
.mention-item.is-on, .mention-item:hover { background: var(--accent-soft); }

.editor .ql-editor img { cursor: zoom-in; }
.editor .ql-editor img:hover { outline: 2px solid var(--accent); outline-offset: 2px; }
.editor-readonly .ql-container.ql-snow { border: 0; }
.editor-readonly .ql-editor { padding: 0; min-height: 0; }
.editor-readonly .ql-editor img { cursor: default; outline: 0; }

.filters { flex-wrap: wrap; }
.filters .input-sm { width: auto; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--sidebar); }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: var(--hover); }
.table tr.is-done .t-title { color: var(--muted); text-decoration: line-through; }
.table .t-title { font-weight: 500; min-width: 220px; }
.table .t-title .meta { margin-left: 8px; }
.table td.is-overdue { color: var(--danger); font-weight: 500; }
.table .label { margin: 1px 0; }
.list-count { margin-top: 10px; }

.cal-page { display: flex; flex-direction: column; }
.cal-month { font-size: 16px; min-width: 150px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-col); overflow: hidden; background: var(--border); gap: 1px; }
.cal-head { background: var(--sidebar); padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-day { background: var(--surface); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.is-other { background: #FAFBFC; }
.cal-day.is-other .cal-date { color: var(--faint); }
.cal-date { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 2px 4px; align-self: flex-start; border-radius: 10px; }
.cal-day.is-today .cal-date { background: var(--accent); color: #fff; }
.cal-task { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 6px; border: 1px solid var(--border); border-radius: var(--r-chip); background: var(--surface); font-size: 12px; text-align: left; cursor: pointer; min-width: 0; }
.cal-task:hover { border-color: var(--border-strong); background: var(--hover); }
.cal-task.is-done span { color: var(--muted); text-decoration: line-through; }
.cal-task.is-overdue { border-color: #EFC2C0; color: var(--danger); }
.cal-more { font-size: 11.5px; color: var(--muted); padding: 0 6px; }

.inbox-list, .trash-list { list-style: none; margin: 0; padding: 0; }
.inbox-list li + li, .trash-list li + li { border-top: 1px solid var(--border); }
.inbox-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.inbox-row:hover { background: var(--hover); text-decoration: none; }
.inbox-row.is-unread { background: #F7FAFF; }
.inbox-row.is-unread strong::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.inbox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-excerpt { color: var(--muted); font-size: 12.5px; }
.inbox-time { font-size: 12px; white-space: nowrap; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.trash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.trash-main .muted { font-size: 12.5px; }

.dialog-wide { width: min(880px, calc(100vw - 32px)); }
.versions { display: grid; grid-template-columns: 240px 1fr; gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 12px; height: min(60vh, 520px); }
.versions-list { overflow-y: auto; border-right: 1px solid var(--border); padding: 6px; }
.versions-list > .muted { padding: 10px; font-size: 13px; }
.version-rows { list-style: none; margin: 0; padding: 0; }
.version-row { width: 100%; display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-input); text-align: left; cursor: pointer; font-size: 13px; }
.version-row .muted { font-size: 12px; }
.version-row:hover { background: var(--hover); }
.version-row.is-on { background: var(--accent-soft); }
.versions-preview { overflow-y: auto; padding: 16px 20px; }
.version-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.version-editor.ql-container.ql-snow { border: 0; font: inherit; font-size: 15px; }
.version-editor .ql-editor { padding: 0; min-height: 0; line-height: 1.65; }
.dialog-wide .dialog-foot { align-items: center; }
.dialog-wide .dialog-foot .hint { margin-right: auto; }

.share-body { background: var(--bg); }
.share-top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.share-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.share-main { padding: 28px 20px 60px; }
.share-doc { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-col); padding: 36px 40px; }
.doc-title-static { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.share-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.share-figure { margin: 0; }
.share-figure img { width: 100%; border: 1px solid var(--border); border-radius: var(--r-card); display: block; }
.share-figure figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.share-board-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.share-desc { margin-bottom: 16px; max-width: 720px; }
.board-static { padding: 0; overflow-x: auto; }
.board-static .cols { height: auto; }
.tcard-static { cursor: default; }
.col-empty { font-size: 12.5px; padding: 4px 4px 10px; }

@media (max-width: 760px) {
  .presence { display: none; }
  .versions { grid-template-columns: 1fr; height: auto; }
  .versions-list { border-right: 0; border-bottom: 1px solid var(--border); max-height: 200px; }
  .cal-day { min-height: 76px; padding: 3px; }
  .cal-task { padding: 2px 3px; font-size: 11px; }
  .cal-task .dot { display: none; }
  .share-doc { padding: 22px 18px; }
  .file-meta { display: none; }
  .filter-select { min-width: 0; flex: 1; }
}
