:root {
  color-scheme: dark;
  --danger: #ff6464;
  --ok: #3ddc84;
  --radius: 12px;
  --radius-sm: 8px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* ---------- Themes ----------
   Each theme sets the same colour tokens. --grad is for buttons and badges (text sits on it);
   --grad-wide is decorative (lines, timeline fill, logo). */

:root, [data-theme="aurora"] {
  --bg: #07101b;
  --bg-2: #0b1623;
  --stage: #040a11;
  --panel: #0e1a29;
  --panel-2: #132133;
  --raise: #19293d;
  --raise-2: #213349;
  --line: #172638;
  --line-2: #263a52;
  --text: #eaf6ff;
  --text-2: #b3c7db;
  --muted: #7890a8;
  --accent: #2fe6c8;
  --accent-ink: #032620;
  --accent-soft: rgba(47, 230, 200, 0.13);
  --accent-line: rgba(47, 230, 200, 0.45);
  --accent-glow: rgba(47, 230, 200, 0.4);
  --accent-2: #8f7bff;
  --accent-2-soft: rgba(143, 123, 255, 0.16);
  --grad: linear-gradient(135deg, #2fe6c8 0%, #3ea6ff 55%, #8f7bff 100%);
  --on-grad: #061423;
  --grad-wide: linear-gradient(90deg, #2fe6c8 0%, #3ea6ff 50%, #8f7bff 100%);
  --glow-1: rgba(47, 230, 200, 0.18);
  --glow-2: rgba(143, 123, 255, 0.22);
  --logo-a: #2fe6c8;
  --logo-b: #8f7bff;
  --logo-ink: #061423;
}

[data-theme="gold"] {
  --bg: #0b0c0f;
  --bg-2: #101217;
  --stage: #07080a;
  --panel: #14161b;
  --panel-2: #1a1d23;
  --raise: #22262e;
  --raise-2: #2a2f39;
  --line: #23262e;
  --line-2: #313641;
  --text: #eceef2;
  --text-2: #b9bfcb;
  --muted: #7f8696;
  --accent: #ffd23f;
  --accent-ink: #1b1600;
  --accent-soft: rgba(255, 210, 63, 0.12);
  --accent-line: rgba(255, 210, 63, 0.45);
  --accent-glow: rgba(255, 210, 63, 0.4);
  --accent-2: #ff8a5b;
  --accent-2-soft: rgba(255, 138, 91, 0.15);
  --grad: linear-gradient(135deg, #ffe066 0%, #ffc233 55%, #ffa63d 100%);
  --on-grad: #1b1600;
  --grad-wide: linear-gradient(90deg, #ffd23f 0%, #ff9f43 55%, #ff6b8a 100%);
  --glow-1: rgba(255, 194, 51, 0.13);
  --glow-2: rgba(255, 107, 138, 0.09);
  --logo-a: #ffe066;
  --logo-b: #ff9f43;
  --logo-ink: #15130a;
}

[data-theme="sunset"] {
  --bg: #110c18;
  --bg-2: #160f1f;
  --stage: #0a0610;
  --panel: #1a1224;
  --panel-2: #21182e;
  --raise: #2a1f3a;
  --raise-2: #342646;
  --line: #261c33;
  --line-2: #3a2c4c;
  --text: #f7effc;
  --text-2: #cdbddb;
  --muted: #9484a9;
  --accent: #ff5c8a;
  --accent-ink: #2b0716;
  --accent-soft: rgba(255, 92, 138, 0.15);
  --accent-line: rgba(255, 92, 138, 0.5);
  --accent-glow: rgba(255, 92, 138, 0.45);
  --accent-2: #ffaa4d;
  --accent-2-soft: rgba(255, 170, 77, 0.15);
  --grad: linear-gradient(135deg, #f0407a 0%, #a63df0 100%);
  --on-grad: #ffffff;
  --grad-wide: linear-gradient(90deg, #ff9a3d 0%, #ff5c8a 50%, #a95cff 100%);
  --glow-1: rgba(255, 92, 138, 0.24);
  --glow-2: rgba(169, 92, 255, 0.22);
  --logo-a: #ff9a3d;
  --logo-b: #a95cff;
  --logo-ink: #ffffff;
}


[data-theme="neon"] {
  --bg: #08070c;
  --bg-2: #0d0b13;
  --stage: #050408;
  --panel: #121019;
  --panel-2: #18151f;
  --raise: #211d2b;
  --raise-2: #2a2537;
  --line: #1f1b28;
  --line-2: #312b3e;
  --text: #f4f1ff;
  --text-2: #c3bcd6;
  --muted: #8a83a0;
  --accent: #ff3ec8;
  --accent-ink: #2a0222;
  --accent-soft: rgba(255, 62, 200, 0.15);
  --accent-line: rgba(255, 62, 200, 0.5);
  --accent-glow: rgba(255, 62, 200, 0.45);
  --accent-2: #2ef2ff;
  --accent-2-soft: rgba(46, 242, 255, 0.13);
  --grad: linear-gradient(135deg, #e62eb4 0%, #7c3cf0 100%);
  --on-grad: #ffffff;
  --grad-wide: linear-gradient(90deg, #ff3ec8 0%, #9d4dff 50%, #2ef2ff 100%);
  --glow-1: rgba(255, 62, 200, 0.22);
  --glow-2: rgba(46, 242, 255, 0.14);
  --logo-a: #ff3ec8;
  --logo-b: #6a5cff;
  --logo-ink: #ffffff;
}

[data-theme="cobalt"] {
  --bg: #080d1a;
  --bg-2: #0c1324;
  --stage: #050911;
  --panel: #0f172b;
  --panel-2: #141e36;
  --raise: #1b2744;
  --raise-2: #233153;
  --line: #18223b;
  --line-2: #27365a;
  --text: #edf2ff;
  --text-2: #b6c2e0;
  --muted: #7b88aa;
  --accent: #4d8dff;
  --accent-ink: #04102a;
  --accent-soft: rgba(77, 141, 255, 0.16);
  --accent-line: rgba(77, 141, 255, 0.5);
  --accent-glow: rgba(77, 141, 255, 0.45);
  --accent-2: #ff7a59;
  --accent-2-soft: rgba(255, 122, 89, 0.15);
  --grad: linear-gradient(135deg, #3b7bff 0%, #5b4dff 100%);
  --on-grad: #ffffff;
  --grad-wide: linear-gradient(90deg, #4d8dff 0%, #6a5cff 55%, #ff7a59 100%);
  --glow-1: rgba(77, 141, 255, 0.24);
  --glow-2: rgba(255, 122, 89, 0.12);
  --logo-a: #4d8dff;
  --logo-b: #6a5cff;
  --logo-ink: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-line); }

.icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.icon svg { width: 100%; height: 100%; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.hide-sm { display: inline; }
.stack { display: grid; gap: 14px; }

/* ---------- Buttons & inputs ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--raise); color: var(--text);
  font-weight: 550; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, transform 0.06s;
}
.btn:hover:not(:disabled) { background: var(--raise-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08) saturate(1.05); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #1d0505; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--raise); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; height: 40px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2);
  transition: background 0.12s, color 0.12s;
}
.icon-btn:hover:not(:disabled) { background: var(--raise); color: var(--text); }
.icon-btn.small { width: 28px; height: 28px; }
.icon-btn.small .icon { width: 16px; height: 16px; }
.icon-btn.tiny { width: 22px; height: 22px; }
.icon-btn.tiny .icon { width: 13px; height: 13px; }

.link-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 6px; margin-left: -6px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500;
}
.link-btn:hover { color: var(--text); background: var(--raise); }
.link-btn.danger:hover { color: var(--danger); }
.link-btn .icon { width: 14px; height: 14px; }

.input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--text);
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 44px; line-height: 1.45; }

.field { display: grid; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }

select.speed, select.scope {
  height: 30px; padding: 0 8px;
  border: 1px solid var(--line-2); border-radius: 7px;
  background: var(--raise); color: var(--text-2);
  font-size: 12.5px; font-weight: 550;
}

kbd {
  display: inline-block; min-width: 20px; padding: 1px 5px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  background: var(--raise); color: var(--text-2);
  font: 11.5px/1.4 var(--font); text-align: center;
}

/* ---------- Brand ---------- */

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.brand .logo { width: 28px; height: 28px; }
.brand.big { font-size: 20px; }
.brand.big .logo { width: 36px; height: 36px; }

/* ---------- Login ---------- */

.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: min(380px, 100%);
  display: grid; gap: 14px;
  padding: 30px 28px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.login-card .brand { margin-bottom: 2px; }
.form-error { color: var(--danger); font-size: 13px; }
.fine { color: var(--muted); font-size: 12.5px; text-align: center; }

/* ---------- Dashboard ---------- */

.dash { min-height: 100dvh; }
.dash-top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 12, 15, 0.86);
  backdrop-filter: blur(10px);
}
.dash-body { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100dvh - 57px); }
.dash-main { width: 100%; max-width: 1240px; padding: 28px 32px 60px; }
.dash-title { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; min-height: 36px; }

/* Channel sidebar */
.side {
  position: sticky; top: 57px; align-self: start;
  height: calc(100dvh - 57px); overflow-y: auto;
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
}
.side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 8px 10px;
  color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
}
.side-list { display: grid; gap: 2px; }
.side-sep { height: 1px; margin: 8px 10px; background: var(--line); }
.side-item { position: relative; display: flex; align-items: center; border-radius: 9px; }
.side-item:hover { background: var(--raise); }
.side-item.active { background: var(--raise-2); }
.side-link {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text-2); text-align: left; font-weight: 550;
}
.side-item.active .side-link { color: var(--text); }
.side-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.side-more { position: absolute; right: 6px; opacity: 0; background: var(--raise-2); }
.side-item:hover .side-more, .side-more:focus-visible { opacity: 1; }
.side-item:hover .side-count { visibility: hidden; }
.side-add { display: none; }
.side-hint { display: grid; gap: 10px; justify-items: start; margin: 14px 10px 0; color: var(--muted); font-size: 12.5px; }

.ch-avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 24px; height: 24px; border-radius: 7px;
  color: #111; font-size: 12px; font-weight: 800;
}
.ch-avatar.all, .ch-avatar.none { background: var(--raise-2); color: var(--text-2); }
.ch-avatar .icon { width: 14px; height: 14px; }
.ch-avatar.big { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.card-channel { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--text-2); font-size: 12.5px; }

/* Breadcrumb on the review page */
.crumb {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  max-width: 180px; padding: 4px 8px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text-2); font-weight: 550;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.crumb:hover { background: var(--raise); color: var(--text); }
.crumb-sep { color: var(--line-2); }
.dash-title h1 { font-size: 22px; letter-spacing: -0.02em; }
.count-pill { padding: 1px 8px; border-radius: 99px; background: var(--raise); color: var(--text-2); font-size: 12.5px; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 22px 18px; }
.card {
  position: relative; display: block;
  text-decoration: none; border-radius: var(--radius);
  outline-offset: 4px;
}
.thumb {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: #000;
  transition: border-color 0.15s, transform 0.15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover .thumb { border-color: var(--accent-line); transform: translateY(-2px); }
.thumb-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-2); }
.thumb-empty .icon { width: 36px; height: 36px; }
.thumb-badge, .thumb-notes {
  position: absolute; top: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px;
  font-size: 12px; font-weight: 700;
  backdrop-filter: blur(6px);
}
.thumb-badge { left: 8px; background: rgba(0, 0, 0, 0.65); color: #fff; }
.thumb-notes { right: 8px; background: var(--accent); color: var(--accent-ink); }
.thumb-notes .icon { width: 12px; height: 12px; }
.card-body { padding: 10px 2px 0; padding-right: 30px; }
.card-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-more { position: absolute; right: -4px; bottom: 6px; }

.empty-drop {
  grid-column: 1 / -1;
  display: grid; justify-items: center; gap: 8px;
  padding: 70px 24px;
  border: 1.5px dashed var(--line-2); border-radius: 16px;
  background: var(--bg-2); color: var(--text-2); text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.empty-drop:hover { border-color: var(--accent-line); background: var(--panel); }
.empty-drop strong { color: var(--text); font-size: 16px; }
.empty-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: 6px;
  border-radius: 14px; background: var(--accent-soft); color: var(--accent);
}
.empty-icon .icon { width: 24px; height: 24px; }
.empty-icon.ok { background: rgba(61, 220, 132, 0.12); color: var(--ok); }

/* ---------- Review layout ---------- */

.review { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; }
.topbar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.project-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.project-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 4px 8px; border: 0; border-radius: 7px; background: transparent;
  font-weight: 650; font-size: 15px; text-align: left;
}
button.project-name:hover { background: var(--raise); }
.tb-center { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.version-chips {
  display: flex; gap: 4px; padding: 3px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  overflow-x: auto; scrollbar-width: none; max-width: 52vw;
}
.version-chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 28px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--text-2);
  font-weight: 650; font-size: 13px;
}
.chip:hover { background: var(--raise); color: var(--text); }
.chip.on { background: var(--raise-2); border-color: var(--line-2); color: var(--text); }
.chip.failed { color: var(--danger); }
.chip-count {
  min-width: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; line-height: 17px; text-align: center;
}
.chip-flag { color: var(--danger); font-weight: 800; }
.vdot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }

.toggle {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2); font-weight: 600;
}
.toggle .icon { width: 16px; height: 16px; }
.toggle:hover:not(:disabled) { background: var(--raise); color: var(--text); }
.toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.toggle.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.toggle.small .icon { width: 15px; height: 15px; }

.name-btn { padding: 0 8px; }
.avatar {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11.5px; font-weight: 800;
}

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 372px; min-height: 0; }
.stage-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; background: var(--stage); }
.stage {
  display: flex; align-items: center; justify-content: center; column-gap: 16px;
  padding: 18px 20px 12px; min-height: 0; overflow: hidden;
}
.stage-loading { display: grid; place-items: center; }
.stage-empty { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--text-2); padding: 20px; }
.stage-empty h2 { color: var(--text); font-size: 18px; }
.stage-empty .btn { margin-top: 10px; }

