/* CPTRS — review room. Liquid Glass over MyLovy ink.
   One bold idea: optical glass whose rim splits light into MyLovy's pink and cyan,
   floating over the footage. Everything else stays quiet so colour judgement isn't biased. */

@font-face {
  font-family: "Inter Cptr";
  src: url("/fonts/inter-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono Cptr";
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* MyLovy palette */
  --ink: #101117;
  --graphite: #191a21;
  --slate: #272830;
  --fog: #a3a4ac;
  --paper: #fafafa;
  --flare: #ff2d95;
  --violet: #a45cff;
  --prism: #2de2ff;
  --orchid: #d57ae9;
  --signal: #f94144;
  --amber: #ffd23f;

  --text-2: rgba(250, 250, 250, 0.72);
  --text-3: rgba(250, 250, 250, 0.48);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --fill: rgba(255, 255, 255, 0.05);
  --fill-2: rgba(255, 255, 255, 0.09);

  --spectrum: linear-gradient(100deg, var(--flare) 0%, var(--violet) 52%, var(--prism) 100%);

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  --font: "Inter Cptr", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono Cptr", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --glass-tint: rgba(28, 29, 38, 0.46);
  --glass-blur: 24px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: rgba(255, 45, 149, 0.4); }
:focus-visible { outline: 2px solid var(--orchid); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tc, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ic { display: inline-flex; flex: none; }

* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ------------------------------------------------------------ light leaks behind the studio */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(60vmax 40vmax at 8% -10%, rgba(255, 45, 149, 0.16), transparent 60%),
    radial-gradient(50vmax 36vmax at 105% 10%, rgba(45, 226, 255, 0.12), transparent 60%),
    radial-gradient(70vmax 50vmax at 60% 120%, rgba(164, 92, 255, 0.12), transparent 60%),
    var(--ink);
}
.backdrop::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(22vmax 22vmax at 30% 40%, rgba(255, 45, 149, 0.14), transparent 70%),
    radial-gradient(26vmax 26vmax at 70% 60%, rgba(45, 226, 255, 0.1), transparent 70%);
  filter: blur(20px);
  animation: drift 48s var(--ease) infinite alternate;
}
.backdrop::after {
  /* fine grain: keeps dark gradients from banding */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) rotate(0deg); }
  to { transform: translate3d(4%, 3%, 0) rotate(8deg); }
}

/* ------------------------------------------------------------ liquid glass */
.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025) 42%, rgba(255, 255, 255, 0.012)),
    var(--glass-tint);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(175%);
  backdrop-filter: blur(var(--glass-blur)) saturate(175%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 22px 48px -24px rgba(0, 0, 0, 0.75),
    0 2px 6px -2px rgba(0, 0, 0, 0.4);
}
/* The rim: light splitting into flare and prism at the glass edge. --rim follows the pointer. */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(var(--rim, 135deg),
      rgba(255, 45, 149, 0.62),
      rgba(255, 255, 255, 0.2) 26%,
      rgba(255, 255, 255, 0.04) 50%,
      rgba(255, 255, 255, 0.12) 74%,
      rgba(45, 226, 255, 0.58));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: opacity 0.4s var(--ease);
}
/* Specular highlight under the pointer */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(180px 120px at var(--mx, 50%) var(--my, -30%), rgba(255, 255, 255, 0.11), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .glass:hover::after { opacity: 1; }
}
.glass--dense { --glass-tint: rgba(22, 23, 30, 0.74); }
.glass--clear { --glass-tint: rgba(12, 13, 18, 0.32); --glass-blur: 18px; }
.glass--quiet::before { opacity: 0.45; }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: rgba(26, 27, 35, 0.96); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--graphite); }
}

