/* Cineva — visual design
   Plum for depth, coral for actions, lilac paper for calm.
   Every video lives in a 9:16 frame, the shape of a WhatsApp status. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --plum: #22163f;
  --plum-2: #36275f;
  --plum-soft: #4b3c78;
  --paper: #f7f4fc;
  --surface: #ffffff;
  --coral: #ff5a4e;
  --coral-press: #f0473b;
  --violet: #6d4aff;
  --line: #e4def0;
  --ink: #22163f;
  --muted: #645c7a;
  --ok: #1f7a4d;
  --warn: #9a5b00;
  --bad: #b3261e;
  --mtn: #ffcc00;
  --orange: #ff7900;

  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --r-frame: 22px;
  --r-panel: 18px;
  --r-control: 12px;
  --topbar: 64px;
  --rail: 216px;
  --tabbar: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.015em; }
h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 680; }
h3, .h3 { font-family: var(--display); font-size: 19px; font-weight: 650; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--surface); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.fine { font-size: 13.5px; color: var(--muted); }
.spacer { flex: 1; }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.big { width: 44px; height: 44px; stroke-width: 1.4; }
#i-play path, .icon use[href="#i-play"] { fill: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid transparent; background: none; cursor: pointer;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-coral { background: var(--coral); color: var(--plum); }
.btn-coral:hover:not(:disabled) { background: var(--coral-press); }
.btn-quiet { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-quiet:hover:not(:disabled) { border-color: var(--plum-soft); }
.btn-lg { min-height: 52px; font-size: 16.5px; padding: 0 26px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 0; background: none; cursor: pointer; color: inherit;
}
.icon-btn:hover { background: rgba(34, 22, 63, .07); }
.link-btn { background: none; border: 0; padding: 0; color: var(--plum-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14.5px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 7px 13px; font-size: 14px; cursor: pointer;
}
.chip:hover { border-color: var(--plum-soft); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar);
  display: flex; align-items: center; gap: 24px; padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(247, 244, 252, .9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
body[data-view="home"] .topbar { background: var(--plum); color: #fff; border-bottom-color: rgba(255, 255, 255, .08); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; }
body[data-view="home"] .brand img { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25); border-radius: 8px; }
.site-links { display: flex; gap: 22px; }
.site-links a { text-decoration: none; font-weight: 500; opacity: .85; }
.site-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
body[data-view="home"] .lang { border-color: rgba(255, 255, 255, .22); }
.lang button { border: 0; background: none; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; opacity: .7; }
.lang button[aria-pressed="true"] { background: var(--plum); color: #fff; opacity: 1; }
body[data-view="home"] .lang button[aria-pressed="true"] { background: #fff; color: var(--plum); }
body[data-view="home"] .btn-quiet { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.balance {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--ink);
}
.balance:hover { border-color: var(--plum-soft); }
.account { position: relative; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--plum); color: #fff; cursor: pointer; }
body[data-view="home"] .avatar { background: #fff; color: var(--plum); }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 8px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(34, 22, 63, .35);
}
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 0; background: none; text-decoration: none; cursor: pointer; font-size: 15px; }
.menu a:hover, .menu button:hover { background: var(--paper); }
.menu-email { padding: 8px 12px 10px; font-size: 13.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow-wrap: anywhere; }

/* ---------- Studio rail (desktop) / tab bar (phone) ---------- */
.rail { display: none; }
body.is-member.in-studio .rail {
  display: flex; flex-direction: column; gap: 4px;
  position: fixed; top: var(--topbar); left: 0; bottom: 0; width: var(--rail);
  padding: 22px 14px; border-right: 1px solid var(--line); background: var(--paper);
}
.rail a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; text-decoration: none; font-weight: 550; color: var(--muted); }
.rail a:hover { color: var(--ink); background: rgba(34, 22, 63, .05); }
.rail a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.rail a[aria-current="page"] .icon { color: var(--coral); }
body.is-member.in-studio main { padding-left: var(--rail); }