/* ---------- Screens ---------- */

.screen { display: flex; flex-direction: column; flex: none; min-width: 0; }
.screen-head {
  display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 2px 6px;
  min-width: 0;
}
.vbadge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 2px 8px; border-radius: 6px;
  background: var(--raise); color: var(--text);
  font-size: 12.5px; font-weight: 700;
}
.screen-label {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 6px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-2); font-size: 13px; text-align: left;
}
.screen-label:hover { background: var(--raise); color: var(--text); }
.screen-label.empty { color: var(--muted); font-style: italic; }
.audio-btn { display: none; }
.screen.multi .audio-btn { display: inline-grid; }
.audio-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }

.screen-box {
  position: relative; overflow: hidden;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 0 0 1px var(--line);
  cursor: crosshair;
  touch-action: manipulation;
  transition: box-shadow 0.15s;
}
.screen.has-audio .screen-box { box-shadow: 0 0 0 2px var(--accent-line); }
.screen-box.composing { box-shadow: 0 0 0 2px var(--accent); }
.screen-box.drawing { touch-action: none; }
.screen-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.screen-box .overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.screen-box .pins { position: absolute; inset: 0; pointer-events: none; }
.screen-placeholder {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 6px;
  padding: 16px; text-align: center;
  background: var(--panel); color: var(--muted); font-size: 12.5px;
  cursor: default;
}
.screen-placeholder strong { color: var(--text); font-size: 14px; }
.screen-placeholder.error strong { color: var(--danger); }

