:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); color-scheme: light; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: a header with search and product filters, then a dotted board of five status lanes that scroll on their own.
   A card opens in a right-hand drawer (full screen on phones). Colour carries meaning: each status owns one bright hue. */
:root {
  --bg: #EEF1F8;
  --dots: rgba(40, 52, 120, .11);
  --lane: rgba(255, 255, 255, .66);
  --surface: #FFFFFF;
  --surface-2: #F6F7FC;
  --surface-3: #ECEFF7;
  --ink: #12162E;
  --ink-2: #39405F;
  --muted: #646C90;
  --line: #DFE3EF;
  --line-2: #C6CCE0;
  --shadow: 0 1px 2px rgba(18, 22, 46, .06), 0 3px 10px rgba(18, 22, 46, .05);
  --shadow-up: 0 2px 4px rgba(18, 22, 46, .08), 0 12px 28px rgba(18, 22, 46, .12);
  --shadow-lg: 0 24px 60px rgba(18, 22, 46, .22), 0 2px 8px rgba(18, 22, 46, .08);
  --scrim: rgba(14, 18, 40, .42);
  --solid: #12162E;
  --on-solid: #FFFFFF;

  --new: #1A6AF5;     --new-t: #E5EEFF;     --new-ink: #0D4FCB;     --on-new: #FFFFFF;
  --work: #FF8A00;    --work-t: #FFF0DB;    --work-ink: #A95300;    --on-work: #2A1600;
  --review: #8B4DFF;  --review-t: #F0E8FF;  --review-ink: #6428DB;  --on-review: #FFFFFF;
  --rework: #E11D48;  --rework-t: #FFE5EB;  --rework-ink: #BE123C;  --on-rework: #FFFFFF;
  --done: #12B76A;    --done-t: #DDF6EA;    --done-ink: #067647;    --on-done: #03261A;

  --danger: #D92D45;
  --warn-ink: #B45309;
  --focus: #1A6AF5;
  --mark: #FFE14D;

  --p-teal: #0E9F9A; --p-indigo: #4F5BFF; --p-pink: #E8399C; --p-sky: #0EA5E9;
  --p-orange: #F26B0F; --p-lime: #5EA500; --p-violet: #9A4BE6; --p-red: #E5354D;
  --p-amber: #D19500; --p-cyan: #0BAAC7; --p-slate: #64748B; --p-brown: #A0653A;

  --lb-bg: rgba(7, 9, 20, .94);
  --lb-ink: #F2F4FF;
  --lb-btn: rgba(255, 255, 255, .12);
  --lb-btn-h: rgba(255, 255, 255, .22);

  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Unbounded", "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0F1F; --dots: rgba(150, 165, 255, .09); --lane: rgba(24, 28, 52, .72);
    --surface: #171B33; --surface-2: #1C2140; --surface-3: #252B50;
    --ink: #EEF0FF; --ink-2: #C3C8EA; --muted: #8F96BF; --line: #2A3056; --line-2: #3B4374;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 3px 12px rgba(0, 0, 0, .25);
    --shadow-up: 0 3px 6px rgba(0, 0, 0, .45), 0 14px 32px rgba(0, 0, 0, .4);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
    --scrim: rgba(3, 5, 14, .62); --solid: #EEF0FF; --on-solid: #12162E;
    --new: #5C9DFF; --new-t: rgba(92, 157, 255, .16); --new-ink: #93BEFF; --on-new: #04112E;
    --work: #FFAA33; --work-t: rgba(255, 170, 51, .15); --work-ink: #FFC56B; --on-work: #2A1600;
    --review: #B08DFF; --review-t: rgba(176, 141, 255, .17); --review-ink: #CDB6FF; --on-review: #170A36;
    --rework: #FF5E80; --rework-t: rgba(255, 94, 128, .16); --rework-ink: #FF94AB; --on-rework: #2D0511;
    --done: #34D399; --done-t: rgba(52, 211, 153, .14); --done-ink: #74E8BC; --on-done: #03261A;
    --danger: #FF6B7D; --warn-ink: #FFB65C; --focus: #6EA8FF; --mark: #FFE14D;
    --p-teal: #2DD4BF; --p-indigo: #8E97FF; --p-pink: #F472B6; --p-sky: #38BDF8;
    --p-orange: #FB923C; --p-lime: #A3E635; --p-violet: #C084FC; --p-red: #FB7185;
    --p-amber: #FBBF24; --p-cyan: #22D3EE; --p-slate: #A0AEC4; --p-brown: #D6A57A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0F1F; --dots: rgba(150, 165, 255, .09); --lane: rgba(24, 28, 52, .72);
  --surface: #171B33; --surface-2: #1C2140; --surface-3: #252B50;
  --ink: #EEF0FF; --ink-2: #C3C8EA; --muted: #8F96BF; --line: #2A3056; --line-2: #3B4374;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 3px 12px rgba(0, 0, 0, .25);
  --shadow-up: 0 3px 6px rgba(0, 0, 0, .45), 0 14px 32px rgba(0, 0, 0, .4);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
  --scrim: rgba(3, 5, 14, .62); --solid: #EEF0FF; --on-solid: #12162E;
  --new: #5C9DFF; --new-t: rgba(92, 157, 255, .16); --new-ink: #93BEFF; --on-new: #04112E;
  --work: #FFAA33; --work-t: rgba(255, 170, 51, .15); --work-ink: #FFC56B; --on-work: #2A1600;
  --review: #B08DFF; --review-t: rgba(176, 141, 255, .17); --review-ink: #CDB6FF; --on-review: #170A36;
  --rework: #FF5E80; --rework-t: rgba(255, 94, 128, .16); --rework-ink: #FF94AB; --on-rework: #2D0511;
  --done: #34D399; --done-t: rgba(52, 211, 153, .14); --done-ink: #74E8BC; --on-done: #03261A;
  --danger: #FF6B7D; --warn-ink: #FFB65C; --focus: #6EA8FF; --mark: #FFE14D;
  --p-teal: #2DD4BF; --p-indigo: #8E97FF; --p-pink: #F472B6; --p-sky: #38BDF8;
  --p-orange: #FB923C; --p-lime: #A3E635; --p-violet: #C084FC; --p-red: #FB7185;
  --p-amber: #FBBF24; --p-cyan: #22D3EE; --p-slate: #A0AEC4; --p-brown: #D6A57A;
  color-scheme: dark;
}