/* ---------- Frames: the 9:16 video shape ---------- */
.frame {
  position: relative; aspect-ratio: 9 / 16; width: 100%;
  border-radius: var(--r-frame); overflow: hidden;
  background: linear-gradient(160deg, var(--plum-2), var(--plum));
  color: #fff; display: grid; place-items: center;
}
.frame video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.frame-empty, .frame-working { display: grid; justify-items: center; gap: 12px; padding: 28px; text-align: center; color: rgba(255, 255, 255, .82); font-size: 15px; }
.frame-empty .icon { color: var(--coral); }
.frame-working .working-title { font-family: var(--display); font-size: 22px; font-weight: 650; color: #fff; }
.frame-note { padding: 24px; text-align: center; }
.frame-title { position: absolute; left: 14px; right: 14px; bottom: 14px; font-family: var(--display); font-weight: 650; font-size: 17px; text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }

.reel-loader { display: flex; gap: 6px; height: 46px; align-items: end; }
.reel-loader span { width: 10px; border-radius: 4px; background: var(--coral); animation: bars 1.1s ease-in-out infinite; }
.reel-loader span:nth-child(2) { animation-delay: .15s; }
.reel-loader span:nth-child(3) { animation-delay: .3s; }
.reel-loader.small { height: 30px; }
.reel-loader.small span { width: 7px; }
@keyframes bars { 0%, 100% { height: 30%; } 50% { height: 100%; } }

/* ---------- Home ---------- */
.hero {
  background: var(--plum); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 72px);
  align-items: center; padding: clamp(40px, 7vw, 88px) clamp(20px, 6vw, 96px) clamp(56px, 8vw, 104px);
}
.hero h1 { font-size: clamp(44px, 7.2vw, 92px); font-weight: 760; line-height: .96; letter-spacing: -0.035em; max-width: 11ch; }
.hero .lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 19.5px); max-width: 52ch; color: rgba(255, 255, 255, .82); }
.hero-prompt {
  margin-top: 30px; max-width: 620px; display: grid; gap: 12px; padding: 12px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px;
}
.hero-prompt textarea {
  resize: none; border: 0; background: transparent; color: #fff; padding: 8px 10px; font-size: 16.5px; line-height: 1.5; min-height: 84px;
}
.hero-prompt textarea::placeholder { color: rgba(255, 255, 255, .55); }
.hero-prompt textarea:focus { outline: none; }
.hero-prompt:focus-within { border-color: rgba(255, 255, 255, .45); }
.hero-prompt .btn { justify-self: end; }
.hero .fine { margin-top: 14px; color: rgba(255, 255, 255, .65); }
.hero-frame { justify-self: center; width: min(320px, 100%); }
.hero-frame .frame { box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 40px 80px -30px rgba(255, 90, 78, .45); }

.band { padding: clamp(56px, 7vw, 96px) clamp(20px, 6vw, 96px) 0; max-width: 1280px; margin: 0 auto; }
.band:focus { outline: none; }
.band-head { display: grid; gap: 10px; margin-bottom: 30px; max-width: 60ch; }
.band-head p { color: var(--muted); font-size: 17px; }

.reel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 236px); gap: 18px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.reel-item { scroll-snap-align: start; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 10px; }
.reel-item .frame { transition: transform .2s; }
.reel-item:hover .frame { transform: translateY(-3px); }
.reel-title { font-weight: 600; font-size: 15px; }
.frame.script { place-items: stretch; align-content: start; gap: 14px; padding: 22px 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.frame.script strong { font-family: var(--display); font-size: 22px; font-weight: 680; }
.frame.script p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.frame.script { display: flex; flex-direction: column; }
.script-cta { margin-top: auto; align-self: flex-start; padding: 9px 16px; border-radius: 999px; background: var(--coral); color: var(--plum); font-weight: 600; font-size: 14.5px; }
.reel-item.idea:hover .script-cta { background: var(--coral-press); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; padding-top: 18px; border-top: 2px solid var(--plum); }
.steps li::before { content: counter(step); font-family: var(--display); font-size: 40px; font-weight: 760; color: var(--coral); line-height: 1; }
.steps p { color: var(--muted); }

.price-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.price { padding: 26px; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.price.featured { background: var(--plum); color: #fff; border-color: var(--plum); }
.price.featured .muted { color: rgba(255, 255, 255, .7); }
.price-amount { font-family: var(--display); font-size: 36px; font-weight: 740; letter-spacing: -0.02em; margin-top: 10px; }
.price-credits { font-weight: 600; }
.pay-with { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; color: var(--muted); }
.momo { display: inline-block; padding: 5px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--plum); }
.momo.mtn { background: var(--mtn); }
.momo.orange { background: var(--orange); }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--plum-soft); }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding-bottom: 18px; color: var(--muted); max-width: 68ch; }