.pin {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  width: 26px; height: 26px; margin: -13px 0 0 -13px; padding: 0;
  border: 2px solid #fff; border-radius: 50% 50% 50% 4px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  transition: transform 0.12s;
}
.pin:hover { transform: scale(1.12); }
.pin.selected { transform: scale(1.18); box-shadow: 0 0 0 4px var(--accent-glow), 0 3px 10px rgba(0, 0, 0, 0.55); }
.pin.resolved { background: #d7dbe3; opacity: 0.8; }
.pin.composing {
  pointer-events: none; background: #fff; color: #000; border-color: var(--accent);
  animation: pulse 1.4s ease-out infinite;
}
.pin.composing .icon { width: 14px; height: 14px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow), 0 3px 10px rgba(0, 0, 0, 0.5); }
  100% { box-shadow: 0 0 0 14px transparent, 0 3px 10px rgba(0, 0, 0, 0.5); }
}

/* Notes shown on the video as their moment plays */
.note-card {
  position: absolute; z-index: 1;
  display: grid; gap: 3px;
  padding: 7px 9px 8px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px;
  background: rgba(12, 13, 16, 0.84); backdrop-filter: blur(8px);
  color: #fff; text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  pointer-events: auto; cursor: pointer;
  animation: card-in 0.18s ease-out;
}
.note-card.above { transform: translateY(-100%); animation-name: card-in-above; }
.note-card:hover { border-color: var(--accent-line); }
.note-card.selected { border-color: var(--accent); }
.note-card.resolved { opacity: 0.7; }
.note-card-head { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; }
.note-card-num {
  display: grid; place-items: center; flex: none;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800;
}
.note-card-author { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--text-2); }
.note-card-replies, .note-card-done { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-size: 11px; }
.note-card-done { color: var(--ok); }
.note-card-replies .icon, .note-card-done .icon { width: 11px; height: 11px; }
.note-card-body {
  font-size: 12.5px; line-height: 1.38; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.card-stack {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  display: grid; gap: 6px; pointer-events: none;
}
.card-stack .note-card { position: static; }
@keyframes card-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes card-in-above { from { opacity: 0; transform: translateY(calc(-100% + 4px)); } }

/* ---------- Transport ---------- */

.transport { padding: 2px 20px 14px; border-top: 1px solid var(--line); background: var(--bg-2); }
.scrub { position: relative; height: 50px; cursor: pointer; touch-action: none; }
.scrub-track {
  position: absolute; left: 0; right: 0; bottom: 10px; height: 4px;
  border-radius: 4px; background: var(--raise-2); overflow: hidden;
  transition: height 0.12s, bottom 0.12s;
}
.scrub:hover .scrub-track, .scrub.active .scrub-track { height: 6px; bottom: 9px; }
.scrub-fill { height: 100%; width: 0; background: var(--accent); }
.scrub-head {
  position: absolute; bottom: 5px; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
  pointer-events: none; z-index: 2;
}

/* Note flags above the timeline */
.scrub-markers { position: absolute; left: 0; right: 0; top: 6px; height: 22px; pointer-events: none; }
.marker {
  position: absolute; top: 0;
  min-width: 20px; height: 20px; padding: 0 5px;
  transform: translateX(-50%);
  border: 1.5px solid var(--bg-2); border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font: 800 10.5px/17px var(--font); text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  transition: transform 0.1s;
}
.marker::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  width: 2px; height: 6px; margin-left: -1px;
  background: inherit; opacity: 0.7;
}
.marker:hover, .marker.selected { transform: translateX(-50%) scale(1.18); z-index: 1; }
.marker.selected { box-shadow: 0 0 0 3px var(--accent-glow), 0 2px 6px rgba(0, 0, 0, 0.45); }
.marker.resolved { opacity: 0.45; }
.scrub-tip {
  position: absolute; bottom: calc(100% - 22px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  pointer-events: none; white-space: nowrap; z-index: 3;
}
.scrub-tip-tc {
  padding: 2px 7px; border-radius: 5px;
  background: #fff; color: #000;
  font: 600 11.5px/1.5 var(--mono);
}
.scrub-tip-frame {
  border-radius: 6px; background-color: #000; background-repeat: no-repeat;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9), 0 6px 18px rgba(0, 0, 0, 0.55);
}
/* Strip frame shown over a video while the timeline is dragged, until the real frame arrives. */
.scrub-frame {
  position: absolute; inset: 0;
  background-color: #000; background-repeat: no-repeat;
  pointer-events: none;
}
.mark-tip {
  position: absolute; bottom: calc(100% - 2px); z-index: 4;
  width: max-content; max-width: min(300px, 100%);
  padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--panel-2);
  box-shadow: var(--shadow);
  pointer-events: none;
}
.mark-tip-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mark-tip-meta .tc { color: var(--accent); font-size: 12px; }
.mark-tip-meta .vbadge { padding: 1px 6px; font-size: 11px; }
.mark-tip-body {
  margin-top: 4px; font-size: 13px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}

