:root {
  --ink: #141210;
  --night: #151311;
  --paper: #f0eeea;
  --card: #fff;
  --line: #e4e1da;
  --muted: #77736b;
  --green: #1e9e58;
  --green-deep: #16733d;
  --red: #d8432f;
  --amber: #f2a93b;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow: 0 22px 56px rgba(20, 18, 16, .14), 0 3px 10px rgba(20, 18, 16, .06);
}

body[data-mood="dark"] { --bg: var(--night); --fg: #fff; --soft: rgba(255, 255, 255, .64); --rule: rgba(255, 255, 255, .14); --ghost: rgba(255, 255, 255, .07); --blob-opacity: .45; --panel: rgba(255, 255, 255, .07); }
body[data-mood="light"] { --bg: var(--paper); --fg: var(--ink); --soft: var(--muted); --rule: rgba(20, 18, 16, .12); --ghost: rgba(20, 18, 16, .07); --blob-opacity: 1; --panel: rgba(255, 255, 255, .72); }
body[data-mood="green"] { --bg: var(--green-deep); --fg: #fff; --soft: rgba(255, 255, 255, .75); --rule: rgba(255, 255, 255, .2); --ghost: rgba(255, 255, 255, .12); --blob-opacity: .25; --panel: rgba(255, 255, 255, .12); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 500 17px/1.5 var(--sans); overflow-x: hidden; transition: background .7s var(--ease), color .5s; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; font-size: 12px; font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
body[data-mood="green"] .dot { background: #fff; }

/* Background */
.backdrop { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(10px); opacity: var(--blob-opacity); transition: opacity .7s; animation: drift 22s ease-in-out infinite alternate; }
.blob-a { width: 56vw; height: 56vw; left: -12vw; top: -8vw; background: radial-gradient(closest-side, rgba(190, 160, 130, .36), transparent); }
.blob-b { width: 48vw; height: 48vw; right: -10vw; top: 26vh; background: radial-gradient(closest-side, rgba(150, 175, 195, .38), transparent); animation-delay: -7s; }
.blob-c { width: 60vw; height: 60vw; left: 18vw; bottom: -26vw; background: radial-gradient(closest-side, rgba(165, 195, 160, .34), transparent); animation-delay: -14s; }
@keyframes drift { to { transform: translate(6vw, -4vw) scale(1.08); } }
.grid { position: absolute; inset: 0; background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px); background-size: 56px 56px; opacity: .22; mask-image: radial-gradient(circle at 50% 40%, #000, transparent 78%); }
.ghost { position: fixed; z-index: -1; top: 34vh; left: 0; font: 700 34vw/1 var(--sans); letter-spacing: .02em; white-space: nowrap; color: transparent; -webkit-text-stroke: 2px var(--ghost); pointer-events: none; will-change: transform; transition: -webkit-text-stroke-color .6s; }
.scroll-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; }
.scroll-bar span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--green); }
body[data-mood="green"] .scroll-bar span { background: #fff; }

/* Nav */
.nav { position: sticky; top: 14px; z-index: 20; margin: 14px auto 0; width: min(1180px, calc(100% - 32px)); height: 60px; padding: 0 10px 0 22px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--rule); border-radius: 30px; background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: background .6s, border-color .6s; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--soft); transition: color .2s; }
.nav nav a:hover { color: var(--fg); }
.nav .nav-cta { color: var(--bg); background: var(--fg); padding: 9px 18px; border-radius: 22px; font-weight: 600; transition: transform .3s var(--ease); }
.nav .nav-cta:hover { color: var(--bg); transform: scale(1.04); }

