/* Lin Says (brand book: brand/ and the Lin Says Brand design system). One brand colour (Lin's hoodie yellow) on white and warm greys; big confident type; soft radii and shadows;
   the product itself shown instead of described. Learned from Speak and Duolingo (11-03): no outlines-and-hard-shadow
   "sticker" cards, no dotted fills; one primary button per view. */
:root {
  --bg: #ffffff;
  --bg-2: #f7f6f3;
  --bg-3: #efede8;
  --surface: #ffffff;
  --ink: #221d2e;
  --ink-2: #4b4953;
  --muted: #716e7a;
  --line: #e9e7e2;
  --brand: #f2b630;
  --brand-hover: #e5a412;
  --brand-deep: #9a6b00;
  --brand-ink: #221d2e;
  --brand-soft: #fff4d8;
  --good: #0e7c52;
  --good-soft: #e5f6ee;
  --bad: #c6343b;
  --bad-soft: #fdecec;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  --round: "Plus Jakarta Sans", system-ui, sans-serif;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(21, 20, 26, .05), 0 6px 20px rgba(21, 20, 26, .06);
  --shadow-lg: 0 2px 6px rgba(21, 20, 26, .06), 0 24px 60px rgba(21, 20, 26, .12);
  --wrap: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
}
/* Latin-script pages read better in the Latin face; Chinese pages keep the CJK stack above. */
:root[lang="en"] { --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e13; --bg-2: #17161c; --bg-3: #201f27; --surface: #1b1a21; --ink: #f4f3f0; --ink-2: #c9c6cf; --muted: #8f8c97;
    --line: #2a2932; --brand: #f6c14a; --brand-hover: #ffd06a; --brand-soft: #352b17; --brand-deep: #f6c14a; --good: #4cc995; --good-soft: #15291f;
    --bad: #ff7a7f; --bad-soft: #3a1d1f; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.2; letter-spacing: -.01em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.en { font-family: var(--round); }

/* ── header ── */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: 68px;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 21px/1 var(--display); letter-spacing: -.02em; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.brand b { color: var(--brand); font-weight: 900; }
.brand small { font: 600 13px/1 var(--font); color: var(--muted); letter-spacing: 0; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line); }
@media (max-width: 1100px) { .brand small { display: none; } }
.nav { display: flex; gap: 2px; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a.on { color: var(--ink); background: var(--bg-3); }
.lang { text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; }
.lang:hover { background: var(--bg-2); color: var(--ink); }
.top .btn { height: 40px; padding: 0 18px; font-size: 15px; margin-left: 6px; }
.tabbar { display: none; }

main { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 40px max(var(--gutter), env(safe-area-inset-right)) 96px max(var(--gutter), env(safe-area-inset-left)); display: grid; gap: 40px; }
main:focus { outline: none; }
main.home { max-width: none; padding: 0 0 72px; gap: 0; }

/* ── shared pieces ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 16px; cursor: pointer;
  text-decoration: none; line-height: 1; transition: background .15s, transform .08s; white-space: nowrap; }
.btn:hover { background: var(--bg-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { height: 56px; padding: 0 30px; font-size: 17px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.iconbtn { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; border: 0; background: var(--bg-2); cursor: pointer; transition: background .15s, transform .08s; }
.iconbtn:hover { background: var(--bg-3); }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 19px; height: 19px; }
.iconbtn.play { background: var(--brand); color: var(--brand-ink); }
.iconbtn.play:hover { background: var(--brand-hover); }
.iconbtn.rec { background: var(--bad-soft); color: var(--bad); }
.iconbtn.rec.on { background: var(--bad); color: #fff; animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--bad) 22%, transparent); } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); }
.tag.y { background: var(--brand-soft); color: var(--ink); }
.muted { color: var(--muted); font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.sticker { border-color: transparent; box-shadow: var(--shadow); }
.dotted { background: var(--bg-2); border-color: transparent; }
.eyebrow { font: 700 12px/1.2 var(--display); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
h1.page { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.025em; }
h1.h2, section h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.h2s { font-size: 18px; font-weight: 800; }
.lead { font-size: 19px; color: var(--ink-2); line-height: 1.55; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 14px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg); }
#toast.show { opacity: 1; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* ── home ── */
.band { padding: 96px max(var(--gutter), env(safe-area-inset-right)) 96px max(var(--gutter), env(safe-area-inset-left)); }
.band.alt { background: var(--bg-2); }
.band > .in { max-width: var(--wrap); margin: 0 auto; display: grid; gap: 48px; }
.hero2 { padding-top: 64px; padding-bottom: 80px; overflow: hidden; }
.hero2 > .in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 5vw, 96px); }
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 var(--display); color: var(--ink-2); background: var(--brand-soft); padding: 8px 14px; border-radius: 999px; }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.display { font-size: clamp(40px, 5.4vw, 80px); font-weight: 800; line-height: 1.04; letter-spacing: -.035em; }
.display em { font-style: normal; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--brand) 60%, transparent) 62%); }
.hero-copy .lead { font-size: 20px; max-width: 34em; }
.hero-copy .note { font-size: 14px; color: var(--muted); }
.hero-visual { position: relative; display: grid; place-items: center; padding: 24px 0 40px; }
/* Lin's own dot pattern (the avatar ground, the videos' save cards) as a soft field behind the window */
.hero-dots { position: absolute; z-index: 0; inset: 0 -40px 0 15%; border-radius: 40px; background-color: var(--brand-soft);
  background-image: radial-gradient(color-mix(in srgb, var(--brand) 42%, transparent) 2.5px, transparent 3px); background-size: 26px 26px; }
