/* cheapgc simple mode: styles. Light theme only. */

@font-face { font-family: "Hanken Grotesk"; src: url(../fonts/hanken-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: oklch(98.8% 0.0035 286);
  --surface: oklch(100% 0 0);
  --well: oklch(96.3% 0.0065 286);
  --well-2: oklch(94.2% 0.008 286);
  --ink: oklch(17% 0.046 271);          /* the wordmark's navy */
  --ink-2: oklch(35% 0.032 274);
  --muted: oklch(51% 0.02 279);
  --faint: oklch(68% 0.014 283);
  --hair: oklch(92.6% 0.0075 286);
  --hair-2: oklch(88.5% 0.01 286);
  --violet: oklch(54% 0.24 286);         /* the wordmark's gc */
  --violet-ink: oklch(46% 0.24 280);
  --violet-mark: oklch(60% 0.22 287);    /* the star */
  --violet-soft: oklch(95.6% 0.026 288);
  --violet-line: oklch(82% 0.1 287);
  --aura-1: oklch(70% 0.19 292);
  --aura-2: oklch(79% 0.12 268);
  --aura-3: oklch(84% 0.1 322);
  --aura-4: oklch(88% 0.075 232);
  --good: oklch(58% 0.12 158);

  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --r-media: 16px;
  --r-ctl: 12px;
  --r-box: 26px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px oklch(25% 0.04 280 / 0.06), 0 3px 10px -4px oklch(25% 0.04 280 / 0.08);
  --shadow-pop: 0 0 0 1px oklch(25% 0.04 280 / 0.06), 0 2px 4px oklch(25% 0.04 280 / 0.05), 0 22px 48px -16px oklch(25% 0.06 280 / 0.28);
  --shadow-lift: 0 2px 6px oklch(25% 0.04 280 / 0.08), 0 24px 44px -18px oklch(25% 0.08 280 / 0.42);

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-io: cubic-bezier(0.6, 0, 0.3, 1);
  --spring: linear(0, 0.06, 0.19, 0.35, 0.51, 0.65, 0.76, 0.85, 0.91, 0.96, 0.99, 1.01, 1.02, 1.02, 1.02, 1.015, 1.01, 1.006, 1.003, 1.001, 1);

  --rail-w: 88px;
  --top-h: 68px;
  --tab-h: 64px;
  --gutter: clamp(16px, 3.4vw, 48px);
  --content: 1320px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 15px/1.5 var(--sans); letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;

}
img, video { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { flex: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Shell ---------- */

.shell { min-height: 100dvh; overflow-x: clip; }
#view { display: block; outline: none; padding-left: var(--rail-w); min-height: calc(100dvh - var(--top-h)); }
body.is-public #view { padding-left: 0; }

/* The rail has no fill of its own (only the page sits under it): the light trail runs on behind it to the window's edge */
.rail {
  position: fixed; inset: var(--top-h) auto 0 0; width: var(--rail-w); z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 0 62px;
  border-right: 1px solid var(--hair);
  view-transition-name: rail;
}
body.is-public .rail { display: none; }
.rail-item {
  width: 80px; white-space: nowrap; padding: 8px 0 7px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 11px; font-weight: 550; letter-spacing: 0;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.rail-item .ico { width: 40px; height: 30px; border-radius: 10px; display: grid; place-items: center; transition: background-color 200ms var(--ease); }
.rail-item svg { width: 21px; height: 21px; }
.rail-item:hover { color: var(--ink); }
.rail-item:hover .ico { background: var(--well-2); }
.rail-item[aria-current="page"] { color: var(--ink); }
.rail-item[aria-current="page"] .ico { background: var(--violet-soft); color: var(--violet-ink); }
.rail-gap { flex: 1; }

.topbar {
  position: sticky; top: 0; z-index: 25; height: var(--top-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter) 0 26px;
  background: color-mix(in oklch, var(--paper) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  view-transition-name: topbar;
}
body.is-public .topbar { padding-left: var(--gutter); }
.topbar.is-scrolled { box-shadow: 0 1px 0 var(--hair); }
.top-nav { display: flex; gap: 6px; margin: 0 auto; }
.top-nav a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 550; font-size: 15px; transition: color 160ms, background-color 160ms; }
.top-nav a:hover { color: var(--ink); background: var(--well); }
.top-nav a[aria-current="page"] { color: var(--ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.phone-only { display: none; }
@media (max-width: 760px) { .phone-only { display: inline-flex; } }
body.is-public .top-right { margin-left: 0; }
.top-link { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 550; white-space: nowrap; }
.top-link:hover { background: var(--well); color: var(--ink); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); font-weight: 650; font-size: 14px; color: var(--ink);
}

.wordmark { display: inline-flex; align-items: center; gap: 8px; font-size: 25px; line-height: 1; letter-spacing: -0.045em; color: var(--ink); white-space: nowrap; }
.wordmark svg { width: 26px; height: 26px; color: var(--violet-mark); }
.wordmark .w-cheap { font-weight: 650; }
.wordmark .w-gc { font-weight: 900; color: var(--violet); }

.tabbar { display: none; }

@media (max-width: 760px) {
  :root { --rail-w: 0px; --top-h: 58px; }
  .rail { display: none; }
  .topbar { padding: 0 16px; gap: 12px; }
  .wordmark { font-size: 22px; gap: 7px; }
  .wordmark svg { width: 22px; height: 22px; }
  .top-nav { display: none; }
  body.is-public .top-right { margin-left: auto; gap: 4px; }
  .top-link { padding: 8px 8px; }
  .top-right .seg-icons.seg-top button { width: 34px; height: 30px; }
  .top-right .seg-icons.seg-top button svg { width: 17px; height: 17px; }
  .top-right .seg-top { margin-right: 4px; }
  #view { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 24px); }
  body.is-public #view { padding-bottom: 40px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: fixed; inset: auto 0 0 0; z-index: 30;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in oklch, var(--paper) 86%, transparent);
    backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
    border-top: 1px solid var(--hair);
    view-transition-name: tabbar;
  }
  body.is-public .tabbar { display: none; }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0; }
  .tab svg { width: 22px; height: 22px; }
  .tab[aria-current="page"] { color: var(--violet-ink); }
}

/* ---------- Buttons and small controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: var(--r-ctl);
  font-weight: 620; font-size: 15px; white-space: nowrap;
  transition: background-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 120ms var(--ease), color 180ms;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 20px; height: 20px; }
.btn-primary {
  background: var(--ink); color: #fff;
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.14), 0 1px 2px oklch(17% 0.05 271 / 0.3), 0 10px 22px -10px oklch(30% 0.14 280 / 0.55);
}
.btn-primary:hover { background: oklch(25% 0.07 274); }

.btn-primary .price { font-variant-numeric: tabular-nums; }
.btn-quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2), 0 1px 2px oklch(25% 0.04 280 / 0.05); }
.btn-quiet:hover { background: var(--well); }
.btn-wide { width: 100%; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2);
  transition: background-color 160ms var(--ease), color 160ms;
}
.icon-btn:hover { background: var(--well-2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 13px; border-radius: var(--r-pill);
  color: var(--ink-2); font-weight: 560; font-size: 14px;
  background: oklch(100% 0 0 / 0.6); box-shadow: inset 0 0 0 1px var(--hair-2);
  transition: background-color 160ms, box-shadow 160ms, color 160ms;
}
.chip:hover { background: var(--surface); color: var(--ink); }
.chip svg { width: 16px; height: 16px; }
.chip[aria-expanded="true"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--violet-line), 0 0 0 3px var(--violet-soft); color: var(--ink); }

.text-link { color: var(--ink-2); font-weight: 560; display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; }
.text-link svg { width: 16px; height: 16px; transition: transform 200ms var(--ease); }
.text-link:hover { color: var(--ink); }
.text-link:hover svg { transform: translateX(2px); }

/* Segmented pill with a sliding thumb (the format switch and the versions picker) */
.seg {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: auto; align-items: stretch;
  padding: 4px; border-radius: var(--r-pill); background: var(--well-2);
  box-shadow: inset 0 0 0 1px oklch(25% 0.03 280 / 0.05), inset 0 1px 2px oklch(25% 0.03 280 / 0.06);
  isolation: isolate;
}
.seg button {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: var(--r-pill);
  color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: color 220ms var(--ease);
}
.seg button:hover { color: var(--ink-2); }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg button svg { width: 17px; height: 17px; }
.seg-thumb {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: var(--w, 0px);
  transform: translateX(var(--x, 0px)); border-radius: var(--r-pill); background: var(--surface);
  box-shadow: 0 1px 2px oklch(25% 0.04 280 / 0.1), 0 3px 10px -3px oklch(25% 0.06 280 / 0.18), inset 0 0 0 0.5px oklch(25% 0.04 280 / 0.06);
  transition: transform 420ms var(--spring), width 420ms var(--spring);
}
.seg.no-anim .seg-thumb { transition: none; }
.seg-sm button { height: 32px; padding: 0 12px; font-size: 13.5px; }
/* The format switch: the two shapes only */
.seg-icons button { width: 48px; padding: 0; }
.seg-icons button svg { width: 19px; height: 19px; }
.seg-icons.seg-sm button { width: 42px; }
/* In the top bar: smaller, beside the account button; its tooltips open below the bar */
.seg-top { padding: 3px; }
.seg-top .seg-thumb { top: 3px; bottom: 3px; }
.seg-icons.seg-top button { width: 40px; height: 32px; }
.seg-icons.seg-top button svg { width: 18px; height: 18px; }
.seg-num { display: grid; grid-auto-columns: 1fr; width: 100%; }
.seg-num button { padding: 0; font-variant-numeric: tabular-nums; }

@media (hover: hover) and (pointer: fine) {
  [data-tip] { position: relative; }
  [data-tip]::after {
    content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 4px; z-index: 10;
    padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 550; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 140ms var(--ease) 0ms, translate 200ms var(--ease);
  }
  [data-tip]:hover::after { opacity: 1; translate: -50% 0; transition-delay: 380ms; }
  [data-tip][aria-expanded="true"]::after { opacity: 0; }
  .topbar [data-tip]::after { bottom: auto; top: calc(100% + 10px); translate: -50% -4px; }
}

/* ---------- Popover, sheet, dialog, toast ---------- */

.pop {
  position: fixed; z-index: 60; min-width: 220px; max-width: min(360px, calc(100vw - 24px));
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-pop); padding: 8px;
  transform-origin: var(--origin, top left);
  animation: pop-in 180ms var(--ease) both;
}
.pop.is-closing { animation: pop-out 120ms var(--ease) both; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
@keyframes pop-out { to { opacity: 0; transform: scale(0.98); } }
.pop-title { padding: 8px 10px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pop-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 6px 10px; border-radius: 12px; text-align: left;
  font-weight: 550; color: var(--ink);
}
.pop-item:hover, .pop-item:focus-visible { background: var(--well); outline: none; }
.pop-item > svg { width: 20px; height: 20px; color: var(--ink-2); }
.pop-item .check { margin-left: auto; color: var(--violet); width: 18px; height: 18px; opacity: 0; }
.pop-item[aria-checked="true"] .check { opacity: 1; }
.pop-item .face { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--well-2); }
.pop-item .sub { display: block; font-size: 13px; font-weight: 450; color: var(--muted); }
.pop-sep { height: 1px; background: var(--hair); margin: 6px 4px; }
.pop-pad { padding: 6px 10px 10px; }
.pop-photos { display: grid; grid-template-columns: repeat(4, 64px); gap: 8px; padding: 4px 10px 10px; }
.pop-photo { width: 64px; height: 80px; border-radius: 10px; overflow: hidden; background: var(--well); box-shadow: inset 0 0 0 1px var(--hair); position: relative; }
.pop-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 240ms var(--ease); }
.pop-photo:hover img { transform: scale(1.06); }
.pop-photo[aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--violet); }
.pop-upload { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 10px; border-radius: 12px; font-weight: 560; cursor: pointer; }
.pop-upload:hover, .pop-upload:focus-within { background: var(--well); }
.pop-upload svg { width: 20px; height: 20px; color: var(--ink-2); }
.pop-upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--r-pill); font-weight: 550; font-size: 14px;
  box-shadow: 0 12px 32px -12px oklch(17% 0.05 271 / 0.6);
  transition: opacity 200ms var(--ease), transform 300ms var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-act { color: oklch(84% 0.11 292); font-weight: 650; padding: 4px 2px; border-radius: 6px; }
