/* ==========================================================================
   MakeLaunchVideo — calm monochrome system
   Shared by / (landing) and /app (studio)
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces — neutral zinc */
  --ink-0: #09090b;
  --ink-1: #0f0f11;
  --ink-2: #141416;
  --ink-3: #1c1c1f;
  --ink-4: #27272a;

  /* Hairlines */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);

  /* Type */
  --paper: #fafafa;
  --paper-2: #a1a1aa;
  --paper-3: #71717a;
  --paper-4: #52525b;

  /* Accent — monochrome: primary actions are solid white */
  --tally: #fafafa;
  --tally-hi: #e4e4e7;
  --tally-ink: #09090b;
  --tally-glow: rgba(255, 255, 255, 0.12);
  --signal: #c6f36b;         /* clean / ready */
  --signal-ink: #142003;
  --amber: #ffb547;
  --danger: #ff6b5e;

  /* Type families */
  --f-display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -24px rgba(0, 0, 0, 0.8);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 40px 120px -40px rgba(0, 0, 0, 0.9);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--ink-0);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video { max-width: 100%; display: block; }
::selection { background: rgba(255, 255, 255, 0.9); color: #09090b; }

:focus-visible {
  outline: 2px solid var(--tally);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono { font-family: var(--f-mono); font-feature-settings: 'zero' 1; letter-spacing: 0; }
.dim { color: var(--paper-3); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* --------------------------------------------------------------------------
   Brand
   -------------------------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
/* Mark: three-blade prism aperture whose opening is the play triangle (/favicon.svg) */
.brand-mark {
  display: block;
  width: 26px;
  height: 26px;
  flex: none;
  filter: drop-shadow(0 3px 10px rgba(123, 97, 255, 0.35));
  transition: transform 0.5s var(--ease), filter 0.3s;
}
.brand:hover .brand-mark { transform: scale(1.06); filter: drop-shadow(0 3px 14px rgba(123, 97, 255, 0.6)); }
.brand-word em {
  margin-left: 0.04em;
  font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  font-size: 1.16em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: #cbc3ff;
}

.rec-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--paper-3);
  flex: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-h: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 16px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, opacity 0.2s;
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { --btn-h: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { --btn-h: 50px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* Primary: crisp solid white */
.btn-primary,
.btn-tally {
  background: #ffffff;
  color: #09090b;
  font-weight: 600;
}
.btn-primary:hover:not(:disabled),
.btn-tally:hover:not(:disabled) { background: #e4e4e7; }

.btn-paper { background: var(--paper); color: var(--ink-0); }
.btn-paper:hover:not(:disabled) { background: #fff; }

.btn-signal { background: var(--signal); color: var(--signal-ink); box-shadow: 0 10px 30px -10px rgba(198, 243, 107, 0.45); }
.btn-signal:hover:not(:disabled) { background: #d4fa86; }

.btn-line {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line-2);
  color: var(--paper);
}
.btn-line:hover:not(:disabled) { border-color: var(--line-3); background: rgba(255, 255, 255, 0.05); }

.btn-quiet { background: transparent; color: var(--paper-2); }
.btn-quiet:hover:not(:disabled) { color: var(--paper); background: rgba(255, 255, 255, 0.05); }

.kbd-arrow { transition: transform 0.2s var(--ease); }
.btn:hover .kbd-arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Shared text pieces
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-3);
}
.eyebrow b { color: var(--tally); font-weight: 500; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-2);
  white-space: nowrap;
}
.badge-tally { color: var(--tally); border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.08); }
.badge-signal { color: var(--signal); border-color: rgba(198, 243, 107, 0.35); background: rgba(198, 243, 107, 0.07); }
.badge-amber { color: var(--amber); border-color: rgba(255, 181, 71, 0.35); background: rgba(255, 181, 71, 0.07); }
.badge-violet { color: #b4bcff; border-color: rgba(129, 140, 248, 0.4); background: rgba(129, 140, 248, 0.08); }

.error-banner {
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 107, 94, 0.35);
  background: rgba(255, 107, 94, 0.08);
  color: #ffc9c2;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 12px;
}

:root {
  --ico-muted: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z' fill='%23000'/%3E%3Cpath d='m22 9-6 6M16 9l6 6'/%3E%3C/svg%3E");
  --ico-sound: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z' fill='%23000'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13'/%3E%3C/svg%3E");
  --ico-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7'/%3E%3C/svg%3E");
}


/* ==========================================================================
   LANDING — obsidian studio, prism light
   One bold moment: the dispersed light behind the hero. Everything else is
   quiet glass, crisp type and the real launch videos.
   ========================================================================== */
html:has(body.landing) { background: #050508; }

.landing {
  --gutter: clamp(16px, 4vw, 64px);
  --bg: #050508;
  --fg: #f5f5f7;
  --fg-2: #a7a7b5;
  --fg-3: #7d7d8c;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.15);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  --spec: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --cyan: #5fd8ff;
  --iris: #9a7bff;
  --orchid: #e46bff;
  --f-display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --ico-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.9v14.2a1.1 1.1 0 0 0 1.66.95l11.5-7.1a1.1 1.1 0 0 0 0-1.9L8.66 3.95A1.1 1.1 0 0 0 7 4.9z'/%3E%3C/svg%3E");
  --ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 6.3l2.2 2.2 4.6-4.9'/%3E%3C/svg%3E");
  position: relative;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
}
.landing main { position: relative; z-index: 1; overflow-x: clip; }
.landing section[id] { scroll-margin-top: 92px; }
.landing ::selection { background: rgba(154, 123, 255, 0.85); color: #fff; }

.container {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Atmosphere: architectural grid + dispersed studio light ---------------- */
.atmos {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1120px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.atmos::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
}
.atmos-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 58% 52% at 50% 26%, #000 0%, rgba(0, 0, 0, 0.35) 50%, transparent 78%);
  mask-image: radial-gradient(ellipse 58% 52% at 50% 26%, #000 0%, rgba(0, 0, 0, 0.35) 50%, transparent 78%);
}
.atmos-beams {
  position: absolute;
  left: 50%;
  top: -220px;
  width: 1700px;
  height: 1180px;
  margin-left: -850px;
  transform-origin: 50% 0;
  background: conic-gradient(from 130deg at 50% 0%,
    transparent 0deg,
    rgba(228, 107, 255, 0) 4deg, rgba(228, 107, 255, 0.22) 11deg, transparent 19deg,
    rgba(154, 123, 255, 0) 25deg, rgba(154, 123, 255, 0.3) 33deg, transparent 41deg,
    rgba(226, 220, 255, 0) 45deg, rgba(226, 220, 255, 0.17) 50deg, transparent 56deg,
    rgba(95, 216, 255, 0) 60deg, rgba(95, 216, 255, 0.26) 68deg, transparent 77deg,
    rgba(104, 128, 255, 0) 83deg, rgba(104, 128, 255, 0.17) 91deg, transparent 100deg,
    transparent 360deg);
  filter: blur(22px);
  -webkit-mask-image: linear-gradient(to bottom, #000 16%, rgba(0, 0, 0, 0.42) 50%, transparent 80%);
  mask-image: linear-gradient(to bottom, #000 16%, rgba(0, 0, 0, 0.42) 50%, transparent 80%);
  will-change: transform;
}
.atmos-glow {
  position: absolute;
  left: 50%;
  top: 300px;
  width: 1200px;
  height: 640px;
  margin-left: -600px;
  background:
    radial-gradient(closest-side at 50% 50%, rgba(123, 97, 255, 0.2), rgba(123, 97, 255, 0.06) 55%, transparent),
    radial-gradient(closest-side at 22% 70%, rgba(95, 216, 255, 0.09), transparent),
    radial-gradient(closest-side at 80% 64%, rgba(228, 107, 255, 0.08), transparent);
}

/* Nav: floating glass bar ------------------------------------------------- */
.nav-shell {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  height: 58px;
  margin: 0 auto;
  padding: 0 10px 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(12, 12, 18, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 18px 50px -22px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  pointer-events: auto;
}
.nav .brand-mark { width: 28px; height: 28px; }
.nav-links {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateX(-50%);
  font-size: 14px;
  color: var(--fg-2);
}
.nav-links a { padding: 7px 14px; border-radius: 10px; transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }

/* Buttons (landing finish) ------------------------------------------------ */
.landing .btn-primary {
  background: #ffffff;
  color: #09090b;
  box-shadow: inset 0 -1px 0 rgba(9, 9, 11, 0.14), 0 10px 28px -12px rgba(255, 255, 255, 0.45);
}
.landing .btn-primary:hover:not(:disabled) {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: inset 0 -1px 0 rgba(9, 9, 11, 0.14), 0 0 0 4px rgba(255, 255, 255, 0.08), 0 14px 36px -10px rgba(186, 168, 255, 0.6);
}
.landing .btn-primary:active:not(:disabled) { transform: translateY(0); }
.landing .btn-line {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-2);
  box-shadow: var(--spec);
}
.landing .btn-line:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.24); }

/* Hero --------------------------------------------------------------------- */
.hero { padding-top: clamp(32px, 3.8vw, 48px); text-align: center; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  margin: 0;
  padding: 0 15px 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--spec);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 500;
}
.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(95, 216, 255, 0.9);
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0;
}
.kicker-text {
  color: var(--fg-2);
  background: linear-gradient(100deg, var(--fg-2) 0 42%, #ffffff 50%, var(--fg-2) 58% 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title {
  margin: 22px auto 0;
  font-family: var(--f-display);
  font-size: clamp(42px, 5.6vw, 82px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.048em;
  color: #fff;
}
.ht-line { display: block; }
.ht-accent {
  display: inline-block;
  padding: 0 0.07em 0.04em 0.01em;
  font-family: var(--f-serif);
  font-size: 1.13em;
  font-style: italic;
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.018em;
  background: linear-gradient(96deg, #effcff 0%, #9fe8ff 30%, #b9a5ff 62%, #f2a9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  max-width: 610px;
  margin: 18px auto 0;
  font-size: clamp(16px, 1.22vw, 18px);
  line-height: 1.6;
  color: var(--fg-2);
  text-wrap: pretty;
}

/* Composer */
.hero-form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 660px;
  margin: 28px auto 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 30px 80px -34px rgba(123, 97, 255, 0.55), 0 14px 40px -16px rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.hero-form::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--spin, 0deg), var(--cyan), var(--iris), var(--orchid), rgba(255, 255, 255, 0.9), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.22;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.hero-form::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.075), transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.hero-form:hover::before { opacity: 0.6; }
.hero-form:hover::after { opacity: 1; }
.hero-form:focus-within { background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)); }
.hero-form:focus-within::before { opacity: 1; }
.hero-form > :not(.sr-only) { position: relative; z-index: 1; }
.hero-form-ico {
  width: 18px;
  height: 18px;
  margin-left: 12px;
  flex: none;
  background: var(--fg-3);
  -webkit-mask: var(--ico-link) center / contain no-repeat;
  mask: var(--ico-link) center / contain no-repeat;
  transition: background 0.2s;
}
.hero-form:focus-within .hero-form-ico { background: var(--fg); }
.hero-form input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 10px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--fg);
}
.hero-form input::placeholder { color: var(--fg-3); }
.hero-form .btn { flex: none; border-radius: 12px; padding: 0 24px; }