/* Shared */
section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 120px 0; }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head p:last-child:not(.eyebrow) { color: var(--soft); margin-top: 14px; font-size: 19px; }
h2 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; }
h2 em { font-size: 1.1em; }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 500 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin-bottom: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 26px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform .3s var(--ease), box-shadow .3s, background .3s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-solid { background: var(--green); color: #fff; box-shadow: 0 10px 28px rgba(30, 158, 88, .3); }
.btn-ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--rule); }
.btn-lg { min-height: 60px; padding: 0 34px; font-size: 19px; border-radius: 30px; }
.reveal { opacity: 0; filter: blur(12px); transform: translateY(26px); transition: opacity .8s var(--ease), filter .8s var(--ease), transform .8s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.in { opacity: 1; filter: none; transform: none; }

/* Hero */
.hero { min-height: calc(100vh - 74px); padding: 56px 0 72px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; align-items: center; }
h1 { font-size: clamp(56px, 8.4vw, 116px); font-weight: 700; letter-spacing: -.045em; line-height: .98; }
h1 em { font-size: 1.1em; color: #58d594; }
.lede { max-width: 540px; margin-top: 26px; color: var(--soft); font-size: 21px; line-height: 1.42; }
.hero-form { display: flex; gap: 8px; max-width: 610px; margin-top: 34px; padding: 8px; background: rgba(255, 255, 255, .09); border: 1px solid var(--rule); border-radius: 34px; transition: border-color .3s, box-shadow .3s; }
.hero-form:focus-within { border-color: #58d594; box-shadow: 0 0 0 5px rgba(88, 213, 148, .14); }
.hero-form input { flex: 1; min-width: 0; padding: 0 18px; border: 0; background: none; outline: none; font-size: 18px; }
.hero-form input::placeholder { color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { border: 1px solid var(--rule); background: transparent; color: var(--soft); padding: 8px 15px; border-radius: 20px; font-size: 14px; transition: color .2s, border-color .2s, background .2s, transform .3s var(--ease); }
.chip:hover { color: var(--fg); border-color: var(--fg); transform: translateY(-2px); }
.hero-stage { position: relative; display: flex; justify-content: center; perspective: 1200px; }
.phone { position: relative; width: min(330px, 74vw); aspect-ratio: 9 / 16; border-radius: 42px; padding: 9px; background: #0a0908; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16), 0 40px 90px rgba(0, 0, 0, .42); transition: transform .5s var(--ease); transform-style: preserve-3d; }
.phone video { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 34px; background: #111; }
.phone-sm { width: min(286px, 72vw); }
.sound-toggle { position: absolute; right: 22px; bottom: 22px; padding: 7px 13px; border: 0; border-radius: 16px; background: rgba(20, 18, 16, .78); color: #fff; font: 500 12px var(--mono); backdrop-filter: blur(6px); }
.sound-toggle[aria-pressed="true"] { background: var(--green); }
.float-card { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: #fff; color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); font-size: 14px; will-change: transform; transition: transform .25s ease-out; }
.float-card .mono { color: var(--muted); font-size: 11px; }
/* These sit over the empty top and bottom of the phone, so they never cover the reel's headline or cards. */
.float-a { left: -4%; top: -3%; }
.float-b { right: -6%; bottom: 13%; }
.float-c { left: -6%; bottom: 3%; flex-direction: row; align-items: center; gap: 9px; }
.check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; }

/* Templates */
.template-explorer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 72px; align-items: center; }
.template-tabs { display: flex; flex-direction: column; gap: 14px; }
.template-tab { display: block; width: 100%; text-align: left; padding: 28px 30px; border: 1.5px solid var(--rule); border-radius: 26px; background: transparent; transition: background .35s, box-shadow .35s, border-color .35s, transform .4s var(--ease); }
.template-tab:hover { transform: translateX(6px); }
.template-tab[aria-selected="true"] { background: var(--card); color: var(--ink); border-color: transparent; box-shadow: var(--shadow); }
.template-tab h3 { font-size: 30px; letter-spacing: -.025em; line-height: 1.1; }
.template-tab p { margin-top: 8px; color: var(--muted); }
.template-tab .swatches { display: flex; gap: 6px; margin-top: 16px; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .15); }

/* How */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.steps li { padding: 24px 22px 30px; min-height: 280px; border: 1px solid var(--rule); border-radius: 24px; background: var(--panel); transition: transform .45s var(--ease), background .3s, color .3s; }
.steps li:hover { background: #fff; color: var(--ink); transform: translateY(-8px); }
.steps li:hover p { color: var(--muted); }
.steps .mono { color: #58d594; font-size: 14px; }
.steps li:hover .mono { color: var(--green); }
.steps h3 { font-size: 26px; letter-spacing: -.02em; margin: 54px 0 10px; }
.steps p { color: var(--soft); font-size: 15px; line-height: 1.45; }

/* Studio */
.notice { margin-bottom: 26px; padding: 18px 22px; border-radius: 18px; background: #fbebcb; color: var(--ink); border: 1px solid #f2d79c; }
.notice code { font: 500 14px var(--mono); background: rgba(20, 18, 16, .08); padding: 2px 6px; border-radius: 6px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 48px; align-items: start; }
.studio-form { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 14px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
legend .mono { color: var(--green); margin-right: 8px; font-size: 13px; }
.idea-box { position: relative; background: var(--card); border-radius: 24px; box-shadow: var(--shadow); transition: box-shadow .3s; }
.idea-box:focus-within { box-shadow: 0 0 0 3px var(--green), var(--shadow); }
textarea { display: block; width: 100%; padding: 22px 24px 38px; border: 0; border-radius: 24px; outline: none; resize: vertical; background: transparent; color: var(--ink); font-size: 20px; line-height: 1.35; }
.counter { position: absolute; right: 18px; bottom: 12px; color: var(--muted); font-size: 11px; }
.template-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option-card { display: block; height: 100%; padding: 18px 20px; background: var(--card); color: var(--ink); border-radius: 20px; box-shadow: 0 0 0 1.5px var(--line); transition: box-shadow .25s, transform .35s var(--ease); }
.option:hover .option-card { transform: translateY(-3px); }
.option input:checked + .option-card { box-shadow: 0 0 0 3px var(--green), var(--shadow); }
.option input:focus-visible + .option-card { outline: 3px solid var(--green); outline-offset: 3px; }
.option-card strong { display: block; font-size: 19px; letter-spacing: -.015em; }
.option-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.35; }
.segmented { display: inline-flex; padding: 5px; gap: 4px; background: rgba(20, 18, 16, .07); border-radius: 26px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 10px 26px; border-radius: 21px; font-weight: 600; transition: background .25s, color .25s, box-shadow .25s; }
.segmented input:checked + span { background: var(--ink); color: #fff; box-shadow: 0 5px 14px rgba(20, 18, 16, .22); }
.segmented input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.voice-options { display: grid; gap: 10px; }
.voice-row { position: relative; }
.voice-row .option-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-right: 76px; min-height: 76px; }
.voice-play { position: absolute; z-index: 2; right: 16px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; transition: scale .3s var(--ease), background .2s; }
.voice-play:hover { scale: 1.08; }
.voice-play.playing { background: var(--green); }
.model-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.model-options .price { display: block; margin-top: 8px; color: var(--green); font: 700 12px var(--mono); }
.avatar-options { display: flex; flex-wrap: wrap; gap: 14px; }
.avatar-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 104px; cursor: pointer; font-size: 13px; font-weight: 600; text-align: center; color: var(--soft); }
.avatar-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.avatar-option img, .avatar-upload span.circle { width: 88px; height: 88px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--line); transition: box-shadow .25s, transform .35s var(--ease); object-fit: cover; }
.avatar-option:hover img, .avatar-upload:hover span.circle { transform: translateY(-3px); }
.avatar-option input:checked + img { box-shadow: 0 0 0 4px var(--green), var(--shadow); }
.avatar-option input:checked ~ span { color: var(--fg); }
.avatar-option input:focus-visible + img { outline: 3px solid var(--green); outline-offset: 4px; }
.avatar-upload { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 104px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--soft); }
.avatar-upload span.circle { display: grid; place-items: center; background: transparent; box-shadow: none; border: 2px dashed var(--rule); font-size: 34px; font-weight: 400; color: var(--soft); }
.avatar-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.avatar-upload:focus-within span.circle { outline: 3px solid var(--green); outline-offset: 4px; }
.avatar-upload.busy span.circle { animation: spin 1.2s linear infinite; border-color: var(--green) transparent var(--green) var(--green); }
.avatar-hint { margin-top: 12px; color: var(--soft); font-size: 14px; }
/* Account */
.account { position: relative; display: flex; align-items: center; }
.nav nav .account-signin { color: var(--fg); font-weight: 600; }
.account-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: var(--green); color: #fff; font-weight: 700; box-shadow: 0 0 0 2px var(--rule); transition: box-shadow .2s, transform .3s var(--ease); }
.account-button:hover { transform: scale(1.06); box-shadow: 0 0 0 2px var(--green); }
.account-button img { width: 100%; height: 100%; object-fit: cover; }
.account-menu { position: absolute; right: 0; top: calc(100% + 12px); z-index: 40; min-width: 240px; padding: 16px; background: var(--card); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); animation: cardIn .35s var(--ease); }
.account-name { font-weight: 700; }
.account-email { color: var(--muted); font-size: 14px; margin-top: 2px; word-break: break-all; }
.account-signout { width: 100%; margin-top: 14px; padding: 10px 14px; border: 0; border-radius: 12px; background: #f0eeea; color: var(--ink); font-weight: 600; text-align: left; transition: background .2s; }
.account-signout:hover { background: #e4e1da; }

/* Sign-in page */
.signin-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 16px; }
.signin-card { width: min(440px, 100%); padding: 40px 34px 32px; background: var(--card); color: var(--ink); border-radius: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); text-align: center; animation: cardIn .7s var(--ease); }
.signin-avatar { display: block; margin: 0 auto 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--green); }
.signin-card h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.035em; }
.signin-card h1 em { color: var(--green); }
.signin-lede { margin-top: 12px; color: var(--muted); }
.signin-error { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: #fbebcb; font-size: 14px; line-height: 1.4; text-align: left; }
.google-button { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; height: 56px; border-radius: 28px; background: #fff; color: #1f1f1f; text-decoration: none; font: 600 17px var(--sans); box-shadow: 0 0 0 1.5px #dadce0; transition: box-shadow .2s, transform .3s var(--ease); }
.google-button:hover { box-shadow: 0 0 0 1.5px #1f1f1f, 0 8px 22px rgba(20, 18, 16, .12); transform: translateY(-2px); }
.google-button svg { width: 22px; height: 22px; }
.signin-fine { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* Studio page: compact, so the whole form fits in less scrolling */
.studio-page .studio { padding: 44px 0 72px; }
.studio-page .section-head { margin-bottom: 26px; }
.studio-page .studio-form { gap: 26px; }
.studio-page legend, .field-label { margin-bottom: 10px; font-size: 20px; }
.studio-page .chips { margin-top: 12px; }
.studio-page textarea { padding: 18px 22px 34px; font-size: 19px; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.field { min-width: 0; }
.field-label { display: block; font-weight: 700; letter-spacing: -.02em; }
.field-label .mono { color: var(--green); margin-right: 8px; font-size: 13px; }
.field-note { margin-top: 8px; color: var(--soft); font-size: 14px; line-height: 1.4; }
.avatar-hint { margin-top: -14px; }
.select-row { display: flex; gap: 10px; align-items: center; }
.select-row .select-wrap { flex: 1; min-width: 0; }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-wrap select { width: 100%; height: 56px; padding: 0 46px 0 18px; border: 0; border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line); font: 600 17px var(--sans); appearance: none; -webkit-appearance: none; cursor: pointer; transition: box-shadow .2s; }
.select-wrap select:hover { box-shadow: 0 0 0 1.5px var(--muted); }
.select-wrap select:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--green); }
.select-row .voice-play { position: static; translate: none; flex: none; width: 56px; height: 56px; }
.voice-play:disabled { opacity: .35; cursor: not-allowed; }
.studio-page .template-options .option-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.studio-page .avatar-options { gap: 10px; }
.studio-page .avatar-option, .studio-page .avatar-upload { width: 76px; }
.studio-page .avatar-option img, .studio-page .avatar-upload span.circle { width: 64px; height: 64px; }
.studio-page .avatar-upload span.circle { font-size: 26px; }

.demo-cta { position: relative; z-index: 2; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 14px 7px 10px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font: 700 13px var(--sans); transition: transform .3s var(--ease), background .2s; }
.demo-cta svg { width: 14px; height: 14px; }
.demo-cta:hover { background: var(--green); transform: translateY(-2px); }

.demo-dialog { padding: 0; border: 0; background: transparent; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: visible; }
.demo-dialog::backdrop { background: rgba(12, 11, 10, .72); backdrop-filter: blur(6px); }
.demo-dialog[open] { animation: cardIn .5s var(--ease); }
.demo-panel { width: min(400px, calc(100vw - 32px)); padding: 18px; background: var(--card); color: var(--ink); border-radius: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.demo-head h3 { font-size: 22px; letter-spacing: -.02em; }
.demo-head .mono { margin-top: 2px; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 13px; }
.demo-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f0eeea; color: var(--ink); transition: background .2s, transform .3s var(--ease); }
.demo-close:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }
.demo-close svg { width: 20px; height: 20px; }
.demo-panel video { display: block; width: 100%; max-height: calc(100vh - 140px); aspect-ratio: 9 / 16; object-fit: contain; border-radius: 18px; background: #111; }

.fresh-toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.fresh-toggle input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); }
.fresh-toggle strong { display: block; }
.fresh-toggle small { display: block; color: var(--soft); font-size: 14px; line-height: 1.4; }
.result-cost { margin-top: 4px; color: var(--green); text-transform: none; letter-spacing: 0; }
.form-error { color: var(--red); font-weight: 600; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.cost { color: var(--soft); max-width: 330px; line-height: 1.5; text-transform: none; letter-spacing: 0; }
.output { position: sticky; top: 96px; display: flex; justify-content: center; min-width: 0; }
.output-idle .tag { position: absolute; top: 24px; left: 50%; translate: -50% 0; padding: 5px 11px; border-radius: 13px; background: rgba(20, 18, 16, .75); color: #fff; font-size: 10px; white-space: nowrap; }

.progress-card, .result-card, .error-card { width: 100%; padding: 32px 28px; background: var(--card); color: var(--ink); border-radius: 30px; box-shadow: var(--shadow); text-align: center; animation: cardIn .7s var(--ease); }
@keyframes cardIn { from { opacity: 0; filter: blur(12px); transform: translateY(22px); } }
.ring-wrap { position: relative; width: 170px; height: 170px; margin: 0 auto 16px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track, .ring-fill { fill: none; stroke-width: 9; }
.ring-track { stroke: #ece9e2; }
.ring-fill { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .6s var(--ease); }
.ring-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 52px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ring-text small { font-size: 22px; margin: 12px 0 0 2px; color: var(--muted); }
.progress-card h3, .result-card h3, .error-card h3 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.eta { min-height: 18px; margin-top: 6px; color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; }
.step-list { list-style: none; margin: 22px 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; }
.step-list li { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; color: #a8a49b; font-size: 15px; transition: color .3s, background .3s; }
.step-list i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #dedad2; font-style: normal; font-size: 11px; }
.step-list li.active { color: var(--ink); background: #f3f1ec; font-weight: 600; }
.step-list li.active i { border-color: var(--green) transparent var(--green) var(--green); animation: spin .9s linear infinite; }
.step-list li.done { color: var(--ink); }
.step-list li.done i { background: var(--green); border-color: var(--green); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-card .phone { margin: 0 auto 22px; width: min(250px, 70vw); }
.result-card video { object-fit: contain; }
#resultMeta { margin-top: 6px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.result-warning { margin-top: 14px; padding: 10px 12px; background: #fbebcb; border-radius: 12px; font-size: 14px; }
.result-check { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.error-card p { margin: 10px 0 20px; color: var(--muted); }

/* Library */
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.reel-card { display: block; text-decoration: none; color: var(--ink); background: #fff; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); transition: transform .45s var(--ease); }
.reel-card:hover { transform: translateY(-8px); }
.reel-card video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #111; }
.reel-card div { padding: 14px 16px 18px; }
.reel-card strong { display: block; line-height: 1.25; letter-spacing: -.01em; }
.reel-card span { display: block; margin-top: 5px; color: var(--muted); font: 500 12px var(--mono); }

.footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 44px 0 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--rule); color: var(--soft); font-size: 15px; }
.footer .brand { color: var(--fg); }

@media (max-width: 980px) {
  .nav nav a:not(.nav-cta) { display: none; }
  section { padding: 80px 0; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 44px; }
  .hero-stage { margin-top: 12px; }
  .template-explorer, .studio-grid { grid-template-columns: 1fr; gap: 40px; }
  .field-pair { grid-template-columns: 1fr; }
  .avatar-hint { margin-top: -10px; }
  .template-explorer .phone { margin: 0 auto; }
  .output { position: static; }
  .steps { grid-template-columns: 1fr; }
  .steps li { min-height: 0; }
  .steps h3 { margin-top: 16px; }
}
@media (max-width: 560px) {
  .nav { padding-left: 16px; }
  .nav .nav-cta { white-space: nowrap; padding: 8px 14px; font-size: 14px; }
  .hero > * { min-width: 0; }
  .hero-form { max-width: 100%; }
  .eyebrow { flex-wrap: wrap; }
  .float-a { left: 0; }
  .float-b { right: 0; }
  .float-c { left: 2%; }
  .hero-form { flex-direction: column; border-radius: 28px; }
  .hero-form input { min-height: 48px; }
  .template-options, .model-options { grid-template-columns: 1fr; }
  .segmented { display: flex; }
  .segmented label { flex: 1; text-align: center; }
  .segmented span { padding: 10px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; filter: none; transform: none; }
}
