/* PulseCut design system, style 5: black, glass, white glow. docs/DESIGN_SYSTEM.md explains the rules; this file is the single source of the values.
   The look: a cutting bench at night. A black page, glass panels with a lit rim, one white glow per screen (the primary button),
   and one violet accent that means "the cut": the mark in the logo, a selection, progress. Figures (prices, stats, credits) are the
   heaviest text on a screen (.fig); timecodes are mono. Colour lives in the content: the clips. No gradients between hues, no coloured glows.
   Layers: 1) tokens  2) base  3) layout (bar, page, sub-tabs)  4) primitives  5) patterns (landing, auth, plans, stats, charts)  6) screens. */

/* 1. tokens ------------------------------------------------------------------------------------------------ */
@property --spec { syntax: "<number>"; inherits: false; initial-value: 0; }
:root {
  color-scheme: dark;
  /* colour: the only place a colour literal is written (a few mock-ups and one-off glows aside). White and black tints come in a few steps. */
  --white: #fff; --black: #000;
  --w-04: rgba(255,255,255,.04); --w-08: rgba(255,255,255,.08); --w-12: rgba(255,255,255,.12); --w-20: rgba(255,255,255,.2);
  --k-20: rgba(0,0,0,.2); --k-60: rgba(0,0,0,.6); --k-85: rgba(0,0,0,.85);
  --grey-1: #222226; --grey-2: #3a3a40;
  /* surfaces: black page, glass panels (white at 4% / 8%), raised = an opaque near-black for sheets and menus. Lines are white at 8% and 20%. */
  --bg: var(--black); --panel: var(--w-04); --panel-2: var(--w-08); --raised: #0e0e11; --line: var(--w-08); --line-strong: var(--w-20);
  --text: #f5f5f7; --muted: rgba(245,245,247,.64); --faint: rgba(245,245,247,.49);
  /* the accent (the cut) and the ink on light and accent fills */
  --accent: #9d8bff; --accent-soft: rgba(157,139,255,.15); --accent-text: #c6bbff;
  --ink: #08080a; --white-2: #dcdce2; --paper: #e4e4ea;
  --chrome-bg: rgba(20,20,24,.96); --chip-bg: rgba(40,40,46,.92);
  /* success green of the landing mock-up (an upload that finishes) */
  --tg: #2aabee; --tg-shadow: rgba(0,25,50,.6);
  --ok: #30d158; --ok-light: #9ff0b4; --ok-ink: #04190b;
  /* status */
  --green: #4ade80; --amber: #fbbf24; --red: #fb7185; --blue: #74a5ff;
  /* glass: the rim is a hairline plus a lit top edge; glow is the white halo of the main button */
  --glass-rim: inset 0 0 0 .67px var(--w-12), inset 0 1px 0 var(--w-20);
  --glass-blur: blur(24px) saturate(1.6);
  --btn-bg: linear-gradient(180deg, var(--white), var(--white-2));
  --btn-glow: inset 0 -1px 0 var(--k-20), 0 0 0 1px rgba(255,255,255,.35), 0 0 20px rgba(255,255,255,.24), 0 0 56px rgba(255,255,255,.1);
  --btn-glow-hover: inset 0 -1px 0 var(--k-20), 0 0 0 1px rgba(255,255,255,.5), 0 0 28px rgba(255,255,255,.4), 0 0 80px rgba(255,255,255,.16);
  --plan-glow: inset 0 0 0 1px rgba(255,255,255,.6), 0 0 60px -10px rgba(255,255,255,.18);
  --chart-glow: drop-shadow(0 0 8px rgba(255,255,255,.55));
  /* shape, depth, motion */
  --r-s: 8px; --r-m: 10px; --r-l: 14px; --r-xl: 20px; --r-2xl: 28px; --r-pill: 99px; --radius: var(--r-l);
  --shadow-2: 0 20px 50px -16px var(--k-85);
  --shadow-3: 0 40px 100px -20px var(--k-85);
  --ease: cubic-bezier(.22,1,.36,1); --fast: .15s; --slow: .3s;
  /* spacing scale: 2 4 6 8 12 16 24 32 */
  --s0: 2px; --s1: 4px; --s1-5: 6px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  /* type: eight sizes and three line heights (tight for display, snug for titles, body for running text) */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-28: 28px; --fs-40: 40px; --fs-56: 56px;
  --lh-tight: 1.15; --lh-snug: 1.3; --lh-body: 1.5;
  /* three weights: text 400, labels and controls 500, headings 600; figures (prices, stats, credits) 700 with tight tracking */
  --w-label: 500; --w-head: 600; --w-fig: 700;
  --bar-h: 56px; --tab-h: 56px; --page-w: 1280px; --side-w: 248px;
}

/* 2. base -------------------------------------------------------------------------------------------------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-14)/var(--lh-body) var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overscroll-behavior-y: contain; }
/* Cards are flat glass (a white tint and a lit rim, no backdrop-filter: a filter on a card would trap the fixed sheets inside it).
   Real blur only on chrome that holds nothing fixed: the sidebar, the top bars, the tabs, sheets and toasts.
   One white glow per screen: the main button. The pointer carries a soft light; leaf cards lean toward it. */
@property --px { syntax: "<length-percentage>"; inherits: true; initial-value: 50%; }
@property --py { syntax: "<length-percentage>"; inherits: true; initial-value: 20%; }
body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(560px circle at var(--px, 50%) var(--py, 20%), var(--w-08), transparent 60%); }
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(60% 45% at 50% -8%, var(--w-12), transparent 70%), radial-gradient(40% 30% at 60% 105%, var(--w-04), transparent 70%); }
#root { position: relative; z-index: 1; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-decoration: none; }
h1 { font-size: var(--fs-28); line-height: var(--lh-tight); font-weight: var(--w-head); letter-spacing: -.015em; margin: 0; }
h2 { font-size: var(--fs-16); line-height: var(--lh-snug); font-weight: var(--w-head); letter-spacing: -.005em; margin: 0; }
h3 { font-size: var(--fs-14); line-height: var(--lh-snug); font-weight: var(--w-head); margin: 0; }
/* a figure: a number that is the point of its card (price, stat, credits) */
.fig { font-weight: var(--w-fig); font-variant-numeric: tabular-nums; letter-spacing: -.03em; color: var(--text); }
p { margin: 0; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-s); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: var(--fs-13); } .mono, .tc { font-family: var(--mono); font-variant-numeric: tabular-nums; } .grow { flex: 1; min-width: 0; } .num { font-variant-numeric: tabular-nums; }
.tc { font-size: var(--fs-12); color: var(--faint); }
.row { display: flex; align-items: center; gap: var(--s3); } .wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: var(--s3); } .between { justify-content: space-between; } .center { justify-content: center; text-align: center; }
.gap-s { gap: var(--s2); } .stack { display: flex; flex-direction: column; gap: var(--s5); }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid { display: grid; gap: var(--s4); } .grid.c2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } .grid.c3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } .grid.c4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.rows { display: flex; flex-direction: column; } .rows > * { padding: var(--s2) 0; border-top: 1px solid var(--line); } .rows > *:first-child { border-top: 0; }

/* 3. layout: a glass sidebar on wide screens; on a phone a glass bar on top and floating glass tabs at the bottom --- */
.shell { min-height: 100dvh; }
.brand { display: inline-flex; align-items: center; color: var(--text); flex: none; }
.logo { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text); flex: none; }
.logo svg { width: 20px; height: 20px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.logo-pulse { stroke: currentColor; } .logo-cut { stroke: var(--accent); }
.logo b { font-size: var(--fs-16); font-weight: 600; }
.logo.lg svg { width: 40px; height: 40px; }
.boot { min-height: 100dvh; display: flex; align-items: center; justify-content: center; }
.bar-tools { display: flex; align-items: center; gap: var(--s2); margin-left: auto; flex: none; }
.side { display: none; }
.m-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s3); height: var(--bar-h); padding: env(safe-area-inset-top) var(--s4) 0; box-sizing: content-box;
  background: var(--k-60); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--line); }
.tabs { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; padding: var(--s1); border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--raised) 60%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-rim), var(--shadow-2); }
.tabs a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s0); min-height: 48px; padding: 0 var(--s0); border-radius: var(--r-xl); color: var(--muted); font-size: var(--fs-12); font-weight: 500; transition: color var(--fast), background var(--fast); }
.tabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs a.on { color: var(--text); background: var(--w-08); box-shadow: inset 0 1px 0 var(--w-20); }
.main { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: var(--s4) var(--s4) calc(var(--tab-h) + 96px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .m-top, .tabs { display: none; }
  .side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s0); padding: 20px var(--s3) var(--s4);
    background: var(--chrome-bg); border-right: 1px solid var(--line); }
  .side > .brand { padding: var(--s1) 10px var(--s5); }
  .main { padding: var(--s6) var(--s6) 96px; }
}
.side-nav { display: grid; gap: var(--s0); }
.side-nav a { display: flex; align-items: center; gap: var(--s3); height: 36px; padding: 0 10px; border-radius: var(--r-s); color: var(--muted); font-size: var(--fs-14); font-weight: 500; transition: background var(--fast), color var(--fast); }
.side-nav a svg.i { width: 18px; height: 18px; flex: none; }
.side-nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav a:hover { background: var(--w-04); color: var(--text); }
.side-nav a.on { background: var(--w-08); color: var(--text); box-shadow: inset 0 1px 0 var(--w-20), inset 0 0 0 .67px var(--w-12), 0 0 24px -6px var(--w-20); }
.side-sec { padding: var(--s5) 10px var(--s2); font-size: var(--fs-13); color: var(--faint); font-weight: 500; }
.side-end { margin-top: auto; padding-top: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.side-credits { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border-radius: var(--r-l); background: var(--panel); box-shadow: var(--glass-rim); color: var(--muted); font-size: var(--fs-13); }
.side-credits b { color: var(--text); font-weight: var(--w-fig); }
.side-credits .bar i { background: linear-gradient(90deg, var(--accent-text), var(--white)); box-shadow: 0 0 12px var(--w-20); }
.side-me { display: flex; align-items: center; gap: 10px; padding: var(--s1) var(--s0); min-width: 0; }
.side-me a.grow { display: flex; flex-direction: column; color: var(--text); min-width: 0; }
.side-me b { font-size: var(--fs-13); font-weight: 500; } .side-me small { font-size: var(--fs-12); color: var(--faint); }
/* language: two letters, the chosen one in ink */
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; flex: none; }
.lang button { border: 0; background: none; padding: 0 var(--s2); height: 30px; font-size: var(--fs-12); font-weight: 500; color: var(--faint); cursor: pointer; transition: color var(--fast), background var(--fast); }
.lang button:hover { color: var(--text); } .lang button.on { background: var(--panel-2); color: var(--text); }
/* sub-tabs of a group (account, admin) */
.subnav { display: flex; gap: var(--s5); border-bottom: 1px solid var(--line); margin: 0 0 var(--s5); overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 0 0 var(--s3); color: var(--muted); font-size: var(--fs-14); font-weight: 500; white-space: nowrap; transition: color var(--fast); }
.subnav a:hover { color: var(--text); } .subnav a.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
/* first steps: three linked steps over the clips list */
.setup { display: grid; grid-template-columns: 1fr; gap: var(--s2); margin: 0 0 var(--s5); }
.setup a { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid transparent; border-radius: var(--r-l); background: var(--panel); box-shadow: var(--glass-rim); color: var(--muted); font-weight: 500; transition: border-color var(--fast); }
.setup a.next { color: var(--text); border-color: var(--line-strong); } .setup a.done { color: var(--faint); background: none; }
.setup a:hover { border-color: transparent; background: var(--panel-2); }
.setup-n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font: 500 var(--fs-12) var(--mono); flex: none; }
.setup a.next .setup-n { background: var(--accent); border-color: var(--accent); color: var(--ink); } .setup-n svg.i { width: 14px; height: 14px; }
@media (min-width: 600px) { .setup { grid-template-columns: repeat(3, 1fr); gap: var(--s3); } }
.head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); min-height: 40px; }
.head .back { margin-left: -8px; }
.head .sub { color: var(--muted); font-size: var(--fs-14); margin-top: var(--s0); font-weight: 400; }
.section { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s6); }
.section > .section-head { display: flex; align-items: baseline; gap: var(--s3); }
.section > .section-head p { color: var(--muted); font-size: var(--fs-14); }

