/* vidcap. Tokens follow the design specification in the "vidcap ux" thread. Light theme only for now. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --canvas: #F5F7FC;
  --surface: #FFFFFF;
  --text: #24324B;
  --text-2: #5B6780;
  --action: #3155D9;
  --action-hover: #2544BA;
  --selected: #EAF0FF;
  --success: #147D73;
  --success-bg: #E9F6F2;
  --warning: #8A5A0A;
  --warning-bg: #FFF4DA;
  --error: #B9384C;
  --error-bg: #FDEEF1;
  --divider: #DFE5EF;
  --boundary: #7B89A3;
  --stage: #10151F;
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem;
  --r-control: 8px; --r-card: 12px; --r-dialog: 16px;
  --t-quick: 140ms; --t-panel: 200ms; --t-done: 280ms;
  --z-menu: 20;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 400 1rem/1.5 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
h1 { font-size: 1.875rem; line-height: 2.375rem; font-weight: 650; margin: 0 0 var(--s2); }
h2 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; margin: 0; }
h3 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; margin: var(--s5) 0 var(--s2); }
p { margin: 0 0 var(--s3); }
a { color: var(--action); }
a:hover { color: var(--action-hover); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.muted, .hint { color: var(--text-2); }
.hint { font-size: 0.875rem; line-height: 1.25rem; max-width: 68ch; }
.sep::before { content: "/"; margin: 0 0.5em; color: var(--boundary); }

/* app shell */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap;
  min-height: 4rem; padding: var(--s2) var(--s6);
  background: var(--surface); border-bottom: 1px solid var(--divider);
}
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.125rem; min-height: 2.75rem; }
.brand:hover { color: var(--text); }
.brand-mark { width: 1.5rem; height: 1.5rem; flex: none; }
.nav { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.nav > a:not(.btn), .link {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s3);
  border-radius: var(--r-control); color: var(--text-2); text-decoration: none;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600;
}
.nav > a:not(.btn):hover, .link:hover { color: var(--text); background: var(--canvas); }
.nav > a[aria-current="page"] { color: var(--action); background: var(--selected); }
.nav > .btn { margin-left: var(--s2); }
.inline { display: inline; margin: 0; }
.link { background: none; border: 0; font-family: inherit; cursor: pointer; }

.wrap { max-width: 80rem; margin: 0 auto; padding: var(--s6) var(--s6) var(--s7); }
.narrow { max-width: 34rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head h1, .page-head p { margin: 0; }
.empty { max-width: 30rem; margin: var(--s7) auto; text-align: center; }
.empty svg { width: 7.5rem; height: auto; margin-bottom: var(--s4); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 2.75rem; padding: 0 var(--s4);
  border: 1px solid var(--action); border-radius: var(--r-control);
  background: var(--action); color: #fff;
  font: 600 0.875rem/1.25rem Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-quick) ease-out, border-color var(--t-quick) ease-out;
}
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--divider); border-color: var(--divider); color: var(--text-2); cursor: default; }
.btn-quiet { background: var(--surface); color: var(--text); border-color: var(--boundary); }
.btn-quiet:hover { background: var(--canvas); color: var(--text); border-color: var(--text); }
.btn-danger { color: var(--error); }
.btn-danger:hover { color: var(--error); border-color: var(--error); background: var(--error-bg); }
.btn-small { min-height: 2.25rem; padding: 0 var(--s3); }
.btn-big { min-height: 3rem; padding: 0 var(--s5); font-size: 1rem; }

