:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f0f2f6;
  --border: #e1e4ea;
  --border-strong: #cdd2db;
  --text: #171a21;
  --muted: #5f6877;
  --faint: #8a93a2;
  --accent: #3b5bdb;
  --accent-ink: #ffffff;
  --accent-soft: #e8edff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .18);

  /* status colours: same idea as the red / yellow / green highlighting in the old doc */
  --todo: #e5484d;        --todo-soft: #fdecec;
  --progress: #e09c00;    --progress-soft: #fff6d6;
  --done: #2f9e5b;        --done-soft: #e5f6ec;
  --verified: #0b6e4f;    --verified-soft: #d6efe5;
  --reopened: #e8590c;    --reopened-soft: #fff0e6;

  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #171a21; --surface-2: #1e222b; --border: #2a2f3a; --border-strong: #3a4150;
    --text: #e8eaef; --muted: #a2a9b6; --faint: #7a8291; --accent: #6b8cff; --accent-ink: #0b1020; --accent-soft: #1d2747;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
    --todo: #ff6b6f; --todo-soft: #3a1c1e; --progress: #f5b82e; --progress-soft: #3a2f10;
    --done: #4cc47e; --done-soft: #15301f; --verified: #3fd3a0; --verified-soft: #0f3226;
    --reopened: #ff8a3d; --reopened-soft: #3b2312;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a21; --surface-2: #1e222b; --border: #2a2f3a; --border-strong: #3a4150;
  --text: #e8eaef; --muted: #a2a9b6; --faint: #7a8291; --accent: #6b8cff; --accent-ink: #0b1020; --accent-soft: #1d2747;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
  --todo: #ff6b6f; --todo-soft: #3a1c1e; --progress: #f5b82e; --progress-soft: #3a2f10;
  --done: #4cc47e; --done-soft: #15301f; --verified: #3fd3a0; --verified-soft: #0f3226;
  --reopened: #ff8a3d; --reopened-soft: #3b2312;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
.boot { padding: 80px 16px; text-align: center; color: var(--muted); }
.i { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
  cursor: pointer; white-space: nowrap; font-weight: 500;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; border-radius: 7px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--todo); }
.btn.st-in_progress { background: var(--progress-soft); border-color: color-mix(in srgb, var(--progress) 45%, transparent); }
.btn.st-done { background: var(--done-soft); border-color: color-mix(in srgb, var(--done) 45%, transparent); }
.btn.st-verified { background: var(--done); border-color: var(--done); color: #fff; }
.btn.st-reopened { background: var(--reopened-soft); border-color: color-mix(in srgb, var(--reopened) 45%, transparent); }
.btn.st-todo { background: var(--surface); }
.icon-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 6px 0; font-weight: 500; }

.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
  padding: 8px 10px; min-height: 36px; outline: none;
}
.input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.5; }
label.field { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
label.field .opt { color: var(--faint); font-weight: 400; }
.field-hint { font-size: 12px; color: var(--faint); font-weight: 400; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 9px; margin-left: 8px; }
.tab { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.spacer { flex: 1; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); padding: 3px 10px 3px 3px; border-radius: 99px; cursor: pointer; }
.me-btn .role { font-size: 11px; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 20px 0; }
.search { position: relative; flex: 1 1 220px; max-width: 360px; }
.search .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 32px; }
.toolbar select.input { width: auto; min-width: 130px; }
.summary { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 20px 0; }
.sum-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--muted);
}
.sum-pill b { color: var(--text); }
.sum-pill.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.banner {
  margin: 12px 20px 0; padding: 10px 14px; border-radius: var(--radius); background: var(--done-soft);
  border: 1px solid color-mix(in srgb, var(--done) 35%, transparent); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}