/* 4. primitives -------------------------------------------------------------------------------------------- */
.card { background: var(--panel); border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--glass-rim); padding: var(--s4); }
.card.pad-l { padding: var(--s5); }
.card.tap { display: block; color: inherit; cursor: pointer; transition: transform .6s var(--ease), box-shadow .3s, --spec .4s; }
.card.tap:hover { border-color: transparent; background: var(--panel-2); }
.list { display: flex; flex-direction: column; gap: var(--s2); }
.item { display: flex; gap: var(--s3); align-items: center; color: inherit; min-width: 0; padding: var(--s3) var(--s4); background: var(--panel); border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--glass-rim); }
a.item:hover, .item.tap:hover { border-color: transparent; background: var(--panel-2); }
.hint { color: var(--muted); font-size: var(--fs-13); }
.empty { text-align: center; color: var(--muted); padding: 48px var(--s4); display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.empty b { display: block; color: var(--text); font-size: var(--fs-16); font-weight: 500; }
.skel { display: flex; flex-direction: column; gap: var(--s2); }
.skel i { display: block; height: 72px; border-radius: var(--radius); background: var(--panel-2); }
.skel i:nth-child(2) { opacity: .7; } .skel i:nth-child(3) { opacity: .45; }
/* motion: a page fades and rises once; presses shrink a little; nothing loops. Keyframes end in the natural state (no "forwards"),
   so no transform is left on .main to trap the fixed sheets and the editor that live inside it. */
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.main > *:not(.sheet-back, .editor-overlay) { animation: enter .32s var(--ease) backwards; }
.main > *:nth-child(2):not(.sheet-back, .editor-overlay) { animation-delay: .04s; } .main > *:nth-child(n+3):not(.sheet-back, .editor-overlay) { animation-delay: .08s; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--panel); cursor: pointer; font-weight: 500; font-size: var(--fs-14); white-space: nowrap; transition: background var(--fast), border-color var(--fast), transform var(--fast); }
.btn:hover { background: var(--panel-2); } .btn:active { transform: scale(.98); }
.btn.primary, .btn.brand { position: relative; overflow: hidden; background: var(--btn-bg); border-color: transparent; color: var(--ink); box-shadow: var(--btn-glow); }
.btn.primary:hover, .btn.brand:hover { box-shadow: var(--btn-glow-hover); }
.btn.primary:disabled, .btn.primary[disabled] { box-shadow: none; }
.btn.primary::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, var(--white) 50%, transparent 65%); mix-blend-mode: overlay; transform: translateX(-120%); transition: transform .8s var(--ease); pointer-events: none; }
.btn.primary:hover::before { transform: translateX(120%); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: var(--red); } .btn.sm { min-height: 32px; padding: 0 var(--s3); font-size: var(--fs-14); } .btn.lg { min-height: 48px; padding: 0 var(--s5); font-size: var(--fs-16); border-radius: var(--r-m); } .btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
a.btn:not(.primary):not(.brand) { color: var(--text); }
.icon-btn { width: 36px; height: 36px; border-radius: var(--r-s); border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); transition: background var(--fast), color var(--fast); }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.chip { display: inline-flex; align-items: center; gap: var(--s1); padding: var(--s0) var(--s2); border-radius: var(--r-s); font-size: var(--fs-12); font-weight: 500; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.chip.green { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.chip.amber { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.chip.red { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.chip.blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.chip.accent { color: var(--accent-text); background: var(--accent-soft); }
.chip.pro { color: var(--text); background: var(--panel-2); }
.chip svg.i { width: 14px; height: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; } .dot.green { background: var(--green); } .dot.amber { background: var(--amber); } .dot.red { background: var(--red); }
.seg { display: flex; background: var(--panel-2); border-radius: var(--r-m); padding: var(--s0); gap: var(--s0); margin-bottom: var(--s4); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.seg::-webkit-scrollbar { display: none; }
.seg.inline { display: inline-flex; margin: 0; }
.seg button, .seg .seg-btn { flex: 1 0 auto; border: 0; background: transparent; padding: var(--s1-5) var(--s3); border-radius: var(--r-s); font-weight: 500; color: var(--muted); cursor: pointer; font-size: var(--fs-14); white-space: nowrap; text-align: center; scroll-snap-align: start; transition: color var(--fast), background var(--fast); }
.seg button.on, .seg .seg-btn.on { background: var(--panel); color: var(--text); }
.pills { display: flex; gap: var(--s2); margin: 0 0 var(--s4); overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; padding: var(--s1) var(--s3); border-radius: var(--r-s); border: 1px solid var(--line); color: var(--muted); font-size: var(--fs-14); font-weight: 500; white-space: nowrap; cursor: pointer; background: transparent; }
.pill.on { background: var(--text); border-color: var(--text); color: var(--ink); }
.fold { margin-bottom: var(--s3); padding: 0; }
.fold > summary { list-style: none; cursor: pointer; padding: var(--s4); display: flex; flex-direction: column; gap: var(--s0); position: relative; padding-right: 40px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform var(--fast); }
.fold[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.fold-body { padding: 0 var(--s4) var(--s4); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.puberr { margin-top: var(--s2); font-size: var(--fs-13); color: var(--red); display: flex; flex-direction: column; gap: var(--s1); overflow-wrap: anywhere; }
.puberr details summary { cursor: pointer; color: var(--muted); }
.puberr pre { white-space: pre-wrap; margin: var(--s2) 0 0; max-height: 180px; overflow: auto; font-size: var(--fs-12); color: var(--muted); background: var(--panel-2); padding: var(--s2); border-radius: var(--r-s); }
.bar { height: 4px; border-radius: var(--r-s); background: var(--panel-2); overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-text), var(--white)); border-radius: var(--r-s); transition: transform var(--slow); }

label.f, div.f { display: flex; flex-direction: column; gap: var(--s2); font-size: var(--fs-13); font-weight: 500; color: var(--muted); align-items: stretch; }
div.f > .seg { align-self: flex-start; }
input.in, select.in, textarea.in { width: 100%; min-height: 40px; padding: var(--s2) var(--s3); border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-size: var(--fs-16); transition: border-color var(--fast), box-shadow var(--fast); }
input.in:hover, select.in:hover, textarea.in:hover { border-color: var(--faint); }
input.in:focus, select.in:focus, textarea.in:focus { outline: 0; border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent); }
input.in::placeholder, textarea.in::placeholder { color: var(--faint); }
textarea.in { min-height: 120px; font-family: var(--mono); font-size: var(--fs-13); line-height: var(--lh-body); resize: vertical; }
textarea.in.plain { font-family: var(--font); font-size: var(--fs-14); min-height: 84px; }
.sw { display: flex; align-items: center; gap: var(--s3); min-height: 40px; cursor: pointer; }
.sw input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: var(--r-m); background: var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background var(--fast); margin: 0; }
.sw input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px var(--k-20); transition: transform var(--fast) var(--ease); }
.sw input:checked { background: var(--accent); } .sw input:checked::after { transform: translateX(16px); }

.sheet-back { position: fixed; inset: 0; z-index: 50; background: var(--k-60); display: flex; align-items: flex-end; justify-content: center; animation: fade var(--fast) ease-out; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: color-mix(in srgb, var(--raised) 82%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 20px var(--s4) calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s4); box-shadow: var(--glass-rim), var(--shadow-3); animation: rise var(--slow) var(--ease); }
.sheet.wide { max-width: 980px; }
.sheet .banner, .auth-form .banner { margin: 0; }
@media (min-width: 600px) { .sheet-back { align-items: center; } .sheet { border-radius: var(--r-xl); padding: var(--s5); } }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.toasts { position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: var(--s2); align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--ink); padding: var(--s2) var(--s4); border-radius: var(--r-m); font-size: var(--fs-14); font-weight: 500; max-width: 520px; box-shadow: var(--glass-rim), var(--shadow-2); animation: rise var(--slow) var(--ease); }
.toast.error { background: var(--red); color: var(--ink); } .toast.ok { background: var(--green); color: var(--ink); }
.banner { background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); border-radius: var(--r-s); padding: var(--s2) var(--s3); font-size: var(--fs-14); margin-bottom: var(--s4); }
.banner.red { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.banner.info { background: var(--panel-2); color: var(--text); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.table th { text-align: left; font-size: var(--fs-13); font-weight: 500; color: var(--faint); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; } .table tbody tr:hover td { background: var(--panel-2); }
.table-wrap { overflow-x: auto; border: 1px solid transparent; border-radius: var(--radius); background: var(--panel); box-shadow: var(--glass-rim); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-weight: 500; font-size: var(--fs-13); flex: none; text-transform: uppercase; border: 1px solid var(--line); }
.avatar.on { border-color: var(--accent); }

/* 5. patterns ---------------------------------------------------------------------------------------------- */
/* landing: the product in one picture, then three plain lists */
.land { max-width: var(--page-w); margin: 0 auto; padding: 0 var(--s4); }
.land-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s3); height: var(--bar-h); margin: 0 calc(-1 * var(--s4)); padding: 0 var(--s4); background: var(--k-60); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--line); }
.land-top .icon-btn { display: none; }
.land-nav { display: none; gap: var(--s5); margin-left: var(--s4); } .land-nav a, .land-login, .land-foot a { color: var(--muted); font-size: var(--fs-14); transition: color var(--fast); }
.land-nav a:hover, .land-login:hover, .land-foot a:hover { color: var(--text); }
.land-login { padding: 0 var(--s1); }
.hero { display: grid; grid-template-columns: 1fr; gap: 48px; padding: 48px 0 64px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: var(--s5); align-items: flex-start; }
.hero h1 { font-size: var(--fs-40); line-height: var(--lh-tight); letter-spacing: -.03em; font-weight: var(--w-head); max-width: 12em; }
.hero h1 span { display: block; } .hero h1 span + span { color: var(--faint); }
.hero h1 span:first-child { background: linear-gradient(100deg, var(--white) 20%, var(--muted) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 24px var(--w-20)); }
.hero p { font-size: var(--fs-16); line-height: var(--lh-body); color: var(--muted); max-width: 32em; }
.hero-note { font-size: var(--fs-13); color: var(--faint); }
/* a clip frame: the picture, its words and its length (inside the phones of the landing) */
.cut-frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-s); color: var(--white); display: flex; align-items: flex-end; justify-content: center; padding: 0 var(--s2) 24%; text-align: center; overflow: hidden; }
.cut-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, var(--k-60)); pointer-events: none; }
.cut-frame b { position: relative; z-index: 1; font-size: var(--fs-14); line-height: var(--lh-tight); font-weight: 700; text-transform: uppercase; text-shadow: 0 1px 2px var(--k-60); }
.cut-frame .tc { position: absolute; z-index: 1; top: 8px; left: 8px; color: var(--white); background: var(--k-60); padding: 0 var(--s1); border-radius: var(--r-s); font-size: var(--fs-12); }
/* hero: three phones on a 3D stage, two glass chips; the stage turns with the pointer (or the scroll on a phone) */
.stage { position: relative; height: 460px; perspective: 1100px; --sx: 0; --sy: 0; }
.phone { position: absolute; top: 50%; left: 50%; width: 180px; aspect-ratio: 9 / 19.2; margin: -192px 0 0 -90px; border-radius: 34px; padding: var(--s1-5);
  background: linear-gradient(160deg, var(--grey-2), var(--raised) 40%, var(--grey-1));
  box-shadow: inset 0 0 0 1.5px var(--w-12), inset 0 1px 1px var(--w-20), 0 50px 100px -30px var(--k-85), 0 0 80px -20px var(--w-20);
  transform-style: preserve-3d; transition: transform .9s var(--ease); animation: bob 7s ease-in-out infinite; animation-delay: calc(var(--d) * -2.3s); }