/* forms */
label { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="number"], select {
  width: 100%; min-height: 2.75rem; padding: var(--s2) var(--s3);
  border: 1px solid var(--boundary); border-radius: var(--r-control);
  background: var(--surface); color: var(--text); font: 400 1rem/1.5rem Inter, system-ui, sans-serif;
}
input[readonly] { background: var(--canvas); }
.stack { display: grid; gap: var(--s2); justify-items: start; }
.stack > input, .stack > select { margin-bottom: var(--s3); max-width: 30rem; }
.stack > input[type="number"] { max-width: 10rem; }
.stack > h2 { margin-top: var(--s5); padding-bottom: var(--s2); border-bottom: 1px solid var(--divider); justify-self: stretch; }
.stack > h2:first-of-type { margin-top: 0; }
.stack > p { margin: 0 0 var(--s3); }
.check { display: flex; align-items: center; gap: var(--s3); min-height: 2.75rem; font-weight: 400; font-size: 1rem; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--action); flex: none; }
.field { margin-bottom: var(--s5); }
.field > label { display: block; margin-bottom: var(--s1); }
.field .hint { margin: var(--s2) 0; }
.actions { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.row { display: flex; gap: var(--s3); align-items: center; }
.row > select, .row > input { flex: 1 1 auto; min-width: 0; }

/* feedback: plain text beside the thing it is about. No tinted banners. */
.note { display: inline-flex; align-items: center; gap: var(--s1); font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.note svg { width: 1.125rem; height: 1.125rem; flex: none; }
.note-ok { color: var(--success); }
.note-error { color: var(--error); }
.note-line { margin: 0 0 var(--s3); }
.note-line:empty { display: none; }
.save-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.stack > .note { margin-bottom: var(--s2); }
.lead { font-size: 1.125rem; line-height: 1.75rem; max-width: 46rem; }
.flash { margin: 0 0 var(--s3); max-width: 46rem; font-weight: 600; color: var(--text); }
.flash-error { color: var(--error); }
.flash-warn { color: var(--warning); }

.panel { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); padding: var(--s5); margin-bottom: var(--s5); max-width: 46rem; }
.facts { display: grid; grid-template-columns: minmax(10rem, auto) 1fr; gap: var(--s2) var(--s5); margin: var(--s4) 0 0; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.log { max-height: 16rem; overflow: auto; padding: var(--s3); background: var(--canvas); border-radius: var(--r-control); font-size: 0.8125rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* status pill */
.pill { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3); border-radius: 999px; font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; background: var(--canvas); color: var(--text-2); border: 1px solid var(--divider); }
.pill::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--boundary); }
.pill[data-state="recording"] { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.pill[data-state="recording"]::before { background: var(--error); }
.pill[data-state="paused"] { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }
.pill[data-state="paused"]::before { background: var(--warning); border-radius: 2px; }

/* library */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(16.25rem, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); display: flex; flex-direction: column; transition: border-color var(--t-quick) ease-out; }
.card:hover, .card:focus-within { border-color: var(--boundary); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--stage); border-radius: 11px 11px 0 0; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dur { position: absolute; right: var(--s2); bottom: var(--s2); padding: 0.125rem var(--s2); border-radius: 999px; background: rgba(16, 21, 31, 0.86); color: #fff; font-size: 0.75rem; line-height: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.dur-warn { background: var(--warning-bg); color: var(--warning); }
.card-body { padding: var(--s4); display: grid; gap: var(--s1); }
.card-body h2 { font-size: 1rem; line-height: 1.5rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body h2 a { color: inherit; text-decoration: none; }
.card-body h2 a:hover { color: var(--action); }
.card-body p { margin: 0; font-size: 0.875rem; line-height: 1.25rem; }
.card-actions { display: flex; gap: var(--s2); margin-top: var(--s3); align-items: center; justify-content: space-between; }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + var(--s1)); z-index: var(--z-menu); min-width: 11rem; padding: var(--s2); background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); box-shadow: 0 8px 24px rgba(36, 50, 75, 0.16); display: grid; }
.menu-wide .menu-list { min-width: 19rem; }
.menu-item { display: flex; align-items: center; gap: var(--s3); min-height: 2.75rem; padding: var(--s2) var(--s3); border: 0; border-radius: 6px; background: none; color: var(--text); font: 500 1rem/1.5rem Inter, system-ui, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--canvas); color: var(--text); }
.menu-item > span:first-of-type { flex: 1; }
.menu-item small { display: block; font-size: 0.8125rem; line-height: 1.125rem; font-weight: 400; color: var(--text-2); }
.menu-item.danger { color: var(--error); }
.menu-item .ico:last-child { width: 1.125rem; height: 1.125rem; transform: rotate(-90deg); color: var(--text-2); transition: transform var(--t-quick) ease-out; }
.menu-item[aria-expanded="true"] .ico:last-child { transform: none; }
.menu-sub { margin: 0 0 var(--s1) 2.25rem; padding-left: var(--s2); border-left: 2px solid var(--divider); display: grid; }
.menu-sub .menu-item { font-size: 0.9375rem; min-height: 2.5rem; }
.menu-note { padding: var(--s2) var(--s3); color: var(--text-2); font-size: 0.875rem; }
.menu-list hr { border: 0; border-top: 1px solid var(--divider); margin: var(--s2) var(--s1); }
.ico { width: 1.375rem; height: 1.375rem; flex: none; }
.btn-menu { gap: var(--s2); min-height: 3rem; padding: 0 var(--s4); font-size: 1rem; }
.btn-menu .ico:last-child { width: 1.125rem; height: 1.125rem; }
details[open] > .btn-menu .ico:last-child { transform: rotate(180deg); }