.toast-act:hover { color: #fff; }
@media (max-width: 760px) { .toast { bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); } }

dialog.modal {
  width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 24px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-pop);
}
dialog.modal[open] { animation: modal-in 260ms var(--ease) both; }
dialog.modal::backdrop { background: oklch(25% 0.04 280 / 0.22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in 200ms var(--ease) both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 6px 26px; }
.modal-head h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.modal-body { padding: 12px 26px 26px; display: grid; gap: 18px; }

.field { display: grid; gap: 8px; }
.field label, .field .label { font-size: 14px; font-weight: 600; color: var(--ink); }
.input, .textarea {
  width: 100%; border: 0; border-radius: var(--r-ctl); background: var(--surface); padding: 12px 14px; line-height: 1.45;
  box-shadow: inset 0 0 0 1px var(--hair-2); transition: box-shadow 160ms var(--ease);
}
.input { height: 46px; }
.textarea { resize: none; min-height: 84px; }
.input:focus, .textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--violet-line), 0 0 0 4px var(--violet-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }

.dropzone {
  display: grid; place-items: center; gap: 6px; text-align: center; padding: 26px 16px; border-radius: 18px; cursor: pointer;
  background: var(--well); box-shadow: inset 0 0 0 1.5px var(--hair-2); color: var(--muted); font-size: 14px;
  background-image: radial-gradient(60% 80% at 50% 120%, color-mix(in oklch, var(--aura-2) 30%, transparent), transparent);
  transition: box-shadow 160ms var(--ease), background-color 160ms;
}
.dropzone:hover, .dropzone:focus-within { box-shadow: inset 0 0 0 1.5px var(--violet-line); }
.dropzone svg { width: 26px; height: 26px; color: var(--ink-2); }
.dropzone strong { color: var(--ink); font-weight: 600; }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone img { width: 120px; height: 150px; object-fit: cover; border-radius: 14px; }

/* ---------- Home ---------- */

.home { padding: clamp(36px, 7vh, 88px) 0 64px; }
.home-hero { position: relative; isolation: isolate; padding: 0 var(--gutter); display: grid; justify-items: center; }
/* The light trail runs the window's full width and off both edges, as on the waitlist: its box starts at the window's
   left edge (back over the rail, --view-x) and ends at its right; the curve stays centred on the content (--lt-hdx).
   Its parent spans the view's full width. */
body { --view-x: var(--rail-w); }
body.is-public { --view-x: 0px; }
.trail { position: absolute; z-index: -2; pointer-events: none; left: calc(-1 * var(--view-x)); right: 0; --lt-hdx: calc(var(--view-x) / 2); }
.home-trail { top: -92px; height: 406px; --lt-floor: 40px; --lt-head: 90px; }
.drop { position: relative; isolation: isolate; }
.drop-trail { top: -28px; height: 380px; opacity: 0.6; --lt-floor: 40px; --lt-head: 80px; }
.home-title {
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; font-weight: 640; letter-spacing: -0.035em; text-align: center;
  margin-bottom: clamp(24px, 3.6vh, 36px);
}

.compose-wrap { position: relative; width: min(820px, 100%); isolation: isolate; }
.aura {
  position: absolute; inset: -46px -70px -58px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(30% 62% at 14% 58%, var(--aura-1), transparent 74%),
    radial-gradient(34% 70% at 86% 42%, var(--aura-2), transparent 74%),
    radial-gradient(42% 50% at 50% 100%, var(--aura-3), transparent 74%),
    radial-gradient(40% 46% at 58% 0%, var(--aura-4), transparent 74%),
    radial-gradient(50% 60% at 50% 50%, color-mix(in oklch, var(--aura-1) 55%, transparent), transparent 80%);
  filter: blur(40px) saturate(1.25); opacity: 0.9; transform: scale(0.98);
  transition: opacity 700ms var(--ease), transform 900ms var(--ease);
  animation: aura-drift 18s var(--ease-io) infinite alternate;
}
.compose-wrap:focus-within .aura, .compose-wrap.is-full .aura { opacity: 1; transform: scale(1.04); }
.aura.is-pulse { animation: aura-pulse 1100ms var(--ease) both, aura-drift 18s var(--ease-io) infinite alternate; }
@keyframes aura-drift {
  0% { translate: 0 0; rotate: 0deg; }
  50% { translate: 14px -6px; rotate: 1.5deg; }
  100% { translate: -12px 8px; rotate: -1deg; }
}
@keyframes aura-pulse { 0% { opacity: 0.7; scale: 1; } 30% { opacity: 1; scale: 1.08; } 100% { scale: 1; } }
.home-enter .aura { animation: aura-bloom 1200ms var(--ease) both, aura-drift 18s var(--ease-io) 1200ms infinite alternate; }
@keyframes aura-bloom { from { opacity: 0; scale: 0.82; } }