/* ---------- base ---------- */
html { height: 100%; box-sizing: border-box; background: var(--bg); }
*, *::before, *::after { box-sizing: border-box; }
body {
  height: 100%; overflow: hidden; margin: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--new-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.ic.xs { width: 13px; height: 13px; }
.ic .fill { fill: currentColor; stroke: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.solid { background: var(--solid); color: var(--on-solid); border-color: transparent; }
.btn.solid:hover:not(:disabled) { background: var(--solid); filter: brightness(1.12); }
.btn.s-new, .btn.s-work, .btn.s-review, .btn.s-rework, .btn.s-done { border-color: transparent; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 4px 14px -6px var(--c); }
.btn.s-new { --c: var(--new); background: var(--new); color: var(--on-new); }
.btn.s-work { --c: var(--work); background: var(--work); color: var(--on-work); }
.btn.s-review { --c: var(--review); background: var(--review); color: var(--on-review); }
.btn.s-rework { --c: var(--rework); background: var(--rework); color: var(--on-rework); }
.btn.s-done { --c: var(--done); background: var(--done); color: var(--on-done); }
.btn.s-new:hover:not(:disabled), .btn.s-work:hover:not(:disabled), .btn.s-review:hover:not(:disabled),
.btn.s-rework:hover:not(:disabled), .btn.s-done:hover:not(:disabled) { filter: brightness(1.07) saturate(1.05); }
.btn.s-new:hover:not(:disabled) { background: var(--new); }
.btn.s-work:hover:not(:disabled) { background: var(--work); }
.btn.s-review:hover:not(:disabled) { background: var(--review); }
.btn.s-rework:hover:not(:disabled) { background: var(--rework); }
.btn.s-done:hover:not(:disabled) { background: var(--done); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 32px; padding: 0 11px; border-radius: 9px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  color: var(--ink-2); position: relative; flex: none;
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.on { background: var(--new-t); color: var(--new-ink); }
.badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--rework); color: var(--on-rework);
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- app frame ---------- */
#app { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.top {
  flex: none; background: var(--surface); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  position: relative; z-index: 5;
}
.top-row { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand svg { width: 30px; height: 24px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.search { flex: 1 1 auto; max-width: 420px; position: relative; display: flex; align-items: center; margin-left: 12px; }
.search .ic { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  padding: 0 34px 0 38px; outline: none; transition: border-color .15s, background-color .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--focus); background: var(--surface); }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { position: absolute; right: 6px; }
.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top-actions .btn.s-new { margin-right: 6px; }
.me { display: inline-flex; align-items: center; margin-left: 4px; }
.me .av { width: 32px; height: 32px; }
.filters { display: flex; align-items: center; gap: 12px; padding: 0 0 12px; min-width: 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1 1 auto; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-weight: 500; white-space: nowrap; flex: none; transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pc, var(--muted)); flex: none; }
.chip .n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px var(--on-solid); }
.filter-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px;
  border: 1px dashed var(--line-2); color: var(--ink-2); font-weight: 500; white-space: nowrap;
}
.toggle:hover { color: var(--ink); border-style: solid; }
.toggle[aria-pressed="true"] { border-style: solid; }
.toggle[data-flag="urgent"][aria-pressed="true"] { background: var(--work-t); border-color: var(--work); color: var(--work-ink); }
.toggle[data-flag="overdue"][aria-pressed="true"] { background: var(--rework-t); border-color: var(--rework); color: var(--rework-ink); }
.toggle[data-flag="unread"][aria-pressed="true"] { background: var(--new-t); border-color: var(--new); color: var(--new-ink); }
.select {
  height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 28px 0 12px; font-weight: 500; color: var(--ink-2); appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px; background-repeat: no-repeat;
}
.filters-btn { display: none; }
.status-tabs { display: none; }
.banner {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 9px max(16px, env(safe-area-inset-right, 0px)) 9px max(16px, env(safe-area-inset-left, 0px));
  background: var(--work-t); color: var(--work-ink); font-weight: 500; border-bottom: 1px solid var(--line);
}
.banner.info { background: var(--new-t); color: var(--new-ink); }

