/* BallRoute website.
   Look: a puzzle-book page — warm graph paper, ink-navy type, the app's mint
   and gold, hand-written notes, hard offset shadows. The phone in the hero
   keeps the app's own palette (--app-*), so the demo looks exactly like the
   game. Dark mode follows the system unless the visitor picks one. */

:root {
  /* page */
  --paper: #F4F1EA;
  --paper-2: #ECE7DC;
  --ink: #16223A;
  --ink-soft: #2A3852;
  --muted: #5B6475;
  --rule: rgba(22, 34, 58, .16);
  --grid: rgba(22, 34, 58, .055);
  --mint: #37BC9B;
  --mint-deep: #23876E;
  --gold: #F5B700;
  /* the app (phone, tiles) */
  --app-bg: #F5F6FA;
  --app-surface: #FFFFFF;
  --app-surface-2: #F1F3F7;
  --app-text: #1B2A4A;
  --app-muted: #8A93A6;
  --app-line: rgba(27, 42, 74, .09);
  --accent: #37BC9B;
  --accent-deep: #2A9C80;
  --accent-soft: rgba(55, 188, 155, .14);
  --accent-glow: rgba(55, 188, 155, .45);
  --app-gold: #FFC107;
  --gold-soft: rgba(255, 193, 7, .2);
  --violet: #8B5CF6;
  --ice: #38BDF8;
  --key: #EC4899;
  --danger: #FF5252;
  --arrow: #1B2A4A;
  --board: #FFFFFF;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1620; --paper-2: #141D29; --ink: #EEF2F6; --ink-soft: #C9D2DD; --muted: #9AA5B5;
    --rule: rgba(255, 255, 255, .14); --grid: rgba(255, 255, 255, .045); --mint: #48CFAD; --mint-deep: #48CFAD;
    --gold: #FFD15C;
    --app-bg: #0E141C; --app-surface: #1A2330; --app-surface-2: #212C3B; --app-text: #EFF3F8; --app-muted: #8E99AC;
    --app-line: rgba(255, 255, 255, .08); --accent: #48CFAD; --accent-deep: #35B795; --accent-soft: rgba(72, 207, 173, .15);
    --accent-glow: rgba(72, 207, 173, .4); --app-gold: #FFD15C; --arrow: #E7ECF3; --board: #1A2330;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1620; --paper-2: #141D29; --ink: #EEF2F6; --ink-soft: #C9D2DD; --muted: #9AA5B5;
  --rule: rgba(255, 255, 255, .14); --grid: rgba(255, 255, 255, .045); --mint: #48CFAD; --mint-deep: #48CFAD;
  --gold: #FFD15C;
  --app-bg: #0E141C; --app-surface: #1A2330; --app-surface-2: #212C3B; --app-text: #EFF3F8; --app-muted: #8E99AC;
  --app-line: rgba(255, 255, 255, .08); --accent: #48CFAD; --accent-deep: #35B795; --accent-soft: rgba(72, 207, 173, .15);
  --accent-glow: rgba(72, 207, 173, .4); --app-gold: #FFD15C; --arrow: #E7ECF3; --board: #1A2330;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px;
  border: 0; border-radius: 12px; cursor: pointer; font-family: var(--body); font-weight: 700; font-size: 16px;
  text-decoration: none; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-ink { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--mint); }