.compose {
  position: relative; border-radius: var(--r-box);
  background: linear-gradient(180deg, oklch(100% 0 0 / 0.8), oklch(100% 0 0 / 0.64));
  backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7);
  box-shadow:
    inset 0 1px 0 oklch(100% 0 0 / 0.95),
    inset 0 -1px 0 oklch(100% 0 0 / 0.5),
    0 0 0 1px oklch(52% 0.12 286 / 0.1),
    0 1px 2px oklch(30% 0.08 286 / 0.06),
    0 0 28px -4px oklch(70% 0.16 290 / 0.34),
    0 26px 60px -26px oklch(42% 0.2 286 / 0.42);
  transition: box-shadow 300ms var(--ease);
}
.compose::before {   /* the fine light edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, oklch(100% 0 0 / 1), oklch(80% 0.09 287 / 0.55) 38%, oklch(100% 0 0 / 0.4) 62%, oklch(86% 0.07 250 / 0.7));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.compose-wrap:focus-within .compose { box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.95), inset 0 -1px 0 oklch(100% 0 0 / 0.5), 0 0 0 1px oklch(52% 0.16 286 / 0.24), 0 1px 2px oklch(30% 0.08 286 / 0.06), 0 0 36px -2px oklch(70% 0.17 290 / 0.45), 0 30px 70px -26px oklch(42% 0.22 286 / 0.5); }
.compose.is-nudge { animation: nudge 360ms var(--ease); }
@keyframes nudge { 20% { translate: -5px 0; } 45% { translate: 4px 0; } 70% { translate: -2px 0; } }

.compose-field { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 8px; padding: 20px 22px 6px; min-height: 92px; cursor: text; }
.compose-tags { display: contents; }
.compose-input {
  flex: 1 1 240px; min-width: 0; border: 0; background: transparent; resize: none; outline: none; overflow: hidden;
  font-size: 17px; line-height: 1.5; padding: 7px 4px; height: 40px; color: var(--ink);
}
.compose-input::placeholder { color: var(--faint); }
.compose-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px 12px 14px; }
.compose-bar .spacer { flex: 1; }
.compose-bar .icon-btn { width: 40px; height: 40px; color: var(--ink-2); }
.compose-bar .icon-btn[aria-expanded="true"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--violet-line), 0 0 0 3px var(--violet-soft); }

.tag {
  display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 4px 4px 4px 4px; border-radius: 13px;
  background: oklch(100% 0 0 / 0.85); box-shadow: inset 0 0 0 1px var(--hair-2), 0 1px 2px oklch(25% 0.04 280 / 0.06);
  max-width: 100%; font-weight: 580; font-size: 14.5px; color: var(--ink);
}
.tag-thumb { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; background: var(--well-2); flex: none; }
.tag-thumb.is-wide { width: 52px; }
.tag[data-kind="character"] .tag-thumb { border-radius: 50%; }
.tag-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.tag-x { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); }
.tag-x:hover { background: var(--well-2); color: var(--ink); }
.tag-x svg { width: 16px; height: 16px; }
.tag.is-incoming { visibility: hidden; }
.tag.is-landed { animation: tag-land 620ms var(--spring) both; }
@keyframes tag-land { from { transform: scale(0.9); box-shadow: inset 0 0 0 1px var(--violet-line), 0 0 0 6px color-mix(in oklch, var(--aura-1) 30%, transparent); } }
.tag.is-landed .tag-label { animation: label-in 420ms var(--ease) 80ms both; }
@keyframes label-in { from { opacity: 0; transform: translateX(-6px); } }
.tag.is-leaving { animation: tag-leave 180ms var(--ease) both; }
@keyframes tag-leave { to { opacity: 0; transform: scale(0.92); } }

.ghost {
  position: fixed; z-index: 80; pointer-events: none; overflow: hidden; border-radius: 16px; background: var(--well-2);
  box-shadow: 0 20px 50px -14px oklch(30% 0.14 286 / 0.5);
}
.ghost img { width: 100%; height: 100%; object-fit: cover; }

.compose-under {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; width: min(820px, 100%); margin-top: 26px;
}
.compose-under .seg { grid-column: 2; }
.compose-under .advanced { grid-column: 3; justify-self: end; }

/* The rows sit open on the page: no card, border, fill or shadow. Each row's title and first card line up with the
   page gutter, and the tracks run to the edges of the view. */
.rows {
  margin: clamp(52px, 7vh, 84px) 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 3.6vw, 46px);
  overflow-anchor: auto;
}
.rows:empty { display: none; }

/* ---------- Template rows and cards ---------- */

.row { --pad: var(--gutter); }
.row-head { display: flex; align-items: center; gap: 12px; padding: 0 var(--pad); }
.row-head h2 { font-size: 19px; font-weight: 640; letter-spacing: -0.018em; }
.row-head h2 a { display: inline-flex; align-items: center; gap: 4px; border-radius: 8px; }
.row-head h2 svg { width: 18px; height: 18px; color: var(--faint); transition: transform 220ms var(--ease), color 220ms; }
.row-head h2 a:hover svg { transform: translateX(3px); color: var(--ink); }
.row-nav { margin-left: auto; display: flex; gap: 8px; }
.row-nav button {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hair-2); transition: opacity 200ms, background-color 160ms, color 160ms;
}
.row-nav button:hover { color: var(--ink); background: var(--well); }
.row-nav button:disabled { opacity: 0.38; cursor: default; background: var(--surface); }
.row-nav svg { width: 18px; height: 18px; }

.track {
  --gap: 14px;
  display: flex; gap: var(--gap); align-items: stretch;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 16px var(--pad) 14px; margin-top: 0; scroll-padding-inline: var(--pad);
}
.track::-webkit-scrollbar { display: none; }
.track > .card { flex: 0 0 var(--cw); scroll-snap-align: start; }

/* See all: the row's last tile */
.see-all {
  position: relative; flex: 1 0 var(--cw); max-width: calc(2 * var(--cw) + var(--gap)); min-height: 100%;
  display: grid; place-content: center; justify-items: center; gap: 18px; padding: 18px; border-radius: 15px;
  color: var(--ink-2); scroll-snap-align: start;
  background: radial-gradient(80% 60% at 50% 40%, color-mix(in oklch, var(--aura-2) 16%, transparent), transparent 75%), var(--well);
  box-shadow: inset 0 0 0 1px var(--hair);
  transition: box-shadow 260ms var(--ease), color 200ms;
}
.see-all.is-fixed { flex-grow: 0; }
.see-all:hover, .see-all:focus-visible { color: var(--ink); box-shadow: inset 0 0 0 1px var(--violet-line), 0 18px 40px -26px oklch(30% 0.1 284 / 0.4); }
.see-fan { position: relative; display: grid; place-items: center; width: 140px; height: 118px; }
.see-all[data-format="h"] .see-fan { width: 190px; height: 96px; }
.see-fan img {
  grid-area: 1 / 1; width: 62px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px;
  box-shadow: 0 0 0 1px oklch(100% 0 0 / 0.6), 0 8px 18px -8px oklch(20% 0.05 280 / 0.5);
  transition: transform 420ms var(--spring);
}
.see-all[data-format="h"] .see-fan img { width: 112px; aspect-ratio: 16 / 9; }
.see-fan img:nth-child(1) { transform: translateX(-30px) rotate(-9deg); }
.see-fan img:nth-child(2) { transform: translateX(30px) rotate(9deg); }
.see-fan img:nth-child(3) { transform: translateY(-4px); z-index: 1; }
.see-all[data-format="h"] .see-fan img:nth-child(1) { transform: translate(-40px, 6px) rotate(-7deg); }
.see-all[data-format="h"] .see-fan img:nth-child(2) { transform: translate(40px, 6px) rotate(7deg); }
.see-all:hover .see-fan img:nth-child(1) { transform: translateX(-42px) rotate(-13deg); }
.see-all:hover .see-fan img:nth-child(2) { transform: translateX(42px) rotate(13deg); }
.see-all:hover .see-fan img:nth-child(3) { transform: translateY(-10px) scale(1.05); }
.see-all[data-format="h"]:hover .see-fan img:nth-child(1) { transform: translate(-54px, 6px) rotate(-10deg); }
.see-all[data-format="h"]:hover .see-fan img:nth-child(2) { transform: translate(54px, 6px) rotate(10deg); }
.see-label { display: inline-flex; align-items: center; gap: 4px; font-weight: 620; font-size: 15px; }
.see-label svg { width: 17px; height: 17px; transition: transform 220ms var(--ease); }
.see-all:hover .see-label svg { transform: translateX(3px); }
/* about six vertical cards across the panel at desktop width (C), about three horizontal ones */
.track[data-format="v"] { --cw: clamp(148px, calc((100% - 5 * var(--gap)) / 6.25), 268px); }
.track[data-format="h"] { --cw: clamp(250px, calc((100% - 2 * var(--gap)) / 3.2), 470px); }

