/* AudioTales — tales.audio
 * The app's two palettes (mobile/src/lib/theme.tsx): Paper by day, Bedtime by night, plus the
 * icon's own colours (indigo ground, cream pages, ink and violet waveform). Fraunces for titles,
 * Nunito Sans for text — the app's fonts, self-hosted and subset (assets/fonts, SIL OFL). */

@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/fraunces-600.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 700; font-style: normal; font-display: swap; src: url(/assets/fonts/fraunces-700.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: italic; font-display: swap; src: url(/assets/fonts/fraunces-600i.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/nunito-400.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(/assets/fonts/nunito-600.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(/assets/fonts/nunito-700.woff2) format("woff2"); }

:root {
  color-scheme: light;
  /* Paper */
  --bg: #fbf6ee; --surface: #ffffff; --surface2: #f3ebdd; --line: #e8ddcb; --line-strong: #d6c7ae;
  --text: #2b2118; --text2: #433629; --muted: #6b5a47; --faint: #8f7d68;
  --accent: #b8492a; --on-accent: #ffffff; --accent-soft: rgba(184,73,42,.10); --accent-line: rgba(184,73,42,.45); --accent-ink: #a23f24;
  --good: #2f7d52; --good-soft: rgba(47,125,82,.12);
  --shadow: 0 1px 2px rgba(43,33,24,.06), 0 8px 28px rgba(43,33,24,.08);
  --shadow-lg: 0 2px 6px rgba(43,33,24,.08), 0 30px 60px -12px rgba(43,33,24,.25);
  /* The icon, in any theme */
  --night-1: #2c2766; --night-2: #15123a; --night-3: #0f0d2a;
  --cream: #f6efe2; --spine: #e6d6b8; --edge: #c7b48f; --ink: #4a3d9e; --violet: #8a62cf; --amber: #f4b860;
  --wave: linear-gradient(180deg, #8a62cf, #ad91dd 50%, #8a62cf);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 20px; --radius-sm: 14px;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #14122b; --surface: #1e1b3a; --surface2: #29254d; --line: #35305f; --line-strong: #4a4480;
    --text: #f6efe2; --text2: #e6ddcc; --muted: #b7b0d6; --faint: #8c85b5;
    --accent: #f4b860; --on-accent: #241a05; --accent-soft: rgba(244,184,96,.14); --accent-line: rgba(244,184,96,.5); --accent-ink: #f7c77f;
    --good: #8fd6b0; --good-soft: rgba(143,214,176,.14);
    --shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 30px rgba(0,0,0,.25);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 30px 60px -12px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14122b; --surface: #1e1b3a; --surface2: #29254d; --line: #35305f; --line-strong: #4a4480;
  --text: #f6efe2; --text2: #e6ddcc; --muted: #b7b0d6; --faint: #8c85b5;
  --accent: #f4b860; --on-accent: #241a05; --accent-soft: rgba(244,184,96,.14); --accent-line: rgba(244,184,96,.5); --accent-ink: #f7c77f;
  --good: #8fd6b0; --good-soft: rgba(143,214,176,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 30px rgba(0,0,0,.25);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.3), 0 30px 60px -12px rgba(0,0,0,.55);
}
@media (min-width: 640px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--body); overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-header .wrap { display: flex; align-items: center; gap: 10px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -.02em; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: none; margin-left: auto; gap: 4px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; }
.site-nav a:hover { color: var(--text); background: var(--surface2); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { flex-shrink: 0; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; height: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul, .menu ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); }
.lang-switch a, .menu a { display: block; padding: 12px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.lang-switch a:hover, .menu a:hover { background: var(--surface2); }
.lang-switch a[aria-current] { color: var(--accent-ink); }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .moon { display: none; } }
@media (min-width: 900px) { .site-nav { display: flex; } .menu { display: none; } .site-nav + .header-tools { margin-left: 8px; } }

/* ---------- buttons, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 700; font-size: 16px; text-decoration: none; transition: transform .15s ease, background .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn svg { width: 18px; height: 18px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-badge { display: inline-block; height: 48px; border-radius: 10px; }
.store-badge img { height: 48px; width: auto; }
.store-soon { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 18px 6px 14px; border-radius: 12px; border: 1.5px solid currentColor; opacity: .92; line-height: 1.15; text-decoration: none; color: inherit; }
.store-soon svg { width: 22px; height: 22px; flex-shrink: 0; }
.store-soon small { display: block; font-size: 11.5px; font-weight: 600; opacity: .8; letter-spacing: .02em; text-transform: uppercase; }
.store-soon strong { font-size: 16px; }

/* ---------- hero (always night: the icon's ground) ---------- */
.night { --n-text: #f6efe2; --n-muted: #c9c2e6; color: var(--n-text); background:
  radial-gradient(1.4px 1.4px at 12% 18%, rgba(255,255,255,.75) 50%, transparent 51%),
  radial-gradient(1.2px 1.2px at 28% 64%, rgba(255,255,255,.5) 50%, transparent 51%),
  radial-gradient(1.6px 1.6px at 46% 12%, rgba(255,255,255,.65) 50%, transparent 51%),
  radial-gradient(1px 1px at 63% 38%, rgba(255,255,255,.5) 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 82% 22%, rgba(255,255,255,.7) 50%, transparent 51%),
  radial-gradient(1.1px 1.1px at 91% 71%, rgba(255,255,255,.45) 50%, transparent 51%),
  radial-gradient(1.3px 1.3px at 7% 84%, rgba(255,255,255,.5) 50%, transparent 51%),
  radial-gradient(1px 1px at 55% 88%, rgba(255,255,255,.4) 50%, transparent 51%),
  radial-gradient(ellipse 80% 60% at 75% 30%, rgba(138,98,207,.28), transparent 70%),
  linear-gradient(170deg, var(--night-1) 0%, var(--night-2) 62%, var(--night-3) 100%); }
.night a:not(.btn):not(.store-soon):not(.store-badge) { color: var(--amber); }
.hero { position: relative; overflow: hidden; padding: 40px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.eyebrow .bars { display: inline-flex; gap: 3px; align-items: center; height: 16px; }
.eyebrow .bars i { width: 3px; border-radius: 3px; background: currentColor; height: 60%; animation: bar 1.4s ease-in-out infinite; }
.eyebrow .bars i:nth-child(2) { height: 100%; animation-delay: -.3s; } .eyebrow .bars i:nth-child(3) { height: 75%; animation-delay: -.7s; } .eyebrow .bars i:nth-child(4) { height: 45%; animation-delay: -1s; }
@keyframes bar { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
.hero h1 { font-size: clamp(40px, 9vw, 76px); font-weight: 700; margin: 16px 0 18px; letter-spacing: -.025em; }
.hero h1 em { font-style: italic; font-weight: 600; color: var(--amber); }
.hero .lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--n-muted); max-width: 36em; }
.hero .stores { margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--n-muted); font-size: 15px; font-weight: 600; }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points svg { width: 16px; height: 16px; color: var(--amber); }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 460px; }
.hero-visual .video-phone { width: min(290px, 70vw); }
.hero-book { position: absolute; width: min(36%, 230px); left: max(2px, calc(50% - 280px)); top: 150px; transform: rotate(-9deg); filter: drop-shadow(0 26px 30px rgba(0,0,0,.45)); z-index: 1; }
.hero-wave { position: absolute; right: max(0px, calc(50% - 280px)); top: 10%; display: flex; gap: 7px; align-items: center; height: 120px; opacity: .9; z-index: 0; }
.hero-wave i { width: 11px; border-radius: 11px; background: var(--wave); animation: bar 2.2s ease-in-out infinite; }
.hero-wave i:nth-child(1) { height: 38%; } .hero-wave i:nth-child(2) { height: 78%; animation-delay: -.4s; } .hero-wave i:nth-child(3) { height: 100%; animation-delay: -.9s; } .hero-wave i:nth-child(4) { height: 62%; animation-delay: -1.3s; } .hero-wave i:nth-child(5) { height: 86%; animation-delay: -1.7s; background: linear-gradient(180deg, #4a3d9e, #8077bb 50%, #4a3d9e); } .hero-wave i:nth-child(6) { height: 44%; animation-delay: -.2s; background: linear-gradient(180deg, #4a3d9e, #8077bb 50%, #4a3d9e); }
/* On a phone the book lies beside the phone, like the store art: phone to the right, the
   book peeking out from behind it on the left. */
@media (max-width: 959px) {
  .hero-visual { justify-content: flex-end; min-height: 0; padding-bottom: 36px; }
  .hero-visual .video-fig { margin-right: max(0px, calc(50% - 200px)); }
  .hero-visual .video-phone { width: min(252px, 66vw); }
  .hero-book { width: min(46%, 190px); left: max(0px, calc(50% - 215px)); top: 110px; }
  .hero-wave { display: none; }
}
@media (min-width: 960px) {
  .hero { padding: 64px 0 88px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; }
  .hero-visual { min-height: 600px; }
}

/* ---------- a phone ---------- */
.phone { position: relative; z-index: 2; margin: 0; width: min(300px, 78vw); aspect-ratio: 590 / 1280; border-radius: 46px; padding: 10px; background: linear-gradient(145deg, #2e2b45, #0d0b1f 40%, #1c1a30); box-shadow: 0 0 0 1.5px #4a4466 inset, 0 40px 80px -20px rgba(0,0,0,.7), 0 18px 36px -12px rgba(0,0,0,.5); }
.phone::after { content: ""; position: absolute; left: 50%; top: 20px; width: 30%; height: 22px; transform: translateX(-50%); background: #0b0a16; border-radius: 20px; z-index: 3; pointer-events: none; }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: #0f0d24; isolation: isolate; }
/* The story video carries its own status bar and camera island: a bare, gently rounded bezel
   whose screen is exactly the video's shape (886 x 1920) with small corners, so every pixel of
   the recording shows — nothing letterboxed, nothing cut by the corners. */
.video-fig { position: relative; z-index: 2; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone.video-phone { aspect-ratio: auto; border-radius: 26px; padding: 8px; }
.phone.video-phone::after { display: none; }
.phone.video-phone .screen { height: auto; aspect-ratio: 886 / 1920; border-radius: 16px; }
.video-controls { display: flex; gap: 10px; align-items: center; justify-content: center; }
.vc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid rgba(246,239,226,.35); background: rgba(246,239,226,.08); color: var(--cream); font-weight: 700; font-size: 15px; }
.vc-btn svg { width: 16px; height: 16px; }
.vc-btn.vc-play { background: var(--amber); border-color: var(--amber); color: #241a05; }
.vc-btn.vc-mute { padding: 0; width: 44px; }
.vc-btn[hidden] { display: none; }
.hero-langs { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 18px; font-size: 14px; }
.hero-langs span { color: var(--n-muted); font-weight: 700; margin-right: 2px; }
.hero .hero-langs a { color: var(--cream); text-decoration: none; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: rgba(246,239,226,.1); border: 1px solid rgba(246,239,226,.18); }
.hero .hero-langs a:hover { background: rgba(246,239,226,.18); }
.phone.bare::after { display: none; }
.video-screen video, .video-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-screen video { background: #15123a; }
.video-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--amber); z-index: 3; }
.video-play.started .disc { display: none; }
.video-play .disc { transition: transform .2s; }
.video-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 16px 24%; border: 0; background: transparent; color: #fff; }
.video-play .disc { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: #241a05; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .2s; }
.video-play:hover .disc { transform: scale(1.06); }
.video-play .disc svg { width: 30px; height: 30px; margin-left: 4px; }
.video-caption { max-width: 300px; text-align: center; font-size: 13px; line-height: 1.45; color: var(--n-muted); }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section.alt { background: var(--surface2); }
.kicker { font: 700 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.section h2 { font-size: clamp(31px, 5vw, 50px); }
.section .intro { font-size: clamp(17px, 2vw, 19px); color: var(--muted); margin-top: 16px; max-width: 40em; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 44px; align-items: center; margin-top: 40px; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } .split.flip > :first-child { order: 2; } }

.steps { display: grid; gap: 14px; margin: 36px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 4px 16px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.steps .num { grid-row: span 2; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(160deg, var(--night-1), var(--night-2)); color: var(--amber); font: 700 22px/1 var(--display); }
.steps h3 { font-size: 21px; align-self: end; }
.steps p { color: var(--muted); font-size: 16px; }
.steps li.on { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }

.demo { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.demo-note { font-size: 13.5px; color: var(--faint); text-align: center; max-width: 30em; }
.demo-note strong { color: var(--muted); }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.link-btn { background: none; border: 0; padding: 6px 8px; min-height: 44px; color: var(--accent-ink); font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: .2em; }

.bullets { display: grid; gap: 18px; margin: 28px 0 0; padding: 0; list-style: none; }
.bullets li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.bullets .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.bullets .ic svg { width: 20px; height: 20px; }
.bullets strong { display: block; font-size: 17px; }
.bullets span { color: var(--muted); font-size: 15.5px; }

.features { display: grid; gap: 14px; margin-top: 40px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(160deg, var(--night-1), var(--night-2)); color: var(--amber); margin-bottom: 14px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { font-size: 20px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15.5px; }

.promise { display: grid; gap: 14px; margin-top: 36px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.promise div { padding: 20px; border-radius: var(--radius); border: 1px dashed var(--line-strong); }
.promise h3 { font-size: 19px; margin-bottom: 6px; }
.promise p { color: var(--muted); font-size: 15.5px; }
.more { margin-top: 26px; font-weight: 700; }

.plans { display: grid; gap: 18px; margin-top: 36px; }
@media (min-width: 800px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.plan.featured { background: linear-gradient(165deg, var(--night-1), var(--night-2)); color: var(--cream); border-color: transparent; }
.plan.featured p { color: #c9c2e6; }
.plan h3 { font-size: 24px; margin-bottom: 8px; }
.plan p { color: var(--muted); }
.plan .tag { display: inline-block; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-ink); }
.plan.featured .tag { background: rgba(244,184,96,.16); color: var(--amber); }
.fine { margin-top: 18px; font-size: 14.5px; color: var(--faint); }

.faq { margin-top: 30px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font: 600 19px/1.35 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.faq .answer { padding: 0 0 22px; color: var(--muted); max-width: 44em; }
.faq .answer p + p { margin-top: 10px; }

.cta-band { text-align: center; padding: clamp(72px, 11vw, 128px) 0; }
.cta-band h2 { font-size: clamp(32px, 5.4vw, 54px); font-weight: 700; }
.cta-band p { color: var(--n-muted); margin: 14px auto 0; max-width: 32em; }
.cta-band .stores { justify-content: center; margin-top: 30px; }
.cta-mark { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 22px; box-shadow: 0 20px 40px rgba(0,0,0,.35); }

/* ---------- footer ---------- */
.site-footer { padding: 48px 0 40px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.site-footer .top { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { color: var(--text2); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer .small { margin-top: 26px; font-size: 13px; color: var(--faint); display: grid; gap: 6px; }
.site-footer .small a { color: inherit; }

/* ---------- the app, in miniature ----------------------------------------------------------
 * .app follows the site theme (Paper / Bedtime), as the app follows the phone's; .app-dark is
 * the player, which is dark in both (as in the app). A book's accent arrives as --book. */
.app { --a-bg: var(--bg); --a-surface: var(--surface); --a-surface2: var(--surface2); --a-line: var(--line); --a-text: var(--text); --a-muted: var(--muted); --a-faint: var(--faint); --a-accent: var(--accent); --a-on: var(--on-accent); --a-soft: var(--accent-soft); --a-good: var(--good);
  background: var(--a-bg); color: var(--a-text); font-family: var(--body); font-size: 13px; line-height: 1.35; }
.app-dark { --a-bg: #14122b; --a-surface: #1e1b3a; --a-surface2: #29254d; --a-line: #35305f; --a-text: #f6efe2; --a-muted: #b7b0d6; --a-faint: #8c85b5; --a-accent: var(--book, #f4b860); --a-on: var(--book-on, #241a05); --a-good: #8fd6b0; color-scheme: dark; }
.app .status { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px 0 26px; height: 40px; font: 700 12px/1 var(--body); }
.app .status .sig { display: flex; gap: 4px; align-items: center; }
.app .status svg { width: 15px; height: 15px; }
.app .t-display { font-family: var(--display); font-weight: 600; }

/* snap demo */
.snap { width: min(320px, 86vw); }
.snap .screen { background: var(--a-bg); }
.snap-stage { position: absolute; inset: 0; display: flex; flex-direction: column; transition: opacity .35s ease, transform .35s ease; }
.snap-stage[hidden] { display: flex; opacity: 0; pointer-events: none; transform: translateY(8px); visibility: hidden; }
.cam { background: #07060f; color: #fff; }
.cam .status { color: #fff; }
.cam-head { text-align: center; padding: 6px 12px 0; }
.cam-head strong { display: block; font: 600 17px/1.2 var(--display); }
.cam-head span { font-size: 12px; color: #bdb6dc; }
.viewfinder { position: relative; margin: 12px 16px 0; flex: 1; min-height: 0; border-radius: 16px; overflow: hidden; background: #1b1830; }
.viewfinder img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.viewfinder .corners { position: absolute; inset: 12%; pointer-events: none; }
.viewfinder .corners i { position: absolute; width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.9); }
.viewfinder .corners i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.viewfinder .corners i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.viewfinder .corners i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.viewfinder .corners i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.viewfinder .label { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(8,7,20,.7); font-size: 12px; font-weight: 700; white-space: nowrap; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.strip { display: flex; gap: 6px; padding: 10px 16px 0; min-height: 66px; align-items: flex-end; }
.strip .th { position: relative; width: 40px; height: 54px; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.5); animation: drop .5s cubic-bezier(.2,1.4,.4,1) both; background: #2a2640; }
.strip .th img { width: 100%; height: 100%; object-fit: cover; }
.strip .th b { position: absolute; left: 2px; top: 2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: rgba(8,7,20,.8); font-size: 9.5px; line-height: 15px; text-align: center; }
.strip .slot { width: 40px; height: 54px; border-radius: 6px; border: 1.5px dashed rgba(255,255,255,.25); }
@keyframes drop { 0% { transform: translateY(-80px) scale(1.8); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.cam-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 18px 26px; }
.shutter { width: 70px; height: 70px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 4px; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform .12s; }
.shutter:active span { transform: scale(.88); }
.shutter:disabled { opacity: .4; }
.cam-controls > .shutter, .cam-controls > .cam-done { grid-column: 2; grid-row: 1; justify-self: center; }
.cam-count { grid-column: 1; grid-row: 1; }
.cam-done { border: 0; padding: 0 22px; min-height: 52px; min-width: 150px; border-radius: 999px; background: var(--amber); color: #241a05; font-weight: 800; font-size: 15px; white-space: nowrap; opacity: 0; visibility: hidden; transform: scale(.9); transition: opacity .25s, transform .25s; }
.cam-controls.done .shutter { opacity: 0; visibility: hidden; }
.cam-done.ready { opacity: 1; visibility: visible; transform: none; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(244,184,96,.55); } 50% { box-shadow: 0 0 0 8px rgba(244,184,96,0); } }
.cam-count { font-size: 12px; font-weight: 700; color: #bdb6dc; }

.bk { background: var(--a-bg); }
.bk-top { display: flex; justify-content: space-between; padding: 6px 16px 0; }
.bk-top span { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--a-line); display: grid; place-items: center; color: var(--a-muted); }
.bk-top svg { width: 15px; height: 15px; }
.bk-head { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 12px 16px 0; align-items: center; }
.bk-head img { width: 70px; height: 94px; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.bk-head h4 { margin: 0; font: 600 20px/1.1 var(--display); }
.bk-head p { color: var(--a-muted); font-size: 12.5px; margin-top: 4px; }
.bk-head .chip { display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: 999px; background: var(--a-surface2); font-size: 12px; font-weight: 700; }
.bk-progress { padding: 14px 16px 0; }
.bk-progress b { font: 700 17px/1 var(--display); }
.bk-progress small { color: var(--a-muted); }
.bk-bar { height: 6px; border-radius: 6px; background: var(--a-surface2); margin: 8px 0 4px; overflow: hidden; }
.bk-bar i { display: block; height: 100%; width: 0; background: var(--a-good); border-radius: 6px; transition: width .4s; }
.bk-play { margin: 12px 16px 0; height: 42px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 14px; background: var(--a-soft); color: var(--a-muted); transition: background .3s, color .3s; }
.bk-play.ready { background: var(--a-accent); color: var(--a-on); }
.bk-play svg { width: 14px; height: 14px; }
.bk-pages { padding: 14px 16px 0; display: grid; gap: 8px; }
.bk-page { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; background: var(--a-surface); border: 1px solid var(--a-line); }
.bk-page img { width: 38px; height: 50px; object-fit: cover; border-radius: 5px; }
.bk-page strong { font: 600 14px/1.2 var(--display); display: block; }
.bk-page small { font-size: 12px; color: var(--a-muted); }
.bk-page small.good { color: var(--a-good); font-weight: 700; }
.bk-page .st { width: 26px; height: 26px; display: grid; place-items: center; }
.bk-sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px 22px; background: var(--a-surface); border-top: 1px solid var(--a-line); border-radius: 18px 18px 0 0; display: flex; align-items: center; gap: 10px; font-weight: 800; font-family: var(--display); font-size: 13.5px; box-shadow: 0 -8px 24px rgba(0,0,0,.08); }
.bk-sheet .line { position: absolute; left: 0; top: 0; height: 3px; background: var(--a-accent); border-radius: 3px; transition: width .4s; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--a-line); border-top-color: var(--a-accent); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: var(--a-surface2); }
.ring .fill { stroke: var(--a-accent); stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.clock { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.clock b { color: var(--text); }
.clock .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.clock.live .dot { background: #e0483a; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.toast { position: absolute; left: 50%; top: 52px; transform: translate(-50%, -10px); opacity: 0; padding: 8px 14px; border-radius: 999px; background: #f6efe2; color: #2b2118; font-weight: 800; font-size: 13px; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: all .35s; z-index: 5; display: flex; gap: 7px; align-items: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 14px; height: 14px; color: #2f7d52; }

/* the player (dark in the app, in both themes) */
.player { width: min(340px, 88vw); }
.pl { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--a-bg); color: var(--a-text); }
.pl-top { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; padding: 4px 14px 10px; gap: 8px; }
.pl-top .round { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--a-surface); display: grid; place-items: center; }
.pl-top .round svg { width: 14px; height: 14px; }
.pl-chip { justify-self: center; padding: 6px 12px; border-radius: 999px; background: var(--a-surface); font-weight: 800; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pl-page { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #0b0a1c; }
.pl-page img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.pl-page img.fade { opacity: 0; }
.pl-over { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.words { align-self: stretch; padding: 10px 12px; border-radius: 12px; background: rgba(10,9,24,.78); color: #f6efe2; font: 600 15.5px/1.38 var(--display); white-space: pre-line; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.words[hidden] { display: none; }
.pills { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pill { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(20,18,43,.82); color: #f6efe2; font-weight: 700; font-size: 12px; }
/* Controls drawn at the app's size get a 44 px touch area around them. */
.pill::after, .sleep-opts button::after, button.round::after { content: ""; position: absolute; inset: -6px -2px; }
button.round::after { inset: -5px; }
.pill[aria-pressed="true"] { background: var(--a-accent); color: var(--a-on); }
.pill svg { width: 13px; height: 13px; }
.sleep-opts { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.sleep-opts[hidden] { display: none; }
.sleep-opts button { position: relative; height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid rgba(246,239,226,.25); background: rgba(20,18,43,.9); color: #f6efe2; font-size: 11.5px; font-weight: 700; }
.sleep-opts button[aria-pressed="true"] { background: var(--a-accent); color: var(--a-on); border-color: transparent; }
.pl-seek { padding: 4px 16px 0; }
.pl-seek input { width: 100%; margin: 0; accent-color: var(--a-accent); height: 44px; cursor: pointer; }
.pl-times { display: flex; justify-content: space-between; margin-top: -8px; font-size: 12px; color: var(--a-muted); font-variant-numeric: tabular-nums; }
/* The steps demo draws a thin bar, not the 44 px slider, so its times sit below it rather than tucked under. */
.pl-seek--bar .pl-times { margin-top: 4px; }
.pl-transport { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 8px 0 22px; }
.pl-transport .nav { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--a-surface); color: var(--a-text); display: grid; place-items: center; }
.pl-transport .nav:disabled { opacity: .35; }
.pl-transport .nav svg { width: 17px; height: 17px; }
.pl-transport .main { width: 66px; height: 66px; border-radius: 50%; border: 0; background: var(--a-accent); color: var(--a-on); display: grid; place-items: center; box-shadow: 0 0 0 6px color-mix(in srgb, var(--a-accent) 22%, transparent); }
.pl-transport .main svg { width: 26px; height: 26px; }
.pl-transport .main .i-play { margin-left: 3px; }
/* the library inside the demo phone, and the minimised player bar (StoryFloatingPlayer) */
.lib { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--a-bg); color: var(--a-text); overflow: hidden; }
.lib[hidden], .pl[hidden] { display: none; }
.lib-brand { padding: 2px 18px 0; font: 700 17px/1.2 var(--display); }
.lib-title { margin: 14px 18px 0; font: 600 24px/1.1 var(--display); }
.lib-sub { margin: 4px 18px 0; font-size: 12.5px; color: var(--a-muted); }
.lib-section { margin: 16px 18px 8px; font: 600 16px/1.2 var(--display); }
.lib-list { list-style: none; margin: 0; padding: 0 12px 90px; display: grid; gap: 8px; overflow-y: auto; }
.lib-card { width: 100%; display: grid; grid-template-columns: 58px minmax(0, 1fr) 44px; gap: 10px; align-items: center; padding: 8px; border-radius: 16px; border: 1px solid var(--a-line); background: var(--a-surface); color: inherit; text-align: left; }
.lib-card[aria-pressed="true"] { border-color: var(--book, var(--a-accent)); }
.lib-card img { width: 58px; height: 78px; object-fit: cover; border-radius: 6px; }
.lib-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lib-info strong { font: 600 15px/1.2 var(--display); margin-bottom: 3px; }
.lib-info small { font-size: 11.5px; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-play { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--book, var(--a-accent)); color: var(--book-on, var(--a-on)); }
.lib-play svg { width: 15px; height: 15px; margin-left: 2px; }
.mini { position: absolute; left: 10px; right: 10px; bottom: 14px; display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; align-items: center; gap: 4px; padding: 8px 8px 12px; border-radius: 18px; background: var(--a-surface2); border: 1px solid var(--a-line); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.mini[hidden] { display: none; }
.mini-open { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; border: 0; background: none; color: inherit; text-align: left; padding: 0; }
.mini-open img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.mini-open span { display: flex; flex-direction: column; min-width: 0; }
.mini-open strong { font: 600 13.5px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-open small { font-size: 11.5px; color: var(--a-muted); }
.mini-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; color: var(--a-text); }
.mini-btn svg { width: 16px; height: 16px; }
.mini-toggle { background: var(--book, var(--a-accent)); color: var(--book-on, var(--a-on)); justify-self: center; }
.mini-toggle .i-play { margin-left: 2px; }
.mini-bar { position: absolute; left: 14px; right: 14px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--a-line); overflow: hidden; }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--book, var(--a-accent)); }
.shelf { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.shelf button { width: 66px; padding: 0; border: 0; background: none; border-radius: 8px; transition: transform .2s; }
.shelf button img { width: 66px; height: 88px; object-fit: cover; border-radius: 6px; box-shadow: 0 6px 14px rgba(0,0,0,.18); outline: 3px solid transparent; outline-offset: 3px; transition: outline-color .2s; }
.shelf button[aria-pressed="true"] img { outline-color: var(--accent); }
.shelf button:hover { transform: translateY(-3px); }
.shelf-label { font-size: 13px; font-weight: 700; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.credit { font-size: 12.5px; color: var(--faint); text-align: center; }

/* cards that look like the app's sheets (voices, direction, languages) */
.sheet { width: 100%; max-width: 440px; border-radius: 24px; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { font-size: 19px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface2); gap: 2px; }
.seg button { border: 0; background: none; padding: 0 12px; min-height: 44px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.voice-list { list-style: none; margin: 0; padding: 6px 8px 8px; }
.voice-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 4px 4px 4px 10px; border-radius: 14px; }
.voice-row + .voice-row { border-top: 1px solid var(--line); border-radius: 0; }
.voice-row .pick { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 0; text-align: left; font-weight: 700; font-size: 16px; }
.voice-row .pick .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex-shrink: 0; }
.voice-row .pick[aria-pressed="true"] .tick { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.voice-row .pick .tick svg { width: 12px; height: 12px; opacity: 0; }
.voice-row .pick[aria-pressed="true"] .tick svg { opacity: 1; }
.voice-row .pick small { font-weight: 600; color: var(--faint); font-size: 12.5px; }
.sample { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 0; background: var(--surface2); color: var(--text); display: grid; place-items: center; }
.sample svg { width: 14px; height: 14px; }
.sample[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.eq { display: inline-flex; gap: 2px; align-items: center; height: 14px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; animation: bar .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.sheet-foot { padding: 10px 18px 16px; font-size: 13px; color: var(--faint); }
.dir-box { margin: 14px 18px 0; padding: 12px 14px; min-height: 76px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 15.5px; color: var(--text2); }
.dir-box::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1.1s steps(2) infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 0; }
.chips button { border: 1.5px solid var(--line-strong); background: var(--surface); padding: 0 14px; min-height: 44px; border-radius: 999px; font-weight: 700; font-size: 13.5px; }
.chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.hear { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; margin: 14px 18px 18px; padding: 10px; border-radius: 16px; background: var(--surface2); }
.hear img { width: 52px; height: 68px; object-fit: cover; border-radius: 6px; }
.hear strong { display: block; font: 600 15px/1.2 var(--display); }
.hear small { color: var(--muted); font-size: 12.5px; }
.play-round { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.play-round svg { width: 18px; height: 18px; }
.play-round .i-play { margin-left: 2px; }
.lang-demo { position: relative; }
.lang-page { position: relative; aspect-ratio: 3 / 4; max-height: 520px; width: 100%; background: #0b0a1c; overflow: hidden; }
.lang-page img { width: 100%; height: 100%; object-fit: cover; }
.lang-page .pl-chip { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(20,18,43,.85); color: #f6efe2; }
.lang-page .pl-over { bottom: 12px; }
.lang-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-chips button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 14px; line-height: 1.1; }
.lang-chips button small { font-size: 10.5px; font-weight: 700; color: var(--faint); letter-spacing: .02em; }
.lang-chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.lang-chips button[data-playable="false"] { border-style: dashed; color: var(--muted); }
.lang-inapp { padding: 0 16px 14px; font-size: 13.5px; color: var(--muted); }
.lang-inapp[hidden] { display: none; }
.written { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; max-width: 440px; font-size: 13px; }
.written span { width: 100%; text-align: center; font-weight: 700; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.written b { font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); color: var(--text2); }
.section.alt .written b { background: var(--bg); }
.player-langs { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.player-langs[hidden] { display: none; }
.progress-line { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--amber); width: 0; }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* the lock-screen box */
.lock-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; padding: clamp(24px, 5vw, 48px); border-radius: 28px; background: linear-gradient(165deg, var(--night-1), var(--night-2)); color: var(--cream); overflow: hidden; }
@media (min-width: 900px) { .lock-box { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; } }
.lock-box h2 { font-size: clamp(28px, 4.4vw, 42px); }
.lock-box .kicker { color: var(--amber); }
.lock-art { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lock-art .phone { width: min(250px, 70vw); }
.lock-art .status { justify-content: space-between; }
.app .status .lock-ic { width: 17px; height: 17px; }
.lock-caption { font-size: 13px; color: #c9c2e6; text-align: center; }
.platforms { display: grid; gap: 14px; margin-top: 24px; }
.platform { padding: 18px 20px; border-radius: 18px; background: rgba(246,239,226,.07); border: 1px solid rgba(246,239,226,.14); }
.platform p { color: #d9d3ef; font-size: 16px; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: rgba(244,184,96,.18); color: var(--amber); }
.badge.ios { background: rgba(246,239,226,.14); color: var(--cream); }

/* ---------- legal / doc pages ---------- */
.doc-head { padding: 48px 0 8px; }
.doc-head h1 { font-size: clamp(34px, 6vw, 52px); }
.doc-head .updated { color: var(--faint); margin-top: 12px; font-size: 14.5px; }
.doc { padding-bottom: 88px; }
.doc h2 { font-size: clamp(23px, 3.2vw, 29px); margin: 44px 0 12px; }
.doc h3 { font-size: 19px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text2); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; margin: 12px 0; }
.doc li + li { margin-top: 6px; }
.doc .summary { margin-top: 28px; padding: 22px 24px; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--line); }
.doc .summary h2 { margin-top: 0; font-size: 21px; }
.doc .summary ul { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; color: var(--text); background: var(--surface2); }
.doc .callout { margin: 18px 0; padding: 16px 18px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 14px 14px 0; }
.doc .steps-doc { counter-reset: s; list-style: none; padding: 0; }
.doc .steps-doc li { counter-increment: s; position: relative; padding-left: 44px; min-height: 32px; }
.doc .steps-doc li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; }
.contact-card { margin: 22px 0; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 12px; }
.contact-card .btn { justify-self: start; }
.toc { margin: 24px 0 0; padding: 16px 20px; border-radius: var(--radius-sm); border: 1px solid var(--line); columns: 2 220px; font-size: 15px; }
.toc a { color: var(--text2); display: flex; align-items: center; min-height: 44px; }
.toc br { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print { .site-header, .site-footer nav, .theme-toggle { display: none; } body { background: #fff; color: #000; } }
