:root {
  --bg: #0d0e11;
  --panel: #14161b;
  --panel-2: #1a1c23;
  --line: #262932;
  --text: #eceef3;
  --muted: #8b90a0;
  --accent: #0072ce;           /* Blazer Blue */
  --accent-hover: #1685e0;
  --accent-soft: rgba(0, 114, 206, 0.2);
  --accent-line: rgba(0, 114, 206, 0.55);
  --accent-ink: #d6eafb;       /* light text that sits on the accent tints */
  --vp: #0072ce;
  --nw: #a73a64;               /* Noteworthy raspberry */
  --all: #a3a8b8;
  --good: #35c486;
  --danger: #ff5d6c;
  --radius: 10px;
  color-scheme: dark;
}
/* Noteworthy login: raspberry accent and neutral (not blue-tinted) darks */
:root[data-role="NW"] {
  --bg: #0f0e10;
  --panel: #161417;
  --panel-2: #1e1c20;
  --line: #2b282d;
  --muted: #958f97;
  --accent: #a73a64;
  --accent-hover: #bd4a76;
  --accent-soft: rgba(167, 58, 100, 0.24);
  --accent-line: rgba(167, 58, 100, 0.65);
  --accent-ink: #f7dfe9;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.error { color: var(--danger); margin: 0; min-height: 1.2em; font-size: 13px; }
.small-text { font-size: 12px; margin: 2px 0 8px; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; display: block; }

/* ---------- Buttons & inputs ---------- */
.btn {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 14px; font-weight: 600; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--panel-2); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.icon-btn { background: none; border: 0; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--panel-2); }
.icon-btn svg { width: 22px; height: 22px; fill: var(--text); }
.icon-btn svg.stroke { fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn:disabled:hover { background: none; }
.text-btn { background: none; border: 0; color: var(--muted); padding: 5px 8px; border-radius: 6px; font-weight: 600; }
.text-btn:hover { color: var(--text); background: var(--panel-2); }
input[type=text], input[type=password], textarea, select {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%;
}
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
select { width: auto; padding-right: 26px; }

/* ---------- Gate ---------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.gate-card { width: 100%; max-width: 340px; display: grid; gap: 12px; text-align: center; }
.gate-card .logo { justify-content: center; font-size: 22px; }
.gate-card p { margin: 0; }

/* ---------- Top bar ---------- */
.app { height: 100%; display: flex; flex-direction: column; }
.topbar {
  height: 54px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 18px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.logo-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--accent); position: relative; display: inline-block; }
