@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(fonts/figtree-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --paper: #f3f1ee;
  --scene: #e5e3df;
  --card: rgba(250, 249, 247, 0.84);
  --card-solid: #fbfaf8;
  --ink: #1d2126;
  --ink-2: #4b525c;
  --muted: #7d848e;
  --line: rgba(29, 33, 38, 0.1);
  --amber: #f4b400;
  --amber-ink: #3b2c00;
  --ev: #24a46d;
  --access: #5566e8;
  --lost: #e5484d;
  --shadow: 0 0 0 1px rgba(29, 33, 38, 0.06), 0 12px 32px -14px rgba(29, 33, 38, 0.32);
  --glass: inset 0 1px 0 rgba(255, 255, 255, 0.75), var(--shadow);
  --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html.locked, html.locked body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
svg { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the hero: the garage and its controls ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; max-height: 1100px; overflow: hidden; background: var(--scene); isolation: isolate; user-select: none; -webkit-user-select: none; }
html.embed .hero { height: 100vh; min-height: 0; max-height: none; }
.stage { position: absolute; inset: 0; }
.park-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.hero.dragging, .hero.dragging * { cursor: grabbing !important; }

.glass, .hero .brand, .bar .hud, .tools .tool, .seg, .lift, .intro, .tray, .card, .watchbar, .lvtag {
  background: var(--card);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: var(--glass);
}

.bar { position: absolute; top: max(14px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 4; pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .logo { width: 32px; height: 32px; flex: none; }
.brand .name { font-size: 20px; font-weight: 720; letter-spacing: -0.03em; }
.brand .tag { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.hero .brand { padding: 6px 12px 6px 6px; border-radius: 16px; }
.hud { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.hud b { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.hud > span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.hud svg { width: 19px; height: 19px; color: var(--ink-2); }
.hud-sep { width: 1px; height: 18px; background: var(--line); }
.sun-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(244, 180, 0, 0.22); transition: background 0.4s, box-shadow 0.4s; }
.sun-dot.night { background: #8ea0d8; box-shadow: 0 0 0 3px rgba(142, 160, 216, 0.25); }
.hud-lives { gap: 5px !important; }
.hud-lives i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(29, 33, 38, 0.28); }
.hud-lives i.lost { background: var(--lost); border-color: var(--lost); }
.hud.hit { animation: hit 0.5s; }
@keyframes hit { 25% { transform: translateX(calc(-50% - 5px)); } 50% { transform: translateX(calc(-50% + 4px)); } 75% { transform: translateX(calc(-50% - 2px)); } }

.tools { display: flex; align-items: center; gap: 8px; }
.tool { width: 42px; height: 42px; border: 0; border-radius: 14px; display: grid; place-items: center; padding: 0; transition: background 0.2s, color 0.2s, transform 0.15s; }
.tool svg { width: 21px; height: 21px; }
.tool:active { transform: scale(0.94); }
.seg { display: flex; padding: 3px; border-radius: 16px; gap: 2px; }
.seg .tool { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; width: 38px; height: 36px; border-radius: 12px; }
.seg .tool[aria-pressed='true'] { background: var(--ink); color: #fff; }

/* the lift panel: a button per level, like the ones by the lift doors. Each shows its free bays,
   or while a car is picked up, how many bays on that floor fit it */
.lift { position: absolute; right: max(16px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 6px; border-radius: 22px; }
.lift-cap { font-size: 9.5px; font-weight: 760; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); line-height: 1; padding: 2px 0 2px; }
.lv { position: relative; width: 50px; height: 50px; border: 0; border-radius: 15px; background: rgba(255, 255, 255, 0.72); display: grid; place-content: center; justify-items: center; padding: 0; transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s, opacity 0.2s; }
.lv b { font-size: 17px; font-weight: 780; letter-spacing: -0.02em; line-height: 1; }
.lv > svg:not(.lv-arm) { width: 22px; height: 22px; }
.lv small { margin-top: 3px; font-size: 10.5px; font-weight: 720; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.lv small:empty { display: none; }
.lv[aria-pressed='true'] { background: var(--ink); color: #fff; }
.lv[aria-pressed='true'] small { color: rgba(255, 255, 255, 0.66); }
.lv.target { box-shadow: 0 0 0 2px var(--amber); animation: pulse 1.2s ease-in-out infinite; }
.lv.target small { color: #8a6400; }
.lv[aria-pressed='true'].target small { color: var(--amber); }
.lv.none { opacity: 0.42; }
.lv.over { background: var(--amber); color: var(--amber-ink); transform: scale(1.08); }
.lv.over small { color: var(--amber-ink); }
.lv-arm { position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); pointer-events: none; }
.lv-arm rect { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; }
.lv.arming .lv-arm rect { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.48s linear; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(244, 180, 0, 0.35); } }

/* before anyone plays */
.intro { position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(580px, calc(100% - 32px)); padding: 20px 22px 18px; border-radius: 24px; z-index: 3; }
.intro h1 { margin: 0; font-size: clamp(25px, 3.2vw, 32px); font-weight: 760; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.intro > p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.intro-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 16px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--ink-2); flex-basis: 100%; }
.intro-app { height: 46px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.kind { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; color: #fff; background: #9aa1aa; }
.kind svg { width: 15px; height: 15px; }
.kind.std { background: #e2dfda; }
.kind.std svg { color: #fbfaf8; }
.kind.ev { background: var(--ev); }
.kind.access { background: var(--access); }
.watching { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.watching i, .watchbar i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font-size: 15px; font-weight: 680; letter-spacing: -0.01em; box-shadow: 0 0 0 1px var(--line); transition: transform 0.15s, background 0.2s, box-shadow 0.2s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -10px rgba(29, 33, 38, 0.6); }
.btn.primary:hover { background: #2a3038; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.small { height: 36px; padding: 0 14px; font-size: 13.5px; }

/* the tray of arriving cars */
.tray { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 14px 14px; border-radius: 26px; z-index: 3; }
.tray-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 2px 10px; font-size: 12px; }
.tray-head > span:first-child { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--muted); }
.tray-hint { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.4s; }
.tray.hint-done .tray-hint { opacity: 0; }
.chips { display: flex; gap: 12px; min-height: 64px; align-items: center; }
.chips:empty::before { content: ''; width: 64px; height: 64px; border-radius: 20px; border: 2px dashed rgba(29, 33, 38, 0.12); }
.chip { position: relative; width: 64px; height: 64px; flex: none; border: 0; border-radius: 20px; background: #e2dfda; padding: 0; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line), 0 6px 14px -8px rgba(29, 33, 38, 0.4); touch-action: none; transition: transform 0.18s cubic-bezier(.2, .8, .2, 1), box-shadow 0.2s; cursor: grab; }
.chip:hover { transform: translateY(-2px); }
.chip.kind-ev, .drag-ghost.kind-ev, .coach-hand.kind-ev { background: #d9efe4; }
.chip.kind-access, .drag-ghost.kind-access, .coach-hand.kind-access { background: #e0e4fa; }
.chip-car { width: 30px; height: 42px; color: #fbfaf8; filter: drop-shadow(0 2px 2px rgba(29, 33, 38, 0.28)); margin-top: -6px; }
.chip-car svg { width: 100%; height: 100%; }
.chip-kind { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 2px #fff; }
.chip-kind svg { width: 14px; height: 14px; }
.chip-kind.ev { background: var(--ev); }
.chip-kind.access { background: var(--access); }
.chip-ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); pointer-events: none; }
.chip-ring circle { stroke: rgba(29, 33, 38, 0.35); transition: stroke-dashoffset 0.25s linear, stroke 0.3s; }
.chip.kind-ev .chip-ring circle { stroke: var(--ev); }
.chip.kind-access .chip-ring circle { stroke: var(--access); }
.chip.low .chip-ring circle { stroke: var(--lost); }
.chip.low { animation: shiver 0.9s ease-in-out infinite; }
@keyframes shiver { 50% { transform: translateY(-2px) rotate(-1.5deg); } }
.chip.held .chip-ring circle { stroke: var(--amber); }
.chip-plate { position: absolute; bottom: 4px; left: 0; right: 0; font-size: 8.5px; font-weight: 760; letter-spacing: 0.05em; color: var(--ink-2); text-align: center; }
.chip-held { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 760; background: var(--amber); color: var(--amber-ink); border-radius: 999px; padding: 1px 7px; box-shadow: 0 0 0 2px #fff; white-space: nowrap; }
.chip-held:empty { display: none; }
.chip.held .chip-plate { display: none; }
.chip.front::after { content: ''; position: absolute; top: -12px; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); transform: translateX(-50%); opacity: 0.6; }
.chip.selected { transform: translateY(-5px); box-shadow: 0 0 0 2.5px var(--amber), 0 14px 22px -10px rgba(29, 33, 38, 0.5); }
.drag-ghost { position: absolute; left: 0; top: 0; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 18px; background: #e2dfda; display: grid; place-items: center; z-index: 6; pointer-events: none; box-shadow: 0 0 0 1px var(--line), 0 18px 30px -12px rgba(29, 33, 38, 0.55); }
.drag-ghost svg { width: 28px; height: 40px; color: #fbfaf8; filter: drop-shadow(0 2px 2px rgba(29, 33, 38, 0.3)); }
.drag-ghost .chip-kind svg { width: 14px; height: 14px; filter: none; color: #fff; }
.drag-ghost.lifted { box-shadow: 0 0 0 2px #fff, 0 22px 36px -12px rgba(29, 33, 38, 0.6); }
.drag-ghost.lifted::after { content: ''; position: absolute; left: 50%; bottom: -16px; width: 2px; height: 12px; margin-left: -1px; border-radius: 2px; background: rgba(29, 33, 38, 0.35); }

/* the first game: a ghost car shows the move, and a tip says it */
.coach { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.coach-hand { position: absolute; left: 0; top: 0; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 17px; background: #e2dfda; display: grid; place-items: center; opacity: 0; box-shadow: 0 0 0 2px #fff, 0 16px 28px -12px rgba(29, 33, 38, 0.55); }
.coach-hand svg { width: 26px; height: 37px; color: #fbfaf8; filter: drop-shadow(0 2px 2px rgba(29, 33, 38, 0.3)); }
.coach-tip { position: absolute; margin: 0; transform: translate(-50%, -100%); width: max-content; max-width: min(300px, calc(100vw - 40px)); padding: 9px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 620; line-height: 1.35; text-align: center; box-shadow: 0 12px 26px -12px rgba(29, 33, 38, 0.6); animation: pop-tip 0.3s cubic-bezier(.2, .8, .2, 1); }
.coach-tip.side { transform: translate(-100%, -50%); text-align: left; max-width: min(250px, calc(100vw - 110px)); }
@keyframes pop-tip { from { opacity: 0; translate: 0 6px; } }

.watchbar { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 7px 7px 7px 18px; border-radius: 999px; z-index: 3; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.watchbar span { display: inline-flex; align-items: center; gap: 8px; }

/* marks over the garage */
.marks { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.badge { position: absolute; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #fff; box-shadow: 0 4px 10px -4px rgba(29, 33, 38, 0.45); will-change: transform; }
.badge > svg:first-child { width: 17px; height: 17px; }
.badge.kind-std { background: #e2dfda; }
.badge.kind-std > svg:first-child { color: #fbfaf8; }
.badge.kind-ev { background: var(--ev); }
.badge.kind-access { background: var(--access); }
.badge > svg:last-child { position: absolute; inset: -5px; width: 40px; height: 40px; }
.badge circle { stroke: rgba(29, 33, 38, 0.3); transition: stroke-dashoffset 0.2s linear; }
.badge.kind-ev circle { stroke: var(--ev); }
.badge.kind-access circle { stroke: var(--access); }
.badge.low circle { stroke: var(--lost); }
.badge.held { box-shadow: 0 0 0 2.5px var(--amber), 0 4px 10px -4px rgba(29, 33, 38, 0.45); }
.badge.held circle { stroke: transparent; }
.lvtag { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; border: 0; border-radius: 999px; font-size: 13px; color: var(--ink); white-space: nowrap; transform-origin: 0 0; margin: -18px 0 0 -14px; pointer-events: auto; cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s; }
.lvtag:hover { box-shadow: 0 0 0 1.5px var(--ink), var(--glass); }
.lvtag b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 780; }
.lvtag span { font-weight: 680; }
.lvtag em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.lvtag.target { box-shadow: 0 0 0 2px var(--amber), var(--glass); }
.lvtag.target em { color: #8a6400; font-weight: 700; }
.lvtag.none { opacity: 0.5; }
.lvtag.over { background: var(--amber); }
.lvtag.over em { color: var(--amber-ink); }
.note { position: absolute; left: 0; top: 0; margin: -16px 0 0 -16px; animation: rise 1.5s cubic-bezier(.2, .8, .2, 1) forwards; }
.note.ok { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.note.ok svg { width: 18px; height: 18px; }
.note.paid { height: 28px; padding: 0 11px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); font-size: 13px; font-weight: 760; line-height: 28px; margin-left: -28px; font-variant-numeric: tabular-nums; }
@keyframes rise { 0% { opacity: 0; translate: 0 6px; scale: 0.8; } 15% { opacity: 1; translate: 0 0; scale: 1; } 75% { opacity: 1; } 100% { opacity: 0; translate: 0 -34px; } }

.toast { position: absolute; left: 50%; top: max(74px, calc(env(safe-area-inset-top) + 64px)); transform: translate(-50%, -8px); max-width: min(460px, calc(100% - 32px)); padding: 10px 16px; border-radius: 16px; background: rgba(29, 33, 38, 0.9); color: #fff; font-size: 13.5px; line-height: 1.4; text-align: center; opacity: 0; transition: opacity 0.25s, transform 0.25s; z-index: 5; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); padding: 26px 24px 22px; border-radius: 28px; z-index: 6; animation: pop 0.35s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(0.97); } }
.card h2 { margin: 0; font-size: 26px; font-weight: 760; letter-spacing: -0.035em; line-height: 1.1; text-wrap: balance; }
.card .verdict { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; }
.stats div { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.75); box-shadow: 0 0 0 1px var(--line); }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 22px; font-weight: 760; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pause-card .card-actions { flex-direction: column; align-items: stretch; }
.help-rules { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.help-rules li { display: flex; gap: 12px; align-items: flex-start; }
.help-rules .kind { width: 30px; height: 30px; border-radius: 10px; margin-top: 1px; }
.help-rules .kind svg { width: 18px; height: 18px; }
.help-rules .kind.std svg { width: 16px; height: 22px; }
.kind.lift-k { background: var(--ink); }
.help-rules b { display: block; font-size: 14.5px; font-weight: 720; }
.help-rules span { display: block; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.hero.no-gl .stage { display: grid; place-items: center; }

/* ---------- the sections below ---------- */
.how, .game, .appsec { max-width: 1160px; margin: 0 auto; padding: clamp(64px, 9vw, 112px) max(20px, env(safe-area-inset-left)); content-visibility: auto; contain-intrinsic-size: auto 820px; }
.eyebrow { margin: 0 0 12px; font-size: 12.5px; font-weight: 720; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.how h2, .game h2, .appsec h2 { margin: 0; font-size: clamp(30px, 4.2vw, 48px); font-weight: 760; letter-spacing: -0.04em; line-height: 1.05; text-wrap: balance; max-width: 18ch; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps li { position: relative; padding: 12px 12px 22px; border-radius: 26px; background: var(--card-solid); box-shadow: 0 0 0 1px var(--line); }
.steps figure { margin: 0; }
.steps figure svg { width: 100%; height: auto; border-radius: 16px; }
.steps .n { position: absolute; top: 20px; left: 20px; width: 26px; height: 26px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 760; display: grid; place-items: center; }
.steps h3 { margin: 16px 8px 0; font-size: 18px; font-weight: 720; letter-spacing: -0.02em; }
.steps p { margin: 6px 8px 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

.game { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: center; border-top: 1px solid var(--line); }
.game-copy > p:not(.eyebrow) { margin: 18px 0 26px; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 48ch; text-wrap: pretty; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rules li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-radius: 22px; background: var(--card-solid); box-shadow: 0 0 0 1px var(--line); }
.rules .kind { width: 38px; height: 38px; border-radius: 12px; }
.rules .kind svg { width: 22px; height: 22px; }
.rules h3 { margin: 2px 0 0; font-size: 16.5px; font-weight: 720; }
.rules p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }

.appsec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(28px, 6vw, 80px); align-items: center; border-top: 1px solid var(--line); }
.app-copy .lead { margin: 18px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.features { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features i { width: 30px; height: 30px; border-radius: 10px; background: var(--amber); color: var(--amber-ink); display: grid; place-items: center; flex: none; }
.features i svg { width: 18px; height: 18px; }
.features h3 { margin: 2px 0 0; font-size: 16.5px; font-weight: 720; }
.features p { margin: 3px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 16px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 680; transition: transform 0.15s, background 0.2s; }
.store svg { width: 22px; height: 22px; }
.store:hover { background: #2a3038; }
.store:active { transform: scale(0.97); }
.store-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.phone-wrap { display: grid; place-items: center; padding: 8px 0; }

/* a phone, drawn: frame, island, status bar, the app inside */
.phone { position: relative; width: 304px; height: 628px; border-radius: 54px; background: #121417; padding: 11px; box-shadow: inset 0 0 0 1.5px #2c3036, inset 0 0 0 4px #121417, 0 0 0 1px rgba(29, 33, 38, 0.18), 0 40px 70px -30px rgba(29, 33, 38, 0.55); }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 44px; background: #f7f6f3; overflow: hidden; color: var(--ink); }
.status { position: relative; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 6px 22px 0 30px; font-size: 15px; }
.status b { font-weight: 640; letter-spacing: -0.01em; }
.island { position: absolute; left: 50%; top: 11px; width: 94px; height: 30px; margin-left: -47px; border-radius: 20px; background: #121417; }
.status-icons { display: flex; align-items: center; gap: 5px; }
.status-icons svg { height: 11px; width: auto; fill: currentColor; }
.pscreens { position: absolute; top: 52px; left: 0; right: 0; bottom: 66px; }
.pscreen { position: absolute; inset: 0; padding: 8px 20px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateX(14px); transition: opacity 0.45s, transform 0.45s; pointer-events: none; }
.pscreen.on { opacity: 1; transform: none; }
.p-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.pscreen h4 { margin: 0; font-size: 23px; font-weight: 760; letter-spacing: -0.03em; line-height: 1.1; }
.p-bay { margin: 0; font-size: 14px; color: var(--ink-2); }
.pmap { width: 100%; height: auto; margin-top: 2px; }
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.p-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.p-chip svg { width: 13px; height: 13px; }
.p-chip.ev { color: #157a4f; background: #e3f4ec; box-shadow: none; }
.p-btn { margin-top: auto; height: 50px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 680; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; pointer-events: none; }
.p-btn small { font-size: 12px; font-weight: 600; opacity: 0.7; }
.p-btn.alt { margin-top: 0; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); justify-content: center; }
.p-time { margin: 0; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.p-ring { position: relative; width: 168px; height: 168px; margin: 10px auto 0; }
.p-ring svg { width: 100%; height: 100%; }
.p-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.p-ring b { font-size: 34px; font-weight: 760; letter-spacing: -0.03em; }
.p-ring span { font-size: 13px; color: var(--muted); }
.p-note { margin: 0; font-size: 13px; color: var(--ink-2); text-align: center; }
.p-receipt { margin-top: 8px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); padding: 4px 16px; }
.p-receipt div { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.p-receipt div:last-child { border-bottom: 0; }
.p-receipt span { color: var(--muted); }
.p-receipt .total b { font-size: 22px; font-weight: 760; letter-spacing: -0.02em; }
.ptabs { position: absolute; left: 0; right: 0; bottom: 0; height: 66px; display: flex; padding: 6px 12px 16px; border-top: 1px solid var(--line); background: rgba(247, 246, 243, 0.92); }
.ptab { flex: 1; border: 0; background: transparent; font-size: 12px; font-weight: 640; color: var(--muted); border-radius: 12px; position: relative; }
.ptab[aria-selected='true'] { color: var(--ink); }
.ptab[aria-selected='true']::before { content: ''; position: absolute; top: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--amber); }

.foot { max-width: 1160px; margin: 0 auto; padding: 36px max(20px, env(safe-area-inset-left)) 56px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.foot .brand .name { font-size: 18px; }
.foot p { margin: 0; font-size: 13px; color: var(--muted); max-width: 62ch; }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .brand .tag { display: none; }
  .game, .appsec { grid-template-columns: minmax(0, 1fr); }
  .phone-wrap { order: -1; }
}
@media (max-width: 700px) {
  .bar { top: max(10px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); }
  .hero .brand { padding: 5px 10px 5px 5px; }
  .brand .name { font-size: 17px; }
  .brand .logo { width: 28px; height: 28px; }
  .tool { width: 38px; height: 38px; border-radius: 12px; }
  .seg .tool { width: 34px; height: 32px; }
  .tools { gap: 6px; }
  .hud { top: 52px; height: 38px; padding: 0 13px; gap: 9px; }
  .hud b { font-size: 14.5px; }
  .lift { right: max(10px, env(safe-area-inset-right)); padding: 5px; gap: 5px; border-radius: 18px; }
  .lift-cap { display: none; }
  .lv { width: 44px; height: 44px; border-radius: 13px; }
  .lv b { font-size: 15.5px; }
  .lv small { font-size: 9.5px; margin-top: 2px; }
  .lvtag { font-size: 12px; padding: 5px 11px 5px 5px; gap: 7px; }
  .lvtag span { display: none; }
  .lvtag b { width: 24px; height: 24px; }
  .intro { padding: 16px 16px 14px; border-radius: 22px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .intro > p { font-size: 14px; }
  .tray { padding: 9px 10px 12px; border-radius: 22px; bottom: max(10px, env(safe-area-inset-bottom)); }
  .chips { gap: 9px; min-height: 56px; }
  .chip { width: 54px; height: 54px; border-radius: 17px; }
  .chip-plate { display: none; }
  .tray-hint { display: none; }
  .toast { top: max(98px, calc(env(safe-area-inset-top) + 92px)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .phone { transform: scale(0.92); margin: -24px 0; }
}
/* a tall phone: the lift panel lies across the top, under the bar and the clock */
@media (max-width: 700px) and (max-aspect-ratio: 4/5) and (min-height: 600px) {
  .lift { top: calc(max(10px, env(safe-area-inset-top)) + 50px); right: auto; left: 50%; transform: translateX(-50%); flex-direction: row; padding: 5px; }
  .hero[data-mode='play'] .lift, .hero[data-mode='paused'] .lift, .hero[data-mode='over'] .lift, .hero[data-mode='watch'] .lift { top: calc(max(10px, env(safe-area-inset-top)) + 96px); }
  .toast { top: calc(max(10px, env(safe-area-inset-top)) + 158px); }
}
@media (max-width: 380px) {
  .legend { display: none; }
  .hud-sep:nth-of-type(1) { display: none; }
}
html.embed .brand .tag { display: none; }
html.embed .intro { width: min(520px, calc(100% - 32px)); }
html.embed .watching { display: none; }
@media (max-height: 620px) {
  .intro > p { display: none; }
  .intro { padding: 14px 16px; }
  .watching { display: none; }
}

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