:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --line: #e7e3dc;
  --line-strong: #d3cec4;
  --ink: #1a1a1d;
  --ink-2: #3b3b42;
  --muted: #62626b;
  --faint: #8e8e97;
  --orange: #ff5a1f;
  --orange-hover: #ff6d38;
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

/* ---------- Nav ---------- */

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 40px 20px;
}
.logo {
  justify-self: start;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 24px; letter-spacing: -0.5px;
}
.links { display: flex; align-items: center; gap: 24px; margin-top: 18px; }
.links a, .nav-model { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.links a { transition: color .15s; }
.links a:hover { color: var(--ink); }
.divider { width: 1px; height: 15px; background: var(--line-strong); }
.nav-model { color: var(--muted); }
.nav-right { justify-self: end; }
.cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 10px 16px; }
.cta svg { transition: transform .15s; }
.cta:hover svg { transform: translateX(2px); }

.btn-orange {
  background: var(--orange); color: #fff; border: 0;
  font-weight: 600; font-size: 15px;
  padding: 11px 18px; border-radius: 10px; cursor: pointer;
  transition: background .15s, opacity .2s;
}
.btn-orange:hover:not(:disabled) { background: var(--orange-hover); }
.btn-orange:disabled { opacity: .4; cursor: not-allowed; }
.btn-orange.wide { width: 100%; padding: 14px; font-size: 16px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 88px 24px 70px;
}
.glow {
  position: absolute; z-index: -1;
  top: 160px; left: 50%; transform: translateX(-50%);
  width: 820px; height: 340px; max-width: 100vw;
  background: radial-gradient(ellipse at center, rgba(255, 90, 31, .13), rgba(255, 90, 31, .04) 45%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
h1 {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.18;
  margin: 0 0 16px;
}
.tagline { color: var(--muted); font-size: 16px; line-height: 1.75; margin: 0 0 32px; }

.prompt {
  width: 100%; max-width: 660px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px 12px 20px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 20px 60px -24px rgba(255, 90, 31, .35);
  transition: border-color .15s;
}
.prompt:focus-within { border-color: var(--line-strong); }
.prompt textarea {
  width: 100%; min-height: 48px; max-height: 300px;
  resize: none; border: 0; outline: 0; background: transparent;
  color: var(--ink); font: 400 15px/1.55 Inter, system-ui, sans-serif;
}
.prompt textarea::placeholder { color: var(--faint); }
.prompt-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.count { font-size: 13px; color: var(--faint); }
.prompt-actions { display: flex; align-items: center; gap: 10px; }

.prompt-bar { gap: 10px; }
.prompt-bar .prompt-actions { margin-left: auto; }
.format-toggle { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; }
.format-toggle .seg-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 99px; cursor: pointer;
  transition: background .15s, color .15s;
}
.format-toggle .seg-btn:hover { color: var(--ink); }
.format-toggle .seg-btn.active { background: var(--surface); color: var(--orange); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.add-wrap { position: relative; display: inline-flex; }
.add-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.add-btn:hover, .add-btn:focus-visible { border-color: var(--orange); color: var(--orange); background: rgba(255, 90, 31, .06); }
.add-btn:disabled { opacity: .4; cursor: not-allowed; }
.tooltip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap;
  padding: 6px 10px; border-radius: 7px;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.add-wrap:hover .tooltip, .add-btn:focus-visible + .tooltip { opacity: 1; transform: translate(-50%, 0); }

.attachments { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 8px; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-label {
  position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 600;
  background: rgba(0, 0, 0, .6); color: #fff; padding: 1px 5px; border-radius: 5px;
}
.thumb-remove {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0;
}
.thumb-remove:hover { background: #000; }
.model-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 7px 11px; border-radius: 99px;
}
.model-chip svg { color: var(--orange); }
.voice-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 4px 6px 4px 11px; border-radius: 99px;
}
.voice-chip[hidden] { display: none; }
.voice-chip svg { color: var(--orange); flex: none; }
.voice-chip select { font: inherit; color: inherit; background: none; border: 0; outline: 0; cursor: pointer; max-width: 150px; padding: 3px 0; }
.voice-preview { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--surface); color: var(--orange); font-size: 9px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.voice-preview:hover:not(:disabled) { background: var(--orange); color: #fff; }
.voice-preview:disabled { opacity: .5; cursor: not-allowed; }
.send {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--orange); color: #fff; cursor: pointer;
  transition: background .15s, opacity .2s, transform .1s;
}
.send:hover:not(:disabled) { background: var(--orange-hover); transform: translateX(1px); }
.send:disabled { opacity: .35; cursor: not-allowed; }

.status { min-height: 22px; font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.status.error { color: #d93025; }
.status.loading::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 9px; vertical-align: -1px;
  border: 2px solid var(--line-strong); border-top-color: var(--orange); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tiles { display: flex; gap: 26px; margin-top: 14px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer;
}
.tile-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: border-color .15s, background .15s;
}
.tile:hover .tile-icon { border-color: var(--line-strong); background: var(--surface-2); }
.tile.active { color: var(--ink); }
.tile.active .tile-icon { border-color: var(--orange); background: rgba(255, 90, 31, .08); color: var(--orange); }

.examples { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.examples-label {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--faint); font-size: 14px; cursor: pointer;
}
.examples-label:hover { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; }
.chip {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 9px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--line-strong); background: var(--surface-2); }

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

.player { max-width: 1100px; margin: 0 auto; padding: 0 24px 80px; scroll-margin-top: 24px; }
.player-card {
  display: grid; grid-template-columns: minmax(0, auto) minmax(280px, 1fr); gap: 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px;
}
.stage {
  position: relative; background: #000; border-radius: 14px; overflow: hidden;
  aspect-ratio: 9 / 16; height: min(72vh, 680px);
}
.stage.landscape { aspect-ratio: 16 / 9; height: auto; width: min(640px, 100%); }
.stage canvas { width: 100%; height: 100%; display: block; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 14px; background: var(--surface-2); }

.player-side { display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.player-side h2 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.video-meta { color: var(--muted); margin: -6px 0 8px; font-size: 14px; }
.controls { display: flex; align-items: center; gap: 12px; }
.play {
  width: 36px; height: 36px; flex: none; border-radius: 8px;
  background: transparent; border: 1px solid transparent; color: var(--ink); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.play:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line); }
.play:disabled { opacity: .35; cursor: not-allowed; }
input[type="range"] { flex: 1; accent-color: var(--orange); }
.time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.export-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.export-bar div { height: 100%; width: 0; background: var(--orange); transition: width .2s linear; }
.hint { font-size: 13px; color: var(--faint); margin: 0; line-height: 1.5; }

/* ---------- How it works ---------- */

.how {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  max-width: 1100px; margin: 0 auto; padding: 20px 24px 100px;
}
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--surface); }
.step span { color: var(--orange); font-weight: 600; font-size: 13px; }
.step h3 { margin: 12px 0 8px; font-size: 18px; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* ---------- Marketing sections ---------- */

.demo-body {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px;
}
.demo-info { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.demo-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.demo-script { margin: 0 0 20px; font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
.demo-info .tiles { margin-top: 4px; }
.demo-stage {
  background: #000; border-radius: 16px; overflow: hidden;
  aspect-ratio: 9 / 16; height: 560px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35);
}
.demo-stage.landscape { aspect-ratio: 16 / 9; height: 315px; width: 560px; }
/* Demo player under the video: 1x · play · 00:01.99 / 00:18.00 */
.demo-media { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: none; }
@media (min-width: 761px) { .demo-media .demo-stage:not(.landscape) { height: 480px; } }
.demo-player { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font: 500 14px Inter, system-ui, sans-serif; }
.dp-speed, .dp-play {
  border: 0; background: none; cursor: pointer; color: var(--muted); padding: 6px 8px; border-radius: 8px;
  font: 500 14px Inter, system-ui, sans-serif; transition: background .15s, color .15s;
}
.dp-play { display: grid; place-items: center; color: var(--ink); }
.dp-speed:hover, .dp-play:hover { background: var(--surface-2); color: var(--ink); }
.dp-play .i-pause { display: none; }
.demo-player.playing .i-play { display: none; }
.demo-player.playing .i-pause { display: block; }
.dp-time { font-variant-numeric: tabular-nums; color: var(--faint); }
.dp-time b { color: var(--ink); font-weight: 600; }
.demo-stage video { cursor: pointer; }
/* Demo stats under the prompt */
.demo-stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start;
  margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--line); width: 100%;
}
.demo-stat { display: flex; flex-direction: column; gap: 6px; padding: 0 28px; border-left: 1px solid var(--line); }
.demo-stat:first-child { padding-left: 0; border-left: 0; }
.demo-stat span { font-size: 13px; font-weight: 500; color: var(--muted); }
.demo-stat b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
/* Demo: prompt on the left, video on the right */
@media (min-width: 761px) {
  .demo-body { flex-direction: row; align-items: flex-start; justify-content: center; gap: 56px; padding: 44px 48px; }
  .demo-info { align-items: flex-start; text-align: left; max-width: 440px; flex: 1; }
  .demo-stage { flex: none; }
}
.demo-prompt {
  margin: 0 0 18px; font-size: 21px; line-height: 1.55; font-weight: 500; color: var(--ink); letter-spacing: -0.01em;
  padding-left: 16px; border-left: 3px solid var(--orange);
}
.demo-stage canvas, .demo-stage video { width: 100%; height: 100%; display: block; object-fit: cover; }
.demo-stage [hidden] { display: none; }

.section { max-width: 1100px; margin: 0 auto; padding: 80px 24px; scroll-margin-top: 16px; }
.section-head { text-align: center; margin-bottom: 44px; }
.eyebrow { color: var(--orange); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.section h2 { font-size: 44px; font-weight: 600; letter-spacing: -0.035em; margin: 10px 0 12px; line-height: 1.05; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }

.usecase-video { margin: 0 auto; width: fit-content; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.usecase-video video { display: block; max-width: 100%; max-height: 560px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .35); }
.usecase-video figcaption { color: var(--muted); font-size: 15px; }
/* Use cases: a row of vertical examples */
.usecase-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.usecase-grid .usecase-video { width: 100%; margin: 0; align-items: stretch; gap: 12px; }
.usecase-grid .usecase-video video { width: 100%; max-height: none; aspect-ratio: 9 / 16; object-fit: cover; cursor: pointer; }
.usecase-grid figcaption { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; line-height: 1.4; text-align: center; }
.usecase-grid figcaption b { color: var(--ink); font-weight: 600; font-size: 15px; }
@media (max-width: 900px) { .usecase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 90, 31, .09); color: var(--orange); margin-bottom: 18px; }
.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 20px; margin: 0; }
.quote blockquote { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; }
.who strong { display: block; font-size: 15px; font-weight: 600; }
.who span { font-size: 13px; color: var(--muted); }