/* The scene page as it looks in a desktop browser: what people actually get (there is no app yet). */
.win { position: relative; z-index: 1; width: min(100%, 680px); border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); }
.win-bar i:nth-child(1) { background: #f26b5b; } .win-bar i:nth-child(2) { background: #f5bf4f; } .win-bar i:nth-child(3) { background: #5ec26a; }
.win-url { margin: 0 auto; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font: 500 12px/1 var(--font); color: var(--ink-2); max-width: 70%; overflow: hidden; white-space: nowrap; }
.win-url svg { width: 11px; height: 11px; stroke-width: 2.4; color: var(--muted); }
.win-body { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 20px; padding: 20px; align-items: start; }
.win-video { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; border-radius: 12px; background: #000; display: block; box-shadow: var(--shadow); }
.win-panel { display: grid; gap: 10px; min-width: 0; }
.win-panel .tag { justify-self: start; font-size: 10.5px; }
.win-h { font: 800 22px/1.1 var(--display); letter-spacing: -.025em; }
.win-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 11px; background: var(--bg-2); }
.win-steps span { font: 700 11px/1 var(--display); color: var(--muted); text-align: center; padding: 8px 0; border-radius: 8px; }
.win-steps span.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.win-line { display: grid; gap: 7px; padding: 12px; border-radius: 13px; border: 1.5px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.win-line.dim { border: 1px solid var(--line); box-shadow: none; grid-template-columns: auto minmax(0, 1fr); align-items: center; opacity: .75; }
.win-line-top { display: flex; justify-content: space-between; align-items: center; }
.win-line .who { justify-self: start; font-size: 10px; padding: 3px 8px; }
.win-line b { font: 600 14.5px/1.35 var(--round); }
.win-line small { font-size: 11.5px; color: var(--ink-2); margin-top: -3px; }
.win-icons { display: flex; gap: 6px; }
.win-icons i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.win-icons i svg { width: 13px; height: 13px; }
.win-icons .p { background: var(--brand); color: var(--brand-ink); } .win-icons .r { background: var(--bad); color: #fff; }
.win-result { display: flex; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.f-num { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 16px/1 var(--display); color: var(--good); background: var(--good-soft); }
.mock-words { font: 600 13.5px/1.45 var(--round); display: flex; flex-wrap: wrap; gap: 0 5px; }
.mock-words .ok { color: var(--good); }
.mock-words .miss { color: var(--bad); text-decoration: underline wavy; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.mock-tip { font-size: 12px; line-height: 1.45; color: var(--ink-2); background: var(--bg-2); padding: 7px 10px; border-radius: 9px; }
.float { position: absolute; z-index: 2; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.f-mem { left: -12px; bottom: 8px; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; }
.f-mem img { width: 36px; height: 36px; border-radius: 50%; }
.f-mem span { display: block; font: 700 10.5px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--brand-deep); }
.f-mem b { font: 600 13.5px/1.3 var(--font); white-space: nowrap; }
.bub { font: 600 15px/1.4 var(--round); padding: 10px 14px; border-radius: 16px; border-top-left-radius: 5px; background: var(--bg-2); justify-self: start; max-width: 90%; }
.bub.me { background: var(--brand); color: var(--brand-ink); justify-self: end; border-top-left-radius: 16px; border-top-right-radius: 5px; }
.bub small { display: block; font: 500 12px/1.4 var(--font); color: var(--muted); margin-top: 2px; }

/* ── hero motion: one 10-second loop of a shadowing turn ──
   0.6–3.2s the line lights up word by word (karaoke) · 3.3–4.4s the record button breathes ("Lin is listening")
   4.5s the score pops · 4.6–5.6s the words turn green one by one, "latte" red with its wavy line · 6.2s the tip · 7.2s Lin remembers.
   At rest (no animation, reduced motion, a thumbnail) every element shows its final state. */
.rise { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.win { animation: rise 1s .15s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
.win-line.live .kw { border-radius: 4px; animation: kara 10s calc(.6s + var(--i) * .32s) infinite; }
@keyframes kara { 0%, 5.5%, 100% { background: transparent; color: inherit; } 1%, 4% { background: var(--brand-soft); color: var(--brand-deep); } }
.win-icons .r { animation: listen 10s infinite; }
@keyframes listen { 0%, 32%, 46%, 100% { box-shadow: 0 0 0 0 transparent; } 35%, 41% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--bad) 22%, transparent); } 38%, 44% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 30%, transparent); } }
.win-result .f-num { animation: pop 10s 4.5s infinite backwards; }
@keyframes pop { 0% { transform: scale(.4); opacity: .2; } 4% { transform: scale(1.12); opacity: 1; } 6%, 50% { transform: scale(1); opacity: 1; } 54%, 100% { transform: scale(.4); opacity: .2; } }
.win-result .ok, .win-result .miss { animation: judged 10s calc(4.6s + var(--i) * .13s) infinite backwards; }
.win-result .miss { text-decoration-color: transparent; animation-name: judged, wavy; }
@keyframes judged { 0% { color: var(--muted); opacity: .45; } 3%, 50% { opacity: 1; } 54%, 100% { color: var(--muted); opacity: .45; } }
@keyframes wavy { 0%, 2% { text-decoration-color: transparent; color: var(--muted); } 5%, 50% { text-decoration-color: var(--bad); color: var(--bad); } 54%, 100% { text-decoration-color: transparent; color: var(--muted); } }
.win-line.live .mock-tip { animation: tipin 10s 6.2s infinite backwards; }
@keyframes tipin { 0% { opacity: 0; transform: translateY(6px); } 4%, 44% { opacity: 1; transform: none; } 48%, 100% { opacity: 0; transform: translateY(6px); } }
.f-mem { animation: memin 10s 7.2s infinite backwards; }
@keyframes memin { 0% { opacity: 0; transform: translateY(10px) scale(.92); } 4%, 25% { opacity: 1; transform: none; } 29%, 100% { opacity: 0; transform: translateY(10px) scale(.92); } }

.proof { padding: 28px max(var(--gutter), env(safe-area-inset-right)) 28px max(var(--gutter), env(safe-area-inset-left)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof > .in { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.proof div { display: grid; gap: 2px; }
.proof b { font: 800 26px/1.2 var(--display); letter-spacing: -.02em; }
.proof span { color: var(--muted); font-size: 14px; }

.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.feat.flip .feat-copy { order: 2; }
.feat-copy { display: grid; gap: 16px; align-content: center; }
.feat-copy h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.03em; }
.feat-copy p { font-size: 18px; color: var(--ink-2); max-width: 30em; }
.feat-num { font: 800 13px/1 var(--display); color: var(--brand-deep); letter-spacing: .08em; text-transform: uppercase; }
.feat-visual { background: var(--bg-2); border-radius: 28px; padding: 40px; display: grid; place-items: center; min-height: 380px; }
.band.alt .feat-visual { background: var(--surface); }
.panel-mock { width: min(100%, 420px); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 22px; display: grid; gap: 12px; }
.band.alt .panel-mock { box-shadow: var(--shadow); border: 1px solid var(--line); }
.mock-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.mock-line b { font: 600 16px/1.4 var(--round); }
.mock-line small { display: block; color: var(--muted); font-size: 13px; }
.mem-line { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.mem-line b { font-weight: 700; font-size: 15px; }
.mem-line span { color: var(--muted); font-size: 12.5px; }

.scenes-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.scenes-head p { color: var(--ink-2); font-size: 18px; margin-top: 8px; }
.cta-wrap { padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
.cta-band { max-width: var(--wrap); margin: 0 auto; border-radius: 32px; background: var(--brand); color: var(--brand-ink); padding: 56px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; overflow: hidden; }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; color: var(--brand-ink); }
.cta-band p { font-size: 18px; margin-top: 10px; color: color-mix(in srgb, var(--brand-ink) 75%, transparent); }
.cta-band .btn.dark { color: #fff; background: var(--brand-ink); border-color: var(--brand-ink); }
#welcome:empty { display: none; }
#welcome { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 24px auto 0; padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
.welcome { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; text-decoration: none; padding: 14px 18px; }
.welcome img { width: 40px; height: 40px; border-radius: 50%; }

/* today / create / memory: Lin speaking */
.hello { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; align-items: center; }
.hello.dotted, .hello.sticker { background: none; box-shadow: none; padding: 0; border: 0; }
.hello img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); }
.bubble { position: relative; background: var(--bg-2); border-radius: 20px; border-top-left-radius: 6px; padding: 16px 20px; font-size: 17px; font-weight: 600; line-height: 1.5; }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.plan-head h2 { font-size: 24px; font-weight: 800; }
.scene-pick { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; text-decoration: none; padding: 8px; margin: -8px; border-radius: 14px; }
.scene-pick:hover { background: var(--bg-2); }
.scene-pick img { width: 72px; height: 96px; object-fit: cover; object-position: top; border-radius: 12px; background: var(--bg-2); }
.scene-pick b { font-size: 16px; }
.scene-pick p { font-size: 14px; color: var(--ink-2); }
.review-item { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); }
.review-item b { font-family: var(--round); font-size: 16px; }
.review-item span { font-size: 13px; color: var(--ink-2); }

/* onboarding */
.onb { max-width: 680px; margin: 0 auto; width: 100%; display: grid; gap: 32px; }
.onb .q { display: grid; gap: 14px; }
.onb .q h2 { font-size: 20px; font-weight: 800; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { border: 1.5px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px 18px; cursor: pointer; text-align: left; display: grid; gap: 2px; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--ink-2); }
.opt b { font-size: 16px; }
.opt span { font-size: 13px; color: var(--muted); }
.opt.on { border-color: var(--ink); background: var(--brand-soft); }
textarea, input[type="text"] { font: inherit; width: 100%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 14px 16px; resize: vertical; }
textarea:focus, input[type="text"]:focus { border-color: var(--ink); outline: none; }

/* ── library ── */
.search { max-width: 420px; height: 48px; border-radius: 999px; padding: 0 20px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); }
.search:focus { border-color: var(--ink); outline: none; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.topic { display: grid; gap: 2px; padding: 18px 20px; border-radius: 18px; background: var(--bg-2); text-decoration: none; transition: background .15s; }
.topic:hover { background: var(--brand-soft); }
.topic b { font: 700 17px/1.3 var(--display); }
.topic span { color: var(--muted); font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(160px, 15vw, 230px), 1fr)); gap: 32px 22px; }
.tile { text-decoration: none; display: grid; gap: 10px; align-content: start; }
.tile .thumb { position: relative; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--bg-2); transition: transform .2s, box-shadow .2s; }
.tile:hover .thumb { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tile .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.tile .done { position: absolute; top: 10px; right: 10px; background: var(--good); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tile b { font: 700 17px/1.35 var(--display); letter-spacing: -.01em; }
.tile .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.tile .meta .tag { background: none; padding: 0; color: var(--muted); font-weight: 600; font-size: 13px; }
.tile .meta .tag + .tag::before { content: "·"; margin-right: 6px; }

/* ── scene page ── */
.scene { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: clamp(32px, 4vw, 72px); align-items: start; }
.stage { position: sticky; top: 92px; display: grid; gap: 12px; justify-items: center; }
/* The whole 9:16 frame, never cropped: width follows the height the viewport allows. */
.stage video, .stage .still { display: block; width: min(100%, calc((100vh - 120px) * 9 / 16)); aspect-ratio: 9 / 16; height: auto; object-fit: contain;
  border-radius: 24px; background: #000; box-shadow: var(--shadow-lg); }
.stage .still { background: var(--bg-2); display: grid; place-items: center; overflow: hidden; position: relative; box-shadow: none; }
.stage .still img { width: 70%; border-radius: 50%; }
.stage .still .cap { position: absolute; left: 14px; right: 14px; bottom: 18px; text-align: center; font-weight: 700; background: rgba(0, 0, 0, .75); color: #fff; padding: 10px 12px; border-radius: 12px; font-size: 15px; }
.scene-title { display: grid; gap: 12px; }
.scene-title h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.scene-title .en { color: var(--muted); font-size: 18px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--bg-2); }
.steps button { border: 0; background: transparent; padding: 10px 6px; cursor: pointer; font-weight: 700; display: grid; gap: 1px; justify-items: center; line-height: 1.3; border-radius: 12px; color: var(--ink-2); transition: background .15s; }
.steps button:hover { color: var(--ink); }
.steps button small { font-size: 12px; font-weight: 500; color: var(--muted); }
.steps button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.panel { display: grid; gap: 14px; }

.line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.line.hook { opacity: .7; border-style: dashed; }
.line.playing { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.who { font: 700 12px/1 var(--display); padding: 5px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.who.lin { background: var(--brand-soft); color: var(--ink); }
.line .t b { font-family: var(--round); font-weight: 600; font-size: 18px; line-height: 1.4; display: block; }
.line .t span { font-size: 14px; color: var(--ink-2); }
.line .acts { display: flex; gap: 8px; align-items: center; }
.result { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.words { font-family: var(--round); font-size: 18px; line-height: 1.7; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.words .ok { color: var(--good); }
.words .miss { color: var(--bad); text-decoration: underline wavy; text-underline-offset: 4px; }
.score { font: 800 15px/1 var(--display); padding: 6px 12px; border-radius: 999px; }
.score.hi { background: var(--good-soft); color: var(--good); }
.score.mid { background: var(--brand-soft); color: var(--ink); }
.score.lo { background: var(--bad-soft); color: var(--bad); }
.tip { font-size: 14px; background: var(--bg-2); padding: 10px 14px; border-radius: 12px; }
.tip b { font-family: var(--round); }
.hookcard { display: grid; gap: 6px; padding: 16px 18px; border-radius: 16px; background: var(--bad-soft); }
.hookcard .tag { background: transparent; padding: 0; color: var(--bad); }
.hookcard .x { font-family: var(--round); font-size: 18px; text-decoration: line-through; text-decoration-color: var(--bad); }
.kp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kpc { border-color: transparent; background: var(--bg-2); }
.kpc .eyebrow { text-transform: none; letter-spacing: .01em; font-family: var(--font); font-size: 13px; }
.kpc b { font-family: var(--round); font-weight: 700; font-size: 20px; line-height: 1.35; }
.kpc .bad { font-family: var(--round); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--bad); }
.kpc p { color: var(--ink-2); }

/* role-play */
.mode { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-2); }
.mode button { border: 0; background: transparent; padding: 7px 16px; font-weight: 700; cursor: pointer; font-size: 14px; border-radius: 999px; color: var(--ink-2); }
.mode button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chat { display: grid; gap: 12px; padding: 20px; border-radius: 20px; min-height: 280px; align-content: start; }
.msg { display: grid; gap: 4px; max-width: 86%; }
.msg .b { padding: 12px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.msg .b b { font-family: var(--round); font-weight: 600; font-size: 17px; display: block; }
.msg .b span { font-size: 13.5px; color: var(--ink-2); }
.msg.npc { justify-self: start; }
.msg.npc .b { border-top-left-radius: 6px; }
.msg.user { justify-self: end; }
.msg.user .b { background: var(--brand); color: var(--brand-ink); border-top-right-radius: 6px; box-shadow: none; }
.msg .who-line { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.msg .who-line .chip { height: 26px; padding: 0 8px; }
.msg.user .who-line { justify-content: flex-end; }
.hint { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1.5px dashed var(--line); background: var(--surface); }
.hint small { font-size: 12px; color: var(--muted); display: block; }
.hint b { font-family: var(--round); font-weight: 600; font-size: 17px; display: block; }
.composer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.composer .iconbtn.rec { width: 56px; height: 56px; }
.composer .iconbtn.rec svg { width: 24px; height: 24px; }
.level { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.level i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .08s; }
.points { display: grid; gap: 10px; }
.point { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); }
.point .said { font-family: var(--round); color: var(--muted); text-decoration: line-through; }
.point .better { font-family: var(--round); font-weight: 700; font-size: 17px; }
.point .why { font-size: 14px; color: var(--ink-2); }
.learned { display: grid; gap: 8px; padding: 16px 18px; border-radius: 16px; background: var(--brand-soft); }
.learned h3 { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.learned img { width: 28px; height: 28px; border-radius: 50%; }

/* memory page */
.mem-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mem-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.mem-item:first-of-type { border-top: 0; }
.mem-item .v { font-weight: 700; }
.mem-item .src { font-size: 12.5px; color: var(--muted); }
.mem-item .quote { font-size: 13px; color: var(--ink-2); background: var(--bg-2); padding: 6px 10px; border-radius: 10px; margin-top: 6px; }
.mem-item .acts { display: flex; gap: 4px; }
.mem-item .acts button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; font-size: 13px; }
.mem-item .acts button:hover { background: var(--bg-2); color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 20px; border-radius: 18px; background: var(--bg-2); display: grid; gap: 4px; }
.stat b { font: 800 32px/1 var(--display); letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }

/* create */
.create { max-width: 760px; width: 100%; margin: 0 auto; display: grid; gap: 22px; }
.gen-progress { display: grid; gap: 10px; }
.gen-progress div { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.gen-progress .done-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--good); display: inline-grid; place-items: center; color: #fff; }
.gen-progress .done-dot svg { width: 12px; height: 12px; stroke-width: 3; }

/* questions: visible answers (also FAQPage data) */
.band > .in.narrow { max-width: 820px; gap: 24px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 22px/1 var(--display); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq summary h3 { font-size: 17px; font-weight: 700; }
.faq details p { color: var(--ink-2); padding: 0 0 18px; }

/* privacy */
.prose { max-width: 720px; margin: 0 auto; width: 100%; gap: 16px; padding: 40px; }
.prose h2 { font-size: 20px; margin-top: 10px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); }
.foot > .in { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 44px max(var(--gutter), env(safe-area-inset-right)) calc(44px + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; color: var(--muted); font-size: 14px; }
.foot .brand { font-size: 19px; color: var(--ink); margin: 0 0 10px; }
.foot h3 { font-size: 12px; color: var(--ink); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 960px) {
  .hero2 > .in, .feat { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feat.flip .feat-copy { order: 0; }
  .hero-copy { justify-items: center; text-align: center; }
  .hero-copy .row { justify-content: center; }
  .scene { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .stage { position: static; }
  .stage video, .stage .still { width: min(100%, calc(66vh * 9 / 16)); }
  .mem-groups, .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .cta-band { grid-template-columns: minmax(0, 1fr); padding: 40px 28px; text-align: center; justify-items: center; }
}
@media (max-width: 720px) {
  .nav, .top .btn { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; text-decoration: none; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on svg { fill: var(--brand); }
  main { padding-top: 24px; gap: 28px; }
  .band { padding-top: 64px; padding-bottom: 64px; }
  .hero2 { padding-top: 36px; padding-bottom: 48px; }
  .hero-visual { padding: 8px 0 28px; }
  .hero-dots { inset: 0 -20px; border-radius: 28px; }
  .win-body { grid-template-columns: 38% minmax(0, 1fr); gap: 12px; padding: 12px; }
  .win-line.dim, .mock-tip, .win-line small { display: none; }
  .win-h { font-size: 17px; }
  .f-mem { left: 0; right: 0; margin: 0 auto; width: max-content; bottom: -8px; }
  .feat-visual { padding: 20px; min-height: 0; border-radius: 22px; }
  .proof > .in { grid-template-columns: minmax(0, 1fr); gap: 14px; text-align: center; }
  .lead, .hero-copy .lead { font-size: 17px; }
  .hello { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .hello img { width: 52px; height: 52px; }
  .bubble { font-size: 15px; padding: 12px 16px; }
  .lib { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .tile b { font-size: 15px; }
  .line { grid-template-columns: minmax(0, 1fr) auto; }
  .line .who { grid-column: 1 / -1; justify-self: start; }
  .kp { grid-template-columns: minmax(0, 1fr); }
  .stat b { font-size: 26px; }
  .cta-band { border-radius: 24px; }
  .foot > .in { grid-template-columns: minmax(0, 1fr); padding-bottom: calc(100px + env(safe-area-inset-bottom)); gap: 24px; }
  .prose { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

[hidden] { display: none !important; }
.slowtxt { font-weight: 800; font-size: 14px; line-height: 1; }