.hero-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 6px;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--fg-3);
}
.hero-examples > span { margin-right: 4px; }
.ex-chip {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--spec);
  font-size: 13px;
  color: var(--fg-2);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.ex-chip:hover { color: var(--fg); border-color: var(--border-2); background: rgba(255, 255, 255, 0.07); }
.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 0;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--fg-3);
}
.facts li { display: inline-flex; align-items: center; white-space: nowrap; }
.facts li + li::before {
  content: '';
  width: 3px;
  height: 3px;
  margin: 0 12px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

/* Examples ----------------------------------------------------------------- */
.examples { padding-top: clamp(40px, 4vw, 52px); }
.ex-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 22px;
}
.ex-head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(24px, 2.4vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.032em;
}
.ex-head p { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.filters {
  display: inline-flex;
  gap: 2px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--spec);
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.filter:hover { color: var(--fg); }
.filter.is-active { background: #fff; color: #09090b; }

.gallery-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 2.4vw, 32px) clamp(16px, 2vw, 28px);
  margin-top: clamp(28px, 2.8vw, 40px);
}
.gallery-featured[hidden] + .gallery { margin-top: 0; }
.g-card { display: flex; flex-direction: column; min-width: 0; }
.g-card.is-filtered { display: none; }
.g-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border-radius: 14px;
  background: #0b0b12;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px -34px rgba(0, 0, 0, 0.95);
  cursor: pointer;
  transition: box-shadow 0.35s var(--ease);
}
.g-card-featured .g-media { border-radius: 18px; }
.g-media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  pointer-events: none;
}
.g-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.75), rgba(154, 123, 255, 0.4) 30%, transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.g-card:hover .g-media { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 30px 80px -34px rgba(123, 97, 255, 0.5); }
.g-card:hover .g-media::after { opacity: 1; }
.g-card.is-playing .g-media { cursor: default; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 30px 80px -34px rgba(123, 97, 255, 0.45); }
.g-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.35s var(--ease);
}
.g-card:not(.is-started):hover .g-media video { transform: scale(1.03); filter: brightness(0.86) saturate(1.05); }
.g-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(12, 12, 20, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 30px -10px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  color: #fff;
  transition: transform 0.4s var(--ease), background 0.25s, color 0.2s, border-color 0.25s, box-shadow 0.4s var(--ease), opacity 0.2s;
}
.g-play i {
  width: 20px;
  height: 20px;
  margin-left: 3px;
  background: currentColor;
  -webkit-mask: var(--ico-play) center / contain no-repeat;
  mask: var(--ico-play) center / contain no-repeat;
}
.g-card-featured .g-play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.g-card-featured .g-play i { width: 24px; height: 24px; }
.g-card:hover .g-play,
.g-play:focus-visible {
  transform: scale(1.08);
  border-color: #fff;
  background: rgba(255, 255, 255, 0.96);
  color: #09090b;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 56px 8px rgba(154, 123, 255, 0.5);
}
.g-card.is-started .g-play,
.g-card.is-started .g-pill { opacity: 0; pointer-events: none; }
.g-pill {
  position: absolute;
  top: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(8, 8, 14, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
  transition: opacity 0.2s;
}
.g-pill-dur { right: 12px; font-variant-numeric: tabular-nums; }
.g-pill-es {
  top: auto;
  bottom: 12px;
  left: 12px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.95);
  color: #09090b;
  font-weight: 600;
}
.g-card.is-missing .g-media video,
.g-card.is-missing .g-play { visibility: hidden; }
.g-card.is-missing .g-media::before {
  content: 'Sample coming soon';
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--fg-3);
  background: #0c0c12;
}
.g-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 16px;
  padding: 14px 2px 0;
}
.g-body h3 {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--f-display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.g-card-featured .g-body h3 { font-size: 19px; }
.g-lang-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(154, 123, 255, 0.42);
  border-radius: 999px;
  background: rgba(154, 123, 255, 0.14);
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #e2dbff;
}
.g-meta { grid-column: 1; margin: 0; font-size: 13.5px; color: var(--fg-3); }
.g-cta {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--spec);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-2);
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.g-cta span { display: inline-block; transition: transform 0.25s var(--ease); }
.g-cta:hover { color: #fff; border-color: var(--border-2); background: rgba(255, 255, 255, 0.08); }
.g-cta:hover span { transform: translateX(3px); }

/* Proof + pricing ---------------------------------------------------------- */
.pricing-sec { padding-top: clamp(88px, 9vw, 128px); }
.sec-head { max-width: 640px; margin-bottom: clamp(28px, 3vw, 40px); }
.sec-head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.sec-head p { margin: 14px 0 0; font-size: 17px; line-height: 1.6; color: var(--fg-2); }

.deal {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(16px, 1.8vw, 24px);
  align-items: stretch;
}
.proof {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--spec), 0 40px 100px -44px rgba(0, 0, 0, 0.95);
}
.proof-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 10px;
}
.proof figcaption { margin-top: auto; padding: 12px 6px 4px; font-size: 13.5px; color: var(--fg-3); }

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
  cursor: pointer;
  outline: none;
}
.player:focus-visible { box-shadow: 0 0 0 2px var(--fg); }
.player-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.35s var(--ease);
}
.player.is-swapping .player-video { filter: blur(6px) brightness(0.55); }
.player.is-paused .player-video { filter: brightness(0.72); }
.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(12, 12, 20, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}
.player-play i {
  width: 22px;
  height: 22px;
  margin-left: 3px;
  background: #fff;
  -webkit-mask: var(--ico-play) center / contain no-repeat;
  mask: var(--ico-play) center / contain no-repeat;
}
.player.is-paused .player-play { opacity: 1; transform: none; }
.player-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.player.is-loading .player-spinner,
.player.is-swapping .player-spinner { opacity: 1; transition-delay: 0.15s; animation: spin 0.8s linear infinite; }
.player.is-loading .player-play,
.player.is-swapping .player-play { opacity: 0; }