.controls { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.ctl-left, .ctl-right { display: flex; align-items: center; gap: 4px; }
.ctl-left { flex: 1; min-width: 0; }
.ctl-right { flex: 1; justify-content: flex-end; gap: 6px; }
.icon-btn.play { width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: #000; }
.icon-btn.play:hover { background: #fff; color: #000; }
.icon-btn.play .icon { width: 18px; height: 18px; }
.tc-wrap { margin-left: 10px; white-space: nowrap; }
.tc { font: 600 13px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.tc.dim { color: var(--muted); font-weight: 500; margin-left: 4px; }
.volume { width: 80px; accent-color: var(--accent); }

.audio-seg {
  display: flex; align-items: center; gap: 3px; padding: 3px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg);
}
.seg-label { padding: 0 6px 0 7px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border: 0; border-radius: 7px; background: transparent;
  color: var(--text-2); font-weight: 650; font-size: 13px;
}
.seg-btn:hover { background: var(--raise); color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- Notes panel ---------- */

.panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--panel); }
.notes-head { padding: 14px 16px 0; border-bottom: 1px solid var(--line); }
.notes-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.notes-title h2 { font-size: 15px; }
.tabs { display: flex; gap: 2px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px 9px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 13px;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab .count { padding: 0 6px; border-radius: 99px; background: var(--raise); font-size: 11.5px; line-height: 17px; color: var(--text-2); }

.notes { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.notes-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 28px; text-align: center; color: var(--text-2); }
.notes-empty strong { color: var(--text); }
.notes-empty p { font-size: 13px; color: var(--muted); }
.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.keys kbd { margin-right: 2px; }

.note {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px;
  padding: 13px 14px 11px 14px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.12s;
}
.note:hover { background: var(--panel-2); }
.note.selected { background: var(--accent-soft); border-left-color: var(--accent); }
.note.resolved .note-body, .note.resolved .note-num { opacity: 0.55; }
.note-num {
  display: grid; place-items: center;
  width: 22px; height: 22px; margin-top: 1px;
  border-radius: 50% 50% 50% 3px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 800;
}
.note.resolved .note-num { background: #d7dbe3; }
.note-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; }
.note-meta .vbadge { padding: 1px 6px; font-size: 11.5px; }
.tc-link {
  padding: 1px 6px; border: 0; border-radius: 5px;
  background: var(--raise); color: var(--accent);
  font: 600 12px/1.5 var(--mono); font-variant-numeric: tabular-nums;
}
.tc-link:hover { background: var(--raise-2); }
.author { font-weight: 650; color: var(--text); }
.ago { color: var(--muted); }
.note-body { margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 13.5px; }
.note-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 7px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 99px;
  background: var(--raise); color: var(--text-2); font-size: 11.5px; font-weight: 600;
}
.tag .icon { width: 12px; height: 12px; }

.check {
  display: grid; place-items: center;
  width: 24px; height: 24px; padding: 0;
  border: 1.5px solid var(--line-2); border-radius: 50%;
  background: transparent; color: transparent;
  transition: all 0.12s;
}
.check .icon { width: 13px; height: 13px; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #04210f; }

.replies { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line-2); display: grid; gap: 10px; }
.reply .note-body { margin-top: 2px; font-size: 13px; }
.reply .icon-btn.tiny { margin-left: auto; opacity: 0; }
.reply:hover .icon-btn.tiny { opacity: 1; }
.reply-box { display: grid; gap: 6px; }
.reply-actions { display: flex; justify-content: flex-end; gap: 6px; }

/* ---------- Composer ---------- */

.composer {
  display: grid; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  box-shadow: inset 3px 0 0 var(--accent);
}
.composer-head { display: flex; align-items: center; gap: 8px; }
.composer-title { font-weight: 700; }
.composer-text { min-height: 74px; }
.draw-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg.tools { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.tool {
  display: grid; place-items: center;
  width: 30px; height: 28px; padding: 0;
  border: 0; border-radius: 7px; background: transparent; color: var(--text-2);
}
.tool .icon { width: 16px; height: 16px; }
.tool:hover { background: var(--raise); color: var(--text); }
.tool[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.swatches { display: flex; gap: 5px; }
.swatch {
  width: 20px; height: 20px; padding: 0;
  border: 2px solid var(--panel-2); border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-2);
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hint { color: var(--muted); font-size: 12.5px; }

/* ---------- Menus, modals, toasts, uploads ---------- */

.menu {
  position: fixed; z-index: 60;
  min-width: 190px; padding: 5px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--panel-2); box-shadow: var(--shadow);
}
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text); text-align: left; font-size: 13.5px;
}
.menu-item .icon { width: 16px; height: 16px; color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--raise); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .icon { color: var(--danger); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px);
  animation: fade 0.12s ease-out;
}
.modal {
  width: min(440px, 100%);
  border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--panel); box-shadow: var(--shadow);
  animation: rise 0.16s ease-out;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 0 20px; }