.btn-ink:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--mint); }
.btn-ink:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--mint); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: 0 8px 20px var(--accent-glow); border-radius: 999px; }
.btn-ghost { background: var(--app-surface-2); color: var(--app-text); border-radius: 999px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14.5px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--rule); background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: background .2s, box-shadow .2s; }
.site-header.scrolled { background: var(--paper); box-shadow: 0 1.5px 0 var(--rule); }
.header-row { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; flex: none; }
.logo { height: 32px; width: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .site-header .logo-light { display: none; }
:root[data-theme="dark"] .site-header .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header .logo-light { display: none; }
  :root:not([data-theme="light"]) .site-header .logo-dark { display: block; }
}
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15.5px; color: var(--ink-soft); padding: 6px 0; }
.nav a:hover { color: var(--ink); text-decoration: underline wavy var(--mint); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { position: relative; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: 1.5px solid var(--rule); border-radius: 10px; cursor: pointer; }
.lang svg { width: 17px; height: 17px; color: var(--muted); }
.lang select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; outline: none; }
.lang select option { color: #16223A; background: #fff; }
#themeBtn .moon { display: none; }
:root[data-theme="dark"] #themeBtn .sun { display: none; }
:root[data-theme="dark"] #themeBtn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #themeBtn .sun { display: none; }
  :root:not([data-theme="light"]) #themeBtn .moon { display: block; }
}
.menu-btn { display: none; flex-direction: column; gap: 5px; }
.menu-btn span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hand-written notes ---------- */
.note { font-family: var(--hand); font-weight: 700; font-size: 27px; line-height: 1.1; color: var(--mint-deep); }
.note svg { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.note-light { color: var(--gold); transform: rotate(-3deg); margin-top: 18px; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(48px, 7vw, 98px); line-height: .96; letter-spacing: -.028em; }
.squiggle { position: relative; display: inline-block; color: var(--mint-deep); white-space: nowrap; }
.squiggle svg { position: absolute; left: 0; right: 0; bottom: -.16em; width: 100%; height: .22em; overflow: visible; }
.squiggle path { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; }
.lead { margin-top: 30px; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 31em; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.store {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 20px 0 16px;
  border-radius: 12px; background: #0B0F17; color: #fff; text-decoration: none; min-width: 178px;
  box-shadow: 4px 4px 0 var(--mint); transition: transform .12s, box-shadow .12s;
}
:root[data-theme="dark"] .store { background: #F4F1EA; color: #0B0F17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .store { background: #F4F1EA; color: #0B0F17; } }
.store:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--mint); }
.store svg { width: 26px; height: 26px; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 10.5px; font-weight: 600; opacity: .8; letter-spacing: .02em; }
.store b { font-size: 18.5px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.store .soon {
  position: absolute; top: -13px; right: -10px; display: none; font-style: normal; font-family: var(--hand); font-weight: 700;
  font-size: 19px; line-height: 1; padding: 3px 10px 4px; background: var(--gold); color: #2B2100; transform: rotate(5deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}
.store.is-soon { cursor: default; }
.store.is-soon .soon { display: block; }
.facts { margin-top: 28px; font-weight: 600; color: var(--muted); font-size: 15.5px; }
.facts i { font-style: normal; margin: 0 8px; color: var(--mint); }

.hero-demo { position: relative; display: flex; justify-content: center; }
.note-try { position: absolute; left: -12%; top: 4%; z-index: 2; transform: rotate(-6deg); width: 170px; }
.note-try svg { width: 90px; height: 60px; margin: 4px 0 0 60px; }

/* ---------- Phone + demo (app palette) ---------- */
.phone {
  position: relative; width: min(330px, 86vw); aspect-ratio: 9 / 18.6; padding: 11px; border-radius: 50px;
  background: #121821; transform: rotate(2.5deg);
  box-shadow: 14px 16px 0 var(--mint), 0 30px 60px rgba(22, 34, 58, .25);
}
.phone::before {
  content: ""; position: absolute; top: 22px; left: 50%; width: 90px; height: 25px; transform: translateX(-50%);
  border-radius: 20px; background: #05070B; z-index: 3;
}
.phone-screen {
  position: relative; height: 100%; border-radius: 40px; overflow: hidden; background: var(--app-bg); color: var(--app-text);
  display: flex; flex-direction: column; padding: 56px 12px 14px; gap: 10px; user-select: none; -webkit-user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--body);
}
.app-top { background: var(--app-surface); border-radius: 18px; padding: 10px 12px; box-shadow: 0 6px 16px rgba(27, 42, 74, .08); }
.app-title { text-align: center; line-height: 1.15; }
.app-title b { display: block; font-size: 16px; font-weight: 800; }
.app-title small { font-size: 11px; color: var(--app-muted); font-weight: 700; }
.app-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 10px; font-size: 12.5px; font-weight: 800; }
.chip svg { width: 13px; height: 13px; }
.chip-streak { background: var(--app-surface-2); color: var(--app-muted); }
.chip-streak b { color: var(--app-text); }
.chip-coins { background: var(--gold-soft); }
.coin { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFE58A, var(--app-gold) 60%, #E0A100); box-shadow: inset 0 0 0 1.5px rgba(160, 110, 0, .35); }
.moves {
  display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 4px; justify-items: center;
  padding: 3px 12px 4px; border-radius: 12px; background: var(--accent-soft); transition: background .2s;
}
.moves b { font-size: 21px; font-weight: 800; line-height: 1.1; }
.moves small { font-size: 8.5px; font-weight: 800; letter-spacing: .08em; color: var(--app-muted); }
.moves .mini-stars { grid-column: 1 / -1; display: flex; gap: 1px; }
.moves .mini-stars svg { width: 11px; height: 11px; color: var(--app-gold); }
.moves .mini-stars svg.off { color: color-mix(in srgb, var(--app-muted) 45%, transparent); }
.moves.low { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.moves.low b, .moves.low small { color: var(--danger); }
.moves.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.board-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.board {
  --cols: 5; --rows: 6; position: relative; width: 100%; max-height: 100%; aspect-ratio: var(--cols) / var(--rows);
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  background: var(--board); border-radius: 14px; box-shadow: 0 6px 16px rgba(27, 42, 74, .08); overflow: hidden;
}
.board.fail { animation: shake .45s; }
.cell {
  position: relative; border: 0; padding: 0; margin: 0; background: transparent; cursor: default;
  border-right: 1px solid var(--app-line); border-bottom: 1px solid var(--app-line);
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent; min-width: 0; min-height: 0; overflow: hidden;
}
.cell.can { cursor: pointer; }
.cell.can:hover { background: var(--app-surface-2); }
.cell .arr { width: 74%; height: 74%; color: var(--arrow); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.cell.golden .arr { color: var(--app-gold); filter: drop-shadow(0 0 6px var(--gold-soft)); }
.cell.locked .arr { opacity: .32; }
.cell.locked::after { content: ""; position: absolute; top: 16%; right: 16%; width: 5px; height: 5px; border-radius: 50%; background: var(--arrow); opacity: .35; }
.cell.hole::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--app-line); }
.cell.coach::after { content: ""; position: absolute; inset: 6%; border: 3px solid var(--accent); border-radius: 12px; animation: pulse 1.1s ease-in-out infinite alternate; }
@keyframes pulse { from { transform: scale(.9); opacity: .55; } to { transform: scale(1); opacity: 1; } }
.hand { position: absolute; z-index: 4; pointer-events: none; font-size: 26px; line-height: 1; animation: bob .9s ease-in-out infinite alternate; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
@keyframes bob { to { transform: translate(5px, 5px); } }
.portal-ring, .tile.portal i {
  width: 62%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #6D28D9 0 18%, transparent 19% 34%, rgba(139, 92, 246, .55) 35% 45%, transparent 46% 60%, var(--violet) 61% 74%, transparent 75%);
  box-shadow: 0 0 16px rgba(139, 92, 246, .55); animation: breathe 1.4s ease-in-out infinite alternate;
}
@keyframes breathe { to { box-shadow: 0 0 26px rgba(139, 92, 246, .8); transform: scale(1.04); } }
.ice-sq, .tile.ice i {
  width: 82%; height: 82%; border-radius: 14%; border: 2px solid color-mix(in srgb, var(--ice) 75%, transparent);
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, .85) 31% 35%, transparent 36% 50%, rgba(255, 255, 255, .85) 51% 55%, transparent 56%), color-mix(in srgb, var(--ice) 28%, transparent);
}
.exit-ring, .tile.exit i {
  width: 66%; aspect-ratio: 1; border-radius: 50%; position: relative;
  background: radial-gradient(circle, var(--accent-deep) 0 38%, transparent 39% 52%, var(--accent) 53% 70%, transparent 71%);
  box-shadow: 0 0 18px var(--accent-glow); animation: breathe-exit 1.1s ease-in-out infinite alternate;
}
@keyframes breathe-exit { to { box-shadow: 0 0 30px var(--accent-glow); } }
.cell .pad, .tile .pad { position: absolute; width: 38%; height: 38%; padding: 6%; color: var(--key); background: var(--board); border-radius: 50%; }
.key-badge { position: absolute; top: 6%; left: 6%; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--key); display: grid; place-items: center; box-shadow: 0 0 10px rgba(236, 72, 153, .5); }
.key-badge svg { width: 68%; height: 68%; color: #fff; }
.cell .key-badge.got { transform: scale(0); transition: transform .25s; }
.trail { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: visible; }
.trail polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trail .glow { stroke: var(--accent-glow); stroke-width: 7; filter: blur(3px); }
.trail .line { stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 3.5; }
.trail.failed .glow { stroke: color-mix(in srgb, var(--danger) 35%, transparent); }
.trail.failed .line { stroke: color-mix(in srgb, var(--danger) 60%, transparent); }
.trail .x { stroke: var(--danger); stroke-width: 3.5; stroke-linecap: round; }
.ball {
  position: absolute; z-index: 3; width: calc(100% / var(--cols) * .62); aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 30%, #8BF0D4, var(--accent) 45%, var(--accent-deep));
  box-shadow: 0 0 18px var(--accent-glow), 0 4px 8px rgba(0, 0, 0, .15);
}
.ball svg { width: 62%; height: 62%; color: #fff; transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.ball.rolling svg { display: none; }
.coin-pop { position: absolute; z-index: 5; pointer-events: none; font-weight: 800; font-size: 13px; color: #B38600; transform: translate(-50%, -50%); animation: rise .9s ease-out forwards; }
@keyframes rise { to { transform: translate(-50%, -160%); opacity: 0; } }
.app-note { min-height: 20px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--app-muted); }
.app-note.coach { color: var(--accent-deep); font-size: 14px; font-weight: 800; }
.app-note.bad { color: var(--danger); }
.app-controls { display: flex; align-items: center; gap: 10px; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--app-surface); box-shadow: 0 4px 12px rgba(27, 42, 74, .1); display: grid; place-items: center; cursor: pointer; flex: none; color: var(--app-text); }
.round svg { width: 21px; height: 21px; }
.round:disabled { opacity: .45; cursor: default; }
.drop { flex: 1; height: 50px; border: 0; border-radius: 17px; cursor: pointer; color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .06em; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: 0 8px 20px var(--accent-glow); transition: transform .12s; }
.drop:active { transform: scale(.97); }
.drop:disabled { opacity: .6; cursor: default; }
.drop.pulse { animation: pulse-btn .65s ease-in-out infinite alternate; }
@keyframes pulse-btn { to { transform: scale(1.05); } }
.win { position: absolute; inset: 0; z-index: 10; background: var(--app-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; animation: fade .35s ease; }
.win[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.win-stars { display: flex; gap: 6px; }
.win-stars svg { width: 54px; height: 54px; color: var(--app-gold); filter: drop-shadow(0 0 12px var(--gold-soft)); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.win-stars svg:nth-child(2) { animation-delay: .12s; }
.win-stars svg:nth-child(3) { animation-delay: .24s; }
.win-stars svg.off { color: color-mix(in srgb, var(--app-muted) 35%, transparent); filter: none; width: 44px; height: 44px; }
@keyframes pop { from { transform: scale(0); } }
.win-title { font-size: 24px; font-weight: 800; }
.win-coins { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; }
.win-coins .coin { width: 18px; height: 18px; }
.win-done { color: var(--app-muted); font-weight: 600; font-size: 14px; }
.win .btn { width: 100%; max-width: 230px; }

/* tiles used in drawings (app look) */
.tile {
  position: relative; width: 64px; height: 64px; border-radius: 14px; background: var(--board);
  box-shadow: inset 0 0 0 1.5px var(--app-line), 3px 3px 0 rgba(22, 34, 58, .12); display: grid; place-items: center; flex: none;
}
.tile > svg { width: 70%; height: 70%; color: var(--arrow); }
.tile.gold > svg { color: var(--app-gold); filter: drop-shadow(0 0 6px var(--gold-soft)); }
.tile.locked > svg { opacity: .32; }
.tile .lock-dot { position: absolute; top: 14%; right: 14%; width: 6px; height: 6px; border-radius: 50%; background: var(--arrow); opacity: .4; }
.tile.ice i, .tile.portal i, .tile.exit i { width: 70%; }
.tile.ice i { height: 70%; }

/* ---------- Numbers ---------- */
.numbers-row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.numbers-row p { padding: 22px 20px; color: var(--muted); font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.numbers-row p + p { border-left: 1.5px dashed var(--rule); }
.numbers-row b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 3.6vw, 48px); letter-spacing: -.04em; color: var(--ink); line-height: 1; margin-bottom: 6px; }

/* ---------- Blocks ---------- */
.block { padding: 120px 0; }
.block h2 { font-size: clamp(38px, 4.8vw, 64px); max-width: 13ch; }
.block-ink { background: #16223A; color: #F4F1EA; }
:root[data-theme="dark"] .block-ink { background: #19243A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .block-ink { background: #19243A; } }
.block-mint { background: var(--mint); color: #10241E; }
.block-paper { background: var(--paper-2); }
.lead-sm { margin-top: 20px; font-size: 18px; color: inherit; opacity: .85; max-width: 30em; }

/* How */
.how { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; margin-top: 64px; }
.how-route { position: absolute; left: 0; right: 0; top: 54px; height: 40px; width: 100%; z-index: 0; overflow: visible; pointer-events: none; }
.how-route path { fill: none; stroke: var(--mint); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.how-step { position: relative; z-index: 1; }
.sketch { height: 150px; display: flex; align-items: center; gap: 10px; position: relative; }
.hand-num { font-family: var(--hand); font-weight: 700; font-size: 44px; line-height: 1; color: var(--mint-deep); margin: 14px 0 6px; }
.how-step h3 { font-size: 26px; margin-bottom: 10px; letter-spacing: -.02em; }
.how-step p:not(.hand-num) { color: var(--ink-soft); }
.sketch-rotate .tile { width: 92px; height: 92px; }
.spin { animation: turn 2.4s cubic-bezier(.3, 1.4, .5, 1) infinite; }
@keyframes turn { 0%, 20% { transform: rotate(0); } 30%, 55% { transform: rotate(90deg); } 65%, 100% { transform: rotate(180deg); } }
.sketch-drop .ball { position: absolute; width: 28px; left: 32px; top: 50%; --cols: 1; animation: roll 2.6s ease-in-out infinite; }
@keyframes roll { 0% { left: 32px; opacity: 0; } 10% { opacity: 1; } 75% { left: 180px; transform: translate(-50%, -50%) scale(1); } 90%, 100% { left: 180px; transform: translate(-50%, -50%) scale(.2); opacity: 0; } }
.sketch-stars svg { width: 56px; height: 56px; color: var(--gold); animation: pop 2.4s cubic-bezier(.3, 1.6, .5, 1) infinite; }
.sketch-stars svg.big { width: 76px; height: 76px; animation-delay: .15s; }
.sketch-stars svg:last-child { animation-delay: .3s; }

/* Tiles legend */
.legend-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.legend-head { position: sticky; top: 120px; }
.legend { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid rgba(244, 241, 234, .3); }
.legend li { display: grid; grid-template-columns: 76px 1fr auto; gap: 22px; align-items: center; padding: 26px 0; border-bottom: 1.5px dashed rgba(244, 241, 234, .22); }
.legend .tile { width: 72px; height: 72px; box-shadow: 4px 4px 0 #48CFAD; }
.legend h3 { font-size: 24px; margin-bottom: 6px; letter-spacing: -.02em; }
.legend p { color: rgba(244, 241, 234, .75); font-size: 16px; }
.legend em { font-style: normal; font-family: var(--hand); font-weight: 700; font-size: 23px; color: #FFD15C; white-space: nowrap; transform: rotate(-4deg); }

/* Reasons */
.back { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.back-title { position: sticky; top: 120px; }
.reason { display: grid; grid-template-columns: 200px 1fr; column-gap: 28px; align-items: center; padding: 30px 0; border-bottom: 1.5px dashed var(--rule); }
.reason:first-child { border-top: 2px solid var(--ink); }
.reason .r-art { grid-row: span 2; }
.reason h3 { font-size: 24px; letter-spacing: -.02em; align-self: end; margin-bottom: 6px; }
.reason p { color: var(--ink-soft); align-self: start; }
.chapter-art { display: flex; align-items: center; gap: 5px; }
.chapter-art .d { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--rule); }
.chapter-art .d.done { background: var(--mint); }
.chapter-art .d.cur { background: var(--paper); box-shadow: 0 0 0 3px var(--mint); }
.chapter-art .chest { flex: none; width: 28px; height: 28px; color: var(--gold); animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-10deg); } 85% { transform: rotate(10deg); } }
.streak-art { display: flex; align-items: center; gap: 4px; }
.streak-art svg { width: 44px; height: 44px; color: var(--gold); }
.streak-art b { font-family: var(--display); font-size: 52px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.stars-art { display: flex; align-items: center; gap: 2px; }
.stars-art svg { width: 38px; height: 38px; color: var(--gold); }
.stars-art svg:nth-child(2) { width: 50px; height: 50px; }
.cal-art { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 150px; }
.cal-art i { aspect-ratio: 1; border-radius: 4px; background: var(--rule); }
.cal-art i.on { background: var(--mint); }
.cal-art i.today { background: var(--gold); }
.top-art { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.top-art li { display: flex; align-items: center; gap: 8px; }
.top-art span { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.top-art li:first-child span { background: var(--gold); border-color: var(--gold); color: #2B2100; }
.top-art i { height: 8px; width: var(--w); border-radius: 4px; background: var(--rule); }
.top-art li.you i { background: var(--mint); }
.top-art svg { width: 18px; height: 18px; color: var(--gold); }

/* Customize */
.custom { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.stickers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px 14px; }
.stickers i {
  aspect-ratio: 1; border-radius: 50%; transform: rotate(var(--r));
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .6), transparent 40%), linear-gradient(135deg, var(--a), var(--b));
  border: 5px solid #fff; box-shadow: 3px 4px 0 rgba(16, 36, 30, .3); transition: transform .2s;
}
.stickers i:hover { transform: rotate(0) scale(1.08); }
.chips { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 10px; }
.chips b {
  display: flex; flex-direction: column; justify-content: flex-end; height: 86px; padding: 8px; background: #fff;
  font-size: 12.5px; font-weight: 700; color: #16223A; box-shadow: 3px 3px 0 rgba(16, 36, 30, .3);
  background-image: linear-gradient(var(--a), var(--a)); background-size: 100% 60%; background-repeat: no-repeat;
}

/* FAQ */
.faq { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.faq-list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1.5px dashed var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 44px 24px 0; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.015em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--body); font-weight: 500; font-size: 30px; color: var(--mint-deep); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-soft); padding: 0 40px 24px 0; }

/* Support */
.support { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.mail { margin-top: 28px; font-weight: 600; color: var(--muted); }
.mail a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2.5px; text-underline-offset: 4px; }
.form { display: grid; gap: 22px; }
.form label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.form input, .form textarea {
  width: 100%; font: inherit; font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--ink); background: transparent;
  border: 0; border-bottom: 2px solid var(--rule); border-radius: 0; padding: 10px 0; outline: none; transition: border-color .15s;
}
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form textarea:focus { border-bottom-color: var(--mint); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form .btn { justify-self: start; margin-top: 6px; }
.form .btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }
.form-note { font-size: 15px; font-weight: 600; }
.form-note.ok { color: var(--mint-deep); }
.form-note.err { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ts { min-height: 65px; }

/* Last call */
.last { padding: 90px 0 110px; }
.last-row { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; border-top: 2px solid var(--ink); padding-top: 50px; }
.last-icon { width: 88px; height: 88px; border-radius: 22px; background: #fff; box-shadow: 4px 4px 0 var(--ink); }
.last h2 { font-size: clamp(32px, 3.6vw, 48px); }
.last p { margin-top: 8px; color: var(--ink-soft); font-weight: 500; }
.last .stores { margin: 0; }

/* Footer */
.site-footer { background: #16223A; color: #F4F1EA; padding: 56px 0 40px; }
:root[data-theme="dark"] .site-footer { background: #0A1018; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #0A1018; } }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-grid .logo { height: 30px; }
.footer-tag { margin-top: 14px; font-family: var(--hand); font-size: 26px; color: #48CFAD; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-links a { text-decoration: none; font-weight: 600; color: rgba(244, 241, 234, .8); }
.footer-links a:hover { color: #fff; text-decoration: underline wavy #48CFAD; text-underline-offset: 5px; }
/* Languages: a tidy two-column list, the current one marked like a solved tile. */
.footer-langs { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px 32px; justify-self: end; }
.footer-langs a {
  display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; text-decoration: none;
  color: rgba(244, 241, 234, .72);
}
.footer-langs a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid rgba(244, 241, 234, .35); flex: none; }
.footer-langs a:hover { color: #fff; }
.footer-langs a[aria-current] { color: #fff; }
.footer-langs a[aria-current]::before { background: #48CFAD; border-color: #48CFAD; box-shadow: 0 0 0 3px rgba(72, 207, 173, .25); }
.copyright a { color: inherit; text-decoration: underline; text-decoration-color: rgba(72, 207, 173, .7); text-underline-offset: 3px; }
.copyright { margin-top: 40px; color: rgba(244, 241, 234, .55); font-size: 13.5px; }

/* Legal / 404 */
.page { padding: 56px 0 110px; }
.legal { max-width: 780px; }
.legal h1 { font-size: clamp(40px, 5.6vw, 64px); margin-bottom: 20px; }
.legal h2 { font-size: 24px; margin: 38px 0 10px; letter-spacing: -.02em; }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.75; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--ink); text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal strong { color: var(--ink); }
.nf { text-align: center; padding: 120px 0; }
.nf .tile { margin: 0 auto 30px; width: 104px; height: 104px; box-shadow: 6px 6px 0 var(--mint); }
.nf h1 { font-size: clamp(34px, 4.4vw, 54px); margin: 0 auto 30px; max-width: 16ch; }

/* ---------- Blog ---------- */
.block-blog { padding: 100px 0 40px; }
.blog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 34px; }
.block-blog .blog-head h2 { max-width: none; }
.blog-head .more, .crumbs a { font-weight: 700; text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2.5px; text-underline-offset: 5px; }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.post-card a {
  display: flex; flex-direction: column; height: 100%; padding: 22px 22px 20px; text-decoration: none;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 5px 5px 0 var(--mint);
  transition: transform .12s ease, box-shadow .12s ease;
}
.post-card a:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--mint); }
.post-card h2, .post-card h3 { font-size: 23px; line-height: 1.12; letter-spacing: -.02em; margin: 16px 0 10px; }
.post-card p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.55; flex: 1; }
.post-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1.5px dashed var(--rule); font-size: 14px; font-weight: 600; color: var(--muted); }
.post-card-meta b { color: var(--mint-deep); font-weight: 700; white-space: nowrap; }
.post-card-tiles, .post-tiles { display: flex; gap: 6px; }
.post-card-tiles .tile { width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--app-line), 2px 2px 0 rgba(22, 34, 58, .12); }
.blog .crumbs { font-size: 14.5px; color: var(--muted); margin-bottom: 34px; }
.crumbs i { font-style: normal; margin: 0 8px; color: var(--mint); }
.crumbs a { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; color: var(--ink-soft); }
.blog-intro { max-width: 760px; margin-bottom: 50px; }
.eyebrow { font-family: var(--hand); font-weight: 700; font-size: 28px; color: var(--mint-deep); line-height: 1; margin-bottom: 10px; }
.blog-intro h1 { font-size: clamp(42px, 6vw, 76px); }
.blog-intro .lead { margin-top: 20px; }

.post-layout { display: grid; grid-template-columns: minmax(0, 740px) 280px; gap: 80px; align-items: start; }
.post { max-width: 740px; min-width: 0; }
.post-body h2 { scroll-margin-top: 96px; }
.post-side { position: sticky; top: 100px; display: grid; gap: 22px; }
.toc p { font-family: var(--hand); font-weight: 700; font-size: 25px; color: var(--mint-deep); line-height: 1; margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--muted); }
.toc a:hover { color: var(--ink); border-left-color: var(--mint); }
.side-app { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 18px; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); box-shadow: 4px 4px 0 var(--mint); }
.side-app img { width: 56px; height: 56px; border-radius: 14px; background: #fff; }
.side-app p { font-size: 14px; line-height: 1.35; color: var(--ink-soft); font-weight: 500; }
.side-app p b { display: block; font-family: var(--display); font-size: 18px; color: var(--ink); }
.side-app .btn { grid-column: 1 / -1; }
.post-head { margin-bottom: 40px; }
.post-tiles .tile { width: 46px; height: 46px; border-radius: 11px; }
.post-head h1 { font-size: clamp(36px, 5.2vw, 60px); margin-top: 28px; line-height: 1.04; }
.post-meta { margin-top: 18px; color: var(--muted); font-weight: 600; font-size: 15px; }
.post-meta i { font-style: normal; margin: 0 6px; color: var(--mint); }
.post-body { font-size: 18.5px; line-height: 1.75; color: var(--ink-soft); }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 { font-size: clamp(26px, 3vw, 34px); color: var(--ink); margin-top: 1.8em; line-height: 1.12; }
.post-body h3 { font-size: 22px; color: var(--ink); margin-top: 1.5em; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: .45em; }
.post-body li::marker { color: var(--mint-deep); font-weight: 700; }
.post-body strong { color: var(--ink); }
.post-body a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: var(--gold); }
.post-body .tip { margin-top: 1.4em; padding: 18px 22px; background: var(--paper-2); border-left: 5px solid var(--gold); border-radius: 0 12px 12px 0; color: var(--ink); font-weight: 500; }
.post-cta {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: center; margin-top: 2.4em !important;
  padding: 26px; border: 2px solid var(--ink); border-radius: 18px; background: var(--paper); box-shadow: 6px 6px 0 var(--mint);
}
.post-cta img { width: 76px; height: 76px; border-radius: 19px; background: #fff; box-shadow: 3px 3px 0 var(--ink); grid-row: span 1; }
.post-cta-title { font-family: var(--display); font-weight: 800; font-size: 25px; line-height: 1.1; color: var(--ink); letter-spacing: -.02em; }
.post-cta p + p { margin-top: 6px; font-size: 16px; line-height: 1.5; }
.post-cta .stores { grid-column: 1 / -1; margin-top: 14px; }
.related { margin-top: 90px; padding-top: 50px; border-top: 2px solid var(--ink); }
.related h2 { font-size: clamp(30px, 3.4vw, 44px); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav {
    position: fixed; inset: 76px 0 auto; flex-direction: column; gap: 0; padding: 10px 28px 22px; margin: 0;
    background: var(--paper); box-shadow: 0 1.5px 0 var(--rule); transform: translateY(-130%); transition: transform .25s ease;
  }
  .nav.open { transform: none; }
  .nav a { padding: 14px 0; font-size: 19px; border-bottom: 1.5px dashed var(--rule); }
  .menu-btn { display: flex; }
  .header-cta { display: none; }
  .header-actions { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 72px; }
  .hero-demo { flex-direction: column; align-items: center; }
  .note-try { position: static; width: auto; transform: rotate(-3deg); margin: 0 0 18px; text-align: center; }
  .note-try svg { display: none; }
  .legend-wrap, .back, .custom, .faq, .support { grid-template-columns: 1fr; gap: 40px; }
  .legend-head, .back-title { position: static; }
  .how { grid-template-columns: 1fr; gap: 56px; }
  .how-route { display: none; }
  .last-row { grid-template-columns: auto 1fr; }
  .last .stores { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-langs { justify-self: start; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-side { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  body { font-size: 16px; background-size: 32px 32px; }
  .header-row { gap: 10px; height: 64px; }
  .nav { inset: 64px 0 auto; padding: 8px 16px 20px; }
  .logo { height: 26px; }
  .lang select { max-width: 86px; }
  .hero { padding: 24px 0 70px; }
  .block { padding: 84px 0; }
  .numbers-row { grid-template-columns: 1fr 1fr; }
  .numbers-row p:nth-child(3) { border-left: 0; }
  .numbers-row p:nth-child(n+3) { border-top: 1.5px dashed var(--rule); }
  .legend li { grid-template-columns: 60px 1fr; }
  .legend .tile { width: 60px; height: 60px; }
  .legend em { grid-column: 2; justify-self: start; }
  .reason { grid-template-columns: 1fr; }
  .reason .r-art { grid-row: auto; margin-bottom: 16px; }
  .stickers { grid-template-columns: repeat(4, 1fr); }
  .chips { grid-template-columns: repeat(3, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .store { min-width: 0; flex: 1 1 0; padding: 0 12px; gap: 8px; height: 54px; }
  .store b { font-size: 16px; }
  .store svg { width: 22px; height: 22px; }
  .phone { transform: none; box-shadow: 9px 10px 0 var(--mint), 0 24px 50px rgba(22, 34, 58, .22); }
  .last-row { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; gap: 20px; }
  .block-blog { padding: 70px 0 20px; }
  .post-body { font-size: 17px; }
  .post-tiles .tile { width: 38px; height: 38px; }
  .post-cta { padding: 20px; grid-template-columns: 1fr; }
  .related { margin-top: 64px; }
}
@media (max-width: 380px) {
  .lang svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