@keyframes bob { 50% { translate: 0 -12px; } }
.phone-in { position: relative; height: 100%; border-radius: var(--r-2xl); overflow: hidden; }
.phone-in .cut-frame { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; padding: 0 var(--s3) 26%; }
.phone-in .cut-frame b { font-size: var(--fs-14); }
.phone-in .cut-frame .tc { top: 14px; left: 14px; }
.p0 .cut-frame { background: var(--raised) url("img/clip-1m.jpg") 39% 50% / cover no-repeat; }
.p1 .cut-frame { background: var(--raised) url("img/clip-2.jpg") 50% 30% / cover no-repeat; }
.p2 .cut-frame { background: var(--raised) url("img/clip-3.jpg") 33% 50% / cover no-repeat; }
.p1 { z-index: 3; transform: translate3d(0, calc(var(--sy) * -20px), 80px) rotateX(calc(var(--sy) * 12deg)); }
.p0 { z-index: 2; transform: translate3d(-110px, 30px, -60px) rotateY(calc(26deg + var(--sy) * 10deg)) rotateZ(-4deg); }
.p2 { z-index: 1; transform: translate3d(110px, 30px, -60px) rotateY(calc(-26deg - var(--sy) * 10deg)) rotateZ(4deg); }
.float { position: absolute; z-index: 5; display: none; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4) var(--s3) var(--s3); border-radius: var(--r-xl); font-size: var(--fs-13); line-height: var(--lh-snug);
  background: var(--chip-bg); box-shadow: var(--glass-rim), var(--shadow-2);
  transform: translate3d(calc(var(--sx) * -40px), calc(var(--sy) * -30px), 0); transition: transform .9s var(--ease); animation: bob 6s ease-in-out infinite; }
.float svg.i { width: 36px; height: 36px; padding: var(--s2); border-radius: var(--r-m); background: var(--w-08); color: var(--white); flex: none; }
.float b { display: block; font-size: var(--fs-14); font-weight: 500; } .float small { color: var(--muted); }
.f1 { display: flex; left: 0; top: 2%; animation-delay: -1s; }
.f2 { right: -4%; top: 6%; animation-delay: -3s; }

.land-sec { padding: 64px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: var(--s6); scroll-margin-top: calc(var(--bar-h) + 16px); }
.land-sec h2 { font-size: var(--fs-20); line-height: var(--lh-tight); }
/* how it works: three glass step cards in a row, then the episode with its clips at a fixed size; features: four glass cards */
.land-steps, .land-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--s3); }
.land-steps li, .land-list > div { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); border: 0; border-radius: var(--r-xl); background: var(--panel); box-shadow: var(--glass-rim); transition: transform .6s var(--ease), box-shadow .3s, --spec .4s; }
.land-steps .tc { color: var(--accent-text); font-size: var(--fs-13); line-height: var(--lh-body); margin-bottom: var(--s2); }
.land-steps h3, .land-list h3 { font-size: var(--fs-16); line-height: var(--lh-body); }
.land-steps p, .land-list p { color: var(--muted); font-size: var(--fs-14); line-height: var(--lh-body); max-width: 36em; }
.feat-ico { width: 44px; height: 44px; margin-bottom: var(--s2); display: grid; place-items: center; border-radius: var(--r-m); color: var(--text);
  background: linear-gradient(180deg, var(--w-08), var(--w-04)), var(--panel-2);
  box-shadow: inset 0 1px 0 var(--w-12), inset 0 0 0 1px var(--w-08), 0 8px 24px -12px var(--k-85); }
.feat-ico svg { width: 20px; height: 20px; stroke-width: 1.5; }
.land-cta { margin: var(--s6) 0 80px; padding: 56px var(--s5); border: 0; border-radius: var(--r-xl); display: flex; flex-direction: column; gap: var(--s5); align-items: center; text-align: center;
  background: radial-gradient(70% 120% at 50% 0%, var(--w-12), transparent 70%), var(--panel); box-shadow: var(--glass-rim), 0 0 80px -30px var(--w-20); }
.land-cta h2 { font-size: var(--fs-28); line-height: var(--lh-tight); max-width: 16em; margin: 0 auto; }
.land-foot { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3) var(--s4); padding: var(--s5) 0 var(--s6); border-top: 1px solid var(--line); }
.land-foot .support { color: var(--text); }
@media (min-width: 600px) { .land { padding: 0 var(--s5); } .land-top { gap: var(--s4); margin: 0 calc(-1 * var(--s5)); padding: 0 var(--s5); } .land-top .icon-btn { display: inline-flex; } .land-nav { display: flex; }
  .land-sec { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding: 80px 0; } .land-sec.wide { grid-template-columns: 1fr; gap: var(--s6); } .land-sec h2 { font-size: var(--fs-28); }
  .land-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); } .land-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
  .cut-frame b { font-size: var(--fs-14); }
  .land-cta { padding: 80px 48px; } .land-cta h2 { font-size: var(--fs-40); } }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; padding: 104px 0 128px; } .hero h1 { font-size: var(--fs-56); letter-spacing: -.03em; }
  .stage { height: 600px; perspective: 1600px; }
  .phone { width: 236px; margin: -252px 0 0 -118px; border-radius: 42px; padding: var(--s2); }
  .phone-in { border-radius: 34px; }
  .p1 { transform: translate3d(calc(var(--sx) * 36px), calc(var(--sy) * 24px), 80px) rotateY(calc(var(--sx) * 24deg)) rotateX(calc(var(--sy) * -16deg)); }
  .p0 { transform: translate3d(calc(-178px + var(--sx) * 20px), calc(34px + var(--sy) * 14px), -60px) rotateY(calc(28deg + var(--sx) * 22deg)) rotateX(calc(var(--sy) * -14deg)) rotateZ(-4deg); }
  .p2 { transform: translate3d(calc(178px + var(--sx) * 20px), calc(34px + var(--sy) * 14px), -60px) rotateY(calc(-28deg + var(--sx) * 22deg)) rotateX(calc(var(--sy) * -14deg)) rotateZ(4deg); }
  .f1 { left: -2%; top: 14%; } .f2 { display: flex; }
}
/* sign-in: one card in the middle */
.auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s5); padding: var(--s5) var(--s4); }
.auth-form { display: flex; flex-direction: column; gap: var(--s4); width: 100%; max-width: 400px; padding: var(--s5); }
.auth-form .seg { margin: 0; }
.auth .bar-tools { margin: 0; }
/* sign-in and sign-up of the product: the form alone on a phone; on a wide screen the product on the left (a lit glass panel with the phones) and the form on the right */
.auth.split { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; justify-content: stretch; gap: 0; padding: 0; }
.auth-aside { display: none; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s5); padding: var(--s6) var(--s4); min-height: 100dvh; }
.auth-head { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: var(--s2); }
.auth-head h1 { font-size: var(--fs-28); line-height: var(--lh-tight); letter-spacing: -.03em; }
.auth-head p { color: var(--muted); font-size: var(--fs-14); }
.auth-form h1 { font-size: var(--fs-20); }
@media (min-width: 960px) {
  .auth.split { grid-template-columns: minmax(0, 1.15fr) minmax(440px, 1fr); }
  .auth-brand { display: none; }
  .auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--s5); margin: var(--s4) 0 var(--s4) var(--s4); padding: var(--s6) 40px; border-radius: var(--r-2xl); min-height: calc(100dvh - 32px);
    background: radial-gradient(80% 60% at 50% 0%, var(--w-08), transparent 70%), var(--panel); box-shadow: var(--glass-rim); }
  .auth-pitch h2 { font-size: var(--fs-40); line-height: var(--lh-tight); letter-spacing: -.03em; max-width: 13em; }
  .auth-pitch h2 span { color: var(--faint); }
  .auth-aside .stage { flex: 1; min-height: 420px; height: auto; zoom: .8; }
  .auth-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
  .auth-steps li { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4); border-radius: var(--r-l); background: var(--w-04); box-shadow: var(--glass-rim); font-size: var(--fs-14); font-weight: var(--w-label); }
  .auth-steps .tc { color: var(--faint); }
  .auth-aside .f1 { top: auto; bottom: 10%; left: 0; } .auth-aside .f2 { right: 0; top: 4%; }
}
.consent { margin: 0; text-align: center; line-height: var(--lh-body); } .consent a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
/* the user agreement: a readable column */
.terms { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: var(--s5); padding: var(--s5) var(--s4); }
.terms-body { width: 100%; max-width: 720px; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.terms-body h1 { margin: 0; font-size: var(--fs-20); } .terms-body h2 { margin: var(--s3) 0 0; font-size: var(--fs-16); } .terms-body p { margin: 0; font-size: var(--fs-14); line-height: var(--lh-body); color: var(--muted); } .terms-body p.muted { color: var(--faint); }
.terms .bar-tools { margin: 0; gap: var(--s4); flex-wrap: wrap; justify-content: center; }
.terms-body p.terms-closing { margin-top: var(--s3); color: var(--text); font-weight: 500; }
/* plans */
.plans { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5); border-radius: var(--r-xl); background: var(--panel); border: 1px solid transparent; box-shadow: var(--glass-rim); transition: transform .6s var(--ease), box-shadow .3s, --spec .4s; }
.plan.current { border-color: var(--text); box-shadow: var(--plan-glow); }
.plan.featured { background: radial-gradient(90% 50% at 50% 0%, var(--w-08), transparent 70%), var(--panel); box-shadow: var(--plan-glow); }
.plan h3 { font-size: var(--fs-16); }
.plan .price { display: flex; align-items: baseline; gap: var(--s1); padding-bottom: 20px; border-bottom: 1px solid var(--line); line-height: 1; }
.plan .price .fig { font-size: var(--fs-40); }
.plan .price .cur { font-size: var(--fs-28); font-weight: var(--w-head); color: var(--muted); }
.plan .price small { margin-left: var(--s2); font-size: var(--fs-14); color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); font-size: var(--fs-14); line-height: var(--lh-body); flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); } .plan li svg.i { width: 16px; height: 16px; margin-top: var(--s0); color: var(--text); }
.plans-note { margin-top: var(--s4); color: var(--muted); font-size: var(--fs-13); line-height: var(--lh-body); text-align: center; }
/* stat tiles and meters */
.stat { background: var(--panel); border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--glass-rim); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s1); min-width: 0; transition: transform .6s var(--ease), box-shadow .3s, --spec .4s; }
.stat .label { font-size: var(--fs-13); color: var(--muted); } .stat .value { font-size: var(--fs-28); line-height: var(--lh-tight); font-weight: var(--w-fig); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .delta { font-size: var(--fs-13); color: var(--muted); } .stat .delta.up { color: var(--green); } .stat .delta.down { color: var(--red); }
.meter { display: flex; flex-direction: column; gap: var(--s2); font-size: var(--fs-13); }
/* tilt: transform only while the pointer is on the card, so nothing else ever carries one */
.tilting { --spec: 1; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .12s linear, box-shadow .3s, --spec .4s;
  background-image: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--white) calc(var(--spec) * 12%), transparent), transparent 55%);
  box-shadow: var(--glass-rim), 0 30px 60px -20px var(--k-60); }