.seg,
.sound-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--spec);
}
.seg { display: inline-flex; padding: 3px; }
.seg-btn {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.seg-btn:hover { color: #fff; }
.seg-btn.is-active { background: #fff; color: #09090b; }
.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px 0 13px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  transition: background 0.2s, border-color 0.2s;
}
.sound-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-2); }
.sound-btn.is-on { border-color: rgba(154, 123, 255, 0.5); background: rgba(154, 123, 255, 0.14); }
.sound-ico {
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: var(--ico-muted) center / contain no-repeat;
  mask: var(--ico-muted) center / contain no-repeat;
}
.sound-btn.is-on .sound-ico { -webkit-mask-image: var(--ico-sound); mask-image: var(--ico-sound); }

/* Plans */
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(22px, 2.2vw, 32px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--spec);
}
.plan-featured {
  border-color: transparent;
  background:
    radial-gradient(120% 70% at 50% -12%, rgba(154, 123, 255, 0.24), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 40px 100px -44px rgba(123, 97, 255, 0.55);
}
.plan-featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(155deg, rgba(95, 216, 255, 0.8), rgba(154, 123, 255, 0.65) 32%, rgba(255, 255, 255, 0.1) 58%, rgba(228, 107, 255, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.plan[data-glow]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.05), transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.plan[data-glow]:hover::after { opacity: 1; }
.plan > * { position: relative; z-index: 1; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan h3 { margin: 0; font-family: var(--f-display); font-size: 17px; font-weight: 600; letter-spacing: -0.012em; }
.plan-tag {
  padding: 4px 10px;
  border: 1px solid rgba(154, 123, 255, 0.4);
  border-radius: 999px;
  background: rgba(154, 123, 255, 0.15);
  font-size: 12px;
  font-weight: 500;
  color: #e6e0ff;
  white-space: nowrap;
}
.plan-price { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.plan-price b { font-family: var(--f-display); font-size: 60px; font-weight: 600; line-height: 1; letter-spacing: -0.05em; }
.plan-price span { font-size: 14px; color: var(--fg-3); }
.plan-desc { margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: var(--fg-2); }
.checklist { list-style: none; display: grid; gap: 11px; margin: 22px 0 28px; padding: 0; font-size: 15px; color: var(--fg-2); }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.16em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08) var(--ico-check) center / 11px no-repeat;
}
.plan-featured .checklist li { color: #d6d6e0; }
.plan-featured .checklist li::before { background-color: rgba(154, 123, 255, 0.34); }
.plan .btn { margin-top: auto; }
.plan-pay { margin: auto 0 14px; font-size: 12.5px; line-height: 1.5; color: var(--fg-3); text-wrap: balance; }
.plan-pay + .btn { margin-top: 0; }

.plans-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 24px);
  margin-top: clamp(16px, 1.8vw, 24px);
}
.plan-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'meta btn' 'list list';
  align-items: center;
  gap: 18px 24px;
}
.plan-mini .plan-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.plan-mini .plan-price { margin-top: 0; }
.plan-mini .plan-price b { font-size: 36px; }
.plan-mini .checklist { grid-area: list; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; font-size: 14px; }
.plan-mini .btn { grid-area: btn; width: auto; margin-top: 0; }

