/* Shot Review — one dark theme on purpose: a neutral grey surround so picture colour reads true.
   Layout: sidebar (projects + sections) | main. The review screen goes full width: picture + notes rail. */
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(/fonts/barlow-condensed-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url(/fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url(/fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url(/fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #141517; --panel: #1b1c1f; --raise: #232428; --raise-2: #2a2c31; --sunk: #0d0e0f;
  --line: #2b2d32; --line-2: #3a3d43;
  --fg: #e7e5e0; --muted: #a2a4aa; --faint: #74777d;
  --accent: #f0ad3a; --accent-ink: #1a1305;
  --review: #7ea6dc; --changes: #e86a52; --approved: #5fbf83;
  --danger: #e86a52;
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 6px;
  --side: 236px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
.col { display: flex; flex-direction: column; min-height: 0; min-width: 0; height: 100%; }
a.btn { text-decoration: none; color: var(--fg); }
a.btn.primary { color: var(--accent-ink); }
body { background: var(--bg); color: var(--fg); font: 14px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.boot { display: grid; place-items: center; height: 100%; color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons & fields ---------- */
.btn { border: 1px solid var(--line-2); background: var(--raise); border-radius: var(--r); padding: 7px 13px; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; min-height: 34px; }
.btn:hover:not(:disabled) { border-color: var(--faint); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #1a0703; font-weight: 600; }
.btn.sm { padding: 4px 10px; font-size: 12px; min-height: 28px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; flex: none; }
.linkbtn { background: none; border: 0; padding: 3px 5px; color: var(--muted); font-size: 12px; border-radius: 4px; }
.linkbtn:hover { color: var(--fg); background: var(--raise); }
.linkbtn.warn { color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; color: var(--muted); }
.field small { color: var(--faint); font-size: 11.5px; }
.input, .field input, .field select, .field textarea { background: var(--sunk); border: 1px solid var(--line-2); border-radius: var(--r); padding: 9px 11px; width: 100%; min-height: 38px; }
.field textarea { resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--faint); outline: none; }
.err { color: var(--danger); font-size: 12.5px; min-height: 1.2em; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }

/* ---------- sign-in screens ---------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); }
.gate-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.gate-card.wide { max-width: 520px; }
.gate-brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .03em; }
.gate-brand svg { width: 28px; height: 28px; flex: none; }
.gate-card h1 { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.05; margin: 4px 0 0; text-wrap: balance; }
.gate-card p { margin: 0; color: var(--muted); }
.gate-card form { display: flex; flex-direction: column; gap: 14px; }
.qr { background: #fff; border-radius: 8px; padding: 10px; width: 196px; height: 196px; display: grid; place-items: center; align-self: center; }
.qr img { width: 176px; height: 176px; image-rendering: pixelated; }
.secret { font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-family: var(--f-mono); font-size: 14px; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; user-select: all; }
.code-input { font-family: var(--f-mono); font-size: 22px !important; letter-spacing: .3em; text-align: center; }

/* ---------- shell ---------- */
.shell { height: 100%; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 14px 12px max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); gap: 6px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--f-display); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px 10px; }
.brand svg { width: 22px; height: 22px; }
.proj-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--raise); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 10px; }
.proj-btn .sw { width: 30px; height: 30px; border-radius: 7px; flex: none; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 15px; color: var(--accent-ink); background: var(--accent); }
.proj-btn .t { min-width: 0; flex: 1; }
.proj-btn .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-btn .t small { color: var(--faint); font-size: 11.5px; }
.proj-btn svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.menu { position: absolute; z-index: 40; background: var(--raise); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px; min-width: 210px; box-shadow: 0 10px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.menu button { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 5px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.menu button:hover, .menu button[aria-current="true"] { background: var(--raise-2); }
.menu small { color: var(--faint); font-family: var(--f-mono); font-size: 11px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav a:hover { background: var(--raise); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--raise); color: var(--fg); }
.nav a .n { margin-left: auto; font-family: var(--f-mono); font-size: 11px; color: var(--faint); }
.nav-h { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); padding: 14px 10px 4px; }
.side .grow { flex: 1; }
.meter { padding: 10px; font-size: 11.5px; color: var(--faint); display: flex; flex-direction: column; gap: 6px; }
.meter .bar { height: 4px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--muted); }
.meter .bar i.low { background: var(--danger); }
.me-btn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; background: none; border: 0; text-align: left; width: 100%; color: var(--muted); }
.me-btn:hover { background: var(--raise); color: var(--fg); }
.av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; color: #111; }
.main { min-width: 0; min-height: 0; overflow: auto; position: relative; flex: 1; }
.shell.full { grid-template-columns: minmax(0, 1fr); }
.shell.full .side, .shell.full .mob-top { display: none; }
.shell.full .main { overflow: hidden; display: flex; flex-direction: column; }
.shell.full .review { flex: 1; min-height: 0; height: auto; }
.mob-top { display: none; }
.page { padding: 22px max(28px, env(safe-area-inset-right)) 40px 28px; max-width: 1500px; }
.page-h { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin-bottom: 18px; }
.page-h .titles { flex: 1 1 260px; min-width: 0; }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.page-h h1 { font-family: var(--f-display); font-weight: 700; font-size: 34px; line-height: 1; margin: 3px 0 0; text-wrap: balance; }
.page-h .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 1px solid var(--line-2); background: transparent; border-radius: 20px; padding: 4px 12px; font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.chip i { width: 7px; height: 7px; border-radius: 50%; }
.chip .n { font-family: var(--f-mono); font-size: 11px; color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--raise); color: var(--fg); border-color: var(--faint); }
.search { margin-left: auto; position: relative; }
.search input { background: var(--sunk); border: 1px solid var(--line-2); border-radius: 20px; padding: 6px 12px 6px 32px; width: 220px; font-size: 13px; }
.search svg { position: absolute; left: 10px; top: 8px; width: 15px; height: 15px; color: var(--faint); }