/* ---------- board ---------- */
.board {
  flex: 1 1 auto; min-height: 0; display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden;
  padding-block: 14px 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1.1px, transparent 1.4px);
  background-size: 18px 18px;
}
.lane {
  --c: var(--new); --ct: var(--new-t); --ci: var(--new-ink);
  flex: 1 1 0; min-width: 262px; max-width: 420px; display: flex; flex-direction: column; min-height: 0;
  background: var(--lane); border: 1px solid var(--line); border-radius: var(--r-lg);
  backdrop-filter: blur(2px); transition: border-color .15s, background-color .15s;
}
.lane[data-status="work"] { --c: var(--work); --ct: var(--work-t); --ci: var(--work-ink); }
.lane[data-status="review"] { --c: var(--review); --ct: var(--review-t); --ci: var(--review-ink); }
.lane[data-status="rework"] { --c: var(--rework); --ct: var(--rework-t); --ci: var(--rework-ink); }
.lane[data-status="done"] { --c: var(--done); --ct: var(--done-t); --ci: var(--done-ink); }
.lane.drop-over { border-color: var(--c); background: var(--ct); }
.lane-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 12px; flex: none; }
.lane-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px 0 10px; border-radius: 999px;
  background: var(--ct); color: var(--ci); font-weight: 700; font-size: 13px; letter-spacing: .01em; white-space: nowrap;
}
.lane-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.lane-count { font-family: var(--font-display); font-weight: 500; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-head .grow { flex: 1; }
.lane-list { flex: 1 1 auto; min-height: 60px; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 9px; scrollbar-width: thin; }
.lane-empty { margin: 4px 2px; padding: 18px 12px; border: 1.5px dashed var(--line-2); border-radius: var(--r); color: var(--muted); text-align: center; font-size: 13px; }
.lane-more { align-self: center; margin-top: 2px; }
.lane.collapsed { flex: 0 0 54px; min-width: 54px; max-width: 54px; cursor: pointer; }
.lane.collapsed .lane-head { flex-direction: column; padding: 10px 0; gap: 10px; height: 100%; }
.lane.collapsed .lane-pill { writing-mode: vertical-rl; transform: rotate(180deg); height: auto; padding: 12px 0; width: 30px; justify-content: center; }
.lane.collapsed .lane-list, .lane.collapsed .lane-add { display: none; }
.lane.collapsed .grow { display: none; }

/* ---------- card tile ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 11px 12px 10px; box-shadow: var(--shadow); cursor: pointer; flex: none;
  transition: transform .12s ease, box-shadow .15s, border-color .15s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-up); transform: translateY(-1px); }
.card.dragging { opacity: .45; transform: rotate(1.2deg) scale(.98); }
.card.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--c, var(--new)), var(--shadow-up); } 100% { box-shadow: var(--shadow); } }
.card-top { display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 6px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; max-width: 78%; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.pchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc, var(--muted)); flex: none; }
.pchip b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sec { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0; }
.card-sec::before { content: "/ "; opacity: .6; }
.card-num { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.card-title { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.36; color: var(--ink); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.thumbs { display: flex; gap: 6px; margin-top: 9px; }
.thumbs img, .thumbs .more {
  height: 46px; width: 64px; object-fit: cover; object-position: top left; border-radius: 7px; border: 1px solid var(--line);
  background: var(--surface-3); flex: none;
}
.thumbs .more { display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--ink-2); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 9px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 7px;
  background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tag.kind-bug { background: var(--rework-t); color: var(--rework-ink); }
.tag.kind-feature { background: var(--done-t); color: var(--done-ink); }
.tag.kind-improve { background: var(--surface-3); color: var(--ink-2); }
.tag.urgent { background: var(--work); color: var(--on-work); }
.tag.due-over { background: var(--rework); color: var(--on-rework); }
.tag.due-soon { background: var(--work-t); color: var(--work-ink); }
.tag.check-done { background: var(--done-t); color: var(--done-ink); }
.tag.returned { background: var(--rework-t); color: var(--rework-ink); }
.unread-dot { position: absolute; top: -4px; right: -4px; width: 13px; height: 13px; border-radius: 50%; background: var(--new); box-shadow: 0 0 0 3px var(--surface); }
.unread-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--new); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
.drop-line { height: 4px; border-radius: 4px; background: var(--c); margin: -2px 2px; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }

.skeleton { height: 92px; border-radius: var(--r); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; border: 1px solid var(--line); animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.board-empty {
  margin: 4px 0 0; padding: 18px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.board-empty h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.board-empty p { margin: 0 0 12px; color: var(--ink-2); }
.board-empty kbd, .hint kbd { font-family: var(--font-ui); font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); }
.nothing {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 22px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-up); text-align: center; max-width: calc(100% - 32px);
}
.board-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }

/* ---------- avatars ---------- */
.av {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--avc, var(--p-slate)); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.owner { --avc: var(--p-pink); }
.av.team { --avc: var(--p-indigo); }
.av.import { background: var(--surface-3); color: var(--ink-2); }

/* ---------- overlays: drawer, modal, panel ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; }
.overlay[hidden] { display: none !important; }
.scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer-panel {
  position: relative; margin-left: auto; height: 100%; width: min(640px, 100%); background: var(--surface);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; min-height: 0;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px);
  animation: slidein .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.feed-panel { width: min(440px, 100%); }
.d-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); flex: none; }
.d-num { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.d-head .grow { flex: 1; }
.status-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 12px; border-radius: 999px;
  background: var(--ct); color: var(--ci); font-weight: 700; font-size: 13px; position: relative;
}
.status-btn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.menu {
  position: absolute; z-index: 60; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border-radius: 9px; text-align: left; font-weight: 500; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-3); }
.menu button .dot { width: 9px; height: 9px; border-radius: 50%; }
.menu button.danger { color: var(--danger); }
.menu button[aria-checked="true"] { font-weight: 700; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.d-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.d-flow { display: flex; flex-wrap: wrap; gap: 8px; }
.flow-panel { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.flow-panel .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.flow-panel .row .grow { flex: 1; }
.flow-panel label { font-weight: 600; }
.d-title {
  width: 100%; border: 1px solid transparent; border-radius: 10px; background: transparent; resize: none; overflow: hidden;
  font-size: 21px; font-weight: 700; line-height: 1.3; padding: 4px 8px; margin: -4px -8px; letter-spacing: -.01em;
}
.d-title:hover:not(:read-only) { background: var(--surface-2); }
.d-title:focus { outline: none; border-color: var(--focus); background: var(--surface); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > .lbl, .lbl { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.input, .ta {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 8px 11px; outline: none;
  transition: border-color .15s, background-color .15s;
}
.input { height: 38px; }
.input:focus, .ta:focus { border-color: var(--focus); background: var(--surface); }
.input::placeholder, .ta::placeholder { color: var(--muted); }
.ta { resize: none; min-height: 84px; line-height: 1.5; display: block; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); gap: 2px; width: 100%; }
.seg button { flex: 1; height: 32px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; padding: 0 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg button[data-kind="bug"][aria-pressed="true"] { color: var(--rework-ink); }
.seg button[data-kind="feature"][aria-pressed="true"] { color: var(--done-ink); }
.due-wrap { display: flex; gap: 6px; align-items: center; }
.due-wrap .input { flex: 1; min-width: 0; }
.switch { display: inline-flex; align-items: center; gap: 9px; height: 38px; font-weight: 600; cursor: pointer; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background-color .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s; }
.switch input:checked { background: var(--work); }
.switch input:checked::after { transform: translateX(16px); }
.sec { display: flex; flex-direction: column; gap: 8px; }
.sec-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.sec-h .n { color: var(--muted); font-weight: 600; }
.sec-h .grow { flex: 1; }
.d-desc { min-height: 96px; }
.hint { font-size: 12.5px; color: var(--muted); }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.shot {
  position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  background: var(--surface-3); max-width: 100%;
}
.shot > button.open { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.shot .tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.shot:hover .tools, .shot:focus-within .tools { opacity: 1; }
.shot .tools button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(10, 12, 28, .72); color: #fff; }
.shot .tools button:hover { background: rgba(10, 12, 28, .9); }
.shot .by { position: absolute; left: 6px; bottom: 6px; }
.shot .by .av { width: 22px; height: 22px; font-size: 9.5px; box-shadow: 0 0 0 2px var(--surface); }
.shot.loading::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.shot.loading .spin { position: absolute; left: 50%; top: 50%; margin: -12px 0 0 -12px; z-index: 2; }
.shot-add {
  aspect-ratio: 4 / 3; border-radius: 10px; border: 1.5px dashed var(--line-2); color: var(--ink-2); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; font-weight: 600; font-size: 13px; text-align: center; padding: 8px; background: var(--surface-2);
}
.shot-add:hover { border-color: var(--new); color: var(--new-ink); background: var(--new-t); }
.shot-add small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.spin { width: 24px; height: 24px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--new) 25%, transparent); border-top-color: var(--new); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* checklist */
.checklist { display: flex; flex-direction: column; gap: 2px; }
.ck { display: flex; align-items: flex-start; gap: 10px; padding: 6px 6px; border-radius: 9px; }
.ck:hover { background: var(--surface-2); }
.ck input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2); flex: none; margin: 1px 0 0; cursor: pointer; display: grid; place-items: center; transition: background-color .12s, border-color .12s; }
.ck input[type="checkbox"]:checked { background: var(--done); border-color: var(--done); }
.ck input[type="checkbox"]:checked::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid var(--on-done); border-bottom: 2.5px solid var(--on-done); transform: rotate(-45deg) translate(1px, -1px); }
.ck .t { flex: 1; min-width: 0; overflow-wrap: anywhere; cursor: text; padding-top: 1px; }
.ck.done .t { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.ck .x { opacity: 0; }
.ck:hover .x, .ck:focus-within .x { opacity: 1; }
.ck .input { height: 30px; padding: 4px 8px; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--done); border-radius: 6px; transition: width .25s; }
.add-row { display: flex; gap: 6px; }
.add-row .input { flex: 1; }