.billing-toggle { display: flex; width: fit-content; margin: -12px auto 44px; padding: 5px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; box-shadow: 0 6px 20px -12px rgba(0,0,0,.18); }
.bill-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 18px; border-radius: 99px; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.bill-btn:hover { color: var(--ink); }
.bill-btn.active { background: var(--ink); color: #fff; }
.save-pill { background: rgba(255, 90, 31, .12); color: var(--orange); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.bill-btn.active .save-pill { background: var(--orange); color: #fff; }

.plans { --p-bg: var(--surface); --p-ink: var(--ink); --p-text: var(--ink-2); --p-muted: var(--muted); --p-line: var(--line); --p-tile: rgba(255, 90, 31, .1);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: center; }
.plan { background: var(--p-bg); color: var(--p-ink); border: 1px solid var(--p-line); border-radius: 24px; padding: 30px 28px 28px; display: flex; flex-direction: column; gap: 26px; position: relative; overflow: hidden; }
.plan.featured { --p-bg: #17171a; --p-ink: #fff; --p-text: #d6d6dc; --p-muted: #9a9aa3; --p-line: #2c2c31; --p-tile: rgba(255, 90, 31, .2);
  padding-block: 44px 36px; box-shadow: 0 40px 80px -40px rgba(23, 23, 26, .55); }
.plan.featured::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 320px; height: 320px; background: radial-gradient(circle, rgba(255, 90, 31, .45), transparent 65%); pointer-events: none; }
.plan-head { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 8px; padding-bottom: 26px; border-bottom: 1px dashed var(--p-line); }
.plan-badge { background: var(--orange); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 99px; }
.plan h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--p-muted); }
.plan-prices { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.per-min { font-size: 24px; font-weight: 500; color: var(--p-muted); }
.per-min b { font-size: 52px; font-weight: 650; color: var(--p-ink); letter-spacing: -0.04em; line-height: 1; }
.per-min small { font-size: 15px; font-weight: 500; color: var(--p-muted); }
.per-month { font-size: 13px; font-weight: 600; color: var(--p-text); border: 1px solid var(--p-line); padding: 5px 11px; border-radius: 99px; }
.per-month b { font-weight: 700; }
.features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; font-size: 15px; color: var(--p-text); }
.features li { display: flex; align-items: center; gap: 12px; }
.soon-pill { margin-left: auto; flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: var(--p-tile); color: var(--orange); }
.plans-note { margin: 22px auto 0; max-width: 640px; text-align: center; font-size: 13px; color: var(--muted); }
.features svg { box-sizing: content-box; width: 16px; height: 16px; padding: 7px; border-radius: 9px; background: var(--p-tile); color: var(--orange); }
.features svg, .plan-cta svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plan-cta svg { width: 18px; height: 18px; transition: transform .15s; }
.plan-cta { margin-top: auto; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; font-size: 16px; border: 1px solid transparent; border-radius: 99px; }
.plan-cta.btn-light { background: transparent; border-color: var(--line-strong); }
.plan-cta.btn-light:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan-cta:hover svg { transform: translateX(3px); }
.btn-light { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: 16px; padding: 14px; border-radius: 10px; cursor: pointer; width: 100%; }
.btn-light:hover { border-color: var(--line-strong); }

.footer { border-top: 1px solid var(--line); padding: 28px 40px; display: flex; justify-content: space-between; color: var(--faint); font-size: 14px; max-width: 1400px; margin: 0 auto; }

@media (max-width: 860px) {
  .nav { padding: 16px; grid-template-columns: 1fr auto; }
  .links { display: none; }
  .hero { padding: 64px 16px 56px; }
  .tagline { font-size: 16px; margin-bottom: 32px; }
  .tiles { gap: 22px; }
  .player { padding: 0 16px 56px; }
  .player-card { grid-template-columns: 1fr; padding: 16px; }
  .stage { height: auto; width: 100%; max-width: 380px; margin: 0 auto; }
  .stage.landscape { max-width: none; }
  .how { grid-template-columns: 1fr; padding: 0 16px 64px; }
  .section { padding: 56px 16px; }
  .cards, .quotes, .plans { grid-template-columns: 1fr; }
  .demo-body { padding: 20px; gap: 22px; }
  .demo-stage { height: auto; width: min(100%, 320px); margin: 0 auto; }
  .demo-stage.landscape { width: 100%; height: auto; }
  .section h2 { font-size: 32px; }
  .footer { padding: 24px 16px; }
}

/* ---------- Background stick figures (hero decoration) ---------- */

/* page-wide layer; app.js repeats the .bg-figures band down the full page height */
body { position: relative; }
.bg-layer { position: absolute; top: 0; left: 0; width: 100%; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-figures { position: absolute; left: 0; right: 0; height: 720px; }
.bg-figures.mirror { transform: scaleX(-1); }
.fig {
  position: absolute;
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .13;
  animation: fig-float 6s ease-in-out infinite;
}
.fig .head { fill: var(--ink); stroke: none; }
.fig .accent { stroke: var(--orange); }
.fig .accent-fill { fill: var(--orange); stroke: none; }
.fig-wave  { width: 92px;  left: 7%;  top: 70px; }
.fig-think { width: 128px; left: 3%;  top: 330px; animation-delay: -2s; }
.fig-walk  { width: 88px;  left: 15%; top: 450px; animation-delay: -4s; }
.fig-cheer { width: 104px; right: 7%; top: 60px; animation: fig-jump 2.4s ease-in-out infinite; }
.fig-chart { width: 168px; right: 3%; top: 330px; animation-delay: -3s; }
.fig-phone { width: 104px; right: 15%; top: 450px; animation-delay: -1s; }

.arm-wave { transform-origin: 50px 50px; animation: fig-wave 1.6s ease-in-out infinite; }
.bulb { animation: fig-glow 3s ease-in-out infinite; }
.star { transform-origin: 98px 26px; animation: fig-spin 6s linear infinite; }
.bars rect { transform-box: fill-box; transform-origin: bottom; animation: fig-grow 4s ease-in-out infinite; }
.bars .b2 { animation-delay: .2s; }
.bars .b3 { animation-delay: .4s; }
.phone { animation: fig-glow 2.5s ease-in-out infinite; }

@keyframes fig-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fig-jump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } 60% { transform: translateY(-14px); } }
@keyframes fig-wave { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-22deg); } }
@keyframes fig-glow { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes fig-spin { to { transform: rotate(360deg); } }
@keyframes fig-grow { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.6); } }

/* doodle objects share the figure style */
.doodle {
  position: absolute;
  fill: none;
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .12;
  animation: fig-float 7s ease-in-out infinite;
}
.doodle .accent { stroke: var(--orange); }
.doodle .accent-fill { fill: var(--orange); stroke: none; }
.doodle .dash { stroke-dasharray: 2 9; }
.d-plane    { width: 84px;  left: 21%; top: 30px;  animation: d-fly 9s ease-in-out infinite; }
.d-rocket   { width: 52px;  right: 22%; top: 24px; animation: d-rocket 4s ease-in-out infinite; }
.d-cloud-l  { width: 110px; left: 1%;  top: 215px; animation: d-drift 14s ease-in-out infinite; }
.d-cloud-r  { width: 92px;  right: 17%; top: 205px; animation: d-drift 12s ease-in-out infinite reverse; }
.d-play     { width: 62px;  right: 1.5%; top: 195px; }
.d-clapper  { width: 70px;  left: 3%;  top: 500px; animation-delay: -2s; }
.d-mega     { width: 74px;  left: 19%; top: 375px; animation-delay: -3s; }
.d-bubble   { width: 74px;  left: 14%; top: 250px; animation-delay: -1s; }
.d-heart    { width: 44px;  right: 23%; top: 520px; animation: d-beat 1.6s ease-in-out infinite; opacity: .2; }
.d-coin     { width: 50px;  right: 22%; top: 330px; animation: d-flip 5s ease-in-out infinite; }
.d-clock    { width: 54px;  right: 4%;  top: 505px; }
.d-clock .hand { transform-origin: 40px 40px; animation: fig-spin 8s linear infinite; }
.d-bubble .dot1, .d-bubble .dot2, .d-bubble .dot3 { fill: var(--ink); stroke: none; animation: fig-glow 1.2s ease-in-out infinite; }
.d-bubble .dot2 { animation-delay: .2s; }
.d-bubble .dot3 { animation-delay: .4s; }
.d-rocket .flame { animation: fig-glow .5s ease-in-out infinite; }
.spark { opacity: .35; animation: d-twinkle 2.6s ease-in-out infinite; }
.s1 { width: 18px; left: 18%; top: 140px; }
.s2 { width: 22px; right: 18%; top: 130px; animation-delay: -1s; }
.s3 { width: 16px; left: 24%; top: 520px; animation-delay: -1.8s; }
.s4 { width: 14px; right: 29%; top: 615px; animation-delay: -.6s; }

@keyframes d-fly { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(18px, -12px) rotate(4deg); } }
@keyframes d-rocket { 0%, 100% { transform: translateY(0) rotate(12deg); } 50% { transform: translateY(-14px) rotate(12deg); } }
@keyframes d-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(26px); } }
@keyframes d-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } }
@keyframes d-flip { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.2); } }
@keyframes d-twinkle { 0%, 100% { transform: scale(.6) rotate(0deg); opacity: .15; } 50% { transform: scale(1) rotate(45deg); opacity: .45; } }

@media (max-width: 1100px) { .fig-walk, .fig-phone, .d-mega, .d-coin, .d-heart, .d-bubble, .d-cloud-r, .spark { display: none; } }
@media (max-width: 860px) { .bg-layer { display: none; } }
@media (prefers-reduced-motion: reduce) { .fig, .fig * { animation: none !important; } }
#demo { padding-top: 32px; }

/* ---------- Showcase strip (scrolling thumbnails under the hero) ---------- */

.showcase { position: relative; padding: 8px 0 24px; overflow: hidden; }
.marquee {
  overflow: hidden; padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.track { display: flex; gap: var(--gap); padding-right: var(--gap); width: max-content; animation: marquee 70s linear infinite; }

.showcase { --row-h: 340px; --gap: 16px; }
.thumb-group, .thumb-stack { display: flex; gap: var(--gap); flex: none; }
.thumb-stack { flex-direction: column; }
.thumb-card {
  position: relative; flex: none;
  border-radius: 16px; overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .45);
}
.thumb-card.v { height: var(--row-h); aspect-ratio: 9 / 16; }
.thumb-card.h { height: calc((var(--row-h) - var(--gap)) / 2); aspect-ratio: 16 / 9; }
.thumb-card.h .thumb-placeholder { font-size: 13px; }
.thumb-card.h .thumb-placeholder svg { width: 26px; height: 26px; }
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; }
.thumb-card::after { /* subtle placeholder texture */
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 12px, transparent 12px 24px);
}
.thumb-placeholder { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.thumb-placeholder svg { opacity: .85; }

@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 860px) {
  .showcase { --row-h: 240px; --gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .track { animation: none; } }

/* ---------- Testimonials: result screenshots ---------- */

.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.result-card {
  margin: 0; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .35);
}
.result-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-card.result-empty { display: grid; place-items: center; border: 1.5px dashed var(--line-strong); background: var(--surface-2); box-shadow: none; }
.result-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 15px; text-align: center; padding: 16px; }
.result-placeholder svg { color: var(--orange); }
.result-placeholder small { font-weight: 400; font-size: 13px; color: var(--faint); }