/* Footer ------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: clamp(80px, 9vw, 128px);
  padding-top: 28px;
  padding-bottom: 36px;
  border-top: 1px solid var(--border);
}
.footer .brand { font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 14px; color: var(--fg-3); }
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--fg); }

/* Motion: one load sequence, ambient light drift, live dot ------------------ */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes mlv-spin { to { --spin: 360deg; } }
@keyframes mlv-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mlv-sway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
@keyframes mlv-ping { 0% { opacity: 0.8; transform: scale(0.6); } 70%, 100% { opacity: 0; transform: scale(1.9); } }
@keyframes mlv-shimmer { 0%, 55% { background-position: 100% 0; } 85%, 100% { background-position: 0% 0; } }

@media (prefers-reduced-motion: no-preference) {
  .atmos-beams { animation: mlv-sway 18s ease-in-out infinite alternate; }
  .live-dot::after { animation: mlv-ping 2.4s var(--ease) infinite; }
  .kicker-text { animation: mlv-shimmer 7s ease-in-out 0.8s infinite; }
  .hero-form::before { animation: mlv-spin 7s linear infinite; }
  .kicker,
  .ht-line,
  .hero-lead,
  .hero-form,
  .hero-examples,
  .facts { animation: mlv-rise 0.8s var(--ease) both; }
  .ht-line:nth-child(1) { animation-delay: 0.06s; }
  .ht-line:nth-child(2) { animation-delay: 0.14s; }
  .hero-lead { animation-delay: 0.22s; }
  .hero-form { animation-delay: 0.3s; }
  .hero-examples { animation-delay: 0.38s; }
  .facts { animation-delay: 0.44s; }
  .examples { animation: mlv-rise 0.9s var(--ease) 0.5s both; }
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1080px) {
  .deal { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans-mini { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .gallery-featured,
  .gallery { grid-template-columns: 1fr; }
  .ex-head { flex-direction: column; align-items: stretch; }
  .filters { align-self: flex-start; }
}
@media (max-width: 640px) {
  .nav-shell { padding-top: 10px; }
  .nav { height: 54px; padding: 0 8px 0 12px; }
  .hero-title { letter-spacing: -0.045em; }
  .hero-form { flex-direction: column; align-items: stretch; padding: 6px; border-radius: 16px; }
  .hero-form-ico { display: none; }
  .hero-form input { flex: none; height: 50px; padding: 0 12px; text-align: center; }
  .hero-form .btn { width: 100%; }
  .hero-examples > span { width: 100%; margin: 0 0 2px; }
  .facts { row-gap: 2px; }
  .facts::before { content: ''; flex-basis: 100%; order: 2; }
  .facts li:nth-child(n + 3) { order: 3; }
  .facts li:nth-child(3)::before { display: none; }
  .filter { padding: 0 11px; font-size: 12.5px; }
  .g-body { grid-template-columns: minmax(0, 1fr); }
  .g-cta { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 10px; }
  .proof { padding: 8px; border-radius: 18px; }
  .proof-bar { flex-wrap: nowrap; gap: 8px; }
  .seg-btn { height: 28px; padding: 0 10px; font-size: 12px; }
  .sound-btn { height: 34px; gap: 6px; padding: 0 11px 0 10px; font-size: 12.5px; }
  .player-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .plan-price b { font-size: 52px; }
  .plan-mini { grid-template-columns: 1fr; grid-template-areas: 'meta' 'list' 'btn'; }
  .plan-mini .checklist { display: grid; gap: 9px; }
  .plan-mini .btn { width: 100%; }
  .footer { flex-direction: column; align-items: flex-start; }
}


/* ==========================================================================
   STUDIO (/app)
   ========================================================================== */
.studio { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

.studio-bar {
  position: relative;
  z-index: 40;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 14, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bar-sep { width: 1px; height: 22px; background: var(--line-2); flex: none; }
.bar-spacer { flex: 1; }
.project-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  max-width: 340px;
  padding: 0 10px 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
  min-width: 0;
}
.project-switch:hover { border-color: var(--line-2); background: rgba(255, 255, 255, 0.04); }
.project-switch .mono { font-size: 10px; letter-spacing: 0.1em; color: var(--paper-3); font-weight: 500; }
.project-switch-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.project-switch .chev { color: var(--paper-3); font-size: 11px; }

.quota {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--paper-2);
  white-space: nowrap;
}
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 7px; height: 7px; border-radius: 2px; background: var(--ink-4); border: 1px solid var(--line-2); }
.pips i.on { background: var(--tally); border-color: var(--tally); }
.quota.is-unlocked { color: var(--signal); border-color: rgba(198, 243, 107, 0.3); }
.quota .credits { color: var(--signal); }

/* Drawer */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  z-index: 61;
  top: 0; left: 0; bottom: 0;
  width: min(360px, 92vw);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line-2);
  background: var(--ink-1);
  transform: translateX(-102%);
  transition: transform 0.3s var(--ease);
}
.drawer.open { transform: none; box-shadow: 30px 0 80px -30px rgba(0, 0, 0, 0.8); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; display: grid; align-content: start; gap: 6px; }
.drawer-foot { padding: 12px; border-top: 1px solid var(--line); }

.proj-item {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}
.proj-item:hover { background: rgba(255, 255, 255, 0.03); border-color: var(--line); }
.proj-item.is-current { border-color: var(--line-2); background: rgba(255, 255, 255, 0.04); }
.proj-thumb {
  width: 44px; height: 26px; border-radius: 4px;
  border: 1px solid var(--line-2);
  background: linear-gradient(135deg, var(--ink-3), var(--ink-1));
  position: relative;
}
.proj-thumb::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-40%, -50%); border-left: 6px solid var(--paper-3); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.proj-thumb.paid { border-color: rgba(198, 243, 107, 0.4); }
.proj-thumb.paid::after { border-left-color: var(--signal); }
.proj-meta { min-width: 0; }
.proj-title { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-sub { display: block; font-family: var(--f-mono); font-size: 10.5px; color: var(--paper-3); margin-top: 2px; }
.drawer-empty { padding: 24px 12px; text-align: center; color: var(--paper-3); font-size: 13.5px; }

/* Grid */
.studio-grid {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
}
.pane-left {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--ink-1);
}
.pane-right {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background:
    radial-gradient(80% 50% at 60% 0%, rgba(255, 255, 255, 0.025), transparent 70%),
    var(--ink-0);
}
.pane-right > * { flex: none; width: 100%; max-width: 1440px; margin-left: auto; margin-right: auto; }