/* ---------- status bits ---------- */
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.st-todo .dot, .dot.st-todo { background: var(--todo); }
.st-in_progress .dot, .dot.st-in_progress { background: var(--progress); }
.st-done .dot, .dot.st-done { background: var(--done); }
.st-verified .dot, .dot.st-verified { background: var(--verified); }
.st-reopened .dot, .dot.st-reopened { background: var(--reopened); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.st-todo { background: var(--todo-soft); color: var(--todo); }
.pill.st-in_progress { background: var(--progress-soft); color: color-mix(in srgb, var(--progress) 75%, var(--text)); }
.pill.st-done { background: var(--done-soft); color: var(--done); }
.pill.st-verified { background: var(--verified-soft); color: var(--verified); }
.pill.st-reopened { background: var(--reopened-soft); color: var(--reopened); }

.chip { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.type-bug { background: var(--todo-soft); color: var(--todo); }
.chip.type-feature { background: var(--accent-soft); color: var(--accent); }
.chip.type-update { background: var(--surface-2); color: var(--muted); }
.prio { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.prio.urgent { background: var(--todo); color: #fff; }
.prio.high { background: var(--progress-soft); color: color-mix(in srgb, var(--progress) 70%, var(--text)); }
.tid { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.avatar { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.avatar.lg { width: 30px; height: 30px; font-size: 12px; }

/* ---------- board ---------- */
main { padding: 14px 20px 120px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--surface-2); border-radius: 12px; padding: 10px; min-width: 0; border-top: 3px solid var(--border-strong); }
.col.col-todo { border-top-color: var(--todo); }
.col.col-in_progress { border-top-color: var(--progress); }
.col.col-done { border-top-color: var(--done); }
.col.col-verified { border-top-color: var(--verified); }
.col.col-reopened { border-top-color: var(--reopened); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.col-head h2 { margin: 0; font-size: 13.5px; font-weight: 700; }
.col-head .count { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--surface); padding: 0 8px; border-radius: 99px; }
.col-hint { margin: 2px 4px 8px; font-size: 12px; color: var(--faint); }
.col-body { display: grid; gap: 8px; }
.empty { color: var(--faint); font-size: 12.5px; text-align: center; padding: 14px 0; margin: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 10px 10px 12px;
  box-shadow: var(--shadow); cursor: pointer; position: relative; display: grid; gap: 6px; border-left: 4px solid var(--border-strong);
}
.card:hover { border-color: var(--border-strong); }
.card.st-todo { border-left-color: var(--todo); }
.card.st-in_progress { border-left-color: var(--progress); background: color-mix(in srgb, var(--progress-soft) 45%, var(--surface)); }
.card.st-done { border-left-color: var(--done); }
.card.st-verified { border-left-color: var(--verified); }
.card.st-reopened { border-left-color: var(--reopened); }
.card.selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.card-top { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.card-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.card-area { font-size: 12.5px; color: var(--muted); display: flex; gap: 4px; align-items: center; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.counts { display: inline-flex; gap: 8px; color: var(--faint); }
.counts span { display: inline-flex; gap: 3px; align-items: center; }
.card-meta .counts { margin-left: auto; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.card-actions:empty { display: none; }
.rework-note {
  background: var(--reopened-soft); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; overflow-wrap: anywhere;
  border: 1px dashed color-mix(in srgb, var(--reopened) 50%, transparent);
}
.sel { display: inline-grid; place-items: center; width: 20px; height: 20px; cursor: pointer; }
.sel input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--accent); }

/* ---------- timeline ---------- */
.timeline { max-width: 980px; margin: 0 auto; display: grid; gap: 22px; }
.day h2 { position: sticky; top: 62px; z-index: 5; margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); padding: 6px 0; display: flex; gap: 8px; align-items: baseline; }
.day h2 small { text-transform: none; letter-spacing: 0; color: var(--faint); font-weight: 500; }
.day-list { display: grid; gap: 6px; }
.row {
  display: grid; grid-template-columns: 20px auto 1fr auto; gap: 4px 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--border-strong);
  border-radius: var(--radius); padding: 9px 12px; cursor: pointer;
}
.row:hover { border-color: var(--border-strong); }
.row.st-todo { border-left-color: var(--todo); }
.row.st-in_progress { border-left-color: var(--progress); background: color-mix(in srgb, var(--progress-soft) 55%, var(--surface)); }
.row.st-done { border-left-color: var(--done); background: color-mix(in srgb, var(--done-soft) 50%, var(--surface)); }
.row.st-verified { border-left-color: var(--verified); }
.row.st-reopened { border-left-color: var(--reopened); }
.row.selected { outline: 2px solid var(--accent); }
.row-main { min-width: 0; display: grid; gap: 3px; }
.row-title { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.row-sub { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-right { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row.rework { border-style: dashed; border-left-style: solid; }
.row .rework-note { grid-column: 3 / -1; }
.rework-label { color: var(--reopened); font-weight: 700; font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }

/* ---------- selection bar ---------- */
.selbar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg); padding: 8px 8px 8px 16px; border-radius: 12px; box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px); flex-wrap: wrap;
}
.selbar .btn { background: var(--bg); color: var(--text); border-color: transparent; }
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 25; height: 52px; padding: 0 20px; border-radius: 99px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; display: none; align-items: center; gap: 8px;
  box-shadow: var(--shadow-lg); cursor: pointer;
}

/* ---------- drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 14, 22, .42); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); z-index: 41; background: var(--surface);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slidein .18s ease-out;
}
@keyframes slidein { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 16px 20px 24px; }
.drawer h1 { font-size: 20px; margin: 0 0 12px; line-height: 1.3; overflow-wrap: anywhere; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; margin-bottom: 16px; }
.meta-grid > div { display: grid; gap: 2px; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.meta-grid span { color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.actionbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 18px; }
.actionbar .note { font-size: 12.5px; color: var(--muted); }
.section { margin-bottom: 20px; }
.section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.muted { color: var(--muted); }
.links { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.links li { display: flex; gap: 6px; align-items: center; min-width: 0; }
.links a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumb { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4/3; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.thumb .rm, .file-row .rm { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; width: 22px; height: 22px; }
.file-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 36px 6px 8px; border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; min-width: 0; }
.file-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .rm { top: 50%; transform: translateY(-50%); }
.file-row audio { height: 34px; max-width: 100%; flex: 1; min-width: 0; }
.file-row .fname { font-size: 12px; color: var(--muted); }

.activity { display: grid; gap: 12px; }
.act { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.act-head { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.act-head time { color: var(--faint); font-size: 12px; }
.act-body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.act.rework .act-body { background: var(--reopened-soft); border: 1px dashed color-mix(in srgb, var(--reopened) 45%, transparent); }
.act .gallery { margin-top: 6px; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.drawer-foot { border-top: 1px solid var(--border); padding: 12px 16px; background: var(--surface); }

/* ---------- composer & voice ---------- */
.composer { display: grid; gap: 8px; }
.composer.drag { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 8px; }
.composer-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.composer-tools .hint { font-size: 12px; color: var(--faint); }
.voice-btn.rec { background: var(--todo); border-color: var(--todo); color: #fff; }
.voice-btn.rec .pulse { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.voice-lang { height: 34px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); padding: 0 6px; font-size: 13px; max-width: 170px; }
.voice-live { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-style: italic; min-height: 36px; }
.file-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chips:empty { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px; padding: 3px 4px 3px 4px; font-size: 12.5px; max-width: 240px; }
.fchip img { width: 28px; height: 28px; object-fit: cover; border-radius: 5px; }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px; display: grid; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 22, .45); overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: min(680px, 100%); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.modal.sm { width: min(440px, 100%); }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 14px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 500; font-size: 13px; }
.seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- onboarding ---------- */
.center-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.card-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; width: min(460px, 100%); box-shadow: var(--shadow); display: grid; gap: 14px; }
.card-panel h1 { margin: 0; font-size: 22px; }
.card-panel p { margin: 0; color: var(--muted); }
.who-list { display: grid; gap: 8px; }
.who { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; }
.who:hover { border-color: var(--accent); }
.who .role { margin-left: auto; font-size: 12px; color: var(--muted); }
.inline-form { display: flex; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.team-row .name { flex: 1; min-width: 120px; font-weight: 600; }

/* ---------- toasts / lightbox / popover ---------- */
#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: slidein .15s ease-out; }
.toast.error { background: var(--todo); color: #fff; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.popover { position: absolute; z-index: 35; right: 20px; top: 54px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 210px; display: grid; }
.popover button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.popover button:hover { background: var(--surface-2); }
kbd { font: 11px ui-monospace, monospace; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar-inner { padding: 8px 16px; gap: 8px; flex-wrap: wrap; }
  .brand span.name { display: none; }
  .tabs { margin-left: 0; }
  .tab .lbl-long { display: none; }
  .toolbar, .summary { padding-left: 16px; padding-right: 16px; }
  .toolbar .new-btn { display: none; }
  .search { max-width: none; flex-basis: 100%; }
  .toolbar select.input { flex: 1; min-width: 0; }
  .banner { margin-left: 16px; margin-right: 16px; }
  main { padding: 12px 16px 120px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: 20px auto 1fr; }
  .row-right { grid-column: 2 / -1; justify-content: flex-start; }
  .row .rework-note { grid-column: 2 / -1; }
  .day h2 { top: 96px; }
  .fab { display: inline-flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .modal-wrap { padding: 0; place-items: end stretch; }
  .modal { border-radius: 14px 14px 0 0; max-height: 94dvh; width: 100%; }
  .drawer-scroll { padding: 14px 16px 20px; }
  .selbar { bottom: 82px; }
  .me-btn .who-name { display: none; }
}