@media (max-width: 860px) { .results { grid-template-columns: 1fr 1fr; gap: 10px; } }
@media (max-width: 520px) { .results { grid-template-columns: 1fr; } }


/* ---------- Logged-in view (mock) ---------- */

body:not(.in-app) [data-app] { display: none !important; }
body.in-app [data-landing] { display: none !important; }
body:not(.view-videos) #projects { display: none !important; }
body.view-videos .studio, body.view-videos .editor { display: none !important; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 10;
  width: 240px; padding: 28px 16px 20px;
  display: flex; flex-direction: column; gap: 28px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar .logo { padding: 0 10px; }
.side-links { display: flex; flex-direction: column; gap: 4px; }
.side-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.side-links a:hover { background: var(--surface-2); color: var(--ink); }
.side-links a.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.side-links a.active svg { color: var(--orange); }

.user { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.credits-card {
  padding: 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.credits-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-tag { font-size: 11px; font-weight: 600; color: var(--orange); background: rgba(255, 90, 31, .08); border: 1px solid rgba(255, 90, 31, .25); border-radius: 6px; padding: 2px 7px; }
.credits-count { margin: 10px 0 8px; font-size: 12px; color: var(--muted); }
.credits-count b { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.credits-bar { height: 4px; border-radius: 99px; background: rgba(255, 90, 31, .12); overflow: hidden; margin-bottom: 14px; }
.credits-bar span { display: block; height: 100%; background: var(--orange); border-radius: inherit; }
.upgrade-btn {
  width: 100%; padding: 9px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 600;
  transition: background .15s;
}
.upgrade-btn:hover { background: var(--ink-2); }

.user-row { display: flex; align-items: center; gap: 10px; padding: 14px 4px 0; border-top: 1px solid var(--line); }
.avatar {
  flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 13px;
}
.user-id { display: flex; flex-direction: column; min-width: 0; }
.user-id b { font-size: 13px; font-weight: 600; }
.user-id span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-actions { display: flex; margin-left: auto; }
.user-actions button {
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.user-actions button:hover { background: var(--surface-2); color: var(--ink); }

body.in-app main { margin-left: 240px; }
body.in-app .footer { display: none; }

/* Narrow screens: the sidebar becomes a top bar. */
@media (max-width: 760px) {
  .sidebar { position: sticky; top: 0; inset: auto; width: auto; flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .logo { padding: 0; font-size: 20px; }
  .side-links { flex-direction: row; gap: 2px; }
  .side-links a { padding: 8px; font-size: 0; }
  .user { margin: 0 0 0 auto; }
  .credits-card, .user-id, .user-actions button:not(#logoutBtn) { display: none; }
  .user-row { padding: 0; border: 0; }
  body.in-app main { margin-left: 0; }
}

.projects { max-width: 1100px; margin: 0 auto; padding: 56px 24px 60px; }
.section-head.left { text-align: left; margin-bottom: 16px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.project { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.project img {
  width: 100%; aspect-ratio: 9 / 12; object-fit: cover; border-radius: 14px;
  border: 1px solid var(--line); margin-bottom: 6px; transition: transform .15s;
}
.project:hover img { transform: translateY(-2px); }
.p-title { font-size: 14px; font-weight: 600; }
.p-meta { font-size: 12px; color: var(--muted); }

/* ---------- Studio (logged-in Create view) ---------- */

.studio {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start;
  max-width: 1240px; margin: 0 auto; padding: 48px 40px 64px;
}
.studio-head h1 { font-size: 30px; letter-spacing: -0.03em; margin: 0 0 6px; }
.studio-head p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.studio-form { display: flex; flex-direction: column; gap: 22px; }

.length-pill {
  display: flex; width: fit-content; gap: 2px; padding: 3px; margin: 0 auto;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px;
}
.len-opt {
  border: 0; border-radius: 99px; padding: 7px 16px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
  transition: background .15s, color .15s;
}
.len-opt:hover { color: var(--ink); }
.len-opt.active { background: var(--orange); color: #fff; }

.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: -8px; }
.mode-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 4px 2px 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; cursor: pointer; text-align: left;
  font-size: 14px; font-weight: 600; color: var(--muted); transition: color .15s, border-color .15s;
}
.mode-opt small { font-size: 12px; font-weight: 400; color: var(--faint); }
.mode-opt:hover { color: var(--ink); }
.mode-opt.active { color: var(--ink); border-bottom-color: var(--orange); }

.scene-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.scene-card {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .15s;
}
.scene-card:focus-within { border-color: var(--orange); }
.scene-top { display: flex; align-items: center; gap: 8px; }
.scene-num { margin-right: auto; }
.scene-secs {
  display: flex; align-items: center; gap: 5px; cursor: text;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px;
  color: var(--faint); transition: border-color .15s;
}
.scene-secs:focus-within { border-color: var(--orange); color: var(--orange); }
.scene-secs.invalid { border-color: #d93025; color: #d93025; }
.scene-secs input {
  width: 74px; border: 0; outline: 0; background: transparent; padding: 0;
  font: 500 12px Inter, system-ui, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums;
}
.scene-secs input::placeholder { color: var(--faint); }
.scene-num { font-size: 12px; font-weight: 600; color: var(--orange); }
.scene-del {
  width: 24px; height: 24px; border: 0; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--faint); font-size: 18px; line-height: 1;
}
.scene-del:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.scene-del:disabled { opacity: .3; cursor: not-allowed; }
.scene-text, .scene-note {
  width: 100%; border: 0; outline: 0; background: transparent; resize: vertical;
  color: var(--ink); font: 400 14px/1.55 Inter, system-ui, sans-serif;
}
.scene-note { font-size: 13px; color: var(--ink-2); padding-top: 8px; border-top: 1px dashed var(--line); }
.scene-text::placeholder, .scene-note::placeholder { color: var(--faint); }
.add-scene {
  padding: 11px; border-radius: 12px; cursor: pointer;
  background: transparent; border: 1px dashed var(--line-strong); color: var(--muted);
  font-size: 13px; font-weight: 600; transition: border-color .15s, color .15s;
}
.add-scene:hover { border-color: var(--orange); color: var(--orange); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.field-label .req { font-size: 11px; font-weight: 600; color: var(--orange); }
.field-label .opt { font-size: 12px; font-weight: 400; color: var(--faint); }
.field-hint { font-size: 12px; color: var(--faint); margin: 0; }

.studio #script {
  width: 100%; min-height: 160px; max-height: 360px; resize: vertical;
  padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); outline: 0;
  color: var(--ink); font: 400 14px/1.6 Inter, system-ui, sans-serif;
  transition: border-color .15s, box-shadow .15s;
}
.studio #script:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 90, 31, .12); }
.studio #script::placeholder { color: var(--faint); }

/* No voices on the server means no voiceover field. */
.voice-field:has(#voiceChip[hidden]) { display: none; }
.studio .voice-chip {
  display: flex; padding: 8px 8px 8px 14px; border-radius: 12px;
  background: var(--surface); font-size: 14px; font-weight: 500;
}
.studio .voice-chip select { flex: 1; max-width: none; }


.studio-footer { padding-top: 18px; border-top: 1px solid var(--line); }
.studio-footer .status { margin: 0 0 10px; min-height: 0; }
.studio-footer .status:empty { display: none; }

/* Preview: the player only shows once there's a video in it (no empty "Your video will appear here" box). */
.studio-preview { position: sticky; top: 24px; }
.studio .player { max-width: none; margin: 0; padding: 0; }
.studio .player-card { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
.studio .stage { height: min(64vh, 620px); margin: 0 auto; }
.studio .stage.landscape { height: auto; width: 100%; }
.studio .player-side { gap: 12px; }
.studio .player-side h2 { font-size: 18px; }

@media (max-width: 1000px) {
  .studio { grid-template-columns: 1fr; padding: 32px 20px 48px; }
  .studio-preview { position: static; }
}

/* ---------- Editor (timeline + inspector) ---------- */

/* The Create tab shows either the setup form (.studio) or, once a video exists, the editor. */
body.in-app:not(.editing) .editor { display: none !important; }
body.editing .studio { display: none !important; }

.editor { max-width: 1240px; margin: 0 auto; padding: 28px 40px 72px; }
.editor-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.back-btn {
  padding: 6px 12px; border-radius: 6px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  font: 500 13px Inter, system-ui, sans-serif; transition: border-color .15s, color .15s;
}
.back-btn:hover { border-color: var(--line-strong); color: var(--ink); }
.ed-status { font-size: 13px; color: var(--muted); }
.ed-status.error { color: #d93025; }
.ed-status.loading::before {
  content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid var(--line-strong); border-top-color: var(--orange); border-radius: 50%;
  animation: spin .8s linear infinite;
}
.editor-body { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }

/* Player inside the editor: video on top, controls right under it. */
.editor .player { max-width: none; margin: 0; padding: 0; }
.editor .player-card { grid-template-columns: 1fr; gap: 14px; padding: 16px; border-radius: 12px; }
.editor .stage { border-radius: 8px; }
.editor .stage { height: min(58vh, 560px); margin: 0 auto; }
.editor .stage.landscape { height: auto; width: min(860px, 100%); }
.editor .player-side { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 20px; }
.editor .player-side h2 { font-size: 16px; font-weight: 600; }
.editor .video-meta { margin: 0; grid-column: 1; }
.editor .controls { grid-column: 1 / -1; grid-row: 3; }
.editor #export { grid-column: 2; grid-row: 1 / 3; width: auto; padding: 11px 20px; font-size: 14px; }
.editor .export-bar, .editor .hint { grid-column: 1 / -1; }

.strip-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.strip-head h3 { font-size: 11px; font-weight: 600; margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.strip-head span { font-size: 12px; color: var(--muted); }
.scene-strip { display: flex; gap: 12px; overflow-x: scroll; padding: 2px 2px 10px; scroll-snap-type: x proximity; }
.strip-card {
  flex: none; width: 168px; display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start;
  padding: 6px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s;
}
.strip-card.landscape { width: 240px; }
.strip-card.playing .strip-info b::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--orange); vertical-align: 1px; }
.strip-card.selected { border-color: var(--ink); }
.strip-thumb { display: block; padding: 0; border: 0; border-radius: 5px; overflow: hidden; cursor: pointer; background: #000; }
.strip-thumb canvas { display: block; width: 100%; height: auto; }
.strip-info { display: flex; justify-content: space-between; font-size: 12px; padding: 0 2px; }
.strip-info b { font-weight: 600; }
.strip-info span { color: var(--faint); font-variant-numeric: tabular-nums; }
.strip-text {
  margin: 0; padding: 0 2px; font-size: 11px; line-height: 1.4; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.strip-regen, .strip-go, .strip-cancel {
  border-radius: 6px; padding: 6px 10px; cursor: pointer;
  font: 500 12px Inter, system-ui, sans-serif; transition: background .15s, border-color .15s, color .15s;
}
.strip-regen { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.strip-regen:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.strip-go { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
.strip-go:hover { background: var(--ink-2); }
.strip-regen:disabled { opacity: .45; cursor: not-allowed; }
.strip-cancel { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.strip-ask { display: flex; flex-direction: column; gap: 6px; }
.strip-ask textarea {
  width: 100%; padding: 6px 8px; border-radius: 6px; resize: vertical; outline: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 400 12px/1.4 Inter, system-ui, sans-serif;
}
.strip-ask textarea:focus { border-color: var(--ink-2); }
.strip-ask div { display: flex; gap: 6px; }
.strip-ask div button { flex: 1; }

.timeline {
  overflow-x: scroll; padding: 10px 12px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.tl-inner { position: relative; cursor: pointer; }
.tl-ruler { position: relative; height: 18px; margin-bottom: 6px; }
.tl-ruler span {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums;
}
.tl-ruler span:first-child { transform: none; }
.tl-track { display: flex; gap: 2px; height: 52px; }
.tl-clip {
  position: relative; flex-basis: 0; min-width: 34px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
  padding: 5px 8px 5px 10px; border-radius: 5px; cursor: pointer; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
  font: 500 11px/1.3 Inter, system-ui, sans-serif; transition: border-color .15s, background .15s;
}
.tl-clip::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--clip-bg); opacity: .8; }
.tl-clip:hover { border-color: var(--line-strong); }
.tl-clip.playing { background: var(--surface); }
.tl-clip.selected { border-color: var(--ink); }
.tl-num { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.tl-dur { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tl-playhead {
  position: absolute; top: 18px; bottom: -4px; width: 2px; margin-left: -1px;
  background: var(--orange); pointer-events: none;
}
.tl-playhead::before { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }

.inspector { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; }
.insp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.insp-head b { font-size: 14px; font-weight: 600; margin-right: 10px; }
.insp-head span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.insp-actions { display: flex; gap: 6px; }
.insp-actions button {
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  font: 500 12px Inter, system-ui, sans-serif; transition: border-color .15s, color .15s, background .15s;
}
.insp-actions button:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.insp-actions button:disabled { opacity: .35; cursor: not-allowed; }
.insp-actions [data-act="del"]:hover:not(:disabled) { border-color: #d93025; color: #d93025; }

.insp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.insp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.insp-field.wide { grid-column: span 2; }
.insp-field.wider { grid-column: span 3; }
.insp-field > span { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.insp-field small { font-size: 11px; color: var(--faint); line-height: 1.4; }
.insp-field textarea, .insp-field input[type="text"], .insp-field input[type="number"], .insp-field select {
  width: 100%; padding: 7px 9px; border-radius: 6px; outline: 0;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font: 400 13px/1.5 Inter, system-ui, sans-serif; resize: vertical;
}
.insp-field :is(textarea, input, select):focus { border-color: var(--ink-2); }
.insp-field textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.insp-field input[type="color"] { width: 100%; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.insp-els { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

@media (max-width: 1000px) {
  .editor { padding: 0 20px 48px; }
  .insp-grid { grid-template-columns: 1fr 1fr; }
}

.test-btn {
  display: block; width: 100%; margin-top: 8px; padding: 8px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 0; color: var(--muted);
  font: 500 13px Inter, system-ui, sans-serif; transition: color .15s, background .15s;
}
.test-btn:hover { background: var(--surface-2); color: var(--ink); }

/* Inside the app the homepage doodles sit behind the main area (right of the sidebar), a touch fainter. */
body.in-app .bg-layer { left: 240px; width: calc(100% - 240px); }
body.in-app .fig { opacity: .09; }
body.in-app .doodle { opacity: .08; }
@media (max-width: 760px) { body.in-app .bg-layer { left: 0; width: 100%; } }

.tl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }

/* Calmer player controls in the editor. */
.editor .play {
  width: 34px; height: 34px; font-size: 11px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
}
.editor .play:hover:not(:disabled) { background: var(--surface-2); }
.editor .hint { font-size: 12px; }

.insp-apply { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.insp-apply button {
  flex: none; padding: 7px 14px; border-radius: 6px; cursor: pointer; border: 0;
  background: var(--orange); color: #fff; font: 600 12px Inter, system-ui, sans-serif; transition: background .15s, opacity .15s;
}
.insp-apply button:hover:not(:disabled) { background: var(--orange-hover); }
.insp-apply button:disabled { opacity: .4; cursor: not-allowed; }

.strip-card { cursor: pointer; }
.strip-card:hover:not(.selected) { border-color: var(--line-strong); }
.strip-regen, .strip-ask { margin-top: auto; }
.strip-regen + .strip-ask { margin-top: 0; }

/* Slim orange scrollbars for the timeline and the scene strip.
   Chrome/Edge use the ::-webkit-scrollbar rules (no end arrows); only Firefox gets the standard properties,
   because setting them in Chrome switches it back to the default bar with arrows. */
@supports (-moz-appearance: none) {
  .timeline, .scene-strip { scrollbar-width: thin; scrollbar-color: var(--orange) transparent; }
}
.timeline::-webkit-scrollbar, .scene-strip::-webkit-scrollbar { height: 8px; }
/* One small rounded chevron at each end (Chrome/Edge). */
.timeline::-webkit-scrollbar-button, .scene-strip::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.timeline::-webkit-scrollbar-button:horizontal:start:decrement, .scene-strip::-webkit-scrollbar-button:horizontal:start:decrement,
.timeline::-webkit-scrollbar-button:horizontal:end:increment, .scene-strip::-webkit-scrollbar-button:horizontal:end:increment {
  display: block; width: 16px; height: 8px; border-radius: 99px;
  background: no-repeat center / 9px 9px;
}
.timeline::-webkit-scrollbar-button:horizontal:start:decrement, .scene-strip::-webkit-scrollbar-button:horizontal:start:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M6.3 2.2 3.5 5l2.8 2.8' fill='none' stroke='%23FF5A1F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.timeline::-webkit-scrollbar-button:horizontal:end:increment, .scene-strip::-webkit-scrollbar-button:horizontal:end:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3.7 2.2 6.5 5 3.7 7.8' fill='none' stroke='%23FF5A1F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.timeline::-webkit-scrollbar-button:horizontal:hover, .scene-strip::-webkit-scrollbar-button:horizontal:hover { background-color: rgba(255, 90, 31, .12); }
.timeline::-webkit-scrollbar-track, .scene-strip::-webkit-scrollbar-track { background: transparent; margin: 0 4px; }
.timeline::-webkit-scrollbar-thumb, .scene-strip::-webkit-scrollbar-thumb {
  background: var(--orange); border-radius: 99px;
  border: 2px solid transparent; background-clip: padding-box;
}
.timeline::-webkit-scrollbar-thumb:hover, .scene-strip::-webkit-scrollbar-thumb:hover { background-color: var(--orange-hover); }
.scene-strip { padding-bottom: 12px; }

/* Inspector, plain version: one text box, length and Regenerate beside it. */
.inspector .insp-head { margin-bottom: 12px; }
.insp-actions button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; }
.insp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.insp-row textarea {
  width: 100%; min-height: 72px; padding: 10px 12px; border-radius: 8px; resize: vertical; outline: 0;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font: 400 14px/1.5 Inter, system-ui, sans-serif; transition: border-color .15s;
}
.insp-row textarea:focus { border-color: var(--ink-2); }
.insp-row textarea::placeholder { color: var(--faint); }
.insp-side { display: flex; flex-direction: column; gap: 8px; width: 132px; }
.len-field {
  display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 36px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: text;
}
.len-field:focus-within { border-color: var(--ink-2); }
.len-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0;
  font: 500 14px Inter, system-ui, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums;
}
.len-field span { font-size: 12px; color: var(--faint); }
.insp-side [data-f="apply"] {
  flex: 1; min-height: 36px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--orange); color: #fff; font: 600 13px Inter, system-ui, sans-serif; transition: background .15s, opacity .15s;
}
.insp-side [data-f="apply"]:hover:not(:disabled) { background: var(--orange-hover); }
.insp-side [data-f="apply"]:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 640px) {
  .insp-row { grid-template-columns: 1fr; }
  .insp-side { width: auto; flex-direction: row; }
}

/* ---------- Editor workspace: icon rail + panel on the left, player in the middle ---------- */

.editor { max-width: 1400px; padding: 20px 28px 64px; }
.editor-head { gap: 16px; }
.ed-title { display: flex; flex-direction: column; min-width: 0; }
.ed-title b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-title span { font-size: 12px; color: var(--muted); }
.editor-head .ed-status { flex: 1; min-width: 0; }
.ed-download { flex: none; padding: 9px 18px; font-size: 14px; }

.ed-workspace {
  display: grid; grid-template-columns: 68px 300px minmax(0, 1fr);
  height: min(74vh, 720px); min-height: 460px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.ed-rail { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--bg); }
.ed-rail button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 0 7px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
  font: 500 10px Inter, system-ui, sans-serif; transition: background .15s, color .15s;
}
.ed-rail button:hover { color: var(--ink); background: var(--surface-2); }
.ed-rail button.active { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.ed-rail button.active svg { color: var(--orange); }

.ed-panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.ed-panel-head { padding: 14px 16px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
.ed-panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; scrollbar-width: thin; }

/* Scene panel (the inspector, stacked to fit the narrow column) */
.ed-panel .inspector { border: 0; padding: 0; background: none; border-radius: 0; }
.ed-panel .insp-row { grid-template-columns: 1fr; }
.ed-panel .insp-row textarea { min-height: 110px; }
.ed-panel .insp-side { width: auto; flex-direction: row; }
.ed-panel .len-field { width: 110px; flex: none; }

/* Captions panel */
#captionPanel { display: flex; flex-direction: column; gap: 12px; }
.cap-body { display: flex; flex-direction: column; gap: 10px; }
.cap-card {
  display: flex; flex-direction: column; gap: 8px; padding: 8px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s;
}
.cap-card:hover { border-color: var(--line-strong); }
.cap-card.active { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.cap-preview {
  display: block; padding: 18px 12px; border-radius: 6px; background: #22252b; text-align: center;
  font: 800 15px/1.45 Montserrat, sans-serif; color: #fff;
}
.cap-preview i { font-style: normal; border-radius: 4px; padding: 0 4px; }
.cap-preview em { font: 500 13px Inter, sans-serif; color: #9a9da5; font-style: normal; }
.cap-karaoke, .cap-pop, .cap-outline { text-transform: uppercase; font-weight: 900; }
.cap-karaoke { -webkit-text-stroke: 1px #000; paint-order: stroke fill; }
.cap-karaoke b, .cap-karaoke i { color: #FFE14D; }
.cap-neon { color: #B9F6FF; text-shadow: 0 0 6px #22D3EE, 0 0 14px #22D3EE; }
.cap-neon i { color: #FF4FD8; text-shadow: 0 0 6px #FF4FD8, 0 0 14px #FF4FD8; }
.cap-typewriter { font-family: "Courier New", Courier, monospace; font-weight: 700; font-size: 14px; }
.cap-typewriter span { background: rgba(0,0,0,.82); padding: 3px 6px; border-radius: 3px; }
.cap-typewriter u { display: inline-block; width: 2px; height: 15px; margin-left: 3px; vertical-align: -2px; background: #fff; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cap-pop { font-size: 24px; -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; }
.cap-subtitle { font: 600 12px/1.45 Inter, sans-serif; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.cap-outline { color: transparent; -webkit-text-stroke: 1px #fff; }
.cap-outline b { color: #fff; }
.cap-outline i { color: #FF5A1F; -webkit-text-stroke: 0; }
.cap-name { display: flex; align-items: center; gap: 8px; padding: 0 2px; font-size: 13px; font-weight: 600; color: var(--ink); }
.cap-name small { font-size: 10px; font-weight: 600; color: var(--orange); background: rgba(255, 90, 31, .1); padding: 2px 6px; border-radius: 4px; }

/* Voice panel */
.panel-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.panel-select {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font: 400 14px Inter, system-ui, sans-serif; color: var(--ink); outline: 0;
}
.panel-select:focus { border-color: var(--ink-2); }
.panel-btn {
  width: 100%; margin-top: 10px; padding: 9px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--orange); color: #fff; font: 600 13px Inter, system-ui, sans-serif; transition: background .15s, opacity .15s;
}
.panel-btn:hover:not(:disabled) { background: var(--orange-hover); }
.panel-btn:disabled { opacity: .4; cursor: not-allowed; }
.panel-note { font-size: 12px; line-height: 1.5; color: var(--muted); margin: 12px 0 0; }

/* Player in the middle of the workspace */
.editor .editor-stage { min-height: 0; display: flex; padding: 18px; background: var(--surface-2); }
.editor .player { width: 100%; height: 100%; }
.editor .player-card {
  height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: transparent; border: 0; padding: 0; border-radius: 0;
}
.editor .stage { flex: 1 1 auto; min-height: 0; height: auto; width: auto; max-width: 100%; aspect-ratio: 9 / 16; margin: 0; }
.editor .stage.landscape { flex: 0 1 auto; width: 100%; height: auto; max-height: 100%; aspect-ratio: 16 / 9; }
.editor .player-side { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 640px; flex: none; }
.editor .player-side h2, .editor .video-meta, .editor #export { display: none; }
.editor .controls { grid-column: auto; grid-row: auto; }
.editor .hint { margin: 0; text-align: center; }
.editor .export-bar[hidden] + .hint { display: none; }

@media (max-width: 1000px) {
  .ed-workspace { grid-template-columns: 60px minmax(0, 1fr); height: auto; }
  .ed-panel { border-right: 0; }
  .editor .editor-stage { grid-column: 1 / -1; height: 70vh; border-top: 1px solid var(--line); }
}

/* ---------- Full-screen editor: it takes over the whole window, no framed box ---------- */

body.editing { overflow: hidden; }
body.editing .editor {
  position: fixed; inset: 0; z-index: 40;
  max-width: none; margin: 0; padding: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--bg);
}
body.editing .editor-head {
  margin: 0; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
body.editing .ed-workspace {
  height: auto; min-height: 0; border: 0; border-radius: 0; background: var(--surface);
}
body.editing .editor-body {
  margin: 0; padding: 10px 16px 12px; gap: 8px;
  background: var(--surface); border-top: 1px solid var(--line);
}
body.editing .timeline { border-radius: 8px; padding: 8px 10px 10px; }
body.editing .strip-head { margin-top: 0; }

/* Compact scene cards so the timeline area stays short */
body.editing .strip-card { width: 116px; padding: 5px; gap: 4px; }
body.editing .strip-card.landscape { width: 190px; }
body.editing .strip-thumb canvas { aspect-ratio: 9 / 16; max-height: 130px; width: auto; margin: 0 auto; }
body.editing .strip-card.landscape .strip-thumb canvas { aspect-ratio: 16 / 9; max-height: 96px; }
body.editing .strip-text { -webkit-line-clamp: 1; }
body.editing .strip-regen { padding: 5px 8px; font-size: 11px; }

@media (max-width: 1000px) {
  body.editing .editor { display: block; overflow-y: auto; }
}
body.editing .strip-thumb { background: var(--surface-2); }

/* Left rail + panel run the full height; the right side is player on top, timeline and scenes below. */
.ed-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ed-main .editor-stage { flex: 1 1 auto; }
body.editing .ed-main .editor-body { flex: none; }
@media (max-width: 1000px) {
  .ed-main { grid-column: 1 / -1; }
  .ed-main .editor-stage { height: 70vh; flex: none; }
}
/* Shorter windows: smaller scene thumbnails so the video keeps most of the height. */
body.editing .strip-thumb canvas { max-height: min(130px, 13vh); }
body.editing .strip-card.landscape .strip-thumb canvas { max-height: min(96px, 10vh); }
body.editing .strip-card { width: 112px; }
body.editing .editor-body { padding-top: 8px; padding-bottom: 8px; }
body.editing .strip-head span { display: none; }

/* Player buttons use icons now */
.play { display: grid; place-items: center; }
.play svg { margin-left: 1px; }
.speed-btn { display: none; }

/* Editor transport: speed · play · clock, centred, like a video editor */
body.in-app .controls { justify-content: center; gap: 18px; }
body.in-app #scrub { display: none; }
body.in-app .speed-btn {
  display: block; min-width: 52px; padding: 6px 10px; border-radius: 6px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  font: 500 13px Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; transition: background .15s, color .15s;
}
body.in-app .speed-btn:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }
.editor .play {
  width: 36px; height: 36px; border-radius: 8px;
  background: transparent; border: 1px solid transparent; color: var(--ink);
}
.editor .play:hover:not(:disabled) { background: var(--surface); border-color: var(--line); }
body.in-app .time { min-width: 150px; font-size: 13px; color: var(--muted); }
body.in-app .time b { color: var(--ink); font-weight: 600; }

/* Captions panel tabs + caption text list */
.cap-tabs { display: flex; gap: 4px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.cap-tabs button {
  flex: 1; padding: 6px 0; border: 0; border-radius: 6px; cursor: pointer; background: transparent;
  font: 500 13px Inter, system-ui, sans-serif; color: var(--muted); transition: background .15s, color .15s;
}
.cap-tabs button:hover { color: var(--ink); }
.cap-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.cap-line {
  display: flex; flex-direction: column; gap: 8px; padding: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s;
}
.cap-line:hover { border-color: var(--line-strong); }
.cap-line.playing { border-color: var(--orange); background: rgba(255, 90, 31, .04); }
.cap-line-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cap-line textarea {
  width: 100%; padding: 8px 10px; border-radius: 6px; resize: vertical; outline: 0;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  font: 500 14px/1.5 Inter, system-ui, sans-serif; transition: border-color .15s;
}
.cap-line textarea:focus { border-color: var(--orange); background: var(--surface); }

/* Setup preview: everything under the video centred */
.studio .player-side { align-items: center; text-align: center; gap: 10px; }
.studio .player-side h2 { margin: 0; }
.studio .video-meta { margin: -4px 0 0; }
.studio .controls { width: 100%; }
.studio #export { width: auto; min-width: 220px; padding: 11px 28px; font-size: 15px; }
body.in-app .export-bar[hidden] + .hint { display: none; }
.studio .export-bar { width: 100%; max-width: 320px; }

/* ---------- Support bubble ---------- */

.support { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.support-bubble {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--orange); color: #fff;
  box-shadow: 0 6px 20px -6px rgba(255, 90, 31, .6), 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform .15s, background .15s;
}
.support-bubble:hover { background: var(--orange-hover); transform: translateY(-1px); }
.support-bubble .icon-close, .support-bubble.open .icon-chat { display: none; }
.support-bubble.open .icon-close { display: block; }

.support-panel {
  width: min(340px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 110px)); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .25);
  animation: support-in .16s ease-out;
}
@keyframes support-in { from { opacity: 0; transform: translateY(6px); } }
.support-head { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.support-head b { font-size: 15px; }
.support-head span { font-size: 13px; color: var(--muted); }
.support-body { display: flex; flex-direction: column; padding: 8px 18px 18px; }
.support-body details { border-bottom: 1px solid var(--line); }
.support-body summary {
  padding: 11px 0; cursor: pointer; list-style: none; font-size: 13px; font-weight: 500; color: var(--ink);
  display: flex; justify-content: space-between; gap: 10px;
}
.support-body summary::-webkit-details-marker { display: none; }
.support-body summary::after { content: "+"; color: var(--faint); font-weight: 400; }
.support-body details[open] summary::after { content: "–"; }
.support-body details p { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.support-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.support-form label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.support-form textarea {
  width: 100%; padding: 9px 11px; border-radius: 8px; resize: vertical; outline: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 400 13px/1.5 Inter, system-ui, sans-serif;
}
.support-form textarea:focus { border-color: var(--orange); }
.support-form .btn-orange { padding: 9px; font-size: 14px; }
.support-note { margin: 0; font-size: 12px; color: var(--muted); }
.support-note:empty { display: none; }

/* In the editor the bubble sits above the bottom strip's edge */
body.editing .support { bottom: 16px; right: 16px; }
/* No title until a video exists */
.player-side h2:empty, .video-meta:empty { display: none; }

/* Help bubble under the One shot tab */
.mode-tip {
  position: relative; align-self: flex-start; display: flex; align-items: center; gap: 8px;
  margin-top: 4px; padding: 8px 12px; border-radius: 8px;
  background: rgba(255, 90, 31, .07); border: 1px solid rgba(255, 90, 31, .22);
  font-size: 13px; color: var(--ink-2);
}
.mode-tip svg { flex: none; color: var(--orange); }
.mode-tip::before {
  content: ""; position: absolute; top: -6px; left: 28px; width: 10px; height: 10px; transform: rotate(45deg);
  background: #FAEDE6; border-left: 1px solid rgba(255, 90, 31, .22); border-top: 1px solid rgba(255, 90, 31, .22);
}

/* ---------- Download progress overlay ---------- */

.dl-overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px;
  background: rgba(26, 26, 29, .35); backdrop-filter: blur(2px);
  animation: dl-fade .15s ease-out;
}
@keyframes dl-fade { from { opacity: 0; } }
.dl-card {
  width: min(380px, 100%); padding: 24px; border-radius: 14px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .35);
}
.dl-icon {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 90, 31, .1); color: var(--orange);
}
.dl-arrow { animation: dl-bob 1.2s ease-in-out infinite; }
@keyframes dl-bob { 50% { transform: translateY(2px); } }
.dl-check, .dl-overlay.done .dl-arrow { display: none; }
.dl-overlay.done .dl-check { display: block; }
.dl-overlay.done .dl-icon { background: rgba(29, 158, 117, .12); color: #1d9e75; }
.dl-card h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.dl-card p { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.dl-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.dl-bar div { height: 100%; width: 0; border-radius: inherit; background: var(--orange); transition: width .2s linear; }
.dl-overlay.done .dl-bar div { background: #1d9e75; }
.dl-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-meta span:first-child { font-weight: 600; color: var(--ink); }
.dl-actions { display: flex; justify-content: center; margin-top: 18px; }
.dl-cancel {
  padding: 8px 18px; border-radius: 8px; cursor: pointer; background: transparent;
  border: 1px solid var(--line); color: var(--ink-2); font: 500 13px Inter, system-ui, sans-serif;
}
.dl-cancel:hover { border-color: var(--line-strong); background: var(--surface-2); }
.dl-done { padding: 9px 28px; font-size: 14px; }

/* Locked option (Long form for now) with a "Coming soon" tooltip on hover */
.len-opt.locked { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--faint); cursor: not-allowed; }
.len-opt.locked:hover { color: var(--faint); }
.len-opt.locked::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  padding: 5px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 500;
  opacity: 0; transition: opacity .15s, transform .15s;
}
.len-opt.locked::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translate(-50%, 4px);
  border: 5px solid transparent; border-top-color: var(--ink); border-bottom: 0;
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.len-opt.locked:hover::after, .len-opt.locked:hover::before,
.len-opt.locked:focus-visible::after, .len-opt.locked:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
/* Scene-by-scene tip spans the row so its pointer can sit under the right-hand tab */
.mode-tip.right { align-self: stretch; }
.mode-tip.right::before { left: calc(50% + 24px); }

/* ---------- Give the video more room in the editor ---------- */
body.editing .editor .editor-stage { padding: 12px 16px 8px; }
body.editing .editor .player-card { gap: 6px; }
body.editing .editor .controls { min-height: 36px; }
/* slimmer timeline */
body.editing .timeline { padding: 6px 10px 8px; }
body.editing .tl-ruler { height: 14px; margin-bottom: 4px; }
body.editing .tl-track { height: 40px; }
body.editing .tl-clip { padding: 3px 8px 3px 10px; gap: 1px; }
body.editing .tl-playhead { top: 14px; }
/* compact scene cards: thumbnail, name and length, regenerate */
body.editing .editor-body { gap: 6px; padding: 8px 16px; }
body.editing .strip-head { display: none; }
body.editing .strip-thumb canvas { max-height: min(92px, 10vh); }
body.editing .strip-card.landscape .strip-thumb canvas { max-height: min(64px, 7vh); }
body.editing .strip-card { width: 96px; }
body.editing .strip-card.landscape { width: 150px; }
body.editing .strip-text { display: none; }
body.editing .strip-info { font-size: 11px; }
body.editing .scene-strip { padding-bottom: 8px; }
/* Tighter transport row: speed, play and clock sit close together */
body.in-app .controls { gap: 4px; }
body.in-app .speed-btn { min-width: 0; padding: 6px 8px; }
body.in-app .time { min-width: 0; margin-left: 4px; }
/* Back to setup as a plain text link, no box */
.back-btn { background: transparent; border: 0; padding: 6px 4px; color: var(--muted); }
.back-btn:hover { background: transparent; color: var(--ink); }

/* My videos: saved covers + empty state */
.project canvas {
  width: 100%; aspect-ratio: 9 / 12; object-fit: cover; display: block; border-radius: 14px;
  border: 1px solid var(--line); margin-bottom: 6px; background: var(--surface-2); transition: transform .15s;
}
.project.landscape canvas { aspect-ratio: 16 / 9; }
.project:hover canvas { transform: translateY(-2px); }
.projects-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 56px 24px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted);
}
.projects-empty svg { color: var(--faint); margin-bottom: 4px; }
.projects-empty b { font-size: 16px; color: var(--ink); }
.projects-empty span { font-size: 14px; }
.projects-empty .btn-orange { margin-top: 12px; padding: 10px 20px; font-size: 14px; }
/* More breathing room between the editor's rail tools */
.ed-rail { gap: 24px; padding-top: 18px; }
.ed-rail button { padding: 13px 0 11px; gap: 7px; }

/* Live credit estimate under Generate */
.cost-line { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cost-line:empty { display: none; }
.cost-line b { color: var(--ink); font-weight: 600; }
.cost-line.short, .cost-line.short b { color: #d93025; }

/* One shot duration: a number box with − / + */
.dur-stepper {
  display: inline-flex; align-items: center; align-self: flex-start; height: 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  transition: border-color .15s;
}
.dur-stepper:focus-within { border-color: var(--orange); }
.dur-stepper.invalid { border-color: #d93025; }
.dur-stepper button {
  width: 40px; height: 100%; border: 0; cursor: pointer; background: var(--surface-2); color: var(--ink-2);
  font: 500 18px Inter, system-ui, sans-serif; transition: background .15s, color .15s;
}
.dur-stepper button:hover { background: var(--line); color: var(--ink); }
.dur-stepper input {
  width: 64px; height: 100%; border: 0; outline: 0; padding: 0 0 0 12px; background: transparent; text-align: right;
  font: 600 15px Inter, system-ui, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums;
}
.dur-stepper input::placeholder { color: var(--faint); font-weight: 500; }
.dur-unit { padding: 0 12px 0 6px; font-size: 13px; color: var(--faint); }

/* Detail level picker */
.detail-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.detail-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; text-align: left;
  border-radius: 10px; cursor: pointer; background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s, background .15s;
}
.detail-opt:hover { border-color: var(--line-strong); }
.detail-opt b { font-size: 14px; font-weight: 600; color: var(--ink); }
.detail-opt small { font-size: 12px; color: var(--faint); }
.detail-opt.active { border-color: var(--orange); background: rgba(255, 90, 31, .05); }
.detail-opt.active b { color: var(--orange); }
.detail-opt { border-radius: 0; }
.detail-tag { margin-top: 6px; padding: 2px 6px; font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.detail-tag.cheap { color: #1d7a5a; background: rgba(29, 158, 117, .1); }
.detail-tag.mid { color: #8a5a00; background: rgba(224, 161, 0, .14); }
.detail-tag.pricey { color: #c0392b; background: rgba(217, 48, 37, .09); }

/* Lite-planner toggle above Generate */
.model-toggle { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; cursor: pointer; user-select: none; }
.model-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.model-toggle .switch {
  position: relative; flex: none; width: 38px; height: 22px; border-radius: 99px;
  background: var(--line-strong); transition: background .15s;
}
.model-toggle .switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s;
}
.model-toggle input:checked + .switch { background: var(--orange); }
.model-toggle input:checked + .switch::after { transform: translateX(16px); }
.model-toggle input:focus-visible + .switch { outline: 2px solid var(--orange); outline-offset: 2px; }
.model-toggle .mt-text { display: flex; flex-direction: column; gap: 1px; }
.model-toggle b { font-size: 13px; font-weight: 600; color: var(--ink); }
.model-toggle small { font-size: 12px; color: var(--muted); }
.model-toggle.off { cursor: not-allowed; }
.model-toggle.off b { color: var(--faint); }

.cap-story { font: 800 14px/1.4 Inter, sans-serif; text-shadow: 0 2px 6px rgba(0,0,0,.9); }

.detail-model { font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }

/* ---------- Composer (script box with reference tile and chips) ---------- */

.composer {
  display: flex; gap: 18px; padding: 16px 18px 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: var(--line-strong); box-shadow: 0 6px 24px -14px rgba(255, 90, 31, .35); }

.ref-col { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 84px; }
.ref-tile {
  position: relative; width: 78px; height: 104px; border-radius: 12px; overflow: hidden; cursor: pointer;
  display: grid; place-items: center; padding: 0;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--faint);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 6px -2px rgba(0,0,0,.08);
  transition: border-color .15s, color .15s, transform .15s;
}
.ref-tile:hover { border-color: var(--line-strong); color: var(--ink-2); transform: translateY(-1px); }
.ref-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ref-tile.has-video .ref-icon { display: none; }
.ref-remove {
  position: absolute; top: -6px; right: -2px; width: 22px; height: 22px; border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer;
  font-size: 14px; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.ref-label { font-size: 12px; color: var(--muted); text-align: center; white-space: nowrap; }

.composer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.composer-label { font-size: 13px; color: var(--faint); margin-bottom: 4px; cursor: text; }
.studio .composer #script {
  min-height: 64px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent;
  font: 500 20px/1.4 Inter, system-ui, sans-serif; letter-spacing: -0.01em; color: var(--ink); resize: none;
}
.studio .composer #script:focus { box-shadow: none; border: 0; }
.studio .composer #script::placeholder { color: #B3B0AA; }

.composer-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-btn {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: 99px; cursor: pointer; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink); font: 600 13px Inter, system-ui, sans-serif; transition: background .15s, border-color .15s;
}
.chip-btn:hover { background: var(--line); }
.chip-btn svg { color: var(--muted); }
.chip-btn.set { border-color: rgba(255, 90, 31, .4); background: rgba(255, 90, 31, .07); }
.chip-btn.set svg { color: var(--orange); }
.chip-icon { width: 34px; padding: 0; justify-content: center; font-size: 18px; font-weight: 500; }
.chip-btn.locked { color: var(--faint); cursor: not-allowed; }
.chip-btn.locked:hover { background: var(--surface-2); }
.chip-btn.locked::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  padding: 5px 9px; border-radius: 6px; white-space: nowrap; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 500; opacity: 0; transition: opacity .15s, transform .15s;
}
.chip-btn.locked:hover::after { opacity: 1; transform: translate(-50%, 0); }

.chip-wrap { position: relative; }
.chip-pop {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; width: 280px;
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px -14px rgba(0,0,0,.25);
}
.chip-pop-title { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.chip-pop .field-hint { margin: 0; }

@media (max-width: 560px) {
  .composer { flex-direction: column; }
  .ref-col { flex-direction: row; width: auto; }
  .ref-tile { width: 56px; height: 72px; }
}

/* Detail chip popup: the three level cards stacked */
.detail-pop { width: 300px; }
.detail-pop .detail-pick { grid-template-columns: 1fr; gap: 6px; }
.detail-pop .detail-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px; row-gap: 1px; padding: 9px 12px; }
.detail-pop .detail-opt b { grid-column: 1; grid-row: 1; }
.detail-pop .detail-opt .detail-model { grid-column: 2; grid-row: 1; margin: 0; }
.detail-pop .detail-opt small { grid-column: 1 / 3; grid-row: 2; }
.detail-pop .detail-opt .detail-tag { grid-column: 3; grid-row: 1 / 3; margin: 0; }
.detail-pop { width: 340px; }
.detail-pop .detail-model { white-space: nowrap; }

/* Scene cards in the composer style; Scene 1 carries the reference and detail for all scenes */
.scene-card { flex-direction: row; gap: 16px; padding: 14px 16px; border-radius: 16px; }
.scene-card .scene-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.scene-card .composer-chips { margin-top: 4px; }
.scene-card.first .ref-tile { width: 72px; height: 96px; }
.scene-card .scene-text { font: 500 15px/1.5 Inter, system-ui, sans-serif; }
@media (max-width: 560px) {
  .scene-card.first { flex-direction: column; }
}

.ref-tile { background-size: cover; background-position: center; }

/* ---------- Studio mode ---------- */
.mode-tip.studio-tip { align-self: flex-start; }
.studio-progress {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
}
.sp-head { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sp-head b { flex: 1; font-weight: 600; color: var(--ink); }
.sp-head span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-spinner { width: 12px; height: 12px; border: 2px solid var(--line-strong); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
.sp-log { margin: 8px 0 0; padding-left: 22px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.studio-revise { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.studio-revise label { font-size: 13px; font-weight: 600; color: var(--ink); }
.studio-revise textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; resize: vertical; outline: 0;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 400 14px/1.5 Inter, system-ui, sans-serif;
}
.studio-revise textarea:focus { border-color: var(--orange); }
.studio-revise .btn-orange { align-self: flex-start; padding: 9px 18px; font-size: 14px; }
.studio-revise .btn-orange:disabled { opacity: .4; cursor: not-allowed; }
.studio-preview.showing-studio .player { display: none !important; }
.studio-result {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
}
.studio-result video { width: auto; max-width: 100%; height: min(64vh, 620px); border-radius: 14px; background: #000; }
.sr-info { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.sr-info b { font-size: 18px; }
.sr-info span { font-size: 13px; color: var(--muted); }
.sr-download { text-decoration: none; padding: 11px 28px; }
.project .p-cover { width: 100%; aspect-ratio: 9 / 12; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 6px; background: #000; display: block; }
.p-badge { font-style: normal; font-size: 10px; font-weight: 700; color: var(--orange); background: rgba(255, 90, 31, .1); padding: 1px 6px; border-radius: 4px; margin-left: 4px; vertical-align: 1px; }

/* Only one mode now: the tab row shows a single "One shot" tab */
.mode-tabs { grid-template-columns: 1fr; }

/* Style presets row */
.preset-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.preset-card {
  display: flex; flex-direction: column; gap: 4px; padding: 6px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.preset-card:hover { border-color: var(--line-strong); }
.preset-card.active { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.preset-thumb {
  display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden;
  color: rgba(255,255,255,.85); font-size: 20px;
}
.preset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-0 { background: linear-gradient(160deg, #2b2f3a, #121318); }
.pt-1 { background: linear-gradient(160deg, #ffb36b, #ff5a1f); }
.pt-2 { background: linear-gradient(160deg, #7cc6ff, #3a6bd6); }
.pt-3 { background: linear-gradient(160deg, #b9e5a7, #3c8d5a); }
.pt-4 { background: linear-gradient(160deg, #d6b4ff, #7a4fd6); }
.preset-name { font-size: 12px; font-weight: 600; color: var(--ink); padding: 0 2px; }
.preset-desc { font-size: 11px; color: var(--faint); padding: 0 2px; line-height: 1.3; }
.preset-ref { display: flex; }
.preset-ref .ref-col { width: 100%; gap: 6px; }
.preset-ref .ref-tile { width: 100%; height: auto; aspect-ratio: 3 / 4; border-style: dashed; }
.preset-ref .ref-label { font-size: 12px; font-weight: 600; color: var(--ink); white-space: normal; }
@media (max-width: 700px) { .preset-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Format slots */
.preset-card.placeholder { cursor: default; border-style: dashed; }
.preset-card.placeholder:hover { border-color: var(--line); }
.preset-card.placeholder .preset-thumb { opacity: .35; }
.preset-card.placeholder .preset-name { color: var(--muted); }
.format-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.format-save {
  padding: 7px 14px; border-radius: 8px; cursor: pointer; background: var(--surface);
  border: 1px solid var(--orange); color: var(--orange); font: 600 13px Inter, system-ui, sans-serif;
}
.format-save:hover:not(:disabled) { background: rgba(255, 90, 31, .06); }
.format-save:disabled { opacity: .5; cursor: wait; }
.format-note { font-size: 12px; color: var(--muted); }
.preset-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preset-card { align-self: start; }

/* No empty preview: the right column only appears once a One shot video exists */
.studio:not(.has-result) { grid-template-columns: minmax(0, 720px); justify-content: center; }
.studio:not(.has-result) .studio-preview { display: none; }

.preset-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.owner-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--ink); padding: 3px 7px; border-radius: 4px; }
.format-slot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.format-slot select { padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font: 600 13px Inter, system-ui, sans-serif; }

/* Preset preview pop-up */
.preset-modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 20, 24, .55); backdrop-filter: blur(3px); animation: dl-fade .15s ease-out;
}
.pm-card {
  position: relative; width: min(400px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; text-align: center;
  background: var(--surface); border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
}
.pm-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; z-index: 1;
  border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
}
.pm-media { width: 100%; }
.pm-media video, .pm-media img { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; background: #000; }
.pm-card b { font-size: 17px; margin-top: 4px; }
.pm-card p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.pm-use { width: 100%; padding: 12px; font-size: 15px; margin-top: 4px; }
.pm-use.using { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong); }
/* Preset card: preview area + "Use as reference" button */
.preset-open {
  display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.preset-card:has(.preset-open) { cursor: default; }
.preset-use {
  margin-top: 4px; padding: 6px 4px; border-radius: 7px; cursor: pointer;
  background: rgba(255, 90, 31, .08); border: 1px solid rgba(255, 90, 31, .35); color: var(--orange);
  font: 600 11px Inter, system-ui, sans-serif; transition: background .15s, color .15s;
}
/* bigger presets: three per row */
.preset-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.preset-card { padding: 8px; gap: 6px; border-radius: 14px; }
.preset-thumb { border-radius: 10px; }
.preset-open .preset-name { font-size: 15px; padding: 2px 2px 0; }
.preset-use { padding: 9px 6px; font-size: 13px; border-radius: 9px; }
.preset-ref .ref-label { font-size: 15px; }
@media (max-width: 700px) { .preset-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* equal-height cards so every "Use as reference" button lines up, even when a label wraps */
.preset-card:has(.preset-open) { align-self: stretch; }
.preset-card:has(.preset-open) .preset-use { margin-top: auto; }
.preset-open .preset-name { line-height: 1.3; text-align: center; }
.preset-use:hover { background: var(--orange); color: #fff; }
.preset-use.using { background: var(--orange); color: #fff; border-color: var(--orange); }

/* Preset carousel */
.pm-media { position: relative; }
.pm-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding-bottom: 3px;
}
.pm-nav:hover { background: rgba(0,0,0,.8); }
.pm-nav.prev { left: 8px; }
.pm-nav.next { right: 8px; }
.pm-dots { display: flex; gap: 7px; justify-content: center; min-height: 8px; }
.pm-dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--line-strong); cursor: pointer; }
.pm-dot.on { background: var(--orange); width: 22px; border-radius: 99px; }
.pm-dots:empty { display: none; }

/* Composer restyle: same layout, warmer card */
#scriptField .composer {
  gap: 20px; padding: 18px 20px 14px 18px; border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
  border: 1px solid rgba(255, 90, 31, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 30px -22px rgba(255, 90, 31, .55);
}
#scriptField .composer:focus-within {
  border-color: rgba(255, 90, 31, .55);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, .10), 0 14px 34px -20px rgba(255, 90, 31, .6);
}
#scriptField .ref-tile {
  border: 1.5px dashed rgba(255, 90, 31, .45); border-radius: 14px; box-shadow: none;
  background: rgba(255, 90, 31, .05); color: var(--orange);
}
#scriptField .ref-tile:hover { background: rgba(255, 90, 31, .1); border-color: var(--orange); color: var(--orange); }
#scriptField .ref-tile:not(.has-video)::after {
  content: "+"; position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--orange); color: #fff; font: 700 15px/20px Inter, system-ui, sans-serif; text-align: center;
}
#scriptField .ref-label { font-weight: 600; color: var(--ink-2); }
#scriptField .composer-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px;
}
.studio #scriptField .composer #script { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
#scriptField .composer-chips { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 90, 31, .12); }
#scriptField .chip-btn { background: #fff; border-color: rgba(255, 90, 31, .25); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
#scriptField .chip-btn svg { color: var(--orange); }
#scriptField .chip-btn:hover { background: rgba(255, 90, 31, .07); }

/* Homepage headlines: Poppins, heavy and tight, key word in orange */
.hero h1, .section h2 {
  font-family: Poppins, Inter, system-ui, sans-serif; font-weight: 600; letter-spacing: -0.025em;
}
.hero h1 { font-size: clamp(34px, 4.8vw, 58px); line-height: 1.04; margin-bottom: 18px; }
.section h2 { line-height: 1.06; }
.hero h1 .hl, .section h2 .hl { color: var(--orange); }

/* A chosen preset shown in the composer's reference spot */
.ref-tile.has-preset .ref-icon { display: none; }
#scriptField .ref-tile.has-preset { border-style: solid; border-color: var(--orange); background-size: cover; background-position: center; }
#scriptField .ref-tile.has-preset::after { display: none; }
#scriptField .ref-tile.has-preset + .ref-remove + .ref-label { color: var(--ink); }

/* ---------- One shot editor (Studio videos) ---------- */
.studio-result .sr-edit { padding: 11px 28px; }
.studio-result .sr-download { color: var(--muted); font-size: 13px; padding: 4px 8px; text-decoration: underline; text-underline-offset: 3px; }
.studio-result .sr-download:hover { color: var(--ink); }
body.editing-studio .ed-rail [data-panel="voice"] { display: none; }
.se-stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: var(--surface-2); }
.se-stage[hidden] { display: none; }
.se-frame { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.se-frame video { display: block; height: 100%; max-height: 100%; max-width: 100%; border-radius: 12px; background: #000; cursor: pointer; box-shadow: 0 20px 50px -30px rgba(0,0,0,.45); }
.se-busy {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; background: rgba(20, 20, 24, .62); color: #fff; text-align: center; padding: 16px;
}
.se-busy[hidden] { display: none; }
.se-busy .sp-spinner { width: 22px; height: 22px; border-width: 3px; border-color: rgba(255,255,255,.3); border-top-color: var(--orange); }
.se-busy b { font-size: 15px; }
.se-busy small { font-size: 12px; opacity: .8; max-width: 260px; }
.se-player { flex: none; }
.se-scene-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.se-scene-head b { font-size: 15px; color: var(--ink); }
.se-scene-head span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.se-sub { margin: 18px 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.se-list { margin-bottom: 12px; }
.se-list h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.se-list small { display: block; font-size: 11px; color: var(--faint); margin-bottom: 4px; }
.se-line { padding: 8px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color .15s; }
.se-line.changed { border-color: var(--orange); background: rgba(255, 90, 31, .04); }
.se-line textarea, .se-ask {
  width: 100%; box-sizing: border-box; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px;
  font: 500 13px/1.4 Inter, system-ui, sans-serif; color: var(--ink); background: var(--surface);
}
.se-line textarea:focus, .se-ask:focus { outline: none; border-color: var(--orange); }
.se-times { display: flex; gap: 8px; margin-bottom: 6px; }
.se-times label { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.se-times input { width: 62px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font: 500 12px Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.se-save {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 0 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0), var(--surface) 30%);
}
.se-save[hidden] { display: none; }
.se-save span { flex: 1; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.se-save .se-undo { border: 0; background: none; color: var(--muted); font: 500 12px Inter, system-ui, sans-serif; cursor: pointer; padding: 6px; }
.se-save .se-apply { padding: 8px 12px; font-size: 13px; }
.se-ai { width: 100%; margin-top: 10px; padding: 10px; }
.se-play-scene { width: 100%; }

/* Caption track on the One shot timeline */
.tl-caps[hidden] { display: none; }
.tl-caps { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.tl-caprow { position: relative; height: 26px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--surface-2) 0 2px, transparent 2px 12px), var(--surface-2); }
.tl-caprow-label {
  position: sticky; left: 0; z-index: 0; display: inline-block; padding: 0 6px; line-height: 26px;
  font-size: 10px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; pointer-events: none;
}
.tl-cap {
  position: absolute; top: 2px; bottom: 2px; z-index: 1; min-width: 6px; display: flex; align-items: center;
  border-radius: 5px; background: #fff4ec; border: 1px solid rgba(255, 90, 31, .45); color: var(--ink);
  cursor: grab; touch-action: none; user-select: none; overflow: hidden; box-sizing: border-box;
}
.tl-cap:active { cursor: grabbing; }
.tl-cap:hover { border-color: var(--orange); }
.tl-cap.playing { background: #ffe1cd; }
.tl-cap.changed { background: var(--orange); border-color: var(--orange); color: #fff; }
.tl-cap-t { flex: 1; min-width: 0; padding: 0 7px; font: 500 11px/1 Inter, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-cap-h { flex: none; width: 6px; align-self: stretch; cursor: ew-resize; }
.tl-cap-h:hover, .tl-cap:hover .tl-cap-h { background: rgba(255, 90, 31, .25); }
.tl-cap-edit {
  position: fixed; z-index: 60; width: 300px; transform: translateY(-100%); padding: 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -16px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 6px;
}
.tl-cap-edit small { font-size: 10px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.tl-cap-edit textarea { width: 100%; box-sizing: border-box; resize: none; border: 1px solid var(--orange); border-radius: 7px; padding: 6px 8px; font: 500 13px/1.4 Inter, system-ui, sans-serif; outline: none; }
.tl-cap-edit div { display: flex; align-items: center; justify-content: space-between; }
.tl-cap-edit span { font-size: 11px; color: var(--faint); }
.tl-cap-edit button { border: 0; border-radius: 7px; padding: 5px 12px; background: var(--orange); color: #fff; font: 600 12px Inter, system-ui, sans-serif; cursor: pointer; }
.se-cap-preview {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); max-width: 86%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none;
}
.se-cap-preview[hidden] { display: none; }
.se-cap-preview span { padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,.78); color: #fff; font: 700 18px/1.3 Inter, system-ui, sans-serif; text-align: center; }
.se-cap-preview em { font: 600 10px Inter, system-ui, sans-serif; font-style: normal; color: #fff; background: var(--orange); padding: 2px 7px; border-radius: 99px; }
.strip-head { display: flex; align-items: center; gap: 10px; }
.se-tl-save:empty { display: none; }
.se-tl-save .se-save { position: static; margin: 0; padding: 0; background: none; }
.se-tl-save .se-save span { flex: none; }
/* the free-save button sits in the editor's top bar */
.editor-head .se-tl-save { margin-left: auto; }
.editor-head .se-tl-save .se-save span { display: inline; font-size: 12px; color: var(--ink-2); }
.editor-head .se-tl-save + .ed-download { margin-left: 8px; }
.se-cap-preview span { font-size: 14px; padding: 5px 10px; }
/* Unsaved-words preview: a tidy strip under the video instead of text over it */
.se-cap-preview {
  position: static; transform: none; left: auto; bottom: auto; flex: none; max-width: min(560px, 100%);
  display: flex; flex-direction: row; align-items: center; gap: 8px; padding: 7px 12px;
  border-radius: 99px; background: var(--surface); border: 1px solid rgba(255, 90, 31, .35);
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.25); pointer-events: none;
}
.se-cap-preview i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.se-cap-preview b { flex: none; font: 700 11px Inter, system-ui, sans-serif; color: var(--orange); text-transform: uppercase; letter-spacing: .05em; }
.se-cap-preview span {
  min-width: 0; padding: 0; background: none; border-radius: 0; color: var(--ink);
  font: 500 13px/1.3 Inter, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.se-cap-preview em { flex: none; padding: 0; background: none; color: var(--faint); font: 500 11px Inter, system-ui, sans-serif; font-style: normal; }
/* thicker caption rows */
.tl-caprow { height: 38px; }
.tl-caprow-label { line-height: 38px; }
.tl-cap { top: 3px; bottom: 3px; border-radius: 6px; }
.tl-cap-t { font-size: 12px; padding: 0 9px; }
.tl-cap-h { width: 8px; }
.tl-caps { gap: 4px; margin-top: 6px; }

/* ---------- Sign in / create account ---------- */
.auth-modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 20, 24, .55); backdrop-filter: blur(4px); animation: dl-fade .15s ease-out;
}
.auth-modal[hidden] { display: none; }
.auth-card {
  position: relative; width: min(400px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 14px; padding: 28px 26px 22px;
  background: var(--surface); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
}
.auth-card .pm-close { background: var(--surface-2); color: var(--ink-2); }
.auth-logo { display: flex; align-items: center; gap: 8px; font: 700 18px Inter, system-ui, sans-serif; color: var(--ink); }
.auth-card h2 { margin: 6px 0 0; font: 600 24px/1.2 Poppins, Inter, system-ui, sans-serif; letter-spacing: -0.02em; color: var(--ink); }
.auth-sub { margin: -8px 0 4px; font-size: 14px; color: var(--muted); }
.auth-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink);
  font: 600 14px Inter, system-ui, sans-serif; transition: background .15s;
}
.auth-google:hover { background: var(--surface-2); }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: var(--faint); font-size: 12px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#authForm { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; font: 600 12px Inter, system-ui, sans-serif; color: var(--ink-2); }
.auth-field[hidden] { display: none; }
.auth-field input {
  padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  font: 500 14px Inter, system-ui, sans-serif; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.auth-field input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 90, 31, .12); }
.auth-link { border: 0; background: none; padding: 0; cursor: pointer; color: var(--orange); font: 600 13px Inter, system-ui, sans-serif; }
.auth-link:hover { text-decoration: underline; }
.auth-link[hidden] { display: none; }
.auth-forgot { align-self: flex-end; margin-top: -4px; font-size: 12px; }
.auth-msg { margin: 0; min-height: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.auth-msg:empty { display: none; }
.auth-msg.error { color: #d93025; }
.auth-msg.ok { color: #1a7f37; }
.auth-submit { width: 100%; padding: 12px; font-size: 15px; margin-top: 2px; }
.auth-switch { margin: 2px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch[hidden] { display: none; }
#authSocial[hidden] { display: none; }

/* ---- Account panels: Upgrade, Settings, Help ---- */
.auth-card .pm-close { z-index: 1; }
.up-card { width: min(820px, 100%); }
.up-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.up-plan { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px 18px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.up-plan.popular { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 90, 31, .1); }
.up-plan h3 { margin: 0; font: 600 18px Poppins, Inter, system-ui, sans-serif; color: var(--ink); }
.up-badge { position: absolute; top: -10px; right: 14px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.up-price { color: var(--muted); font-size: 13px; }
.up-price b { font: 700 26px Inter, system-ui, sans-serif; color: var(--ink); letter-spacing: -0.02em; }
.up-plan ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.up-plan li::before { content: "✓"; color: var(--orange); font-weight: 700; margin-right: 8px; }
.up-plan button { margin-top: auto; padding: 10px; font-size: 14px; border-radius: 10px; cursor: pointer; }
.up-plan button:disabled { opacity: .55; cursor: default; }
.up-plan.current { background: var(--surface-2); }
.up-manage { align-self: center; }
.up-manage[hidden] { display: none; }
.set-form { display: flex; flex-direction: column; gap: 12px; }
.set-form input[readonly], .set-form input:disabled { background: var(--surface-2); color: var(--muted); }
.set-plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.set-plan div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.set-plan b { font-size: 15px; color: var(--ink); }
.set-plan .btn-light { width: auto; padding: 9px 14px; font-size: 14px; }
.set-signout { align-self: center; color: var(--muted); }
.help-card details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.help-card summary { cursor: pointer; font: 600 14px Inter, system-ui, sans-serif; color: var(--ink); }
.help-card details p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.help-contact { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.help-contact a { color: var(--orange); font-weight: 600; }
.help-contact[hidden] { display: none; }
@media (max-width: 720px) { .up-plans { grid-template-columns: 1fr; } }
.btn-spin { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: btn-spin .7s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
.is-loading:disabled { opacity: .85; cursor: progress; }

/* Showcase strip while images load: quiet shimmer instead of coloured placeholders */
.thumb-card.skeleton { background: linear-gradient(100deg, #ecebe7 30%, #f4f3f0 50%, #ecebe7 70%) 0 0 / 300% 100%; box-shadow: none; animation: thumb-shimmer 1.6s ease-in-out infinite; }
.thumb-card.skeleton::after { display: none; }
.thumb-card:not(.skeleton)::after { display: none; }
.thumb-img { animation: thumb-in .4s ease-out; }
@keyframes thumb-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes thumb-in { from { opacity: 0; } }

/* Pricing: boxy — square corners, equal-height cards side by side */
.plans { align-items: stretch; gap: 0; }
.plan { border-radius: 0; }
.plan + .plan { border-left: 0; }
.plan.featured { padding-block: 30px 28px; box-shadow: none; z-index: 1; }
.plan-badge, .per-month, .features svg, .plan-cta { border-radius: 0; }
@media (max-width: 860px) { .plan + .plan { border-left: 1px solid var(--p-line); border-top: 0; } }

/* Results: 3 tall (phone-shaped) screenshots */
.results { max-width: 960px; margin-inline: auto; gap: 20px; }
.result-card { aspect-ratio: 9 / 16; }
.result-card img { object-position: top; }
@media (max-width: 860px) { .results { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (max-width: 520px) { .results { grid-template-columns: 1fr; max-width: 340px; } }
