/* Every page that isn't the homepage or the race: the game pages, the games index and the racer
   pages (bin/subpages.js). Loaded after home.css, which supplies the tokens, the top bar, the
   buttons, the Google Play button, the phone frame and the footer.

   Layout: each page opens on a band in its subject's own colour (the game's icon colour, the
   racer's marble colour) with the homepage's sunburst and marble-top edge, then runs white
   pop-shadow cards on the cool paper ground. Same light look in both themes, like the apps. */
:root { --sky: #E6F3FF; --on: #fff; --on-soft: rgba(29,24,56,.24); }

/* ----------------------------------------------------------------- top bar */
.top--on:not(.is-solid) .brand b, .top--on:not(.is-solid) .nav a { color: #fff; }
.top--on:not(.is-solid) .nav a:hover { background: rgba(255,255,255,.16); }
.nav a[aria-current="page"] { background: rgba(255,255,255,.24); }
.top.is-solid .nav a[aria-current="page"] { background: var(--paper); }

/* --------------------------------------------------------------------- hero */
.ph { --c: #6A35DB; --sx: 72%; --sy: 52%; position: relative; isolation: isolate; overflow: hidden; margin-top: -72px; padding-top: 72px; background: var(--c); color: var(--on); }
.ph::before { content: ""; position: absolute; z-index: -1; width: 2200px; height: 2200px; left: var(--sx); top: var(--sy); transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.08) 0 7.5deg, transparent 7.5deg 15deg); animation: spin 120s linear infinite; }
.ph::after { content: ""; position: absolute; z-index: 2; left: 0; right: 0; bottom: -1px; height: 18px; pointer-events: none;
  background: radial-gradient(circle at 18px 18px, var(--paper) 16.5px, transparent 17.5px) 0 0 / 36px 18px repeat-x; }
.ph__glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(45% 60% at var(--sx) var(--sy), rgba(255,255,255,.28), transparent 70%); }
.ph__in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(20px, 3vw, 40px) clamp(64px, 7vw, 100px); }
.ph__in--one { grid-template-columns: minmax(0, 1fr); }
.ph--light { --on: var(--ink); --on-soft: rgba(29,24,56,.1); }
.ph--light::before { background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.3) 0 7.5deg, transparent 7.5deg 15deg); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.crumbs a { text-decoration: none; opacity: .85; }
.crumbs a:hover { opacity: 1; text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }
.outline { color: #fff; text-shadow: 3px 3px 0 var(--ink), -3px 3px 0 var(--ink), 3px -3px 0 var(--ink), -3px -3px 0 var(--ink), 0 3px 0 var(--ink), 0 -3px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 8px 0 var(--ink); }
.ph__copy { display: grid; gap: 22px; align-content: start; min-width: 0; }
.ph__lede { font-size: clamp(18px, 1.6vw, 21px); font-weight: 600; line-height: 1.55; max-width: 31em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { background: var(--on-soft); font-weight: 800; font-size: 14px; padding: 7px 13px; border-radius: 999px; }
.gp--hi { background: #fff; color: var(--ink); box-shadow: var(--pop); }
.gp--hi small { opacity: .6; }
.gp--soon.gp--hi { background: transparent; color: inherit; box-shadow: none; }
.sec-sm { padding-block: clamp(48px, 7vw, 96px); }
.lead-in { margin-top: clamp(-56px, -4vw, -32px); position: relative; z-index: 3; }
.card { background: var(--card); border: 3px solid var(--ink); border-radius: var(--r-lg); box-shadow: 0 8px 0 var(--ink); }
.kicker--ink { color: var(--ink); }
.kicker--sun { color: var(--sun); }
.say { position: absolute; z-index: 3; left: 3%; top: -4%; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; padding: 9px 14px 8px; font-weight: 800; font-size: 15px; line-height: 1.25; box-shadow: var(--pop-sm); max-width: 210px; }
.say::after { content: ""; position: absolute; bottom: -10px; left: 26px; width: 16px; height: 16px; background: #fff; border: 3px solid var(--ink); border-top: 0; border-left: 0; transform: rotate(45deg); }
.subh { font-size: 26px; margin: 36px 0 16px; }

/* game hero */
.app-hero { display: flex; align-items: center; gap: 18px; }
.app-hero img { width: 96px; height: 96px; border-radius: 26px; border: 3px solid var(--ink); box-shadow: var(--pop); }
.app-hero p { font-weight: 900; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.app-hero .status { margin-top: 8px; letter-spacing: .04em; }
.g-title { font-size: clamp(60px, 8.4vw, 116px); line-height: .92; letter-spacing: -0.02em; }
.ph .phone-stage { min-height: 560px; }
.ph .phone { width: min(290px, 70vw); }
.ph .phone--land { width: min(560px, 92%); aspect-ratio: 16 / 9; border-radius: 34px; padding: 10px; transform: rotate(-3deg); }
.phone--land .phone__screen { border-radius: 26px; }
.phone--land .phone__notch { top: 50%; left: 18px; width: 18px; height: 60px; transform: translateY(-50%); }
.ph .phone-stage--land { min-height: 420px; }
.ph .shots-nav { justify-content: center; margin-top: 26px; }
.floater { position: absolute; pointer-events: none; }
.floater--a { left: 0; top: 6%; width: 110px; height: 110px; }
.floater--b { right: 0; bottom: 6%; width: 96px; height: 96px; }
.phone-stage--land .floater--a { top: 0; }
.phone-stage--land .say { top: -12%; }
.peek-row { display: flex; gap: 0; margin-top: 4px; }
.peek-row canvas { width: 76px; height: 76px; margin-right: -10px; }

/* --------------------------------------------------------- signature demos */
/* Marble Sort: three steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.step canvas { display: block; width: 100%; height: 220px; background: linear-gradient(180deg, #CFE8FF, var(--sky)); border-bottom: 3px solid var(--ink); }
.step__body { padding: 20px 24px 24px; display: grid; gap: 8px; align-content: start; }
.step__n { width: 38px; height: 38px; border-radius: 50%; background: var(--sun); border: 3px solid var(--ink); display: grid; place-items: center; font: 800 19px/1 var(--display); }
.step h3 { font-size: 27px; }
.step p { color: var(--muted); font-weight: 600; font-size: 16px; }

/* Angry Marble: a shot and the Hollows */
.sling { position: relative; overflow: hidden; }
.sling__cv { display: block; width: 100%; height: clamp(260px, 34vw, 420px); cursor: pointer; }
.sling__tip { position: absolute; right: 14px; top: 12px; background: rgba(255,255,255,.85); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 13px; pointer-events: none; }
.roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.role { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 18px; display: grid; gap: 6px; align-content: start; }
.role__hollow { width: 46px; height: 46px; border-radius: 50%; background: #8B929A; border: 3px solid var(--ink); display: grid; place-items: center; color: #fff; }
.role__hollow svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.role h3 { font-size: 22px; }
.role p { font-size: 14.5px; font-weight: 600; color: var(--muted); line-height: 1.45; }

/* Tilt: a real board */
.tiltbox, .jarbox, .dokubox, .blastbox, .chainbox, .postbox { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(18px, 3vw, 34px); }
.tiltbox__stage { perspective: 900px; display: grid; place-items: center; }
.tilt__cv { display: block; width: min(100%, 460px); aspect-ratio: 6 / 7; touch-action: none; transition: transform .22s cubic-bezier(.3,1.4,.5,1); cursor: grab; border-radius: 22px; }
.tilt__cv[data-lean="U"] { transform: rotateX(9deg); }
.tilt__cv[data-lean="D"] { transform: rotateX(-9deg); }
.tilt__cv[data-lean="L"] { transform: rotateY(-9deg); }
.tilt__cv[data-lean="R"] { transform: rotateY(9deg); }
.tiltbox__side, .jarbox__side, .dokubox__side, .blastbox__side, .chainbox__side, .postbox__side { display: grid; gap: 14px; align-content: center; }
.tiltbox__side h3, .jarbox__side h3, .dokubox__side h3, .blastbox__side h3, .chainbox__side h3, .postbox__side h3 { font-size: clamp(28px, 3vw, 38px); }
.tiltbox__side p, .jarbox__side p, .dokubox__side p, .blastbox__side p, .chainbox__side p, .postbox__side p { font-weight: 600; color: var(--muted); }
.pad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(2, 58px); gap: 8px; }
.pad button { font: 800 26px/1 var(--display); color: #fff; background: var(--ink); border: 0; border-radius: 16px; cursor: pointer; box-shadow: 0 4px 0 rgba(29,24,56,.35); transition: transform .1s; }
.pad button:active { transform: translateY(3px); box-shadow: none; }
.pad [data-dir="U"] { grid-column: 2; grid-row: 1; }
.pad [data-dir="L"] { grid-column: 1; grid-row: 2; }
.pad [data-dir="D"] { grid-column: 2; grid-row: 2; }
.pad [data-dir="R"] { grid-column: 3; grid-row: 2; }
.tilt__status, .doku__status, .chain__status { font-weight: 800 !important; color: var(--ink) !important; min-height: 1.6em; }
.tilt__status b, .chain__status b { font-variant-numeric: tabular-nums; }
.tiltbox__side .btn, .dokubox__side .btn, .chainbox__side .btn { width: max-content; }

/* Marble Jar: the jar and the ladder */
.jar__cv { display: block; width: min(100%, 380px); aspect-ratio: 4 / 5; justify-self: center; }
.ladder { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; }
.ladder li { display: grid; place-items: center; }
.ladder li canvas { width: calc(50px * var(--s)); height: calc(50px * var(--s)); }

/* Marbledoku: level 1 */
.dokubox__board { display: grid; place-items: center; }
.doku__cv { display: block; width: min(100%, 420px); aspect-ratio: 1; cursor: pointer; touch-action: manipulation; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rules li { display: flex; gap: 12px; align-items: center; font-weight: 700; }
.rules b { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); display: grid; place-items: center; font: 800 15px/1 var(--display); }

/* Marble Blast: the tray */
.blast__cv { display: block; width: min(100%, 440px); aspect-ratio: 1; justify-self: center; }
.post__shot { display: block; width: min(100%, 300px); height: auto; justify-self: center; border-radius: 30px; border: 3px solid var(--ink); box-shadow: 0 6px 0 rgba(29,24,56,.18); }
.chain__cv { display: block; width: min(100%, 460px); aspect-ratio: 1; justify-self: center; border-radius: 26px; box-shadow: 0 6px 0 rgba(29,24,56,.18); cursor: crosshair; touch-action: manipulation; }
.blast__call { font: 800 24px/1.2 var(--display) !important; color: var(--ink) !important; min-height: 1.3em; }

/* ------------------------------------------------------------- racer lists */
.powers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pw { --pc: #FFCF3A; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 22px 22px 18px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s, transform .15s; }
.pw:hover { border-color: var(--ink); box-shadow: 0 5px 0 var(--ink); transform: translateY(-3px); }
.pw__head { display: flex; align-items: center; gap: 14px; }
.pw__icon { flex: none; width: 54px; height: 54px; border-radius: 16px; background: var(--pc); border: 3px solid var(--ink); display: grid; place-items: center; }
.pw__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pw__icon--txt { width: auto; padding: 0 10px; font: 900 11px/1 var(--body); letter-spacing: .08em; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.pw h3 { font-size: 25px; }
.pw__desc { color: var(--muted); font-weight: 600; font-size: 15.5px; line-height: 1.45; }
.pw__who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding-top: 12px; border-top: 2px dashed var(--line); }
.pw__who small { width: 100%; font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.mini { display: block; width: 46px; height: 46px; border-radius: 50%; transition: transform .15s cubic-bezier(.2,.8,.3,1.4); }
.mini:hover { transform: translateY(-3px) scale(1.08); }
.mini canvas { display: block; width: 100%; height: 100%; }

.apowers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ap { --c: #888; display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.ap:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 5px 0 var(--ink); }
.ap__face { display: block; width: 60px; height: 60px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, #fff); }
.ap__face canvas { display: block; width: 100%; height: 100%; }
.ap__body { display: grid; gap: 2px; min-width: 0; }
.ap__body b { font-weight: 900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ap__body strong { font: 800 19px/1.15 var(--display); }
.ap__body span { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.4; }
.ap__body em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--coral-deep); margin-top: 4px; }

.trules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.trule { --c: #888; display: grid; gap: 10px; align-content: start; padding: 20px 22px; border-radius: var(--r-md); background: color-mix(in srgb, var(--c) 14%, #fff); border: 2px solid color-mix(in srgb, var(--c) 40%, #fff); }
.trule__faces { display: flex; gap: 2px; }
.trule h3 { font-size: 25px; }
.trule p { font-weight: 600; color: var(--muted); }

.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feat-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; display: grid; gap: 8px; align-content: start; }
.feat-card__icon { width: 46px; height: 46px; border-radius: 14px; background: var(--sun); border: 2px solid var(--ink); display: grid; place-items: center; }
.feat-card__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feat-card h3 { font-size: 23px; }
.feat-card p { font-weight: 600; color: var(--muted); font-size: 15.5px; line-height: 1.5; }

/* ------------------------------------------------------------------ worlds */
.run { position: relative; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.worlds { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 14px; padding-top: 6px; }
.worlds::before { content: ""; position: absolute; left: 40px; right: 40px; top: 52px; height: 10px; border-radius: 6px; background: repeating-linear-gradient(90deg, var(--ink) 0 18px, transparent 18px 28px); opacity: .18; }
.world { --c: #888; position: relative; scroll-snap-align: start; display: grid; justify-items: start; align-content: start; gap: 8px; padding: 0 4px; }
.world__orb { position: relative; width: 96px; height: 96px; border-radius: 50%; background: var(--c); border: 3px solid var(--ink); box-shadow: var(--pop-sm); display: grid; place-items: center; }
.world__orb canvas { width: 82px; height: 82px; }
.world__glyph svg { width: 46px; height: 46px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.world__lv { font: 800 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.world h3 { font-size: 26px; }
.world h3 i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: 2px; }
.world p { font-weight: 600; font-size: 15px; color: var(--muted); line-height: 1.45; }

/* ------------------------------------------------- daily board, collection */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.daily { background: var(--sun); padding: clamp(24px, 3vw, 36px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.daily__face { position: relative; width: 150px; height: 150px; margin-top: 18px; }
.daily__face canvas { width: 100%; height: 100%; }
.daily__face svg { position: absolute; left: 50%; top: -26px; width: 58px; transform: translateX(-50%) rotate(-8deg); }
.daily h3, .collect h3 { font-size: clamp(28px, 3vw, 38px); }
.daily p, .collect p { font-weight: 600; margin-top: 8px; }
.streak { display: flex; gap: 6px; margin-top: 16px; }
.streak span { display: grid; justify-items: center; gap: 4px; font-weight: 900; font-size: 11px; }
.streak i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); background: rgba(255,255,255,.5); }
.streak .on i { background: var(--coral); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.streak .today i { background: #fff; outline: 3px dashed var(--ink); outline-offset: 2px; }
.collect { background: var(--ink); color: #fff; padding: clamp(24px, 3vw, 36px); display: grid; gap: 18px; }
.collect p { color: rgba(255,255,255,.75); }
.cgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.cgrid canvas { width: 100%; aspect-ratio: 1; display: block; }
.cgrid canvas.lock { filter: grayscale(1) brightness(.55); opacity: .5; }

/* ----------------------------------------------------------------- gallery */
.gallery { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; }
.gallery figure { flex: none; width: 220px; margin: 0; scroll-snap-align: start; display: grid; gap: 12px; align-content: start; }
.gallery .gshot { aspect-ratio: 9 / 16; border-radius: 30px; background: var(--ink); padding: 8px; box-shadow: 0 6px 0 rgba(29,24,56,.3); }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 23px; }
.gallery--land figure { width: 420px; }
.gallery--land .gshot { aspect-ratio: 16 / 9; border-radius: 24px; }
.gallery--land img { border-radius: 17px; }
.gallery figcaption { font-weight: 600; font-size: 15px; color: var(--muted); line-height: 1.4; }
.gallery figcaption b { display: block; color: var(--ink); font: 800 19px/1.2 var(--display); }

/* ---------------------------------------------------------------- end CTA */
.endcta { position: relative; overflow: hidden; background: var(--sun); padding: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 56px) clamp(110px, 12vw, 150px); display: grid; justify-items: center; text-align: center; gap: 18px; }
.endcta .kicker { color: var(--ink); }
.endcta h2 { font-size: clamp(38px, 5.4vw, 72px); }
.endcta .gp { box-shadow: var(--pop); }
.peek { position: absolute; left: 0; right: 0; bottom: -46px; display: flex; justify-content: center; pointer-events: none; }
.peek canvas { width: 110px; height: 110px; margin-inline: -6px; }
.fine-links { display: flex; gap: 18px; font-weight: 800; font-size: 14px; }

.more { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.mg { --c: #444; position: relative; display: grid; gap: 10px; padding: 18px; border-radius: var(--r-md); background: var(--c); color: #fff; border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); text-decoration: none; transition: transform .15s; }
.mg:hover { transform: translateY(-4px) rotate(-1deg); }
.mg img { width: 58px; height: 58px; border-radius: 16px; border: 3px solid var(--ink); }
.mg b { font: 800 22px/1.05 var(--display); }
.mg small { font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.mg em { position: absolute; top: 14px; right: 14px; font-style: normal; background: var(--sun); color: var(--ink); font-weight: 900; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 8px; border: 2px solid var(--ink); }

/* ------------------------------------------------------------- games index */
.ph--short .ph__in { padding-block: clamp(20px, 3vw, 40px) clamp(56px, 6vw, 80px); }
.gcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.gcard { --c: #444; position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 14px; align-content: start; padding: 24px; border-radius: var(--r-lg); background: var(--c); color: #fff; border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink); text-decoration: none; transition: transform .2s cubic-bezier(.2,.8,.3,1.3); }
.gcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 60% at 100% 100%, rgba(255,255,255,.22), transparent 60%); }
.gcard:hover { transform: translateY(-5px) rotate(-.5deg); }
.gcard__top { display: flex; gap: 14px; align-items: center; }
.gcard__top img { width: 74px; height: 74px; border-radius: 20px; border: 3px solid var(--ink); box-shadow: var(--pop-sm); }
.gcard__top small { display: block; font-weight: 900; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.gcard__top b { font: 800 32px/1 var(--display); }
.gcard__text { font-weight: 600; font-size: 16px; line-height: 1.5; }
.gcard__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gcard__chips i { font-style: normal; background: rgba(29,24,56,.22); font-weight: 800; font-size: 13px; padding: 5px 11px; border-radius: 999px; }
.gcard__go { font-weight: 900; font-size: 14px; margin-top: 4px; }
.gcard .ribbon { top: 30px; right: -38px; }

/* -------------------------------------------------------------- racer page */
.ph--racer { --sx: 26%; --sy: 55%; }
.ph--racer .ph__in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.rface { position: relative; justify-self: center; width: min(400px, 78vw); aspect-ratio: 1; margin-top: 40px; border-radius: 50%; }
.rface[role="button"] { cursor: pointer; }
.rface canvas { position: relative; z-index: 1; width: 100%; height: 100%; }
.rface::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: -2%; height: 9%; border-radius: 50%; background: rgba(29,24,56,.28); }
.rface.go canvas { animation: boing .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes boing { 0% { transform: scale(1); } 20% { transform: scale(1.1, .88) translateY(5%); } 50% { transform: scale(.94, 1.08) translateY(-7%); } 100% { transform: none; } }
.rface__crown { position: absolute; z-index: 2; left: 50%; top: -9%; width: 27%; transform: translateX(-50%) rotate(-8deg); }
.rface__hint { position: absolute; z-index: 2; right: -2%; bottom: 10%; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 7px 14px 6px; font-weight: 900; font-size: 14px; box-shadow: var(--pop-sm); display: inline-flex; gap: 8px; align-items: center; transform: rotate(4deg); }
.rface__hint svg { width: 18px; height: 18px; }
.r-title { font-size: clamp(76px, 11vw, 160px); line-height: .86; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.r-tags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tagline { background: var(--sun); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: 6px 16px 5px; font: 800 19px/1.2 var(--display); box-shadow: var(--pop-sm); }
.ph .team-chip { background: rgba(255,255,255,.92); color: var(--ink); font-size: 14px; padding: 7px 14px 7px 7px; }
.ph .team-chip i { width: 20px; height: 20px; border: 2px solid var(--ink); }
.r-quote { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 22px; padding: 14px 20px; box-shadow: var(--pop-sm); font: 700 21px/1.3 var(--display); max-width: 25em; }
.r-quote small { display: block; font: 900 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.r-pager { position: absolute; z-index: 3; left: 0; right: 0; top: 84px; display: flex; justify-content: space-between; pointer-events: none; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.r-pager a { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 900; font-size: 14px; background: var(--on-soft); padding: 5px 14px 5px 5px; border-radius: 999px; }
.r-pager a:last-child { padding: 5px 5px 5px 14px; }
.r-pager canvas { width: 32px; height: 32px; }

.record { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); overflow: hidden; }
.record__main { padding: clamp(20px, 3vw, 32px); display: grid; gap: 22px; align-content: center; }
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats div { padding: 4px 14px; border-left: 2px dashed var(--line); }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; font: 800 clamp(30px, 3.2vw, 42px)/1 var(--display); font-variant-numeric: tabular-nums; }
.stats sup, .fc sup { font-size: .45em; vertical-align: .9em; margin-left: 1px; }
.stats span { font-weight: 800; font-size: 13px; color: var(--muted); }
.notyet { font-weight: 600; font-size: 17px; color: var(--muted); max-width: 40em; }
.form__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.form__head h3 { font-size: 22px; }
.form__head a { font-weight: 900; font-size: 14px; text-decoration: none; border-bottom: 3px solid var(--coral); }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.fc { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; padding: 10px 4px 9px; border-radius: 16px; background: var(--paper); border: 2px solid var(--line); text-align: center; }
.fc small { font-weight: 900; font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.fc b { font: 800 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.fc span { font-size: 11.5px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.fc.win { background: var(--sun); border-color: var(--ink); }
.fc.win span { color: var(--ink); }
.fc[data-tier]::after { content: attr(data-tier); position: absolute; top: -9px; right: -6px; background: var(--ink); color: #fff; font-weight: 900; font-size: 10px; padding: 3px 6px; border-radius: 6px; letter-spacing: .06em; }
.latest { position: relative; display: grid; align-content: end; gap: 6px; min-height: 260px; padding: 20px; color: #fff; text-decoration: none; background: var(--ink); border-left: 3px solid var(--ink); overflow: hidden; isolation: isolate; }
.latest img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s; }
.latest::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(29,24,56,0) 30%, rgba(29,24,56,.9)); }
.latest:hover img { transform: scale(1.04); }
.latest__play { position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; margin: -56px 0 0 -36px; display: grid; place-items: center; }
.latest__play svg { width: 72px; height: 72px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.latest small { font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.latest b { font: 800 22px/1.15 var(--display); }
.latest--face { background: var(--c); }
.latest__face { position: absolute; top: 14px; left: 50%; width: 150px; height: 150px; transform: translateX(-50%); z-index: -1; }
.latest__face canvas { width: 100%; height: 100%; }

.rgames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rg { --c: #444; position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; padding: 22px 22px 20px; border-radius: var(--r-lg); background: var(--c); color: #fff; border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.rg::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 60% at 100% 100%, rgba(255,255,255,.2), transparent 60%); }
.rg__top { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.rg__top img { width: 60px; height: 60px; border-radius: 17px; border: 3px solid var(--ink); box-shadow: var(--pop-sm); }
.rg__top b { font: 800 26px/1 var(--display); }
.rg__top small { display: block; font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin-bottom: 3px; }
.rg__pow { background: rgba(255,255,255,.14); border-radius: 18px; padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.rg__pow small { font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.rg__pow strong { font: 800 23px/1.1 var(--display); }
.rg__pow span { font-weight: 600; font-size: 15.5px; line-height: 1.45; }
.rg .gp { padding: 8px 14px 8px 11px; border-radius: 14px; box-shadow: 0 4px 0 rgba(29,24,56,.45); }
.rg .gp svg { width: 22px; height: 22px; }
.rg .gp strong { font-size: 16px; }
.rg .gp--soon { box-shadow: none; }
.rg .ribbon { top: 18px; right: -50px; }

.story { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.story__main { display: grid; gap: 22px; }
.story__main h2 { font-size: clamp(36px, 4.6vw, 60px); }
.story__main p { font-size: 18.5px; line-height: 1.65; font-weight: 600; max-width: 34em; }
.story__main h3 { font-size: 28px; margin-top: 10px; }
.sig { --c: #FF6B6B; background: color-mix(in srgb, var(--c) 16%, #fff); border: 3px solid var(--ink); border-radius: var(--r-md); padding: 20px 24px; display: grid; gap: 6px; box-shadow: var(--pop-sm); }
.sig small { font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sig b { font: 800 30px/1.1 var(--display); }
.sig p { font-size: 17px; }
.facts { display: grid; gap: 12px; position: sticky; top: 96px; }
.fact { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; display: grid; gap: 4px; }
.fact small { font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.fact p { font-weight: 600; font-size: 15.5px; line-height: 1.5; }

.voice { --c: #FF6B6B; display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(22px, 4vw, 44px); background: color-mix(in srgb, var(--c) 13%, #fff); }
.voice__face { position: relative; aspect-ratio: 1; cursor: pointer; }
.voice__face canvas { width: 100%; height: 100%; }
.voice__copy { display: grid; gap: 14px; }
.voice__copy h2 { font-size: clamp(34px, 4.2vw, 54px); }
.voice__word { font: 800 clamp(28px, 3vw, 38px)/1.1 var(--display); }
.voice__copy p { font-weight: 600; color: var(--muted); }
.moods { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.mood { display: grid; justify-items: center; gap: 2px; padding: 10px 4px 9px; background: var(--card); border: 2px solid var(--line); border-radius: 18px; cursor: pointer; font: 800 14px/1.1 var(--body); color: var(--ink); transition: transform .12s, border-color .12s, box-shadow .12s; }
.mood canvas { width: 54px; height: 54px; }
.mood:hover { transform: translateY(-3px); border-color: var(--ink); }
.mood[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); background: var(--sun); }
.vnote { font-size: 14px; }
.vnote b { color: var(--ink); }

.duo--r { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.stack { display: grid; gap: 22px; }
.rival { padding: clamp(22px, 3vw, 34px); display: grid; gap: 12px; }
.rival__faces { display: flex; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--a) 24%, #fff), color-mix(in srgb, var(--b) 24%, #fff)); border-radius: var(--r-md); padding: 10px; border: 2px solid var(--line); }
.rival__faces > * { display: grid; justify-items: center; text-decoration: none; font: 800 18px/1 var(--display); gap: 2px; padding-bottom: 6px; }
.rival__faces canvas { width: 130px; height: 130px; }
.vs { font: 800 30px/1 var(--display); background: var(--ink); color: #fff; width: 56px; height: 56px; border-radius: 50%; display: grid !important; place-items: center; transform: rotate(-8deg); flex: none; padding: 0 !important; }
.rival h3 { font-size: 30px; }
.rival p { font-weight: 600; color: var(--muted); }
.rival .rival__line { color: var(--ink); font-weight: 800; }
.rival .verdict { color: var(--ink); font-weight: 800; border-left: 4px solid var(--coral); padding-left: 14px; }
.badge { display: inline-flex; width: max-content; font-weight: 900; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; background: var(--paper); border: 2px solid var(--line); padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.teamc { --c: #E85D9B; padding: clamp(22px, 3vw, 34px); display: grid; gap: 16px; align-content: start; background: var(--c); color: #fff; }
.teamc .kicker { color: #fff; opacity: .85; }
.teamc h3 { font-size: 34px; }
.teamc q { font: 800 22px/1.2 var(--display); quotes: "\201C" "\201D"; }
.tm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tm a { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.16); border-radius: 18px; padding: 8px 12px 8px 8px; text-decoration: none; transition: background .15s; }
.tm a:hover { background: rgba(255,255,255,.28); }
.tm a[aria-current] { background: #fff; color: var(--ink); }
.tm canvas { width: 52px; height: 52px; flex: none; }
.tm b { display: block; font: 800 19px/1.05 var(--display); }
.tm small { font-weight: 700; font-size: 12.5px; opacity: .85; }

.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.pager a { display: flex; align-items: center; gap: 14px; text-decoration: none; padding: 14px 18px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); transition: border-color .15s, transform .15s; }
.pager a:hover { border-color: var(--ink); transform: translateY(-2px); }
.pager a:last-child { justify-content: flex-end; text-align: right; }
.pager canvas { width: 54px; height: 54px; }
.pager small { display: block; font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pager b { font: 800 24px/1 var(--display); }
.pager .all { padding: 14px 22px; background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 900; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1040px) {
  .ph__in, .ph--racer .ph__in { grid-template-columns: 1fr; }
  .ph .phone-stage, .ph .phone-stage--land { min-height: 0; }
  .steps { grid-template-columns: 1fr; }
  .step { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .step canvas { height: 100%; min-height: 200px; border-bottom: 0; border-right: 3px solid var(--ink); }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiltbox, .jarbox, .dokubox, .blastbox, .chainbox, .postbox { grid-template-columns: 1fr; }
  .powers, .trules, .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apowers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo, .duo--r { grid-template-columns: 1fr; }
  .more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph--racer .ph__in { gap: 12px; }
  .rface { width: min(260px, 64vw); margin-top: 64px; }
  .ph--racer .ph__copy { justify-items: center; text-align: center; }
  .ph--racer .crumbs, .ph--racer .r-tags, .ph--racer .cta-row { justify-content: center; }
  .record { grid-template-columns: 1fr; }
  .latest { border-left: 0; border-top: 3px solid var(--ink); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; }
  .stats div:nth-child(4) { border-left: 0; padding-left: 0; }
  .rgames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story { grid-template-columns: 1fr; }
  .facts { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  .moods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .step { grid-template-columns: 1fr; }
  .step canvas { height: 190px; border-right: 0; border-bottom: 3px solid var(--ink); }
  .powers, .trules, .feats, .apowers, .rgames, .gcards { grid-template-columns: 1fr; }
  .app-hero img { width: 76px; height: 76px; border-radius: 20px; }
  .daily { grid-template-columns: 1fr; justify-items: start; }
  .daily__face { width: 120px; height: 120px; }
  .more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery figure { width: 190px; }
  .gallery--land figure { width: 300px; }
  .peek canvas { width: 80px; height: 80px; }
  .facts { grid-template-columns: 1fr; }
  .voice { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .voice__face { width: 200px; }
  .moods { width: 100%; }
  .rival__faces canvas { width: 96px; height: 96px; }
  .tm { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .all { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .r-pager a span { display: none; }
  .r-pager a, .r-pager a:last-child { padding: 5px; }
  .say { font-size: 13px; max-width: 160px; }
  .ph .phone--land { width: 100%; }
  .phone-stage--land .floater--a, .phone-stage--land .floater--b { width: 64px; height: 64px; }
  .phone-stage--land .say { top: -16%; }
  .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .role { padding: 14px; }
  .role:last-child { grid-column: 1 / -1; }
  .peek-row canvas { width: 56px; height: 56px; }
}
