/* Rapdi landing · "Studio đêm"
   Layout: a dark poster. One pinned story (phone stands up, lyric writes
   itself), then working demos on surfaces, then a second pinned scene
   (teleprompter). Colour only appears where a rhyme is. */
:root {
  --bg: #0D0D0F;
  --surface: #1B1B1F;
  --surface-2: #151518;
  --line: #2E2E33;
  --line-strong: #3A3A40;
  --ivory: #F4F1EA;
  --text-2: #9A978F;
  --text-3: #8E8B84;
  --ink: #0D0D0F;
  --volt: #D7FF3F;
  --flame: #FF6A2B;
  --sky: #7CF3FF;
  --pink: #FF8AD8;
  --rec: #FF3B30;

  --f-display: "Anton", "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --f-ui: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 300ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --nav-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font: 400 16px/1.6 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Film grain: poster print, very faint. */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
b { font-weight: 600; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--volt); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.mono { font-family: var(--f-mono); }
.volt { color: var(--volt); }
.c0 { color: var(--volt); } .c1 { color: var(--flame); } .c2 { color: var(--sky); } .c3 { color: var(--pink); }
b.c0, b.c1, b.c2, b.c3 { font-weight: 600; }

.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- type ---------- */
.eyebrow {
  margin: 0;
  font: 500 13px/1 var(--f-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow .num { color: var(--volt); }
.h2 {
  margin: 0;
  font: 400 clamp(52px, 8.4vw, 132px)/.98 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .005em;
  text-wrap: balance;
  padding-top: .08em; /* room for stacked Vietnamese marks */
}
.lead {
  margin: 0;
  max-width: 34em;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.lead b { color: var(--ivory); }
.lead b.c0 { color: var(--volt); } .lead b.c1 { color: var(--flame); } .lead b.c2 { color: var(--sky); } .lead b.c3 { color: var(--pink); }
.fine { margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-3); letter-spacing: .02em; max-width: 44em; }
.tag-inline { font-size: .8em; border: 1px dashed var(--line-strong); border-radius: 6px; padding: .1em .45em; color: var(--text-2); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 16px/1 var(--f-ui); text-decoration: none; cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-volt { background: var(--volt); color: var(--ink); }
.btn-volt:hover { background: #E4FF72; }
.btn-ivory { background: var(--ivory); color: var(--ink); }
.btn-ivory:hover { background: #fff; }
.btn-ghost { border-color: var(--line-strong); color: var(--ivory); background: transparent; }
.btn-ghost:hover { border-color: var(--text-2); background: var(--surface); }
.btn-text { background: none; border: 0; padding: 10px 8px; min-height: 44px; cursor: pointer; color: var(--text-2); font-weight: 500; font-size: 15px; transition: color var(--t-fast); }
.btn-text:hover { color: var(--ivory); }
.btn-text.volt { color: var(--volt); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  transition: background var(--t-slow) var(--ease), border-color var(--t-slow) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(13, 13, 15, .78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 34px; height: auto; display: block; }
.m-ivory { fill: var(--ivory); } .m-volt { fill: var(--volt); }
.wordmark { font: 400 26px/1 var(--f-display); letter-spacing: .01em; text-transform: lowercase; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 500; padding: 10px 12px; border-radius: 999px; transition: color var(--t-fast), background var(--t-base); }
.nav-links a:hover { color: var(--ivory); background: var(--surface); }
@media (max-width: 860px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ---------- story (hero + 01) ---------- */
.story { position: relative; }
.story-stage {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: 24px;
  padding: calc(var(--nav-h) + 12px) var(--gutter) 24px;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
}
.story-copy { position: relative; align-self: stretch; display: grid; }
.hero-copy, .captions { grid-area: 1 / 1; align-self: center; }
.hero-copy { display: grid; gap: 26px; position: relative; z-index: 2; }
.hero-title {
  margin: 0;
  font: 400 clamp(84px, 12.6vw, 208px)/.92 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .005em;
  padding-top: .1em;
}
.ht-line { display: block; white-space: nowrap; }
.ht-van { color: var(--volt); position: relative; display: inline-block; }
.ht-van::after {
  content: ""; position: absolute; left: 0; right: .22em; bottom: -.06em; height: .075em;
  background: var(--volt); transform-origin: left; transform: scaleX(var(--u, 1));
}
.hero-lead { max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.meta { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }

.captions { position: relative; min-height: 22em; }
.cap { position: absolute; inset: 0 0 auto 0; display: grid; gap: 22px; opacity: 0; visibility: hidden; top: 50%; transform: translateY(calc(-50% + var(--cy, 0px))); }
.cap-title { margin: 0; font: 400 clamp(52px, 7vw, 112px)/.98 var(--f-display); text-transform: uppercase; padding-top: .08em; text-wrap: balance; }

.scroll-hint {
  position: absolute; left: var(--gutter); bottom: 22px; margin: 0;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-3);
}
.scroll-hint span { display: inline-block; animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* ---------- phone ---------- */
.phone-wrap { position: relative; justify-self: center; perspective: 1800px; perspective-origin: 50% 20%; z-index: 1; }
.phone {
  --pw: min(calc((100svh - var(--nav-h) - 60px) * .47), 380px);
  width: var(--pw);
  aspect-ratio: 9 / 19.2;
  font-size: calc(var(--pw) / 24);
  border-radius: 3.1em;
  padding: .55em;
  background: linear-gradient(145deg, #2a2a30, #151518 40%, #232328);
  box-shadow: 0 0 0 1px #34343a inset, 0 1px 0 1px #3d3d44 inset, 0 40px 80px -20px rgba(0,0,0,.8);
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
  will-change: transform;
}
.phone-shadow { position: absolute; left: 10%; right: 10%; bottom: -4%; height: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(215,255,63,.12), transparent); filter: blur(18px); pointer-events: none; }
.phone-screen {
  position: relative; height: 100%;
  border-radius: 2.6em;
  background: var(--bg);
  overflow: hidden;
  display: flex; flex-direction: column;
  padding: 3.4em 1.15em 0;
}
.island { position: absolute; top: .75em; left: 50%; width: 5.2em; height: 1.55em; border-radius: 1em; background: #000; transform: translateX(-50%); }
.app-head { display: flex; align-items: center; gap: .6em; margin-bottom: .7em; }
.app-head .ico { width: 1.2em; height: 1.2em; color: var(--ivory); }
.app-head .mic { color: var(--text-2); margin-left: auto; }
.app-title { display: grid; gap: .1em; min-width: 0; }
.app-title strong { font-size: 1.12em; font-weight: 700; white-space: nowrap; }
.saved { font-size: .62em; color: var(--text-2); display: flex; align-items: center; gap: .4em; }
.dot { width: .55em; height: .55em; border-radius: 50%; background: var(--volt); display: inline-block; }
.demo-count { display: inline-flex; align-items: center; gap: .35em; background: var(--surface); border-radius: .7em; padding: .5em .6em; font-size: .72em; }
.demo-count .ico { width: 1.2em; height: 1.2em; }

.scheme { display: flex; align-items: center; gap: .8em; min-height: 1.2em; }
.scheme-dots { display: inline-flex; gap: .28em; }
.scheme-dots i { width: .7em; height: .38em; border-radius: 1em; background: var(--c, transparent); border: 1px solid var(--c, var(--line-strong)); transition: background var(--t-base), border-color var(--t-base); }
.scheme-text { font-size: .64em; color: var(--text-2); white-space: nowrap; }
.phone .scheme { margin-bottom: .6em; }

.lyric { list-style: none; margin: 0; padding: 0; display: grid; gap: .25em; flex: 1; align-content: start; }
.lyric li { display: flex; align-items: center; gap: .6em; min-height: 2.25em; padding: 0 .4em; margin: 0 -.4em; border-radius: .6em; transition: background var(--t-base); }
.lyric li.is-caret { background: var(--surface); }
.lyric .txt { flex: 1; min-width: 0; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; background: var(--volt); vertical-align: -.18em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Rhyme label badge: A–D filled when paired, dashed when waiting. */
.lab {
  flex: none; display: inline-grid; place-items: center;
  width: 1.45em; height: 1.45em; border-radius: .4em;
  font: 700 .72em/1 var(--f-mono);
  color: var(--ink);
  background: var(--rc, transparent);
  border: 1px dashed transparent;
  transition: background var(--t-base) var(--ease), color var(--t-base), transform var(--t-slow) var(--ease);
}
.lab.pending, .lab.typing { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.lab.empty { visibility: hidden; }
.lab.pop { animation: pop var(--t-slow) var(--ease); }
@keyframes pop { 40% { transform: scale(1.25); } }
.rw { position: relative; }
.rw.paired { color: var(--rc); font-weight: 600; }
.rw.paired::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.18em; height: .14em; border-radius: 1em; background: var(--rc); }
.rw.pending::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.22em; border-bottom: .14em dotted var(--text-2); }
.wait { flex: none; font: 500 .6em/1 var(--f-mono); color: var(--text-2); border: 1px dashed var(--line-strong); border-radius: .5em; padding: .45em .55em; white-space: nowrap; }
[data-c="0"] { --rc: var(--volt); } [data-c="1"] { --rc: var(--flame); } [data-c="2"] { --rc: var(--sky); } [data-c="3"] { --rc: var(--pink); }

.dock { border-top: 1px solid var(--line); margin: 0 -1.15em; padding: .9em 1.15em 1.3em; background: var(--bg); transition: opacity var(--t-slow), transform var(--t-slow) var(--ease); }
.dock-label { display: flex; justify-content: space-between; gap: 1em; font-size: .66em; color: var(--text-2); margin-bottom: .8em; }
.dock-label b { color: var(--ivory); }
.dock-all { font-weight: 600; white-space: nowrap; }
.dock-row { display: flex; gap: .45em; overflow: hidden; }
.dock-btn { flex: none; width: 2.4em; height: 2.4em; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--volt); }
.dock-btn .ico { width: 1em; height: 1em; }
.dock-btn.volt { background: var(--volt); border-color: var(--volt); color: var(--ink); }
.sug { flex: none; display: inline-flex; align-items: center; gap: .4em; height: 2.4em; padding: 0 .85em; border-radius: 1.2em; border: 1px solid var(--line-strong); font-size: .8em; font-weight: 600; white-space: nowrap; transition: transform var(--t-fast) var(--ease), background var(--t-base), border-color var(--t-base); }
.sug i { font: 700 .75em/1 var(--f-mono); font-style: normal; background: var(--volt); color: var(--ink); border-radius: .35em; padding: .2em .35em; }
.sug.is-double { border-color: rgba(215,255,63,.55); background: rgba(215,255,63,.07); }
.sug.pressed { transform: scale(.92); background: var(--volt); color: var(--ink); }
.sug.pressed i { background: var(--ink); color: var(--volt); }
.phone .dock.is-done .sug, .phone .dock.is-done .dock-btn { opacity: .35; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; background: var(--bg); }
.marquee-track { display: flex; gap: 56px; width: max-content; font: 400 clamp(34px, 4.6vw, 64px)/1 var(--f-display); text-transform: uppercase; white-space: nowrap; will-change: transform; }
.marquee-track span { color: var(--text-3); padding-top: .08em; }

/* ---------- sections ---------- */
.section { padding: clamp(96px, 14vw, 180px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.section-head { display: grid; gap: 22px; align-content: start; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split-rev { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.split-rev .section-head { order: 2; }
.sticky-head { position: sticky; top: calc(var(--nav-h) + 40px); }
@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-rev { grid-template-columns: minmax(0, 1fr); }
  .split-rev .section-head { order: 0; }
  .sticky-head { position: static; }
}
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: 28px; padding: clamp(18px, 2.6vw, 30px); min-width: 0; }

/* ---------- editor ---------- */
.try .section-head { margin-bottom: 44px; max-width: 900px; }
.editor { background: var(--surface-2); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; font-size: 16px; }
.ed-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px 12px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ed-top .scheme { font-size: 17px; }
.ed-actions { display: flex; gap: 4px; }
.ed-body { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px; gap: 10px; padding: 26px 24px 30px 18px; }
.ed-gutter, .ed-tags { position: relative; }
.ed-gutter .lab { position: absolute; left: 10px; font-size: 13px; width: 26px; height: 26px; border-radius: 7px; }
.ed-tags .wait { position: absolute; left: 0; font-size: 11px; }
.ed-field { position: relative; min-width: 0; }
.ed-mirror, #lyricInput {
  font: 400 clamp(18px, 1.8vw, 22px)/2 var(--f-ui);
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  padding: 0; margin: 0; border: 0;
  tab-size: 4;
}
.ed-mirror { color: var(--ivory); min-height: 8em; pointer-events: none; }
.ed-mirror .ml { min-height: 2em; }
.ed-mirror .rw.paired::after { bottom: .1em; height: 3px; }
.ed-mirror .rw.pending::after { bottom: .06em; border-bottom-width: 3px; }
#lyricInput {
  position: absolute; inset: 0; width: 100%; height: 100%;
  resize: none; overflow: hidden; outline: none;
  background: transparent; color: transparent; caret-color: var(--volt);
}
#lyricInput::placeholder { color: var(--text-3); }
#lyricInput::selection { background: rgba(215,255,63,.28); color: transparent; }
.ed-field:focus-within { outline: none; }
.editor:focus-within { border-color: var(--line-strong); }
.ed-dock { margin: 0; padding: 16px 24px 20px; font-size: 22px; }
.ed-dock .dock-label { font-size: 13px; }
.ed-dock .dock-row { flex-wrap: wrap; overflow: visible; }
.ed-dock .sug { font-size: 15px; height: 44px; padding: 0 16px; border-radius: 22px; cursor: pointer; background: transparent; }
.ed-dock .sug:hover { border-color: var(--text-2); }
.ed-dock .sug.is-double:hover { border-color: var(--volt); }
.ed-dock .empty-note { font-size: 14px; color: var(--text-3); margin: 0; min-height: 44px; display: flex; align-items: center; }
@media (max-width: 600px) {
  .ed-body { grid-template-columns: 34px minmax(0, 1fr); padding: 20px 16px 24px 8px; }
  .ed-tags { display: none; }
  .ed-gutter .lab { left: 4px; }
  .ed-top { padding: 10px 12px 10px 16px; }
  .ed-dock { padding: 14px 16px 18px; }
}

/* ---------- search ---------- */
.find .h2, .pen .h2 { font-size: clamp(48px, 6.4vw, 100px); }
.search-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sfield { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 10px 0 12px; border-radius: 18px; background: var(--surface); border: 1px solid rgba(215,255,63,.32); transition: border-color var(--t-base); }
.sfield:focus-within { border-color: var(--volt); }
.sfield-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(215,255,63,.12); color: var(--volt); flex: none; }
#rhymeQuery { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--ivory); font: 600 clamp(18px, 1.6vw, 22px)/1 var(--f-ui); }
#rhymeQuery::placeholder { color: var(--text-3); font-weight: 400; }
#rhymeQuery::-webkit-search-cancel-button { display: none; }
.sclear { width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.sclear:hover { color: var(--ivory); background: var(--surface-2); }
.recent { display: flex; flex-wrap: wrap; gap: 8px; }
.rchip { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line-strong); background: none; color: var(--text-2); font-size: 14px; cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast); }
.rchip:hover, .rchip.is-on { color: var(--ivory); border-color: var(--text-2); }
.qinfo { margin: 0; font-size: 12px; color: var(--text-3); letter-spacing: .04em; min-height: 1.4em; }
.results { display: grid; gap: 26px; min-height: 360px; align-content: start; }
.rgroup { display: grid; gap: 12px; }
.rg-head { display: flex; justify-content: space-between; gap: 12px; font: 500 12px/1.2 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.rg-head .n { letter-spacing: .04em; text-transform: none; color: var(--text-3); white-space: nowrap; }
.rg-head .note { text-transform: none; letter-spacing: .06em; }
.rgroup[data-tone="volt"] .rg-title { color: var(--volt); }
.rgroup[data-tone="pink"] .rg-title { color: var(--pink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; min-height: 44px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font: 600 16px/1 var(--f-ui); color: var(--ivory); cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-base), background var(--t-base);
}
.chip:hover { border-color: var(--text-2); }
.chip:active { transform: scale(.96); }
.rgroup[data-tone="volt"] .chip { border-color: rgba(215,255,63,.4); background: rgba(215,255,63,.07); }
.rgroup[data-tone="volt"] .chip:hover { border-color: var(--volt); }
.rgroup[data-tone="pink"] .chip { border-color: rgba(255,138,216,.38); background: rgba(255,138,216,.05); }
.rgroup[data-tone="pink"] .chip:hover { border-color: var(--pink); }
.chip.has-meaning::after { content: ""; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.legend { font: 400 12px/1 var(--f-ui); color: var(--text-2); letter-spacing: 0; text-transform: none; display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.rg-foot { margin: 0; font-size: 14px; color: var(--text-3); }
.nores { color: var(--text-3); margin: 0; }

/* ---------- pen ---------- */
.pen-board { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; overflow: hidden; padding-bottom: 0; }
.pen-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pen-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; }
.volt-ico { color: var(--volt); }
.pen-lyric { display: grid; gap: 6px; font-size: clamp(16px, 1.45vw, 19px); }
.pl { display: flex; flex-wrap: wrap; gap: 2px 4px; }
.w {
  position: relative; border: 0; background: none; cursor: pointer;
  padding: 7px 7px; min-height: 40px; border-radius: 10px;
  font: 500 1em/1.2 var(--f-ui); color: var(--ivory);
  transition: color var(--t-base), background var(--t-base);
  isolation: isolate;
}
.w::before { content: ""; position: absolute; inset: 3px 0; border-radius: 9px; background: var(--volt); transform: scaleX(0); transform-origin: left; transition: transform var(--t-slow) var(--ease); z-index: -1; }
.w:hover { background: var(--surface); }
.w.is-end { color: var(--volt); }
.w.is-new { color: var(--volt); }
.w.is-sel, .w.is-sel.is-new { color: var(--ink); font-weight: 600; background: none; }
.w.is-sel::before { transform: scaleX(1); }
.w.is-lung { color: var(--sky); background: rgba(124,243,255,.1); box-shadow: inset 0 -2px 0 var(--sky); }
.w.is-lung::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }

.pen-sheet {
  margin: 0 calc(-1 * clamp(18px, 2.6vw, 30px));
  padding: 10px clamp(18px, 2.6vw, 30px) 24px;
  background: var(--surface); border-top: 1px solid var(--line-strong);
  border-radius: 26px 26px 0 0;
  display: grid; gap: 16px;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-slow);
}
.pen-sheet.is-off { opacity: .45; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); justify-self: center; }
.sheet-for { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-2); font-size: 15px; }
.sel-chip { background: rgba(215,255,63,.14); color: var(--volt); font-weight: 700; border-radius: 12px; padding: 8px 12px; }
.sel-chip:empty { display: none; }
.lung { font-size: 12px; color: var(--sky); }
.sheet-groups { display: grid; gap: 16px; min-height: 118px; align-content: start; }
.sheet-groups .rg-head { font-size: 11px; }
.sheet-groups .chip { min-height: 44px; font-size: 15px; }
.chip.is-pick { background: var(--volt) !important; color: var(--ink); border-color: var(--volt) !important; }
.sheet-foot { display: grid; gap: 12px; }
.swap { margin: 0; font-size: 15px; color: var(--text-2); min-height: 1.5em; }
.swap b { color: var(--volt); }
.sheet-btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.sheet-btns .btn[disabled] { opacity: .4; pointer-events: none; }
.toast {
  position: absolute; left: 50%; bottom: 20px; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 14px; padding: 6px 8px 6px 18px; border-radius: 16px;
  background: var(--ivory); color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform var(--t-slow) var(--ease); z-index: 3;
}
.toast .btn-text.volt { color: #4D6600; font-weight: 700; }
.toast.is-on { transform: translate(-50%, 0); }

/* ---------- prompter ---------- */
.prompt-stage {
  height: 100vh; height: 100svh; min-height: 620px;
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: center;
  padding: calc(var(--nav-h) + 16px) var(--gutter) 28px;
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
}
.prompter {
  position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: min(76svh, 640px); border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #17171b, var(--bg) 70%); border: 1px solid var(--line);
}
.pr-top { display: flex; justify-content: space-between; gap: 12px; padding: 18px 22px; font-size: 12px; letter-spacing: .12em; color: var(--text-2); text-transform: uppercase; }
.pr-song { color: var(--ivory); text-transform: none; letter-spacing: .02em; font-family: var(--f-ui); font-weight: 600; font-size: 14px; }
.rec { display: inline-flex; align-items: center; gap: 8px; color: var(--ivory); font-variant-numeric: tabular-nums; }
.rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 12px var(--rec); animation: blink 1.2s steps(1) infinite; }
.pr-view { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 70%, transparent); }
.pr-lines { list-style: none; margin: 0; padding: 0 28px; position: absolute; left: 0; right: 0; top: 38%; will-change: transform; }
.pr-lines li { font: 600 clamp(20px, 2.3vw, 32px)/1.35 var(--f-ui); padding: 10px 0; color: var(--text-3); opacity: .45; transition: opacity var(--t-slow), color var(--t-slow); text-wrap: balance; }
.pr-lines li.is-now { color: var(--ivory); opacity: 1; }
.pr-lines li.is-next { opacity: .7; }
.pr-lines .rw.paired::after { height: 3px; bottom: -.1em; }
.pr-wave { width: 100%; height: 72px; display: block; }
.pr-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 22px 20px; }
.pr-take { font-size: 11px; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; }
.pr-take.right { text-align: right; }
.pr-stop { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ivory); display: grid; place-items: center; }
.pr-stop i { width: 20px; height: 20px; border-radius: 5px; background: var(--rec); }

/* ---------- get app ---------- */
.get-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.get-mark { display: grid; gap: 18px; }
.get-mark svg { width: 100%; height: auto; overflow: visible; }
.bm { transform-box: fill-box; transform-origin: left center; }
.mark-cap { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.get-copy { display: grid; gap: 24px; }
.get-title { font-size: clamp(64px, 9.4vw, 150px); }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: grid; gap: 4px; min-width: 180px; padding: 12px 22px; border-radius: 16px; background: var(--ivory); color: var(--ink); text-decoration: none; transition: transform var(--t-fast) var(--ease), background var(--t-base); }
.store:hover { background: #fff; }
.store:active { transform: scale(.97); }
.store-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.store-n { font-size: 20px; font-weight: 700; }
.store-soon { background: transparent; color: var(--ivory); border: 1px solid var(--line-strong); }
.store-soon:hover { background: var(--surface); }
@media (max-width: 860px) { .get-grid { grid-template-columns: minmax(0, 1fr); } .get-mark { max-width: 420px; } }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 34px var(--gutter) calc(34px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; }
.foot .mark { width: 26px; }
.foot .wordmark { font-size: 20px; color: var(--ivory); }

/* ---------- phone-width story ---------- */
@media (max-width: 860px) {
  .story-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; gap: 10px; padding-top: calc(var(--nav-h) + 8px); }
  .hero-copy, .captions { align-self: start; }
  .hero-copy { gap: 16px; }
  .hero-title { font-size: clamp(64px, 19vw, 120px); }
  .hero-lead { font-size: 16px; }
  .captions { min-height: 0; }
  .cap { top: 0; transform: translateY(var(--cy, 0px)); gap: 10px; }
  .cap-title { font-size: clamp(40px, 11vw, 64px); }
  .cap .lead { font-size: 15px; }
  .phone-wrap { align-self: end; }
  .phone { --pw: min(calc((100svh - var(--nav-h)) * .31), 72vw, 300px); }
  .phone-wrap { padding-bottom: 8px; }
  .scroll-hint { display: none; }
  .prompt-stage { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 22px; }
  .prompt-head .lead { font-size: 15px; }
  .prompt-head .h2 { font-size: clamp(44px, 12vw, 72px); }
  .prompter { height: min(52svh, 480px); }
}

/* ---------- reduced motion: everything visible, nothing pinned ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
}
html.no-motion .story-stage, html.no-motion .prompt-stage { height: auto; min-height: 0; }
html.no-motion .story-copy { display: grid; gap: 64px; }
html.no-motion .hero-copy, html.no-motion .captions { grid-area: auto; }
html.no-motion .captions { display: grid; gap: 48px; min-height: 0; }
html.no-motion .cap { position: static; opacity: 1; visibility: visible; transform: none; }
html.no-motion .scroll-hint { display: none; }
@media (max-width: 860px) { html.no-motion .story-stage { grid-template-rows: auto; } }
html.no-motion .phone-wrap { padding-block: 24px; }
html.no-motion .prompter { height: 520px; }