/* locked (plan) controls */
.locked { position: relative; opacity: .5; pointer-events: none; }
.lock-note { display: inline-flex; align-items: center; gap: var(--s1-5); font-size: var(--fs-13); font-weight: 500; color: var(--muted); background: var(--panel-2); border-radius: var(--r-s); padding: var(--s0) var(--s2); cursor: pointer; border: 0; }
.lock-note:hover { color: var(--text); } .lock-note svg.i { width: 14px; height: 14px; }
/* charts (inline SVG) */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; } .chart .tick { fill: var(--faint); font-size: var(--fs-12); font-family: var(--mono); }
.chart .line { fill: none; stroke: var(--white); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: var(--chart-glow); } .chart .area { fill: var(--w-08); stroke: none; }
.chart .pt { fill: var(--black); stroke: var(--white); stroke-width: 2; }
.spark { width: 84px; height: 26px; flex: none; } .spark path { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* dropzone */
.drop { border: 1px dashed var(--line-strong); border-radius: var(--r-l); padding: 28px var(--s4); text-align: center; color: var(--muted); cursor: pointer; transition: border-color var(--fast), background var(--fast); display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.drop:hover, .drop.over { border-color: var(--text); background: var(--panel-2); color: var(--text); }
/* thumbnails grid for clips */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.tile { position: relative; aspect-ratio: 9/16; border-radius: var(--r-l); overflow: hidden; background: var(--black); border: 1px solid var(--line); cursor: pointer; display: block; color: var(--white); transition: border-color var(--fast); }
.tile:hover { border-color: var(--faint); }
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile .tile-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: var(--s1); flex-wrap: wrap; }
.tile .tile-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px var(--s3) var(--s3); background: linear-gradient(transparent, var(--k-85)); font-size: var(--fs-13); font-weight: 500; line-height: var(--lh-snug); }
/* editor workspace: preview on the left, one panel of settings on the right */
.editor { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
.editor-stage { position: relative; }
.editor-panel { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
@media (min-width: 960px) { .editor { grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); align-items: start; } .editor-stage { position: sticky; top: 24px; } }
.qr { width: 240px; height: 240px; border-radius: var(--r-l); background: var(--white); padding: var(--s3); display: flex; align-items: center; justify-content: center; margin: 0 auto; border: 1px solid var(--line); }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s3); font-size: var(--fs-14); }
.steps li { counter-increment: step; display: flex; gap: var(--s3); align-items: flex-start; }
.steps li::before { content: counter(step); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font: 500 var(--fs-12) var(--mono); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* 6. screens (they use the tokens above) ------------------------------------------------------------------- */
.icon-btn.sm { width: 34px; height: 34px; }
.pill-dark { background: var(--k-60); color: var(--white); font-size: var(--fs-12); font-weight: 500; padding: var(--s1) var(--s2); border-radius: var(--r-pill); }
.range { width: 100%; accent-color: var(--accent); }

.ep { display: flex; flex-direction: column; gap: var(--s2); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.kv .stat b { display: block; font-size: var(--fs-28); line-height: var(--lh-tight); font-weight: var(--w-fig); letter-spacing: -.03em; font-variant-numeric: tabular-nums; } .kv .stat span { color: var(--muted); font-size: var(--fs-13); }

/* caption studio */
.cap-studio { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.cap-stage { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.cap-stage canvas { width: 100%; max-width: 240px; max-height: 64vh; aspect-ratio: 9 / 16; object-fit: contain; border-radius: var(--radius); background: var(--black); }
.cap-controls { overflow: auto; padding-right: var(--s1-5); }
.cap-field { display: flex; flex-direction: column; gap: var(--s1); font-size: var(--fs-13); }
.cap-field > span { display: flex; justify-content: space-between; color: var(--muted); } .cap-field b { color: var(--text); font-variant-numeric: tabular-nums; }
.cap-field input[type=range] { width: 100%; accent-color: var(--accent); }
.cap-field.cap-color { flex-direction: row; align-items: center; justify-content: space-between; }
.cap-color input[type=color], .cap-colors input[type=color] { width: 38px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-s); background: none; cursor: pointer; }
.cap-sub { display: flex; flex-direction: column; gap: 10px; padding-left: var(--s3); border-left: 2px solid var(--line); }
.cap-colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--s2); }
.cap-colors label { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-13); color: var(--muted); cursor: pointer; }
@media (min-width: 960px) { .cap-studio { grid-template-columns: 300px minmax(0, 1fr); } .cap-stage { position: sticky; top: 0; align-items: stretch; } .cap-stage canvas { max-width: none; } .cap-controls { max-height: 62vh; } }
.lib-media { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--black); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
.lib-media video, .lib-media canvas { max-width: 100%; max-height: 100%; object-fit: contain; }
.lib-media.checker { background: repeating-conic-gradient(var(--grey-2) 0 25%, var(--grey-1) 0 50%) 0 0/16px 16px; }

/* visual frame editor (frame.js) */
.fx-stage { position: relative; width: min(100%, 320px); aspect-ratio: 9 / 16; background: var(--black); border-radius: var(--r-l); overflow: hidden; touch-action: none; user-select: none; box-shadow: 0 0 0 1px var(--line); }
.fx-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.fx-layer { position: absolute; cursor: grab; outline: 1px dashed transparent; }
.fx-layer:hover { outline-color: var(--w-20); }
.fx-layer.on { outline: 2px solid var(--accent); cursor: grabbing; }
.fx-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid var(--white); cursor: nwse-resize; z-index: 2; }
.fx-tag { position: absolute; left: 4px; top: 4px; max-width: calc(100% - 8px); font-size: var(--fs-12); line-height: var(--lh-snug); padding: var(--s0) var(--s1-5); border-radius: var(--r-s); background: var(--k-60); color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; z-index: 3; }
.fx-empty { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: var(--s3) calc(50% - 72px); font-size: var(--fs-12); color: var(--muted); background: repeating-linear-gradient(45deg, var(--raised) 0 12px, var(--grey-1) 12px 24px); }
.fx-caps { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
.fx-title { position: absolute; z-index: 19; transform: translate(-50%, -50%); text-align: center; pointer-events: none; overflow-wrap: break-word; width: max-content; }
.fx-capband { position: absolute; left: 0; right: 0; height: 44px; z-index: 21; cursor: ns-resize; border-top: 1px dashed transparent; border-bottom: 1px dashed transparent; }
.fx-capband:hover, .fx-capband.on { border-color: var(--w-20); background: var(--w-04); }

.words-list { gap: var(--s1-5); max-height: 52vh; overflow-y: auto; padding-right: var(--s0); }
.word-row { gap: var(--s2); } .word-row > .mono { width: 38px; flex: none; text-align: right; } .word-row select.in { width: 104px; flex: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }

/* analytics section */
.an-body { display: flex; flex-direction: column; gap: var(--s4); transition: opacity var(--slow); } .an-body > .pills { margin: 0; } .an-body.an-stale { opacity: .72; }
.an-refresh { position: relative; overflow: hidden; padding-bottom: var(--s4); } .an-note { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.an-problems { display: flex; flex-direction: column; gap: var(--s1); } .an-problems a { font-weight: 500; white-space: nowrap; }
.an-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 40%; background: var(--accent); border-radius: var(--r-s); animation: an-slide 1.4s var(--ease) infinite; }
@keyframes an-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.an-spin svg { animation: an-turn .9s linear infinite; } @keyframes an-turn { to { transform: rotate(360deg); } }
.an-status { margin: 0 0 var(--s3); } .an-ok { color: var(--green); font-weight: 500; display: inline-flex; align-items: center; gap: var(--s1-5); } .an-ok svg.i { width: 14px; height: 14px; }
.an-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); } .an-stats > .stat:last-child { grid-column: span 2; }
@media (min-width: 600px) { .an-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s4); } .an-stats > .stat:last-child { grid-column: auto; } }
.an-chart { display: flex; flex-direction: column; gap: var(--s3); } .an-chart .seg { max-width: 100%; }
.an-listhead { margin-top: var(--s2); } .an-count { font-weight: 500; font-size: var(--fs-14); } select.in.an-sort { width: auto; min-height: 38px; padding: var(--s1-5) var(--s3); font-size: var(--fs-14); }
.an-thumb { flex: none; width: 36px; aspect-ratio: 9/16; border-radius: var(--r-s); overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); display: block; } .an-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.an-title { border: 0; background: transparent; padding: 0; text-align: left; font-weight: 500; font-size: var(--fs-14); line-height: var(--lh-snug); color: var(--text); cursor: pointer; max-width: 100%; }
.an-views { display: inline-flex; align-items: center; gap: var(--s2); } .an-views .spark { width: 64px; }
.an-table th.r, .an-table td.r { text-align: right; } .an-table .an-main { min-width: 240px; max-width: 360px; } .an-tr { cursor: pointer; } .an-table .an-views { justify-content: flex-end; }
.an-desktop { display: none; } .an-mobile { display: flex; }
@media (min-width: 1200px) { .an-desktop { display: block; } .an-mobile { display: none; } }
.card.an-card { display: flex; gap: var(--s3); align-items: flex-start; width: 100%; text-align: left; } .an-card .an-thumb { width: 56px; }
.an-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); font-size: var(--fs-14); font-variant-numeric: tabular-nums; } .an-counts span { display: flex; flex-direction: column; min-width: 0; } .an-counts i { font-style: normal; font-size: var(--fs-12); color: var(--faint); }
.an-mini .stat { padding: var(--s3); } .an-mini .stat .value { font-size: var(--fs-20); }