.logo-mark::after { content: ""; position: absolute; left: 9px; top: 6.5px; border-left: 8px solid #fff; border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; }
.show-pick { display: flex; align-items: center; gap: 16px; min-width: 0; } /* same gap after the logo and between title and date */
.show-title { font-weight: 600; font-size: 15px; white-space: nowrap; }
.show-pick select:focus-visible { outline-offset: -2px; }
.show-pick select { background: transparent; border-color: transparent; font-weight: 600; font-size: 15px; padding-left: 6px; }
.show-pick select:hover { background: var(--panel-2); }
.show-pick select option { background: var(--panel); }
.show-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 8px 4px 4px; border-radius: 999px; }
.who:hover { background: var(--panel-2); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
  display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex: none;
}
/* profile icon by login: Blazer Blue = VP, raspberry = NW, gold = Carson (admin) */
.avatar.av-vp { background: #0072ce; color: #fff; }
.avatar.av-nw { background: #a73a64; color: #fff; }
.avatar.av-admin { background: #ffcc44; color: #2a2000; }
.avatar.sm { width: 20px; height: 20px; font-size: 10px; align-self: center; }

/* ---------- Layout ---------- */
.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.stage { padding: 18px 22px; overflow-y: auto; min-width: 0; }
.panel { border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; position: relative; }

/* ---------- Player ---------- */
.player { touch-action: manipulation; position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.big-play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%;
  background: rgba(13, 14, 17, .72); border: 1px solid rgba(255,255,255,.25);
  display: grid; place-items: center; transition: opacity .15s;
}
.big-play svg { width: 34px; height: 34px; fill: #fff; margin: 0; } /* the triangle's weight already sits centered in its box */
.big-play:hover { background: rgba(13, 14, 17, .9); }
.player.playing .big-play, .player.stepping .big-play { opacity: 0; pointer-events: none; }
.video-error { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: rgba(0,0,0,.7); }

.controls { margin-top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px 8px; }
.control-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.time { font-variant-numeric: tabular-nums; margin: 0 8px 0 2px; white-space: nowrap; }
.chapter-now { font-weight: 600; padding: 2px 0; max-width: 36ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mixer: choices fold out to the left of the icon */
.mixer { display: flex; align-items: center; }
.mixer-options { display: none; gap: 2px; position: relative; }
.mixer.open .mixer-options { display: flex; margin-right: 4px; animation: mix-in .16s ease-out; }
@keyframes mix-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.mixer.open #mixer-btn { background: var(--accent); }
.mix-btn { background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mix-btn:hover { color: var(--text); }
/* the gray highlight is its own element that glides from one button to the next */
.mix-ind { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 7px; background: #5d6273; pointer-events: none; opacity: 0;
  transition: transform .11s cubic-bezier(.3, .7, .2, 1), width .11s cubic-bezier(.3, .7, .2, 1); }
.mix-ind.still { transition: none; }
.mix-btn { position: relative; z-index: 1; background: transparent; border-color: transparent; transition: color .1s; } /* no outlines, so nothing cuts across the sliding highlight */
.mix-btn.on { background: transparent; border-color: transparent; color: #fff; }
.mix-btn:not(.on):hover { background: var(--panel-2); }
.mix-note { margin: 6px 2px 0; font-size: 12px; color: #e6c46a; }

/* ---------- Scrubber (chapters live here) ---------- */
.scrub-wrap { padding: 4px 11px 0 13px; } /* the bar runs from the play icon to the fullscreen icon, not out to the card edges */
.scrub { position: relative; height: 38px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline-offset: 0; }
.scrub-track { position: absolute; left: 0; right: 0; bottom: 10px; height: 6px; background: var(--line); border-radius: 3px; }
.scrub:not(.has-chapters):hover .scrub-track, .scrub:not(.has-chapters).active .scrub-track { height: 8px; bottom: 9px; }
.scrub-buffer { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: rgba(255,255,255,.18); width: 0; }
.scrub-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); width: 0; }
.scrub-chapters { position: absolute; inset: 0; pointer-events: none; }
.scrub-chapters.dim { opacity: .3; transition: opacity .15s; }
.scrub.colors .scrub-chapters.dim { opacity: .42; }
.scrub.has-chapters .scrub-fill, .scrub.has-chapters .scrub-buffer { display: none; }
.scrub-chapters i { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--panel); z-index: 1; }
.seg { position: absolute; top: 0; bottom: 0; background: var(--gray); transition: top .12s, bottom .12s, background-color .15s; }
:root { --gray: #a3a8b6; }
.seg.talkie { background: color-mix(in srgb, var(--gray) 55%, #000); }
.seg.vp { --c: #0072ce; }   /* VP on stage: Blazer Blue */
.seg.nw { --c: #a73a64; }   /* NW on stage: raspberry */
.seg.both { --c: #8b90a0; } /* both groups on stage */
.scrub.colors .seg { background: var(--c); }
.scrub.colors .seg.talkie { background: color-mix(in srgb, var(--c) 42%, #000); }
.scrub-hot { position: absolute; left: 0; right: 0; bottom: 10px; height: 6px; z-index: 3; pointer-events: none; } /* above the playhead, below the comment markers */
.scrub-hot .seg.hot { top: -6px; bottom: -6px; border-radius: 3px; opacity: 1; /* a little taller than the playhead so it hides it completely */
  transition: top .14s ease-out, bottom .14s ease-out, left .14s ease-out, width .14s ease-out, opacity .12s, background-color .14s; }
.scrub-hot .seg.hot.off { top: 0; bottom: 0; opacity: 0; border-radius: 0; }
.scrub-hot .seg.hot.snap { transition: none; }
.seg:first-of-type { border-radius: 3px 0 0 3px; }
.scrub-thumb { position: absolute; bottom: 6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); left: 0; }
.scrub-tip { position: absolute; bottom: 26px; transform: translateX(-50%); background: #000; border: 1px solid var(--line); padding: 3px 9px; border-radius: 8px; font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; z-index: 3; text-align: center; }
.scrub-tip .tip-title { display: block; font-weight: 600; }
.scrub-tip .tip-time { color: var(--muted); display: block; }
.scrub-tip.touch { bottom: 56px; padding: 8px 14px; font-size: 15px; border-color: var(--accent); background: rgba(13,14,17,.96); }
.scrub-tip.touch .tip-time { font-size: 20px; font-weight: 700; color: var(--text); }
.scrub-markers { position: absolute; left: 0; right: 0; top: 0; height: 22px; z-index: 4; pointer-events: none; } /* above the playhead */
/* Comment marker: a rounded tag that points down at the moment it belongs to (outer = dark outline, inner = color) */
.marker {
  --shape: polygon(0 12%, 12% 0, 88% 0, 100% 12%, 100% 62%, 50% 100%, 0 62%);
  --mc: var(--all);
  position: absolute; bottom: 0; width: 16px; height: 19px; margin-left: -8px; padding: 0; border: 0;
  background: var(--bg); clip-path: var(--shape); cursor: pointer; pointer-events: auto; transition: transform .1s; transform-origin: 50% 100%;
}
.marker::after { content: ""; position: absolute; inset: 2px; background: var(--mc); clip-path: var(--shape); }
.marker:hover { transform: scale(1.3); z-index: 2; }
.marker.vp { --mc: var(--vp); }
.marker.nw { --mc: var(--nw); }
.marker.both::after { background: linear-gradient(90deg, var(--vp) 50%, var(--nw) 50%); }
.marker.now, .marker.sel { background: #fff; }

/* ---------- Composer (sits under the video) ---------- */
.composer { margin-top: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.composer-top { display: flex; gap: 10px; align-items: center; }
.composer textarea { resize: none; min-height: 38px; max-height: 160px; line-height: 1.4; }
/* focus fades and glows in on click, and back out when you leave (instead of a ring that just appears) */
.composer textarea { box-shadow: 0 0 0 0 transparent; transition: border-color .2s ease, box-shadow .22s ease, background-color .2s ease; }
.composer textarea:focus { outline: none; border-color: var(--accent); background-color: rgba(255,255,255,.06); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer-more { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .24s cubic-bezier(.2, .8, .25, 1), opacity .18s ease; }
.composer-more.open { grid-template-rows: 1fr; opacity: 1; }
.more-inner { overflow: hidden; min-height: 0; }
.more-inner > :first-child { margin-top: 10px; } /* margin, not padding, so the closed section is truly zero height */
@media (prefers-reduced-motion: reduce) { .composer-more { transition: none; } }
.composer-more .row { gap: 6px; }
.clock { width: 16px; height: 16px; fill: var(--muted); flex: none; }
input.note-time { width: 3.2em; background: none; border: 0; border-bottom: 1px dashed transparent; border-radius: 0; padding: 2px 0; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
input.note-time[readonly] { cursor: default; }
input.note-time:not([readonly]) { border-bottom-color: var(--muted); cursor: text; }
input.note-time:focus { outline: none; border-bottom-color: var(--accent); }
input.note-time.bad { border-bottom-color: var(--danger); }
.use-current { margin-left: 2px; gap: 9px; }
.auto-hint { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); }

/* ---------- Key commands (? button + card, bottom right of the video side) ---------- */
.help { position: fixed; right: 438px; bottom: 18px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.help-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-weight: 700; font-size: 16px; line-height: 1; display: grid; place-items: center; }
.help-btn:hover, .help-btn[aria-expanded=true] { color: #fff; border-color: var(--muted); }
.help-btn[aria-expanded=true] { background: var(--accent); border-color: var(--accent); }
.help-card { width: 290px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; box-shadow: 0 12px 36px rgba(0,0,0,.55); }
.help-title { font-weight: 700; margin-bottom: 8px; }
.keys { margin: 0; font-size: 12.5px; display: grid; gap: 5px; }
.keys > div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.keys dt { color: var(--text); font-weight: 600; }
.keys dd { margin: 0; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.chip {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); border-radius: 999px;
  padding: 3px 10px; font-size: 12.5px; font-weight: 600; line-height: 1.5;
}
.chip:hover { color: var(--text); }
.chip.on { color: #fff; border-color: transparent; background: var(--all); }
.chip.on.vp { background: var(--vp); }
.chip.on.nw { background: var(--nw); }
.chip.on.all { background: #5d6273; }

/* ---------- Filter bar ---------- */
.filters { display: flex; align-items: center; gap: 6px; padding: 8px 12px 6px 16px; position: relative; }
#filter-btn.on { background: var(--accent-soft); }
.filter-chip { display: inline-flex; align-items: center; background: var(--accent); color: #fff; border-radius: 999px; font-weight: 600; font-size: 13px; overflow: hidden; }
.filter-label { padding: 4px 4px 4px 12px; cursor: pointer; }
.filter-clear { background: none; border: 0; color: #fff; font-size: 17px; line-height: 1; padding: 4px 10px 5px 4px; opacity: .85; }
.filter-clear:hover { opacity: 1; }
.show-resolved svg { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.show-resolved:hover svg, .show-resolved[aria-pressed=true] svg { stroke: var(--text); }
.show-resolved[aria-pressed=true] .eye-slash { display: none; }
.show-resolved[aria-pressed=false] .eye-open { display: none; }
.icon-btn svg.stroke { fill: none; }
.copy-btn svg { fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-btn svg.check { display: none; stroke: var(--good); }
.copy-btn.done svg.copy { display: none; }
.copy-btn.done svg.check { display: block; }
.count { padding: 0 16px 8px; font-size: 12px; margin: 0; }

.filter-pop {
  position: absolute; left: 12px; right: 12px; top: calc(100% - 2px); z-index: 20; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.55);
  max-height: min(70vh, 460px); overflow-y: auto;
}
.tile-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.tile-label:first-child { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 8px; font-weight: 600; font-size: 13px; text-align: center; }
.tile:hover { border-color: var(--muted); }
.tile.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile small { display: block; font-weight: 500; font-size: 11px; opacity: .75; }

/* ---------- Comment list ---------- */
.list { list-style: none; margin: 0; padding: 0 0 24px; overflow-y: auto; flex: 1; min-height: 0; border-top: 1px solid var(--line); }
.empty { padding: 28px 20px; text-align: center; }
.c { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: relative; }
.c:hover { background: rgba(255,255,255,.045); }
.c.now { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.c.sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px var(--accent-line); }
.c.resolved .c-body { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(139,144,160,.5); }
.c-check { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 1px 0 0; border: 2px solid #4a4f5e; border-radius: 6px; cursor: pointer; display: grid; place-items: center; background: transparent; }
.c-check:hover { border-color: var(--good); }
.c-check:checked { background: var(--good); border-color: var(--good); }
.c-check:checked::after { content: ""; width: 5px; height: 9px; border: solid #06241a; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.c-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.c-time { background: var(--accent-soft); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 1px 9px; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.c-time:hover { background: var(--accent-line); }
.c-author { font-weight: 600; }
.c-when { color: var(--muted); font-size: 12px; }
.c-body { margin: 4px 0 0; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; cursor: pointer; }
.c-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 0 0 0 auto; justify-content: flex-end; }
.tag { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #3b3f4a; color: #d3d6de; } /* Everyone: gray */
.tag.vp { background: color-mix(in srgb, #0072ce 42%, #000); color: #d6eafb; }  /* VP and VP people: a darker Blazer Blue */
.tag.nw { background: color-mix(in srgb, #a73a64 50%, #000); color: #f7dfe9; }  /* NW and NW people: a darker raspberry */
.c-meta { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.c-actions { position: absolute; top: 8px; right: 12px; display: none; gap: 2px; }
.c:hover .c-main > .c-actions, .c:focus-within .c-main > .c-actions, .reply:hover > .c-actions, .reply:focus-within > .c-actions { display: flex; }

/* reactions + replies */
.c-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.c-react { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.react { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.react:hover { border-color: var(--muted); }
.react.mine { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.react .n { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.react.add { padding: 2px 7px; opacity: 0; transition: opacity .12s; }
.react.add svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.c:hover .react.add, .reply:hover .react.add, .react.add:focus-visible, .c-react:only-child .react.add { opacity: 1; }
@media (hover: none) { .react.add { opacity: 1; } }
.reply-link { background: none; border: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; }
.reply-link:hover { color: var(--text); background: var(--panel-2); }
.replies { margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--line); display: grid; gap: 10px; }
.reply { position: relative; }
.reply .c-head { gap: 7px; }
.reply-body { cursor: default; margin-top: 2px; }
.reply .c-react { margin-top: 5px; }
.reply-box { display: grid; gap: 6px; }
.reply-box textarea { resize: none; }
.react-pop { position: fixed; z-index: 60; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 36px rgba(0,0,0,.55); }
.react-pop button { background: none; border: 0; font-size: 20px; line-height: 1; padding: 6px; border-radius: 8px; }
.react-pop button:hover { background: var(--line); }
.c-actions button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--muted); }
.c-actions button:hover { color: var(--text); }
.c-actions .del:hover { color: var(--danger); }
.c-edit { margin-top: 6px; display: grid; gap: 8px; }
.c-edit .row { flex-wrap: wrap; }
@media (hover: none) { .c-actions { display: flex; position: static; margin-top: 6px; } }

/* ---------- Dialogs & toast ---------- */
.dialog { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 14px; padding: 0; width: min(92vw, 400px); }
.dialog::backdrop { background: rgba(0,0,0,.6); }
.dialog-card { padding: 20px; display: grid; gap: 4px; }
.dialog-card h2 { margin: 0 0 2px; font-size: 18px; }
.dialog-card p { margin: 0 0 8px; }
.dialog-actions { display: flex; gap: 8px; margin-top: 12px; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #fff; color: #111;
  padding: 9px 16px; border-radius: 999px; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.4); z-index: 50;
}

/* ---------- Small screens: stack, keep the video pinned ---------- */
@media (max-width: 920px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100%; }
  .layout { display: block; }
  .stage { padding: 0; overflow: visible; }
  .stage-top { position: sticky; top: 0; z-index: 10; background: var(--bg); }
  .composer { margin: 8px 10px 0; }
  .composer-more.open .more-inner { max-height: 38vh; overflow-y: auto; }
  .player { border-radius: 0; }
  .controls { border-radius: 0; border-left: 0; border-right: 0; margin-top: 0; }
  .scrub { height: 52px; } /* a thumb-sized target */
  .scrub-track { bottom: 14px; height: 8px; }
  .scrub-hot { bottom: 14px; height: 8px; }
  .scrub-thumb { bottom: 8px; width: 18px; height: 18px; margin-left: -9px; }
  .scrub-markers { height: 30px; }
  .help { display: none; } /* no keyboard on a phone */
  .topbar { padding: 0 12px; gap: 8px; }
  .show-sub, .who-name { display: none; }
  .panel { border-left: 0; }
  .list { overflow: visible; }
  .chapter-now { max-width: 18ch; }
  .mix-btn { padding: 6px 9px; }
  .filter-pop { position: fixed; left: 10px; right: 10px; top: auto; bottom: 10px; max-height: 70vh; }
}

/* ---------- Fullscreen (real, or the page-filling stand-in) ---------- */
body.fs-lock { overflow: hidden; }
.stage.pseudo-fs { position: fixed !important; inset: 0; z-index: 200; height: auto; }
.stage.pseudo-fs, .stage:fullscreen { background: var(--bg); padding: 12px; overflow: hidden; display: flex; flex-direction: column; }
.stage.pseudo-fs .player, .stage:fullscreen .player { flex: 1; aspect-ratio: auto; min-height: 0; }
.stage.pseudo-fs .composer, .stage:fullscreen .composer { display: none; }
body.fs-lock .help { display: none; }
.stage.pseudo-fs .stage-top, .stage:fullscreen .stage-top { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.text-btn { white-space: nowrap; }
.composer-more .row { flex-wrap: wrap; }

/* ---------- Volume (shown with the mixer) ---------- */
.vol { display: none; position: relative; }
.mixer.open .vol { display: block; margin-right: 4px; } /* even gap either side of the speaker */
.vol-pop { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 8px; z-index: 20; }
.vol:hover .vol-pop, .vol.dragging .vol-pop { display: block; }
.vol-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; box-shadow: 0 12px 36px rgba(0,0,0,.55); }
.vol-track { position: relative; width: 6px; height: 96px; background: var(--line); border-radius: 3px; cursor: pointer; touch-action: none; }
.vol-track::before { content: ""; position: absolute; inset: 0 -12px; } /* a wider grab area than the bar looks */
.vol-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.vol-thumb { position: absolute; left: 50%; width: 14px; height: 14px; margin: 0 0 -7px -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
#fs-btn.on { background: var(--accent); }
#fs-btn.on svg { fill: #fff; }

/* ---------- Delete confirmation: the note slides left and a red "Delete?" sits where the Delete button was ---------- */
.c, .reply { transition: padding-right .16s ease; }
.c.confirming { padding-right: 92px; }
.c-tags { transition: margin-right .16s ease; }
.c.confirming .c-tags { margin-right: -76px; } /* the note slides left but its tags stay put */
.reply.confirming { padding-right: 80px; }
.c.confirming .c-main > .c-actions, .reply.confirming > .c-actions { display: none !important; }
.del-confirm { position: absolute; top: 8px; right: 12px; height: 26px; padding: 0 12px; background: #c93c4b; color: #fff; border: 0; border-radius: 6px; font-weight: 700; font-size: 12.5px; animation: del-in .14s ease-out; }
.del-confirm:hover { background: #dc4a59; }
@keyframes del-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* ---------- Edit / reply boxes ease in and out ---------- */
.pop { transform-origin: top center; animation: pop-in .2s cubic-bezier(.2, .8, .25, 1); }
.pop.leaving { animation: pop-out .14s ease-in forwards; pointer-events: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px) scale(.98); } }
.c-edit textarea, .reply-box textarea, .c-edit input { box-shadow: 0 0 0 0 transparent; transition: border-color .2s ease, box-shadow .22s ease; }
.c-edit textarea:focus, .reply-box textarea:focus, .c-edit input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { .pop, .pop.leaving { animation: none; } }

/* ---------- Double-tap seek feedback (phones) ---------- */
.tap-fx { position: absolute; top: 50%; transform: translateY(-50%); padding: 14px 18px; border-radius: 999px; background: rgba(13, 14, 17, .72); color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .02em; pointer-events: none; white-space: pre; animation: tap-fx .65s ease-out forwards; }
.tap-fx.left { left: 10%; }
.tap-fx.right { right: 10%; }
@keyframes tap-fx { 0% { opacity: 0; transform: translateY(-50%) scale(.85); } 15% { opacity: 1; transform: translateY(-50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }

/* the timeline never shows a focus box (it is a custom slider, and the browser's default ring looked like a frame around it) */
.scrub:focus, .scrub:focus-visible, .scrub-wrap *:focus, .vol-track:focus, .vol-track:focus-visible { outline: none; }