/* controls under the player */
.controls { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s4); }
.controls-voice { display: flex; align-items: flex-start; gap: var(--s4); margin: 0; }
.controls-label { font-weight: 600; line-height: 3rem; }
.controls-voice .hint, .controls-download .hint { margin: var(--s1) 0 0; }
.controls-main { display: flex; gap: var(--s3); align-items: flex-start; flex-wrap: wrap; margin-left: auto; }
.controls-download .hint { text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--boundary); border-radius: var(--r-control); overflow: hidden; }
.seg button { min-height: 3rem; padding: 0 var(--s5); border: 0; background: var(--surface); color: var(--text); font: 600 1rem/1.5rem Inter, system-ui, sans-serif; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--boundary); }
.seg button[aria-pressed="true"] { background: var(--action); color: #fff; }
.seg button[aria-pressed="true"]::before { content: ""; display: inline-block; width: 0.7rem; height: 0.4rem; margin-right: var(--s2); border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translateY(-0.2rem); }
.share-line { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 0 0; padding-top: var(--s4); border-top: 1px solid var(--divider); color: var(--text-2); }
.owner-form { margin-top: var(--s5); padding: var(--s5); background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); }
.owner-form h2 { margin-bottom: var(--s2); }
.watch > .flash { margin-top: var(--s4); }

/* watch */
.watch { max-width: 64rem; margin: 0 auto; }
.watch-head { margin-bottom: var(--s4); }
.watch-head h1 { overflow-wrap: anywhere; margin-bottom: var(--s1); }
.watch-head p { margin: 0; }
.player { background: var(--stage); border-radius: var(--r-card); overflow: hidden; }
.player video { display: block; width: 100%; max-height: 76vh; background: var(--stage); }
.play-fail { padding: var(--s6) var(--s5); text-align: center; color: #fff; }
.play-fail p { max-width: 36rem; margin: 0 auto var(--s4); }
.watch-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s4); }
.watch-foot p { margin: 0; }

/* recorder */
.recorder { max-width: 46rem; }
.meter { flex: 0 0 8rem; display: flex; align-items: flex-end; gap: 3px; height: 1.5rem; }
.meter span { flex: 1; height: 20%; border-radius: 2px; background: var(--divider); }
.meter span.on { background: var(--success); }
.status-lines { list-style: none; margin: var(--s4) 0 var(--s4); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-control); display: grid; gap: var(--s1); font-size: 0.875rem; }
.status-lines strong { font-weight: 600; }

#panel-live { max-width: 60rem; }
.stage { position: relative; aspect-ratio: 16 / 9; background: var(--stage); border-radius: var(--r-card); overflow: hidden; }
.stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.count { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(16, 21, 31, 0.72); color: #fff; font-size: clamp(4rem, 16vw, 9rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.tray { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s4); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); }
.timer { font-size: 1.5rem; line-height: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4.5rem; }
.tray .actions { margin-left: auto; }
.tray .btn { min-height: 3rem; }
.tray-discard { margin-left: var(--s5); padding-left: var(--s5); border-left: 1px solid var(--divider); }

/* upload card and other big waiting states */
.upcard { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); overflow: hidden; }
.bigstatus { padding: var(--s7) var(--s5) var(--s6); text-align: center; background: var(--selected); }
.bigstatus h1, .bigstatus-title { font-size: 2rem; line-height: 2.5rem; font-weight: 700; margin: var(--s3) 0 var(--s2); color: var(--text); }
.bigstatus-pct { font-size: 3rem; line-height: 3.5rem; font-weight: 700; color: var(--action); font-variant-numeric: tabular-nums; margin: 0 0 var(--s3); }
.bigstatus-text { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; max-width: 30rem; margin: var(--s4) auto 0; }
.bigbar { height: 14px; max-width: 30rem; margin: 0 auto; border-radius: 999px; background: #fff; border: 1px solid var(--boundary); overflow: hidden; }
.bigbar span { display: block; height: 100%; width: 0; min-width: 14px; border-radius: 999px; background: var(--action); transition: width var(--t-panel) ease-out;
  background-image: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%); background-size: 200% 100%; animation: sheen 1.4s linear infinite; }