/* thread */
.thread { display: flex; flex-direction: column; gap: 14px; }
.ev { display: flex; gap: 10px; }
.ev .body { flex: 1; min-width: 0; }
.ev .who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ev .who b { font-weight: 700; }
.ev .who time { color: var(--muted); font-size: 12px; }
.ev .text { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ev .bubble { margin-top: 4px; padding: 9px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.ev.return .bubble { background: var(--rework-t); border-color: color-mix(in srgb, var(--rework) 35%, transparent); }
.ev.review .bubble { background: var(--review-t); border-color: color-mix(in srgb, var(--review) 35%, transparent); }
.ev .mini-shots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ev .mini-shots button { width: 96px; height: 68px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); }
.ev .mini-shots img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.ev.sys { align-items: center; color: var(--ink-2); font-size: 13px; gap: 8px; padding-left: 4px; }
.ev.sys .mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ct, var(--surface-3)); color: var(--ci, var(--ink-2)); flex: none; }
.ev.sys time { color: var(--muted); font-size: 12px; margin-left: 4px; white-space: nowrap; }
.st { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ci); }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.s-new { --c: var(--new); --ct: var(--new-t); --ci: var(--new-ink); }
.s-work { --c: var(--work); --ct: var(--work-t); --ci: var(--work-ink); }
.s-review { --c: var(--review); --ct: var(--review-t); --ci: var(--review-ink); }
.s-rework { --c: var(--rework); --ct: var(--rework-t); --ci: var(--rework-ink); }
.s-done { --c: var(--done); --ct: var(--done-t); --ci: var(--done-ink); }
.d-foot { color: var(--muted); font-size: 12.5px; }