/* Create / onboarding */
.create-panel { flex: 1; overflow-y: auto; padding: 24px 22px 32px; }
.create-panel h1 { margin: 12px 0 0; font-family: var(--f-display); font-weight: 600; font-size: 28px; line-height: 1.05; letter-spacing: -0.035em; }
.create-panel .intro { margin: 10px 0 22px; color: var(--paper-2); font-size: 14px; }
.prefill-note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 16px;
  border-radius: var(--r);
  border: 1px solid rgba(198, 243, 107, 0.3);
  background: rgba(198, 243, 107, 0.06);
  font-size: 13px; color: #e5f8c2;
}

.presets { display: grid; gap: 8px; margin-bottom: 22px; }
.preset {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.15s var(--ease);
}
.preset:hover:not(:disabled) { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.05); }
.preset:disabled { opacity: 0.5; cursor: progress; }
.preset-ico {
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  font-family: var(--f-mono); font-size: 12px; color: var(--tally);
  background: var(--ink-2);
}
.preset strong { display: block; font-size: 13.5px; }
.preset small { display: block; font-size: 12px; color: var(--paper-3); margin-top: 1px; }
.preset .go { font-family: var(--f-mono); font-size: 11px; color: var(--paper-3); }
.preset:hover .go { color: var(--tally); }

.divider-label {
  display: flex; align-items: center; gap: 12px;
  margin: 6px 0 18px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-4);
}
.divider-label::before, .divider-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.field { margin-bottom: 16px; }
.field-label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--paper-2);
}
.field-label .mono { font-size: 10.5px; font-weight: 400; color: var(--paper-4); }
.input, .textarea {
  width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--ink-0);
  color: var(--paper);
  padding: 11px 13px;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder, .textarea::placeholder { color: var(--paper-4); }
.input:focus, .textarea:focus { border-color: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); }
.textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
.input-prefixed { position: relative; }
.input-prefixed .pfx { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); font-size: 12px; color: var(--paper-4); pointer-events: none; }
.input-prefixed .input { padding-left: 76px; }

.tones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tone { position: relative; display: block; cursor: pointer; }
.tone input { position: absolute; opacity: 0; pointer-events: none; }
.tone-card {
  display: block;
  height: 100%;
  padding: 8px 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--ink-0);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.tone:hover .tone-card { border-color: var(--line-3); }
