/* ClipMaster. Tokens follow the brand kit: Varko's blues on a mist page, one yellow highlight.
   The page is light; players and video frames stay dark so footage looks right. */
@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/static/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --blue: #005DAA;        /* primary: buttons, links, progress */
  --blue-deep: #004A88;   /* hover and pressed */
  --sky: #6CB6FF;
  --light-blue: #EFF8FF;  /* tinted panels, notices */
  --navy: #0F172A;        /* text */
  --deep-navy: #071426;   /* video frames */
  --white: #FFFFFF;
  --mist: #F3F5F8;        /* page */
  --slate: #5B6472;       /* secondary text */
  --line: #E2E8F0;
  --line-blue: #C9DDF3;
  --highlight: #FFE600;   /* the selected pill, the spoken word, markers. Nothing else. */
  --good: #15803D;
  --bad: #DC2626;
  --display: "Manrope", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --r: 8px;               /* buttons and inputs */
  --r-card: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--mist) radial-gradient(60% 420px at 50% 0, rgba(108, 182, 255, .26), rgba(108, 182, 255, 0) 70%) no-repeat;
  color: var(--navy);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
h1, h2, .brand { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; margin: 0; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 15px; margin: 0 0 6px; }
p { margin: 0 0 10px; }
a { color: var(--blue); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.04em; white-space: nowrap; color: var(--navy); }
.brand img { width: 28px; height: 28px; display: block; }
.brand b { font-weight: 700; color: var(--blue); }
.top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.project-pick select { min-height: 36px; padding: 4px 10px; font-weight: 600; max-width: 44vw; }
@media (max-width: 560px) {
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top-left { flex: 1 1 100%; justify-content: space-between; flex-wrap: wrap; row-gap: 8px; }
  .project-pick select { max-width: 52vw; min-width: 120px; }
  .top-right { flex: 1 1 100%; justify-content: space-between; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.mode button {
  appearance: none; text-align: left; padding: 12px 14px; border-radius: var(--r-card); border: 1px solid var(--line);
  background: var(--white); color: var(--navy); font: 600 15px var(--body); cursor: pointer;
}
.mode button small { display: block; font-weight: 400; color: var(--slate); font-size: 12px; margin-top: 3px; }
.mode button[aria-checked="true"] { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--light-blue); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--light-blue); color: var(--blue); margin-left: 6px; vertical-align: 2px; }
.formats { display: flex; gap: 6px; justify-content: center; padding: 8px; }
.formats:empty { display: none; }
.formats .pill { color: #fff; border-color: rgba(255, 255, 255, .35); }
.formats .pill[aria-pressed="true"] { background: var(--highlight); border-color: var(--highlight); color: var(--navy); }
.clip.wide { grid-column: span 2; }
.clip.wide .clip-thumb { aspect-ratio: 16 / 9; }
.member-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 4px; }
.member-list label { margin: 0; display: flex; align-items: center; gap: 6px; color: var(--navy); font-size: 13px; }
.member-list input { width: 18px; min-height: 18px; height: 18px; }
.proj { border-top: 1px solid var(--line); padding: 12px 0; }
.proj .inline { margin: 6px 0; }
.logo-preview { max-width: 140px; max-height: 70px; display: block; margin: 6px 0 10px; background: repeating-conic-gradient(#e2e8f0 0 25%, #f8fafc 0 50%) 0 0 / 14px 14px; border-radius: 6px; padding: 6px; }
.checks-row { display: flex; gap: 16px; margin: 6px 0 14px; }
.checks-row label { display: flex; align-items: center; gap: 6px; color: var(--navy); font-size: 14px; margin: 0; }
.top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-right form { flex: none; }
.who { color: var(--slate); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  appearance: none; background: none; border: 0; color: var(--slate);
  font: 500 13px var(--body); padding: 16px 4px 14px; cursor: pointer; position: relative;
}
.tabs button[aria-current="page"] { color: var(--blue); font-weight: 600; }
.tabs button[aria-current="page"]::before {
  content: ""; position: absolute; left: 22%; right: 22%; top: 0; height: 3px; background: var(--blue); border-radius: 0 0 3px 3px;
}
.count {
  display: inline-block; margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px;
}

main { padding: 16px; max-width: 1180px; margin: 0 auto; }
.banner { background: var(--light-blue); border: 1px solid var(--line-blue); border-left: 4px solid var(--blue); padding: 10px 12px; border-radius: var(--r); margin-bottom: 14px; }
.banner.bad { background: #FEF2F2; border-color: #FECACA; border-left-color: var(--bad); }
.hint { color: var(--slate); font-size: 13px; }
.error { color: var(--bad); }

.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-blue);
  background: var(--white); color: var(--blue); font: 500 14px var(--body); text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--blue); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn.go { background: var(--good); border-color: var(--good); color: #fff; }
.btn.danger { color: var(--bad); border-color: #FECACA; background: var(--white); }
.btn.danger:hover { border-color: var(--bad); }
.btn.quiet { background: none; border-color: transparent; min-height: 36px; padding: 0 10px; color: var(--slate); }
.btn.quiet:hover { border-color: var(--line); color: var(--navy); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }

input, textarea, select {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--white); color: var(--navy); font: 15px var(--body);
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); }
::placeholder { color: #94A3B8; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--blue); }
input[type="color"] { padding: 4px; width: 64px; }
label { display: block; font-size: 13px; color: var(--slate); margin-bottom: 12px; }
label > input, label > textarea, label > select { margin-top: 5px; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 15px; }

/* Recordings */
.upload { display: grid; gap: 10px; margin-bottom: 18px; }
.upload-btn { min-height: 56px; font-size: 16px; }
.import { display: grid; grid-template-columns: 1fr auto; gap: 5px; background: var(--white); border-radius: 12px; padding: 5px; box-shadow: var(--shadow); }
.import input { border-color: transparent; }
.inline { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.videos, .plain, .hooks { list-style: none; margin: 0; padding: 0; }
.video { padding: 16px 18px; margin-bottom: 12px; background: var(--white); border: 4px solid var(--white); outline: 1px solid var(--line); border-radius: var(--r-card); }
.video-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.video-title { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 16px; overflow-wrap: anywhere; }
.video-meta { color: var(--slate); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.video-meta span + span { margin-left: 12px; }
.video-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.stage-text { color: var(--slate); font-size: 13px; margin: 8px 0 0; }
.stage-text.bad { color: var(--bad); }

/* Four stages as one steady bar each, with the word beside it. */
.road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.lane { font-size: 12px; color: var(--slate); }
.lane-bar { height: 6px; margin-bottom: 5px; border-radius: 999px; position: relative; overflow: hidden; background: var(--line); }
.lane-fill { position: absolute; inset: 0 auto 0 0; background: var(--blue); border-radius: 999px; }
.lane.done { color: var(--navy); }
.lane.now { color: var(--blue); font-weight: 600; }
.road.failed .lane.now, .road.failed .lane.now .lane-fill { color: var(--bad); }
.road.failed .lane.now .lane-fill { background: var(--bad); }

.pill {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--slate); font: 500 13px var(--body); cursor: pointer;
}
.pill.review { border-color: var(--line-blue); color: var(--blue); }
.pill.approved { border-color: #BBE5CA; color: var(--good); }
.pill[aria-pressed="true"] { background: var(--highlight); color: var(--navy); border-color: var(--highlight); }

.empty { color: var(--slate); padding: 28px 0; max-width: 46ch; }
.empty strong { display: block; color: var(--navy); font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; font-size: 22px; margin-bottom: 6px; }

/* Review */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.clips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.clip {
  appearance: none; border: 0; padding: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.clip-thumb {
  position: relative; aspect-ratio: 9 / 16; background: var(--deep-navy); border-radius: var(--r-card); overflow: hidden;
  border: 4px solid var(--white); outline: 1px solid var(--line);
}
.clip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip.approved .clip-thumb { outline: 2px solid var(--good); }
.clip.rejected .clip-thumb { outline: 2px solid var(--bad); opacity: .55; }
.clip-len {
  position: absolute; right: 6px; bottom: 6px; background: rgba(7, 20, 38, .78); color: #fff; padding: 1px 7px; border-radius: 4px;
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.clip-flag { position: absolute; left: 6px; top: 6px; background: var(--white); color: var(--navy); padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.clip-busy { position: absolute; inset: 0; display: grid; place-items: center; color: #A3B1C6; font-size: 13px; padding: 8px; text-align: center; }
.clip-title { font-weight: 600; font-size: 14px; margin: 7px 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip-sub { color: var(--slate); font-size: 12px; }

dialog {
  border: 0; padding: 0; background: var(--mist); color: var(--navy);
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0;
}
dialog::backdrop { background: rgba(7, 20, 38, .6); }
.clip-view { display: grid; grid-template-rows: 46dvh minmax(0, 1fr); height: 100%; }
.player { background: var(--deep-navy); display: flex; justify-content: center; overflow: hidden; }
.player video { height: calc(46dvh - 48px); width: auto; max-width: 100%; background: #000; }
.player { flex-direction: column; align-items: center; }
.clip-side { padding: 14px 16px 24px; overflow-y: auto; min-height: 0; }
.clip-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.clip-head h2 { margin: 0; }
.status-line { font-size: 13px; color: var(--slate); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }

.publish { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.publish .actions { margin-bottom: 12px; }
.status-line.bad { color: var(--bad); }

/* Hooks and settings */
.cols { display: grid; gap: 28px; }
.hooks li { padding: 12px 0; border-top: 1px solid var(--line); }
.hook-text { font-weight: 600; font-size: 16px; }
.hook-why { color: var(--slate); font-size: 13px; margin-top: 2px; }
.plain li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.plain li > span { min-width: 0; overflow-wrap: anywhere; }
.plain small { display: block; color: var(--slate); }
#run-research { margin: 14px 0 6px; width: 100%; }
#tab-hooks h2 + .inline { margin-bottom: 6px; }
#tab-hooks .table-wrap { overflow-x: auto; }
#tab-hooks h2 { margin-top: 22px; }
#tab-hooks .cols > div > h2:first-child { margin-top: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 8px 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--slate); font-weight: 600; border-top: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.settings fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 16px 0 6px; }
.settings legend { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; font-size: 17px; padding: 0 10px 0 0; }
.settings .pair { margin: 0; }
.settings .save { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); padding: 10px 0; background: var(--mist); }
.settings .save .btn { width: 100%; }
.panel { background: var(--white); border: 4px solid var(--white); outline: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; margin-bottom: 16px; }
.panel .big { font-family: var(--display); font-weight: 500; letter-spacing: -0.04em; font-size: 30px; line-height: 1.1; }
.stack .btn { width: 100%; }
.invite { background: var(--light-blue); border: 1px solid var(--line-blue); border-radius: var(--r); padding: 10px 12px; font-size: 13px; overflow-wrap: anywhere; margin-top: 10px; }
.role { color: var(--blue); font-size: 12px; font-weight: 600; }
.checks { list-style: none; margin: 0 0 12px; padding: 0; }
.checks li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.checks strong { display: block; font-size: 14px; }
.mark { font-weight: 600; }
.mark.ok { color: var(--good); }
.mark.warn { color: #B45309; }
.mark.fail { color: var(--bad); }
#channels .btn { margin: 4px 6px 0 0; }
#tab-hooks #topics-title { margin-top: 26px; }

.upload-row { padding: 12px 0; border-top: 1px solid var(--line); }
.upload-row .lane-bar { margin-top: 8px; }

/* Sign-in and invite pages */
.gate { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.gate-card { width: 100%; max-width: 400px; background: var(--white); border: 4px solid var(--white); outline: 1px solid var(--line); border-radius: var(--r-card); padding: 28px 26px; box-shadow: var(--shadow); }
.gate-card .brand { margin-bottom: 26px; }
.gate-card h1 { font-size: 30px; font-weight: 500; letter-spacing: -0.04em; margin-bottom: 14px; }
.gate-card .btn { width: 100%; margin-top: 4px; }

@media (min-width: 820px) {
  body { padding-bottom: 0; }
  .tabs {
    position: static; display: flex; gap: 4px; padding: 0 16px; background: none; border-top: 0;
    border-bottom: 1px solid var(--line); max-width: 1180px; margin: 0 auto;
  }
  .tabs button { padding: 14px 16px; font-size: 14px; }
  .tabs button[aria-current="page"]::before { top: auto; bottom: -1px; left: 16px; right: 16px; border-radius: 3px 3px 0 0; }
  .top { max-width: 1180px; margin: 0 auto; border-bottom: 0; padding-bottom: 6px; }
  .who { max-width: none; }
  .upload { grid-template-columns: auto 1fr; align-items: center; }
  .upload-btn { padding: 0 28px; }
  .clips { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
  .cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; }
  dialog { width: min(980px, 94vw); height: min(760px, 92dvh); margin: auto; border-radius: 24px; box-shadow: 0 30px 80px rgba(7, 20, 38, .35); }
  .clip-view { grid-template-rows: minmax(0, 1fr); grid-template-columns: auto minmax(0, 1fr); }
  .player video { height: min(700px, calc(92dvh - 52px)); }
  dialog.wide .clip-view { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  dialog.wide .player video { height: auto; width: 100%; max-height: 52dvh; }
  .settings .save { bottom: 0; }
  .actions { grid-template-columns: repeat(4, auto); justify-content: start; }
}

@media (prefers-reduced-motion: no-preference) {
  .lane-fill { transition: width .6s ease; }
}

/* ---------- workspaces, switches and usage ---------- */
.meter { margin: 10px 0; }
.meter .lane-fill.over { background: var(--bad); }
.switches li { align-items: flex-start; gap: 12px; }
.switches li > span:first-child { display: grid; gap: 2px; }
.switches small { display: block; }
.switch-pair { display: grid; gap: 4px; white-space: nowrap; }
.switch-pair label.check { font-size: 13px; margin: 0; }
.pair3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 700px) { .pair3 { grid-template-columns: 1fr; } }

/* ---------- motion ----------
   Small and quick, and only opacity and transform, which the browser can run without redrawing the page.
   Lists that refresh by themselves are never animated, so nothing flickers while a job is running. */
@media (prefers-reduced-motion: no-preference) {
  .btn, .pill, .tabs button { transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .08s ease; }
  .btn:not(:disabled):active, .pill:active { transform: scale(.97); }
  .clip-thumb { transition: transform .16s ease; }
  .clip:hover .clip-thumb, .clip:focus-visible .clip-thumb { transform: translateY(-2px); }
  main > section:not([hidden]) { animation: rise .18s ease-out both; }
  .banner:not([hidden]) { animation: rise .16s ease-out both; }
  dialog[open] { animation: pop .16s ease-out both; }
  dialog[open]::backdrop { animation: fade .16s ease-out both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- player ---------- */
#player-dialog { padding: 14px 16px; overflow-y: auto; }
@media (min-width: 820px) { #player-dialog { width: min(1280px, 96vw); height: min(860px, 94dvh); padding: 18px 20px; } }
.player-wrap { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 18px; max-width: 1280px; margin: 0 auto; }
@media (max-width: 860px) { .player-wrap { grid-template-columns: 1fr; } }
.player-main video { width: 100%; max-height: 52vh; background: #000; border-radius: var(--r-card); display: block; border: 4px solid var(--white); outline: 1px solid var(--line); }
.player-side { display: flex; flex-direction: column; min-height: 0; max-height: calc(94dvh - 40px); background: var(--white); border: 4px solid var(--white); outline: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; }
.timeline { position: relative; height: 34px; margin: 12px 0 4px; border-radius: var(--r); background: var(--white); outline: 1px solid var(--line); cursor: pointer; overflow: hidden; }
.tl-item { position: absolute; top: 0; bottom: 0; padding: 0; border: 0; min-width: 2px; cursor: pointer; }
.tl-clip { top: 55%; background: var(--sky); border-radius: 2px; }
.tl-clip.rejected { opacity: .3; }
.tl-clip.approved, .tl-clip.published { background: var(--good); }
.tl-range { bottom: 50%; background: rgba(0, 93, 170, .18); border-inline: 2px solid var(--blue); }
.tl-pick { background: rgba(15, 23, 42, .1); border-inline: 2px solid var(--navy); }
.tl-cut { background: repeating-linear-gradient(135deg, rgba(220, 38, 38, .45) 0 4px, transparent 4px 8px); }
.tl-dot { top: 3px; bottom: auto; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--highlight); outline: 2px solid var(--navy); }
.tl-dot.comment { background: var(--white); }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--navy); pointer-events: none; z-index: 2; }
.legend .key { display: inline-block; width: 12px; height: 8px; margin: 0 4px 0 10px; border-radius: 2px; }
.legend .key.clip { background: var(--sky); } .legend .key.range { background: rgba(0, 93, 170, .35); }
.legend .key.dot { background: var(--highlight); outline: 1px solid var(--navy); border-radius: 50%; width: 8px; } .legend .key.cut { background: rgba(220, 38, 38, .55); }
.rangebar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; margin: 8px 0; border-radius: var(--r); background: var(--light-blue); border: 1px solid var(--line-blue); font-size: 13px; }
.speed { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--slate); margin: 0; }
.speed select { width: auto; min-height: 36px; margin: 0; }
.transcript { overflow-y: auto; flex: 1; min-height: 200px; line-height: 1.8; padding-right: 6px; }
.transcript p { margin: 0 0 12px; }
.transcript .w { cursor: pointer; border-radius: 3px; }
.transcript .w:hover { background: var(--light-blue); }
.transcript .w.now { background: var(--highlight); color: var(--navy); }
.transcript .w.cut { text-decoration: line-through; color: var(--slate); opacity: .6; }
.transcript ::selection { background: rgba(108, 182, 255, .45); }
.ts { background: none; border: 0; color: var(--slate); font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0 8px 0 0; }
.ts:hover { color: var(--blue); }
#player-markers { overflow-y: auto; flex: 1; }
.marker-row > span:first-child { display: grid; gap: 4px; flex: 1; min-width: 0; }
.marker-row input { min-height: 34px; }
.marker-row .note { white-space: pre-wrap; }

/* ---------- assistant ---------- */
.steer { display: grid; grid-template-columns: 1fr; gap: 0 12px; margin: -6px 0 14px; }
@media (min-width: 820px) { .steer { grid-template-columns: minmax(0, 1fr) 220px; } }
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-log { flex: 1; min-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 4px 8px 0; }
.msg { padding: 9px 13px; border-radius: 12px; font-size: 14px; max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--light-blue); border-bottom-left-radius: 4px; }
.inline-ts { padding: 0 2px; color: var(--blue); font-size: inherit; text-decoration: underline; }
.plan { align-self: stretch; border: 1px solid var(--line-blue); border-radius: 12px; padding: 10px 12px; background: var(--white); }
.plan .label { font: 600 12px/1.3 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--slate); margin: 0 0 4px; }
.plan li { display: block; padding: 6px 0; }
.plan li:first-child { border-top: 0; }
.plan small { display: block; }
.plan .good { color: var(--good); }
.plan.done { border-color: var(--line); }
.plan input { margin-top: 8px; min-height: 36px; font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan .row { margin-top: 8px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; max-height: 84px; overflow-y: auto; }
.chat-chips .pill { min-height: 28px; font-size: 12px; }
.recipe { display: inline-flex; align-items: center; }
.recipe .btn { min-height: 28px; padding: 0 6px; }
.chat-form textarea { min-height: 56px; }
.chat-form .row { margin-top: 6px; }

/* ---------- client review page and links ---------- */
.review-page { padding-bottom: 24px; }
.review-name { margin: 0; max-width: 260px; }
.review-title { font-size: 32px; font-weight: 500; letter-spacing: -0.04em; margin: 8px 0 6px; }
.review-clips { display: grid; gap: 16px; margin-top: 18px; }
.review-card { display: grid; gap: 16px; margin: 0; }
.review-video video { width: 100%; max-height: 70vh; background: var(--deep-navy); border-radius: var(--r-card); display: block; }
.review-card li { display: block; }
.review-card li .ts { padding-right: 8px; }
.review-card textarea { margin: 10px 0 8px; }
@media (min-width: 820px) { .review-card { grid-template-columns: 300px minmax(0, 1fr); } .review-card.wide { grid-template-columns: 1fr; } }
.client-note { margin: 6px 0; padding: 8px 10px; border-radius: var(--r); background: var(--light-blue); border: 1px solid var(--line-blue); font-size: 13px; }
.clip-flag.client { top: auto; bottom: 6px; left: 6px; background: var(--highlight); }
.shares { margin-top: 22px; }
.shares .btn { margin-bottom: 4px; }
.keys-form { grid-template-columns: 1fr 110px auto; }
.invite strong { overflow-wrap: anywhere; }

/* ---------- schedule ---------- */
.clips.schedule { display: block; max-width: 760px; }
.clips.schedule .day { margin: 22px 0 8px; font-size: 16px; }
.clips.schedule .day:first-child { margin-top: 0; }
.slot { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; cursor: pointer;
        padding: 12px 14px; margin-bottom: 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
        color: var(--navy); font: 14px var(--body); }
.slot:hover { border-color: var(--line-blue); }
.slot-time { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--blue); }
.slot-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-state { color: var(--slate); font-size: 12px; }
.slot.published .slot-time { color: var(--good); }
.slot.bad .slot-state { color: var(--bad); }
.marker-import { display: block !important; }
.marker-import summary { cursor: pointer; color: var(--blue); font-size: 13px; }
.marker-import textarea { margin: 8px 0; }
.switches li { flex-wrap: wrap; }
.switch-pair { white-space: normal; }
#rights-row { font-size: 14px; margin: -4px 0 14px; }
.activity { max-height: 320px; overflow-y: auto; }
.activity li { font-size: 14px; }
.gate-foot { margin: 16px 0 0; text-align: center; }
.legal-page { padding: 32px 20px 64px; }
.legal-text { max-width: 720px; margin: 0 auto; background: var(--white); border: 4px solid var(--white); outline: 1px solid var(--line); border-radius: var(--r-card); padding: 28px 30px; }
.legal-text h1 { font-size: 34px; font-weight: 500; letter-spacing: -0.04em; margin: 18px 0 16px; }
.legal-text p { max-width: 68ch; line-height: 1.65; }
.legal { font-size: 12px; }
#assist-dialog { width: min(680px, calc(100vw - 24px)); max-width: none; height: auto; max-height: none; margin: auto; background: transparent; }
.assist-wrap { display: flex; flex-direction: column; height: min(78dvh, 720px); background: var(--white); border-radius: var(--r-card); padding: 14px 16px; }
.assist-slot { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.empty .steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; }
