/* Spoylr homepage. Fonts, colors, shapes and motion follow DESIGN.md: the four Roboto instances (§ 5),
   the brand and book color roles (§ 4), the sage navigation dock (§ 10) and the M3 springs (§ 8). */

@font-face { font-family: 'Spoylr Wide'; src: url('/landing/fonts/wide.ttf') format('truetype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Spoylr Wide Dark'; src: url('/landing/fonts/wide-dark.ttf') format('truetype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Spoylr Tall'; src: url('/landing/fonts/tall.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Spoylr Tall Dark'; src: url('/landing/fonts/tall-dark.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Spoylr Serif'; src: url('/landing/fonts/serif.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Spoylr Text'; src: url('/landing/fonts/text.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Spoylr Text'; src: url('/landing/fonts/medium.ttf') format('truetype'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Spoylr Text'; src: url('/landing/fonts/bold.ttf') format('truetype'); font-weight: 700 900; font-display: swap; }

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;
  --wide: 'Spoylr Wide', 'Arial Black', sans-serif;
  --tall: 'Spoylr Tall', 'Arial Narrow', sans-serif;
  --serif: 'Spoylr Serif', Georgia, serif;
  --text: 'Spoylr Text', system-ui, sans-serif;

  /* The brand palette (DESIGN.md § 4): Eggshell and Carbon pages, Icy Aqua, Light Blue and Pink Carnation accents. */
  --carbon: #1b1e23; --eggshell: #faf3dd;
  --primary: #1b1e23; --on-primary: #faf3dd;
  --primary-container: #b8f2e6; --on-primary-container: #1b1e23;
  --secondary-container: #aed9e0; --on-secondary-container: #1b1e23;
  --tertiary: #a3205f; --tertiary-container: #f98bc9; --on-tertiary-container: #1b1e23;
  --surface: #faf3dd; --on-surface: #1b1e23; --on-surface-variant: #4c4e52;
  --surface-lowest: #fffbef; --surface-low: #f4ecd3; --surface-container: #efe6cb;
  --surface-high: #e9dfc2; --surface-highest: #e2d8b9;
  --outline-variant: #d3c9ac;
  --shell: #1b1e23; --on-shell: #faf3dd;
  --ink: #1b1e23;
  --sun: #f7d51d; --pink: #f98bc9; --blue: #aed9e0; --aqua: #b8f2e6;
  --hero-burst: #f98bc9;
  --name: #56437b;
  --brand-ink: #1b1e23;
  --closing: #b8f2e6; --on-closing: #1b1e23;
  --wood: #34528f; --wood-dark: #233b69; --inside: #2a4479; --rail: #3f60a3; --paper: #f8edd7;
  --shadow: 27 30 35;

  /* M3 Expressive springs (DESIGN.md § 8) approximated as easing curves. */
  --spring-fast: cubic-bezier(.34, 1.56, .64, 1);
  --spring: cubic-bezier(.3, 1.35, .5, 1);
  --spring-soft: cubic-bezier(.22, 1.15, .36, 1);
  --emphasized: cubic-bezier(.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --wide: 'Spoylr Wide Dark', 'Spoylr Wide', 'Arial Black', sans-serif;
    --tall: 'Spoylr Tall Dark', 'Spoylr Tall', 'Arial Narrow', sans-serif;
    --primary: #faf3dd; --on-primary: #1b1e23;
    --primary-container: #24524b; --on-primary-container: #b8f2e6;
    --secondary-container: #2c4d53; --on-secondary-container: #d3edf1;
    --tertiary: #f98bc9; --tertiary-container: #6b2d50; --on-tertiary-container: #fdd5ea;
    --surface: #1b1e23; --on-surface: #faf3dd; --on-surface-variant: #cfc8b3;
    --surface-lowest: #15171b; --surface-low: #212429; --surface-container: #25292f;
    --surface-high: #2f3339; --surface-highest: #3a3e45;
    --outline-variant: #464a50;
    --shell: #30343b; --on-shell: #faf3dd;
    --hero-burst: #6b2d50;
    --name: #d3bcfd;
    --brand-ink: #faf3dd;
    --wood: #2c3036; --wood-dark: #1b1e22; --inside: #1f2227; --rail: #3a3f46; --paper: #f5e3be;
    --shadow: 0 0 0;
  }
}

/* Book color schemes generated from each cover's seed color (src/theme/colors.ts, content variant). */
.book-tides { --pc: #56437b; --opc: #cab4f4; --p: #3f2c62; --t: #5a2440; --ot: #fff; --tc: #753a57; --sc: #eaddfb; --osc: #696079; }
.book-lantern { --pc: #514c8d; --opc: #c7c2ff; --p: #3a3474; --t: #612852; --ot: #fff; --tc: #7c3f6a; --sc: #e1dcfd; --osc: #62607c; }
.book-quiet { --pc: #93decd; --opc: #0c6457; --p: #176a5c; --t: #605887; --ot: #fff; --tc: #d3c9ff; --sc: #cbe9e0; --osc: #4f6a63; }
.book-salt { --pc: #505f1e; --opc: #c6d889; --p: #394706; --t: #074c2a; --ot: #fff; --tc: #276440; --sc: #dce4bd; --osc: #5f6647; }
.book-sweet { --pc: #ab5327; --opc: #ffeae3; --p: #8c3c11; --t: #636100; --ot: #fff; --tc: #b2af45; --sc: #fec1a7; --osc: #7a4d39; }
@media (prefers-color-scheme: dark) {
  .book-tides { --pc: #4f3d74; --opc: #ebddff; --p: #d3bcfd; --t: #feb0d2; --ot: #521d39; --tc: #753a57; --sc: #4e455d; --osc: #bfb4d0; }
  .book-lantern { --pc: #443f7f; --opc: #e4dfff; --p: #c5c0ff; --t: #fcafe1; --ot: #521b44; --tc: #7c3f6a; --sc: #484661; --osc: #b9b5d5; }
  .book-quiet { --pc: #005045; --opc: #a5f1e0; --p: #affbe9; --t: #efe9ff; --ot: #312a56; --tc: #d3c9ff; --sc: #314c46; --osc: #9ebbb3; }
  .book-salt { --pc: #3e4c0c; --opc: #d8eb9a; --p: #bcce81; --t: #95d5a8; --ot: #00391d; --tc: #276440; --sc: #434a2d; --osc: #b2b994; }
  .book-sweet { --pc: #7b2f03; --opc: #ffdbcd; --p: #ffb595; --t: #cecb5e; --ot: #333200; --tc: #b2af45; --sc: #663c29; --osc: #e2a88f; }
}

/* Genre stickers (DESIGN.md § 4). On the dark page the darkest fills step lighter in their own hue. */
.g-scifi { --g: #4fb3f6; --gt: #1c1b20; }
.g-fantasy { --g: #2e5bba; --gt: #fff; }
.g-literary { --g: #c8102e; --gt: #fff; }
.g-historical { --g: #1e3a6e; --gt: #fff; }
.g-coming { --g: #bfc4cc; --gt: #1c1b20; }
.g-romance { --g: #f4479a; --gt: #1c1b20; }
.g-mystery { --g: #0b6b69; --gt: #fff; }
.g-contemporary { --g: #18c3dd; --gt: #1c1b20; }
.g-thriller { --g: #1c1b20; --gt: #fff; }
.g-horror { --g: #7a0f1f; --gt: #fff; }
.g-adventure { --g: #ff8a1f; --gt: #1c1b20; }
.g-nature { --g: #3fbe57; --gt: #1c1b20; }
.g-cozy { --g: #e2a76f; --gt: #1c1b20; }
.g-travel { --g: #f7d51d; --gt: #1c1b20; }
.g-classics { --g: #c9a43a; --gt: #1c1b20; }
.g-family { --g: #9c4a26; --gt: #fff; }
@media (prefers-color-scheme: dark) {
  .sticker-band .g-thriller { --g: #4a4752; }
  .sticker-band .g-horror { --g: #a3243a; }
  .sticker-band .g-historical { --g: #2f5a9e; }
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body {
  margin: 0; overflow-x: clip;
  background: var(--surface); color: var(--on-surface);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { color: var(--ink); background: var(--sun); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 8px; }
/* The ring must contrast with what it sits on: the Carbon dock, and the Icy Aqua closing panel in both themes. */
.dock :focus-visible { outline-color: var(--on-shell); }
.closing-panel :focus-visible { outline-color: var(--carbon); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 20px;
  border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 700; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Display type: Serif Light leads into Wide Black, the app's greeting pairing (DESIGN.md § 5). */
.serif-lead { display: block; font: 300 clamp(30px, 3.4vw, 46px)/1.08 var(--serif); color: var(--on-surface-variant); }
.wide-head { display: block; margin-top: .1em; font: 900 clamp(32px, 4.3vw, 60px)/1.02 var(--wide); text-wrap: balance; }
h2 { font-weight: inherit; }
.lead { margin-top: 24px; max-width: 32em; color: var(--on-surface-variant); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; }
.aside { margin-top: 20px; max-width: 30em; color: var(--on-surface-variant); font-size: 15px; }

/* Buttons: fully round, corners tighten on press (the M3E press morph). */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px; border-radius: 999px;
  font: 700 17px/1 var(--text); text-decoration: none; white-space: nowrap;
  transition: border-radius .4s var(--spring-fast), transform .4s var(--spring-fast), box-shadow .3s ease, background-color .2s ease;
}
.button svg { width: 20px; height: 20px; fill: currentColor; }
.button:hover { transform: translateY(-2px); }
.button:active { border-radius: 16px; transform: scale(.97); }
.button-small { min-height: 48px; padding: 0 22px; font-size: 15px; }
.button-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 24px -12px rgb(var(--shadow) / .6); }
.button-tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
/* Carbon in both themes: it sits on the Icy Aqua closing panel. */
.button-ink { background: var(--carbon); color: var(--eggshell); }
/* On the Carbon dock, the main action is a Pink Carnation sticker instead. */
.dock .button-primary { background: var(--pink); color: var(--ink); box-shadow: none; }

.sticker {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--g); color: var(--gt); font: 700 13px/1 var(--text); white-space: nowrap;
}

/* ---------- Brand and navigation dock ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; color: inherit; text-decoration: none; }
.brand img { width: auto; height: 34px; }
.brand span { font: 900 21px/1 var(--wide); }
/* The full logo: the book above the wordmark, as on the app's splash and sign-in screens. */
.brand-stacked { flex-direction: column; gap: 8px; justify-self: start; }
.brand-stacked img { height: 64px; }
.brand-stacked span { font-size: 24px; color: var(--brand-ink); }

.topbar { display: none; }

.dock {
  position: fixed; z-index: 50; top: 16px; left: 50%; translate: -50% 0;
  width: min(1080px, calc(100% - 32px)); height: 72px; padding: 0 10px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 999px; background: var(--shell); color: var(--on-shell);
  box-shadow: 0 12px 32px -12px rgb(var(--shadow) / .35);
}
.dock-tabs { display: flex; gap: 4px; }
.dock-tab {
  display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 4px;
  border-radius: 999px; color: inherit; text-decoration: none; font: 700 16px/1 var(--text);
  transition: background-color .2s ease, padding .45s var(--spring);
}
.dock-tab:hover { background: rgb(250 243 221 / .1); }
.dock-icon { position: relative; display: grid; place-items: center; width: 48px; height: 48px; flex: none; }
.dock-burst {
  position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--burst, var(--sun));
  opacity: 0; scale: .35; rotate: -70deg;
  transition: scale .55s var(--spring-fast), rotate .55s var(--spring-fast), opacity .15s ease;
}
.dock-glyph { position: relative; width: 28px; height: 28px; fill: currentColor; transition: fill .2s ease; }
.dock-label { max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; transition: max-width .45s var(--spring), opacity .25s ease; }
.dock-tab.is-active .dock-burst { opacity: 1; scale: 1; rotate: 0deg; }
.dock-tab.is-active .dock-glyph { fill: var(--ink); animation: icon-bounce .5s var(--spring-fast); }
.dock-tab.is-active { padding-right: 16px; }
.dock-tab.is-active .dock-label { max-width: 110px; opacity: 1; }
[data-burst='sun'] { --burst: var(--sun); }
[data-burst='pink'] { --burst: var(--pink); }
[data-burst='blue'] { --burst: var(--blue); }
[data-burst='aqua'] { --burst: var(--aqua); }
@keyframes icon-bounce { 40% { scale: .82; } 100% { scale: 1; } }

.dock-actions { display: flex; align-items: center; gap: 6px; }
.dock-login {
  display: inline-flex; align-items: center; height: 48px; padding: 0 16px; border-radius: 999px;
  font: 700 15px/1 var(--text); text-decoration: none; transition: background-color .2s ease;
}
.dock-login:hover { background: rgb(250 243 221 / .1); }

/* ---------- Hero ---------- */

.hero {
  max-width: 1240px; margin: 0 auto; padding: 136px 32px 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center;
  min-height: min(100svh, 940px);
}
.hero-sticker span {
  display: inline-block; margin-bottom: 24px; padding: 9px 16px; border-radius: 999px;
  background: var(--pink); color: var(--ink); font: 700 15px/1 var(--text); rotate: -3deg;
}
.hero h1 .serif-lead { font-size: clamp(38px, 4.4vw, 62px); }
.hero h1 .wide-head { font-size: clamp(44px, 5.7vw, 84px); line-height: .98; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fine-print { margin-top: 16px; color: var(--on-surface-variant); font-size: 14px; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 720px; }
.hero-burst {
  position: absolute; width: min(560px, 100%); aspect-ratio: 1; fill: var(--hero-burst);
  animation: spin 90s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
.float-sticker {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  border-radius: 999px; background: var(--g); color: var(--gt); font: 700 16px/1 var(--text);
  box-shadow: 0 8px 18px -8px rgb(var(--shadow) / .45);
  animation: float 6s ease-in-out infinite alternate;
}
.float-sticker.g-fantasy { top: 13%; left: 2%; rotate: -8deg; }
.float-sticker.g-romance { top: 44%; right: 0; rotate: 6deg; animation-delay: -2s; }
.float-sticker.g-scifi { bottom: 12%; left: 6%; rotate: 4deg; animation-delay: -4s; }
@keyframes float { to { translate: 0 -10px; } }

/* ---------- The phone: Spoylr's Home screen, rebuilt in HTML so it can move ---------- */

.phone {
  position: relative; z-index: 1; width: 340px; height: 700px; padding: 10px; border-radius: 54px;
  background: #1c1b20; box-shadow: 0 50px 90px -30px rgb(var(--shadow) / .55), inset 0 0 0 2px #3a3840;
}
.screen {
  --s-surface: #faf3dd; --s-low: #f4ecd3; --s-container: #efe6cb; --s-high: #e9dfc2; --s-highest: #e2d8b9;
  position: relative; height: 100%; overflow: hidden; border-radius: 44px;
  background: var(--s-surface); color: var(--on-surface); font-family: var(--text);
  transition: opacity .4s ease;
}
@media (prefers-color-scheme: dark) {
  .screen { --s-surface: #1b1e23; --s-low: #212429; --s-container: #25292f; --s-high: #2f3339; --s-highest: #3a3e45; }
}
.screen[data-fade] { opacity: 0; }
.screen.no-motion, .screen.no-motion * { transition: none !important; }
.screen svg { display: block; }
.statusbar { display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 8px 26px 0; font: 600 13px/1 var(--text); }
.status-dots { display: flex; gap: 4px; }
.status-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.scroller { padding: 4px 14px 120px; transition: transform 1s var(--emphasized); }

.app-head { display: flex; justify-content: space-between; align-items: flex-start; margin: 6px 2px 16px; }
.app-greet { font: 300 22px/1.1 var(--serif); color: var(--on-surface-variant); }
.app-name { font: 900 32px/1 var(--wide); color: var(--name); }
.app-actions { display: flex; align-items: center; gap: 10px; }
.app-actions svg { width: 22px; height: 22px; fill: var(--on-surface-variant); }
.app-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-container); color: var(--on-primary-container); font: 700 14px/1 var(--text); }
.app-section { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 10px; }
.app-h { font: 900 17px/1 var(--wide); }
.app-link { font: 700 13px/1 var(--text); color: var(--primary); }
.app-count { font: 500 12px/1 var(--text); color: var(--on-surface-variant); }

.stage { margin-bottom: 10px; padding: 16px; border-radius: 26px; background: var(--pc); color: var(--opc); }
.stage-top { display: flex; gap: 16px; }
.stage-cover { position: relative; flex: none; width: 92px; }
.stage-cover img { position: relative; width: 92px; height: 138px; object-fit: cover; border-radius: 8px; rotate: -3deg; box-shadow: 0 10px 20px -6px rgb(0 0 0 / .45); }
.stage-accent { position: absolute; top: -16px; right: -24px; width: 62px; height: 62px; fill: var(--tc); }
.stage-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding-top: 2px; }
.stage-meta .sticker { height: 26px; font-size: 12px; padding: 0 11px; }
.club-chip { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; font: 700 13px/1 var(--text); }
.club-chip svg { width: 17px; height: 17px; fill: currentColor; }
.stage-title { margin-top: 14px; font: 800 34px/.98 var(--tall); letter-spacing: .01em; }
.stage-author { margin: 3px 0 14px; font-size: 14px; }

.wavy { position: relative; height: 14px; margin-bottom: 8px; }
.wave-fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 1%); overflow: hidden; transition: width 1s var(--spring-soft); }
html:not(.js) .wave-fill { background: linear-gradient(var(--opc), var(--opc)) 0 50% / 100% 4px no-repeat; }
.wave { width: 600px; height: 14px; animation: wave 1.4s linear infinite; }
.wave path { fill: none; stroke: var(--opc); stroke-width: 4; stroke-linecap: round; }
@keyframes wave { to { translate: -24px 0; } }
.wave-track { position: absolute; top: 5px; right: 0; left: calc(var(--p) * 1% + 6px); height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--opc) 32%, transparent); transition: left 1s var(--spring-soft); }
.wave-stop { position: absolute; top: 4px; right: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--opc); }
.stage-progress { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font: 500 14px/1 var(--text); }
.stage-progress b { font: 700 16px/1 var(--text); }

/* Text that changes during the demo: before and after values swap on the screen's state. */
.demo-swap::before { content: attr(data-before); }
[data-logged] .demo-swap::before { content: attr(data-after); }
[data-ch10] .step-value .demo-swap::before { content: attr(data-after); }
[data-logged] .stage-progress .demo-swap, [data-ch10] .step-value .demo-swap { display: inline-block; animation: pop .5s var(--spring-fast); }
@keyframes pop { 0% { scale: .7; opacity: .3; } 100% { scale: 1; opacity: 1; } }

.log-button, .save-button {
  display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 999px;
  background: var(--t); color: var(--ot); font: 700 15px/1 var(--text);
  transition: border-radius .35s var(--spring-fast), scale .35s var(--spring-fast);
}
[data-press='log'] .log-button, [data-press='save'] .save-button { border-radius: 16px; scale: .96; }

.compact-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.compact { padding: 10px; border-radius: 18px; background: var(--pc); color: var(--opc); }
.compact img { width: 44px; height: 66px; object-fit: cover; border-radius: 5px; rotate: -2deg; box-shadow: 0 6px 12px -4px rgb(0 0 0 / .4); }
.compact:nth-child(2) img { rotate: 2deg; }
.compact p { height: 2.4em; margin: 9px 0 7px; overflow: hidden; font: 700 12px/1.2 var(--text); }
.ring { display: flex; align-items: center; gap: 5px; font: 700 11px/1 var(--text); }
.ring::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(var(--pc) 52%, transparent 54%), conic-gradient(var(--opc) calc(var(--p) * 1%), color-mix(in srgb, var(--opc) 28%, transparent) 0);
}

.post { display: flex; gap: 10px; margin-bottom: 8px; padding: 11px 12px; border-radius: 18px; background: var(--s-low); }
.post-avatar { flex: none; width: 34px; height: 34px; }
.post-who { display: flex; align-items: center; gap: 6px; font: 700 13px/1.2 var(--text); }
.post-text { margin-top: 3px; font: 400 13px/1.35 var(--text); }
.ch-tag { padding: 3px 6px; border-radius: 4px; background: var(--secondary-container); color: var(--on-secondary-container); font: 700 10.5px/1 var(--text); }

.demo-locked { border-radius: 14px; background: var(--s-container); transition: background-color .6s ease; }
[data-unlocked] .demo-locked { background: transparent; }
.locked-row { display: flex; align-items: center; gap: 10px; padding: 12px; color: var(--on-surface-variant); font: 600 13px/1.2 var(--text); }
.lock-icon { position: relative; flex: none; width: 22px; height: 22px; }
.lock-icon svg { position: absolute; inset: 0; width: 22px; height: 22px; fill: currentColor; transition: opacity .25s ease, scale .6s var(--spring-fast), rotate .6s var(--spring-fast); }
.lock-open { opacity: 0; scale: .5; rotate: -30deg; }
[data-unlocked] .lock-closed { opacity: 0; scale: .5; }
[data-unlocked] .lock-open { opacity: 1; scale: 1; rotate: 0deg; fill: var(--tertiary); }
.screen .locked-text::before { content: '2 posts unlock at Ch. 10'; }
.screen[data-unlocked] .locked-text::before { content: 'Unlocked at Ch. 10'; }
.unlocked-posts { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s var(--spring-soft); }
.unlocked-posts > div { min-height: 0; overflow: hidden; }
[data-unlocked] .unlocked-posts { grid-template-rows: 1fr; }
.unlocked-posts .post { opacity: 0; translate: 0 12px; transition: opacity .4s ease .25s, translate .7s var(--spring) .25s; }
.unlocked-posts .post + .post { transition-delay: .4s; }
[data-unlocked] .unlocked-posts .post { opacity: 1; translate: 0 0; }

.mini-dock {
  position: absolute; left: 12px; right: 12px; bottom: 14px; height: 62px; padding: 0 8px;
  display: flex; align-items: center; justify-content: space-around;
  border-radius: 999px; background: var(--shell); color: var(--on-shell);
  box-shadow: 0 8px 18px -8px rgb(0 0 0 / .35); font: 700 14px/1 var(--text);
}
.mini-tab { display: flex; align-items: center; gap: 4px; }
.mini-icon { position: relative; display: grid; place-items: center; width: 42px; height: 42px; }
.mini-icon .dock-burst { opacity: 1; scale: 1; rotate: 0deg; fill: var(--sun); transition: none; }
.mini-tab .dock-glyph { width: 25px; height: 25px; }
.mini-tab.is-active .dock-glyph { fill: var(--ink); }
.mini-you { width: 28px; height: 28px; fill: var(--aqua); }

.scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .34); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
[data-sheet] .scrim { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 18px 26px;
  border-radius: 30px 30px 0 0; background: var(--s-low);
  translate: 0 105%; transition: translate .4s cubic-bezier(.3, 0, .8, .15);
}
[data-sheet] .sheet { translate: 0 0; transition: translate .6s var(--spring); }
.sheet-handle { display: block; width: 32px; height: 4px; margin: 0 auto 16px; border-radius: 2px; background: var(--outline-variant); }
.sheet-title { font: 900 21px/1 var(--wide); }
.sheet-sub { margin: 4px 0 16px; color: var(--on-surface-variant); font-size: 13px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 3px; height: 40px; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: 4px; background: var(--s-high); font: 600 13px/1 var(--text); border-radius: 6px; }
.segmented span:first-child { border-radius: 999px 6px 6px 999px; }
.segmented span:last-child { border-radius: 6px 999px 999px 6px; }
.segmented .is-on { background: var(--sc); color: var(--osc); }
.segmented svg { width: 16px; height: 16px; fill: currentColor; }
.stepper { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 16px; }
.step-btn { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--s-high); transition: scale .3s var(--spring-fast), background-color .2s ease; }
.step-btn::before, .step-btn::after { content: ''; position: absolute; top: 50%; left: 50%; width: 18px; height: 3px; margin: -1.5px 0 0 -9px; border-radius: 2px; background: var(--on-surface); }
.step-plus::after { rotate: 90deg; }
.step-minus::after { display: none; }
[data-press='plus'] .step-plus { scale: .88; background: var(--sc); }
.step-value { font: 900 42px/1 var(--wide); color: var(--p); }
@media (prefers-color-scheme: dark) { .step-value { color: var(--p); } }
.checkpoints { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; margin-bottom: 20px; }
.checkpoints i { height: 8px; border-radius: 4px; background: var(--s-highest); transition: background-color .3s ease; }
.checkpoints i:nth-child(-n + 9) { background: var(--p); }
.checkpoints .next { background: var(--sc); box-shadow: inset 0 0 0 1.5px var(--p); }
[data-ch10] .checkpoints .next { background: var(--p); }

.finger {
  position: absolute; z-index: 5; top: 0; left: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; background: rgb(28 27 32 / .26); border: 2px solid rgb(255 255 255 / .92);
  box-shadow: 0 6px 14px rgb(0 0 0 / .25); pointer-events: none;
  opacity: 0; translate: var(--fx, 260px) var(--fy, 720px);
  transition: translate .75s cubic-bezier(.45, 0, .2, 1), opacity .3s ease, scale .2s ease;
}
[data-finger] .finger { opacity: 1; }
.finger.tap { scale: .78; }
.finger::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #fff; opacity: 0; }
.finger.tap::after { animation: ripple .5s ease-out; }
@keyframes ripple { from { opacity: .9; scale: 1; } to { opacity: 0; scale: 2.2; } }

/* ---------- Sticker ribbon ---------- */

.sticker-band { overflow: hidden; padding: 28px 0; }
.sticker-track { display: flex; gap: 14px; width: max-content; padding-right: 14px; animation: marquee 70s linear infinite; }
.sticker-band:hover .sticker-track { animation-play-state: paused; }
.sticker-band .sticker { height: 42px; padding: 0 20px; font-size: 16px; rotate: -2deg; }
.sticker-band .sticker:nth-child(3n) { rotate: 2deg; }
.sticker-band .sticker:nth-child(4n + 1) { rotate: 1deg; }
@keyframes marquee { to { translate: -50% 0; } }

/* ---------- Feature sections ---------- */

.split {
  max-width: 1200px; margin: 0 auto; padding: 112px 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center;
}
.split-flip .split-copy { order: 2; }
.clubs > .split + .split { padding-top: 0; }

.js .reveal { opacity: 0; translate: 0 32px; transition: opacity .7s ease, translate .9s var(--spring-soft); }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

/* Spoiler slider */
.spoiler-demo { padding: 20px; border-radius: 36px; background: var(--surface-low); }
.demo-head { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 24px; background: var(--pc); color: var(--opc); }
.demo-head img { width: 58px; height: 87px; object-fit: cover; border-radius: 7px; rotate: -3deg; box-shadow: 0 8px 16px -6px rgb(0 0 0 / .45); }
.demo-title { font: 800 32px/1 var(--tall); letter-spacing: .01em; }
.demo-sub { margin-top: 6px; font-size: 14px; }
.chapter-control { margin: 22px 6px 18px; }
.chapter-label { display: flex; align-items: baseline; gap: 10px; color: var(--on-surface-variant); font: 600 16px/1 var(--text); }
.chapter-label output { font: 900 30px/1 var(--wide); color: var(--on-surface); }
.chapter-slider { position: relative; height: 48px; margin-top: 12px; }
/* Segment centers line up with the 16 thumb stops of a 32px thumb. */
.chapter-segments {
  position: absolute; top: 19px; height: 10px; display: grid; grid-template-columns: repeat(16, 1fr); gap: 4px;
  left: calc(16px - (100% - 32px) / 30); width: calc((100% - 32px) * 16 / 15);
}
.chapter-segments i { border-radius: 999px; background: var(--surface-highest); transition: background-color .25s ease; }
.chapter-segments i.read { background: var(--primary); }
.chapter-segments i.current { background: var(--primary-container); box-shadow: inset 0 0 0 2px var(--primary); }
.chapter-slider input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.chapter-slider input::-webkit-slider-runnable-track { height: 48px; background: transparent; }
.chapter-slider input::-moz-range-track { height: 48px; background: transparent; }
.chapter-slider input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 32px; height: 32px; margin-top: 8px; border-radius: 50%;
  background: var(--sun); border: 3px solid var(--ink); box-shadow: 0 4px 10px rgb(0 0 0 / .25);
  transition: scale .3s var(--spring-fast);
}
.chapter-slider input::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--sun); border: 3px solid var(--ink); box-shadow: 0 4px 10px rgb(0 0 0 / .25); }
.chapter-slider input:active::-webkit-slider-thumb { scale: 1.15; }
.chapter-slider input:focus-visible { outline: none; }
.chapter-slider input:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--primary); outline-offset: 3px; }
.chapter-slider input:focus-visible::-moz-range-thumb { outline: 3px solid var(--primary); outline-offset: 3px; }
.chapter-hint { margin-top: 2px; color: var(--on-surface-variant); font-size: 13px; }

.feed { display: grid; }
.feed-post { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .55s var(--spring-soft), opacity .3s ease; }
.feed-post > div {
  min-height: 0; overflow: hidden; display: flex; gap: 12px; margin-bottom: 8px; padding: 12px 14px;
  border-radius: 18px; background: var(--surface);
  transition: margin .55s var(--spring-soft), padding .55s var(--spring-soft);
}
.feed-post .post-avatar { width: 38px; height: 38px; }
.feed-post .post-who { font-size: 14px; }
.feed-post .post-text { font-size: 15px; line-height: 1.4; }
.feed-post.is-locked { grid-template-rows: 0fr; opacity: 0; }
.feed-post.is-locked > div { margin-bottom: 0; padding-block: 0; }
.feed-locked {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface-highest); color: var(--on-surface-variant); font: 600 15px/1.25 var(--text);
}
.feed-locked.bump { animation: bump .45s var(--spring-fast); }
@keyframes bump { 40% { scale: .97; } 100% { scale: 1; } }
.feed-locked .lock-icon svg { fill: var(--on-surface-variant); }
.locked-more { display: block; margin-top: 3px; font-weight: 400; font-size: 13px; }
.locked-bars { display: grid; gap: 6px; margin-left: auto; }
.locked-bars i { display: block; width: 56px; height: 8px; border-radius: 4px; background: var(--outline-variant); }
.locked-bars i + i { width: 36px; }
.feed-done { padding: 14px 16px; border-radius: 14px; background: var(--sun); color: var(--ink); font: 700 15px/1.3 var(--text); }

/* Where everyone is */
.everyone, .poll { padding: 20px; border-radius: 36px; background: var(--surface-low); }
.everyone-head { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 24px; background: var(--pc); color: var(--opc); }
.club-picture { position: relative; flex: none; width: 68px; height: 68px; }
.club-burst { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--sun); }
.club-owl { position: absolute; inset: 14%; width: 72%; height: 72%; }
.everyone-title { font: 900 21px/1.05 var(--wide); }
.everyone-sub { margin-top: 6px; font-size: 14px; }
.track { position: relative; height: 70px; margin: 34px 24px 6px; }
.track-line, .track-fill { position: absolute; left: 0; top: 33px; height: 6px; border-radius: 3px; }
.track-line { right: 0; background: var(--surface-highest); }
.track-fill { width: calc(var(--at) * 1%); background: var(--primary); }
.marker { position: absolute; top: 14px; left: calc(var(--at) * 1%); width: 44px; height: 44px; margin-left: -22px; }
.marker svg, .marker .you-face { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface-low); }
.js .everyone .track-fill { width: 0; transition: width 1.3s var(--spring-soft) .2s; }
.js .everyone .marker { left: 0; transition: left 1.2s var(--spring) calc(.2s + var(--i, 0) * .12s); }
.js .everyone.is-visible .track-fill { width: calc(var(--at) * 1%); }
.js .everyone.is-visible .marker { left: calc(var(--at) * 1%); }
.marker-count { position: absolute; top: -6px; right: -8px; padding: 3px 7px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 11px/1 var(--text); }
.you-face { display: grid; place-items: center; background: var(--primary-container); color: var(--on-primary-container); font: 700 16px/1 var(--text); }
.marker.is-you .you-face { box-shadow: 0 0 0 3px var(--primary); }
.you-tag { position: absolute; top: -26px; left: 50%; translate: -50% 0; padding: 4px 9px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font: 700 11px/1 var(--text); }
.track-ends { display: flex; justify-content: space-between; margin: 0 4px 18px; color: var(--on-surface-variant); font: 600 13px/1 var(--text); }
.track-ends span { display: flex; align-items: center; gap: 6px; }
.end-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.track-ends svg { width: 18px; height: 18px; fill: var(--tertiary); }
.readers { display: grid; gap: 8px; }
.readers li { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 18px; background: var(--surface); }
.readers li > svg, .readers .you-face { flex: none; width: 42px; height: 42px; border-radius: 50%; }
.readers .is-you { background: var(--primary-container); color: var(--on-primary-container); }
.readers .is-you .you-face { background: var(--surface); color: var(--primary); }
.reader-name { flex: 1; font: 700 16px/1.2 var(--text); }
.reader-name small { display: block; margin-top: 2px; font: 400 13px/1.2 var(--text); color: var(--on-surface-variant); }
.readers .is-you small { color: inherit; }
.readers b { font: 700 16px/1 var(--text); color: var(--primary); }
.readers .is-you b { color: inherit; }
.readers b.done { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: var(--tertiary-container); color: var(--on-tertiary-container); font-size: 13px; }
.readers b.done svg { width: 16px; height: 16px; fill: currentColor; }

/* Poll */
.poll-kicker { display: flex; align-items: center; gap: 6px; margin: 4px 6px 0; color: var(--primary); font: 700 14px/1 var(--text); }
.poll-kicker svg { width: 20px; height: 20px; fill: currentColor; }
.poll-title { margin: 10px 6px 18px; font: 900 26px/1.05 var(--wide); }
.poll-options { display: grid; gap: 10px; }
.option {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 14px 20px 14px 14px; border-radius: 22px; background: var(--pc); color: var(--opc);
}
.option img { width: 56px; height: 84px; object-fit: cover; border-radius: 7px; rotate: -2deg; box-shadow: 0 8px 16px -6px rgb(0 0 0 / .45); }
.option:nth-child(2) img { rotate: 2deg; }
.option-title { font: 800 25px/1 var(--tall); letter-spacing: .01em; }
.option-by { margin: 4px 0 10px; font-size: 13px; }
.option-bar { display: block; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--opc) 26%, transparent); overflow: hidden; }
.option-bar i { display: block; height: 100%; width: var(--share, 0%); border-radius: 4px; background: var(--opc); transition: width 1.1s var(--spring-soft); }
.option-count { min-width: 1.2em; text-align: right; font: 900 30px/1 var(--wide); }
.winner-sticker {
  position: absolute; top: -12px; right: 18px; padding: 7px 13px; border-radius: 999px;
  background: var(--sun); color: var(--ink); font: 700 14px/1 var(--text);
  box-shadow: 0 6px 12px -4px rgb(0 0 0 / .3); rotate: 8deg; scale: 1;
  transition: scale .6s var(--spring-fast);
}
.js .poll:not(.is-won) .winner-sticker { scale: 0; }

/* Bookcase: a small version of the Library cabinet (navy in light mode, dark metal with warm light in dark mode). */
.bookcase { padding: 24px 18px 18px; border-radius: 180px 180px 22px 22px; background: var(--wood); box-shadow: 0 40px 70px -40px rgb(var(--shadow) / .7); }
.shelf {
  position: relative; display: flex; align-items: flex-end; gap: 4px; height: 230px; padding: 0 22px;
  border-radius: 10px; background: var(--inside); border-bottom: 14px solid var(--rail);
  box-shadow: inset 0 18px 30px -18px rgb(0 0 0 / .45);
}
.shelf:first-child { height: 300px; border-radius: 160px 160px 10px 10px; }
.shelf + .shelf { margin-top: 14px; }
@media (prefers-color-scheme: dark) {
  .shelf::before { content: ''; position: absolute; top: 0; left: 18%; right: 18%; height: 3px; border-radius: 2px; background: #ffe1a1; box-shadow: 0 0 28px 8px rgb(255 200 120 / .3); }
  .shelf:first-child::before { top: 6px; }
}
.book {
  position: relative; display: flex; align-items: center; justify-content: center; flex: none;
  width: calc(var(--w) * 1px); height: calc(var(--h) * 2.2px); padding: 12px 0 46px;
  border-radius: 5px 5px 2px 2px; background: var(--pc); color: var(--opc);
  box-shadow: inset -7px 0 0 rgb(0 0 0 / .16), inset 3px 0 0 rgb(255 255 255 / .14);
  transform-origin: bottom left;
}
.book > span { writing-mode: vertical-rl; rotate: 180deg; overflow: hidden; max-height: 100%; font: 800 15px/1 var(--tall); letter-spacing: .02em; white-space: nowrap; }
.book-classic { --pc: #2f5240; --opc: #e3f1e6; padding-bottom: 12px; }
.book-lean { rotate: 8deg; transform-origin: bottom right; translate: 4px 0; }
.progress-dot {
  position: absolute; bottom: 10px; left: 50%; display: grid; place-items: center; width: 32px; height: 32px; margin-left: -16px;
  border-radius: 50%; background: var(--sun); color: var(--ink); font: 700 10px/1 var(--text); font-style: normal; rotate: -8deg;
}
.book-gap { flex: 1; }
.lamp { width: auto; height: 132px; margin-bottom: -2px; }
.book-gatsby-up { --pc: #c9a43a; --opc: #1c1b20; padding-bottom: 12px; }
.book-pride-up { --pc: #9c4a26; --opc: #fff; padding-bottom: 12px; }
.ivy { position: absolute; top: -2px; right: 36px; width: auto; height: 190px; pointer-events: none; }
.note { position: absolute; z-index: 1; top: 20px; padding: 6px 11px; color: var(--ink); font: 700 13px/1 var(--text); box-shadow: 0 3px 6px rgb(0 0 0 / .3); }
.shelf:first-child .note { top: 70px; }
.note-name { left: 44px; background: var(--sun); rotate: -4deg; }
.note-count { left: 168px; background: var(--pink); border-radius: 4px 12px 4px 12px; rotate: 3deg; }
.note-count-finished { left: 140px; background: var(--aqua); }
.note-finished { left: 30px; background: var(--paper); }
.js .bookcase .book, .js .bookcase .lamp, .js .bookcase .ivy { opacity: 0; translate: 0 -36px; transition: opacity .3s ease calc(var(--i, 0) * 80ms), translate .8s var(--spring) calc(var(--i, 0) * 80ms); }
.js .bookcase .book-lean { translate: 4px -36px; }
.js .bookcase.is-visible .book, .js .bookcase.is-visible .lamp, .js .bookcase.is-visible .ivy { opacity: 1; translate: 0 0; }
.js .bookcase.is-visible .book-lean { translate: 4px 0; }

/* ---------- How it works ---------- */

.steps-section { max-width: 1200px; margin: 0 auto; padding: 112px 32px; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; text-align: left; }
.step { padding: 30px 28px 32px; border-radius: 36px; color: var(--ink); rotate: var(--r); transition: rotate .5s var(--spring-fast), translate .5s var(--spring-fast); }
.step:hover { rotate: 0deg; translate: 0 -6px; }
.step-sun { background: var(--sun); --r: -2deg; }
.step-pink { background: var(--pink); --r: 1.5deg; }
.step-aqua { background: var(--aqua); --r: -1deg; }
.step-number { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 22px; }
.step-number svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff; }
.step-number b { position: relative; font: 900 32px/1 'Spoylr Wide', 'Arial Black', sans-serif; }
.step h3 { margin-bottom: 8px; font: 900 23px/1.05 'Spoylr Wide', 'Arial Black', sans-serif; }
.step p { font-size: 17px; line-height: 1.45; }

/* ---------- Questions ---------- */

.faq-section { max-width: 880px; margin: 0 auto; padding: 32px 32px 112px; text-align: center; }
.faq-list { margin-top: 44px; text-align: left; }
.faq-list details { margin-bottom: 10px; padding: 0 26px; border-radius: 22px; background: var(--surface-low); transition: background-color .2s ease; }
.faq-list details[open] { background: var(--surface-container); }
.faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; cursor: pointer; list-style: none; font: 700 18px/1.3 var(--text); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-container); color: var(--on-primary-container); font: 900 20px/1 var(--wide); transition: rotate .4s var(--spring-fast); }
.faq-list details[open] summary::after { rotate: 45deg; }
.faq-list details p { padding-bottom: 24px; color: var(--on-surface-variant); }

/* ---------- Closing ---------- */

.closing { padding: 0 32px 112px; }
.closing-panel {
  position: relative; overflow: hidden; max-width: 1136px; margin: 0 auto; padding: 96px 48px;
  border-radius: 56px; background: var(--closing); color: var(--on-closing); text-align: center;
}
.closing-panel .serif-lead { color: inherit; opacity: .85; }
.closing-panel p { margin: 22px 0 34px; font-size: 19px; opacity: .92; }
.closing-owl { position: absolute; top: 34px; right: 6%; width: 136px; height: 136px; rotate: 12deg; }
.js .closing-panel .closing-owl { scale: .4; rotate: -40deg; transition: scale .8s var(--spring-fast) .3s, rotate .8s var(--spring-fast) .3s; }
.js .closing-panel.is-visible .closing-owl { scale: 1; rotate: 12deg; }

/* ---------- Footer ---------- */

.footer {
  max-width: 1200px; margin: 0 auto; padding: 36px 32px 56px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px 32px; align-items: center;
  border-top: 1px solid var(--outline-variant);
}
.footer-line { font: 300 22px/1.2 var(--serif); color: var(--on-surface-variant); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer nav a { display: inline-flex; align-items: center; min-height: 48px; font: 700 15px/1 var(--text); text-decoration: none; }
.footer nav a:hover { color: var(--primary); }
.footer small { grid-column: 1 / -1; color: var(--on-surface-variant); font-size: 13px; }

/* ---------- Narrow screens: the dock moves to the bottom, like the app ---------- */

@media (max-width: 1000px) {
  .hero, .split { grid-template-columns: 1fr; }
  .split-flip .split-copy { order: 0; }
  .hero { padding-top: 124px; min-height: 0; text-align: left; }
  .hero-visual { min-height: 0; padding: 40px 0; }
  .steps { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
  .topbar-login { display: inline-flex; align-items: center; height: 48px; padding: 0 18px; border-radius: 999px; background: var(--secondary-container); color: var(--on-secondary-container); font: 700 15px/1 var(--text); text-decoration: none; }
  .dock {
    top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(440px, calc(100% - 32px));
    padding: 0 8px; justify-content: center;
  }
  .dock-brand, .dock-actions { display: none; }
  .dock-tabs { width: 100%; justify-content: space-around; gap: 0; }
  .dock-tab.is-active { padding-right: 12px; }
  html { scroll-padding-top: 16px; }
  .hero { padding: 16px 16px 24px; gap: 8px; }
  .hero-sticker span { margin-bottom: 18px; }
  .hero-actions .button { flex: 1 1 auto; }
  .hero-login { display: none; }
  .hero-visual { padding: 32px 0 8px; }
  .float-sticker { height: 34px; padding: 0 14px; font-size: 14px; }
  .float-sticker.g-fantasy { top: 4%; left: 0; }
  .float-sticker.g-romance { right: -4px; }
  .float-sticker.g-scifi { bottom: 4%; left: 2%; }
  .split { padding: 72px 16px; gap: 32px; }
  .spoiler-demo, .everyone, .poll { padding: 14px; border-radius: 30px; }
  .track { margin-inline: 22px; }
  .option { padding: 12px 16px 12px 12px; gap: 12px; grid-template-columns: 48px minmax(0, 1fr) auto; }
  .option img { width: 48px; height: 72px; }
  .option-title { font-size: 22px; }
  .shelf { padding: 0 10px; }
  .lamp { height: 120px; }
  .ivy { height: 150px; right: 16px; }
  .steps-section { padding: 72px 16px; }
  .faq-section { padding: 16px 16px 72px; }
  .faq-list details { padding: 0 18px; }
  .closing { padding: 0 16px 72px; }
  .closing-panel { padding: 136px 24px 56px; border-radius: 40px; }
  .closing-owl { top: 22px; right: 50%; margin-right: -50px; width: 100px; height: 100px; }
  .footer { grid-template-columns: 1fr; padding: 32px 16px 128px; }
}

/* The phone keeps its exact layout and scales down as a whole on small screens. */
@media (max-width: 420px) {
  .hero-visual .phone { scale: .86; margin: -49px -24px; }
  .book { width: calc(var(--w) * .82px); }
  .book > span { font-size: 15px; }
  .note-count { left: 150px; }
  .note-count-finished { left: 124px; }
  .lamp { display: none; }
}

/* ---------- Reduced motion: everything in its final place, no loops ---------- */

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