/* schedule section */
.sch-status { display: flex; align-items: center; gap: var(--s3); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); font-weight: 500; }
.sch-status .btn { flex: none; }
.sch-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); align-items: start; }
.sch-two { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sch-card { gap: 0; padding: 0; min-width: 0; overflow: hidden; }
.sch-card > * { padding-left: var(--s5); padding-right: var(--s5); }
.sch-head { display: flex; align-items: center; gap: var(--s3); padding-top: var(--s5); padding-bottom: var(--s4); }
.sch-head h3 { margin: 0; font-size: var(--fs-16); font-weight: 600; }
.sch-head .sw { min-height: 0; }
.sch-state { display: inline-flex; align-items: center; gap: var(--s1-5); margin-top: var(--s0); font-size: var(--fs-13); color: var(--muted); }
.sch-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.sch-state.green i { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); }
.sch-state.amber i { background: var(--amber); } .sch-state.red i { background: var(--red); } .sch-state.red { color: var(--red); }
.sch-sec { display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s5); }
.sch-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.sch-times { gap: var(--s3); min-width: 0; }
.sch-first { border-top: 1px solid var(--line); }
.sch-top { align-items: center; gap: var(--s3); } .sch-top .hint { flex: 1; min-width: 0; font-size: 12px; }
/* posts a day out of the plan's limit: a small card with its own fill bar */
.sch-quota { flex: none; display: flex; align-items: center; gap: 12px; margin-left: auto; padding: 8px 14px; border-radius: var(--r-m); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--panel-2)), var(--panel-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, var(--line)); }
.sch-q-num { display: flex; align-items: baseline; line-height: 1; } .sch-q-num b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; } .sch-q-num em { font-style: normal; font-size: 15px; color: var(--muted); margin-left: 1px; }
.sch-q-side { display: flex; flex-direction: column; gap: 6px; min-width: 52px; } .sch-q-side span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sch-q-side i { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; } .sch-q-side u { display: block; height: 100%; border-radius: 2px; background: var(--accent); text-decoration: none; transition: width var(--fast); }
.sch-quota.full { background: color-mix(in srgb, var(--amber) 10%, var(--panel-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--amber) 40%, transparent); }
.sch-quota.full b { color: var(--amber); } .sch-quota.full u { background: var(--amber); }
/* a pin: a wide hit area around the line and the dot; drag it to move the time, tap it to remove the time */
.sch-pin { position: absolute; top: 14px; width: 22px; height: 32px; margin-left: -11px; cursor: grab; touch-action: none; z-index: 1; }
.sch-pin::before { content: ""; position: absolute; left: 10px; top: 8px; width: 2px; height: 16px; border-radius: 1px; background: var(--accent); }
.sch-pin::after { content: ""; position: absolute; left: 6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg), 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); transition: transform var(--fast); }
.sch-pin b { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 500; color: var(--accent-text); white-space: nowrap; pointer-events: none; }
.sch-pin:hover::after { transform: scale(1.3); } .sch-pin:hover b { color: var(--text); }
.sch-pin.drag { cursor: grabbing; z-index: 2; } .sch-pin.drag::after { transform: scale(1.4); } .sch-pin.drag b { color: var(--text); font-weight: 600; }
.sch-pin.clash::before, .sch-pin.clash::after { background: var(--red); } .sch-pin.clash b { color: var(--red); }
.sch-pin.ghost { pointer-events: none; z-index: 0; } .sch-pin.ghost::before { background: var(--line-strong); } .sch-pin.ghost::after { background: var(--text); box-shadow: 0 0 0 3px var(--bg); opacity: .7; } .sch-pin.ghost b { color: var(--text); }
.sch-track.busy .sch-pin { cursor: progress; }
/* caption placeholders, hashtag chips, project toggles */
.sch-vars { display: flex; flex-direction: column; gap: 4px; margin-top: -6px; font-size: 13px; color: var(--muted); }
.sch-vars > div:not(.hint) { display: flex; align-items: baseline; gap: 8px; }
.sch-vars code { padding: 1px 6px; border-radius: 5px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.sch-vars code + span::before { content: "— "; color: var(--faint); }
.sch-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 7px 10px; border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--panel); cursor: text; transition: border-color var(--fast), box-shadow var(--fast); }
.sch-tags:hover { border-color: var(--faint); } .sch-tags:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent); }
.sch-tags input::placeholder { color: var(--faint); }
.sch-tags input { flex: 1; min-width: 120px; height: 32px; border: 0; padding: 0 4px; background: none; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.sch-tag { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 3px 0 10px; border-radius: var(--r-s); background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); color: var(--text); font-size: 14px; }
.sch-tag button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.sch-tag button:hover { color: var(--text); background: rgba(255,255,255,.08); } .sch-tag svg.i { width: 13px; height: 13px; }
.sch-projects { display: flex; flex-wrap: wrap; gap: 6px; }
.sch-proj { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-s); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; transition: background var(--fast), color var(--fast); }
.sch-proj:hover { color: var(--text); } .sch-proj svg.i { width: 15px; height: 15px; margin-left: -4px; }
.sch-proj.on { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); }
.sch-proj.gone { color: var(--muted); font-style: italic; }
/* the 24-hour track: hour ticks, a pin per time, a ghost pin under the mouse */
.sch-track { position: relative; height: 56px; margin: 0 6px; cursor: copy; touch-action: manipulation; }
.sch-track.tall { height: 70px; } .sch-track.tall .sch-rail { top: 40px; } .sch-track.tall .sch-pin { top: 28px; }
.sch-pin.up b { bottom: 42px; }
.sch-track.full { cursor: not-allowed; } .sch-track.dragging { cursor: grabbing; }
.sch-track.busy { cursor: progress; opacity: .7; }
.sch-rail { position: absolute; left: 0; right: 0; top: 26px; height: 8px; border-radius: var(--r-s); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); }
.sch-rail i { position: absolute; top: 2px; width: 1px; height: 4px; background: var(--line-strong); } .sch-rail i.big { top: 0; height: 8px; background: var(--w-20); }
.sch-hours { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; font-size: var(--fs-12); color: var(--faint); transform: translateY(2px); }
.sch-hours span { width: 0; display: flex; justify-content: center; }
.sch-time { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px 0 12px; border-radius: var(--r-s); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--text); }
.sch-time:not(:has(button)) { padding-right: 12px; }
.sch-time button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; }
.sch-time button:hover:not([disabled]) { color: var(--text); background: var(--panel-2); } .sch-time svg.i { width: 14px; height: 14px; }
.sch-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-m); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.sch-day { height: 36px; border: 0; border-radius: 7px; background: none; color: var(--faint); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background var(--fast), color var(--fast); }
.sch-day:hover:not([disabled]) { color: var(--text); }
.sch-day.on { background: var(--w-12); color: var(--text); box-shadow: inset 0 1px 0 var(--w-12); }
.sch-day[disabled] { cursor: progress; }
.sch-pros { gap: 0; }
.sch-prorow { display: flex; align-items: center; gap: var(--s4); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.sch-prorow:first-child { border-top: 0; padding-top: 0; }
.sch-prorow b { display: block; font-size: var(--fs-14); font-weight: 500; } .sch-prorow .hint { display: block; margin-top: var(--s0); }
.sch-prorow.locked-row b { color: var(--muted); }
.sch-prorow .sw { min-height: 0; } .sch-prorow .lock-note { flex: none; }
.sch-jit { flex: none; } .sch-jit button { padding: 0 10px; font-family: var(--mono); font-size: 12px; }
.sch-card.off .sch-sec { opacity: .55; }
.sch-del { align-self: flex-start; margin-top: var(--s4); }
@media not all and (min-width: 600px) { .sch-card > * { padding-left: var(--s4); padding-right: var(--s4); } .sch-prorow { flex-wrap: wrap; } }
.sch-fold { border-top: 1px solid var(--line); margin: var(--s5) 0 0; }
.sch-fold > summary { padding: var(--s3) 40px var(--s3) 0; } .sch-fold > summary::after { right: 4px; }
.sch-fold .fold-body { padding: var(--s2) 0 var(--s2); }
.sch-settings { gap: var(--s4); }
.sch-auto { gap: var(--s3); padding: var(--s3); border-radius: var(--r-m); background: var(--panel-2); }
.sch-row { align-items: flex-start; }
.sch-clock-label { width: 42px; flex: none; padding-top: var(--s0); font-size: var(--fs-14); }
.sch-thumb { width: 44px; aspect-ratio: 9 / 16; border-radius: var(--r-s); overflow: hidden; background: var(--panel-2); color: var(--faint); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 600px) { .sch-clock-label { width: 48px; } }
.sch-empty > .empty { padding: var(--s6) var(--s4); }

/* clips section */
.hint.warn { color: var(--amber); } .bad { color: var(--red); }
.up-steps { margin-top: -8px; }
.up-ico { width: 36px; height: 36px; border-radius: var(--r-s); background: var(--panel-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.up-item { padding: 10px var(--s3); }
.opt-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: stretch; }
.opt-grid > div { display: flex; flex-direction: column; } .opt-grid > div > .col { flex: 1; }
.opt { width: 100%; height: 100%; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s1-5); padding: var(--s4); border-radius: var(--r-l); border: 1.5px solid var(--line); background: var(--panel); cursor: pointer; transition: border-color var(--fast), background var(--fast); }
.opt:hover { border-color: var(--line-strong); } .opt.on { border-color: var(--text); }
.opt b { font-size: var(--fs-14); }
.opt-icon { width: 36px; height: 36px; border-radius: var(--r-s); background: var(--panel-2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.opt.on .opt-icon { background: var(--panel); }
.series-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.series-card, a.series-card.card.tap { display: flex; gap: var(--s4); align-items: center; min-width: 0; }
.series-body { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; flex: 1; }
.series-cover { width: 64px; aspect-ratio: 9 / 16; border-radius: var(--r-m); overflow: hidden; background: var(--panel-2); color: var(--faint); display: flex; align-items: center; justify-content: center; flex: none; }
.series-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.dim img { opacity: .45; }
.tile .chip { background: color-mix(in srgb, var(--raised) 72%, transparent); color: var(--white); white-space: normal; text-align: left; line-height: var(--lh-snug); padding: var(--s1) var(--s2); }
.tile .chip.green { background: color-mix(in srgb, var(--green) 82%, var(--black)); } .tile .chip.red { background: color-mix(in srgb, var(--red) 85%, var(--black)); }
.tile .chip.amber { background: color-mix(in srgb, var(--amber) 88%, var(--black)); } .tile .chip.blue { background: color-mix(in srgb, var(--blue) 85%, var(--black)); }
.tile .chip.accent { background: color-mix(in srgb, var(--accent) 85%, var(--black)); }
.tile-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); background: var(--grey-1); }
.tile-empty svg.i { width: 24px; height: 24px; }
.tile-len { font-size: var(--fs-12); font-weight: 500; opacity: .8; margin-top: var(--s0); }
.tile-bar { margin-top: var(--s1-5); background: var(--w-20); }
.tile:focus-visible { outline-offset: 3px; }
@media not all and (min-width: 600px) { .hide-s { display: none; } }

/* editor */
/* The editor lives on its own full-screen layer: a header, one scroll, and inside it the preview and the settings panel (see scene.js). */
.editor-overlay { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.editor-head { flex: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); padding-top: max(var(--s2), env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--panel); min-height: 56px; }
.editor-head h2 { font-size: var(--fs-16); }
.editor-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.editor-wrap { max-width: 1400px; margin: 0 auto; padding: var(--s3); }
.editor-stage { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 0 0 var(--s2); display: flex; flex-direction: column; align-items: center; }
.editor-stage .fx-stage { width: min(100%, 168px, calc((100dvh - 430px) * 9 / 16)); min-width: 120px; }
.editor-stage-body > .col > .row { display: none; }
@media not all and (min-width: 600px) { .editor-foot > .small { display: none; } }
@media (min-width: 600px) { .editor-wrap { padding: var(--s4); } }
.editor-stage .hint { display: none; }
.stage-toggle { align-self: stretch; }
.editor-stage-body.off { display: none; }
.editor-panel { max-width: 960px; }
@media (min-width: 960px) {
  .editor { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--s5); }
  .editor-stage { top: var(--s2); padding: 0; z-index: 1; background: none; }
  .editor-stage .fx-stage { width: min(100%, 360px, calc((100dvh - 230px) * 9 / 16)); }
  .editor-stage .hint { display: block; }
  .stage-toggle { display: none; }
  .editor-stage-body > .col > .row { display: flex; }
  .editor-stage-body.off { display: block; }
  .editor-wrap { padding: var(--s5) var(--s5) var(--s6); }
}
/* collapsible groups */
/* the editor's sections: a row of cards, the open section below as cards of its own */
.editor-panel { container-type: inline-size; }
.etabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s2); }
@container (max-width: 760px) { .etabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.etab { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); min-width: 0; padding: var(--s3); border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--panel); color: var(--muted); font-size: var(--fs-14); font-weight: 500; text-align: left; cursor: pointer; }
.etab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etab:hover { color: var(--text); border-color: var(--line-strong); }
.etab.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
@container (max-width: 420px) { .etab { flex-direction: row; align-items: center; padding: var(--s2); } }
.esection { display: flex; flex-direction: column; gap: var(--s3); }
.egrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s3); align-items: start; }
.ecard { background: var(--panel); border-radius: var(--radius); box-shadow: var(--glass-rim); padding: var(--s4); min-width: 0; }
.ecard-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 28px; margin-bottom: var(--s3); }
.ecard-head b { font-size: var(--fs-16); font-weight: 600; }
.ecard-body { gap: 10px; }
.ecard .ecard { padding: 0; box-shadow: none; background: none; }
.fxtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s2); }
.fxtile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--s2) var(--s3); border: 1.5px solid var(--line); border-radius: var(--r-m); background: none; color: var(--text); cursor: pointer; text-align: left; }
.fxtile b { font-weight: 500; font-size: var(--fs-14); } .fxtile span { font-size: var(--fs-12); color: var(--faint, var(--muted)); }
.fxtile:hover { border-color: var(--line-strong); }
.fxtile.on { border-color: var(--accent); background: var(--accent-soft); } .fxtile.on span { color: var(--accent-text); }
.words-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); }
@media not all and (min-width: 900px) { .words-grid { grid-template-columns: 1fr; } }
.fx-title.edit { pointer-events: auto; cursor: grab; outline: 1px dashed transparent; touch-action: none; }
.fx-title.edit:hover { outline-color: var(--w-20); } .fx-title.edit.on { outline: 2px solid var(--accent); cursor: grabbing; }
.fx-capband .fx-handle { right: 10px; bottom: -9px; }
.egroup { padding: 0; overflow: hidden; }
.egroup-head { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 60px; padding: var(--s3) var(--s4); background: none; border: 0; text-align: left; cursor: pointer; color: var(--text); }
.egroup-head:hover { background: var(--panel-2); }
.egroup-head > .grow { display: flex; flex-direction: column; min-width: 0; }
.egroup-head b { font-size: var(--fs-16); font-weight: 500; }
.egroup-sum { font-size: var(--fs-13); color: var(--muted); display: block; }
.egroup-chev { flex: none; width: 8px; height: 8px; margin: 0 var(--s1) var(--s1) 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--fast); }
.egroup.open .egroup-chev { transform: rotate(-135deg); margin-bottom: -3px; }
.egroup-body { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s4); border-top: 1px solid var(--line); }
.efold { border: 1px solid var(--line); border-radius: var(--r-m); }
.efold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 44px; padding: 0 var(--s3); font-weight: 500; font-size: var(--fs-14); }
.efold > summary::-webkit-details-marker { display: none; }
.efold > summary::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--fast); }
.efold[open] > summary::after { transform: rotate(-135deg); }
.efold-body { padding: var(--s1) var(--s3) var(--s3); }
.editor-foot { position: sticky; bottom: var(--s3); z-index: 7; display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s3); padding: var(--s3) var(--s4); padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom)); background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r-l); box-shadow: 0 -24px 32px -8px var(--bg), var(--shadow-2); }
.editor-foot .btn.primary { flex: none; min-width: 140px; }
.editor-foot > .row { justify-content: flex-end; }
/* frame layouts */
.laygrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: var(--s2); }
.laytile { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s3) var(--s2); border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--panel); color: var(--text); cursor: pointer; font-size: var(--fs-13); font-weight: 500; line-height: var(--lh-snug); text-align: center; transition: border-color var(--fast), background var(--fast); }
.laytile:hover { border-color: var(--line-strong); }
.laytile.on { border-color: var(--accent); background: var(--accent-soft); }
.lay { position: relative; width: 32px; aspect-ratio: 9 / 16; border-radius: var(--r-s); background: var(--raised); overflow: hidden; flex: none; }
.lay i { position: absolute; left: 0; right: 0; display: block; }
.lay-main { background: var(--accent); } .lay-sa { background: var(--green); opacity: .85; }
.lay-full .lay-main { top: 0; bottom: 0; } .lay-full .lay-sa, .lay-fit .lay-sa { display: none; }
.lay-fit { background: linear-gradient(160deg, var(--line-strong), var(--faint)); } .lay-fit .lay-main { top: 34%; bottom: 34%; }
.lay-split_50 .lay-main { top: 0; height: 50%; } .lay-split_50 .lay-sa { top: 50%; bottom: 0; }
.lay-split_60 .lay-main { top: 0; height: 60%; } .lay-split_60 .lay-sa { top: 60%; bottom: 0; }
/* subtitle look chips and fonts */
.lookchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s2); }
.lookchip { display: flex; flex-direction: column; gap: var(--s1-5); padding: var(--s1-5) var(--s1-5) var(--s2); border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--panel); color: var(--text); cursor: pointer; font-size: var(--fs-13); font-weight: 500; text-align: center; transition: border-color var(--fast), background var(--fast); }
.lookchip:hover { border-color: var(--line-strong); } .lookchip.on { border-color: var(--accent); background: var(--accent-soft); }
.lookthumb { display: block; width: 100%; aspect-ratio: 240 / 150; border-radius: var(--r-s); background: var(--grey-1); }
.fontgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--s2); max-height: 288px; overflow-y: auto; padding: var(--s0); }
.fonttile { position: relative; }
.fonttile-pick { width: 100%; min-height: 66px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: var(--s1); padding: 10px 10px var(--s2); border: 1.5px solid var(--line); border-radius: var(--r-m); background: var(--panel); color: var(--text); cursor: pointer; text-align: left; transition: border-color var(--fast), background var(--fast); }
.fonttile-pick:hover { border-color: var(--line-strong); }
.fonttile.on .fonttile-pick { border-color: var(--accent); background: var(--accent-soft); }
.fonttile.off .fonttile-pick { opacity: .55; }
.fonttile-sample { font-size: var(--fs-20); line-height: var(--lh-tight); max-width: 100%; white-space: nowrap; overflow: hidden; }
.fonttile-name { font-size: var(--fs-12); color: var(--muted); max-width: 100%; }
.fonttile-lock { position: absolute; top: 8px; right: 8px; color: var(--accent); display: flex; } .fonttile-lock svg.i { width: 14px; height: 14px; }
.fonttile-del { position: absolute; top: 2px; right: 2px; }
.pill svg.i { width: 14px; height: 14px; vertical-align: -1px; }
/* video tiles for the second screen and banners */
.tiles.sm { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s2); }
.tiles.sm .tile { aspect-ratio: 3 / 4; border-radius: var(--r-m); }
/* the library page: banners are wide, shown whole on the checkerboard */
.tile.contain video { object-fit: contain; }
.lib-tiles.wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lib-tiles.wide .tile { aspect-ratio: 16 / 7; }
.tile.pick.on { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile.checker { background: repeating-conic-gradient(var(--grey-2) 0 25%, var(--grey-1) 0 50%) 0 0 / 16px 16px; }
.tile-check { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; z-index: 2; }
.tile-check svg.i { width: 14px; height: 14px; }
.tile.add, .tile.none { background: var(--panel); border: 1.5px dashed var(--line-strong); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s2); font-size: var(--fs-13); font-weight: 500; text-align: center; line-height: var(--lh-snug); }
.tile.add:hover, .tile.none:hover { border-color: var(--accent); color: var(--text); transform: none; box-shadow: none; }
.tile.none.on { border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent); }
.tile.add.busy { cursor: default; }
.swatch { width: 38px; height: 34px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: none; cursor: pointer; }
/* tiny drawing of a preset in the list */
.pthumb { position: relative; width: 54px; height: 96px; flex: none; border-radius: var(--r-s); overflow: hidden; background: var(--black); border: 1px solid var(--line); }
.pthumb.blur { background: var(--grey-1); }
.pthumb i { position: absolute; display: block; }
.pt-main { background: color-mix(in srgb, var(--accent) 80%, var(--white)); } .pt-sa { background: var(--green); } .pt-ban { background: var(--amber); opacity: .85; }
.pt-cap { position: absolute; left: 20%; right: 20%; height: 6px; border-radius: var(--r-s); background: var(--white); }
.tiles.sm .tile-top .chip { font-size: var(--fs-12); padding: 1px var(--s2); }