/* ------------------------------------------------------------ controls */
.btn {
  appearance: none;
  border: 0;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.006em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--paper);
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.25s var(--spring), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn--primary {
  position: relative;
  isolation: isolate;
  background: var(--spectrum);
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(255, 45, 149, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}
.btn--primary::after {
  /* glass sheen on the gradient pill */
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}
.btn--primary:hover { filter: brightness(1.06) saturate(1.05); background: var(--spectrum); }
.btn--ghost { background: transparent; box-shadow: none; color: var(--text-2); }
.btn--ghost:hover { background: var(--fill); color: var(--paper); }
.btn--danger { color: #ff8a8c; }
.btn--danger:hover { background: rgba(249, 65, 68, 0.14); }
.btn--solid-danger { background: var(--signal); color: #fff; box-shadow: none; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.icon-btn {
  appearance: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s, transform 0.25s var(--spring);
}
.icon-btn:hover { background: var(--fill-2); color: var(--paper); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.is-on { color: var(--paper); background: rgba(255, 45, 149, 0.22); box-shadow: inset 0 0 0 1px rgba(255, 45, 149, 0.5); }
.icon-btn--sm { width: 32px; height: 32px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(14, 15, 20, 0.5);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fog); flex: none; }
.status-review .dot { background: var(--fog); }
.status-changes .dot { background: var(--flare); box-shadow: 0 0 10px var(--flare); }
.status-approved .dot { background: var(--prism); box-shadow: 0 0 10px var(--prism); }

.segmented {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px var(--line);
}
.segmented button {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  transition: color 0.2s;
}
.segmented button[aria-pressed="true"] { color: var(--paper); }
.segmented .thumb {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: left 0.35s var(--spring), width 0.35s var(--spring);
}

.switch { position: relative; display: inline-flex; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.25s;
  pointer-events: none;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #e9e9f2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  transition: transform 0.35s var(--spring);
}
.switch input:checked + span { background: var(--spectrum); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--orchid); outline-offset: 2px; }

.field { display: grid; gap: 7px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--text-3); line-height: 1.45; margin: 0; }
.input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 0;
  background: rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  transition: box-shadow 0.2s, background 0.2s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; background: rgba(0, 0, 0, 0.34); box-shadow: inset 0 0 0 1px var(--orchid), 0 0 0 4px rgba(213, 122, 233, 0.16); }
textarea.input { height: auto; padding: 11px 14px; line-height: 1.45; resize: none; }
select.input {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a4ac' stroke-width='2.5' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
select.input option { background: var(--graphite); }
.input--mono { font-family: var(--mono); font-size: 12.5px; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .input { flex: 1; min-width: 0; }
.error-text { color: #ff8a8c; font-size: 13px; margin: 0; min-height: 1em; }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: min(1240px, calc(100% - 24px));
  margin: 12px auto 0;
  height: 60px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand .mark { width: 30px; height: 30px; }
.wordmark {
  font-weight: 820;
  font-size: 19px;
  letter-spacing: 0.02em;
  text-shadow: -0.6px 0 rgba(255, 45, 149, 0.55), 0.6px 0 rgba(45, 226, 255, 0.55);
}
.search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-3);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--paper); font-size: 14.5px; }
.search:focus-within { box-shadow: inset 0 0 0 1px var(--orchid); }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.topbar .title-block { min-width: 0; display: flex; align-items: center; gap: 10px; }
.topbar .title-block h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------ library */
.page { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 140px; }
.library-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.display {
  margin: 0;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 0.9;
  font-weight: 860;
  letter-spacing: -0.055em;
  text-shadow: -1.5px 0 rgba(255, 45, 149, 0.5), 1.5px 0 rgba(45, 226, 255, 0.5);
}
.summary { margin: 0 0 6px; color: var(--text-2); font-size: 15px; }
.summary strong { color: var(--paper); font-weight: 650; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; }
.filter-chip {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.filter-chip:hover { color: var(--paper); background: var(--fill); }
.filter-chip[aria-pressed="true"] { color: var(--paper); background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.filter-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.tile {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #07070a;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line), 0 24px 50px -30px rgba(0, 0, 0, 0.9);
  transition: transform 0.4s var(--spring), box-shadow 0.3s;
  outline: none;
}
.tile:hover, .tile:focus-visible { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -28px rgba(0, 0, 0, 0.95); }
.tile:focus-visible { box-shadow: 0 0 0 2px var(--orchid); }
.tile-media { position: absolute; inset: 0; }
.tile-media img, .tile-sb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile-sb { background-repeat: no-repeat; opacity: 0; transition: opacity 0.15s; }
.tile.is-scrubbing .tile-sb { opacity: 1; }
.tile-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 45, 149, 0.16), transparent 60%),
    radial-gradient(120% 80% at 100% 100%, rgba(45, 226, 255, 0.12), transparent 60%),
    #0c0d12;
  color: var(--text-3);
  font-size: 13px;
}
.tile-placeholder .mark { width: 42px; height: 42px; opacity: 0.55; }
.tile-scrubline {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: var(--p, 0%);
  background: var(--spectrum);
  box-shadow: 0 0 12px rgba(255, 45, 149, 0.8);
  opacity: 0;
  transition: opacity 0.2s;
}
.tile.is-scrubbing .tile-scrubline { opacity: 1; }
.tile-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; align-items: center; pointer-events: none; }
.tile-badges .spacer { flex: 1; }
.tile-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border-radius: 16px;
  padding: 10px 8px 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tile-text { flex: 1; min-width: 0; }