.card { position: relative; min-width: 0; }
.card-media {
  position: relative; aspect-ratio: var(--ar, 9 / 16); border-radius: 15px; overflow: hidden; isolation: isolate;
  background: oklch(22% 0.02 280);
  box-shadow: 0 0 0 1px oklch(22% 0.03 280 / 0.08), 0 1px 2px oklch(22% 0.03 280 / 0.08), 0 10px 22px -16px oklch(22% 0.05 280 / 0.45);
  transform: translateZ(0);
  transition: transform 420ms var(--ease), box-shadow 420ms var(--ease);
}
.card[data-format="h"] .card-media { --ar: 16 / 9; }
.card-media img, .card-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.card-media video { opacity: 0; transition: opacity 260ms var(--ease); }
.card.is-playing .card-media video { opacity: 1; }
/* the soft dark shade at the foot that carries the title, and the fine inner edge */
.card-media::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(0deg, oklch(13% 0.02 280 / 0.8) 0%, oklch(13% 0.02 280 / 0.44) 24%, oklch(13% 0.02 280 / 0.1) 44%, transparent 58%),
    linear-gradient(180deg, oklch(13% 0.02 280 / 0.34) 0%, transparent 20%);   /* a faint top shade, so "New" and the star read on bright pictures */
  transition: opacity 400ms var(--ease);
}
.card-media::after {
  content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.1);
}
.card-link {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; padding: 0 14px 13px; text-align: left;
  border-radius: inherit; color: #fff;
}
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) .card-media { outline: 2px solid var(--violet); outline-offset: 3px; }
.card-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance;
  max-width: 15em; font-size: 15px; line-height: 1.25; font-weight: 580; letter-spacing: -0.008em; color: #fff;
  text-shadow: 0 1px 12px oklch(10% 0.02 280 / 0.35);
  transition: transform 380ms var(--ease);
}
.card[data-format="h"] .card-title { font-size: 15.5px; max-width: 18em; }
.card-new {
  position: absolute; z-index: 2; top: 11px; left: 13px; pointer-events: none;
  font-size: 13px; font-weight: 640; letter-spacing: 0; color: oklch(82% 0.12 292);
  text-shadow: 0 1px 10px oklch(10% 0.03 280 / 0.55);
}
.card-desc { margin-top: 9px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.card-use {
  position: absolute; z-index: 3; left: 12px; bottom: 12px; translate: 0 10px; opacity: 0; pointer-events: none;
  height: 36px; padding: 0 15px; border-radius: var(--r-pill); white-space: nowrap; max-width: calc(100% - 24px);
  background: oklch(100% 0 0 / 0.9); color: var(--ink); font-weight: 630; font-size: 13.5px;
  backdrop-filter: blur(12px) saturate(1.6); -webkit-backdrop-filter: blur(12px) saturate(1.6);
  box-shadow: 0 6px 18px -8px oklch(10% 0.04 280 / 0.6);
  transition: opacity 240ms var(--ease), translate 380ms var(--ease), background-color 160ms;
}
.card-use:hover { background: #fff; }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: oklch(100% 0 0 / 0.16); z-index: 2; opacity: 0; transition: opacity 200ms; overflow: hidden; }
.card-progress i { display: block; height: 100%; background: oklch(100% 0 0 / 0.85); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* The favourite star. On a card: a quiet outline at the top right, shown on hover (always on a phone), kept once filled. */
.star {
  position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: var(--ink-2); transition: color 180ms var(--ease), background-color 180ms var(--ease), opacity 220ms var(--ease);
}
.star svg { width: 21px; height: 21px; stroke-width: 1.6; fill: transparent; transition: fill 200ms var(--ease), stroke 200ms; overflow: visible; }
.star[aria-pressed="true"] { color: var(--violet); }
.star[aria-pressed="true"] svg { fill: currentColor; }
.star::after {   /* the burst ring of a save */
  content: ""; position: absolute; inset: 7px; border-radius: 50%; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 2px var(--star-ring, var(--violet-mark));
}
.star.is-pop svg { animation: star-pop 560ms var(--spring) both; }
.star.is-pop::after { animation: star-ring 520ms var(--ease) both; }
.star.is-unpop svg { animation: star-unpop 260ms var(--ease) both; }
@keyframes star-pop { 0% { scale: 0.55; } 45% { scale: 1.32; } 100% { scale: 1; } }
@keyframes star-ring { 0% { opacity: 0.9; scale: 0.5; } 100% { opacity: 0; scale: 1.5; } }
@keyframes star-unpop { 0% { scale: 0.82; } 100% { scale: 1; } }
.star-inline:hover { background: var(--well-2); color: var(--ink); }
.star-inline[aria-pressed="true"]:hover { color: var(--violet-ink); }

.card-star { position: absolute; z-index: 3; top: 4px; right: 4px; color: #fff; --star-ring: oklch(85% 0.1 292); }
.card-star svg { filter: drop-shadow(0 1px 4px oklch(10% 0.02 280 / 0.5)); }
.card-star:hover { background: oklch(100% 0 0 / 0.16); }
.card-star[aria-pressed="true"] { color: oklch(84% 0.12 292); }

@media (hover: hover) and (pointer: fine) {
  .card-star:not([aria-pressed="true"]) { opacity: 0; }
  .card:hover .card-star, .card:focus-within .card-star { opacity: 1; }
  .card:hover .card-media, .card:focus-within .card-media {
    transform: translateY(-6px);
    box-shadow: 0 0 0 1px oklch(22% 0.03 280 / 0.08), 0 4px 8px oklch(22% 0.03 280 / 0.08), 0 26px 46px -20px oklch(26% 0.1 284 / 0.55);
  }
  .card:hover .card-media::before, .card:focus-within .card-media::before { opacity: 0.92; }
  .card:hover .card-use, .card:focus-within .card-use { opacity: 1; translate: 0 0; pointer-events: auto; }
  .card:has(.card-use):hover .card-title, .card:has(.card-use):focus-within .card-title { transform: translateY(-46px); }
  .card.is-playing .card-progress { opacity: 1; }
}
.card.is-selected .card-media { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--violet), 0 10px 22px -16px oklch(22% 0.05 280 / 0.45); }

/* Grid of cards (catalog, category, similar, saved) */
.grid {
  display: grid; gap: 26px 16px; align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(var(--min), 1fr));
}
.grid[data-format="v"] { --min: 184px; }
.grid[data-format="h"] { --min: 300px; }

/* ---------- The drop's type, shared by the template pages (catalog, category, template page) ---------- */
/* One family throughout: a small line over a big, tight headline and one line under it; section titles in the same
   family, smaller */

.kicker { display: block; font-size: 17px; line-height: 1.5; font-weight: 520; letter-spacing: -0.003em; color: var(--muted); }
.display { font-size: clamp(46px, 6.6vw, 96px); line-height: 0.96; font-weight: 720; letter-spacing: -0.05em; text-wrap: balance; }
p.kicker + .display { margin-top: 14px; }
.display .kicker { margin-bottom: 14px; }
.display-line { margin-top: 20px; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.4; color: var(--ink-2); max-width: 30ch; text-wrap: pretty; }
.page-display .display-line { max-width: 46ch; }
.section-title { font-size: clamp(24px, 2.3vw, 32px); line-height: 1.1; font-weight: 700; letter-spacing: -0.035em; }

/* ---------- Page heads (catalog, category, template page) ---------- */

.page { padding: clamp(24px, 4vh, 44px) var(--gutter) 72px; max-width: calc(var(--content) + 2 * var(--gutter)); }
body.is-public .page { margin: 0 auto; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { border-radius: 6px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--hair-2); }
.crumbs [aria-current] { color: var(--ink); font-weight: 520; }

.cat-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin: clamp(32px, 5vh, 48px) 0 26px; }
.cat-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-right: auto; padding: 2px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a { padding: 8px 14px; border-radius: 10px; font-weight: 580; color: var(--muted); white-space: nowrap; transition: color 160ms, background-color 160ms; }
.cat-tabs a:hover { color: var(--ink); background: var(--well); }
.cat-tabs a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2), 0 1px 2px oklch(25% 0.04 280 / 0.05); }
.search { position: relative; width: min(280px, 100%); }
.search svg { position: absolute; left: 13px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 40px; height: 44px; }
.empty-note { padding: 48px 0; color: var(--muted); font-size: 16px; }
.more-cats { margin-top: clamp(56px, 9vh, 96px); padding-top: clamp(28px, 4vh, 40px); border-top: 1px solid var(--hair); }
.more-cats .section-title { margin-bottom: 18px; }
.cat-links { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-links a { padding: 10px 16px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); font-weight: 560; color: var(--ink-2); transition: box-shadow 160ms, color 160ms; }
.cat-links a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--violet-line); }

/* Public template page: the drop's hero turned round (the words on the left, the video on the right, in its shape),
   the words in the drop's type */
.tp { display: grid; column-gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(8px, 2vh, 24px);
  grid-template-areas: ". media" "head media" "body media" ". media"; grid-template-rows: 1fr auto auto 1fr; }