.tone input:checked + .tone-card { border-color: var(--tally); background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); }
.tone input:focus-visible + .tone-card { outline: 2px solid var(--tally); outline-offset: 2px; }
.tone-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--line);
}
.tone-name { display: block; font-size: 13px; font-weight: 600; }
.tone-desc { display: block; font-size: 11.5px; color: var(--paper-3); line-height: 1.35; margin-top: 2px; }
/* thumbnails */
.th-bold { background: linear-gradient(135deg, #0f1220, #05060a); }
.th-bold::before { content: 'Ship.'; position: absolute; left: 10%; top: 22%; font: 700 22px/1 var(--f-display); letter-spacing: -0.05em; color: #fff; }
.th-bold::after { content: ''; position: absolute; left: 10%; bottom: 20%; width: 40%; height: 5px; border-radius: 3px; background: #ff5a2a; }
.th-minimal { background: #eeece6; }
.th-minimal::before { content: 'Simple.'; position: absolute; inset: 0; display: grid; place-items: center; font: 500 15px/1 var(--f-display); letter-spacing: -0.03em; color: #1b1b1e; }
.th-energy { background: linear-gradient(120deg, #ff3d7f, #ffb547 55%, #c6f36b); }
.th-energy::before { content: 'GO!'; position: absolute; left: 12%; top: 18%; font: 800 italic 22px/1 var(--f-display); color: #160a00; transform: rotate(-6deg); }
.th-energy::after { content: ''; position: absolute; right: -10%; bottom: -30%; width: 60%; height: 90%; border: 3px solid rgba(22, 10, 0, 0.6); border-radius: 50%; }
.th-dev { background: #07100c; }
.th-dev::before { content: '$ curl -X POST\A  200 OK  12ms'; white-space: pre; position: absolute; left: 9%; top: 26%; font: 500 9px/1.6 var(--f-mono); color: #6ee7b7; }

.toggle-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  margin: 18px 0;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 181, 71, 0.04), transparent);
  cursor: pointer;
}
.toggle-row strong { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.toggle-row p { margin: 4px 0 0; font-size: 12.5px; color: var(--paper-3); line-height: 1.45; }
.switch { position: relative; width: 38px; height: 22px; flex: none; margin-top: 2px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-4); border: 1px solid var(--line-2); transition: background 0.2s, border-color 0.2s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper-2); transition: transform 0.25s var(--ease), background 0.2s; }
.switch input:checked + span { background: var(--amber); border-color: var(--amber); }
.switch input:checked + span::after { transform: translateX(16px); background: #241500; }
.switch input:focus-visible + span { outline: 2px solid var(--tally); outline-offset: 2px; }

.create-foot { margin-top: 10px; text-align: center; font-family: var(--f-mono); font-size: 11px; color: var(--paper-4); }

.recent { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.recent-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* Chat */
.chat-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.director-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--paper); color: var(--ink-0);
  font-family: var(--f-display); font-weight: 700; font-size: 13px;
}
.director-id strong { display: block; font-size: 13.5px; line-height: 1.2; }
.director-id .mono { display: block; font-size: 10.5px; color: var(--paper-3); }

.draft-counter { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; color: var(--paper-2); white-space: nowrap; }
.draft-counter.is-empty { color: var(--tally); }
.draft-counter.is-unlocked { color: var(--signal); }

.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; flex-direction: column; max-width: 88%; animation: msgIn 0.35s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg-who { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper-4); margin-bottom: 5px; display: flex; gap: 8px; align-items: center; }
.msg-body { padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.user .msg-body { background: var(--paper); color: var(--ink-0); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; }
.msg.assistant .msg-body { background: var(--ink-2); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; color: var(--paper); }
.msg-ver {
  align-self: flex-start;
  margin-top: 6px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 6px; border: 1px solid var(--line-2); background: transparent;
  font-family: var(--f-mono); font-size: 10.5px; color: var(--paper-2);
}
.msg-ver:hover { color: var(--paper); border-color: var(--line-3); }
.msg-ver::before { content: '▶'; font-size: 8px; color: var(--tally); }
.msg.working .msg-body { display: flex; align-items: center; gap: 10px; color: var(--paper-2); }
.typing { display: inline-flex; gap: 3px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--paper-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }

.composer { flex: none; padding: 12px 14px 14px; border-top: 1px solid var(--line); background: var(--ink-1); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--paper-2);
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.2s;
}
.chip:hover:not(:disabled) { color: var(--paper); border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.06); }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }
.composer-row {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--ink-0);
  transition: border-color 0.2s;
}
.composer-row:focus-within { border-color: rgba(255, 255, 255, 0.5); }
.composer-row textarea {
  flex: 1; min-width: 0;
  border: 0; outline: none; resize: none;
  background: transparent;
  padding: 7px 8px;
  font-size: 14px; line-height: 1.45;
  max-height: 120px;
  color: var(--paper);
}
.composer-row textarea::placeholder { color: var(--paper-4); }
.composer-hint { margin-top: 7px; display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 10.5px; color: var(--paper-4); }

.composer-paywall {
  margin-bottom: 10px;
  padding: 14px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
}
.composer-paywall strong { display: block; font-size: 14px; }
.composer-paywall p { margin: 4px 0 12px; font-size: 12.5px; color: var(--paper-2); }

/* Monitor */
.monitor {
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.monitor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.monitor-title { min-width: 0; }
.monitor-title .eyebrow { font-size: 10.5px; }
.monitor-title strong { display: block; margin-top: 3px; font-family: var(--f-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-title .sub { display: block; margin-top: 1px; font-size: 12.5px; color: var(--paper-3); }
.iter-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--ink-0); flex: none; }
.iter-tabs:empty { display: none; }
.iter-tab {
  min-width: 38px; height: 28px; padding: 0 10px;
  border-radius: 6px; border: 0; background: transparent;
  font-family: var(--f-mono); font-size: 12px; color: var(--paper-3);
  transition: all 0.2s;
}
.iter-tab:hover { color: var(--paper); }
.iter-tab.active { background: var(--paper); color: var(--ink-0); font-weight: 600; }

/* Pipeline tracker */
.pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
  counter-reset: pipe;
}
.pipe-step {
  position: relative;
  padding: 10px 12px 11px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.pipe-step:last-child { border-right: 0; }
.pipe-step::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--tally); transition: width 0.4s var(--ease); }
.pipe-top { display: flex; align-items: center; gap: 7px; }
.pipe-ico {
  width: 16px; height: 16px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  display: grid; place-items: center;
  font-size: 9px; color: transparent;
}
.pipe-name { font-size: 12.5px; font-weight: 600; color: var(--paper-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-short { display: none; }
.pipe-sub { display: block; margin-top: 2px; padding-left: 23px; font-family: var(--f-mono); font-size: 10px; color: var(--paper-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe-step.is-done .pipe-ico { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.pipe-step.is-done .pipe-ico::before { content: '✓'; font-weight: 700; }
.pipe-step.is-done .pipe-name { color: var(--paper-2); }
.pipe-step.is-active .pipe-ico { border-color: var(--tally); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.pipe-step.is-active .pipe-name { color: var(--paper); }
.pipe-step.is-active .pipe-sub { color: var(--tally); }
.pipe-step.is-active::after { width: 100%; animation: pulseBar 1.6s ease-in-out infinite; }
.pipe-step.is-skip .pipe-ico { border-style: dashed; }
.pipe-step.is-skip .pipe-name { color: var(--paper-4); text-decoration: line-through; text-decoration-color: var(--line-3); }
.pipeline.is-failed .pipe-step.is-active .pipe-ico { animation: none; border-color: var(--danger); background: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseBar { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* Stage */
.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #030304;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage-hud {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: flex; gap: 6px;
  pointer-events: none;
}
.stage-hud .badge { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(6px); }
.slate {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(50% 60% at 50% 50%, rgba(255, 255, 255, 0.04), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px),
    #050506;
}
.slate-inner { max-width: 460px; }
.slate-corners::before, .slate-corners::after {
  content: ''; position: absolute; width: 22px; height: 22px; border-color: var(--line-3); border-style: solid;
}
.slate-corners::before { top: 16px; left: 16px; border-width: 1px 0 0 1px; }
.slate-corners::after { bottom: 16px; right: 16px; border-width: 0 1px 1px 0; }
.slate h3 { margin: 14px 0 6px; font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
.slate p { margin: 0; color: var(--paper-3); font-size: 13.5px; }
.slate .mono { font-size: 11px; letter-spacing: 0.1em; color: var(--paper-4); }
.leader {
  position: relative;
  width: 84px; height: 84px; margin: 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  display: grid; place-items: center;
}
.leader::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid var(--line-2); }
.leader::after {
  content: ''; position: absolute; inset: -1px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.55), transparent 30%);
  mask: radial-gradient(circle, transparent 60%, #000 61%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%);
  animation: spin 1.4s linear infinite;
}
.leader span { font-family: var(--f-display); font-size: 30px; font-weight: 600; color: var(--paper); font-variant-numeric: tabular-nums; }
.leader.idle::after { display: none; }
.slate .err { color: #ffc9c2; }

/* Unlock card */
.unlock-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background:
    radial-gradient(70% 140% at 0% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
    var(--ink-1);
  overflow: hidden;
}
.unlock-ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
  color: var(--tally);
  font-size: 18px;
}
.unlock-card h3 { margin: 0; font-family: var(--f-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.unlock-card p { margin: 4px 0 0; font-size: 13px; color: var(--paper-2); }
.unlock-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.unlock-actions .link { background: none; border: 0; padding: 0; font-size: 12.5px; color: var(--paper-3); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
.unlock-actions .link:hover { color: var(--paper); }
.unlock-progress { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.unlock-progress i { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--signal), transparent); animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

.unlock-card.is-rendering { border-color: rgba(198, 243, 107, 0.35); background: radial-gradient(70% 140% at 0% 0%, rgba(198, 243, 107, 0.08), transparent 60%), var(--ink-1); }
.unlock-card.is-rendering .unlock-ico { border-color: rgba(198, 243, 107, 0.4); background: rgba(198, 243, 107, 0.08); color: var(--signal); }
.unlock-card.is-ready {
  border-color: rgba(198, 243, 107, 0.55);
  background:
    radial-gradient(60% 160% at 100% 50%, rgba(198, 243, 107, 0.16), transparent 60%),
    radial-gradient(40% 120% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 60%),
    var(--ink-1);
  box-shadow: 0 30px 80px -40px rgba(198, 243, 107, 0.5);
}
.unlock-card.is-ready .unlock-ico { border-color: var(--signal); background: var(--signal); color: var(--signal-ink); }
.unlock-card.is-failed { border-color: rgba(255, 107, 94, 0.45); }
.unlock-card.is-failed .unlock-ico { color: var(--danger); border-color: rgba(255, 107, 94, 0.45); background: rgba(255, 107, 94, 0.08); }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -10px;
  width: 6px; height: 10px; border-radius: 1px;
  animation: fall 2.4s var(--ease) forwards;
}
@keyframes fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(160px) rotate(540deg); opacity: 0; } }

/* Breakdown */
.breakdown {
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: var(--ink-1);
  overflow: hidden;
}
.bd-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.bd-head h3 { margin: 3px 0 0; font-family: var(--f-display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.bd-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.palette { display: flex; align-items: center; gap: 10px; }
.swatch { display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: 11px; color: var(--paper-2); }
.swatch i { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2); }

.scenes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.scene-col { padding: 16px 18px 20px; border-right: 1px solid var(--line); min-width: 0; }
.scene-col:last-child { border-right: 0; }
.scene-col .eyebrow { font-size: 10.5px; }
.scene-col .eyebrow b { color: var(--tally); }
.sc-title { margin: 10px 0 0; font-family: var(--f-display); font-size: 17px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; word-break: break-word; }
.sc-text { margin: 6px 0 0; font-size: 13px; color: var(--paper-2); line-height: 1.5; word-break: break-word; }
.sc-note { margin-top: 10px; font-family: var(--f-mono); font-size: 10.5px; color: var(--paper-4); word-break: break-all; }
.feat-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.feat-list li { padding-left: 10px; border-left: 2px solid var(--line-2); }
.feat-list .tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--paper-3); }
.feat-list strong { display: block; font-size: 13.5px; line-height: 1.3; margin-top: 1px; }
.feat-list span.d { display: block; font-size: 12.5px; color: var(--paper-3); line-height: 1.4; margin-top: 2px; }
.feat-list .metric { display: inline-block; margin-top: 4px; font-family: var(--f-mono); font-size: 11px; color: var(--signal); }
.cta-pill { display: inline-flex; align-items: center; margin-top: 12px; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #0b0b0b; background: var(--paper); }

.vo {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-top: 1px solid var(--line);
}
.vo-side .mono { font-size: 11px; color: var(--paper-3); display: block; margin-top: 6px; }
.vo-wave { display: flex; align-items: center; gap: 2px; height: 28px; margin-top: 12px; }
.vo-wave i { flex: 1; border-radius: 1px; background: rgba(198, 243, 107, 0.45); }
.vo-script { margin: 0; font-family: var(--f-display); font-size: 17px; line-height: 1.55; letter-spacing: -0.01em; color: var(--paper); }
.vo-script::before { content: '“'; color: var(--tally); margin-right: 2px; }
.vo-script::after { content: '”'; color: var(--tally); margin-left: 2px; }
.broll-note { grid-column: 1 / -1; padding: 10px 12px; border-radius: var(--r); border: 1px dashed rgba(255, 181, 71, 0.4); font-size: 12.5px; color: var(--paper-2); }
.broll-note b { color: var(--amber); font-family: var(--f-mono); font-weight: 500; font-size: 10.5px; letter-spacing: 0.08em; margin-right: 6px; }

/* Toast */
.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  box-shadow: var(--shadow-2);
  font-size: 13.5px;
  animation: msgIn 0.35s var(--ease);
}
.toast.ok { border-color: rgba(198, 243, 107, 0.45); }
.toast.warn { border-color: rgba(255, 181, 71, 0.45); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(4, 4, 5, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.3s var(--ease);
}
.modal-backdrop.open .modal { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 22px 0; }
.modal-head h3 { margin: 8px 0 0; font-family: var(--f-display); font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.modal-head p { margin: 6px 0 0; font-size: 13.5px; color: var(--paper-2); }
.modal-body { padding: 18px 22px 22px; }
.icon-btn { width: 32px; height: 32px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--paper-2); display: grid; place-items: center; }
.icon-btn:hover { color: var(--paper); border-color: var(--line-3); }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.plan-option {
  position: relative;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--ink-0);
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.plan-option:hover:not(:disabled) { border-color: var(--line-3); }
.plan-option:disabled { opacity: 0.4; cursor: not-allowed; }
.plan-option.selected { border-color: var(--tally); background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12); }
.plan-option .po-label { display: block; padding-right: 24px; font-size: 12.5px; color: var(--paper-2); font-weight: 600; }
.plan-option .po-price { display: block; margin: 6px 0 2px; font-family: var(--f-display); font-size: 32px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.plan-option .po-sub { font-size: 12px; color: var(--paper-3); }
.plan-option .po-radio { position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-3); }
.plan-option.selected .po-radio { border: 5px solid var(--tally); }
.plan-option .badge { margin-top: 8px; }

.pay-stack { display: grid; gap: 8px; margin-top: 16px; }
.pay-btn {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s, transform 0.15s var(--ease);
}
.pay-btn:active:not(:disabled) { transform: translateY(1px); }
.pay-btn:disabled { cursor: not-allowed; }
.pay-btn strong { display: block; font-size: 15px; }
.pay-btn small { display: block; font-size: 12px; opacity: 0.75; margin-top: 1px; }
.pay-btn .pay-amt { font-family: var(--f-display); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.pay-stripe { background: var(--tally); color: var(--tally-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 14px 40px -16px var(--tally-glow); }
.pay-stripe:hover:not(:disabled) { background: var(--tally-hi); }
.pay-paypal { background: var(--ink-0); border-color: var(--line-2); color: var(--paper); }
.pay-paypal:hover:not(:disabled) { border-color: var(--line-3); background: var(--ink-2); }
.pay-btn:disabled { background: var(--ink-0); border-color: var(--line); color: var(--paper-3); box-shadow: none; }
.pay-btn:disabled .pay-amt { display: none; }
.modal-fine { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-family: var(--f-mono); font-size: 10.5px; color: var(--paper-4); }
.modal-note { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--paper-2); }

/* ==========================================================================
   Studio — format, voice, share, save-email strip, vertical stage
   ========================================================================== */
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { position: relative; display: block; cursor: pointer; min-width: 0; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 9px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--ink-0);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.opt:hover .opt-card { border-color: var(--line-3); }
.opt input:checked + .opt-card { border-color: var(--tally); background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); }
.opt input:focus-visible + .opt-card { outline: 2px solid var(--tally); outline-offset: 2px; }
.opt-name { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-desc { display: block; font-size: 11.5px; color: var(--paper-3); line-height: 1.3; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmt-ico { display: grid; place-items: center; width: 26px; height: 26px; flex: none; }
.fmt-ico::before { content: ''; border: 1.5px solid var(--paper-3); border-radius: 3px; transition: border-color 0.2s, background 0.2s; }
.fmt-ico.land::before { width: 24px; height: 14px; }
.fmt-ico.vert::before { width: 13px; height: 22px; }
.opt input:checked + .opt-card .fmt-ico::before { border-color: var(--tally); background: rgba(255, 255, 255, 0.16); }
.voice-ico {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--ink-3);
  font-family: var(--f-display); font-size: 12px; font-weight: 700; color: var(--paper-2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.opt input:checked + .opt-card .voice-ico { background: var(--tally); border-color: var(--tally); color: var(--tally-ink); }

.studio-bar .share-btn { gap: 7px; }
.share-ico {
  width: 14px; height: 14px; flex: none;
  background: currentColor;
  -webkit-mask: var(--ico-link) center / contain no-repeat;
  mask: var(--ico-link) center / contain no-repeat;
}
.share-btn.is-copied { border-color: rgba(198, 243, 107, 0.5); color: var(--signal); background: rgba(198, 243, 107, 0.07); }

.save-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 14px;
  padding: 12px 14px 12px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.save-ico {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  color: var(--paper-2);
  font-size: 14px;
}
.save-copy { min-width: 0; }
.save-copy strong { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; }
.save-copy span { display: block; font-size: 12.5px; color: var(--paper-3); line-height: 1.4; margin-top: 1px; }
.save-form { display: flex; gap: 6px; min-width: 0; }
.save-form .input { width: 240px; height: 36px; padding: 0 12px; font-size: 13.5px; }
.save-form .btn { --btn-h: 36px; }
.save-err { grid-column: 2 / -1; margin: -4px 0 0; font-size: 12px; color: #ffc9c2; }
.save-strip.is-saved { border-color: rgba(198, 243, 107, 0.28); background: rgba(198, 243, 107, 0.035); }
.save-strip.is-saved .save-ico { border-color: rgba(198, 243, 107, 0.45); background: rgba(198, 243, 107, 0.1); color: var(--signal); }
.save-strip .link-btn { background: none; border: 0; padding: 0; font-size: 12.5px; color: var(--paper-3); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
.save-strip .link-btn:hover { color: var(--paper); }

/* Vertical (9:16) projects: phone-framed inside the 16:9 monitor */
.stage.is-vertical {
  background:
    radial-gradient(40% 70% at 50% 50%, rgba(255, 255, 255, 0.07), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 28px),
    #030304;
}
.stage.is-vertical video {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: calc(100% - 28px);
  max-width: calc(100% - 28px);
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.95), 0 0 0 6px rgba(255, 255, 255, 0.02);
}
.stage-hud .badge-fmt { color: var(--paper); }

/* Generate CTA stays in reach while the brief scrolls */
.create-cta {
  position: sticky;
  bottom: -32px; /* cancels .create-panel's bottom padding so the bar sits flush */
  z-index: 3;
  margin: 0 -22px;
  padding: 14px 22px 18px;
  background: linear-gradient(180deg, rgba(14, 14, 16, 0) 0, var(--ink-1) 16px);
}
@media (max-width: 960px) {
  .create-cta { bottom: 0; }
}
@media (max-width: 640px) {
  .create-cta { margin: 0 -16px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
}


/* Studio responsive */
@media (max-width: 1100px) {
  .scenes { grid-template-columns: 1fr 1fr; }
  .scene-col:nth-child(2) { border-right: 0; }
  .scene-col:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 960px) {
  /* Studio stacks */
  .studio { height: auto; min-height: 100dvh; overflow: visible; }
  .studio-bar { position: sticky; top: 0; }
  .studio-grid { display: flex; flex-direction: column; }
  .pane-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .pane-right { display: contents; }
  .pane-right > * { margin: 0 16px; width: auto; }
  .monitor { order: 2; margin-top: 16px !important; }
  .pane-left { order: 1; }
  .unlock-card { order: 3; margin-top: 12px !important; }
  .breakdown { order: 4; margin-top: 12px !important; margin-bottom: 32px !important; }
  .studio.has-project .monitor { order: 1; }
  .studio.has-project .unlock-card { order: 2; }
  .studio.has-project .pane-left { order: 3; margin-top: 16px; border-top: 1px solid var(--line); }
  .studio.has-project .chat-scroll { max-height: 56vh; min-height: 220px; }
  .create-panel { overflow: visible; }
}

@media (max-width: 640px) {
  .studio-bar { gap: 8px; padding: 0 10px; height: 52px; }
  .studio-bar .brand > span:last-child { display: none; }
  .bar-sep { display: none; }
  .project-switch { max-width: 44vw; padding: 0 8px; }
  .project-switch .mono { display: none; }
  .quota { padding: 0 8px; }
  .quota-text { display: none; }
  #header-unlock-btn { display: none !important; }
  #new-project-btn { padding: 0 10px; }
  .create-panel { padding: 20px 16px 28px; }
  .monitor-head { flex-wrap: wrap; padding: 12px; }
  .pipeline { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pipe-step { padding: 8px 6px; }
  .pipe-top { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pipe-name { font-size: 11px; max-width: 100%; }
  .pn-full { display: none; }
  .pn-short { display: inline; }
  .hint-keys { display: none; }
  .pipe-sub { display: none; }
  .unlock-card { grid-template-columns: auto 1fr; padding: 16px; }
  .unlock-actions { grid-column: 1 / -1; }
  .unlock-actions .btn { width: 100%; }
  .scenes { grid-template-columns: 1fr; }
  .scene-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .scene-col:last-child { border-bottom: 0; }
  .vo { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr 1fr; }
  .plan-option .po-price { font-size: 26px; }
  .tones { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .save-strip { order: 2; margin-top: 12px !important; }
  .studio.has-project .save-strip { order: 2; }
}
@media (max-width: 640px) {
  .studio-bar .share-btn { width: 32px; padding: 0; }
  .share-label { display: none; }
  .project-switch { max-width: 36vw; }
  .save-strip { grid-template-columns: auto minmax(0, 1fr); padding: 12px; }
  .save-form { grid-column: 1 / -1; }
  .save-form .input { width: auto; flex: 1; min-width: 0; }
  .save-err { grid-column: 1 / -1; }
  .stage.is-vertical { aspect-ratio: auto; height: min(66vh, 560px); }
  .stage.is-vertical video { top: 10px; height: calc(100% - 20px); border-radius: 12px; }
  .opt-desc { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