.modal-head h2 { font-size: 16px; }
.modal-body { padding: 14px 20px 4px; }
.modal-text { color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 20px 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

.file-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line);
}
.file-pill .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-drop {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 18px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--text-2);
}
.file-drop:hover { border-color: var(--accent-line); color: var(--text); }
.file-drop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toasts {
  position: fixed; left: 50%; bottom: 104px; z-index: 70; transform: translateX(-50%);
  display: grid; gap: 8px; justify-items: center; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-radius: 10px;
  background: #f2f3f6; color: #111; font-weight: 550;
  box-shadow: var(--shadow);
  animation: rise 0.18s ease-out;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.error { background: var(--danger); color: #1d0505; }
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-action { border: 0; padding: 4px 10px; border-radius: 7px; background: #111; color: #fff; font-weight: 650; font-size: 13px; }

.upload-tray { position: fixed; left: 16px; bottom: 16px; z-index: 65; display: grid; gap: 8px; width: min(320px, calc(100vw - 32px)); }
.upload-item {
  display: grid; gap: 7px; padding: 11px 12px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--panel-2); box-shadow: var(--shadow);
}
.upload-row { display: flex; align-items: center; gap: 8px; }
.upload-row > .icon { color: var(--accent); width: 16px; height: 16px; }
.upload-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13px; }
.progress { height: 5px; border-radius: 5px; background: var(--raise-2); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.upload-status { color: var(--muted); font-size: 12px; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 55;
  display: grid; place-items: center;
  background: rgba(11, 12, 15, 0.82);
  pointer-events: none;
}
.drop-card {
  display: grid; justify-items: center; gap: 10px;
  padding: 44px 64px; border: 2px dashed var(--accent); border-radius: 20px;
  color: var(--accent); font-size: 17px;
}
.drop-card .icon { width: 34px; height: 34px; }

.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--raise-2); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
.mini-spinner {
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.gone { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.gone-card { display: grid; justify-items: center; gap: 10px; text-align: center; max-width: 380px; color: var(--text-2); }
.gone-card > .icon { width: 30px; height: 30px; color: var(--muted); }
.gone-card h1 { color: var(--text); font-size: 20px; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1100px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .tb-center { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
  .version-chips { max-width: 100%; }
}

@media (max-width: 900px) {
  .review { height: auto; min-height: 100dvh; }
  .workspace { grid-template-columns: 1fr; }
  .stage { height: 64dvh; padding: 12px 16px 8px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .notes { overflow: visible; }
  .transport { padding: 2px 16px 12px; }
  .volume, .speed { display: none; }
  .hide-sm { display: none; }
  .dash-top, .dash-main { padding-left: 16px; padding-right: 16px; }
  .dash-body { grid-template-columns: 1fr; }
  .side {
    position: static; height: auto; overflow: visible;
    padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side-head { display: none; }
  .side-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .side-sep, .side-more, .side-hint p { display: none; }
  .side-hint { margin: 0; }
  .side-item { flex: none; border: 1px solid var(--line-2); }
  .side-item:hover .side-count { visibility: visible; }
  .side-link { padding: 5px 10px 5px 6px; gap: 8px; }
  .crumb, .crumb-sep { display: none; }
  .side-add {
    display: inline-flex; align-items: center; gap: 5px; flex: none;
    padding: 0 12px; border: 1px dashed var(--line-2); border-radius: 9px;
    background: transparent; color: var(--text-2); font-weight: 550;
  }
  .side-add .icon { width: 14px; height: 14px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 12px; }
}

@media (max-width: 560px) {
  .controls { flex-wrap: wrap; row-gap: 8px; }
  .audio-seg { order: 3; width: 100%; justify-content: center; }
  .tc-wrap { margin-left: 4px; }
  .tc.dim { display: none; }
}

/* ---------- Accounts and team ---------- */

.login-title { font-size: 19px; letter-spacing: -0.01em; }
.login-card .stack { gap: 12px; }
.input.mono { font-family: var(--mono); font-size: 12.5px; }
.muted.small, p.small { font-size: 12.5px; }
.warn-text { color: #f5b14c; font-size: 12.5px; }

.dash-top .brand { text-decoration: none; }
.top-nav { display: flex; gap: 2px; margin-left: 18px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px; border-radius: 8px;
  color: var(--text-2); text-decoration: none; font-weight: 600;
}
.nav-link .icon { width: 16px; height: 16px; }
.nav-link:hover { background: var(--raise); color: var(--text); }
.nav-link.active { background: var(--raise-2); color: var(--text); }

.account-btn { gap: 8px; padding: 0 8px 0 5px; }
.account-btn .chev { width: 14px; height: 14px; color: var(--muted); }
.role-badge {
  display: inline-flex; align-items: center; flex: none;
  padding: 1px 8px; border-radius: 99px;
  background: var(--raise-2); color: var(--text-2);
  font-size: 11.5px; font-weight: 700;
}
.role-badge.admin { background: var(--accent-soft); color: var(--accent); }
.guest-tag {
  padding: 0 6px; border-radius: 99px;
  background: rgba(100, 210, 255, 0.14); color: #64d2ff;
  font-size: 10.5px; font-weight: 700; line-height: 17px;
}
.name-btn.static { cursor: default; opacity: 1; }
.name-btn.static:hover { background: transparent; }

.avatar.big { width: 36px; height: 36px; font-size: 15px; }
.avatar.pending { background: var(--raise-2); color: var(--text-2); border: 1.5px dashed var(--line-2); }

.team-main { max-width: 1040px; }
.team-intro { color: var(--muted); margin: -8px 0 18px; max-width: 640px; }
.team-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.team-row {
  display: grid; grid-template-columns: auto minmax(160px, 1.3fr) auto minmax(140px, 1.6fr) minmax(110px, 0.8fr) auto;
  align-items: center; gap: 14px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.team-row:last-child { border-bottom: 0; }
.team-who { min-width: 0; }
.team-name { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.team-email { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you-tag { padding: 0 6px; border-radius: 99px; background: var(--raise-2); color: var(--text-2); font-size: 10.5px; font-weight: 700; line-height: 17px; }
.team-channels { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.ch-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px 2px 3px; border-radius: 99px;
  background: var(--raise); color: var(--text-2); font-size: 12px; font-weight: 600;
}
.ch-avatar.small { width: 18px; height: 18px; border-radius: 5px; font-size: 10px; }
.team-status { color: var(--muted); font-size: 12.5px; }
.team-status.pending { color: #f5b14c; }

.role-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg-option {
  display: grid; gap: 2px; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--text);
}
.seg-option span { color: var(--muted); font-size: 12.5px; }
.seg-option:hover { border-color: var(--text-2); }
.seg-option[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.check-list {
  display: grid; gap: 2px; max-height: 220px; overflow-y: auto;
  padding: 4px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2);
}
.check-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
.check-row:hover { background: var(--raise); }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

.link-row { display: flex; gap: 8px; }
.link-row .input { flex: 1; min-width: 0; }
.share-block { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.share-title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.share-help { color: var(--muted); font-size: 12.5px; }
.switch {
  position: relative; width: 38px; height: 22px; padding: 0; flex: none;
  border: 0; border-radius: 99px; background: var(--raise-2);
  transition: background 0.15s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform 0.15s;
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

.empty-drop.static { cursor: default; }
.empty-drop.static:hover { border-color: var(--line-2); background: var(--bg-2); }

@media (max-width: 900px) {
  .top-nav { margin-left: 4px; }
  .team-row { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 8px; }
  .team-row .role-badge { grid-column: 3; grid-row: 1; }
  .team-channels, .team-status { grid-column: 2 / -1; }
  .team-row > .icon-btn { grid-column: 3; grid-row: 3; justify-self: end; }
}

.preview-tag {
  flex: none; padding: 1px 7px; border-radius: 99px;
  background: rgba(100, 210, 255, 0.14); color: #64d2ff;
  font-size: 11px; font-weight: 700; cursor: help;
}
.screen-placeholder .btn { margin-top: 6px; }


/* ---------- Colour ----------
   Gradients and tints that make every theme livelier; all colours come from the theme tokens. */

body { transition: background-color 0.25s; }
.dash, .login {
  background:
    radial-gradient(1100px 640px at -8% -12%, var(--glow-1), transparent 62%),
    radial-gradient(1000px 600px at 108% -8%, var(--glow-2), transparent 62%),
    radial-gradient(900px 500px at 50% 120%, var(--glow-2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.side { background: linear-gradient(180deg, var(--glow-1), transparent 55%), color-mix(in srgb, var(--bg-2) 70%, transparent); }
.topbar { background: linear-gradient(90deg, var(--glow-1), transparent 40%, transparent 60%, var(--glow-2)), var(--bg-2); }
.dash-title h1 { background: var(--grad-wide); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel { background: linear-gradient(180deg, color-mix(in srgb, var(--glow-2) 60%, transparent), transparent 220px), var(--panel); }
.count-pill { background: var(--accent-soft); color: var(--accent); }
.dash-top, .topbar { position: relative; }
.dash-top::after, .topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--grad-wide); opacity: 0.85; pointer-events: none;
}
.dash-top { background: color-mix(in srgb, var(--bg) 82%, transparent); }

.logo { display: block; flex: none; }
.logo-a { stop-color: var(--logo-a); }
.logo-b { stop-color: var(--logo-b); }
.logo-ink { fill: var(--logo-ink); }
.logo-tri { stroke: var(--logo-ink); stroke-width: 2; stroke-linejoin: round; }
.brand > span {
  background: var(--grad-wide); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-grad); box-shadow: 0 4px 16px var(--accent-soft); }
.avatar, .chip-count, .thumb-notes, .note-num, .note-card-num, .pin, .marker { background: var(--grad); color: var(--on-grad); }
.note.resolved .note-num, .pin.resolved { background: #d7dbe3; color: #1a1d23; }
.pin.composing { background: #fff; color: #000; }
.scrub-fill, .progress-fill { background: var(--grad-wide); }
.empty-icon { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tab[aria-selected="true"] { border-image: var(--grad-wide) 1; }
.nav-link.active { background: var(--accent-soft); color: var(--text); }
.nav-link.active .icon { color: var(--accent); }
.side-item.active { background: var(--accent-soft); }
.side-item.active::before {
  content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--grad);
}
.role-badge.editor { background: var(--accent-2-soft); color: var(--accent-2); }
.card:hover .thumb { box-shadow: 0 10px 30px var(--accent-soft); }
.login-card { position: relative; overflow: hidden; }
.login-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad-wide);
}
.composer { box-shadow: inset 3px 0 0 var(--accent-2); }
.toggle[aria-pressed="true"] { background: var(--accent-2-soft); border-color: var(--accent-2); color: var(--accent-2); }
.screen.has-audio .screen-box { box-shadow: 0 0 0 2px var(--accent), 0 0 24px var(--accent-soft); }

/* ---------- Theme picker ---------- */

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.theme-card {
  display: grid; gap: 10px; padding: 10px; text-align: left;
  border: 1.5px solid var(--line-2); border-radius: 12px;
  background: var(--bg); color: var(--text);
  transition: transform 0.12s, border-color 0.12s;
}
.theme-card:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.theme-card[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tp-preview { display: grid; grid-template-rows: auto 1fr auto; height: 108px; border-radius: 8px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.tp-top { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 7px; background: var(--bg-2); }
.tp-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--grad-wide); }
.tp-logo { width: 12px; height: 12px; border-radius: 4px; background: var(--grad-wide); }
.tp-title { width: 38px; height: 6px; border-radius: 3px; background: var(--grad-wide); }
.tp-btn { margin-left: auto; width: 30px; height: 11px; border-radius: 4px; background: var(--grad); }
.tp-body { display: grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 7px; background: radial-gradient(120px 60px at 0 0, var(--glow-1), transparent), var(--bg); }
.tp-side { display: grid; align-content: start; gap: 4px; }
.tp-side span { height: 6px; border-radius: 3px; background: var(--raise); }
.tp-side span:first-child { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.tp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tp-tiles span { position: relative; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); }
.tp-tiles span::after { content: ''; position: absolute; right: 3px; top: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.tp-tiles span:nth-child(2)::after { background: var(--accent-2); }
.tp-bar { height: 5px; margin: 0 7px 7px; border-radius: 3px; background: var(--raise-2); overflow: hidden; }
.tp-bar span { display: block; width: 62%; height: 100%; background: var(--grad-wide); }
.tp-meta { display: grid; gap: 2px; }
.tp-meta strong { display: flex; align-items: center; gap: 6px; }
.tp-meta strong .icon { width: 15px; height: 15px; color: var(--accent); }
.tp-meta span { color: var(--muted); font-size: 12px; }
.modal.wide { width: min(680px, 100%); }

/* ---------- Per-version timelines (compare), reconnect badge ---------- */

.ctl-mid { display: flex; align-items: center; gap: 8px; }
.align-btn { border-color: var(--accent-2); color: var(--accent-2); background: var(--accent-2-soft); }
.align-btn .icon { width: 14px; height: 14px; }

.screen-foot { display: grid; gap: 2px; height: 48px; padding-top: 6px; }
.mini-row { display: flex; align-items: center; gap: 2px; }
.mini-scrub { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.mini-track {
  position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px;
  border-radius: 4px; background: var(--raise-2); overflow: hidden;
}
.mini-scrub:hover .mini-track, .mini-scrub.active .mini-track { height: 6px; margin-top: -3px; }
.mini-fill { height: 100%; width: 0; background: var(--grad-wide); }
.mini-head {
  position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); pointer-events: none;
}
.mini-meta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 16px; }
.mini-tc { font-size: 11.5px; color: var(--text-2); }
.offset-tag {
  padding: 0 6px; border-radius: 99px;
  background: var(--accent-2-soft); color: var(--accent-2);
  font: 700 10.5px/16px var(--mono); cursor: help;
}

.screen-status {
  position: absolute; left: 8px; top: 8px; z-index: 3;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 99px;
  background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 12px; font-weight: 600;
  pointer-events: none;
}
.screen-placeholder .btn .icon { width: 14px; height: 14px; }

@media (max-width: 560px) {
  .ctl-mid { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; }
}

/* The video column never grows past its space; the controls wrap instead of pushing it wider. */
.stage-col { grid-template-columns: minmax(0, 1fr); }
.controls { flex-wrap: wrap; row-gap: 8px; }
.ctl-left, .ctl-right { flex: 1 1 auto; }
@media (max-width: 1280px) {
  .ctl-right .toggle.small span:not(.icon) { display: none; }
}