.tp[data-format="h"] { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.tp[data-format="v"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tp[data-format="v"] .tp-media { justify-self: center; }
.tp-head { grid-area: head; }
.tp-media { grid-area: media; }
.tp-body { grid-area: body; }
.tp .display-line { max-width: 34ch; }
.tp-media .player { border-radius: 22px; box-shadow: 0 30px 80px -36px oklch(20% 0.06 280 / 0.5); }
.tp[data-format="v"] .tp-media .player { height: clamp(480px, calc(100dvh - var(--top-h) - 150px), 760px); }
.tp-body .facts { margin-top: 28px; }
.tp-cta { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.btn-lg { height: 54px; padding: 0 30px; font-size: 17px; border-radius: 14px; }
.tp-price { margin-top: 14px; color: var(--muted); font-size: 14.5px; }
.star-btn { width: 54px; height: 54px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2), 0 1px 2px oklch(25% 0.04 280 / 0.05); }
.star-btn:hover { background: var(--well); color: var(--ink); }
.star-btn[aria-pressed="true"]:hover { color: var(--violet-ink); }
.star-btn svg { width: 22px; height: 22px; }
.tp-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 36px clamp(32px, 5vw, 80px); margin-top: clamp(56px, 9vh, 104px); padding-top: clamp(32px, 4vh, 44px); border-top: 1px solid var(--hair); }
.tp-more .section-title { margin-bottom: 22px; }
.change-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.change-list li { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 17px 0 14px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); font-weight: 580; }
.change-list svg { width: 19px; height: 19px; color: var(--violet-ink); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { display: grid; align-content: start; gap: 6px; counter-increment: step; }
.steps li::before { content: counter(step); margin-bottom: 10px; font-size: 44px; line-height: 1; font-weight: 720; letter-spacing: -0.05em; color: var(--violet-line); }
.steps strong { font-weight: 640; font-size: 16px; }
.steps span { color: var(--muted); font-size: 14.5px; }
.similar { margin-top: clamp(56px, 9vh, 104px); }
.similar-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 22px; }
.similar-head a { margin-left: auto; }

/* ---------- Player ---------- */

.player { position: relative; border-radius: var(--r-media); overflow: hidden; background: oklch(18% 0.02 280); aspect-ratio: var(--ar, 9 / 16); }
.player video, .player > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-ctl {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 26px 14px 12px;
  background: linear-gradient(180deg, transparent, oklch(12% 0.02 280 / 0.55)); color: #fff;
  opacity: 1; transition: opacity 260ms var(--ease);
}
.player-ctl button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.player-ctl button:hover { background: oklch(100% 0 0 / 0.14); }
.player-ctl svg { width: 20px; height: 20px; }
.player-time { font-size: 13px; font-variant-numeric: tabular-nums; opacity: 0.92; min-width: 78px; }
.scrub { flex: 1; position: relative; height: 22px; display: grid; align-items: center; cursor: pointer; touch-action: none; }
.scrub-track { position: relative; height: 3px; border-radius: 3px; background: oklch(100% 0 0 / 0.3); }
.scrub-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--violet-mark), oklch(78% 0.13 290)); border-radius: 3px; }
.scrub-knob { position: absolute; top: 50%; left: calc(var(--p, 0) * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px oklch(0% 0 0 / 0.3); }
@media (hover: hover) { .player:not(:hover):not(:focus-within).is-playing .player-ctl { opacity: 0; } }
.player-name {
  position: absolute; z-index: 3; top: 14px; left: 14px; max-width: calc(100% - 28px); height: 34px; padding: 0 9px 0 14px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  background: oklch(100% 0 0 / 0.86); color: var(--ink); font-weight: 630; font-size: 14px;
  backdrop-filter: blur(12px) saturate(1.6); -webkit-backdrop-filter: blur(12px) saturate(1.6);
  box-shadow: 0 6px 18px -8px oklch(10% 0.04 280 / 0.5); transition: background-color 160ms var(--ease);
}
.player-name svg { width: 16px; height: 16px; transition: transform 220ms var(--ease); }
.player-name::before { content: ""; position: absolute; inset: -4px; }   /* a 42 px hit area */
.player-name:hover { background: #fff; }
.player-name:hover svg { transform: translateX(2px); }
/* Use this template: the hovered card's white pill at the hero's size, over the bottom right of the picture, above the
   controls; it drops to the corner while the controls are hidden. A hairline keeps its edge on bright frames. */
.player-use {
  position: absolute; z-index: 3; right: 14px; bottom: 60px; height: 40px; padding: 0 18px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; white-space: nowrap;
  background: oklch(100% 0 0 / 0.92); color: var(--ink); font-weight: 640; font-size: 14.5px;
  backdrop-filter: blur(12px) saturate(1.6); -webkit-backdrop-filter: blur(12px) saturate(1.6);
  box-shadow: 0 0 0 1px oklch(20% 0.03 280 / 0.1), 0 8px 22px -8px oklch(10% 0.04 280 / 0.6);
  transition: translate 380ms var(--ease), background-color 160ms;
}
.player-use:hover { background: #fff; }
@media (hover: hover) { .player:not(:hover):not(:focus-within).is-playing .player-use { translate: 0 46px; } }
.player-name:focus-visible, .player-use:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.drop-hero .player { cursor: pointer; }
.drop-hero .player-ctl { cursor: default; }

/* ---------- Viewer ---------- */

.viewer {
  display: grid; grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); grid-template-rows: auto 1fr;
  grid-template-areas: "head stage" "panel stage"; min-height: calc(100dvh - var(--top-h));
}
.v-head { grid-area: head; padding: 28px clamp(20px, 2.4vw, 34px) 0; border-right: 1px solid var(--hair); background: var(--surface); display: flex; flex-direction: column; }
.v-panel { grid-area: panel; padding: 0 clamp(20px, 2.4vw, 34px) 34px; border-right: 1px solid var(--hair); background: var(--surface); display: flex; flex-direction: column; }
.v-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 560; padding: 6px 8px 6px 2px; margin-left: -2px; border-radius: 8px; }
.v-back:hover { color: var(--ink); }
.v-back svg { width: 18px; height: 18px; }
.title-row { display: flex; align-items: flex-start; gap: 10px; }
.title-row h1 { min-width: 0; }
.title-row .star { margin-top: 1px; }
.v-head .title-row .star { margin-top: 13px; }
.v-title { margin-top: 16px; font-size: 30px; line-height: 1.12; font-weight: 660; letter-spacing: -0.03em; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.fact { height: 30px; padding: 0 11px; border-radius: 9px; display: inline-flex; align-items: center; background: var(--well); font-size: 13.5px; font-weight: 560; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fact-format { padding: 0 8px; }
.fact-format svg { width: 18px; height: 18px; }
.slots { margin-top: 22px; border-top: 1px solid var(--hair); }
.slot { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--hair); text-align: left; }
button.slot { transition: background-color 160ms; border-radius: 0; }
button.slot:hover .slot-value { color: var(--ink); }
button.slot:hover .slot-go { transform: translateX(2px); color: var(--ink); }
.slot-name { font-weight: 600; }
.slot-value { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 520; transition: color 160ms; max-width: 60%; }
.slot-value span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-go { width: 18px; height: 18px; color: var(--faint); transition: transform 200ms var(--ease), color 200ms; }
.slot-photo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; box-shadow: inset 0 0 0 1px var(--hair); background: var(--well); }
.slot-add { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--hair-2); background: var(--well); }
.slot-add svg { width: 22px; height: 22px; }
.slot-face { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.slot-line { padding: 16px 0 18px; border-bottom: 1px solid var(--hair); display: grid; gap: 10px; }
.slot-line .textarea { min-height: 76px; font-size: 15.5px; }
.v-versions { display: flex; align-items: center; gap: 16px; padding: 18px 0 6px; }
.v-versions .slot-name { flex: none; }
.v-versions .seg { flex: 1; max-width: 250px; margin-left: auto; }
.v-make { margin-top: auto; padding-top: 22px; display: grid; gap: 10px; text-align: center; }
.v-each { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.v-stage { grid-area: stage; position: relative; overflow: hidden; display: grid; place-items: center; padding: clamp(20px, 3vw, 44px); background: oklch(95.5% 0.008 286); }
.v-stage-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(48px) saturate(1.3); opacity: 0.55; transform: scale(1.1); }
.v-stage .player { position: relative; z-index: 1; box-shadow: 0 30px 80px -30px oklch(20% 0.06 280 / 0.55); }
.v-stage[data-format="v"] .player { height: min(calc(100dvh - var(--top-h) - 88px), 860px); max-width: 100%; }
.v-stage[data-format="h"] .player { width: min(100%, 1180px); }

/* ---------- Characters ---------- */

.head-sans { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.06; font-weight: 660; letter-spacing: -0.035em; }
.sub { margin-top: 10px; color: var(--ink-2); font-size: 17px; }
.chars { margin-top: 36px; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.char {
  position: relative; display: grid; gap: 12px; padding: 10px 10px 12px; border-radius: 22px; text-align: left; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hair), 0 1px 2px oklch(25% 0.04 280 / 0.04);
  transition: box-shadow 220ms var(--ease), transform 300ms var(--ease);
}
.char:hover { box-shadow: inset 0 0 0 1px var(--hair-2), var(--shadow-lift); transform: translateY(-2px); }
.char[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--violet), 0 0 0 4px var(--violet-soft), var(--shadow-1); }
.char-portrait { aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--well-2); }
.char-portrait img { width: 100%; height: 100%; object-fit: cover; }
.char-name { font-size: 18px; font-weight: 640; letter-spacing: -0.015em; padding: 0 4px; }
.char-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.char-shots img, .char-shots span { aspect-ratio: 1; width: 100%; border-radius: 9px; object-fit: cover; background: var(--well); }
.placeholder-face {
  width: 100%; height: 100%; display: grid; place-items: center; font-size: 64px; font-weight: 700; color: oklch(100% 0 0 / 0.95); letter-spacing: -0.04em;
  background: radial-gradient(70% 60% at 30% 25%, var(--aura-3), transparent 70%), radial-gradient(80% 70% at 80% 80%, var(--aura-1), transparent 70%), var(--aura-2);
}
.char-new {
  display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; min-height: 100%; padding: 28px 16px; border-radius: 22px;
  color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1.5px var(--hair-2);
  background-image: radial-gradient(70% 50% at 50% 100%, color-mix(in oklch, var(--aura-2) 22%, transparent), transparent);
  transition: box-shadow 200ms var(--ease), color 200ms;
}
.char-new:hover { box-shadow: inset 0 0 0 1.5px var(--violet-line); color: var(--ink-2); }
.char-new .plus { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--hair-2); background: var(--surface); color: var(--ink-2); margin-bottom: 8px; }
.char-new .plus svg { width: 24px; height: 24px; }
.char-new strong { color: var(--ink); font-size: 18px; font-weight: 640; letter-spacing: -0.015em; }
.char.is-making .char-portrait { animation: shimmer-bg 1.6s linear infinite; }