@keyframes sheen { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.bigstatus-icon { height: 3.5rem; display: grid; place-items: center; }
.bigstatus-icon svg { width: 3.5rem; height: 3.5rem; display: none; }
.spinner { width: 3rem; height: 3rem; border-radius: 50%; border: 5px solid #fff; border-top-color: var(--action); animation: spin 0.9s linear infinite; }
[data-state="ready"] .bigstatus { background: var(--success-bg); }
[data-state="ready"] .spinner, [data-state="interrupted"] .spinner { display: none; }
[data-state="ready"] .bigstatus-check { display: block; color: var(--success); }
[data-state="interrupted"] .bigstatus { background: var(--error-bg); }
[data-state="interrupted"] .bigstatus-stop { display: block; color: var(--error); }
.upcard-body { padding: var(--s5); }
.upcard-row { display: flex; gap: var(--s5); align-items: flex-start; margin-bottom: var(--s2); }
.upcard-thumb { position: relative; flex: 0 0 11rem; aspect-ratio: 16 / 9; background: var(--stage); border-radius: var(--r-control); overflow: hidden; }
.upcard-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.upcard-fields { flex: 1 1 auto; min-width: 0; }
.upcard-fields .field { margin-bottom: var(--s4); }
.upcard-bar { height: 4px; background: var(--divider); }
.upcard-bar span { display: block; height: 100%; width: 0; background: var(--action); transition: width var(--t-panel) ease-out; }
#panel-card { max-width: 44rem; margin: var(--s5) auto 0; }
.watch .bigstatus { border-radius: var(--r-card); margin-top: var(--s4); padding: var(--s6) var(--s5); }

/* updater */
.drop { display: grid; place-items: center; gap: var(--s1); text-align: center; padding: var(--s7) var(--s4); margin: var(--s4) 0; border: 2px dashed var(--boundary); border-radius: var(--r-card); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--action); background: var(--selected); }
.drop.busy { opacity: 0.6; pointer-events: none; }
.drop strong { font-size: 1rem; font-weight: 600; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.steps { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.steps li { padding-left: var(--s5); position: relative; }
.steps li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--success); }
.steps li.bad { color: var(--error); }
.steps li.bad::before { background: var(--error); }

/* people */
.invite-row { display: flex; gap: var(--s3); align-items: flex-end; flex-wrap: wrap; margin: var(--s3) 0; }
.invite-row > div { flex: 1 1 12rem; }
.invite-row > div:nth-child(2) { flex: 0 1 9rem; }
.invite-row label { display: block; margin-bottom: var(--s1); }
.linkbox { border-color: var(--action); background: var(--selected); }
.linkbox .hint { margin: var(--s2) 0 var(--s3); color: var(--text); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); }
.people { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.people th, .people td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--divider); vertical-align: middle; white-space: nowrap; }
.people th { font-weight: 600; color: var(--text-2); }
.people tbody tr:last-child td { border-bottom: 0; }
.people td.row-actions { text-align: right; white-space: normal; }
.row-actions .inline { display: inline-block; margin: 0.125rem 0 0.125rem var(--s1); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (max-width: 68.75rem) {
  .top, .wrap { padding-left: var(--s5); padding-right: var(--s5); }
}
@media (max-width: 43.75rem) {
  h1 { font-size: 1.625rem; line-height: 2.125rem; }
  .top, .wrap { padding-left: var(--s4); padding-right: var(--s4); }
  .wrap { padding-top: var(--s5); }
  .panel, .upcard-body { padding: var(--s4); }
  .upcard-row { flex-direction: column; }
  .upcard-thumb { flex-basis: auto; width: 100%; }
  .bigstatus h1, .bigstatus-title { font-size: 1.625rem; line-height: 2.125rem; }
  .row { flex-wrap: wrap; }
  .meter { flex-basis: 100%; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: var(--s2); }
  .tray .actions { margin-left: 0; }
  .tray-discard { margin-left: 0; padding-left: 0; border-left: 0; }
}

/* AI voice */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--s4); margin: var(--s3) 0 var(--s4); }
.compare label { display: block; margin-bottom: var(--s1); }
.compare audio { width: 100%; }
.plain { margin: var(--s3) 0 0; padding-left: 1.25rem; display: grid; gap: var(--s2); max-width: 68ch; }
.panel .upcard-bar { border-radius: 999px; overflow: hidden; margin: var(--s3) 0; }
.voice-line { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s3); }
.voice-line p { margin: 0; }
.people td.wrap-cell { white-space: normal; min-width: 12rem; }
.watch-more { margin: var(--s3) 0 0; text-align: right; font-size: 0.875rem; }