/* composer */
.composer { flex: none; border-top: 1px solid var(--line); padding: 10px 14px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.composer .ta { min-height: 44px; max-height: 180px; overflow-y: auto; }
.composer .row { display: flex; align-items: center; gap: 4px; }
.composer .row .grow { flex: 1; }
.staged { display: flex; gap: 6px; flex-wrap: wrap; }
.staged:empty { display: none; }
.stg { position: relative; width: 74px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-3); flex: none; }
.stg img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.stg .x, .stg .pen { position: absolute; top: 3px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(10, 12, 28, .75); color: #fff; }
.stg .x { right: 3px; }
.stg .pen { right: 28px; }
.mic.on { background: var(--rework-t); color: var(--rework-ink); }
.mic.on .ic { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.15); } }

/* modal */
.modal-wrap { align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal {
  position: relative; width: min(640px, 100%); max-height: 100%; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; min-height: 0; animation: pop .2s cubic-bezier(.2, .8, .2, 1);
}
.modal.narrow { width: min(440px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.m-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 6px 22px; }
.m-head h2 { margin: 0; flex: 1; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.m-body { padding: 10px 22px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.m-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.m-foot .grow { flex: 1; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.err { color: var(--danger); font-size: 12.5px; font-weight: 600; }
.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface-2); transition: border-color .15s, background-color .15s;
}
.dropzone.over { border-color: var(--new); background: var(--new-t); }
.dropzone .dz-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink-2); }
.dropzone .dz-row .grow { flex: 1; min-width: 160px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.ta-wrap { position: relative; }
.ta-wrap .mic { position: absolute; right: 6px; bottom: 6px; }
.ta-wrap .ta { padding-right: 46px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 8px; }

/* products */
.prod-list { display: flex; flex-direction: column; gap: 6px; }
.prow { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.prow .input { height: 34px; flex: 1; min-width: 0; background: var(--surface); }
.prow .cnt { font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; }
.swatch { width: 26px; height: 26px; border-radius: 50%; background: var(--pc); flex: none; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.palette { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 6px 2px; }

/* feed */
.feed-list { flex: 1 1 auto; overflow-y: auto; padding: 6px 10px 16px; min-height: 0; }
.fitem { display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px; border-radius: 12px; position: relative; }
.fitem:hover { background: var(--surface-2); }
.fitem.unread { background: var(--new-t); }
.fitem.unread::after { content: ""; position: absolute; right: 10px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--new); }
.fitem .body { flex: 1; min-width: 0; }
.fitem .line1 { font-size: 13px; color: var(--ink-2); padding-right: 14px; }
.fitem .line1 b { color: var(--ink); }
.fitem .ttl { font-weight: 600; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fitem .snip { color: var(--ink-2); font-size: 13px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fitem time { color: var(--muted); font-size: 12px; }
.feed-empty { padding: 30px 16px; color: var(--muted); text-align: center; }

/* lightbox + annotator */
.lb { position: fixed; inset: 0; z-index: 70; background: var(--lb-bg); color: var(--lb-ink); display: flex; flex-direction: column; animation: fade .15s ease;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.lb[hidden] { display: none; }
.lb-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; flex: none; flex-wrap: wrap; }
.lb-bar .grow { flex: 1; }
.lb-bar .cap { font-weight: 600; font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.lb .lbtn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--lb-btn); color: var(--lb-ink); font-weight: 600; text-decoration: none; font-size: 13px; }
.lb .lbtn:hover { background: var(--lb-btn-h); }
.lb .lbtn.on { background: var(--lb-ink); color: #111; }
.lb .lbtn.icon { width: 36px; padding: 0; justify-content: center; }
.lb-stage { flex: 1 1 auto; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 56px 16px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--lb-btn); color: var(--lb-ink); }
.lb-nav:hover { background: var(--lb-btn-h); }
.lb-nav.prev { left: 6px; } .lb-nav.next { right: 6px; }
.an-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px 12px; touch-action: none; }
.an-stage canvas { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: crosshair; touch-action: none; background: #fff; }
.cdot { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); }
.cdot[aria-pressed="true"] { border-color: var(--lb-ink); }
.lb .sep { width: 1px; height: 24px; background: rgba(255,255,255,.18); margin: 0 4px; }

/* drag overlay for files */
.file-over { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: color-mix(in srgb, var(--new) 16%, transparent); pointer-events: none; }
.file-over[hidden] { display: none; }
.file-over div { padding: 22px 28px; border-radius: 20px; background: var(--surface); border: 2px dashed var(--new); box-shadow: var(--shadow-lg); font-weight: 700; font-size: 16px; color: var(--new-ink); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); text-align: center; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 12px)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--solid); color: var(--on-solid); box-shadow: var(--shadow-lg); font-weight: 500; animation: pop .2s ease; max-width: 100%; }
.toast.error { background: var(--danger); color: #fff; }
.toast button { font-weight: 700; padding: 6px 10px; border-radius: 9px; background: color-mix(in srgb, var(--on-solid) 14%, transparent); }
.toast button:hover { background: color-mix(in srgb, var(--on-solid) 24%, transparent); }

/* accepted stamp */
.stamp {
  position: fixed; z-index: 95; left: 50%; top: 42%; pointer-events: none; transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: .08em; color: var(--done);
  border: 5px solid var(--done); border-radius: 14px; padding: 6px 18px; background: color-mix(in srgb, var(--surface) 82%, transparent);
  animation: stamp 1.1s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
@keyframes stamp {
  0% { transform: translate(-50%, -50%) rotate(-8deg) scale(2.2); opacity: 0; }
  25% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); opacity: 0; }
}