/* The Characters panel opens under the top bar, so the format switch there stays in reach and drives its list */
.side {
  position: fixed; top: var(--top-h); right: 0; bottom: 0; z-index: 50; width: min(440px, 100vw); background: var(--surface);
  box-shadow: -1px 0 0 var(--hair), -30px 0 80px -40px oklch(25% 0.06 280 / 0.35);
  display: flex; flex-direction: column; transform: translateX(104%); transition: transform 420ms var(--ease); visibility: hidden;
}
.side.is-open { transform: none; visibility: visible; }
.side-head { display: grid; grid-template-columns: 64px 1fr 38px; gap: 14px; align-items: start; padding: 24px 22px 16px; }
.side-head img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.side-head h2 { font-size: 24px; font-weight: 660; letter-spacing: -0.025em; line-height: 1.15; }
.side-head p { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.side-head .text-link { margin-top: 8px; font-size: 14px; color: var(--violet-ink); }
.side-list { flex: 1; overflow-y: auto; padding: 4px 16px 16px; display: grid; gap: 8px; align-content: start; }
.pick-row { position: relative; }
.pick-star { position: absolute; top: 50%; right: 40px; translate: 0 -50%; }
.pick {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) 36px 22px; align-items: center; gap: 12px; padding: 6px; border-radius: 16px; text-align: left;
  box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow 160ms, background-color 160ms;
}
.pick:hover { background: var(--well); }
.pick[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--violet); background: var(--violet-soft); }
.pick-thumb { position: relative; height: 74px; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; background: var(--well-2); }
.pick-thumb[data-format="v"] { aspect-ratio: 9 / 16; border-radius: 9px; }
.pick-thumb img, .pick-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick-name { font-weight: 620; line-height: 1.3; }
.pick-len { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }
.pick-dot { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--hair-2); display: grid; place-items: center; }
.pick[aria-checked="true"] .pick-dot { background: var(--violet); box-shadow: none; color: #fff; }
.pick-dot svg { width: 13px; height: 13px; opacity: 0; }
.pick[aria-checked="true"] .pick-dot svg { opacity: 1; }
.side-foot { padding: 14px 22px 22px; border-top: 1px solid var(--hair); display: grid; gap: 12px; }
.side-foot .row-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side-foot .seg { width: 230px; }
.scrim { position: fixed; inset: 0; z-index: 45; background: oklch(25% 0.04 280 / 0.16); opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease); }
.scrim.is-on { opacity: 1; pointer-events: auto; }
body:has(.scrim.is-on) .topbar { z-index: 46; }

/* ---------- Saved ---------- */

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.saved-more { margin-top: 28px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.saved-more .text-link { color: var(--violet-ink); }
.empty-saved {
  margin-top: 8px; padding: 56px 24px 52px; border-radius: 28px; text-align: center; display: grid; gap: 16px; justify-items: center;
  background: radial-gradient(60% 80% at 50% 0%, color-mix(in oklch, var(--aura-2) 18%, transparent), transparent 70%), var(--surface);
  box-shadow: 0 0 0 1px oklch(30% 0.04 280 / 0.06), 0 24px 60px -44px oklch(32% 0.1 284 / 0.3);
}
.empty-star { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--violet); background: var(--violet-soft); }
.empty-star svg { width: 30px; height: 30px; }

/* ---------- My videos ---------- */

.runs { margin-top: 32px; display: grid; gap: 44px; }
.run-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.run-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--well-2); }
.run-name { font-size: 18px; font-weight: 640; letter-spacing: -0.015em; }
.run-meta { color: var(--muted); font-size: 14px; }
.run-status { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.run-status .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 0 color-mix(in oklch, var(--violet) 50%, transparent); animation: pulse 1.6s var(--ease) infinite; }
.run-status.is-done .pulse { background: var(--good); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } }
.run-grid { display: grid; gap: 18px 14px; }
.run-grid[data-format="v"] { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.run-grid[data-format="h"] { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.out { position: relative; }
.out-media { position: relative; aspect-ratio: var(--ar, 9 / 16); border-radius: var(--r-media); overflow: hidden; background: var(--well-2); }
.out[data-format="h"] .out-media { --ar: 16 / 9; }
.out-media img, .out-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.out-making {
  position: absolute; inset: 0; z-index: 2; display: grid; align-content: end; padding: 14px;
  background:
    radial-gradient(70% 50% at 30% 30%, color-mix(in oklch, var(--aura-2) 55%, transparent), transparent 70%),
    radial-gradient(60% 50% at 75% 75%, color-mix(in oklch, var(--aura-3) 50%, transparent), transparent 70%),
    var(--well);
  transition: opacity 700ms var(--ease), filter 700ms var(--ease);
}
.out-making::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, oklch(100% 0 0 / 0.65) 48%, transparent 66%);
  background-size: 260% 100%; animation: shimmer 1.8s linear infinite;
}
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes shimmer-bg { 50% { opacity: 0.6; } }
.out-bar { position: relative; height: 4px; border-radius: 4px; background: oklch(100% 0 0 / 0.7); overflow: hidden; }
.out-bar i { position: absolute; inset: 0; background: var(--violet); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 300ms linear; border-radius: 4px; }
.out.is-done .out-making { opacity: 0; filter: blur(12px); pointer-events: none; }
.out.is-done .out-media video { animation: reveal 900ms var(--ease) both; }
@keyframes reveal { from { filter: blur(14px) saturate(0.6); transform: scale(1.04); } }
.out-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; margin-top: 8px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.out-label .state { color: var(--muted); font-weight: 500; }
.out.is-done .out-label .state { display: none; }
.out-dl { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.out-dl:hover { background: var(--well-2); color: var(--ink); }
.out-dl svg { width: 18px; height: 18px; }
.out:not(.is-done) .out-dl { display: none; }
.empty-runs { margin-top: 40px; padding: 48px 24px; border-radius: 24px; background: var(--well); text-align: center; display: grid; gap: 14px; justify-items: center; }

/* ---------- New this week (drop) ---------- */

.drop { padding: clamp(28px, 6vh, 64px) 0 80px; }
.drop-inner { padding: 0 var(--gutter); max-width: calc(1440px + 2 * var(--gutter)); }
body.is-public .drop-inner { margin: 0 auto; }
.drop-top { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.drop-hero { position: relative; }
.drop-hero .player { border-radius: 22px; box-shadow: 0 30px 80px -36px oklch(20% 0.06 280 / 0.5); }
.drop-hero .player.is-over { position: absolute; inset: 0; }
.drop-player-bg { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(30px) saturate(1.2); opacity: 0.8; }
.drop-hero .player video.is-contain { object-fit: contain; }
/* The cards keep their shapes: rows that share a height, each card as wide as its shape asks (--arn, width over height) */
.drop-variants { margin-top: clamp(36px, 6vh, 64px); display: grid; gap: 16px; }
.drop-row { display: flex; gap: 14px; }
.drop-row > .card { flex: var(--arn) 1 0; min-width: 0; }
.card[data-format="v"] { --arn: 0.5625; }
.card[data-format="h"] { --arn: 1.7778; }
/* the button sits straight under the description, in the hero's words */
.drop-cta { margin-top: 28px; }
/* Earlier drops: under a hairline, each drop's date, title and line over a row of its cards that runs to the view's
   edges, as the home's open rows do */
.past-drops { margin-top: clamp(64px, 10vh, 112px); max-width: calc(1440px + 2 * var(--gutter)); }
body.is-public .past-drops { margin-inline: auto; }
.past-title { margin: 0 var(--gutter); padding-top: clamp(32px, 4vh, 44px); border-top: 1px solid var(--hair); }
.past-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 4.4vw, 56px); margin-top: clamp(24px, 3vh, 34px); }
.past-drop .row-head { align-items: flex-end; }
.past-words { min-width: 0; }
.past-words h3 { font-size: 21px; line-height: 1.2; font-weight: 660; letter-spacing: -0.022em; }
.past-link { display: inline-grid; justify-items: start; gap: 2px; border-radius: 8px; }
.past-date { font-size: 14.5px; line-height: 1.4; font-weight: 520; letter-spacing: 0; color: var(--muted); transition: color 200ms; }
.past-name { display: inline-flex; align-items: center; gap: 4px; }
.past-name svg { width: 19px; height: 19px; color: var(--faint); transition: transform 220ms var(--ease), color 220ms; }
.past-link:hover .past-date { color: var(--ink-2); }
.past-link:hover svg { transform: translateX(3px); color: var(--ink); }
/* the hero's date links to the drop's own page */
.kicker-link { border-radius: 6px; text-decoration: underline 1px transparent; text-underline-offset: 4px; transition: color 200ms, text-decoration-color 200ms; }
.kicker-link:hover { color: var(--ink-2); text-decoration-color: currentColor; }
.past-line { margin-top: 3px; color: var(--ink-2); font-size: 15.5px; text-wrap: pretty; }
.past-drop .past-note { margin: 16px var(--pad) 0; }
.drop-variants .past-note { margin-top: 0; }