/* sign-in page */
.btn-wide { width: 100%; max-width: 30rem; }
.or { display: flex; align-items: center; gap: var(--s3); max-width: 30rem; color: var(--text-2); font-size: 0.875rem; margin: var(--s4) 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
#google-row { max-width: 30rem; width: 100%; margin-bottom: var(--s2); }

/* invitation requests */
.requests { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.requests li { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; padding: var(--s3) 0; border-top: 1px solid var(--divider); }

/* privacy policy and terms */
.legal { max-width: 46rem; }
.legal h2 { margin: var(--s6) 0 var(--s2); }
.legal ul { margin: 0 0 var(--s3); padding-left: 1.25rem; display: grid; gap: var(--s2); }
.legal-links { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--divider); }

/* animated narrator */
.player { position: relative; }
.narrator { position: absolute; left: 2.2%; bottom: max(4.5rem, 12%); width: clamp(4rem, 15%, 9.5rem); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid #fff; box-shadow: 0 4px 14px rgba(16, 21, 31, 0.35); pointer-events: none; }
.narrator svg, .narrator-face svg { display: block; width: 100%; height: 100%; }
.narrator-pick { border: 0; margin: var(--s4) 0; padding: 0; display: flex; gap: var(--s4); flex-wrap: wrap; }
.narrator-pick label { display: grid; justify-items: center; gap: var(--s2); padding: var(--s3); border: 2px solid var(--divider); border-radius: var(--r-card); cursor: pointer; font-weight: 600; position: relative; }
.narrator-pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.narrator-pick label:has(input:checked) { border-color: var(--action); background: var(--selected); }
.narrator-pick label:has(input:focus-visible) { outline: 2px solid var(--action); outline-offset: 2px; }
.narrator-face { width: 5.5rem; height: 5.5rem; border-radius: 50%; overflow: hidden; display: block; }

/* watch page: summary and the owner's tools */
.watch-summary { margin: var(--s3) 0 0; font-size: 1.0625rem; line-height: 1.6; max-width: 68ch; }
.owner-tools { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--divider); }
.owner-tools h2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; color: var(--text-2); margin-bottom: var(--s3); }
.owner-tools .flash { margin-top: var(--s3); }
.owner-tools .stack { margin-top: var(--s4); }
.owner-tools .watch-more { text-align: left; margin-top: var(--s4); }
textarea { width: 100%; max-width: 40rem; padding: var(--s2) var(--s3); border: 1px solid var(--boundary); border-radius: var(--r-control); background: var(--surface); color: var(--text); font: 400 1rem/1.5rem Inter, system-ui, sans-serif; resize: vertical; }
.stack > textarea { margin-bottom: var(--s2); }
#edit-title { max-width: 40rem; }

/* plans */
.tag { display: inline-block; padding: 0.125rem var(--s2); border-radius: 999px; background: var(--selected); color: var(--action); font-size: 0.75rem; line-height: 1rem; font-weight: 600; vertical-align: middle; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--s3) var(--s4); margin: var(--s3) 0; }
.plan-grid label { display: block; margin-bottom: var(--s1); }
.plan-grid input[type="number"] { max-width: none; }
.plan-set { display: flex; gap: var(--s2); align-items: center; }
.plan-set select { min-height: 2.25rem; width: auto; padding: 0 var(--s2); font-size: 0.875rem; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--s5); max-width: 56rem; margin-bottom: var(--s5); }
.plan-card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--r-card); padding: var(--s5); }
.plan-card.current { border: 2px solid var(--action); }
.plan-price { font-size: 1.5rem; line-height: 2rem; font-weight: 700; margin: var(--s1) 0 var(--s3); }
.plan-card .plain { margin-bottom: var(--s4); }

#stripe-row { max-width: 30rem; width: 100%; margin-bottom: var(--s2); }
.tag-alert { background: var(--error-bg); color: var(--error); }
