/* © Hoang LLC. All rights reserved. */
/* Shipper homepage (r09). Static, phone first. Palette and layout follow the codex layout concept
   (review/G3/r09/evidence/homepage/codex-layout-concept.md); display font = the game's own Mali Bold (OFL, vendored). */

@font-face {
  font-family: "Mali";
  src: url("../fonts/Mali-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #54B8FF;
  --sky-l: #DDF1FF;
  --paper: #FFF8E8;
  --ink: #162333;
  --ink-2: #24374D;
  --muted: #55657A;
  --parcel: #FFD447;
  --coral: #FF5948;
  --purple: #7755D9;
  --teal: #14B8A6;
  --card: #FFFFFF;
  --cardboard: #E3B26A;
  --cardboard-d: #B9803A;
  --gold: #F2A516;
  --chip: #8E5BE0;
  --line: 3px solid var(--ink);
  --pop: 0 5px 0 var(--ink);
  --radius: 18px;
  --display: "Mali", "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --gutter: 16px;
  --topbar: 60px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; }
p { margin: 0 0 .8em; }
b { font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--parcel); padding: 8px 12px; border: var(--line); border-radius: 10px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 64px 0 72px; position: relative; }
.sec-head { max-width: 760px; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(28px, 7.4vw, 46px); text-wrap: balance; }
.eyebrow {
  display: inline-block; margin: 0 0 10px; padding: 3px 12px; border: var(--line); border-radius: 999px;
  background: var(--parcel); color: var(--ink); font: 700 13px/1.4 var(--display); letter-spacing: .06em; text-transform: uppercase;
  transform: rotate(-2deg);
}
.sec-lead { font-size: 17px; color: var(--ink-2); margin-top: 14px; }
.note { font-size: 13px; color: var(--muted); margin-top: 18px; }
.small { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px;
  border: var(--line); border-radius: 999px; box-shadow: var(--pop); font: 700 17px/1.1 var(--display); text-decoration: none;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; color: var(--ink);
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 15px; box-shadow: 0 3px 0 var(--ink); }
.btn-yellow { background: var(--parcel); }
.btn-coral { background: var(--coral); color: #fff; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar); display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gutter); background: rgba(255, 248, 232, .94); border-bottom: var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-box {
  width: 30px; height: 26px; border: var(--line); border-radius: 5px; background: var(--cardboard); position: relative; transform: rotate(-6deg);
}
.brand-box::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 7px; margin-left: -3.5px; background: var(--parcel); border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.brand-name { font: 700 24px/1 var(--display); letter-spacing: .02em; }
.brand-stamp {
  display: none; font: 700 11px/1 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--coral);
  border: 2px solid var(--coral); border-radius: 6px; padding: 3px 6px; transform: rotate(-4deg);
}
.nav { display: none; }
/* owner message 58: the download key is the bar's main key at every width; sign-in sits beside it from 720 px, in the menu below */
.topbar-cta { display: none; margin-left: auto; background: var(--card); }
.get-btn { margin-left: auto; gap: 6px; padding: 6px 14px 6px 12px; }
.get-btn::before {
  content: ""; flex: none; width: 17px; height: 17px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v11M6.5 9.5 12 15l5.5-5.5M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v11M6.5 9.5 12 15l5.5-5.5M4 20h16'/%3E%3C/svg%3E") center / contain no-repeat;
}
.get-btn[aria-expanded="true"] { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
/* one line each: a wrapped menu item or button looks broken (and the bar has a fixed height) */
.nav a, .topbar-cta, .get-btn { white-space: nowrap; }
.menu-btn {
  width: 44px; height: 44px; border: var(--line); border-radius: 12px; background: var(--card); display: grid; place-content: center; gap: 4px; cursor: pointer;
}
.menu-btn span { display: block; width: 20px; height: 3px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav.open {
  display: flex; flex-direction: column; position: fixed; top: var(--topbar); left: 0; right: 0; padding: 12px var(--gutter) 20px;
  background: var(--paper); border-bottom: var(--line); box-shadow: 0 12px 24px rgba(22, 35, 51, .18);
  /* a phone in landscape is shorter than the drawer: it scrolls, so the last link stays reachable */
  max-height: calc(100vh - var(--topbar)); max-height: calc(100dvh - var(--topbar)); overflow-y: auto; overscroll-behavior: contain;
}
.nav a { padding: 12px 4px; font: 700 18px/1.2 var(--display); text-decoration: none; border-bottom: 2px dashed rgba(22, 35, 51, .15); }
/* owner message 58: the menu opens on the two store keys; sign-in after the sections while the bar has no room for it */
.nav-get { margin: 4px 0 6px; padding: 10px 12px 12px; background: var(--parcel); border: var(--line); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.nav-get-say { margin: 0 0 8px; font: 700 16px/1.2 var(--display); }
.nav-get-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nav .nav-get .store-btn { min-width: 0; padding: 7px 10px 9px; border: 3px solid var(--ink); border-radius: 14px; font: 700 17px/1.1 var(--display); box-shadow: 0 3px 0 rgba(22, 35, 51, .35); }
.nav .nav-get .store-btn.alt { background: var(--ink); color: #fff; }
.nav .nav-get .store-btn.alt em { color: var(--parcel); }
.nav .nav-get .store-btn[aria-disabled="true"] { border-style: dashed; box-shadow: none; background: #fff; color: var(--ink); }
.nav .nav-sign { color: var(--coral); }
@media (min-width: 720px) {
  .topbar-cta { display: inline-flex; }
  .get-btn { margin-left: 0; }
  .nav .nav-sign { display: none; }
}

/* owner message 58: the header key's panel (a visitor who is not on an iPhone, iPad or Android phone): both store cards under the bar */
.get-pop {
  position: absolute; top: 100%; right: var(--gutter); z-index: 60; width: min(470px, calc(100vw - 2 * var(--gutter))); margin-top: 3px;
  padding: 14px 14px 16px; background: var(--paper); color: var(--ink); border: var(--line); border-radius: 0 0 20px 20px; box-shadow: 0 14px 28px rgba(22, 35, 51, .28);
}
.get-pop[hidden] { display: none; }
.get-pop:focus { outline: none; }
.get-pop-title { margin: 0 44px 12px 2px; font: 700 20px/1.25 var(--display); }
.get-pop-close {
  position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; background: var(--card);
  font: 700 22px/1 var(--body); color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.get-pop-close:hover { background: var(--parcel); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; background: var(--sky); overflow: hidden; isolation: isolate; }
.hero-art { position: absolute; inset: 0 0 120px; z-index: -2; }
/* r11 review-fix: below 1100 px the art is cut to a tall strip; 85 % keeps the thinking AI (and most of its bubble) of the top
   right in the frame from 320 px (58 % showed only the bubble at 390 px and half the AI at 768 px) */
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 85% 10%; transform: translateY(var(--hero-shift, 0px)) scale(1.04); }
.hero-shade {
  position: absolute; inset: 0 0 120px; z-index: -1;
  background: linear-gradient(180deg, rgba(22, 35, 51, 0) 18%, rgba(22, 35, 51, .55) 46%, rgba(22, 35, 51, .9) 74%);
}
.hero-copy { position: relative; padding: 270px var(--gutter) 36px; color: #fff; max-width: 640px; }
.kicker { font: 700 14px/1.3 var(--display); color: var(--parcel); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; text-shadow: 0 2px 0 var(--ink), 0 0 10px rgba(22, 35, 51, .8); }
.hero-title { display: flex; flex-direction: column; align-items: flex-start; }
.t-ship {
  font-size: clamp(56px, 17vw, 128px); line-height: .95; color: var(--parcel); letter-spacing: .02em;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink), 0 10px 18px rgba(0, 0, 0, .35);
}
.t-sub {
  margin-top: 8px; font-size: 15px; color: #fff; background: var(--coral); border: var(--line); border-radius: 8px; padding: 2px 10px;
  transform: rotate(-3deg); text-transform: uppercase; letter-spacing: .1em;
}
.tagline { font: 700 clamp(24px, 6.6vw, 38px)/1.2 var(--display); margin: 18px 0 10px; text-shadow: 0 3px 0 rgba(22, 35, 51, .6); }
.tagline mark { background: var(--parcel); color: var(--ink); padding: 0 8px; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lead { font-size: 16px; color: #F2F6FB; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 16px; }
.hero-actions:last-child { margin-bottom: 0; }
/* V2 r06 (card T): the launch date and the beta, then the store buttons (hero and CTA) */
.launch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.launch-badge, .beta-badge { display: inline-block; padding: 5px 12px; border: var(--line); border-radius: 999px; font: 700 15px/1.2 var(--display); color: var(--ink); }
.launch-badge { background: var(--parcel); }
.beta-badge { background: #fff; }
/* owner message 32: the stores at the top of the page (.open: site.js, once a store is open) */
.hero-get { margin: 0 0 14px; }
.hero-get-say { margin: 0 0 10px; font: 700 16px/1.3 var(--display); text-shadow: 0 2px 0 rgba(22, 35, 51, .6); }
.hero-get:not(.open) .hero-get-say { display: none; }

.cloud { display: none; position: absolute; z-index: -1; width: 160px; height: 46px; background: rgba(255, 255, 255, .85); border-radius: 999px; filter: blur(1px); }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; left: 24px; top: -34px; }
.cloud::after { width: 54px; height: 54px; left: 80px; top: -24px; }
/* clouds drift over the art only (right of the title on desktop, above it on phones); r11: only over the open sky above the
   kicker and left of the AI's thought bubble — the new hero has the thinking AI on the top right, which they must not cover */
.cloud.c1 { top: 6px; left: 34%; animation: drift 46s linear infinite; }
.cloud.c2 { top: 50px; left: 34%; transform: scale(.7); animation: drift 64s linear -30s infinite; opacity: .8; }
@keyframes drift { 0% { left: 34%; opacity: 0; } 12%, 88% { opacity: .9; } 100% { left: 44%; opacity: 0; } }
/* 720-1099 px: the bubble starts at ~33 % of the width, so the clouds keep to the sky on the left (2 % -> 10 %) */
@keyframes drift-narrow { 0% { left: 2%; opacity: 0; } 12%, 88% { opacity: .9; } 100% { left: 10%; opacity: 0; } }

.street { position: relative; height: 120px; background: linear-gradient(#9fd8ff, #c9ecff 60%); border-top: var(--line); overflow: hidden; }
.skyline { position: absolute; left: -10%; right: -10%; bottom: 44px; background-repeat: repeat-x; background-position: var(--sx, 0px) bottom; }
.skyline.far {
  height: 70px; opacity: .55; transform: translateX(calc(var(--scroll-x, 0px) * -0.15));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='70'%3E%3Cpath fill='%237ab9e6' d='M0 70V40h22V18h26v22h14V8h30v32h18V26h24v44zM154 70V30h20V12h22v18h16V36h26V4h28v32h18v34zM284 70V44h18V22h34v22h24v26z'/%3E%3C/svg%3E");
  animation: pan 90s linear infinite;
}
.skyline.near {
  height: 56px; opacity: .9; transform: translateX(calc(var(--scroll-x, 0px) * -0.35));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='56'%3E%3Cpath fill='%2314b8a6' d='M0 56V28h30v-14h28v42zM70 56V20h18V6h26v50zM126 56V34h36V16h20v40zM196 56V24h28v8h22V12h26v44z' opacity='.75'/%3E%3Cg fill='%23fff' opacity='.55'%3E%3Crect x='6' y='34' width='6' height='5'/%3E%3Crect x='18' y='34' width='6' height='5'/%3E%3Crect x='76' y='28' width='5' height='5'/%3E%3Crect x='96' y='14' width='6' height='5'/%3E%3Crect x='204' y='32' width='6' height='5'/%3E%3Crect x='254' y='20' width='6' height='5'/%3E%3C/g%3E%3C/svg%3E");
  animation: pan 50s linear infinite;
}
@keyframes pan { to { background-position: -1800px bottom; } }
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: #5d6878; border-top: 4px solid #c9d2dc; }
.road-dash {
  position: absolute; left: 0; right: -120px; top: 20px; height: 4px;
  background: repeating-linear-gradient(90deg, #fff 0 34px, transparent 34px 70px); animation: dash 1.2s linear infinite;
}
@keyframes dash { to { transform: translateX(70px); } }
.parade { position: absolute; inset: 0; pointer-events: none; }
.rider-sprite {
  position: absolute; bottom: 8px; left: 100%; height: 92px; width: auto;
  animation: ride var(--dur, 16s) linear var(--delay, 0s) infinite;
  will-change: transform;
}
.rider-sprite img { height: 100%; width: auto; max-width: none; animation: bump .42s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes ride { from { transform: translateX(0); } to { transform: translateX(calc(-100vw - 320px)); } }
@keyframes bump { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-3px) rotate(-1.2deg); } }

.parcel-hop {
  position: absolute; z-index: 0; width: 34px; height: 30px; border: var(--line); border-radius: 6px; background: var(--cardboard);
  animation: hop 1.1s cubic-bezier(.3, 0, .4, 1) infinite alternate;
}
.parcel-hop::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 8px; margin-left: -4px; background: var(--parcel); border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
/* bouncing on the pavement at the right end of the street; the parade rides in front of them */
.parcel-hop.p1 { right: 18px; bottom: 52px; }
.parcel-hop.p2 { right: 62px; bottom: 52px; width: 26px; height: 24px; animation-delay: -.5s; animation-duration: .9s; }
@keyframes hop { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-26px) rotate(8deg); } }

/* ------------------------------------------------------------------ ticker */
.ticker { display: flex; align-items: center; background: var(--parcel); border-top: var(--line); border-bottom: var(--line); overflow: hidden; }
.ticker-label {
  flex: none; z-index: 1; padding: 10px 12px; font: 700 14px/1 var(--display); background: var(--ink); color: var(--parcel); letter-spacing: .1em;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-move { display: flex; width: max-content; animation: tick var(--tick-dur, 90s) linear infinite; }
.ticker:hover .ticker-move, .ticker:focus-within .ticker-move { animation-play-state: paused; }
.ticker-move span { white-space: nowrap; padding: 10px 28px; font-weight: 600; font-size: 15px; }
.ticker-move span::after { content: "📦"; margin-left: 28px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ counters */
.counters { padding: 34px 0 6px; }
.count-list { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: 1200px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.count-list li {
  background: var(--card); border: var(--line); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); padding: 12px 14px; text-align: center;
}
.count-list li:nth-child(odd) { transform: rotate(-1deg); }
.count-list li:nth-child(even) { transform: rotate(1deg); }
.count { display: block; font: 700 40px/1 var(--display); color: var(--coral); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.count-list span { font-size: 14px; color: var(--ink-2); }

/* ------------------------------------------------------------------ story */
.comic { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.panel { position: relative; }
.panel figure { margin: 0; background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--pop); overflow: hidden; height: 100%; }
.panel:nth-child(odd) figure { transform: rotate(-.8deg); }
.panel:nth-child(even) figure { transform: rotate(.8deg); }
.panel img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: var(--line); }
.panel figcaption { padding: 12px 14px 16px; font-size: 15px; }
.panel-no {
  float: left; width: 30px; height: 30px; margin: 0 8px 0 0; border: var(--line); border-radius: 50%; background: var(--parcel);
  display: grid; place-items: center; font: 700 16px/1 var(--display);
}
.stamp {
  position: absolute; top: 16px; right: 10px; padding: 4px 10px; border: 3px solid var(--coral); color: var(--coral); border-radius: 8px;
  font: 700 15px/1.1 var(--display); background: rgba(255, 255, 255, .85); transform: rotate(-12deg); opacity: 0;
}
.panel.in .stamp { animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) .7s forwards; }
@keyframes stamp { from { opacity: 0; transform: rotate(-12deg) scale(2.4); } to { opacity: 1; transform: rotate(-12deg) scale(1); } }
.setting {
  display: grid; gap: 18px; margin-top: 36px; background: var(--sky-l); border: var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--pop);
}
.setting h3 { font-size: 24px; margin-bottom: 8px; }
.setting-art { border: var(--line); border-radius: 14px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ------------------------------------------------------------------ how to play */
.how { background: var(--sky-l); border-top: var(--line); border-bottom: var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; position: relative; }
.step {
  position: relative; background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: var(--pop); padding: 18px 16px 16px 66px;
}
.step h3 { font-size: 21px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 15px; }
.step-no {
  position: absolute; left: 14px; top: 16px; width: 40px; height: 40px; border: var(--line); border-radius: 12px; background: var(--parcel);
  display: grid; place-items: center; font: 700 22px/1 var(--display); transform: rotate(-6deg);
}
.step-vo { background: #FFF1EE; }
.step-vo h3 { padding-right: 44px; }
.vo-burst {
  position: absolute; right: -14px; top: -34px; width: 80px; height: 66px; display: grid; place-items: center; color: #fff;
  font: 700 22px/1 var(--display); background: var(--coral);
  clip-path: polygon(50% 0, 61% 26%, 92% 10%, 76% 40%, 100% 52%, 72% 62%, 84% 96%, 54% 74%, 36% 100%, 32% 70%, 0 78%, 22% 52%, 2% 28%, 34% 30%);
  transform: rotate(8deg) scale(0);
}
.step-vo.in .vo-burst { animation: burst .5s cubic-bezier(.2, 1.8, .4, 1) .5s forwards, wiggle 2.6s ease-in-out 1.2s infinite; }
@keyframes burst { to { transform: rotate(8deg) scale(1); } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(8deg) scale(1); } 86% { transform: rotate(-4deg) scale(1.12); } 92% { transform: rotate(12deg) scale(.96); } }
.howto-row { display: grid; gap: 22px; margin-top: 34px; align-items: center; }
.phone { margin: 0; }
.phone-frame { background: var(--ink); border-radius: 26px; padding: 10px 14px; box-shadow: 0 8px 0 rgba(22, 35, 51, .35); }
.phone-frame img { border-radius: 14px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.phone figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.controls { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.controls li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; font-size: 15px; }
.ctl { flex: none; width: 44px; height: 44px; border-radius: 50%; border: var(--line); position: relative; }
.ctl-stick { background: #d9cfb8; }
.ctl-stick::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #5ccf5c; border: 2px solid var(--ink); }
.ctl-skill { background: var(--coral); }
.ctl-skill::after { content: "↗"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 20px/1 var(--display); }
.ctl-eye { background: #58c858; }
.ctl-eye::after { content: ""; position: absolute; left: 9px; right: 9px; top: 14px; bottom: 14px; background: #fff; border-radius: 50%; border: 2px solid var(--ink); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 8px #1a88c9; }
.ctl-speed { background: var(--parcel); }
.ctl-speed::after { content: "⚡"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; }

/* ------------------------------------------------------------------ modes */
/* ------------------------------------------------------------------ owner message 55: in-game video frames (web/homepage/video) */
.trailer { background: var(--ink); color: #fff; border-bottom: var(--line); }
.trailer .sec-head h2 { color: #fff; }
.trailer .sec-lead { color: #DCE6F2; }
.trailer .sec-lead b { color: var(--parcel); }
/* "rotate", not "transform": .reveal.in resets transform */
.trailer-frame {
  position: relative; max-width: 1000px; margin: 8px auto 0; border: 4px solid #0b1320; border-radius: 22px; background: #0b1320;
  box-shadow: 0 0 0 5px var(--parcel), 0 12px 0 5px #0b1320; rotate: -1deg;
}
.trailer-frame .tape { position: absolute; z-index: 1; left: 50%; top: -18px; width: 120px; height: 28px; margin-left: -60px; background: rgba(255, 212, 71, .92); border: 2px solid var(--ink); transform: rotate(-3deg); }
.trailer-video, .clip-video, .mode-clip { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #0b1320; }
.trailer-video { border-radius: 18px; }
.trailer-play {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; min-height: 48px;
  padding: 7px 20px 7px 9px; border: var(--line); border-radius: 999px; background: var(--parcel); color: var(--ink); font: 700 17px/1.2 var(--display);
  text-decoration: none; white-space: nowrap; box-shadow: var(--pop); transition: transform .15s ease, box-shadow .15s ease;
}
.trailer-play:hover { transform: translateX(-50%) translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.trailer-frame.with-sound .trailer-play { display: none; }
.play-ico { flex: none; position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--coral); border: 2px solid var(--ink); }
.play-ico::after { content: ""; position: absolute; left: 11px; top: 7px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; }
.clip-row { display: grid; gap: 18px; margin-bottom: 28px; }
.scenes .clip-row { margin: 36px 0 0; }
.clip { margin: 0; background: var(--card); border: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 5px 0 var(--ink); }
.clip:nth-child(odd) { rotate: -.6deg; }
.clip:nth-child(even) { rotate: .6deg; }
.clip figcaption { padding: 10px 14px 12px; font-size: 15px; border-top: var(--line); }
@media (min-width: 720px) {
  .clip-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}
@media (max-width: 479px) {
  .trailer-play { bottom: 10px; min-height: 40px; gap: 8px; font-size: 14px; padding: 4px 14px 4px 6px; }
  .play-ico { width: 28px; height: 28px; }
  .play-ico::after { left: 9px; top: 5px; }
}

.modes { background: var(--ink); color: #fff; }
.modes .sec-head h2 { color: #fff; }
.mode-cards { display: grid; gap: 18px; }
.mode { background: var(--ink-2); border: 3px solid #0b1320; border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 0 #0b1320; }
.mode > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* a card without a picture of its own: the app's Play icon on a sunburst */
.mode-art { aspect-ratio: 16 / 9; display: grid; place-items: center; background: repeating-conic-gradient(from 0deg at 50% 60%, #FFD447 0 10deg, #FFC629 10deg 20deg); }
.mode-art img { width: auto; height: 84%; max-height: 190px; aspect-ratio: 1; }
.mode-body { padding: 16px 16px 18px; }
.mode h3 { font-size: 26px; margin: 8px 0 8px; color: var(--parcel); }
.mode p { color: #DCE6F2; font-size: 15px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--sky); color: var(--ink); font: 700 12px/1.6 var(--display); text-transform: uppercase; letter-spacing: .05em; }
.tag-coral { background: var(--coral); color: #fff; }
.tag-teal { background: var(--teal); color: #fff; }
.extras-box { margin-top: 28px; background: #0f1a28; border: 3px solid #0b1320; border-radius: var(--radius); padding: 18px 16px; }
.extras-box h3 { font-size: 22px; color: #fff; margin-bottom: 14px; }
.extras { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.extras li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; font-size: 14.5px; line-height: 1.5; color: #DCE6F2; }
.extras li > div { min-width: 0; }
.extras b { color: #fff; }
.extras li > div > b:first-child { font: 700 16px/1.3 var(--display); color: var(--parcel); }
.ex-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink-2); font-size: 22px; line-height: 1; }
.ladder-box { margin-top: 28px; background: #0f1a28; border: 3px solid #0b1320; border-radius: var(--radius); padding: 18px 16px; }
.ladder-box h3 { font-size: 22px; color: #fff; margin-bottom: 14px; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.tier { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
/* r16 (owner item 1): the app's six v2 emblems (img/ranks/tier_N.webp, 160 px), grey and small until the box scrolls in, then one by one */
.emblem {
  width: 80px; height: 80px; object-fit: contain; filter: grayscale(1) brightness(.6); transform: scale(.85);
  transition: filter .5s ease, transform .5s cubic-bezier(.3, 1.6, .5, 1);
}
.tier-name { font: 700 14px/1.2 var(--display); color: #fff; }
.tier-need { display: block; margin-top: 2px; font: 600 12px/1.2 var(--body); color: #9FB0C4; }
.tier-step { display: none; }
.ladder-box.in .emblem { filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .25)); transform: scale(1); }
.ladder-box.in .tier:nth-child(1) .emblem { transition-delay: .1s; }
.ladder-box.in .tier:nth-child(2) .emblem { transition-delay: .35s; }
.ladder-box.in .tier:nth-child(3) .emblem { transition-delay: .6s; }
.ladder-box.in .tier:nth-child(4) .emblem { transition-delay: .85s; }
.ladder-box.in .tier:nth-child(5) .emblem { transition-delay: 1.1s; }
.ladder-box.in .tier:nth-child(6) .emblem { transition-delay: 1.35s; }
.ladder-box.in .tier:last-child .emblem { animation: glow 2.4s ease-in-out 2s infinite; }
@keyframes glow { 50% { transform: scale(1.1) rotate(4deg); } }
.ladder-lead { margin: -6px 0 14px; color: #C6D4E4; font-size: 14px; }
.ladder-note, .levels-lead { margin: 16px 0 0; color: #C6D4E4; font-size: 14px; }
/* V2 r06: the levels inside a tier (the app's emblems); r07: a row per tier that has levels */
.levels { margin: 12px 0 0; display: grid; gap: 10px; }
.levels-row { padding: 8px 10px 10px; border-radius: 12px; background: #16253a; }
.levels-tier { display: block; margin-bottom: 4px; font: 700 14px/1.2 var(--display); color: #fff; }
.levels-row ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.levels li { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.levels img { width: 100%; max-width: 72px; height: auto; aspect-ratio: 1; object-fit: contain; }
.level-no { font: 700 13px/1.2 var(--display); color: #fff; }

/* ------------------------------------------------------------------ cities (V2 r06 card T) */
.cities { background: var(--sky-l); border-bottom: var(--line); }
.city-list { display: grid; gap: 26px; }
.city { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: 0 5px 0 var(--ink); overflow: hidden; }
.city-head { padding: 16px 16px 12px; }
.city-head h3 { font-size: 26px; margin-bottom: 4px; }
.city-head p { margin: 0; font-size: 15px; color: var(--ink-2); max-width: 720px; }
.city-pics { display: grid; gap: 3px; grid-template-columns: 1fr 1fr; background: var(--ink); border-top: var(--line); border-bottom: var(--line); }
.city-pic { position: relative; margin: 0; overflow: hidden; }
.city-pic:first-child { grid-column: 1 / -1; }
.city-pic img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.city-pic:hover img { transform: scale(1.04); }
.city-pic figcaption { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 8px; background: rgba(22, 35, 51, .86); color: #fff; font-size: 13px; line-height: 1.35; }
.city-places { list-style: none; margin: 0; padding: 12px 16px 16px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.city-places li { padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); font: 600 13px/1.4 var(--body); }
@media (max-width: 479px) {
  /* two small pictures side by side are too narrow for their captions: below the picture instead */
  .city-pic:not(:first-child) { display: flex; flex-direction: column; background: var(--ink); }
  .city-pic:not(:first-child) figcaption { position: static; max-width: none; border-radius: 0; background: none; padding: 5px 8px 7px; font-size: 12px; }
  .city-pic:not(:first-child) img { height: auto; }
}

/* ------------------------------------------------------------------ garage */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button {
  min-height: 40px; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); cursor: pointer;
  font: 700 14px/1 var(--display); color: var(--ink);
}
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.filters button .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--c, #999); border: 1.5px solid var(--ink); vertical-align: -1px; }
.vehicle-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.vcard {
  position: relative; background: var(--card); border: var(--line); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s ease;
}
.vcard[hidden] { display: none; }
.vcard:hover { transform: translateY(-4px); }
.vcard:hover .vimg img { animation: wobble .6s ease-in-out; }
.vribbon { padding: 4px 10px; font: 700 12px/1.5 var(--display); color: #fff; background: var(--c); border-bottom: var(--line); text-transform: uppercase; letter-spacing: .04em; }
.vimg { background: #F4F7FB; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--c) 28%, #fff) 0 45%, #fff 72%); padding: 6px; }
.vimg img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.vbody { padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.vbody h3 { font-size: 17px; }
.vdesc { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.prices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.price { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 4px; border-radius: 999px; font: 700 13px/1.5 var(--display); border: 2px solid var(--ink); white-space: nowrap; }
.price.gold { background: #FFF1C9; }
.price.chip { background: #EFE5FF; }
.price.free { background: #DDF7E7; padding-left: 8px; }
.price.chiponly { background: #FFE1DC; padding-left: 8px; text-transform: uppercase; font-size: 11px; letter-spacing: .03em; } /* r16: Huyền thoại, no gold price */
.coin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #8a5a00; background: radial-gradient(circle at 35% 35%, #ffe680, var(--gold) 70%); flex: none; }
.chipi { width: 16px; height: 16px; flex: none; }
.grind { font-size: 12px; color: var(--muted); }
.cur { font-weight: 700; padding: 0 6px; border-radius: 6px; }
.cur-gold { background: #FFF1C9; }
.cur-chip { background: #EFE5FF; }
.vbadge { position: absolute; top: 34px; right: 6px; font: 700 11px/1.4 var(--display); background: var(--parcel); border: 2px solid var(--ink); border-radius: 8px; padding: 1px 6px; transform: rotate(6deg); }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg) translateY(-3px); } 60% { transform: rotate(4deg); } 85% { transform: rotate(-2deg); } }

/* ------------------------------------------------------------------ items */
.items { background: var(--sky-l); border-top: var(--line); border-bottom: var(--line); }
.test-note {
  background: #FFFBEA; border: 2px dashed var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-bottom: 20px; transform: rotate(-.4deg);
}
.test-note b { color: var(--coral); }
.item-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.icard { background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: 0 4px 0 var(--ink); padding: 14px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.icard:hover .iicon { animation: wobble .6s ease-in-out; }
.ihead { display: flex; gap: 12px; align-items: center; }
.iicon { flex: none; width: 60px; height: 60px; border-radius: 16px; border: var(--line); background: var(--ib, #EAF6FF); display: grid; place-items: center; }
.iicon img { width: 48px; height: 48px; }
.ihead h3 { font-size: 21px; }
.icat { display: inline-block; font: 700 11px/1.6 var(--display); text-transform: uppercase; letter-spacing: .05em; padding: 0 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.ihint { font-size: 14px; margin: 0; color: var(--ink-2); }
.istats { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 13.5px; }
.istats dt { color: var(--muted); }
.istats dd { margin: 0; font-weight: 600; }
.ibars { display: grid; gap: 8px; border-top: 2px dashed rgba(22, 35, 51, .2); padding-top: 10px; }
.bar-label { display: flex; justify-content: space-between; font-size: 12.5px; gap: 8px; }
.bar-label span:last-child { font-weight: 700; white-space: nowrap; }
.bar { height: 10px; border-radius: 99px; background: #E7EDF4; border: 1.5px solid var(--ink); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--coral); border-radius: 99px; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.icard.in .bar i { width: var(--w); }
.odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.odds div { text-align: center; background: #F4F7FB; border-radius: 10px; padding: 4px 2px; font-size: 11.5px; color: var(--muted); }
.odds b { display: block; font: 700 16px/1.2 var(--display); color: var(--ink); }
.try-btn { align-self: flex-start; border: 2px solid var(--ink); background: var(--parcel); border-radius: 999px; padding: 4px 12px; font: 700 13px/1.4 var(--display); cursor: pointer; }
.icbm { padding-top: 18px; }
.leader-crown { position: absolute; right: 14px; top: 12px; font-size: 26px; transform-origin: 50% 100%; }
.leader-crown.hit { animation: knocked 1s ease-out .95s; }
@keyframes knocked { 0% { transform: none; } 30% { transform: translate(10px, -16px) rotate(40deg); } 100% { transform: none; } }
.try-btn .icbm-fly { display: inline-block; pointer-events: none; font-size: 18px; }
.icbm-fly.go { animation: missile 1s cubic-bezier(.45, 0, .7, 1) forwards; }
@keyframes missile {
  0% { transform: translate(0, 0); opacity: 1; }
  60% { transform: translate(calc(var(--tx, 200px) * .55), calc(var(--ty, -300px) * 1.12)); }
  95% { transform: translate(var(--tx, 200px), var(--ty, -300px)); opacity: 1; }
  100% { transform: translate(var(--tx, 200px), var(--ty, -300px)); opacity: 0; }
}
.boom { position: absolute; right: 2px; top: 8px; font: 700 20px/1 var(--display); color: var(--coral); -webkit-text-stroke: 1px var(--ink); opacity: 0; pointer-events: none; }
.boom.go { animation: boom .7s ease-out .95s; }
@keyframes boom { 0% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; transform: scale(1.4) rotate(-8deg); } 100% { opacity: 0; transform: scale(1); } }

/* ------------------------------------------------------------------ scenes + shots */
.scene-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.scene { background: var(--card); border: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 0 var(--ink); }
.scene img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .5s ease; }
.scene:hover img { transform: scale(1.04); }
.scene p { margin: 0; padding: 10px 14px 12px; font-size: 15px; border-top: var(--line); }
.shots-title { font-size: 24px; margin: 40px 0 14px; }
.shots { list-style: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 14px; display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.shots li { scroll-snap-align: start; margin: 0; background: var(--ink); border-radius: 16px; padding: 8px; color: #fff; }
.shots img { border-radius: 10px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots p { margin: 8px 4px 2px; font-size: 13.5px; }

/* ------------------------------------------------------------------ riders */
.riders { background: var(--sky-l); border-top: var(--line); border-bottom: var(--line); }
.rider-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.rider-tools .filters { margin: 0; }
.search input {
  min-height: 44px; width: min(260px, 100%); padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; font: 500 15px/1.2 var(--body); background: var(--card);
}
.search { flex: 1 1 200px; }
.search input { width: 100%; }
.receipt {
  max-width: 360px; margin: 0 auto 18px; background: #fff; border: 2px solid var(--ink); border-radius: 6px; padding: 14px 16px 18px;
  font: 600 14px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; box-shadow: 0 4px 0 var(--ink);
  -webkit-mask: radial-gradient(circle 6px at 8px 100%, transparent 98%, #000) 0 0 / 16px 100% repeat-x;
          mask: radial-gradient(circle 6px at 8px 100%, transparent 98%, #000) 0 0 / 16px 100% repeat-x;
  animation: print .5s ease-out;
}
.receipt h4 { margin: 0 0 6px; text-align: center; font: 700 16px/1.2 var(--display); }
.receipt .rrow { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #999; padding: 2px 0; }
.receipt .rrow span:last-child { text-align: right; }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.rider-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
.rider { text-align: center; }
.rider[hidden] { display: none; }
.rider img {
  width: 100%; max-width: 84px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; border: var(--line); background: var(--card);
  box-shadow: 0 3px 0 var(--ink); transition: transform .2s ease;
}
.rider:nth-child(4n+1) img { background: #FFE9A8; }
.rider:nth-child(4n+2) img { background: #CDEBFF; }
.rider:nth-child(4n+3) img { background: #FFD3CC; }
.rider:nth-child(4n) img { background: #DCF5E6; }
.rider:hover img { transform: translateY(-4px) rotate(-4deg); }
.rider span { display: block; font: 700 12px/1.25 var(--display); margin-top: 6px; }
.rider.pick img { border-color: var(--coral); box-shadow: 0 0 0 4px var(--coral), 0 3px 0 var(--ink); animation: pick .7s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes pick { from { transform: scale(.6) rotate(-20deg); } to { transform: scale(1) rotate(0); } }

/* ------------------------------------------------------------------ brands */
.brand-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.bcard {
  background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: 0 4px 0 var(--ink); overflow: hidden; transition: transform .2s ease;
  display: grid; grid-template-columns: 116px 1fr;
}
.bcard:hover { transform: rotate(-1deg) translateY(-3px); }
.bflag { background: var(--bc); padding: 10px; border-right: var(--line); display: flex; align-items: center; }
.bflag img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .6); }
.bbody { padding: 12px 14px 16px; }
.bperk { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bperk img { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--ink); background: #F4F7FB; }
.bperk h3 { font-size: 20px; }
.bperk > div { min-width: 0; }
.bperk small { display: block; font: 700 12px/1.2 var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bperk small.bmascot { color: var(--ink); opacity: .7; }
.bbody ul { margin: 0; padding-left: 18px; font-size: 15px; }

/* ------------------------------------------------------------------ faq */
.faq { background: var(--paper); }
.faq-list { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink); }
.faq summary {
  list-style: none; cursor: pointer; padding: 14px 48px 14px 16px; font: 700 17px/1.3 var(--display); position: relative; min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 12px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border: 2px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; font: 700 18px/1 var(--body); background: var(--parcel); transition: transform .2s;
}
.faq details[open] summary::after { content: "–"; transform: rotate(180deg); }
.faq details p { padding: 0 16px 14px; margin: 0; font-size: 15px; }

/* ------------------------------------------------------------------ cta */
.cta { position: relative; padding: 90px 0; overflow: hidden; isolation: isolate; border-top: var(--line); }
.cta-art { position: absolute; inset: 0; z-index: -2; }
.cta-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 35, 51, .15), rgba(22, 35, 51, .55)); }
.cta-box {
  position: relative; max-width: 620px; margin: 0 auto; background: var(--cardboard); border: var(--line); border-radius: 22px; box-shadow: 0 8px 0 var(--ink);
  padding: 34px 20px 26px; text-align: center; transform: rotate(-1deg);
}
.cta-box .tape { position: absolute; left: 50%; top: -14px; width: 120px; height: 28px; margin-left: -60px; background: rgba(255, 212, 71, .92); border: 2px solid var(--ink); transform: rotate(-3deg); }
.cta-box h2 { font-size: clamp(28px, 7vw, 42px); margin-bottom: 12px; text-wrap: balance; }
.cta-box p { font-size: 16px; }
.store-btn {
  display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 172px; padding: 9px 18px 11px; border-radius: 16px; background: var(--ink); color: #fff;
  border: 3px solid var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); font: 700 21px/1.1 var(--display); text-align: left; text-decoration: none;
}
.store-btn em { font: 700 12px/1.4 var(--display); font-style: normal; color: var(--parcel); letter-spacing: .04em; margin-bottom: 2px; }
.store-btn.alt { background: #fff; color: var(--ink); }
.store-btn.alt em { color: #C23A2B; }
/* not open yet: a plain box that leads nowhere (no pointer, a dashed edge); site.js turns it into a link */
.store-btn[aria-disabled="true"] { border-style: dashed; box-shadow: none; cursor: default; }
.store-btn.alt[aria-disabled="true"] { border-color: var(--ink); }
.store-btn:not([aria-disabled]):hover { transform: translateY(-2px); }
.cta .launch { justify-content: center; }
.cta-qr { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 20px 0 14px; }
.qr { margin: 0; width: 164px; padding: 8px 8px 6px; background: #fff; border: var(--line); border-radius: 14px; }
.qr[hidden] { display: none; }
.qr img { width: 100%; height: auto; aspect-ratio: 1; }
.qr figcaption { margin-top: 4px; font-size: 12.5px; line-height: 1.35; text-align: center; }
.cta-box .cta-sign { font-size: 14px; margin: 0 auto 10px; max-width: 460px; }

/* owner message 58: the store keys of the hero, the closing call to action and the header panel, one card per store; owner messages 69,
   72, 73 (2026-12-06): the two cards in two rows, and the one QR code for both stores (get/ sends each phone to its store) beside them,
   a square exactly as tall as the two rows. Both keys dark, so the pair reads as one set. */
.get-block { --key-h: 64px; --key-gap: 10px; display: flex; align-items: flex-start; gap: var(--key-gap); max-width: 440px; }
.get-cards { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--key-gap); }
.get-card {
  display: flex; height: var(--key-h); padding: 6px; background: #fff; color: var(--ink); border: var(--line); border-radius: 16px;
  box-shadow: 0 4px 0 rgba(22, 35, 51, .55); text-align: center;
}
.get-card .store-btn, .get-card .store-btn.alt {
  width: 100%; height: 100%; min-width: 0; align-items: center; justify-content: center; text-align: center; padding: 2px 6px 4px; background: var(--ink);
  color: #fff; border: 3px solid var(--ink); border-radius: 11px; font-size: clamp(15px, 4.6vw, 19px); line-height: 1.05; box-shadow: none;
}
.get-card .store-btn em { color: var(--parcel); font-size: 11px; line-height: 1.25; margin-bottom: 0; white-space: nowrap; }
.get-card .store-btn[aria-disabled="true"] { background: #fff; color: var(--ink); }
.get-card .store-btn[aria-disabled="true"] em { color: #C23A2B; }
.get-qr {
  position: relative; flex: none; margin: 0; width: calc(2 * var(--key-h) + var(--key-gap)); height: calc(2 * var(--key-h) + var(--key-gap)); padding: 6px;
  border-radius: 16px; box-shadow: 0 4px 0 rgba(22, 35, 51, .55);
}
.get-qr img { display: block; width: 100%; height: 100%; max-width: none; }
.hero .get-card, .hero .get-qr { box-shadow: 0 4px 0 rgba(0, 0, 0, .45); }
.cta-box .get-block { margin: 18px auto 0; }
@media (min-width: 720px) {
  .get-block { --key-h: 68px; --key-gap: 12px; }
  .get-card .store-btn, .get-card .store-btn.alt { font-size: 20px; }
}
/* a desktop's hero: a narrower block, so the lead stays near the first screen */
@media (min-width: 1100px) {
  .hero .get-block { max-width: 400px; }
}
/* small phones: lower keys and so a smaller code, which leaves the keys room for "Download now" (the code stays at least 96 px) */
@media (max-width: 389px) {
  .cta-box { padding-left: 12px; padding-right: 12px; }
  .get-block { --key-h: 56px; --key-gap: 8px; }
  .get-card { padding: 4px; }
  .get-card .store-btn, .get-card .store-btn.alt { padding: 2px 4px 3px; }
}

/* ------------------------------------------------------------------ footer */
.footer { background: var(--ink); color: #DCE6F2; padding: 40px 0 70px; position: relative; overflow: hidden; }
.footer .brand-name { color: var(--parcel); }
.footer .brand-box { border-color: #fff; }
.foot-grid { display: grid; gap: 18px; font-size: 14px; }
.foot-grid nav a { text-decoration: none; color: #fff; }
.foot-grid nav a:hover { text-decoration: underline; }
.fine p { font-size: 12.5px; color: #9FB0C4; margin: 0 0 6px; }
.foot-scooter {
  position: absolute; bottom: 10px; left: -80px; width: 60px; height: 30px; border-radius: 14px 18px 6px 6px; background: var(--teal); border: 2px solid #0b1320;
  animation: putt 22s linear infinite;
}
.foot-scooter::before, .foot-scooter::after { content: ""; position: absolute; bottom: -9px; width: 16px; height: 16px; border-radius: 50%; background: #0b1320; border: 3px solid #9FB0C4; }
.foot-scooter::before { left: 4px; }
.foot-scooter::after { right: 4px; }
@keyframes putt { to { left: 110%; } }
.noscript { text-align: center; padding: 14px; background: var(--parcel); margin: 0; }

/* ------------------------------------------------------------------ scroll reveal (only with JS) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .panel.reveal:nth-child(2), .js .step.reveal:nth-child(2) { transition-delay: .1s; }
.js .panel.reveal:nth-child(3), .js .step.reveal:nth-child(3) { transition-delay: .2s; }
.js .panel.reveal:nth-child(4), .js .step.reveal:nth-child(4) { transition-delay: .3s; }

/* ------------------------------------------------------------------ tablet */
@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .section { padding: 84px 0 92px; }
  .count-list { grid-template-columns: repeat(3, 1fr); }
  .comic { grid-template-columns: repeat(2, 1fr); }
  .setting { grid-template-columns: 1.1fr 1fr; align-items: center; padding: 24px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .mode-cards { grid-template-columns: repeat(2, 1fr); }
  .extras { grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
  .vehicle-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .item-grid { grid-template-columns: repeat(2, 1fr); }
  .scene-grid { grid-template-columns: repeat(2, 1fr); }
  .scene.wide { grid-column: span 2; }
  .scene.full { grid-column: 1 / -1; }
  .scene.full img { aspect-ratio: 21 / 8; object-position: 50% 45%; }
  .shots { grid-auto-columns: 46%; }
  .rider-wall { grid-template-columns: repeat(7, 1fr); }
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .bcard { display: block; }
  .bflag { padding: 12px; border-right: 0; border-bottom: var(--line); }
  .brand-stamp { display: inline-block; }
  .cloud { display: block; }
  .cloud.c1, .cloud.c2 { left: 2%; animation-name: drift-narrow; }
  .hero-copy { padding-top: 360px; }
  .ladder { grid-template-columns: repeat(6, 1fr); align-items: end; gap: 10px; }
  .tier-step { display: block; width: 100%; border-radius: 10px 10px 0 0; background: linear-gradient(#24374d, #1a2a3d); border: 2px solid #0b1320; border-bottom: 0; }
  .tier:nth-child(1) .tier-step { height: 24px; }
  .tier:nth-child(2) .tier-step { height: 40px; }
  .tier:nth-child(3) .tier-step { height: 56px; }
  .tier:nth-child(4) .tier-step { height: 72px; }
  .tier:nth-child(5) .tier-step { height: 88px; }
  .tier:nth-child(6) .tier-step { height: 108px; background: linear-gradient(#5b2330, #3a1620); }
  .emblem { width: 72px; height: 72px; }
  .foot-grid { grid-template-columns: 1fr 2fr; }
  .fine { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------------ narrow phones (< 390 px): logo + download key + menu on one line */
@media (max-width: 389px) {
  .topbar { gap: 8px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 21px; }
  .get-btn { gap: 5px; padding: 6px 10px 6px 9px; font-size: 14px; }
}
@media (max-width: 359px) {
  .topbar { padding: 0 12px; }
  .brand-box { width: 26px; height: 23px; }
  .brand-name { font-size: 19px; }
  .get-btn { font-size: 13px; line-height: 1.2; }
  .get-btn::before { width: 15px; height: 15px; }
}

/* ------------------------------------------------------------------ desktop */
@media (min-width: 1100px) {
  :root { --topbar: 68px; }
  .topbar { padding: 0 32px; }
  .hero-art, .hero-shade { inset: 0 0 150px; }
  .hero-shade { background: linear-gradient(90deg, rgba(22, 35, 51, .88) 0%, rgba(22, 35, 51, .6) 30%, rgba(22, 35, 51, 0) 58%); }
  .hero-art img { object-position: 50% 12%; } /* r11: the thinking AI sits at the top right of the hero art; keep it in the frame */
  .cloud.c1, .cloud.c2 { left: 34%; animation-name: drift; }
  .hero-copy { padding: 96px 0 90px 64px; min-height: 690px; max-width: 620px; }
  .street { height: 150px; }
  .rider-sprite { height: 118px; bottom: 10px; }
  .count-list { grid-template-columns: repeat(6, 1fr); }
  .comic { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps::before {
    content: ""; position: absolute; left: 4%; right: 4%; top: 50%; height: 10px; margin-top: -5px; z-index: -1;
    background: repeating-linear-gradient(90deg, var(--ink) 0 22px, transparent 22px 40px); opacity: .35;
  }
  .howto-row { grid-template-columns: 1.35fr 1fr; }
  .mode-cards { grid-template-columns: repeat(3, 1fr); }
  .extras { grid-template-columns: repeat(3, 1fr); }
  /* one big picture, two stacked beside it, the rest in a row of three below */
  .city-pics { grid-template-columns: repeat(3, 1fr); }
  .city-pic:first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
  .levels { grid-template-columns: repeat(2, 1fr); }
  .vehicle-grid { grid-template-columns: repeat(5, 1fr); }
  .item-grid { grid-template-columns: repeat(3, 1fr); }
  .scene-grid { grid-template-columns: repeat(3, 1fr); }
  .shots { grid-auto-columns: calc((100% - 28px) / 3); margin: 0; padding: 4px 0 14px; }
  .rider-wall { grid-template-columns: repeat(11, 1fr); }
  .brand-grid { grid-template-columns: repeat(4, 1fr); }
  .faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: start; }
  .cta { padding: 140px 0; }
  .cta-box { padding: 40px 36px 32px; }
}
/* a low desktop window: the store cards stay on the first screen */
@media (min-width: 1100px) and (max-height: 820px) {
  .hero-copy { padding-top: 40px; }
  .t-ship { font-size: 84px; }
  .tagline { font-size: 32px; margin-top: 14px; }
  /* owner message 58: the store card (keys over the code) is taller than the old row of keys: a smaller code, no line above it */
  .hero-get-say { display: none; }
  .hero .get-block { --key-h: 58px; --key-gap: 10px; }
}

/* the whole menu in the top bar from 1180 px (iPad landscape, laptops); below that the ☰ drawer. 1180-1439: tighter, no stamp
   (test_homepage.mjs "top bar" measures every width with the sign-in and download keys) */
@media (min-width: 1180px) {
  .menu-btn { display: none; }
  .nav .nav-get { display: none; }
  .brand-stamp { display: none; }
  .nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
  .nav.open {
    flex-direction: row; position: static; padding: 0; background: none; border: 0; box-shadow: none; max-height: none; overflow: visible;
  }
  .nav a { padding: 8px 7px; font-size: 15px; border: 0; border-radius: 10px; }
  .nav a:hover { background: rgba(84, 184, 255, .25); }
}
@media (min-width: 1440px) {
  .brand-stamp { display: inline-block; }
  .nav { margin-left: 18px; }
  .nav a { padding: 8px 10px; font-size: 16px; }
}
/* the news link (owner 2026-12-05): in the phone drawer and the footer at every width; the desktop bar holds only the eight sections
   up to 1599 px (no room for a ninth link beside the sign-in and download keys), all nine from 1600 px */
@media (min-width: 1180px) and (max-width: 1599px) {
  .nav .nav-news { display: none; }
}

/* ------------------------------------------------------------------ motion off: the device's reduced-motion setting (owner message 55: no page switch) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .rider-sprite { animation: none !important; }
  .trailer-frame, .clip { rotate: none; }
}
html.reduced .rider-sprite { animation: none !important; }
html.reduced .hero-art img { transform: none; }
.paused .rider-sprite, .paused .rider-sprite img, .paused .road-dash, .paused .skyline, .paused .cloud, .paused .parcel-hop { animation-play-state: paused; }
html.reduced .cloud { display: none; }

/* ------------------------------------------------------------------ r13 i18n: the language versions (/ vi, /en/, /ja/) */
/* hero pills: each language in its own words, seen on landing at every width */
.lang-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.lang-switch a, .nav .nav-langs a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px;
  font: 700 14px/1.2 var(--body); text-decoration: none; white-space: nowrap;
}
.lang-switch a { color: #fff; background: rgba(22, 35, 51, .55); border-color: rgba(255, 255, 255, .7); }
.lang-switch a:hover { background: rgba(22, 35, 51, .8); }
.lang-switch a[aria-current="page"], .nav .nav-langs a[aria-current="page"] { background: var(--parcel); color: var(--ink); border-color: var(--ink); }
/* the menu: a row under the motion toggle in the phone drawer, the short codes in the desktop bar */
.nav .nav-langs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.nav .nav-langs a { background: var(--card); color: var(--ink); border-bottom: 2px solid var(--ink); }
.nav-langs .ln-code { display: none; }
.foot-langs { font-size: 14px; }
.foot-langs a { color: #fff; text-decoration: none; }
.foot-langs a:hover, .foot-langs a[aria-current="page"] { text-decoration: underline; }
.foot-langs a[aria-current="page"] { color: var(--parcel); }
@media (min-width: 720px) {
  .foot-langs { grid-column: 1 / -1; }
}
@media (min-width: 1180px) {
  .nav .nav-langs { margin: 0 0 0 6px; gap: 2px; flex-wrap: nowrap; }
  .nav .nav-langs a { min-height: 0; padding: 4px 6px; font-size: 12px; border-width: 2px; }
  .nav-langs .ln-name { display: none; }
  .nav-langs .ln-code { display: inline; }
}

/* Japanese: the game's look in Japanese fonts (Mali has no kana: its Latin letters, then a rounded Japanese face), phrase-wise
   line breaks in titles and buttons (word-break: auto-phrase, Chromium; Safari breaks per character as usual) */
html[lang="ja"] {
  --display: "Mali", "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  --body: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  line-break: strict;
}
html[lang="ja"] :is(h1, h2, h3, .tagline, .btn, summary, .eyebrow, .kicker, figcaption b, .count-list span) { word-break: auto-phrase; }
html[lang="ja"] .eyebrow, html[lang="ja"] .kicker { letter-spacing: .02em; }
/* English: long words in narrow cards break at syllables rather than overflow */
html[lang="en"] :is(.vdesc, .ihint, .istats dd, .bcard li) { hyphens: auto; }
/* "POUNCE!" / 「タックル！」 are longer than "VỒ!": a wider burst, smaller letters (the text spilled out of the star and the page scrolled sideways) */
/* the star's solid middle band is about 2/3 of its width: 116 px holds the 14 px word without the points cutting letters */
html:not([lang="vi"]) .vo-burst { width: 116px; height: 84px; right: -12px; top: -42px; font-size: 14px; letter-spacing: -.01em; }
/* Japanese: no flex gap between the number and its counter word ("55人の配達員に会う"), rider names break between words */
html[lang="ja"] .hero-actions .btn { gap: 0; }
html[lang="ja"] .rider span { word-break: auto-phrase; }
html:not([lang="vi"]) .step-vo h3 { padding-right: 70px; }
/* r13 i18n: below 390 px the brand card's small lines wrap instead of ending in "…" (the mascot was cut: "gấu mèo đạo ch…",
   "bandit rac…"); from 390 px they fit on one line (test_homepage.mjs: brand cards) */
@media (max-width: 389px) {
  .bperk small { white-space: normal; overflow: visible; }
}
/* r13 i18n: the rider wall's columns never grow past their share for a long job name ("Photographer", "インフルエンサー" pushed the
   wall, and at 320 px the English page, sideways); a name too long for its column breaks at a syllable (en) or between kana */
.rider-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rider span { overflow-wrap: anywhere; }
html[lang="en"] .rider span { hyphens: auto; }
@media (min-width: 720px) { .rider-wall { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .rider-wall { grid-template-columns: repeat(11, minmax(0, 1fr)); } }
/* the "free" price pill may wrap in the narrow two-column garage of a small phone ("Miễn phí · có sẵn" stuck out at 320 px) */
.price.free { white-space: normal; }
/* the English / Japanese job names are longer: a size smaller on phones ("Photographer" broke into "Photographe / r" at 390 px), three
   columns on the smallest phones */
@media (max-width: 719px) {
  html:not([lang="vi"]) .rider span { font-size: 11px; letter-spacing: -.01em; }
}
@media (max-width: 359px) {
  html:not([lang="vi"]) .rider-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