.tile-title { font-size: 15px; font-weight: 680; letter-spacing: -0.018em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.tile-meta .tc { font-size: 12px; }
.tile .more { opacity: 0; transition: opacity 0.2s; }
.tile:hover .more, .tile:focus-within .more { opacity: 1; }
@media (hover: none) { .tile .more { opacity: 1; } }
.tile.is-broken .tile-caption { --glass-tint: rgba(60, 14, 22, 0.6); }

.empty {
  border-radius: var(--r-xl);
  padding: 64px 24px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.empty h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; font-weight: 760; }
.empty p { margin: 0; color: var(--text-2); max-width: 46ch; }
.empty .lens { width: 76px; height: 76px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ------------------------------------------------------------ folders */
.library-title { display: grid; gap: 14px; min-width: 0; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 14px; color: var(--text-2); }
.crumbs[hidden] { display: none; }
.crumbs a { color: var(--text-2); text-decoration: none; padding: 4px 8px; margin: -4px -2px; border-radius: 9px; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.crumbs a:hover { color: var(--paper); background: var(--fill); }
.crumbs a:focus-visible { outline: 2px solid var(--orchid); outline-offset: 1px; }
.crumbs > .ic { opacity: 0.45; }
.crumbs [aria-current] { color: var(--paper); font-weight: 650; }
.crumbs a.is-drop { color: var(--paper); background: rgba(45, 226, 255, 0.16); box-shadow: inset 0 0 0 1px var(--prism); }
.display .folder-dot {
  display: inline-block;
  width: 0.3em;
  height: 0.3em;
  margin-right: 0.2em;
  border-radius: 50%;
  vertical-align: 0.14em;
  background: var(--folder);
  box-shadow: 0 0 0 0.05em rgba(255, 255, 255, 0.32), 0 0 0.45em var(--folder);
}

.folder-tile::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--folder);
  box-shadow: 0 0 18px var(--folder-hi, var(--folder));
}
.folder-mosaic { position: absolute; inset: 0; display: grid; gap: 2px; background: #07070a; }
.folder-mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; filter: saturate(0.9) brightness(0.8); }
.folder-mosaic.n2 { grid-template-columns: 1fr 1fr; }
.folder-mosaic.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.folder-mosaic.n3 img:first-child { grid-row: span 2; }
.folder-mosaic.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.folder-art {
  display: grid;
  place-items: center;
  padding-bottom: 46px;
  color: var(--folder-hi, var(--folder));
  background: radial-gradient(90% 75% at 30% 0%, color-mix(in srgb, var(--folder-hi, var(--folder)) 22%, transparent), transparent 72%), #0c0d12;
}
.folder-art .ic { filter: drop-shadow(0 0 20px color-mix(in srgb, var(--folder-hi, var(--folder)) 55%, transparent)); }
.folder-glyph {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--folder-hi, var(--folder));
  background: color-mix(in srgb, var(--folder-hi, var(--folder)) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--folder-hi, var(--folder)) 38%, transparent);
}
.tile-open { color: #ff8ec4; }
.tile-path { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tile.is-drop { transform: translateY(-3px) scale(1.015); box-shadow: 0 0 0 2px var(--prism), 0 0 44px -6px rgba(45, 226, 255, 0.6); }

/* folder editor and picker */
.folder-form .label { margin-top: 4px; }
.fswatches { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 0; }
.fswatch {
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.25s var(--spring), box-shadow 0.2s;
}
.fswatch:hover { transform: scale(1.08); }
.fswatch[aria-checked="true"], .fswatch.is-on { box-shadow: 0 0 0 2px var(--graphite), 0 0 0 4px var(--paper); }
.fswatch:focus-visible, .fswatch--custom:focus-within { outline: 2px solid var(--orchid); outline-offset: 4px; }
.fswatch--custom { background: conic-gradient(from 180deg, #ff2d95, #ffd23f, #3ddc97, #2de2ff, #a45cff, #ff2d95); }
.fswatch--custom.is-on { background: var(--c); }
.fswatch--custom input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.modal.modal--picker { width: min(460px, 100%); }
.folder-pick-wrap { display: grid; gap: 10px; }
.folder-pick-wrap > .btn { justify-self: start; }
.folder-pick { display: grid; gap: 2px; max-height: min(50vh, 380px); overflow: auto; padding: 4px; margin: 0 -4px; }
.folder-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px 0 calc(12px + var(--depth, 0) * 18px);
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}
.folder-pick-row .ic { color: var(--c); }
.folder-pick-row small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.folder-pick-row:hover { background: var(--fill); }
.folder-pick-row[aria-checked="true"] { background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px var(--line-2); }
.folder-pick-row:focus-visible { outline: 2px solid var(--orchid); outline-offset: -2px; }
.back-link span { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ sign-in, accounts, invites */
.btn--google {
  background: #fafafa;
  color: #16171c;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
}
.btn--google:hover { background: #ffffff; color: #000; }
.btn--google:focus-visible { outline: 2px solid var(--orchid); outline-offset: 3px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.auth-alt { display: grid; gap: 10px; margin-top: 4px; }
.auth-actions { display: grid; gap: 10px; }
.auth-card .hint a, .empty .hint a { color: var(--paper); }
.verified { display: inline-grid; place-items: center; flex: none; color: var(--prism); vertical-align: -2px; margin-left: 4px; }
.note-head .verified { margin-left: -4px; }
.account-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.account-btn:hover .avatar { box-shadow: 0 0 0 2px var(--paper); }
.account-btn:focus-visible { outline: 2px solid var(--orchid); outline-offset: 2px; }
a.tile--link { display: block; color: inherit; text-decoration: none; }
.modal.modal--wide { width: min(520px, 100%); }
.access { display: grid; gap: 14px; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.admin-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); }
.admin-text { display: grid; flex: 1; min-width: 0; }
.admin-text strong { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-text small { color: var(--text-3); font-size: 12px; }
.notice { padding: 12px 14px; border-radius: 14px; background: rgba(255, 210, 63, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.24); }
.notice strong { color: var(--amber); font-size: 14px; }
.notice p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; }
.notice-text { margin: 0; color: var(--amber); font-size: 13px; }

/* drop veil */
.dropveil {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 13, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.dropveil.is-on { opacity: 1; }
.dropveil-card {
  width: min(560px, calc(100% - 40px));
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xl);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.02em;
  transform: scale(0.96);
  transition: transform 0.35s var(--spring);
}
.dropveil.is-on .dropveil-card { transform: scale(1); }
.dropveil-card small { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); margin-top: 6px; }

/* upload tray */
.tray {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-b));
  z-index: 70;
  width: min(380px, calc(100% - 32px));
  border-radius: var(--r-lg);
  padding: 12px;
  display: grid;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
  animation: rise 0.45s var(--spring);
}
.tray-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.tray-item { padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.24); display: grid; gap: 7px; }
.tray-row { display: flex; align-items: center; gap: 8px; }
.tray-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-status { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tray-item.is-error .tray-status { color: #ff8a8c; }
.bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--spectrum); transition: width 0.25s linear; }
.tray-item.is-done .bar > i { background: var(--prism); }

/* ------------------------------------------------------------ overlays: drawer, modal, menu, toast */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  background: rgba(6, 7, 10, 0.45);
  animation: fade 0.25s var(--ease);
}
.scrim--drawer { justify-content: flex-end; }
.scrim--center { align-items: center; justify-content: center; padding: 20px; }
.drawer {
  width: min(460px, 100%);
  height: calc(100% - 24px);
  margin: 12px;
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawer-in 0.5s var(--spring);
}
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 18px 14px 12px 22px; }
.drawer-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 19px; font-weight: 760; letter-spacing: -0.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 22px 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-content: start; }
.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.section-title { margin: 0; font-size: 13px; font-weight: 650; color: var(--text-3); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.row-text { display: grid; gap: 2px; min-width: 0; }
.row-text strong { font-size: 14.5px; font-weight: 600; }
.code {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 160px;
  overflow: auto;
}
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; color: var(--text-2); }
.checks label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.checks input { accent-color: var(--flare); width: 16px; height: 16px; }
.version-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.version-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.22); }
.version-item .vnum { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--paper); width: 30px; }
.version-item .vmeta { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewers { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.viewers li { display: flex; justify-content: space-between; gap: 10px; }
.viewers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.modal {
  width: min(420px, 100%);
  border-radius: var(--r-xl);
  padding: 26px;
  display: grid;
  gap: 16px;
  animation: pop 0.45s var(--spring);
}
.modal h2 { margin: 0; font-size: 22px; font-weight: 760; letter-spacing: -0.03em; }
.modal p { margin: 0; color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); border-radius: var(--r-xl); padding: 34px 30px 30px; display: grid; gap: 18px; animation: pop 0.6s var(--spring); }
.auth-card .brand .mark { width: 44px; height: 44px; }
.auth-card .wordmark { font-size: 28px; }
.auth-card h1 { margin: 6px 0 0; font-size: 22px; font-weight: 720; letter-spacing: -0.025em; }
.auth-card p { margin: 0; color: var(--text-2); }
.auth-card code { font-family: var(--mono); font-size: 12.5px; color: var(--paper); background: rgba(0, 0, 0, 0.3); padding: 2px 6px; border-radius: 6px; }

.menu {
  position: fixed;
  z-index: 95;
  min-width: 220px;
  max-width: 320px;
  border-radius: 18px;
  padding: 6px;
  display: grid;
  animation: pop 0.3s var(--spring);
}
.menu button, .menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 550;
  color: var(--paper);
}
.menu button:hover, .menu a:hover, .menu button:focus-visible { background: rgba(255, 255, 255, 0.09); outline: none; }
.menu button[aria-checked="true"]::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--prism); }
.menu .menu-label { padding: 8px 12px 4px; font-size: 12px; font-weight: 650; color: var(--text-3); }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 4px 6px; }
.menu .danger { color: #ff8a8c; }
.menu small { margin-left: auto; color: var(--text-3); font-size: 12px; font-family: var(--mono); }

.toasts { position: fixed; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; animation: rise 0.45s var(--spring); max-width: min(520px, calc(100vw - 32px)); text-align: center; }
.toast.is-error { --glass-tint: rgba(70, 14, 22, 0.72); }
.toast.is-leaving { animation: sink 0.3s var(--ease) forwards; }

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, var(--flare), var(--violet), var(--prism));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin 0.9s linear infinite;
}
.center-fill { min-height: 60vh; display: grid; place-items: center; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes sink { to { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes drawer-in { from { opacity: 0; transform: translateX(28px) scale(0.98); } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(40px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ review page */
.review-page { height: 100dvh; overflow: hidden; }
.review-page #app { height: 100%; display: flex; flex-direction: column; }
.review-page .topbar { position: relative; top: 0; flex: none; width: calc(100% - 24px); max-width: none; }
.review {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 12px;
  padding: 12px;
}
.stage {
  position: relative;
  min-height: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #050507;
  box-shadow: 0 0 0 1px var(--line);
}
.notes { min-height: 0; border-radius: var(--r-xl); display: flex; flex-direction: column; overflow: hidden; }
.version-btn { gap: 6px; font-family: var(--mono); font-size: 12.5px; height: 30px; padding: 0 10px; }
.status-btn { height: 32px; gap: 7px; font-size: 13px; padding: 0 12px; }
.statusline { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* player */
.player { position: absolute; inset: 0; overflow: hidden; outline: none; user-select: none; -webkit-user-select: none; }
.player:focus-visible { box-shadow: inset 0 0 0 2px var(--orchid); }
.player-ambient {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  filter: blur(70px) saturate(1.6);
  opacity: 0.5;
  transform: translateZ(0);
  pointer-events: none;
  transition: opacity 1s;
}
.player-frame { position: absolute; inset: 0; display: grid; place-items: center; }
.player-media { width: 100%; height: 100%; object-fit: contain; background: transparent; }
.player-overlay { position: absolute; pointer-events: none; }
.player-overlay.is-drawing { pointer-events: auto; cursor: crosshair; touch-action: none; }
.player-guides { position: absolute; pointer-events: none; }
.guide-safe { position: absolute; border: 1px dashed rgba(255, 255, 255, 0.55); }
.guide-line { position: absolute; background: rgba(255, 255, 255, 0.4); }
.guide-mask { position: absolute; background: rgba(0, 0, 0, 0.72); }
.guide-label { position: absolute; left: 8px; top: 6px; font: 600 11px var(--mono); color: rgba(255, 255, 255, 0.7); }
.player-watermark {
  position: absolute;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: space-around;
  justify-items: center;
  row-gap: 18%;
  opacity: 0.3;
  font-weight: 700;
  font-size: clamp(11px, 1.6vw, 18px);
  color: #fff;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.9), 0 1px 3px rgba(0, 0, 0, 0.6);
}
.player-watermark span { transform: rotate(-18deg); white-space: nowrap; }
.player-caption-box { position: absolute; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; padding: 0 6%; }
.player-caption-box span {
  background: rgba(8, 9, 13, 0.72);
  color: #fff;
  font-size: clamp(14px, 2.2vw, 22px);
  font-weight: 600;
  line-height: 1.35;
  padding: 4px 10px;
  border-radius: 8px;
  text-align: center;
  white-space: pre-line;
}

.lens-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  --glass-tint: rgba(16, 17, 23, 0.34);
  transition: transform 0.4s var(--spring), opacity 0.3s;
}
.lens-play:hover { transform: scale(1.06); }
.lens-play .ic { transform: translateX(2px); }
.player.is-playing .lens-play, .player.has-started .lens-play, .player.is-drawing-mode .lens-play, .player.is-waiting .lens-play { opacity: 0; transform: scale(0.8); pointer-events: none; }
.player-spinner { position: absolute; left: 50%; top: 50%; margin: -17px 0 0 -17px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.player.is-waiting .player-spinner { opacity: 1; }
.player-message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 40px));
  border-radius: var(--r-lg);
  padding: 20px 22px;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.player-message p { margin: 0; color: var(--text-2); font-size: 14px; }
.player-message strong { font-size: 16px; }

.controls {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 28px));
  border-radius: var(--r-lg);
  padding: 8px 10px 6px;
  display: grid;
  gap: 2px;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--spring);
}
.player.is-idle .controls { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
.player.is-idle { cursor: none; }
.controls-row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.controls-row .spacer { flex: 1; }
.controls .icon-btn { width: 36px; height: 36px; color: rgba(255, 255, 255, 0.86); }
.timecode {
  border: 0;
  background: transparent;
  padding: 0 10px;
  height: 36px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paper);
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.timecode:hover { background: var(--fill); }
.timecode .dur { color: var(--text-3); font-weight: 500; }
.speed { font-family: var(--mono); font-size: 12.5px; font-weight: 700; width: auto !important; padding: 0 9px; }
.volume { width: 84px; accent-color: var(--paper); }

.scrub { position: relative; height: 26px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.scrub-track { position: relative; width: 100%; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.16); transition: height 0.2s var(--ease); }
.scrub:hover .scrub-track, .scrub.is-dragging .scrub-track { height: 8px; }
.scrub-buffered, .scrub-progress { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; }
.scrub-buffered { background: rgba(255, 255, 255, 0.18); }
.scrub-progress { background: var(--spectrum); }
.scrub-head {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22), 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--spring);
}
.scrub:hover .scrub-head, .scrub.is-dragging .scrub-head { transform: scale(1.15); }
.scrub-marks { position: absolute; inset: 0; pointer-events: none; }
.mark-pin {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--c, var(--flare));
  box-shadow: 0 0 0 2px rgba(10, 10, 14, 0.85), 0 0 10px var(--c, var(--flare));
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s var(--spring);
}
.mark-pin:hover, .mark-pin.is-active { transform: scale(1.5); z-index: 2; }
.mark-pin.is-resolved { opacity: 0.4; }
.mark-range { position: absolute; top: -3px; bottom: -3px; border-radius: 6px; background: var(--c, var(--flare)); opacity: 0.32; pointer-events: none; }
.scrub-tip {
  position: absolute;
  bottom: 30px;
  transform: translateX(-50%);
  border-radius: 14px;
  padding: 5px;
  display: grid;
  gap: 4px;
  justify-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.scrub:hover .scrub-tip, .scrub.is-dragging .scrub-tip { opacity: 1; }
.scrub-tip .frame { width: 168px; height: 94px; border-radius: 10px; background-color: #000; background-repeat: no-repeat; }
.scrub-tip .frame:empty:not([style*="background-image"]) { display: none; }
.scrub-tip .tc { font-size: 11.5px; padding: 0 6px 2px; }
.scrub-tip .tip-note { max-width: 220px; font-size: 12px; color: var(--text-2); padding: 0 6px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.draw-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: var(--r-pill);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pop 0.35s var(--spring);
}
.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transition: transform 0.2s var(--spring);
}
.swatch[aria-pressed="true"] { transform: scale(1.18); box-shadow: 0 0 0 2px #fff, 0 0 12px var(--c); }
.draw-bar .label { padding: 0 6px 0 4px; font-size: 13px; color: var(--paper); }

.title-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s;
}
.player.is-playing .title-pill { opacity: 0; }

/* image review */
.player.is-image .controls { display: none; }
.player.is-image .lens-play { display: none; }

/* notes */
.notes-head { padding: 16px 14px 10px 18px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.notes-head-row { display: flex; align-items: center; gap: 8px; }
.notes-head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 740; letter-spacing: -0.02em; }
.notes-head h2 .count { color: var(--text-3); font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.notes-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 8px; display: grid; gap: 4px; align-content: start; }
.notes-empty { padding: 36px 20px; text-align: center; color: var(--text-3); font-size: 14px; display: grid; gap: 6px; justify-items: center; }
.notes-empty strong { color: var(--text-2); font-size: 15px; }
.note {
  position: relative;
  border-radius: 16px;
  padding: 12px 12px 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 4px 10px;
  transition: background 0.2s;
  cursor: pointer;
}
.note:hover { background: rgba(255, 255, 255, 0.045); }
.note.is-active { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 45, 149, 0.45); }
.note.is-resolved .note-body, .note.is-resolved .note-text { opacity: 0.55; }
.note.is-internal { background: rgba(255, 210, 63, 0.05); }
.note.is-internal::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--amber); }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 750;
  color: #0b0b10;
  background: var(--c, var(--fog));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 2px rgba(0, 0, 0, 0.25);
  flex: none;
}
.avatar--owner { box-shadow: 0 0 0 2px var(--ink), 0 0 0 3.5px var(--flare); }
.avatar--small { width: 24px; height: 24px; font-size: 10.5px; }
.note-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.note-author { flex: 0 0 auto; max-width: 13em; font-weight: 680; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-when { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.note-tag { flex: none; font-size: 11px; font-weight: 700; color: var(--amber); background: rgba(255, 210, 63, 0.12); border-radius: 6px; padding: 1px 6px; }
.note-body { grid-column: 2; display: grid; gap: 6px; }
.note-text { margin: 0; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-body > div:first-child:not(:only-child) { margin-bottom: -1px; }
.tc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 45, 149, 0.14);
  color: #ff8ec4;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
  vertical-align: 1px;
}
.tc-chip:hover { background: rgba(255, 45, 149, 0.24); }
.tc-chip .ic { opacity: 0.8; }
.note-actions { flex: none; display: flex; align-items: center; gap: 0; margin: -4px -6px -4px auto; opacity: 0; transition: opacity 0.2s; }
.note:hover .note-actions, .note:focus-within .note-actions, .note.is-active .note-actions { opacity: 1; }
@media (hover: none) { .note-actions { opacity: 1; } }
.note-actions .btn { width: 30px; height: 28px; padding: 0; justify-content: center; color: var(--text-2); background: transparent; box-shadow: none; }
.note-actions .btn:hover { background: var(--fill); color: var(--paper); }
.note-actions .btn.is-on { color: var(--prism); }
.replies { grid-column: 1 / -1; margin: 4px 0 0 14px; padding-left: 14px; border-left: 1px solid var(--line-2); display: grid; gap: 2px; }
.reply { grid-template-columns: 24px minmax(0, 1fr); padding: 8px 8px 6px; }
.reply .note-text { font-size: 14px; }
.decision { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; color: var(--text-2); background: rgba(255, 255, 255, 0.03); }
.decision strong { color: var(--paper); }
.decision.is-approved { box-shadow: inset 0 0 0 1px rgba(45, 226, 255, 0.35); }
.decision.is-changes { box-shadow: inset 0 0 0 1px rgba(255, 45, 149, 0.35); }
.reply-form { grid-column: 1 / -1; display: flex; gap: 8px; margin: 6px 0 2px 42px; }
.reply-form textarea { min-height: 38px; }

.composer { border-top: 1px solid var(--line); padding: 12px; display: grid; gap: 8px; background: rgba(0, 0, 0, 0.12); }
.composer-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 28px; }
.pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 45, 149, 0.16);
  color: #ffb3d6;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pin[aria-pressed="false"] { background: var(--fill); color: var(--text-3); text-decoration: line-through; }