/* ---------- Sign in, advanced ---------- */

.center-page { min-height: calc(100dvh - var(--top-h)); display: grid; place-items: center; padding: 32px var(--gutter) 80px; }
.signin { width: min(420px, 100%); text-align: center; display: grid; gap: 14px; position: relative; isolation: isolate; }
.signin .aura { inset: -40px -60px; opacity: 0.4; }
.signin-card { padding: 34px 30px 30px; border-radius: 28px; background: oklch(100% 0 0 / 0.78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px oklch(52% 0.12 286 / 0.1), 0 30px 70px -30px oklch(42% 0.2 286 / 0.35); display: grid; gap: 14px; text-align: left; }
.signin-card h1 { font-size: 26px; font-weight: 660; letter-spacing: -0.03em; text-align: center; }
.signin-card > p { text-align: center; color: var(--muted); margin-top: -6px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.signin-note { font-size: 13.5px; color: var(--muted); text-align: center; }
.adv { width: min(560px, 100%); display: grid; gap: 16px; justify-items: start; }
/* Advanced: what the planner does, and its way in */
.adv { width: min(620px, 100%); justify-items: center; text-align: center; gap: 0; }
.adv-mark { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: var(--violet-ink);
  background: radial-gradient(70% 70% at 30% 20%, oklch(100% 0 0 / 0.9), transparent), var(--violet-soft);
  box-shadow: inset 0 0 0 1px var(--violet-line), 0 18px 40px -22px oklch(42% 0.2 286 / 0.5); margin-bottom: 26px; }
.adv-mark svg { width: 32px; height: 32px; }
.adv .sub { max-width: 34ch; text-wrap: balance; }
.adv-steps { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.adv-steps li { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); font-weight: 580; font-size: 14.5px; color: var(--ink-2); }
.adv-steps svg { width: 18px; height: 18px; color: var(--violet-ink); }
.adv-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: 34px; }
.adv-empty { margin-top: 30px; width: 100%; }
/* the account menu's trigger */
button.avatar { cursor: pointer; transition: box-shadow 160ms var(--ease); }
button.avatar:hover, button.avatar[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--violet-line), 0 0 0 3px var(--violet-soft); }
.pop-who { padding: 6px 10px 10px; font-size: 13.5px; color: var(--muted); }

/* ---------- View transitions ---------- */

::view-transition-old(root) { animation: vt-out 180ms var(--ease) both; }
::view-transition-new(root) { animation: vt-in 340ms var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
::view-transition-group(hero-media) { animation-duration: 460ms; animation-timing-function: var(--ease); }
::view-transition-old(hero-media), ::view-transition-new(hero-media) { height: 100%; object-fit: cover; animation-duration: 460ms; }
::view-transition-group(.morph) { animation-duration: 480ms; animation-timing-function: var(--ease); }
::view-transition-old(.morph), ::view-transition-new(.morph) { height: 100%; object-fit: cover; animation-duration: 480ms; animation-timing-function: var(--ease); }
::view-transition-group(.lift) { animation-duration: 480ms; animation-timing-function: var(--ease); }
::view-transition-group(tag-flight) { animation-duration: 620ms; animation-timing-function: cubic-bezier(.45, 0, .15, 1); }
::view-transition-old(tag-flight), ::view-transition-new(tag-flight) { height: 100%; object-fit: cover; }

/* ---------- Phone ---------- */

@media (max-width: 1100px) {
  .viewer { grid-template-columns: minmax(330px, 380px) minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .viewer { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "head" "stage" "panel"; }
  .v-stage { padding: 18px; }
  .v-stage[data-format="v"] .player { height: min(58dvh, 520px); }
  .v-head, .v-panel { border-right: 0; }
  .v-head { padding-bottom: 18px; }
  /* the template page stacks: the headline, the video, then the facts, the button and the price line */
  .tp, .tp[data-format="v"], .tp[data-format="h"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "media" "body"; grid-template-rows: auto; }
  .tp-media { margin-top: 28px; }
  .tp[data-format="v"] .tp-media .player { height: min(72dvh, 620px, (100vw - 2 * var(--gutter)) * 16 / 9); margin: 0 auto; }
  .tp-more { grid-template-columns: minmax(0, 1fr); }
  .drop-top { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .home-hero { justify-items: stretch; }
  .tp-cta .btn-lg { flex: 1; min-width: 0; padding: 0 16px; font-size: 16px; }
  .star-btn { width: 50px; height: 50px; }
  .similar-head a { margin-left: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .steps li { grid-template-columns: 38px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; }
  .steps li::before { grid-row: span 2; margin: 0; font-size: 32px; }
  .home-title { text-align: left; font-size: 31px; margin-bottom: 20px; }
  /* the waitlist's phone placement: a 160 px band whose foot reaches 31 px under the first line of words (the title,
     the drop's date), the curve compressed to show whole and kept above the words (--lt-floor) */
  .home { padding-top: 112px; }
  .home-trail { top: -129px; height: 160px; }
  .drop { padding-top: 112px; }
  .drop-trail { top: -17px; height: 160px; opacity: 0.8; }
  .trail ts-light-trail { --lt-band: 160px; --lt-floor: 10px; --lt-hx: 0.85; --lt-hy: 1.1; --lt-hdx: -10px; }
  .aura { inset: -30px -16px -40px; filter: blur(30px); }
  .compose { border-radius: 22px; }
  .compose-field { padding: 14px 14px 2px; min-height: 64px; }
  .compose-input { font-size: 16px; flex-basis: 100%; }
  .compose-bar { flex-wrap: wrap; padding: 6px 10px 10px; }
  .compose-bar .make { order: 5; width: 100%; margin-top: 6px; height: 50px; }
  .compose-bar .spacer { display: none; }
  .tag-label { max-width: 170px; }
  .compose-under { grid-template-columns: auto 1fr; margin-top: 18px; }
  .compose-under .seg { grid-column: 1; }
  .compose-under .advanced { grid-column: 2; }
  .seg button { padding: 0 12px; }
  .row-nav { display: none; }
  .row-head h2 { font-size: 18px; }
  .track { --gap: 10px; padding-top: 12px; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .track[data-format="v"] { --cw: calc((100% - var(--gap)) / 2.3); }
  .track[data-format="h"] { --cw: calc(100% - 28px); }
  .see-all { flex-grow: 0; }
  .card-title, .card[data-format="h"] .card-title { font-size: 13.5px; }
  .card-link { padding: 0 11px 10px; }
  .card-new { top: 9px; left: 11px; font-size: 12px; }
  .card-media { border-radius: 13px; }
  .grid { gap: 22px 12px; }
  .grid[data-format="v"] { --min: 140px; }
  .grid[data-format="h"] { --min: 100%; }
  .cat-bar { margin: 20px 0; }
  .cat-tabs { width: 100%; margin-right: 0; }
  .search { width: 100%; }
  .v-head { padding: 14px 16px 16px; }
  .v-title { font-size: 26px; margin-top: 8px; }
  .v-panel { padding: 0 16px 24px; }
  .slots { margin-top: 0; border-top: 0; }
  .v-make { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--surface) 26%); padding: 22px 0 10px; margin: 0 -16px; padding-inline: 16px; }
  .chars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .char { padding: 7px 7px 10px; border-radius: 18px; gap: 9px; }
  .char-name { font-size: 16px; }
  .char-shots { gap: 4px; }
  .char-shots img, .char-shots span { border-radius: 6px; }
  .side { top: auto; height: 86dvh; width: 100%; border-radius: 24px 24px 0 0; transform: translateY(104%); }
  .side.is-open { transform: none; }
  .side-head { padding: 18px 16px 12px; grid-template-columns: 52px 1fr 38px; }
  .side-head img { width: 52px; height: 52px; }
  .side-head h2 { font-size: 21px; }
  .pick-thumb { height: 56px; }
  .side-foot { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .side-foot .seg { width: 200px; }
  /* a phone: horizontal cards full width, vertical ones in pairs */
  .drop-variants { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 12px 10px; }
  .drop-row { display: contents; }
  .drop-variants .card[data-format="h"] { grid-column: span 2; }
  .drop-cta .btn { width: 100%; }
  .drop-variants .past-note { grid-column: 1 / -1; }
  .past-words h3 { font-size: 19px; }
  .past-line { font-size: 15px; }
  .run-head { flex-wrap: wrap; }
  .run-grid[data-format="v"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .run-grid[data-format="h"] { grid-template-columns: 1fr; }
  .modal-body { padding: 10px 20px 22px; }
  .modal-head { padding: 18px 18px 4px 20px; }
  .player-time { min-width: 0; font-size: 12px; }
}

/* ---------- v2: switches, the product chip, the ad-angle filter ---------- */

/* Switches: quiet outlined pills; on, they take the violet tint and a check slides in */
/* the row scrolls inside the box on a phone; the hero's track never grows to fit it */
.home-hero { grid-template-columns: minmax(0, 1fr); }
.compose-wrap { min-width: 0; }
.compose-switches { display: flex; gap: 6px; padding: 2px 16px 2px; overflow-x: auto; scrollbar-width: none; }
.compose-switches::-webkit-scrollbar { display: none; }
.compose-switches:empty { display: none; }
.switch {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 580; color: var(--ink-2); white-space: nowrap;
  background: oklch(100% 0 0 / 0.55); box-shadow: inset 0 0 0 1px var(--hair-2);
  transition: background-color 200ms var(--ease), box-shadow 200ms var(--ease), color 200ms var(--ease);
}
.switch > svg { width: 16px; height: 16px; }
.switch:hover { background: var(--surface); color: var(--ink); }
.switch-tick { display: inline-grid; place-items: center; width: 0; margin-left: -6px; opacity: 0; overflow: hidden;
  transition: width 260ms var(--spring), margin 260ms var(--spring), opacity 180ms var(--ease); }
.switch-tick svg { width: 14px; height: 14px; stroke-width: 2.4; }
.switch[aria-pressed="true"] { background: var(--violet-soft); color: var(--violet-ink); box-shadow: inset 0 0 0 1px var(--violet-line); }
.switch[aria-pressed="true"] .switch-tick { width: 14px; margin-left: 0; opacity: 1; }
.switch[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--violet-line), 0 0 0 3px var(--violet-soft); }
.switch.is-flip { animation: switch-pop 420ms var(--spring); }
@keyframes switch-pop { 0% { scale: 0.94; } 55% { scale: 1.04; } 100% { scale: 1; } }

/* The product category chip: what the photo shows, tinted, beside the photo button */
.pcat-slot { display: contents; }
.chip-pcat { color: var(--violet-ink); background: var(--violet-soft); box-shadow: inset 0 0 0 1px var(--violet-line); }
.chip-pcat:hover { background: color-mix(in oklch, var(--violet-soft) 70%, white); color: var(--violet-ink); }
.chip-pcat.is-landed { animation: pcat-land 560ms var(--spring) both; }
@keyframes pcat-land { from { opacity: 0; transform: translateX(-8px) scale(0.92); } }

/* The ad-angle filter (Templates page) */
.angles { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 26px; }
.angle {
  height: 36px; padding: 0 15px; border-radius: var(--r-pill); font-weight: 580; font-size: 14px; color: var(--ink-2); white-space: nowrap;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2);
  transition: background-color 200ms var(--ease), box-shadow 200ms var(--ease), color 200ms var(--ease), transform 120ms var(--ease);
}
.angle:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--violet-line); }
.angle:active { transform: scale(0.97); }
.angle[aria-pressed="true"] { background: var(--violet-soft); color: var(--violet-ink); box-shadow: inset 0 0 0 1.5px var(--violet); }

/* The viewer's switches, under the slots */
.v-switches { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--hair); }
.v-switches .switch { height: 36px; background: var(--surface); }
.v-switches .switch[aria-pressed="true"] { background: var(--violet-soft); }