/* read-only */
.readonly .needs-write { display: none !important; }
.search-btn { display: none; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .top-row { min-height: 56px; gap: 6px; }
  .brand-name { font-size: 14px; }
  .search { display: none; order: 5; flex: 1 0 100%; max-width: none; margin: 0 0 10px; }
  .top.search-open .search { display: flex; }
  .top.search-open .top-row { flex-wrap: wrap; }
  .top-actions .btn.s-new { width: 38px; padding: 0; margin-right: 2px; }
  .top-actions .btn.s-new span { display: none; }
  .top-actions .only-wide { display: none; }
  .search-btn { display: inline-grid; }
  .filters { flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
  .filters-btn { display: inline-flex; }
  .filter-tools { display: none; width: 100%; flex-wrap: wrap; }
  .top.filters-open .filter-tools { display: flex; }
  .status-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 10px; }
  .status-tabs::-webkit-scrollbar { display: none; }
  .stab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); }
  .stab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
  .stab .n { font-family: var(--font-display); font-weight: 500; font-size: 12px; color: var(--muted); }
  .stab[aria-pressed="true"] { background: var(--ct); color: var(--ci); border-color: var(--c); }
  .stab[aria-pressed="true"] .n { color: var(--ci); }
  .board { padding-block: 10px 12px; gap: 0; overflow-x: hidden; }
  .lane { display: none; max-width: none; min-width: 0; flex: 1 1 auto; background: transparent; border: 0; backdrop-filter: none; }
  .lane.is-active { display: flex; }
  .lane.collapsed { flex: 1 1 auto; max-width: none; cursor: default; }
  .lane.collapsed .lane-list { display: flex; }
  .lane-head { display: none; }
  .lane-list { padding: 2px 0 calc(16px + env(safe-area-inset-bottom, 0px)); }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .drawer-panel { width: 100%; }
  .d-scroll { padding: 14px 16px 20px; }
  .d-head { padding-left: 16px; }
  .modal-wrap { padding: 0; }
  .modal { width: 100%; height: 100%; max-height: none; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal.narrow { height: auto; border-radius: 20px 20px 0 0; margin-top: auto; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .lb-stage { padding: 0 8px 12px; }
  .lb-nav { display: none; }
  .shot .tools { opacity: 1; }
  .ck .x { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- small additions ---------- */
#confirm { z-index: 60; }
.no-assets .needs-assets { display: none !important; }
.ndot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--new); flex: none; }
.fitem .body > span, .fitem .body > time { display: block; }
.lane.collapsed [data-act="collapse"] svg { transform: scaleX(-1); }
.filters-btn[aria-pressed="true"] { border-style: solid; background: var(--new-t); border-color: var(--new); color: var(--new-ink); }
.menu .ic { color: var(--muted); }
.menu .danger .ic { color: var(--danger); }
.card-title + .card-meta:empty, .card-meta:empty { display: none; }
@media (max-width: 760px) {
  .me { display: none; }
  .chips { flex: 1 1 0; }
  .filters-btn { flex: none; }
}
@media (max-width: 380px) {
  .brand-name { display: none; }
}
.brand .b-new { fill: var(--new); } .brand .b-rework { fill: var(--rework); } .brand .b-work { fill: var(--work); }
.brand .b-review { fill: var(--review); } .brand .b-done { fill: var(--done); } .brand .b-base { fill: var(--line-2); }
.chip-add { border-style: dashed; color: var(--new-ink); border-color: color-mix(in srgb, var(--new) 45%, var(--line)); }
.chip-add:hover { background: var(--new-t); border-color: var(--new); color: var(--new-ink); }
.np-row { margin-top: 8px; }
.np-row .input { min-width: 0; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px; }
.menu-head span { display: flex; flex-direction: column; min-width: 0; }
.menu-head small { color: var(--muted); font-size: 12px; }
.me[role="button"] { cursor: pointer; border-radius: 50%; }
@media (min-width: 761px) {
  .filters { align-items: flex-start; }
  .chips { flex-wrap: wrap; overflow: visible; }
}
