/* HiWish website — the design of prototype v1: a night-time story lobby with a poster wall of real
   stories, one live video stage, and every "play" door leading to the app. Single dark theme,
   the App's brand tokens (gold is reserved for currency and never used here). */
:root {
  color-scheme: dark;
  --ink: #171414;
  --espresso: #231f20;
  --raised: #30282a;
  --wine: #382a2d;
  --coral: #b44b54;
  --coral-press: #9e3f48;
  --rose: #f1a29e;
  --cream: #f7f0ea;
  --mist: #c0b1af;
  --faint: rgba(192, 177, 175, 0.62);
  --line: rgba(247, 240, 234, 0.08);
  --line-strong: #493c3f;
  --scrim: rgba(10, 8, 8, 0.62);
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", "Noto Serif", Georgia, serif;
  --body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Noto Sans", sans-serif;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 999px;
}
/* Scripts Fraunces/Figtree don't cover: let the system pick a good face. */
:lang(zh-Hans), :lang(zh-Hant), :lang(ja), :lang(ko), :lang(th), :lang(ar) {
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--cream); font-family: var(--body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.min0 { min-width: 0; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .ico[data-flip] { transform: scaleX(-1); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--cream); color: var(--ink); padding: 8px 14px; border-radius: var(--r-full); font-weight: 600; }
.skip:focus { top: 12px; }

/* Header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(23, 20, 20, 0.97); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 23px; letter-spacing: -0.02em; line-height: 1; flex: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; flex: none; }
@media (max-width: 420px) { .logo-word { display: none; } }
.nav { display: flex; gap: 22px; font-size: 14px; color: var(--mist); }
.nav a { padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--cream); }
.nav a.on { color: var(--cream); border-bottom-color: var(--rose); }
.top-sp { flex: 1; }
.search-pill { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r-full); background: var(--espresso); color: var(--faint); font-size: 14px; width: 220px; border: 1px solid var(--line); min-width: 0; }
.search-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-pill:hover { border-color: var(--line-strong); color: var(--mist); }
.icon-btn { width: 38px; height: 38px; border-radius: var(--r-full); display: none; align-items: center; justify-content: center; background: var(--espresso); flex: none; }
@media (max-width: 1080px) { .search-pill { display: none; } .icon-btn { display: inline-flex; } }
@media (max-width: 860px) { .nav { display: none; } .top .wrap { gap: 10px; height: 56px; } }
/* .top prefix: .btn (declared later) would otherwise show it again; phones have the app bar */
@media (max-width: 420px) { .top .get-app { display: none; } }

/* Language menu (works without JavaScript) */
.lang-menu { position: relative; flex: none; }
.lang-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: var(--r-full); background: var(--espresso); color: var(--mist); font-size: 13.5px; border: 1px solid var(--line); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { color: var(--cream); }
.lang-menu[open] summary { border-color: rgba(241, 162, 158, .45); color: var(--cream); }
.lang-menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 40; margin: 0; padding: 6px; list-style: none; width: 220px; max-height: min(70vh, 520px); overflow-y: auto; background: var(--espresso); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.lang-menu li a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--mist); }
.lang-menu li a:hover { background: var(--raised); color: var(--cream); }
.lang-menu li a[aria-current] { color: var(--rose); background: var(--wine); }
@media (max-width: 560px) { .lang-menu summary span { display: none; } .lang-menu summary { width: 38px; padding: 0; justify-content: center; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: var(--r-full); font-weight: 600; font-size: 15px; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active { transform: scale(0.98); }
.btn-cta { background: var(--coral); color: var(--cream); }
.btn-cta:hover { background: var(--coral-press); }
.btn-ghost { border: 1px solid rgba(247, 240, 234, 0.22); color: var(--cream); }
.btn-ghost:hover { background: var(--espresso); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-round { width: 44px; padding: 0; }

/* Sections */
main { min-height: 70vh; }
.sec { padding-block: 44px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-h h2 { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.01em; }
.sec-h a { color: var(--mist); font-size: 14px; white-space: nowrap; }
.sec-h a:hover { color: var(--rose); }
.sec-sub { color: var(--mist); font-size: 14.5px; margin-top: 4px; }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rose); font-weight: 600; }
.more-row { display: flex; justify-content: center; margin-top: 28px; }
.latest-stories[hidden] { display: none; }
.latest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; list-style: none; margin: 0; padding: 0; }
.latest-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.latest-list a { min-width: 0; overflow-wrap: anywhere; }
.latest-list a:hover { color: var(--rose); }
.latest-list time { color: var(--mist); font-size: 12px; flex: none; }
@media (max-width: 860px) { .latest-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .latest-list li { flex-direction: column; gap: 3px; } }

/* Hero: copy and "Now playing" strip on the left, one video stage sized to the screen on the right */
body[data-page="home"] main { overflow-x: clip; }
body[data-page="home"] .top .get-app { background: transparent; border: 1px solid rgba(247, 240, 234, 0.22); }
body[data-page="home"] .top .get-app:hover { background: var(--espresso); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); grid-template-areas: "copy stage" "now stage"; column-gap: 56px; align-content: center; padding-block: 32px 28px; }
.hero-copy { grid-area: copy; align-self: end; }
.kicker { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid rgba(241, 162, 158, 0.35); color: var(--rose); font-size: 13px; font-weight: 600; }
.kicker span { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
.hero h1 { font-family: var(--display); font-weight: 400; line-height: 1.04; letter-spacing: -0.03em; margin: 22px 0 0; }
.h1a { display: block; font-size: clamp(26px, 3.3vw, 44px); color: var(--mist); }
.h1b { display: block; font-size: clamp(40px, 5.8vw, 76px); color: var(--cream); margin-top: 4px; }
.h1b em { position: relative; display: inline-block; font-style: italic; color: var(--rose); }
.hero .wave { position: absolute; inset-inline: 0; bottom: -0.1em; width: 100%; height: 0.14em; overflow: visible; }
.hero .wave path { fill: none; stroke: var(--rose); stroke-width: 2; stroke-linecap: round; opacity: 0.7; }
/* No true italics in these scripts: browsers would only slant the glyphs. */
:lang(zh-Hans) .hero h1, :lang(zh-Hant) .hero h1, :lang(ja) .hero h1, :lang(ko) .hero h1, :lang(th) .hero h1, :lang(ar) .hero h1 { letter-spacing: 0; line-height: 1.16; }
:lang(zh-Hans) .h1b, :lang(zh-Hant) .h1b, :lang(ja) .h1b, :lang(ko) .h1b, :lang(th) .h1b, :lang(ar) .h1b { font-weight: 600; }
:lang(zh-Hans) .h1b em, :lang(zh-Hant) .h1b em, :lang(ja) .h1b em, :lang(ko) .h1b em, :lang(th) .h1b em, :lang(ar) .h1b em { font-style: normal; }
.lead { color: var(--mist); font-size: clamp(16px, 1.5vw, 19px); max-width: 30em; margin-top: 18px; }
.hero .lead { margin-top: 26px; max-width: 26em; line-height: 1.7; text-wrap: pretty; }
.hero .row { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-top: 30px; }
#try-stories { scroll-margin-top: 90px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.text-link .ico { color: var(--rose); transition: transform .15s; }
.text-link:hover .ico { transform: translateX(3px); }
[dir="rtl"] .text-link:hover .ico { transform: scaleX(-1) translateX(3px); }
.now { grid-area: now; align-self: start; min-width: 0; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.now-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; max-width: 460px; margin-bottom: 10px; }
.now-h { font-size: 13px; color: var(--faint); }
.now-total { color: var(--rose); margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.thumb-controls { display: flex; align-items: center; gap: 6px; }
.thumb-controls[hidden] { display: none; }
.thumb-range { font-size: 12px; color: var(--mist); font-variant-numeric: tabular-nums; white-space: nowrap; margin-inline-end: 4px; }
.thumb-arrow { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border: 1px solid var(--line-strong); border-radius: var(--r-full); }
.thumb-arrow:not(:disabled):hover { background: var(--raised); color: var(--rose); }
.thumb-arrow:disabled { opacity: .3; cursor: default; }
.thumb-prev .ico { transform: scaleX(-1); }
[dir="rtl"] .thumb-prev .ico[data-flip] { transform: none; }
.thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 5); gap: 10px; max-width: 460px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; padding-block: 3px 8px; }
.thumb { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: start; scroll-snap-align: start; }
.thumb:focus-visible { outline-offset: -2px; }
.thumb-img { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--raised); border: 2px solid transparent; transition: border-color .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb b { font-size: 12.5px; font-weight: 500; color: var(--mist); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb.on .thumb-img { border-color: var(--rose); }
.thumb.on b, .thumb:hover b { color: var(--cream); }
.thumb i { position: absolute; inset-inline-start: 0; bottom: 0; height: 3px; background: var(--rose); width: 0; }
/* The stage is never taller than the screen below the header, so its top line and subtitles stay in view. */
.stage { grid-area: stage; position: relative; isolation: isolate; justify-self: end; width: min(100%, max(320px, calc((100vh - 136px) * 3 / 4))); width: min(100%, max(320px, calc((100svh - 136px) * 3 / 4))); }
.stage-glow { position: absolute; inset: -14% -20%; z-index: -1; background: center / cover no-repeat; filter: blur(72px) saturate(1.3); opacity: 0.32; pointer-events: none; }
.stage-main { position: relative; display: block; }
.stage-info { position: absolute; inset-inline: 0; top: 0; padding: 16px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; z-index: 2; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(247,240,234,.5); }
.who b { display: block; font-weight: 600; font-size: 14px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.who span { display: block; font-size: 12px; color: var(--cream); opacity: .85; text-shadow: 0 1px 6px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.stage .cue { bottom: 80px; }
.stage .snd { bottom: 76px; }
/* .stage prefix: .composer (story page, declared later) would otherwise win */
.stage .stage-ask { position: absolute; z-index: 3; inset-inline: 14px; bottom: 14px; width: auto; height: 48px; margin: 0; background: rgba(23, 20, 20, 0.74); border-color: rgba(247, 240, 234, 0.16); color: var(--mist); }
.stage .stage-ask .send { width: 34px; height: 34px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "stage" "now"; padding-top: 24px; }
  .hero-copy { align-self: auto; }
  .stage { justify-self: center; width: min(100%, 440px); margin-top: 32px; }
  .now { margin-top: 18px; padding-top: 0; border-top: 0; }
  .now-head { max-width: none; }
  .thumbs { max-width: none; grid-auto-columns: calc((100% - 30px) / 4); }
}
@media (max-width: 560px) { .thumbs { grid-auto-columns: calc((100% - 20px) / 3); } }
@media (pointer: coarse) { .thumb-arrow { width: 44px; height: 44px; } }

/* Player */
.player { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; background: var(--raised); max-width: 100%; }
.player video, .player > img { width: 100%; height: 100%; object-fit: cover; }
.player::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,20,20,.42) 0%, rgba(23,20,20,0) 26%, rgba(23,20,20,0) 58%, rgba(23,20,20,.88) 100%); pointer-events: none; }
.cue { position: absolute; inset-inline: 18px 64px; bottom: 20px; z-index: 2; border-inline-start: 2px solid var(--rose); padding-inline-start: 10px; font-size: 15px; line-height: 1.4; text-shadow: 0 1px 8px rgba(0,0,0,.75); min-height: 1.4em; transition: opacity .2s; }
.cue:empty { opacity: 0; }
.snd { position: absolute; inset-inline-end: 14px; bottom: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: rgba(23,20,20,.7); display: flex; align-items: center; justify-content: center; }
.snd:hover { background: rgba(23,20,20,.8); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 28px 18px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 196px; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 560px) { .rail { grid-auto-columns: 150px; gap: 12px; } }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.grid > .card { content-visibility: auto; contain-intrinsic-size: auto 380px; }
.card[hidden] { display: none; }
.poster { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--raised); }
.poster img, .poster video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .4s ease; }
@media (hover: hover) { .card:hover .poster img { transform: scale(1.03); } }
.vbadge { position: absolute; z-index: 2; inset-inline-end: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(23,20,20,.6); display: flex; align-items: center; justify-content: center; }
.vbadge .ico { width: 12px; height: 12px; fill: var(--cream); stroke: none; }
.dbadge { position: absolute; z-index: 2; inset-inline-start: 8px; top: 8px; display: inline-flex; align-items: center; height: 22px; padding-inline: 8px; border-radius: var(--r-full); background: rgba(23,20,20,.62); border: 1px solid rgba(241,162,158,.55); color: var(--cream); font-size: 11.5px; font-weight: 600; }
.rank { position: absolute; z-index: 2; inset-inline-start: 10px; bottom: 6px; font-family: "Fraunces", Georgia, serif; font-size: 40px; line-height: 1; font-weight: 600; color: var(--cream); text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.poster.ranked::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(23,20,20,.7)); }
.card-t { display: -webkit-box; font-weight: 600; font-size: 14.5px; line-height: 1.32; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-m { display: block; font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.card-h { display: -webkit-box; font-size: 13px; line-height: 1.4; color: var(--mist); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: -4px; }
.go { position: absolute; z-index: 2; inset-inline-start: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding-inline: 10px 12px; border-radius: var(--r-full); background: var(--coral); color: var(--cream); font-size: 12.5px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.go .ico { width: 10px; height: 10px; fill: currentColor; stroke: none; }
.go:hover { background: var(--coral-press); }

/* Chips and tags */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: var(--r-full); background: var(--espresso); color: var(--mist); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; }
.chip:hover { color: var(--cream); }
.chip.on { background: var(--wine); color: var(--rose); border-color: rgba(241, 162, 158, 0.35); }
.chip small { font-size: 12px; color: var(--faint); }
.tagline { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { height: 26px; padding: 0 10px; border-radius: var(--r-full); font-size: 12.5px; display: inline-flex; align-items: center; background: var(--espresso); color: var(--mist); }
a.tag:hover { color: var(--rose); }

/* Characters */
.ppl { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.person { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.person img, .avatar-ph { display: block; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--raised); transition: transform .2s; }
.person:hover img { transform: translateY(-3px); }
.person b { font-size: 14px; font-weight: 600; }
.person span { font-size: 12px; color: var(--faint); margin-top: -6px; }
/* Full index under the grids: plain links to every story or character */
/* "Stories by language" links, the native-voice badge and the story summary line */
.lang-links { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 4px 0 14px; padding-bottom: 4px; font-size: 14px; white-space: nowrap; }
.lang-links > .ico { width: 16px; height: 16px; color: var(--faint); }
.lang-label { flex: none; color: var(--faint); font-size: 13px; }
.lang-link { flex: none; color: var(--mist); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.lang-link + .lang-link::before { content: "·"; display: inline-block; margin-inline-end: 10px; color: var(--faint); text-decoration: none; }
.lang-link:hover { color: var(--cream); text-decoration-color: currentColor; }
.lang-link.on { color: var(--rose); text-decoration-color: currentColor; }
.lang-link small { font-size: 12px; color: var(--faint); }
.card-m .badge { color: var(--rose); font-weight: 600; }
.ai-summary { margin-top: 12px; padding: 10px 14px; border-inline-start: 3px solid var(--rose); background: var(--espresso); border-radius: var(--r-sm); color: var(--mist); font-size: 14px; line-height: 1.6; }
.index-sec { padding-top: 12px; }
.index-list { columns: 3 240px; column-gap: 28px; list-style: none; margin: 0; padding: 0 6px 0 0; max-height: 26rem; overflow-y: auto; overscroll-behavior: contain; }
.index-list li { break-inside: avoid; padding-block: 5px; border-bottom: 1px solid var(--line); }
.index-list a { color: var(--mist); font-size: 14px; }
.index-list a:hover { color: var(--rose); }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.char-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 14px; border-radius: var(--r-md); background: var(--espresso); border: 1px solid var(--line); align-items: center; }
.char-card:hover { border-color: var(--line-strong); }
.char-card img, .char-card .avatar-ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.char-card b { font-weight: 600; }
.char-card p { font-size: 13px; color: var(--mist); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.char-card small { color: var(--faint); font-size: 12px; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.step { padding: 26px 24px; border-radius: var(--r-lg); background: var(--espresso); border: 1px solid var(--line); }
.step .n { font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: 34px; color: var(--rose); line-height: 1; }
.step h3 { font-size: 18px; font-weight: 600; margin: 14px 0 6px; }
.step p { color: var(--mist); font-size: 14.5px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--rose); font-size: 20px; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--mist); margin-top: 10px; max-width: 46em; }
.faq a { color: var(--rose); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) { .faq-wrap { grid-template-columns: 1fr; gap: 20px; } }

/* App band */
.band { margin-block: 20px 56px; border-radius: 28px; background: var(--wine); padding: 40px clamp(20px, 4vw, 52px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.band-icon { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 18px; }
.band h2 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -0.02em; line-height: 1.08; }
.band h2 em { color: var(--rose); }
.band p { color: var(--mist); margin-top: 12px; max-width: 34em; }
.stores { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding-inline: 14px 16px; border-radius: 12px; border: 1px solid rgba(247,240,234,.22); background: rgba(23,20,20,.35); text-align: start; }
.store:hover { border-color: rgba(247,240,234,.4); }
.store .ico { width: 24px; height: 24px; }
.store small { display: block; font-size: 11px; color: var(--faint); line-height: 1.2; }
.store b { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.store.main { background: var(--coral); border-color: var(--coral); color: var(--cream); }
.store.main:hover { background: var(--coral-press); }
.store.main small { color: rgba(247,240,234,.85); }
.soon { margin-inline-start: 6px; font-size: 11px; font-weight: 600; color: var(--rose); border: 1px solid rgba(241,162,158,.4); border-radius: var(--r-full); padding: 1px 7px; }
/* The QR image carries its own white background and quiet zone, so it scans on the dark page. */
.qr { width: 132px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; line-height: 1.35; text-align: center; }
.qr img { width: 132px; height: 132px; border-radius: 12px; }
@media (max-width: 700px) { .band { grid-template-columns: 1fr; } .band .qr { display: none; } }

/* Lists and search */
.page-h { padding-block: 32px 8px; display: flex; flex-direction: column; gap: 16px; }
.page-h h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.025em; line-height: 1.05; }
.dek { color: var(--mist); max-width: 46em; font-size: 16px; }
.field { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: var(--r-full); background: var(--espresso); border: 1px solid var(--line); max-width: 560px; scroll-margin-top: 90px; }
.field:focus-within { border-color: rgba(241,162,158,.5); }
.field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; color: var(--cream); font: inherit; font-size: 15px; outline: none; }
.field input::placeholder { color: var(--faint); }
.count { color: var(--faint); font-size: 13px; margin: 18px 0 16px; }
.empty { padding: 60px 0; text-align: center; color: var(--mist); }
.empty b { display: block; font-family: var(--display); font-size: 24px; font-weight: 400; color: var(--cream); margin-bottom: 6px; }
.nf { padding-block: 80px; }
.more-link { margin-top: 18px; font-size: 15px; }
.more-link a { color: var(--rose); display: inline-flex; align-items: center; gap: 6px; }
.more-link a:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-h .more-link { margin-top: 0; }
@media (max-width: 560px) {
  .list-h { padding-block: 16px 4px; gap: 12px; }
  .list-h h1 { font-size: 28px; }
  .list-h .dek, .list-h .lang-links { display: none; }
  .list-h + .count { margin: 4px 0 12px; }
}
.landing .page-h { max-width: 46em; }
.landing .lead { margin-top: 0; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.feature-list li { padding: 18px 20px; border-radius: var(--r-lg); background: var(--espresso); border: 1px solid var(--line); color: var(--mist); font-size: 15px; }
.feature-list b { display: block; color: var(--cream); font-size: 16px; margin-bottom: 4px; }
.facts-wrap { overflow-x: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r-md); }
.facts { width: 100%; border-collapse: collapse; font-size: 15px; }
.facts th, .facts td { text-align: start; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts thead th { background: var(--espresso); color: var(--faint); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.facts tbody th { color: var(--cream); font-weight: 600; width: 28%; min-width: 140px; }
.facts td { color: var(--mist); }
.facts a { color: var(--rose); }
.facts code { color: var(--cream); font-family: var(--body); }
.live-more { display: flex; justify-content: center; margin-top: 32px; }
.live-more[hidden] { display: none; }
.live-more .btn[disabled] { opacity: .6; cursor: default; }
.live-status { padding-block: 80px; text-align: center; color: var(--faint); }

/* Breadcrumbs */
.crumbs { padding-top: 22px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; color: var(--faint); font-size: 13px; }
.crumbs li + li::before { content: "/"; margin-inline-end: 8px; }
.crumbs a:hover { color: var(--rose); }
.crumbs span[aria-current] { color: var(--mist); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.page-h .crumbs { padding-top: 0; }
/* Phones: the current page is the h1 right below; a long title only wrapped onto a second line */
@media (max-width: 560px) { .crumbs li:last-child:not(:first-child) { display: none; } }

/* Story page */
.story { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); padding-block: 18px 40px; align-items: start; }
.story .player { aspect-ratio: 9 / 16; }
.watch-link { margin-top: 12px; font-size: 14px; }
.watch-link a { display: inline-flex; align-items: center; gap: 6px; color: var(--rose); }
.watch-link a:hover { color: var(--cream); }
.watch-link svg { width: 16px; height: 16px; }
.watch { max-width: 760px; margin: 0 auto; padding: 24px 0 64px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.watch h1 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; }
.watch .player { width: min(100%, 380px); aspect-ratio: 9 / 16; }
.watch .player video { object-fit: contain; }
.watch .cue, .watch .snd { bottom: 66px; }
.watch .summary { max-width: 42em; }
.media-col { position: sticky; top: 84px; }
.gal { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gal button { position: relative; width: 62px; aspect-ratio: 3 / 4; border-radius: 9px; overflow: hidden; flex: none; opacity: .55; border: 2px solid transparent; }
.gal button.on { opacity: 1; border-color: var(--rose); }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.gal .vbadge { inset-inline-end: 4px; top: 4px; width: 20px; height: 20px; }
.info { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.info h1 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.06; letter-spacing: -0.02em; }
.summary { font-size: 17px; color: var(--cream); line-height: 1.6; max-width: 38em; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.info .actions .btn-cta { padding: 0 28px; height: 50px; font-size: 16px; }
.info .actions .btn-ghost { height: 50px; }
.info .actions .btn-round { width: 50px; }
.cast { display: grid; gap: 10px; }
.who-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: var(--espresso); border: 1px solid var(--line); }
.who-card img, .who-card .avatar-ph { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
@media (max-width: 560px) {
  .who-card { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .who-card img, .who-card .avatar-ph { width: 52px; height: 52px; }
  .who-card > .btn { grid-column: 2; justify-self: start; }
}
.who-card b { font-weight: 600; font-size: 16px; }
.who-card p { color: var(--mist); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.who-card a.more { color: var(--rose); font-size: 13px; }
.label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 10px; }
.scene { border-radius: var(--r-lg); background: var(--espresso); border: 1px solid var(--line); padding: 22px 22px 16px; }
.scene-text { position: relative; max-height: 13.5em; overflow: hidden; font-family: var(--display); font-size: 17px; line-height: 1.62; color: var(--cream); white-space: pre-line; }
.scene-text::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 5em; background: linear-gradient(180deg, rgba(35,31,32,0), var(--espresso)); }
/* Under the story title: the lead's last line from the opening, then the first-round choices */
.hook { display: grid; gap: 14px; scroll-margin-top: 72px; }
.hook-line { font-family: var(--display); font-size: 17px; line-height: 1.55; color: var(--cream); border-inline-start: 2px solid var(--rose); padding-inline-start: 12px; }
.hook-line b { display: block; font-family: var(--body); font-size: 12px; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; margin-bottom: 2px; }
.hook .choices { margin-top: 0; }
.choices { display: grid; gap: 8px; margin-top: 16px; }
.choices .label { margin-bottom: 2px; }
.choice { text-align: start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--raised); color: var(--cream); font: inherit; font-size: 15px; line-height: 1.45; cursor: pointer; }
.choice:hover, .choice:focus-visible { border-color: var(--rose); }
/* Story "try it": the visitor's lines on the end side, the lead's in the log like the hook line. */
/* Try-it panel (story pages with a demo script): a chat with the lead, set apart from the page. */
.play { position: relative; display: grid; gap: 14px; padding: 18px 18px 14px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(241,162,158,.10), rgba(241,162,158,0) 140px), var(--espresso); border: 1px solid rgba(241,162,158,.45); box-shadow: 0 0 0 4px rgba(241,162,158,.06), 0 18px 40px rgba(0,0,0,.35); scroll-margin-top: 72px; }
.play-h { display: flex; align-items: center; gap: 12px; }
.play-h img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--coral); }
.play-h .min0 { flex: 1; }
.play-h b { display: block; font-size: 16px; font-weight: 600; }
.play-h span { display: block; color: var(--mist); font-size: 13px; }
.play-h .play-tag { flex: none; display: inline-flex; align-items: center; height: 26px; padding-inline: 10px; border-radius: var(--r-full); background: var(--coral); color: var(--cream); font-size: 12.5px; font-weight: 700; }
.play-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.play-steps li { flex: 1; height: 3px; border-radius: 3px; background: var(--line-strong); transition: background .3s ease; }
.play-steps li.on { background: var(--coral); }
.play-log { display: grid; gap: 10px; }
.dm-n { color: var(--mist); font-size: 14.5px; line-height: 1.6; font-style: italic; padding-inline: 4px; }
.dm-d { display: flex; align-items: flex-start; gap: 8px; max-width: 92%; }
.dm-d img, .dm-av { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--raised); }
.dm-d p { padding: 9px 13px; border-radius: 4px 16px 16px 16px; background: var(--raised); color: var(--cream); font-family: var(--display); font-size: 16.5px; line-height: 1.5; }
[dir="rtl"] .dm-d p { border-radius: 16px 4px 16px 16px; }
.dm-d b { display: block; font-family: var(--body); font-size: 11.5px; letter-spacing: 0.06em; color: var(--rose); font-weight: 600; margin-bottom: 2px; }
.dm-me { justify-self: end; max-width: 82%; padding: 9px 13px; border-radius: 16px 4px 16px 16px; background: var(--coral); color: var(--cream); font-size: 15px; line-height: 1.45; }
[dir="rtl"] .dm-me { border-radius: 4px 16px 16px 16px; }
.dm-img { margin: 2px 0 2px 40px; width: min(220px, 62%); aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--raised); }
[dir="rtl"] .dm-img { margin: 2px 40px 2px 0; }
.dm-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.play .choices { margin-top: 0; padding: 12px; border-radius: var(--r-md); background: var(--ink); }
.play .choice { border-color: rgba(241,162,158,.55); }
.play .choice:hover, .play .choice:focus-visible { background: rgba(241,162,158,.12); border-color: var(--coral); }
.choices.nudge { animation: nudge 1.2s ease; }
@keyframes nudge { 0%, 100% { box-shadow: none; } 25%, 60% { box-shadow: 0 0 0 3px var(--coral); } }
.play .composer { margin-top: 0; }
.play-note { color: var(--faint); font-size: 12.5px; text-align: center; }
@media (max-width: 560px) { .play { padding: 14px 12px 12px; } .play .choices { padding: 10px; } .dm-d { max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .choices.nudge { animation: none; box-shadow: 0 0 0 3px var(--coral); } }
.dm-me.act, .choice.act { font-style: italic; }
.dm-in { animation: dm-in 0.35s ease both; }
@keyframes dm-in { from { opacity: 0.15; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.ios-exit { display: grid; gap: 12px; }
.ios-t { font-weight: 600; color: var(--cream); }
.notify { display: grid; gap: 8px; }
.notify label { font-size: 14px; color: var(--mist); }
.notify-row { display: flex; gap: 8px; }
.notify input { flex: 1; min-width: 0; height: 40px; padding-inline: 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--ink); color: var(--cream); font: inherit; }
.notify input:focus-visible { outline: 2px solid var(--rose); outline-offset: 1px; }
.notify small { font-size: 12px; color: var(--faint); }
.notify-msg { min-height: 1.4em; font-size: 13px; color: var(--rose); }
.android-alt { font-size: 13px; color: var(--mist); }
.composer { display: flex; align-items: center; gap: 10px; margin-top: 14px; height: 52px; padding-inline: 18px 8px; border-radius: var(--r-full); background: var(--ink); border: 1px solid var(--line-strong); width: 100%; text-align: start; color: var(--faint); }
.composer:hover { border-color: rgba(241,162,158,.5); }
.composer-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer .send { width: 38px; height: 38px; border-radius: 50%; background: var(--coral); color: var(--cream); display: flex; align-items: center; justify-content: center; }
.scene small { display: block; color: var(--faint); font-size: 12.5px; margin-top: 10px; text-align: center; }
.meta { color: var(--faint); font-size: 13px; }
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .media-col { position: static; }
  /* Phones: a third of the screen for the video, so the title, the lead's line and the choices fit the first screen */
  .story .player { aspect-ratio: 4 / 5; max-height: min(36vh, 360px); width: 100%; }
  .story .player video, .story .player > img { object-position: center 20%; }
  .media-col { position: relative; top: auto; }
  .media-col .gal { position: absolute; z-index: 3; top: 10px; inset-inline-start: 10px; max-width: calc(100% - 20px); margin-top: 0; gap: 6px; }
  .media-col .gal button { width: 34px; border-radius: 7px; border-width: 1.5px; }
  .media-col .gal .vbadge { display: none; }
  .story .tagline > :nth-child(n+3) { display: none; }
  .story .info { gap: 16px; }
  .info h1 { font-size: 26px; line-height: 1.15; }
}

/* Character page */
.cp { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding-block: 28px 20px; align-items: center; }
.cp > img, .cp > .avatar-ph { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; }
.cp h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.03em; line-height: 1; }
.cp .stat { color: var(--faint); margin-top: 10px; font-size: 14px; }
.cp .bio { color: var(--mist); max-width: 40em; margin-top: 16px; font-size: 16px; }
.cp .actions { margin-top: 22px; }
details.more-bio { margin-top: 14px; max-width: 40em; }
details.more-bio summary { cursor: pointer; color: var(--rose); font-size: 14px; list-style: none; }
details.more-bio summary::-webkit-details-marker { display: none; }
details.more-bio p { color: var(--mist); margin-top: 10px; font-size: 15px; }
details.more-bio b { color: var(--cream); }
@media (max-width: 700px) { .cp { grid-template-columns: 1fr; gap: 20px; } .cp > img, .cp > .avatar-ph { width: 132px; height: 132px; } }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; padding-block: 16px 56px; }
.card-box { padding: 30px; border-radius: var(--r-lg); background: var(--espresso); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 90px; }
.card-box h2 { font-family: var(--display); font-weight: 500; font-size: 26px; }
.card-box p { color: var(--mist); }
.card-box .co { color: var(--cream); font-weight: 600; }
.mail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mail code { font-family: var(--body); font-size: 17px; color: var(--cream); user-select: all; }
.legal-list { display: grid; gap: 2px; margin-top: 8px; }
.legal-list a { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--cream); }
.legal-list a:hover { color: var(--rose); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 40px 30px; margin-top: 20px; }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot-h { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; color: var(--mist); }
.foot ul a:hover, .foot ul button:hover { color: var(--rose); }
.foot p { color: var(--faint); font-size: 14px; margin-top: 12px; max-width: 22em; }
.foot .social { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 16px; font-size: 13px; }
.foot .social span { color: var(--faint); width: 100%; }
.foot .social a { color: var(--mist); }
.foot .social a:hover { color: var(--rose); }
.legal-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
@media (max-width: 760px) { .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot > div:first-child { grid-column: 1 / -1; } }