.cta-band { width: min(1088px, calc(100% - 2 * clamp(20px, 6vw, 96px))); margin: clamp(56px, 7vw, 96px) auto 0; padding: clamp(40px, 6vw, 72px); border-radius: 28px; background: var(--coral); color: var(--plum); display: grid; gap: 26px; justify-items: start; }
.cta-band h2 { font-size: clamp(30px, 4.4vw, 54px); font-weight: 760; max-width: 18ch; letter-spacing: -0.03em; }
.cta-band .btn-coral { background: var(--plum); color: #fff; }
.cta-band .btn-coral:hover { background: var(--plum-2); }

.site-footer { display: none; }
body[data-view="home"] .site-footer, body[data-view="legal"] .site-footer,
body[data-view="how"] .site-footer, body[data-view="examples"] .site-footer {
  display: block; margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(40px, 5vw, 64px) clamp(20px, 6vw, 96px) 28px;
  background: var(--plum); color: #fff;
}
.footer-top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 36px; max-width: 1180px; margin: 0 auto; }
.footer-top:has(#footerContact[hidden]) { grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; }
.footer-brand img { background: #fff; border-radius: 8px; padding: 2px; }
.footer-about p { color: rgba(255, 255, 255, .72); font-size: 15px; line-height: 1.55; max-width: 36ch; margin: 14px 0 0; }
.footer-about .footer-pay-label { font-size: 13px; color: rgba(255, 255, 255, .6); margin-top: 22px; }
.footer-pay { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 10px 0 0; }
.footer-pay li { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 7px; background: #fff; color: var(--plum); }
.footer-pay li.mtn { background: var(--mtn); }
.footer-pay li.orange { background: var(--orange); color: #fff; }
.footer-col { display: grid; align-content: start; gap: 12px; }
.footer-col h2 { font-family: var(--display); font-size: 15px; font-weight: 700; margin: 4px 0 4px; color: #fff; }
.footer-col a, .footer-col .linkish {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
  color: rgba(255, 255, 255, .72); text-decoration: none; font-size: 14.5px;
  background: none; border: 0; padding: 0; font: inherit; font-size: 14.5px; cursor: pointer;
}
.footer-col a:hover, .footer-col .linkish:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  max-width: 1180px; margin: 40px auto 0; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 13.5px; color: rgba(255, 255, 255, .6);
}
.footer-bottom p { margin: 0; }
.footer-lang { display: flex; gap: 4px; }
.footer-lang button { background: none; border: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .75); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.footer-lang button:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.site-footer :focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
@media (max-width: 860px) {
  .footer-top, .footer-top:has(#footerContact[hidden]) { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

/* ---------- Studio pages ---------- */
.studio { max-width: 1180px; margin: 0 auto; padding: clamp(22px, 3vw, 36px) clamp(16px, 3vw, 36px) 56px; }
.studio-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.lead.small { color: var(--muted); max-width: 64ch; margin: -8px 0 20px; font-size: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: clamp(18px, 2.4vw, 26px); }
.notice { padding: 14px 16px; border-radius: 12px; background: #fff4e5; color: var(--warn); margin-bottom: 18px; font-weight: 550; }

.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend, .label { font-weight: 600; font-size: 14.5px; padding: 0; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; }
.count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
input:not([type=radio]):not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-control);
  padding: 11px 13px; min-height: 46px; font-size: 16px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 74, 255, .18); background: var(--surface); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.segmented label { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--muted); text-align: center; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(34, 22, 63, .12), inset 0 0 0 1px var(--line); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 1px; }

.create-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(20px, 3vw, 36px); align-items: start; }
.create-form { display: grid; gap: 20px; }
.form-msg { min-height: 1.4em; font-size: 14.5px; color: var(--muted); }
.form-msg a { color: var(--ink); font-weight: 600; }
.dropzone { display: grid; place-items: center; min-height: 148px; border: 1.5px dashed #cfc6e3; border-radius: 14px; background: var(--paper); cursor: pointer; overflow: hidden; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--violet); }
.dz-empty { display: grid; justify-items: center; gap: 6px; padding: 18px; text-align: center; font-weight: 600; }
.dz-empty small { font-weight: 400; color: var(--muted); max-width: 34ch; }
.dropzone.has-photo .dz-empty { display: none; }
.dropzone img { max-height: 260px; width: auto; }
.stage { position: sticky; top: calc(var(--topbar) + 20px); display: grid; gap: 14px; }
.stage .frame { max-height: calc(100vh - var(--topbar) - 170px); min-height: 320px; width: auto; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-caption { font-size: 14px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }

.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.video-card { display: grid; gap: 10px; align-content: start; }
.video-open { display: grid; gap: 10px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.video-open:hover .thumb-play { background: var(--coral); }
.home-control { display: grid; gap: 6px; justify-items: start; }
.home-control input { min-height: 40px; padding: 8px 10px; font-size: 15px; }
.home-actions { display: flex; align-items: center; gap: 12px; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-small .icon { width: 16px; height: 16px; }
.thumb { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, var(--plum-2), var(--plum)); display: grid; place-items: center; }
.thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb-play { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--plum); }
.card-body { display: grid; gap: 4px; justify-items: start; }
.card-prompt { font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 13px; color: var(--muted); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.pill-completed, .pill-complete { background: #e6f4ec; color: var(--ok); border-color: #cbe7d7; }
.pill-running, .pill-queued, .pill-pending, .pill-created { background: #efeaff; color: #4b33c4; border-color: #ddd3ff; }
.pill-failed { background: #fdecea; color: var(--bad); border-color: #f6d2ce; }
.pill-uncertain, .pill-review { background: #fff4e5; color: var(--warn); border-color: #fde2bd; }
.empty { display: grid; justify-items: center; gap: 16px; padding: 56px 20px; text-align: center; color: var(--muted); border: 1.5px dashed #d9d1ea; border-radius: var(--r-panel); grid-column: 1 / -1; list-style: none; }

.story-meta { display: grid; gap: 22px; margin-bottom: 20px; }
.characters { display: flex; flex-wrap: wrap; gap: 14px; }
.character { position: relative; margin: 0; display: grid; gap: 6px; justify-items: center; width: 92px; text-align: center; }
.character img { width: 76px; height: 76px; border-radius: 999px; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.character figcaption { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.character .icon-btn { position: absolute; top: -6px; right: 0; width: 30px; height: 30px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.character .icon-btn .icon { width: 15px; height: 15px; }
.add-character { display: flex; gap: 10px; flex-wrap: wrap; }
.add-character input { flex: 1 1 200px; width: auto; }
.add-character .btn { cursor: pointer; flex: none; }
.scenes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.scene { display: grid; gap: 12px; }
.scene-head { display: flex; align-items: center; gap: 12px; }
.scene-head .icon-btn { margin-left: auto; color: var(--muted); }
.scene-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.scene-controls select { width: auto; min-width: 140px; }
.story-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 20px 0 10px; }
.story-foot label.link-btn { cursor: pointer; }

.credits-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px; align-items: start; }
#buyForm { display: grid; gap: 16px; }
.balance-big { font-family: var(--display); font-size: 52px; font-weight: 760; line-height: 1; letter-spacing: -0.03em; }
.balance-big span + span { font-size: 22px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.packs { display: grid; gap: 10px; }
.pack { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.pack input { position: absolute; opacity: 0; pointer-events: none; }
.pack:has(input:checked) { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); background: #faf8ff; }
.pack:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 2px; }
.pack-name { display: grid; }
.pack-name small { color: var(--muted); font-size: 13px; }
.pack-credits { color: var(--muted); font-size: 14px; }
.pack-price { font-family: var(--display); font-size: 19px; white-space: nowrap; }
.networks label { min-height: 50px; }
.networks .momo { padding: 4px 10px; }
.phone-input { display: flex; align-items: center; gap: 10px; }
.phone-input span { font-weight: 600; color: var(--muted); }
.payments { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.payments li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.payments li span:first-child { display: grid; }
.payments small { color: var(--muted); }
.payments .amount { font-weight: 600; white-space: nowrap; }
#payments > .muted { margin-top: 12px; }

.legal article { max-width: 720px; margin: 0 auto; padding: clamp(32px, 5vw, 64px) 20px 0; }
.legal h1 { margin-bottom: 18px; }
.legal h2 { font-size: 21px; margin: 30px 0 8px; }
.legal p { color: #3d3456; max-width: 68ch; }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; background: none; color: var(--ink); max-width: calc(100vw - 24px); }
dialog::backdrop { background: rgba(26, 17, 48, .62); }
.sheet > form, .sheet-body {
  position: relative; width: min(420px, calc(100vw - 24px)); display: grid; gap: 16px;
  padding: 30px 26px 24px; background: var(--surface); border-radius: 22px;
}
.sheet-body form { display: grid; gap: 14px; }
.sheet h2 { font-size: 26px; padding-right: 36px; }
.close { position: absolute; top: 14px; right: 14px; }
.password { position: relative; }
.password input { padding-right: 52px; }
.password .icon-btn { position: absolute; right: 4px; top: 3px; }
.password .icon-btn[aria-pressed="true"] { color: var(--violet); }
.sheet .form-msg:empty { display: none; }
.auth-switch { text-align: center; font-size: 14.5px; color: var(--muted); }
.auth-help { text-align: center; font-size: 14px; }
.player { width: min(400px, calc(100vw - 24px)); }
.player[open] { display: grid; gap: 14px; }
.player .frame { max-height: 78vh; width: auto; }
.player .close { position: static; justify-self: end; background: rgba(255, 255, 255, .16); color: #fff; }
.player .stage-caption { color: rgba(255, 255, 255, .8); }
.player .btn-quiet { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--plum); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 550;
  box-shadow: 0 16px 40px -16px rgba(34, 22, 63, .6); max-width: calc(100vw - 32px);
}

/* ---------- Hero actions ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
body[data-view="home"] .hero-actions .btn-quiet { color: #fff; }
.hero-types { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.hero-types li { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); font-size: 14px; color: rgba(255, 255, 255, .85); }

/* ---------- Trial ---------- */
.trial-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border-radius: 14px; background: #efeaff; color: #3a2a8a; font-weight: 550; }
.trial-banner a { color: inherit; font-weight: 700; }
.trial-banner .btn { min-height: 40px; }
.wm { position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.thumb .wm { font-size: 11px; right: 6px; bottom: 6px; }
.notice.small { font-size: 14px; margin: 0; }

/* ---------- Ad maker ---------- */
.ad-root { display: grid; gap: 18px; }
.ad-step { display: grid; gap: 14px; }
.ad-step-head { display: flex; align-items: center; gap: 12px; }
.ad-step-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: var(--plum); color: #fff; font-family: var(--display); font-weight: 700; flex: none; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.type { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 600; background: var(--surface); }
.type input, .look input { position: absolute; opacity: 0; pointer-events: none; }
.type .icon { color: var(--plum-soft); }
.type:has(input:checked) { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); background: #faf8ff; }
.type:has(input:checked) .icon { color: var(--coral); }
.type:has(input:focus-visible), .look:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 2px; }
.ad-photos { display: flex; flex-wrap: wrap; gap: 12px; }
.ad-photo { position: relative; margin: 0; width: 120px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.ad-photo img { width: 100%; height: 100%; object-fit: cover; }
.ad-photo figcaption { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 3px 8px; border-radius: 999px; background: var(--coral); color: var(--plum); font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.ad-photo .icon-btn { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; background: rgba(255, 255, 255, .92); }
.ad-photo .icon-btn .icon { width: 16px; height: 16px; }
.ad-photo.add { display: grid; place-items: center; align-content: center; gap: 6px; cursor: pointer; border: 1.5px dashed #cfc6e3; color: var(--plum-soft); font-weight: 600; font-size: 14px; text-align: center; padding: 10px; }
.ad-photo.add:hover { border-color: var(--violet); }
.ad-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ad-logo img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.ad-logo .btn { cursor: pointer; }
.looks { display: flex; flex-wrap: wrap; gap: 10px; }
.look { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 600; background: var(--surface); }
.look:has(input:checked) { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.look-swatch { width: 44px; height: 30px; border-radius: 8px; background: linear-gradient(90deg, var(--a) 0 45%, var(--b) 45% 78%, var(--c) 78%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.ad-go { display: grid; gap: 12px; padding: 4px 0; }
.ad-summary p { margin: 0; }
.ad-saved { display: grid; gap: 10px; }
.ad-saved-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-making { display: grid; gap: 16px; justify-items: start; }
.ad-clips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: 100%; }
.ad-clips li { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 14px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; }
.ad-clips img, .ad-clips .thumb.small { width: 54px; height: 96px; object-fit: cover; border-radius: 10px; }
.ad-ready { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.ad-preview { display: grid; gap: 12px; position: sticky; top: calc(var(--topbar) + 20px); }
.ad-canvas { width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r-frame); background: var(--plum); max-height: calc(100vh - var(--topbar) - 190px); object-fit: contain; }
.ad-progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ad-progress span { display: block; height: 100%; width: 0; background: var(--coral); transition: width .2s linear; }
.ad-edit { display: grid; gap: 14px; }

/* ---------- Owner dashboard ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 18px; display: grid; gap: 4px; align-content: start; }
.tile.warn { border-color: #f3c77a; background: #fffaf0; }
.tile-label { font-size: 14px; color: var(--muted); font-weight: 600; }
.tile-value { font-family: var(--display); font-size: clamp(26px, 3vw, 32px); font-weight: 740; letter-spacing: -0.02em; white-space: nowrap; }
.tile-note { font-size: 13px; color: var(--muted); }
.meter { height: 8px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 2px; }
.meter span { display: block; height: 100%; background: var(--plum-soft); }
.tile.warn .meter span { background: var(--warn); }
.admin-block { display: grid; gap: 12px; margin-bottom: 20px; }
.scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.flag td { background: #fff8ec; }
.grant-form { display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: 10px; }
.admin-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.admin-video { display: grid; gap: 8px; align-content: start; }
.admin-video .thumb video { width: 100%; height: 100%; object-fit: cover; }
.admin-showcase-form { display: grid; gap: 6px; }
.admin-showcase-form .btn { min-height: 40px; }
.admin-on-home { display: grid; gap: 6px; justify-items: start; }

/* ---------- Tablets ---------- */
@media (max-width: 1020px) {
  .create-grid, .credits-grid, .ad-ready { grid-template-columns: 1fr; }
  .ad-preview { position: static; max-width: 380px; width: 100%; justify-self: center; }
  .stage { position: static; max-width: 360px; width: 100%; justify-self: center; }
  .site-links { display: none; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  :root { --topbar: 58px; }
  .topbar { gap: 12px; padding: 0 14px; }
  .brand span { font-size: 19px; }
  .top-actions { gap: 8px; }
  .top-actions .btn-quiet[data-action="signin"] { display: none; }
  .top-actions .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .lang button { padding: 3px 8px; }
  .balance { padding: 0 11px; min-height: 38px; font-size: 14px; }
  .balance .icon { display: none; }

  body.is-member.in-studio main { padding-left: 0; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  body.is-member.in-studio .rail {
    top: auto; right: 0; width: auto; height: calc(var(--tabbar) + env(safe-area-inset-bottom));
    flex-direction: row; gap: 0; padding: 6px 6px env(safe-area-inset-bottom);
    border-right: 0; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); z-index: 25;
  }
  .rail a { flex: 1; flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 12px; justify-content: center; }
  .rail a[aria-current="page"] { background: none; box-shadow: none; }

  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hero h1 { font-size: clamp(42px, 12vw, 58px); }
  .hero-frame { width: min(250px, 72%); }
  .hero-prompt .btn { justify-self: stretch; }
  .steps { grid-template-columns: 1fr; }
  .reel { grid-auto-columns: 62%; }
  .two { grid-template-columns: 1fr; }
  .create-form .segmented .icon { display: none; }
  .ideas { flex-wrap: nowrap; overflow-x: auto; margin: 0 -4px; padding: 2px 4px 6px; scrollbar-width: none; }
  .ideas .chip { flex: none; }
  .library { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grant-form { grid-template-columns: 1fr; }
  .admin-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-photo { width: calc((100% - 24px) / 3); }
  .ad-go { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .hero-actions .btn { flex: 1 1 auto; }
  .thumb-play { width: 40px; height: 40px; }
  .studio-head h1 { font-size: 28px; }
  .pack { grid-template-columns: 1fr auto; }
  .pack-credits { display: none; }
  .toast { bottom: calc(var(--tabbar) + 18px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Checkbox row (ad maker: premium quality) */
.check { display: flex; align-items: flex-start; gap: .55rem; margin: .4rem 0 .2rem; font-size: .95rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: var(--coral, #ff5a4e); }
.quality .muted { margin: .45rem 0 0; }

/* Ad maker: sound (music and voice-over) */
.sound { border-top: 1px solid var(--line, rgba(34,22,63,.12)); margin-top: 1rem; padding-top: 1rem; }
.sound .h4 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .6rem; }
.sound-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip.is-on { background: var(--plum, #22163f); border-color: var(--plum, #22163f); color: #fff; }
.sound textarea { margin-top: .5rem; }
.sound-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .4rem; }
.sound .field + .field { margin-top: 1rem; }

.ad-canvas[data-format=square] { aspect-ratio: 1 / 1; }
.format-pick span { display: flex; flex-direction: column; align-items: center; line-height: 1.2; gap: .1rem; }
.format-pick small { font-size: .74rem; opacity: .75; font-weight: 500; }

/* Ad maker: "Write it for me" */
.writer { margin: -.3rem 0 .9rem; }
.writer .form-msg { margin: .45rem 0 0; }
.writer-list { display: grid; gap: .5rem; margin-top: .5rem; }
.writer-card { text-align: left; display: grid; gap: .2rem; padding: .75rem .9rem; border: 1px solid var(--line, rgba(34,22,63,.14)); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.writer-card:hover, .writer-card:focus-visible { border-color: var(--coral, #ff5a4e); }
.writer-card strong { font-weight: 650; }
.writer-card span { color: var(--muted); font-size: .92rem; }

/* Credits: invite a friend */
.invite .invite-link { display: grid; gap: .15rem; margin: .8rem 0; padding: .7rem .9rem; border-radius: 12px; background: var(--paper); overflow-wrap: anywhere; }
.invite .invite-link span { font-size: .8rem; color: var(--muted); }
.invite .stage-actions { flex-wrap: wrap; }

/* ---------- Public pages: Home, How it works, Examples, Prices ---------- */
.hero-frame { position: relative; }
.sound-toggle { margin: 12px auto 0; display: block; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; font: inherit; font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.sound-toggle:hover, .sound-toggle:focus-visible { background: rgba(255,255,255,.1); }
.hero-types.big { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.hero-types.big li { padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.page-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.page-card { display: grid; align-content: start; gap: 10px; padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.page-card:hover, a.page-card:focus-visible { border-color: var(--coral); }
.page-card p { color: var(--muted); }
.page-card-go { margin-top: 6px; font-weight: 700; color: var(--coral); }
.page-head { display: grid; gap: 14px; }
.page-head h1 { font-size: clamp(38px, 5.6vw, 64px); font-weight: 760; line-height: 1; letter-spacing: -0.03em; }
.page-head .lead { color: var(--muted); font-size: 18px; max-width: 56ch; }
.how-video { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.how-video .frame { width: 100%; }
.how-steps { counter-reset: s; }
@media (max-width: 760px) { .how-video { grid-template-columns: 1fr; } .how-video .frame { max-width: 340px; margin: 0 auto; } }
.example-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.example { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; display: grid; gap: 10px; font: inherit; color: inherit; }
.site-links a[aria-current=page] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 700px) { .site-links { display: none; } }
.how-steps { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .how-steps { grid-template-columns: 1fr; } }
.page-tabs { display: none; }
@media (max-width: 700px) {
  body:not(.in-studio) .page-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: var(--topbar); z-index: 20; scrollbar-width: none; }
  .page-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); }
  .page-tabs a[aria-current=page] { background: var(--plum); color: #fff; }
}

/* Sign-up: prices after the free trial */
.after-trial { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.after-trial h3 { font-size: 16px; font-weight: 700; }
.after-packs { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.after-packs li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--paper); }
.after-packs li span:first-child { font-weight: 650; }
button.page-card { font: inherit; text-align: left; cursor: pointer; }
button.page-card:hover, button.page-card:focus-visible { border-color: var(--coral); }

/* Home hero: three example ads, the main one playing */
.hero-stage { position: relative; justify-self: center; width: min(330px, 78vw); padding: 0 12%; }
.hero-stage .frame { overflow: hidden; }
.hero-stage .frame img, .hero-stage .frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-stage .main { position: relative; z-index: 2; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 40px 80px -30px rgba(255, 90, 78, .55); }
.hero-stage .side { position: absolute; top: 9%; width: 62%; z-index: 1; opacity: .9; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.hero-stage .side.left { left: -8%; transform: rotate(-8deg); }
.hero-stage .side.right { right: -8%; transform: rotate(8deg); }
.hero-stage .sound-toggle { position: relative; z-index: 3; }

/* Home: photo → ad */
.turns { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 36px); }
.turn { margin: 0; display: grid; grid-template-columns: 1fr auto 1.25fr; align-items: center; gap: 10px; }
.turn-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.turn-arrow { width: 26px; height: 26px; border-radius: 50%; background: var(--coral); position: relative; }
.turn-arrow::after { content: ''; position: absolute; inset: 0; margin: auto; width: 8px; height: 8px; border-top: 2.5px solid #fff; border-right: 2.5px solid #fff; transform: translateX(-1px) rotate(45deg); }
.turn .frame video { width: 100%; height: 100%; object-fit: cover; }
.turn figcaption { grid-column: 1 / -1; font-weight: 650; }
@media (max-width: 900px) { .turns { grid-template-columns: 1fr; max-width: 460px; } }
.example .frame video { width: 100%; height: 100%; object-fit: cover; }

.sound-music .muted { margin: 0 0 .4rem; }
.sound-chips .chip { display: inline-flex; align-items: center; gap: 6px; }
.sound-chips .chip small { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--coral); color: #fff; }
.sound-chips .chip.is-on small { background: #fff; color: var(--plum); }
.more-moods { margin-top: .5rem; }
.more-moods summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); margin-bottom: .45rem; }

.turn-text { margin: 0; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink); font-style: italic; align-self: center; }
.turn-text::before { content: '“'; display: block; font-family: var(--display); font-size: 34px; line-height: .6; color: var(--coral); font-style: normal; margin-bottom: 6px; }

/* Ad maker: video styles */
.vstyles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.vstyle { position: relative; cursor: pointer; }
.vstyle input { position: absolute; opacity: 0; }
.vstyle > span { display: grid; gap: 4px; height: 100%; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); }
.vstyle strong { font-weight: 700; }
.vstyle small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.vstyle em { justify-self: start; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--coral); color: #fff; }
.vstyle input:checked + span { border-color: var(--plum); box-shadow: inset 0 0 0 1px var(--plum); }
.vstyle input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }

/* ---------- Landing: prompt bar and moving wall of ads ---------- */
.hero-wall { display: block; padding-bottom: 0; overflow: hidden; }
.hero-center { max-width: 820px; margin: 0 auto; text-align: center; display: grid; gap: 18px; justify-items: center; }
.hero-center h1 { font-size: clamp(42px, 7vw, 86px); line-height: .98; letter-spacing: -0.035em; }
.hero-center .lead { max-width: 60ch; }
.prompt-bar { width: min(720px, 100%); display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 999px; background: #fff; box-shadow: 0 20px 60px -20px rgba(0,0,0,.55); }
.prompt-bar input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 17px; color: var(--ink); background: transparent; padding: 10px 6px; }
.prompt-bar input::placeholder { color: #8c84a6; }
.prompt-bar .btn { border-radius: 999px; white-space: nowrap; }
.prompt-photo { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--paper); color: var(--plum); display: grid; place-items: center; cursor: pointer; }
.prompt-photo svg { width: 22px; height: 22px; }
.prompt-bar:focus-within { box-shadow: 0 0 0 3px var(--coral), 0 20px 60px -20px rgba(0,0,0,.55); }
.style-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.style-chips button { font: inherit; font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; }
.style-chips button:hover, .style-chips button:focus-visible { background: rgba(255,255,255,.16); }
.wall { margin-top: clamp(36px, 6vw, 64px); display: grid; gap: 16px; padding-bottom: clamp(36px, 6vw, 64px); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.wall-row { overflow: hidden; }
.wall-track { display: flex; gap: 16px; width: max-content; animation: wall 70s linear infinite; }
.wall-row.reverse .wall-track { animation-direction: reverse; animation-duration: 85s; }
.wall-card { flex: none; width: clamp(150px, 16vw, 210px); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #1a1230; }
.wall-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes wall { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .wall-track { animation: none; } }
@media (max-width: 600px) { .prompt-bar { border-radius: 22px; flex-wrap: wrap; } .prompt-bar input { flex-basis: calc(100% - 60px); } .prompt-bar .btn { width: 100%; } }
.prompt-photo svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.prompt-bar input[type=text] { background: transparent; border: 0; box-shadow: none; min-height: 0; }

/* ---------- Credits: monthly plans (Creatify-style) and packs ---------- */
.credits-grid .buy { display: grid; gap: 16px; }
.balance-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.plan-status { display: grid; gap: 4px; padding: 12px 16px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.plan-status.ending { border-color: var(--coral); background: #fff3f1; }
.plan-status span { color: var(--muted); font-size: 14px; }
.plan-status .btn { justify-self: start; margin-top: 4px; }
.plan-tabs { justify-self: start; }
.plan-lead { margin: -4px 0 0; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.plan-card { position: relative; cursor: pointer; }
.plan-card input { position: absolute; opacity: 0; }
.plan-body { display: grid; gap: 8px; height: 100%; padding: 20px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); }
.plan-card input:checked + .plan-body { border-color: var(--plum); box-shadow: inset 0 0 0 1.5px var(--plum), 0 18px 40px -24px rgba(34,22,63,.5); }
.plan-card input:focus-visible + .plan-body { outline: 3px solid var(--coral); outline-offset: 2px; }
.plan-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-name { font-size: 22px; font-weight: 750; }
.plan-badge { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 4px 9px; border-radius: 6px; background: var(--plum); color: #fff; }
.plan-badge.best { background: var(--coral); }
.plan-for { color: var(--muted); font-size: 14px; min-height: 2.6em; }
.plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.plan-price s { color: var(--muted); font-size: 16px; }
.plan-price strong { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.plan-price span { color: var(--muted); }
.plan-credits { font-weight: 600; font-size: 14px; }
.plan-save { justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e7f7ee; color: #157347; }
.included h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.included ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.included li { position: relative; padding-left: 26px; font-size: 14px; }
.included li::before { content: ''; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--plum); }
.included li::after { content: ''; position: absolute; left: 6px; top: 5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.after-sub { font-size: 13px; font-weight: 700; margin: 6px 0 0; }
.after-packs li.is-best { box-shadow: inset 0 0 0 1.5px var(--plum); }

.credits-grid #buyForm { grid-column: 1 / -1; }
.plan-price s { flex-basis: 100%; }

.networks { grid-template-columns: repeat(3, 1fr); }
.momo.card { display: inline-flex; align-items: center; gap: 6px; background: var(--plum); color: #fff; }
.momo.card .icon { width: 16px; height: 16px; }
@media (max-width: 520px) { .networks { grid-auto-flow: row; grid-template-columns: 1fr; } }

.price-row { display: grid; grid-template-columns: 1fr 150px; gap: 10px; align-items: end; }
.plan-approx { color: var(--muted); font-size: 13px; margin-top: -4px; }
.pack-price { display: grid; justify-items: end; }
.pack-price small { color: var(--muted); font-size: 12px; font-weight: 500; }

.talk-lead { margin: -6px 0 18px; max-width: 60ch; }
@media (max-width: 420px) {
  .rail a { font-size: 11px; }
  .rail a span { white-space: nowrap; }
}