/* storage screen and episode lines */
.stor-bar { display: flex; height: 10px; border-radius: var(--r-s); background: var(--panel-2); overflow: hidden; }
.stor-bar i { display: block; height: 100%; }
.p-originals { background: var(--accent); } .p-clips { background: var(--green); } .p-own { background: var(--blue); } .p-other { background: var(--faint); }
.stor-bar.amber .p-originals, .stor-bar.amber .p-clips, .stor-bar.amber .p-own, .stor-bar.amber .p-other { background: var(--amber); }
.stor-bar.red .p-originals, .stor-bar.red .p-clips, .stor-bar.red .p-own, .stor-bar.red .p-other { background: var(--red); }
.stor-legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-13); }
.sw-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.stor-ep { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; padding: var(--s3) var(--s4); background: var(--panel-2); border-radius: var(--r-m); }
.warn-text { color: var(--amber); font-weight: 500; }
.lines { display: flex; flex-direction: column; gap: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line); }
.line { display: flex; flex-direction: column; gap: var(--s3); }
.lines .tiles { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--s2); }
.lines .tile { border-radius: var(--r-m); }

.tt-window { display: block; width: 100%; max-width: 520px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; user-select: none; touch-action: manipulation; }

/* TikTok sign-in sheet: a wait you can see on every press, our own fields, choices as rows rather than a stack of loud buttons */
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; flex: none; animation: an-turn .7s linear infinite; opacity: .8; }
.qr.wait { background: var(--panel-2); border-color: var(--line); }
.qr-wait, .form-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); text-align: center; color: var(--text); font-size: var(--fs-14); }
.qr-wait .spin, .form-wait .spin { width: 28px; height: 28px; border-width: 2.5px; color: var(--muted); }
.qr-wait small { color: var(--muted); font-size: var(--fs-12); }
.form-wait { min-height: 180px; border-radius: var(--r-l); background: var(--panel-2); }
.signin-form { gap: 14px; }
.signin-form .btn.lg .spin, .signin-step .btn.lg .spin { color: inherit; }
.code-in { letter-spacing: .4em; font-size: var(--fs-20); text-align: center; }
.pw { position: relative; display: flex; }
.pw .in { padding-right: 44px; }
.pw .icon-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
button.link { border: 0; background: none; padding: var(--s1) 0; color: var(--muted); font: inherit; font-size: var(--fs-14); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
button.link:hover { color: var(--text); } button.link[disabled] { opacity: .5; pointer-events: none; }
button.link.center { align-self: center; }
.signin-step { gap: 14px; }
.signin-step h3 { margin: 0 0 var(--s1); font-size: var(--fs-16); }
.signin-step p { margin: var(--s0) 0; }
.choices { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.choice { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 14px; border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; font-size: var(--fs-14); cursor: pointer; transition: background var(--fast); }
.choice + .choice { border-top: 1px solid var(--line); }
.choice:hover { background: var(--panel-2); } .choice[disabled] { opacity: .5; pointer-events: none; }
.choice b { display: block; font-weight: 500; } .choice small { display: block; color: var(--muted); font-size: var(--fs-13); margin-top: var(--s0); }
.choice svg.i { color: var(--faint); }
.tt-frame { position: relative; }
.tt-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--raised) 60%, transparent); border-radius: var(--r-m); z-index: 1; }
.tt-wait .spin { width: 28px; height: 28px; }

/* a newer build is on the server: the old tab offers a reload */
.toast.update { pointer-events: auto; display: flex; align-items: center; gap: var(--s3); padding: var(--s1-5) var(--s1-5) var(--s1-5) var(--s4); }
.toast.update .btn { background: var(--ink); color: var(--text); border-color: transparent; }

/* admin dashboards (adminmetrics.js) */
.kpis { margin-bottom: var(--s4); }
.stat.kpi .value { font-size: var(--fs-20); white-space: nowrap; }
.stat.kpi .spark { width: auto; max-width: 84px; min-width: 40px; flex: 1 1 auto; }
.metric-grid { margin-bottom: var(--s4); }
.metric-card { min-width: 0; margin-bottom: var(--s4); }
.metric-grid > .metric-card, .metric-grid > .col > .metric-card { margin-bottom: 0; }
.metric-h { font-size: var(--fs-16); margin: var(--s5) 0 var(--s3); }
.chart .bar-mark { fill: var(--accent); opacity: .85; }
.chart .bar-mark:hover { opacity: 1; }
.funnel { display: flex; flex-direction: column; gap: var(--s3); }
.funnel-row { display: flex; flex-direction: column; gap: var(--s1-5); }
.funnel-bar { height: 8px; border-radius: var(--r-s); background: var(--panel-2); overflow: hidden; }
.funnel-bar i { display: block; height: 100%; border-radius: var(--r-s); background: var(--accent); }
.ret { display: flex; flex-direction: column; gap: var(--s0); }
.ret .label { font-size: var(--fs-13); color: var(--muted); }
.ret .value { font-size: var(--fs-28); font-weight: var(--w-fig); font-variant-numeric: tabular-nums; }
.table tfoot td { border-top: 1px solid var(--line-strong); }

/* editor: the top card (where the look comes from) */
.ed-top { gap: var(--s3); }
.ed-top .btn.ghost { margin-right: calc(-1 * var(--s2)); }

/* the frame preview without editing (clip sheet) */
.fx-stage.still { cursor: pointer; touch-action: auto; box-shadow: none; }
.fx-layer.still { cursor: inherit; outline: 0; pointer-events: none; }
.fx-paused { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: var(--k-20); pointer-events: none; }
/* the clip sheet's built preview: a sound switch and a seek bar with the banner moments */
.cp-sound { position: absolute; top: var(--s2); right: var(--s2); z-index: 30; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--k-60); color: var(--white); cursor: pointer; }
.cp-sound svg.i { width: 16px; height: 16px; }
.cp-sound:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cp-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; padding: var(--s4) var(--s3) var(--s2); background: linear-gradient(transparent, var(--k-60)); cursor: pointer; opacity: 0; transition: opacity .2s; }
.cp:hover .cp-bar, .cp:focus-within .cp-bar, .cp .fx-paused ~ .cp-bar { opacity: 1; }
@media (hover: none) { .cp-bar { opacity: 1; } }
.cp-time { display: block; margin-bottom: 6px; font-size: 11px; color: var(--white); text-shadow: 0 1px 2px var(--k-60); }
.cp-track { position: relative; height: 4px; border-radius: 2px; background: var(--w-20); overflow: hidden; }
.cp-track b { position: absolute; inset: 0 auto 0 0; background: var(--white); }
.cp-track .cp-ban { position: absolute; top: 0; bottom: 0; background: var(--accent); opacity: .8; z-index: 1; }
.fx-paused svg.i { width: 40px; height: 40px; padding: var(--s3); box-sizing: content-box; border-radius: 50%; background: var(--k-60); color: var(--white); }

/* clip sheet: the source and the preview side by side, everything else on the right */
.cs { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
.cs-media { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); align-items: start; }
.cs-pane { margin: 0; display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.cs-pane figcaption { font-size: var(--fs-13); color: var(--muted); text-align: center; }
.cs-frame { position: relative; aspect-ratio: 9 / 16; background: var(--black); border-radius: var(--r-l); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.cs-frame > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--black); }
.cs-frame > .fx-stage { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.cs-none { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s3); text-align: center; font-size: var(--fs-13); color: var(--faint); background: var(--panel); }
.cs-none svg.i { width: 24px; height: 24px; }
.cs-side { gap: var(--s4); min-width: 0; }
.cs-render { display: flex; flex-direction: column; gap: var(--s2); }
.cs-render.on { padding: var(--s3) var(--s4); border-radius: var(--r-l); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.cs-render.done { flex-direction: row; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: var(--r-l); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-14); }
.cs-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.cs-foot { display: flex; padding-top: var(--s3); border-top: 1px solid var(--line); }
.cs-foot .btn { margin-left: calc(-1 * var(--s2)); }
@media (min-width: 600px) {
  .cs { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; }
  .cs-media { position: sticky; top: 0; }
}