/* Mobile app bar */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 25; padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); background: rgba(23,20,20,.98); border-top: 1px solid var(--line); align-items: center; gap: 10px; }
  .mbar .app-ico { width: 40px; height: 40px; border-radius: 10px; flex: none; }
  .mbar .t { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
  .mbar .t b { display: block; font-size: 14px; }
  .mbar .t span { color: var(--faint); }
  .mbar .btn-cta.wide { flex: 1; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* "Get the app" dialog */
.gate { position: fixed; inset: 0; z-index: 60; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .18s ease; }
.gate-card { position: relative; width: min(520px, 100%); border-radius: 24px; background: var(--espresso); border: 1px solid var(--line-strong); padding: 26px; display: flex; flex-direction: column; gap: 20px; animation: rise .22s ease; max-height: calc(100vh - 40px); overflow-y: auto; }
.gate-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; padding-inline-end: 32px; }
.gate-head img { width: 64px; height: 84px; border-radius: 10px; object-fit: cover; }
.gate-head img.round { height: 64px; border-radius: 50%; }
.gate-head .app-mark { width: 64px; height: 64px; border-radius: 15px; }
.gate h2 { font-family: var(--display); font-weight: 500; font-size: 23px; line-height: 1.15; }
.gate-head p { color: var(--mist); font-size: 14.5px; margin-top: 6px; }
.gate-shots { display: flex; justify-content: center; gap: 12px; }
.gate-shots img { width: auto; height: 280px; max-width: calc(50% - 6px); object-fit: contain; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--ink); }
.gate-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px; border-radius: 16px; background: var(--ink); }
.gate-body.no-qr { grid-template-columns: 1fr; }
.gate-body .stores { flex-direction: column; margin: 0; }
.gate-body .store { width: 100%; }
.gate-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--faint); }
.gate-foot button { color: var(--rose); font-weight: 600; }
.x { position: absolute; inset-inline-end: 16px; top: 16px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--raised); }
.x:hover { background: var(--wine); }
.perks { display: grid; gap: 8px; font-size: 14px; color: var(--mist); list-style: none; margin: 0; padding: 0; }
.perks li { display: flex; gap: 10px; align-items: flex-start; }
.perks .ico { width: 16px; height: 16px; color: var(--rose); margin-top: 3px; }
@media (max-width: 760px) {
  .gate { align-items: flex-end; padding: 0; }
  .gate-card { width: 100%; border-radius: 24px 24px 0 0; padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px)); animation: up .26s ease; max-height: 88vh; }
  .gate-card::before { content: ""; width: 38px; height: 4px; border-radius: 4px; background: var(--line-strong); align-self: center; }
  .gate-body { grid-template-columns: 1fr; padding: 0; background: none; }
  .gate-body .qr { display: none; }
  .gate-shots { gap: 10px; }
  .gate-shots img { height: min(30vh, 240px); }
  .x { top: 12px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes up { from { transform: translateY(100%); } }

/* Analytics consent card: bottom-start on desktop, above the app bar on phones */
.consent { position: fixed; inset-inline-start: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 50; width: min(360px, calc(100% - 40px)); background: var(--espresso); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 16px 18px; animation: rise .22s ease; }
.consent-t { font-weight: 600; font-size: 14.5px; }
.consent p + p { margin-top: 6px; color: var(--mist); font-size: 13.5px; }
.consent a { color: var(--rose); text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: 8px; margin-top: 12px; }
@media (max-width: 760px) {
  /* Phones: one compact strip above the app bar instead of a card covering a quarter of the screen */
  .consent { inset-inline: 10px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
  .consent-t { display: none; }
  .consent p + p { margin-top: 0; font-size: 12.5px; line-height: 1.4; }
  .consent-actions { margin-top: 0; flex-direction: column; gap: 6px; }
  .consent .btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
}

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; background: var(--cream); color: var(--ink); font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: var(--r-full); max-width: calc(100% - 32px); text-align: center; }
@media (max-width: 760px) { .toast { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