.composer textarea { min-height: 44px; max-height: 180px; }
.composer-bottom { display: flex; align-items: center; gap: 4px; }
.composer-bottom .spacer { flex: 1; }
.composer .who { font-size: 12.5px; color: var(--text-3); min-height: 32px; padding: 0 8px; border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; border: 0; background: transparent; }
.composer .who:hover { color: var(--paper); }
.composer-off { padding: 16px; color: var(--text-3); font-size: 13.5px; text-align: center; border-top: 1px solid var(--line); }
.drawn-flag { font-size: 12px; color: var(--prism); font-weight: 650; }

.locked { min-height: calc(100dvh - 90px); display: grid; place-items: center; padding: 24px; }

.kbd-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; color: var(--text-2); align-items: center; }
kbd { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--paper); background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.4), inset 0 0 0 1px var(--line-2); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }

/* ------------------------------------------------------------ embed */
.embed-page { background: #000; height: 100vh; overflow: hidden; }
.embed-root { position: fixed; inset: 0; }
.embed-root .player-ambient { display: none; }
.embed-root .controls { bottom: 10px; width: calc(100% - 20px); border-radius: 18px; }
.embed-message { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: radial-gradient(80% 60% at 50% 0%, rgba(255, 45, 149, 0.12), transparent 70%), #0b0c11; }
.embed-message .glass { border-radius: var(--r-lg); padding: 22px 24px; text-align: center; display: grid; gap: 10px; justify-items: center; max-width: 380px; }
.embed-message p { margin: 0; color: var(--text-2); font-size: 14px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .review { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 820px) {
  .review-page { height: auto; min-height: 100dvh; overflow: visible; }
  .review-page #app { height: auto; min-height: 100dvh; }
  .review { display: flex; flex-direction: column; padding: 8px; gap: 8px; }
  .stage { aspect-ratio: 16 / 9; flex: none; border-radius: 20px; }
  .stage.is-portrait { aspect-ratio: 4 / 5; }
  .notes { min-height: 60vh; border-radius: 22px; }
  .composer { position: sticky; bottom: 0; padding-bottom: calc(12px + var(--safe-b)); background: rgba(16, 17, 23, 0.92); }
  .controls { bottom: 8px; width: calc(100% - 16px); padding: 4px 6px 2px; border-radius: 16px; }
  .controls .icon-btn { width: 32px; height: 32px; }
  .controls .hide-sm { display: none; }
  .timecode { font-size: 12px; padding: 0 6px; }
  .lens-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; top: 40%; }
}
@media (max-width: 680px) {
  .topbar { height: 54px; padding: 0 6px 0 12px; top: 8px; margin-top: 8px; width: calc(100% - 16px); }
  .search { display: none; }
  .wordmark { font-size: 17px; }
  .page { padding-top: 28px; width: calc(100% - 24px); }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .scrim--drawer { align-items: flex-end; }
  .drawer { width: calc(100% - 12px); height: auto; max-height: 90dvh; margin: 0 6px calc(6px + var(--safe-b)); border-radius: 28px 28px 22px 22px; animation: sheet-up 0.45s var(--spring); }
  .drawer-body { padding: 4px 16px 24px; }
  .drawer-head { padding: 16px 10px 10px 18px; }
  .topbar .hide-xs { display: none; }
  .btn--collapse span:not(.ic) { display: none; }
  .btn--collapse { width: 40px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .backdrop::before { animation: none; }
}