/* Product-category links, under the category links */
.more-cats .by-product { margin-top: 40px; }
.more-cats > .by-product:first-child { margin-top: 0; }

@media (max-width: 760px) {
  .compose-switches { padding: 2px 10px; -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
  .angles { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -4px calc(-1 * var(--gutter)) 20px; padding: 2px var(--gutter); }
  .angles::-webkit-scrollbar { display: none; }
  .angle { flex: none; }
}

/* ---------- v2: loading ---------- */

/* A card's poster fades in over a skeleton (ui/loader.js's sweep) */
.card-skel { position: absolute; inset: 0; z-index: -3; border-radius: inherit; transition: opacity 360ms var(--ease); }
.card-media { background: oklch(95.4% 0.012 292); }
.card-media > img { opacity: 0; transition: opacity 360ms var(--ease); }
.card-media.is-in > img { opacity: 1; }
.card-media.is-in { background: oklch(22% 0.02 280); }
.card-media.is-in > .card-skel { opacity: 0; }
/* the shade and the title wait for the picture */
.card-media:not(.is-in)::before { opacity: 0.35; }
/* a lazy home row or drop takes the place its content will fill */
.lazy-slot { min-width: 0; }
.past-list .lazy-slot .past-skel-head { display: grid; gap: 8px; padding: 0 var(--gutter); }
.past-list .lazy-slot .track { overflow: hidden; }

/* All drops: every drop's date and title as a compact list of links, at the foot of What's new */
.all-drops { margin: clamp(56px, 9vh, 96px) auto 0; padding: clamp(28px, 4vh, 40px) var(--gutter) 0; max-width: calc(1440px + 2 * var(--gutter)); }
.all-drops .section-title { margin-bottom: 16px; padding-top: clamp(28px, 4vh, 40px); border-top: 1px solid var(--hair); }
.all-drops ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px 24px; }
.all-drops a { display: flex; align-items: baseline; gap: 12px; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; transition: background-color 160ms var(--ease); }
.all-drops a:hover { background: var(--well); }
.all-date { flex: none; width: 7.4em; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.all-title { font-weight: 600; color: var(--ink); }
.all-drops a[aria-current="page"] .all-title { color: var(--violet-ink); }
.drop .kicker { display: flex; flex-wrap: wrap; gap: 0 2px; }

/* ---------- v2: slots by type ---------- */

/* a text slot's typed value reads as set; a long one is cut with an ellipsis */
.slot-value span.is-set { color: var(--ink); }
/* the clip to remix: a small 16:9 thumbnail, or a link tile */
.slot-clip { width: 72px; height: 44px; border-radius: 9px; object-fit: cover; flex: none; background: var(--well-2); box-shadow: inset 0 0 0 1px var(--hair); }
.slot-add-wide { width: 72px; height: 48px; }
.clip-link { display: grid; place-items: center; color: var(--violet-ink); background: var(--violet-soft); }
.clip-link svg { width: 18px; height: 18px; }
.tag-thumb.clip-link svg { width: 16px; height: 16px; }
video.tag-thumb { object-fit: cover; }
/* a popover's field: the input with its button, then the quick picks as chips */
.pop-form { display: flex; gap: 8px; padding: 4px 10px 8px; }
.pop-form .input { flex: 1; min-width: 0; height: 44px; }
.pop-form-go { height: 44px; padding: 0 16px; font-size: 14.5px; }
.pop-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 8px; }
.pop-chip { height: 34px; padding: 0 13px; border-radius: var(--r-pill); font-size: 14px; font-weight: 560; color: var(--ink-2);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); transition: box-shadow 160ms var(--ease), color 160ms, background-color 160ms; }
.pop-chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--violet-line); }
.pop-chip[aria-pressed="true"] { background: var(--violet-soft); color: var(--violet-ink); box-shadow: inset 0 0 0 1.5px var(--violet); }
.pop:has(.pop-form) { width: min(360px, calc(100vw - 24px)); }
/* a required slot left empty, or the box's button for it: a short shake and a violet ring */
.slot.is-nudge, .slot-line.is-nudge, .icon-btn.is-nudge, .input.is-nudge { animation: nudge 360ms var(--ease); }
.slot.is-nudge .slot-add, .icon-btn.is-nudge { box-shadow: inset 0 0 0 1.5px var(--violet), 0 0 0 4px var(--violet-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .aura { animation: none !important; }
  .out-making::before { animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