/* upload, step 2: what is being uploaded, then one grouped list of settings */
.up-summary { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); padding-right: var(--s2); border-radius: var(--r-l); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.up-summary-ico, .up-row-ico { flex: none; width: 36px; height: 36px; border-radius: var(--r-m); display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.up-summary-ico { background: var(--accent-soft); color: var(--accent-text); }
.up-summary b { display: block; font-weight: 500; }
.up-rows { display: flex; flex-direction: column; border-radius: var(--r-l); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.up-row { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s4); }
.up-row + .up-row { border-top: 1px solid var(--line); }
.up-row-ico { margin-top: 22px; }
.up-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s1-5); }
.film-pick { position: relative; display: flex; flex-direction: column; gap: var(--s1); }
.film-picked { display: inline-flex; align-items: center; gap: var(--s1); color: var(--accent-text); }
.film-picked.muted { color: var(--muted); }
.film-picked svg { width: 14px; height: 14px; flex: none; }
.film-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; margin: 0; padding: var(--s1); list-style: none; max-height: 280px; overflow-y: auto;
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r-m); box-shadow: var(--shadow-2); }
.film-list li { display: flex; flex-direction: column; gap: var(--s0); padding: var(--s2) var(--s3); border-radius: var(--r-s); cursor: pointer; min-width: 0; }
.film-list li.on { background: var(--accent-soft); }
.film-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row-label { font-size: var(--fs-13); color: var(--muted); }
.up-row-note { font-size: var(--fs-12); color: var(--faint); }
.up-actions { gap: var(--s2); }
.up-actions .btn.primary { min-height: 44px; }

/* upload step 1: four equal cards; a locked mode keeps its place and carries its plan in the corner */
.up-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--s3); }
.up-kinds .opt { gap: var(--s2); padding: var(--s4); min-height: 0; }
.up-kinds .opt b { margin-top: var(--s2); font-size: var(--fs-14); line-height: var(--lh-body); }
.up-kinds .opt .small { line-height: var(--lh-snug); }
.opt-head { display: flex; align-items: flex-start; justify-content: space-between; width: 100%; }
.opt-lock { display: inline-flex; align-items: center; gap: var(--s1); height: 24px; padding: 0 var(--s2); border-radius: var(--r-s); background: var(--panel-2); color: var(--muted); font-size: var(--fs-12); font-weight: 500; }
.opt-lock svg.i { width: 12px; height: 12px; }
.opt.shut b, .opt.shut .small, .opt.shut .opt-icon { opacity: .5; }
.opt.shut:hover .opt-lock { color: var(--text); }
@media not all and (min-width: 600px) { .up-kinds { grid-template-columns: 1fr; grid-auto-rows: auto; } }

/* landing header: the sections as one quiet pill in the middle, the one you are reading lit */
.land-nav { padding: var(--s1); gap: var(--s0); border-radius: var(--r-pill); background: var(--w-04); box-shadow: var(--glass-rim); }
.land-nav a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--r-pill); transition: color var(--fast), background var(--fast); }
.land-nav a:hover { background: var(--w-04); }
.land-nav a.on { color: var(--text); background: var(--w-08); box-shadow: inset 0 1px 0 var(--w-12); }
@media (min-width: 960px) { .land-nav { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; } }

/* how it works: a picture of the step above its number and words */
.land-steps li, .land-steps li:first-child { padding: var(--s2); gap: 0; overflow: hidden; }
.hw { height: 184px; border-radius: var(--r-l); background: radial-gradient(120% 90% at 50% 0%, var(--w-08), transparent 70%), var(--k-60); box-shadow: inset 0 0 0 1px var(--w-08); display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; }
.hw-text { display: flex; flex-direction: column; gap: var(--s1-5); padding: 20px var(--s4) var(--s4); }
.hw-text .tc { margin: 0 0 var(--s1); }
.hw-up { width: 100%; max-width: 280px; display: flex; flex-direction: column; gap: var(--s3); }
.hw-file { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r-m); background: var(--w-04); box-shadow: var(--glass-rim); }
.hw-file b { display: block; font-size: var(--fs-13); font-weight: 500; line-height: var(--lh-snug); } .hw-file small { color: var(--faint); font: var(--fs-12) var(--mono); }
.hw-ico { width: 32px; height: 32px; border-radius: var(--r-s); display: grid; place-items: center; background: var(--w-08); flex: none; } .hw-ico svg.i { width: 16px; height: 16px; }
.hw-pct { font: 500 var(--fs-12) var(--mono); color: var(--text); }
.hw-bar { height: 4px; border-radius: var(--r-s); background: var(--w-08); overflow: hidden; } .hw-bar i { display: block; width: 68%; height: 100%; border-radius: var(--r-s); background: linear-gradient(90deg, var(--accent-text), var(--white)); }
.hw-modes { display: flex; gap: var(--s1-5); } .hw-modes span { padding: var(--s1) var(--s2); border-radius: var(--r-s); font-size: var(--fs-12); color: var(--faint); background: var(--w-04); white-space: nowrap; }
.hw-modes span.on { color: var(--text); box-shadow: inset 0 0 0 1px var(--w-20); }
.hw-clips { display: flex; gap: 10px; align-items: center; }
.hw-clip { position: relative; width: 76px; aspect-ratio: 9 / 16; border-radius: var(--r-m); background: var(--raised) center / cover no-repeat; box-shadow: inset 0 0 0 1px var(--w-12); opacity: .5; transform: scale(.94); }
.hw-clip.c0 { background-image: url("img/clip-1m.jpg"); background-position: 39% 50%; } .hw-clip.c1 { background-image: url("img/clip-2.jpg"); background-position: 50% 30%; } .hw-clip.c2 { background-image: url("img/clip-3.jpg"); background-position: 33% 50%; }
.hw-clip.ok { opacity: 1; transform: none; box-shadow: inset 0 0 0 1.5px var(--white), 0 12px 32px -8px var(--k-85), 0 0 32px -8px var(--w-20); }
.hw-clip .tc { position: absolute; top: 6px; left: 6px; font-size: var(--fs-12); color: var(--white); text-shadow: 0 1px 2px var(--k-85); }
.hw-check { position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--black); } .hw-check svg.i { width: 13px; height: 13px; stroke-width: 2.4; }
.hw-plan { width: 100%; max-width: 280px; display: flex; flex-direction: column; gap: var(--s1-5); }
.hw-row { display: flex; align-items: center; gap: var(--s3); height: 36px; padding: 0 var(--s3); border-radius: var(--r-m); background: var(--w-04); font-size: var(--fs-12); color: var(--muted); }
.hw-row .tc { font-size: var(--fs-12); color: var(--text); }
.hw-row.next { background: var(--w-08); box-shadow: var(--glass-rim); color: var(--text); }
.hw-state { display: inline-flex; align-items: center; gap: var(--s1-5); font-size: var(--fs-12); color: var(--faint); white-space: nowrap; }
.hw-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); opacity: .8; }
.hw-row.next .hw-state { color: var(--text); } .hw-row.next .hw-state i { background: var(--white); box-shadow: 0 0 8px var(--w-20); }

/* trimming a long upload: the whole length as a film strip, the kept part lit between two handles */
.up-item.has-trim { align-items: flex-start; padding: var(--s4); }
.up-item.has-trim .up-ico { margin-top: var(--s0); }
.trim { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.trim-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); font-size: var(--fs-13); }
.trim-len b { font: 500 var(--fs-14) var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.trim-cost { font: 500 var(--fs-12) var(--mono); color: var(--muted); padding: var(--s0) var(--s2); border-radius: var(--r-s); background: var(--panel-2); white-space: nowrap; }
.trim-cost.bad { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.trim-track { position: relative; height: 44px; --a: 0%; --b: 100%; }
.trim-film { position: absolute; inset: 6px 0; border-radius: var(--r-s); background: repeating-linear-gradient(90deg, var(--w-08) 0 10px, var(--w-04) 10px 12px); }
.trim-sel { position: absolute; top: 2px; bottom: 2px; left: var(--a); right: calc(100% - var(--b)); border-radius: var(--r-m); background: var(--w-08); box-shadow: inset 0 0 0 2px var(--white), 0 0 24px -6px var(--w-20); pointer-events: none; }
.trim.short .trim-sel { box-shadow: inset 0 0 0 2px var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.trim-fit { position: absolute; top: 0; bottom: 0; left: var(--f); width: 0; border-left: 1.5px dashed var(--w-20); pointer-events: none; }
.trim-fit::after { content: ""; position: absolute; top: -3px; left: -4.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--white); }
.trim-track input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: none; -webkit-appearance: none; appearance: none; pointer-events: none; }
.trim-track input[type=range]::-webkit-slider-runnable-track { height: 100%; background: none; }
.trim-track input[type=range]::-moz-range-track { height: 100%; background: none; }
.trim-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 44px; border-radius: var(--r-s); background: var(--white); cursor: ew-resize; box-shadow: 0 2px 10px var(--k-60); border: 0;
  background-image: linear-gradient(90deg, transparent 5px, var(--k-60) 5px 6px, transparent 6px 8px, var(--k-60) 8px 9px, transparent 9px); background-size: 14px 14px; background-position: center; background-repeat: no-repeat; }
.trim-track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 44px; border-radius: var(--r-s); background: var(--white); cursor: ew-resize; border: 0; box-shadow: 0 2px 10px var(--k-60); }
.trim-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.trim.short .trim-track input[type=range]::-webkit-slider-thumb { background-color: var(--red); }
.trim-times { display: flex; align-items: center; gap: var(--s2); }
.trim-times input.trim-in { width: 96px; min-height: 32px; padding: var(--s1) 10px; font: 500 var(--fs-13) var(--mono); font-variant-numeric: tabular-nums; text-align: left; }
.trim-times input.trim-in.end { text-align: right; }
.trim-note { flex: 1; text-align: center; font-size: var(--fs-12); line-height: var(--lh-snug); color: var(--faint); text-wrap: balance; }
.trim-fitbtn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media not all and (min-width: 600px) { .up-item.has-trim .up-ico { display: none; } .trim-times input.trim-in { width: 84px; } .trim-note { display: none; } .trim-times { justify-content: space-between; } }

.screen-wait { min-height: 40vh; }

/* the Telegram channel card: a pane of frosted glass that leans toward the pointer, the Telegram logo as a glass disc floating above it.
   Telegram's blue is only the light behind the glass. */
:root { --tg-font: "Unbounded", var(--font); }
.tg3d { perspective: 900px; }
.tg-slab { --tx: 0deg; --ty: 0deg; --gx: 30%; --gy: 0%; position: relative; isolation: isolate; overflow: hidden; display: grid; color: var(--text); border-radius: var(--r-xl); transform-style: preserve-3d;
  transform: rotateX(var(--tx)) rotateY(var(--ty)); transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
  background: radial-gradient(120% 80% at 50% -20%, color-mix(in srgb, var(--tg) 22%, transparent), transparent 60%), var(--w-04);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 var(--w-20), inset 0 0 0 1px var(--w-08), inset 0 -1px 0 var(--w-04), 0 20px 40px -24px var(--k-85); }