/* ---------- shot grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; color: inherit; text-decoration: none; }
.card:hover { border-color: var(--line-2); background: var(--raise); }
.card:hover .thumb img { filter: brightness(1.06); }
.thumb { aspect-ratio: 16 / 9; background: var(--sunk); position: relative; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb .ph { font-family: var(--f-display); font-weight: 600; font-size: 22px; color: var(--faint); letter-spacing: .05em; }
.thumb .ver { position: absolute; right: 8px; bottom: 8px; font-family: var(--f-mono); font-size: 11px; background: rgba(0,0,0,.65); color: #fff; padding: 1px 6px; border-radius: 3px; }
.thumb .dur { position: absolute; left: 8px; bottom: 8px; font-family: var(--f-mono); font-size: 11px; background: rgba(0,0,0,.65); color: #fff; padding: 1px 6px; border-radius: 3px; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.card .row1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.card .code { font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: .03em; line-height: 1.1; white-space: nowrap; }
.card .nm { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card .row2 { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.card .open { color: var(--accent); font-weight: 500; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; padding: 2px 9px 2px 7px; border-radius: 20px; background: var(--raise-2); color: var(--fg); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; }
.st-review i, i.st-review { background: var(--review); }
.st-changes i, i.st-changes { background: var(--changes); }
.st-approved i, i.st-approved { background: var(--approved); }
.drop-hint { border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 44px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.drop-hint b { color: var(--fg); font-size: 16px; font-weight: 600; }
.drop-hint svg { width: 40px; height: 40px; color: var(--faint); }
.dropping::after { content: "Drop an MP4 to add it"; position: fixed; inset: 10px; border: 2px dashed var(--accent); border-radius: 14px; background: rgba(20, 21, 23, .82); display: grid; place-items: center; font-family: var(--f-display); font-size: 30px; font-weight: 700; color: var(--accent); z-index: 50; pointer-events: none; }

/* ---------- review ---------- */
.review { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 372px; grid-template-rows: auto minmax(0, 1fr); }
.rv-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 10px max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--panel); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; padding: 5px 8px; border-radius: 6px; }
.back:hover { background: var(--raise); color: var(--fg); }
.back svg { width: 15px; height: 15px; }
.rv-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1 1 220px; }
.rv-title h1 { font-family: var(--f-display); font-weight: 700; font-size: 26px; margin: 0; line-height: 1; white-space: nowrap; }
.rv-title span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select.sel { background: var(--raise); border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px 10px; font-size: 13px; min-height: 34px; }
.status { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.status button { background: transparent; border: 0; padding: 6px 11px; font-size: 12px; font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 6px; border-right: 1px solid var(--line); min-height: 32px; }
.status button:last-child { border-right: 0; }
.status button i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.status button[aria-pressed="true"] { color: var(--fg); background: var(--raise); }
.status button[aria-pressed="true"][data-s="review"] i { background: var(--review); }
.status button[aria-pressed="true"][data-s="changes"] i { background: var(--changes); }
.status button[aria-pressed="true"][data-s="approved"] i { background: var(--approved); }
.status button:disabled { cursor: default; }

.stage { min-width: 0; min-height: 0; overflow: auto; padding: 16px 18px 28px max(18px, env(safe-area-inset-left)); }
.frame { position: relative; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; width: 100%; aspect-ratio: 16 / 9; max-height: 64vh; margin-inline: auto; }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
.frame.drawing canvas { pointer-events: auto; cursor: crosshair; }
.frame.drawing { outline: 2px solid var(--accent); outline-offset: -2px; }
.frame .msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--muted); background: var(--sunk); font-size: 13px; }
.frame .burn { position: absolute; left: 10px; top: 8px; font-family: var(--f-mono); font-size: 11px; color: #fff; background: rgba(0,0,0,.55); padding: 2px 6px; border-radius: 3px; pointer-events: none; }
.transport { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-top: 10px; }
.tbtns { display: flex; gap: 4px; }
.ic { width: 36px; height: 36px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--raise); display: grid; place-items: center; padding: 0; }
.ic svg { width: 16px; height: 16px; fill: currentColor; }
.ic[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.track { position: relative; height: 36px; cursor: pointer; touch-action: none; }
.track .bar0 { position: absolute; left: 0; right: 0; top: 16px; height: 4px; background: var(--line-2); border-radius: 2px; }
.track .fill { position: absolute; left: 0; top: 16px; height: 4px; background: var(--fg); border-radius: 2px; width: 0; }
.track .head { position: absolute; top: 6px; width: 2px; height: 24px; background: var(--fg); transform: translateX(-1px); pointer-events: none; }
.mk { position: absolute; top: 0; width: 14px; height: 14px; transform: translateX(-7px); border: 0; padding: 0; background: transparent; }
.mk::after { content: ""; position: absolute; left: 3px; top: 2px; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); border-radius: 1px; }
.mk.res::after { background: var(--faint); }
.mk.on::after { box-shadow: 0 0 0 2px var(--fg); }
.readout { text-align: right; line-height: 1.15; min-width: 92px; }
.readout .fr { font-family: var(--f-mono); font-size: 18px; font-weight: 500; }
.readout .tc { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.hint { font-size: 11.5px; color: var(--faint); margin-top: 7px; }
kbd { font-family: var(--f-mono); font-size: 10.5px; border: 1px solid var(--line-2); border-radius: 3px; padding: 0 4px; }
.info { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px 32px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.info p { margin: 4px 0 0; max-width: 68ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.info p.none { color: var(--faint); }
.info .full { grid-column: 1 / -1; }
.vlist { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 4px; }
.vitem { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px; width: 280px; flex: none; }
.vitem:hover { border-color: var(--line-2); }
.vitem[aria-current="true"] { border-color: var(--accent); background: var(--raise); }
.vthumb { width: 88px; aspect-ratio: 16 / 9; background: var(--sunk); border-radius: 4px; overflow: hidden; position: relative; flex: none; display: grid; place-items: center; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb .vn { position: absolute; left: 4px; bottom: 3px; font-family: var(--f-mono); font-size: 10.5px; background: rgba(0,0,0,.65); color: #fff; padding: 0 4px; border-radius: 3px; }
.vmeta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vmeta b { font-weight: 600; font-size: 13px; }
.vmeta small { color: var(--faint); font-size: 11.5px; }
.vmeta .vnote { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin: 4px 0 0; }
.specs dt { color: var(--faint); font-size: 13px; }
.specs dd { margin: 0; font-family: var(--f-mono); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.rail { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.rail-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; }
.rail-h h2 { font-family: var(--f-display); font-weight: 600; font-size: 16px; text-transform: uppercase; letter-spacing: .08em; margin: 0; color: var(--muted); }
.rail-h .count { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.rail-h .grow { flex: 1; }
.notes { list-style: none; margin: 0; padding: 0 12px 12px 16px; overflow: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.note { border: 1px solid var(--line); background: var(--bg); border-radius: var(--r); padding: 10px 12px; }
.note.on { border-color: var(--accent); }
.note.resolved { opacity: .62; }
.nh { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-width: 0; }
.nh b { color: var(--fg); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nh .av { width: 20px; height: 20px; font-size: 9.5px; }
.nh .when { margin-left: auto; color: var(--faint); font-size: 11px; white-space: nowrap; }
.stamp { font-family: var(--f-mono); font-size: 11px; background: rgba(240, 173, 58, .16); color: var(--accent); border: 0; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.stamp.general { background: var(--raise); color: var(--muted); }
.note .text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note .text.gone { color: var(--faint); font-style: italic; }
.note .edited { color: var(--faint); font-size: 11px; }
.note .drew { color: var(--accent); }
.nf { display: flex; align-items: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.res-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; margin-right: auto; }
.res-toggle input { accent-color: var(--approved); margin: 0; }
.replies { list-style: none; margin: 8px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.inline-edit { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
textarea.ta { width: 100%; resize: vertical; min-height: 40px; background: var(--sunk); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 10px; line-height: 1.4; }
textarea.ta:focus { outline: none; border-color: var(--faint); }
.empty { color: var(--muted); font-size: 13px; padding: 18px 4px; line-height: 1.5; }
.empty b { color: var(--fg); font-weight: 600; display: block; margin-bottom: 3px; }
.composer { border-top: 1px solid var(--line); padding: 12px 16px max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.composer .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.composer .grow { flex: 1; }
label.pin { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
label.pin input { accent-color: var(--accent); margin: 0; }
.swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.swatch[aria-pressed="true"] { border-color: var(--fg); }

/* ---------- tables & lists (people, activity, deleted) ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-family: var(--f-display); font-weight: 600; font-size: 20px; margin: 0 0 12px; }
.panel p.lead { margin: -4px 0 14px; color: var(--muted); max-width: 70ch; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 500; color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num { font-family: var(--f-mono); font-size: 12px; white-space: nowrap; color: var(--muted); }
.person { display: flex; gap: 10px; align-items: center; }
.person b { font-weight: 600; display: block; }
.person small { color: var(--faint); }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--line-2); border-radius: 20px; padding: 1px 8px; color: var(--muted); white-space: nowrap; }
.tag.off { color: var(--danger); border-color: var(--danger); }
.stack { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.link-box { display: flex; gap: 8px; align-items: stretch; }
.link-box input { flex: 1; font-family: var(--f-mono); font-size: 12px; }
.row-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- modal & toast ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .62); display: flex; align-items: flex-start; justify-content: center; padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left)); overflow: auto; z-index: 60; }
.sheet { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; width: 100%; max-width: 580px; padding: 22px; margin-top: 4vh; }
.sheet h3 { font-family: var(--f-display); font-size: 26px; font-weight: 700; margin: 0 0 16px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .full { grid-column: 1 / -1; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 18px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.drop:hover { border-color: var(--faint); }
.drop.has { border-style: solid; color: var(--fg); }
.drop input { display: none; }
.drop svg { width: 26px; height: 26px; color: var(--faint); display: block; }
.drop small { color: var(--faint); }
.sheet .foot { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.sheet .foot .grow { flex: 1; }
.progress { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.progress .bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--raise); border: 1px solid var(--line-2); padding: 9px 15px; border-radius: var(--r); font-size: 13px; z-index: 80; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.err { border-color: var(--danger); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .review { grid-template-columns: minmax(0, 1fr) 320px; }
  .info { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 70; transform: translateX(-102%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.5); padding-top: max(14px, env(safe-area-inset-top)); }
  .shell.open .side { transform: none; }
  .shell.open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 65; }
  .mob-top { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--panel); }
  .mob-top b { font-family: var(--f-display); font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page { padding: 18px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); }
  .page-h h1 { font-size: 28px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .review, .shell.full .review { display: block; height: auto; flex: none; }
  .shell.full .main { overflow: auto; display: block; }
  .stage { overflow: visible; padding: 14px max(16px, env(safe-area-inset-right)) 18px max(16px, env(safe-area-inset-left)); }
  .rail { border-left: 0; border-top: 1px solid var(--line); }
  .notes { overflow: visible; }
  .transport { grid-template-columns: 1fr auto; }
  .transport .track { grid-column: 1 / -1; order: -1; }
  .form, .two { grid-template-columns: 1fr; }
  .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