.tg-slab::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, var(--w-12), rgba(255,255,255,0) 38%, rgba(255,255,255,0) 70%, var(--w-04)); }
.tg3d:hover .tg-slab { transition: transform .12s linear, box-shadow .3s; color: var(--text); box-shadow: inset 0 1px 0 var(--w-20), inset 0 0 0 1px var(--w-12), 0 24px 48px -24px var(--k-85); }
.tg-glare { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px circle at var(--gx) var(--gy), var(--w-08), transparent 60%); }
.tg3d:hover .tg-glare { opacity: 1; }
/* The logo turns on its own, harder than the card: the same pointer tilt times --spin. */
.tg-orb { --spin: 2.6; position: relative; display: grid; place-items: center; width: 64px; height: 64px;
  transform: translateZ(40px) perspective(260px) rotateX(calc(var(--tx) * var(--spin))) rotateY(calc(var(--ty) * var(--spin)));
  transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.tg3d:hover .tg-orb { transition: transform .15s linear; }
.tg-banner .tg-orb { --spin: 5; }
.tg-light { position: absolute; inset: 18%; border-radius: 50%; background: var(--tg); filter: blur(20px); opacity: .6; }
.tg-glass { position: relative; width: 100%; height: 100%; overflow: visible; animation: tg-float 6s ease-in-out infinite; filter: drop-shadow(0 12px 12px var(--tg-shadow)); }
.tg-side { opacity: .55; }
.tg-side path { stroke-width: 1.5; stroke-linejoin: round; }
.tg-face { opacity: .78; }
@keyframes tg-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-4px) rotate(-3deg); } }
.tg-copy { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; transform: translateZ(22px); }
.tg-title { font-family: var(--tg-font); font-weight: 600; letter-spacing: -.01em; color: var(--white); text-wrap: balance; }
.tg-copy small { color: var(--muted); font-size: var(--fs-12); line-height: var(--lh-snug); }
.tg-cta { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1-5); height: 36px; padding: 0 var(--s4); border-radius: var(--r-m); transform: translateZ(28px);
  font-family: var(--tg-font); font-size: var(--fs-12); font-weight: 500; color: var(--white); letter-spacing: .01em;
  background: var(--w-08); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 var(--w-20), inset 0 0 0 1px var(--w-12); transition: background .2s, box-shadow .2s; }
.tg-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: translate .2s; }
.tg3d:hover .tg-cta { background: var(--w-12); box-shadow: inset 0 1px 0 var(--w-20), inset 0 0 0 1px var(--w-20); }
.tg3d:hover .tg-cta svg { translate: 3px 0; }
.tg-slab:active .tg-cta { background: var(--w-20); }

/* the sidebar: emblem on top, title, one line, a full-width button */
.tg-rail .tg-slab { justify-items: center; text-align: center; gap: 14px; padding: 22px 14px 14px; }
.tg-rail .tg-orb { width: 56px; height: 56px; margin-bottom: var(--s1); }
.tg-rail .tg-title { font-size: var(--fs-14); line-height: var(--lh-snug); }
.tg-rail .tg-cta { width: 100%; }
/* a slim card: emblem and two lines, the button full width under them */
.tg-row .tg-slab { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px var(--s4); padding: var(--s4); }
.tg-row .tg-orb { width: 48px; height: 48px; }
.tg-row .tg-title { font-size: var(--fs-14); line-height: var(--lh-snug); }
.tg-row .tg-cta { grid-column: 1 / -1; width: 100%; height: 40px; }
.auth-main > .tg-row { width: 100%; max-width: 400px; }
.tg-main { margin-top: var(--s6); }
@media (min-width: 960px) { .tg-main { display: none; } }
/* the landing page */
.tg-banner { margin: var(--s6) 0; } .tg-banner .tg-slab { justify-items: start; gap: var(--s5); padding: 36px var(--s5) 28px; border-radius: var(--r-2xl); }
.tg-trail { position: absolute; z-index: -1; right: 0; bottom: 0; width: min(560px, 100%); height: auto; fill: none; stroke: var(--w-20); stroke-width: 1.2; stroke-dasharray: 3 7; stroke-linecap: round; }
.tg-trail .two { stroke: color-mix(in srgb, var(--tg) 45%, transparent); }
.tg-banner .tg-orb { width: 84px; height: 84px; }
.tg-banner .tg-title { margin: 0 0 var(--s2); font-size: var(--fs-28); line-height: var(--lh-tight); } .tg-banner p { margin: 0; max-width: 32em; color: var(--muted); font-size: var(--fs-14); line-height: var(--lh-body); }
.tg-banner .tg-cta { height: 48px; padding: 0 var(--s5); border-radius: var(--r-l); font-size: var(--fs-14); }
@media (min-width: 600px) { .tg-banner .tg-slab { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s6); padding: 44px 48px; } .tg-banner .tg-title { font-size: var(--fs-28); } }
@media (prefers-reduced-motion: reduce) { .tg-glass { animation: none; } .tg-slab { transition: none; } }

/* Projects: one large way to make a project (no projects yet) and the same object as the last tile of the grid */
.np-hero { position: relative; isolation: isolate; overflow: hidden; width: 100%; min-height: 360px; margin-top: var(--s2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s5);
  padding: 48px var(--s5); border: 0; border-radius: var(--r-2xl); color: var(--text); text-align: center; cursor: pointer; font: inherit;
  background: radial-gradient(60% 70% at 50% 0%, var(--w-08), transparent 70%), var(--panel);
  box-shadow: inset 0 1px 0 var(--w-12), inset 0 0 0 1px var(--w-08), 0 30px 60px -40px var(--k-85); transition: box-shadow .3s, transform .3s; }
.np-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: linear-gradient(var(--w-04) 1px, transparent 1px), linear-gradient(90deg, var(--w-04) 1px, transparent 1px); background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 40%, var(--black), transparent); mask-image: radial-gradient(60% 70% at 50% 40%, var(--black), transparent); }
.np-hero:hover { box-shadow: inset 0 1px 0 var(--w-20), inset 0 0 0 1px var(--w-12), 0 30px 60px -36px var(--k-85); }
.np-hero:hover .np-stack i:nth-child(1) { transform: translate(-22px, 10px) rotate(-12deg); } .np-hero:hover .np-stack i:nth-child(2) { transform: translate(22px, 10px) rotate(12deg); }
.np-hero:hover .np-stack i:nth-child(3), .np-tile:hover .np-stack i:nth-child(3) { transform: translateY(-4px); }
/* three stacked folders: the front one carries the plus */
.np-stack { position: relative; width: 112px; height: 96px; }
.np-stack i { position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--r-xl); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  background: linear-gradient(180deg, var(--w-12), var(--w-04)), var(--raised); box-shadow: inset 0 1px 0 var(--w-12), inset 0 0 0 1px var(--w-08), 0 16px 30px -16px var(--k-85); }
.np-stack i:nth-child(1) { transform: translate(-14px, 8px) rotate(-8deg); opacity: .55; } .np-stack i:nth-child(2) { transform: translate(14px, 8px) rotate(8deg); opacity: .75; }
.np-stack i:nth-child(3) { background: linear-gradient(180deg, var(--w-20), var(--w-08)), var(--grey-1); }
.np-stack .i { width: 36px; height: 36px; stroke-width: 1.5; color: var(--text); }
.np-copy { display: flex; flex-direction: column; gap: var(--s2); max-width: 30em; }
.np-copy b { font-size: var(--fs-28); line-height: var(--lh-snug); font-weight: 600; letter-spacing: -.02em; }
.np-copy span { color: var(--muted); font-size: var(--fs-14); line-height: var(--lh-body); text-wrap: balance; }
.np-btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 28px; border-radius: var(--r-l); font-size: var(--fs-16); font-weight: 600; color: var(--ink);
  background: linear-gradient(180deg, var(--white), var(--paper)); box-shadow: inset 0 1px 0 var(--white), 0 10px 30px -10px var(--w-20); transition: transform .2s, box-shadow .2s; }
.np-btn .i { width: 20px; height: 20px; stroke-width: 2; }
.np-hero:hover .np-btn { transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--white), 0 14px 36px -10px var(--w-20); }
.np-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-height: 220px; border: 0; border-radius: var(--r-xl); cursor: pointer; font: inherit; color: var(--text);
  background: radial-gradient(70% 60% at 50% 0%, var(--w-08), transparent 70%), var(--panel); box-shadow: inset 0 0 0 1px var(--w-08), inset 0 1px 0 var(--w-12); }
.np-tile b { font-size: var(--fs-14); font-weight: 600; }
.np-stack.sm { width: 76px; height: 64px; } .np-stack.sm i { border-radius: var(--r-l); } .np-stack.sm .i { width: 26px; height: 26px; }
@media (min-width: 600px) { .np-hero { min-height: 440px; } .np-copy b { font-size: var(--fs-28); line-height: var(--lh-tight); } }
@media (prefers-reduced-motion: reduce) { .np-stack i, .np-btn { transition: none; } }

/* «Как это работает»: the pictures answer clicks */
.hw-modes button { padding: var(--s1) var(--s2); border: 0; border-radius: var(--r-s); font: inherit; font-size: var(--fs-12); line-height: var(--lh-snug); color: var(--faint); background: var(--w-04); white-space: nowrap; cursor: pointer; transition: color var(--fast), background var(--fast), box-shadow var(--fast); }
.hw-modes button:hover { color: var(--muted); background: var(--w-08); }
.hw-modes button.on { color: var(--text); background: var(--w-08); box-shadow: inset 0 0 0 1px var(--w-20); }
button.hw-clip { padding: 0; border: 0; cursor: pointer; font: inherit; transition: opacity .25s, transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
button.hw-clip:not(.ok):hover { opacity: .8; transform: scale(.97); }
.hw-clip .hw-check { opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1.4); }
.hw-clip.ok .hw-check { opacity: 1; transform: none; }
.hw-plan { max-width: 300px; gap: var(--s2); }
.hw-plan .hw-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 44px; padding: 0 var(--s3) 0 var(--s1-5); border: 0; border-radius: var(--r-m); cursor: pointer; font: inherit; font-size: var(--fs-12); text-align: left;
  color: var(--muted); background: var(--w-04); box-shadow: inset 0 0 0 1px var(--w-04); transition: background var(--fast), box-shadow var(--fast), color var(--fast), transform .2s; }
.hw-plan .hw-row:hover { background: var(--w-08); }
.hw-plan .hw-row.on { color: var(--text); background: var(--w-08); box-shadow: inset 0 1px 0 var(--w-12), inset 0 0 0 1px var(--w-12), 0 10px 24px -14px var(--k-85); transform: translateX(2px); }
.hw-time { display: grid; place-items: center; height: 32px; border-radius: var(--r-s); background: var(--w-04); font: 500 var(--fs-12)/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.hw-row.on .hw-time { background: var(--w-08); }
.hw-who { display: flex; align-items: center; gap: var(--s2); min-width: 0; line-height: var(--lh-snug); }
.hw-ava { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-12); font-weight: 600; color: var(--white); background: linear-gradient(160deg, var(--w-20), var(--w-08)); box-shadow: inset 0 0 0 1px var(--w-12); }
.hw-plan .hw-state { line-height: var(--lh-snug); }
.hw-row.on .hw-state { color: var(--text); }
.hw-row.next .hw-state i { background: var(--white); box-shadow: 0 0 8px var(--w-20); }

/* the upload picture's easter egg: clicks fill the upload, 100% turns the file green with a drawn check */
button.hw-file { width: 100%; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; transition: box-shadow .4s, background .4s, transform .15s; }
button.hw-file:active { transform: scale(.98); }
.hw-bar i { transition: width .35s cubic-bezier(.2,.8,.2,1), background .4s; }
.hw-pct { animation: hw-tick .3s cubic-bezier(.2,.8,.2,1.4); }
@keyframes hw-tick { from { transform: translateY(-6px); opacity: 0; } }
.hw-up.done .hw-file { background: color-mix(in srgb, var(--ok) 8%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 85%, transparent), 0 0 28px -8px color-mix(in srgb, var(--ok) 60%, transparent); animation: hw-glow .6s ease-out; }
.hw-up.done .hw-bar i { background: linear-gradient(90deg, var(--ok), var(--ok-light)); }
.hw-up.done .hw-ico { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
@keyframes hw-glow { 0% { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 0%, transparent), 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent); } 60% { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ok) 85%, transparent), 0 0 0 10px color-mix(in srgb, var(--ok) 0%, transparent); } }
.hw-done { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); animation: hw-pop .45s cubic-bezier(.2,.8,.2,1.5); }
.hw-done svg { width: 15px; height: 15px; fill: none; stroke: var(--ok-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; animation: hw-draw .35s .2s ease-out forwards; }
@keyframes hw-pop { from { transform: scale(0); } }
@keyframes hw-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hw-done, .hw-pct, .hw-up.done .hw-file { animation: none; } .hw-done svg { animation: none; stroke-dashoffset: 0; } }

/* reduced motion: the pages and sheets still appear, nothing moves or loops */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .an-progress { animation: none; width: 100%; opacity: .5; } .an-spin svg { animation: none; }
  .phone, .float { animation: none; } .tilting { transform: none; }
  .spin { animation: none; border-right-color: currentColor; opacity: .5; }
}
