/* =========================================================
   $STAR · Gold Star
   ========================================================= */

@font-face {
  font-family: "Mayro Kart Retro";
  src: url("../assets/fonts/MayroKartRetro-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night-0: #070520;
  --night-1: #0c0936;
  --night-2: #150f4f;
  --night-3: #221a72;
  --ink: #1b1236;
  --text: #f4f2ff;
  --mute: #b8b3e0;

  --gold-hi: #fff4b0;
  --gold: #ffd21e;
  --gold-2: #ffb400;
  --gold-3: #e8870b;
  --red: #e8322b;
  --red-2: #b3121b;
  --green: #35b548;
  --blue: #1e8fff;
  --sky: #7fdcff;
  --purple: #8b5cff;
  --cream: #fffaf0;

  --rainbow: linear-gradient(90deg, #ff4d6d, #ff9f1c, #ffd21e, #3ddc84, #2fb8ff, #9a5cff);
  --checker: repeating-conic-gradient(#fff 0 25%, #1b1236 0 50%);

  --mk: "Mayro Kart Retro", "Lilita One", "Nunito", system-ui, sans-serif;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  --max: 1180px;
  --gutter: clamp(16px, 5vw, 64px);

  /* cartoon outline for the kart font: stacked drop-shadows follow the letter shapes */
  --o1: drop-shadow(.035em 0 0 var(--ink)) drop-shadow(-.035em 0 0 var(--ink)) drop-shadow(0 .035em 0 var(--ink)) drop-shadow(0 -.035em 0 var(--ink));
  --o2: drop-shadow(.05em 0 0 var(--ink)) drop-shadow(-.05em 0 0 var(--ink)) drop-shadow(0 .05em 0 var(--ink)) drop-shadow(0 -.05em 0 var(--ink)) drop-shadow(0 .07em 0 var(--ink));

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--night-1);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main, footer { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
code {
  font-family: var(--mono);
  font-size: .86em;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  padding: 1px 6px;
  border-radius: 5px;
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 500;
  background: var(--gold); color: var(--ink); padding: 8px 14px; font-weight: 800; border-radius: 8px;
}
.skip:focus { left: 8px; }

.gold-text {
  background: linear-gradient(180deg, #fff7c4 0%, #ffe14d 36%, #ffb400 58%, #ffd84d 84%, #fff1a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rainbow-text {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--mk);
  font-size: 20px;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--sky);
  filter: var(--o1);
  margin: 0 0 16px;
}
.h2 {
  font-family: var(--mk);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  color: #fff;
  filter: var(--o2);
  margin: 0 0 20px;
}
.sub { font-size: 19px; line-height: 1.6; color: var(--mute); margin: 0; }
.h2, .c-title, .fact h3, .race-name, .reward-name, .pd-title { text-wrap: balance; }
.sub a { color: #fff; }
.big { font-size: 22px; line-height: 1.5; color: #e4e1ff; max-width: 600px; margin: 0 0 34px; }
.fine { text-align: center; font-size: 14px; color: #8e89b8; margin: 22px auto 0; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font-family: var(--mk); font-size: 20px; line-height: 1; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap;
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold {
  color: #3a1500;
  background: linear-gradient(180deg, #fff3a0 0%, #ffd21e 48%, #ffb400 100%);
  box-shadow: inset 0 -4px 0 rgba(200, 90, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .7), 0 5px 0 var(--ink);
}
.btn-gold:hover { box-shadow: inset 0 -4px 0 rgba(200, 90, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .7), 0 7px 0 var(--ink); }
.btn-gold:active { box-shadow: inset 0 -2px 0 rgba(200, 90, 0, .35), 0 1px 0 var(--ink); }
.btn-red {
  color: #fff;
  background: linear-gradient(180deg, #ff6a5c 0%, #e8322b 50%, #b3121b 100%);
  box-shadow: inset 0 -4px 0 rgba(90, 0, 10, .3), inset 0 2px 0 rgba(255, 255, 255, .35), 0 5px 0 var(--ink);
}
.btn-red:hover { box-shadow: inset 0 -4px 0 rgba(90, 0, 10, .3), inset 0 2px 0 rgba(255, 255, 255, .35), 0 7px 0 var(--ink); }
.btn-red, .btn-ink { text-shadow: 0 2px 0 var(--ink); }
.btn-ink {
  color: #fff;
  background: linear-gradient(180deg, #342a86 0%, #221a66 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 5px 0 var(--ink);
}
.btn-ink:hover { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 7px 0 var(--ink); }
.btn-lg { min-height: 58px; padding: 0 28px; font-size: 24px; border-radius: 16px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 16px; border-radius: 11px; }
.btn-icon { width: 48px; padding: 0; }
.soon {
  font-family: var(--sans); font-weight: 900; font-size: 11px; line-height: 1;
  letter-spacing: .08em; text-transform: uppercase; text-shadow: none;
  color: var(--gold); background: var(--ink);
  padding: 4px 7px; border-radius: 999px;
}

/* ---------- Loader: race start lights ---------- */
.loader {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center;
  background: radial-gradient(60% 50% at 50% 45%, #2a1d86 0%, var(--night-1) 70%);
  transition: opacity .4s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
html.no-loader .loader, html:not(.js) .loader { display: none; }
.loader-box { display: flex; flex-direction: column; align-items: center; padding: 0 20px; text-align: center; }
.lights {
  display: flex; gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #2b2360, #17113d);
  border: 4px solid var(--ink);
  border-radius: 20px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12), 0 8px 0 var(--ink);
}
.lights i {
  width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #54497e, #2c2450 70%);
  border: 3px solid var(--ink);
  transition: background .12s ease, box-shadow .12s ease;
}
.lights i.on {
  background: radial-gradient(circle at 35% 30%, #ffb0a6, #ff3b30 55%, #a3100c);
  box-shadow: 0 0 26px 4px rgba(255, 59, 48, .7);
}
.lights.go i {
  background: radial-gradient(circle at 35% 30%, #d4ffc9, #3ddc54 55%, #16802a);
  box-shadow: 0 0 26px 4px rgba(61, 220, 84, .7);
}
.loader-count {
  margin: 26px 0 10px;
  font-family: var(--mk); font-size: 104px; line-height: 1;
  color: #fff; filter: var(--o2);
}
.loader-count.go { color: var(--gold); animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.loader-title { margin: 0; font-family: var(--mk); font-size: 20px; color: var(--mute); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 72px; padding: 0 var(--gutter);
  background: rgba(9, 7, 38, .84);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  background: var(--rainbow);
  box-shadow: 0 1px 0 var(--ink);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mk); font-size: 30px; line-height: 1;
  color: var(--gold); text-decoration: none;
}
.brand span { filter: var(--o1); }
.brand img { width: 40px; height: 40px; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-12deg) scale(1.08); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: var(--mk); font-size: 18px; line-height: 1;
  color: #fff; text-decoration: none;
  filter: var(--o1);
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 30px;
  max-width: calc(var(--max) + 2 * var(--gutter));
  min-height: min(880px, calc(100vh - 72px));
  margin: 0 auto;
  padding: 60px var(--gutter) 150px;
}
.hero-bg {
  position: absolute; z-index: -1;
  top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  overflow: hidden;
  background:
    radial-gradient(42% 46% at 76% 42%, rgba(255, 206, 60, .22), transparent 70%),
    radial-gradient(50% 60% at 8% 6%, rgba(139, 92, 255, .38), transparent 70%),
    radial-gradient(40% 40% at 96% 96%, rgba(47, 184, 255, .22), transparent 70%),
    linear-gradient(180deg, #0a0731 0%, #140d52 62%, #1d1266 100%);
}
.hero-bg::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(180deg, transparent, var(--night-1));
}
.hero-stars, .hero-stars::before {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 22px 34px, #fff 60%, transparent),
    radial-gradient(1.2px 1.2px at 132px 88px, #fff 60%, transparent),
    radial-gradient(2px 2px at 76px 160px, #fff6c2 60%, transparent),
    radial-gradient(1.2px 1.2px at 188px 190px, #fff 60%, transparent),
    radial-gradient(1.6px 1.6px at 160px 20px, #cfe6ff 60%, transparent);
  background-size: 210px 210px;
}
.hero-stars { opacity: .8; }
.hero-stars::before {
  content: "";
  background-size: 330px 330px;
  background-position: 60px 40px;
  opacity: .8;
  animation: twinkle 3.6s ease-in-out infinite alternate;
}
.hero-road {
  position: absolute;
  left: 67%; bottom: 0;
  width: 1500px; height: 1500px;
  transform: translateX(-50%) perspective(1000px) rotateX(58deg);
  transform-origin: 50% 100%;
  pointer-events: none;
  -webkit-mask: linear-gradient(to top, #000 55%, transparent 88%);
  mask: linear-gradient(to top, #000 55%, transparent 88%);
}
.hero-road svg { width: 100%; height: 100%; }
.road-lights { animation: roadrun 1.1s linear infinite; }
.road-dash { animation: roadrun2 .9s linear infinite; }
@keyframes roadrun { to { stroke-dashoffset: -28; } }
@keyframes roadrun2 { to { stroke-dashoffset: -64; } }

.hero-copy { position: relative; z-index: 2; }
.hero-title {
  font-family: var(--mk); font-weight: 400;
  font-size: clamp(56px, 7.2vw, 104px);
  line-height: .96;
  color: #fff;
  margin: 0 0 24px;
  filter: var(--o2) drop-shadow(0 12px 18px rgba(0, 0, 0, .35));
}
.hero-title span { display: block; }
.hero-title .gold-text { background-size: 100% .96em; }
.lede { font-size: 20px; line-height: 1.55; color: #dcd8ff; max-width: 540px; margin: 0; }

.caps { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 30px 0 32px; }
.cap {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 9px;
  background: rgba(13, 9, 46, .82);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14), 0 5px 0 var(--ink);
}
.cap img { width: 38px; height: 38px; }
.cap-star img { width: 44px; height: 44px; margin: -4px 0; }
.cap b {
  display: flex; align-items: center;
  font-family: var(--mk); font-weight: 400; font-size: 34px; line-height: 1;
  color: #fff; filter: var(--o1);
}
.cap .inf { width: 44px; height: 22px; color: #fff; }
.cap em {
  font-style: normal; font-family: var(--mk); font-size: 14px; line-height: 1;
  padding: 5px 8px 4px; border-radius: 8px;
  border: 2px solid var(--ink);
  color: #fff; background: var(--red);
}
.cap-star em { color: #3a1500; background: linear-gradient(180deg, #fff1a0, #ffc21a); }
.cap-vs { font-family: var(--mk); font-size: 18px; color: var(--mute); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.ca-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; font-size: 15px; color: var(--mute); }
.ca-tag {
  font-family: var(--mk); font-size: 14px; line-height: 1;
  color: var(--gold); background: var(--ink);
  padding: 5px 8px 4px; border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, .16);
}
.ca-line.live .ca-value { font-family: var(--mono); font-size: 14px; color: #fff; word-break: break-all; }
.ca-copy {
  font-family: var(--mk); font-size: 14px; line-height: 1;
  color: var(--gold); background: transparent;
  border: 2px solid var(--gold); border-radius: 8px;
  padding: 5px 10px 4px;
}
.ca-copy:hover { background: var(--gold); color: var(--ink); }

.hero-art { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hero-stage { position: relative; width: min(100%, 520px); aspect-ratio: 1; display: grid; place-items: center; }
.rays {
  position: absolute; inset: -8%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 228, 120, .32) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 16%, transparent 66%);
  mask: radial-gradient(circle, #000 16%, transparent 66%);
  animation: spin 46s linear infinite;
}
.star-btn {
  position: relative;
  width: 76%; aspect-ratio: 1;
  padding: 0; border: 0; background: none;
  border-radius: 42%;
  animation: bob 3.4s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}
.star-btn img {
  width: 100%; height: auto;
  filter: drop-shadow(0 22px 34px rgba(255, 180, 30, .38));
  transition: transform .28s cubic-bezier(.3, 1.6, .5, 1);
  pointer-events: none;
}
.star-btn:hover img { transform: scale(1.04) rotate(-4deg); }
.star-btn:active img { transform: scale(.95); }
.star-btn.boost img { animation: starboost .6s ease-out; }
.float-txt {
  position: absolute; z-index: 3;
  font-family: var(--mk); font-size: 30px; line-height: 1; white-space: nowrap;
  color: var(--gold); filter: var(--o2);
  pointer-events: none;
  transform: translate(-50%, 0);
  animation: floatup 1.1s ease-out forwards;
}
.orbit { position: absolute; z-index: 1; height: auto; animation: coinspin 1.8s linear infinite, drift 5s ease-in-out infinite; pointer-events: none; }
.orbit-1 { top: 10%; left: 2%; width: 64px; }
.orbit-2 { top: 4%; right: 10%; width: 48px; animation-delay: -.7s, -1.8s; }
.orbit-3 { bottom: 16%; right: 1%; width: 40px; animation-delay: -1.2s, -3.1s; }
.qcube-hero { position: absolute; left: 5%; bottom: 7%; z-index: 2; --s: 86px; }
.hint {
  position: relative; z-index: 2;
  margin: 10px 0 0; padding: 7px 14px 6px;
  font-family: var(--mk); font-size: 15px; line-height: 1.2; color: #d6d2ff; text-align: center;
  background: rgba(10, 7, 40, .72); border-radius: 999px;
}
.hint-touch { display: none; }
@media (hover: none) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}

/* ---------- ? box cube (CSS 3D) ---------- */
.qcube { --s: 92px; display: block; width: var(--s); height: var(--s); perspective: calc(var(--s) * 5); }
.qc-in {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: qspin 7s linear infinite;
}
.qf {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--mk); font-size: calc(var(--s) * .6); line-height: 1; font-style: normal;
  color: #fff;
  border-radius: 18%;
  border: calc(var(--s) * .05) solid rgba(255, 255, 255, .95);
  background: linear-gradient(135deg, rgba(255, 77, 109, .86), rgba(255, 159, 28, .82) 22%, rgba(255, 210, 30, .8) 42%, rgba(61, 220, 132, .8) 62%, rgba(47, 184, 255, .82) 80%, rgba(154, 92, 255, .88));
  box-shadow: inset 0 0 calc(var(--s) * .2) rgba(255, 255, 255, .55), 0 0 0 calc(var(--s) * .02) var(--ink);
  text-shadow: 0 .05em 0 var(--ink), .04em 0 0 var(--ink), -.04em 0 0 var(--ink), 0 -.04em 0 var(--ink), 0 .08em 0 var(--ink);
}
.qf1 { transform: translateZ(calc(var(--s) / 2)); }
.qf2 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.qf3 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.qf4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.qf5 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.qf6 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }

/* ---------- Ticker ---------- */
.ticker {
  position: relative; z-index: 3;
  overflow: hidden;
  padding: 26px 0;
  background: linear-gradient(180deg, #ff4b3e, #e8322b 50%, #c71f1c);
  border-block: 4px solid var(--ink);
}
.ticker::before, .ticker::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background: var(--checker) 0 0 / 12px 12px;
}
.ticker::before { top: 0; border-bottom: 3px solid var(--ink); }
.ticker::after { bottom: 0; border-top: 3px solid var(--ink); }
.ticker-track { display: flex; width: max-content; animation: marquee 44s linear infinite; }
.ticker-set { display: flex; align-items: center; gap: 24px; padding: 4px 24px 0 0; }
.ticker-set span {
  font-family: var(--mk); font-size: 28px; line-height: 1; white-space: nowrap;
  color: #fff; filter: var(--o2);
}
.ticker-set img { width: 32px; height: 32px; }
.ticker-set .t-y { color: var(--gold); }
.ticker-set .t-c { color: #a8f2ff; }
.ticker-set b { font-weight: 400; color: var(--gold); }

/* ---------- Sections ---------- */
.section { position: relative; padding: 120px 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section-head { max-width: 840px; margin: 0 auto 60px; text-align: center; }

/* ---------- Item slots ---------- */
.slot {
  position: relative; flex: none;
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 34%, #3d31a0, #1b1450 72%);
  border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink), 0 5px 0 var(--ink);
}
.slot svg { width: 58px; height: 58px; }
.slot-star { background: radial-gradient(circle at 50% 38%, #7a5cf0, #2c1b86 72%); }
.slot-glow { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink), 0 5px 0 var(--ink), 0 0 30px 4px rgba(255, 206, 50, .55); }
.slot-box { background: radial-gradient(circle at 50% 34%, #ffe9a8, #ffc54a 72%); }
.slot-sm { width: 70px; height: 70px; border-radius: 20px; }
.slot-sm svg { width: 46px; height: 46px; }
.slot-tag {
  position: absolute; left: 50%; bottom: -11px;
  transform: translateX(-50%);
  display: inline-flex; align-items: center;
  font-family: var(--mk); font-size: 12px; line-height: 1; white-space: nowrap;
  color: #fff;
  padding: 4px 7px 3px;
  border: 2px solid var(--ink); border-radius: 7px;
}
.slot-tag .inf { width: 24px; height: 12px; }
.tag-red { background: var(--red); }
.tag-blue { background: #2c74ff; }
.tag-gold { color: #3a1500; background: linear-gradient(180deg, #fff1a0, #ffc21a); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 60px; align-items: start; }
.facts { display: grid; gap: 18px; }
.fact {
  display: flex; align-items: center; gap: 24px;
  padding: 22px 24px 24px;
  background: rgba(24, 17, 88, .7);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08), 0 6px 0 var(--ink);
}
.fact h3 {
  font-family: var(--mk); font-weight: 400; font-size: 28px; line-height: 1;
  color: #fff; filter: var(--o1);
  margin: 0 0 8px;
}
.fact p { margin: 0; font-size: 17px; color: var(--mute); }
.fact-star { background: linear-gradient(120deg, rgba(255, 196, 40, .2), rgba(24, 17, 88, .7) 58%); }
.fact-star h3 { color: var(--gold); }

.statcard {
  position: sticky; top: 100px;
  overflow: hidden;
  background: linear-gradient(180deg, #2f5ee6 0%, #1c35a8 100%);
  border: 4px solid var(--ink);
  border-radius: 28px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25), 0 8px 0 var(--ink), 0 34px 60px rgba(0, 0, 0, .4);
}
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 12px; background: rgba(0, 0, 0, .2); }
.sc-kind { font-family: var(--mk); font-size: 14px; color: #c3d6ff; }
.sc-name { font-family: var(--mk); font-size: 28px; line-height: 1; color: var(--gold); filter: var(--o1); }
.sc-art { display: grid; place-items: center; padding: 18px 0 8px; background: radial-gradient(circle at 50% 50%, rgba(255, 230, 120, .5), transparent 58%); }
.sc-art img { width: 150px; height: auto; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .3)); }
.sc-bars { display: grid; gap: 10px; padding: 8px 20px 16px; }
.sbar { display: grid; grid-template-columns: 124px 1fr; align-items: center; gap: 12px; }
.sbar span { font-family: var(--mk); font-size: 15px; line-height: 1; color: #fff; }
.sbar i {
  position: relative; height: 16px; border-radius: 4px;
  background: linear-gradient(180deg, #fff1a0, #ffc21a) 0 0 / calc(var(--v) / 6 * 100%) 100% no-repeat, rgba(0, 0, 0, .35);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.sbar i::after {
  content: ""; position: absolute; inset: 0; border-radius: 4px;
  background: repeating-linear-gradient(90deg, transparent 0 calc(16.666% - 2px), var(--ink) calc(16.666% - 2px) 16.666%);
}
.sbar b { font-family: var(--mk); font-weight: 400; font-size: 16px; color: var(--gold); }
.sc-rows { margin: 0; padding: 0 20px 8px; }
.sc-rows div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 2px dashed rgba(255, 255, 255, .2); }
.sc-rows dt { font-weight: 800; color: #c3d6ff; }
.sc-rows dd { margin: 0; font-weight: 800; color: #fff; text-align: right; }
.sc-rows dd.mono { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.sc-tip { margin: 0; padding: 14px 20px 18px; font-size: 15px; line-height: 1.5; color: #e8efff; background: rgba(0, 0, 0, .22); }
.sc-tip span { font-family: var(--mk); color: var(--gold); margin-right: 8px; }

/* ---------- The race (course map) ---------- */
.race-sec { padding-bottom: 70px; }
.course {
  position: relative;
  max-width: calc(var(--max) + 20px);
  margin: 0 auto;
  padding: 0 10px 10px;
  background: linear-gradient(180deg, #221a66, #150f4a);
  border: 4px solid var(--ink);
  border-radius: 32px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12), 0 10px 0 var(--ink), 0 44px 90px rgba(0, 0, 0, .5);
}
.course-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 66px; padding: 0 8px; }
.cb-cup { display: flex; align-items: center; gap: 10px; font-family: var(--mk); font-size: 26px; line-height: 1; color: var(--gold); }
.cb-cup svg { width: 40px; height: 40px; }
.cb-cup { filter: var(--o1); }
.cb-cc {
  font-family: var(--mk); font-size: 18px; line-height: 1;
  color: #fff; background: var(--red);
  padding: 7px 12px 6px;
  border: 3px solid var(--ink); border-radius: 10px;
  box-shadow: 0 3px 0 var(--ink);
}

.trail {
  --rw: 64px;
  position: relative; isolation: isolate;
  overflow: clip;
  padding: 18px 3% 140px;
  background: #52b334;
  border: 3px solid var(--ink);
  border-radius: 22px;
}
.trail::after {
  content: ""; position: absolute; inset: 0; z-index: 8; pointer-events: none;
  border-radius: 19px;
  box-shadow: inset 0 0 60px rgba(10, 5, 40, .35);
}
.map-svg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
.map-svg text { font-family: var(--mk); }
.sl { fill: #3b3163; transition: fill .15s ease; }
.sl.on { fill: #ff3b30; }
.go .sl { fill: #3ddc54; }

.course-sign {
  position: absolute; z-index: 3; top: 112px; right: 6%;
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 26px 12px;
  background: linear-gradient(180deg, #fff1a0, #ffc21a);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: inset 0 -4px 0 rgba(200, 90, 0, .3), 0 6px 0 var(--ink), 0 18px 26px rgba(0, 0, 0, .3);
  transform: rotate(2deg);
}
.course-sign::before, .course-sign::after {
  content: ""; position: absolute; z-index: -1; top: 100%;
  width: 10px; height: 44px;
  background: #8a5a2b; border: 3px solid var(--ink); border-top: 0;
}
.course-sign::before { left: 26%; }
.course-sign::after { right: 26%; }
.cs-title { font-family: var(--mk); font-size: 34px; line-height: 1; color: #fff; filter: var(--o2); }
.cs-sub { margin-top: 8px; font-family: var(--mk); font-size: 14px; line-height: 1; color: var(--ink); }

/* HUD */
.hud-wrap { position: sticky; top: 90px; z-index: 9; height: 0; }
.hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; }
.hud-item {
  display: grid; place-items: center;
  width: 66px; height: 66px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 34%, #3d31a0, #140e44 72%);
  border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink), 0 5px 0 var(--ink);
}
.hud-item svg { width: 44px; height: 44px; }
.hud-item.pop svg { animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.hud-item.star { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--ink), 0 5px 0 var(--ink), 0 0 26px 6px rgba(255, 210, 60, .6); }
.hud-coins, .hud-box {
  display: flex; align-items: center; gap: 6px;
  height: 46px; padding: 0 14px 0 8px;
  background: rgba(14, 9, 48, .88);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14), 0 4px 0 var(--ink);
}
.hud-coins img { width: 30px; height: 30px; }
.hud-coins.bump img { animation: coinbump .3s ease-out; }
.hud-coins b { min-width: 1.3em; font-family: var(--mk); font-weight: 400; font-size: 26px; line-height: 1; color: #fff; }
.hud-coins em {
  display: none;
  font-style: normal; font-family: var(--mk); font-size: 12px; line-height: 1;
  color: #fff; background: var(--red);
  padding: 4px 6px 3px; border: 2px solid var(--ink); border-radius: 6px;
}
.hud-coins.max em { display: inline-block; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.hud-box { padding: 0 16px; font-family: var(--mk); font-size: 20px; line-height: 1; color: #fff; }
.hud-box b { font-weight: 400; color: var(--gold); }
.hud-pos {
  margin-left: auto;
  font-family: var(--mk); font-size: 70px; line-height: 1;
  color: #e9f1ff;
  filter: var(--o2);
}
.hud-pos small { font-size: .46em; }
.hud-pos.p1 { color: var(--gold); }
.hud-pos.p2 { color: #d9e4f2; }
.hud-pos.p3 { color: #ffb070; }
.hud-pos.pop { animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }

/* stops */
.stops { position: relative; z-index: 2; list-style: none; margin: 312px 0 0; padding: 0; display: flex; flex-direction: column; gap: 230px; }
.stop { display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: 56px; }
.spot { display: flex; align-items: center; justify-content: center; gap: 28px; }
.stop[data-lane="left"] .spot { grid-column: 1; grid-row: 1; flex-direction: row-reverse; }
.stop[data-lane="left"] .card { grid-column: 2; grid-row: 1; justify-self: start; }
.stop[data-lane="right"] .spot { grid-column: 2; grid-row: 1; }
.stop[data-lane="right"] .card { grid-column: 1; grid-row: 1; justify-self: end; }

.site { display: flex; flex-direction: column; align-items: center; }
.landmark {
  width: 178px; height: auto; aspect-ratio: 140 / 110;
  overflow: visible;
  font-family: var(--mk);
  transition: transform .45s cubic-bezier(.3, 1.6, .5, 1);
}
.stop.reached .landmark { transform: scale(1.08); }
.lm-bob { animation: bob 2.4s ease-in-out infinite; }
.place {
  margin-top: 4px;
  font-family: var(--mk); font-size: 22px; line-height: 1; white-space: nowrap;
  color: #fff; filter: var(--o2);
  transition: color .3s ease;
}
.stop.reached .place { color: var(--gold); }
.place-new { font-size: 32px; }

/* item box rows sit on the road */
.boxrow {
  position: relative; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  width: var(--rw); height: calc(var(--rw) * .34);
}
.boxrow i {
  display: grid; place-items: center;
  width: calc(var(--rw) * .3); aspect-ratio: 1;
  border-radius: 24%;
  background: linear-gradient(135deg, #ff4d6d, #ffb21a 30%, #ffe14d 45%, #3ddc84 62%, #2fb8ff 80%, #9a5cff);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px var(--ink), 0 4px 5px rgba(0, 0, 0, .35);
  animation: boxbob 1.6s ease-in-out infinite;
  transition: transform .35s ease, opacity .35s ease;
}
.boxrow i::after {
  content: "?";
  font-family: var(--mk); font-size: calc(var(--rw) * .2); line-height: 1; font-style: normal;
  color: #fff;
  text-shadow: 0 1px 0 var(--ink), 1px 0 0 var(--ink), -1px 0 0 var(--ink), 0 -1px 0 var(--ink);
}
.boxrow i:nth-child(2) { animation-delay: -.5s; }
.boxrow i:nth-child(3) { animation-delay: -1s; }
.stop.reached .boxrow i { opacity: 0; transform: scale(2) rotate(35deg); animation: none; }
.boxrow-finish {
  height: 18px;
  background: var(--checker) 0 0 / 18px 18px;
  border: 3px solid var(--ink);
  border-radius: 3px;
}

/* lore cards */
.card {
  position: relative;
  width: 100%; max-width: 470px;
  padding: 28px 30px 30px;
  color: #2a2250;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 26px;
  box-shadow: 0 8px 0 var(--ink), 0 26px 44px rgba(10, 5, 40, .35);
  transition: transform .5s cubic-bezier(.3, 1.5, .5, 1), box-shadow .3s ease;
}
.stop.reached .card { transform: translateY(-5px); box-shadow: 0 0 0 5px var(--gold), 0 13px 0 var(--ink), 0 30px 48px rgba(10, 5, 40, .35); }
.card-star { background: linear-gradient(180deg, #fffbe8, #ffeaa3); }
.card p { margin: 0 0 12px; font-size: 17px; line-height: 1.55; color: #3f3768; }
.card p:last-child { margin-bottom: 0; }
.kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 16px !important; }
.k-box {
  font-family: var(--mk); font-size: 15px; line-height: 1;
  color: #fff; background: var(--ink);
  padding: 7px 10px 6px; border-radius: 9px;
}
.k-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mk); font-size: 15px; line-height: 1;
  color: var(--ink); background: #ffe9a8;
  padding: 3px 10px 3px 4px;
  border: 2px solid var(--ink); border-radius: 9px;
}
.k-item svg { width: 24px; height: 24px; }
.c-title {
  font-family: var(--mk); font-weight: 400;
  font-size: 30px; line-height: 1.05;
  color: var(--ink);
  margin: 0 0 12px;
}
.c-big { font-size: 42px; line-height: 1; }
.c-big span { display: block; }
.c-coins { color: #b07400; }
.gold-ink {
  color: #ffc21a;
  filter: drop-shadow(.03em 0 0 var(--ink)) drop-shadow(-.03em 0 0 var(--ink)) drop-shadow(0 .03em 0 var(--ink)) drop-shadow(0 -.03em 0 var(--ink)) drop-shadow(0 .06em 0 var(--ink));
}
.c-sub { margin: 0 !important; font-family: var(--mk); font-size: 20px !important; line-height: 1.1 !important; color: var(--ink) !important; }
.card .shout { font-family: var(--mk); font-size: 30px; line-height: 1.05; color: var(--ink); }
.card .shout-red { font-size: 48px; line-height: 1; color: var(--red); filter: drop-shadow(0 3px 0 var(--ink)); }
.card .shout-blue { color: #2c74ff; }
.card .exact { margin: 0; font-size: 15px; color: #6b6394; }
.card .exact b { font-family: var(--mono); font-size: 15px; color: var(--ink); }
.card .note { font-family: var(--mk); font-size: 20px; line-height: 1.1; color: #b07400; }

.capline { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin: 4px 0 18px; }
.capline .c-title { margin-bottom: 4px; }
.capbox {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 9px;
  background: #1b1450;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16), 0 4px 0 var(--ink);
}
.capbox img { width: 34px; height: 34px; }
.capbox b { font-family: var(--mk); font-weight: 400; font-size: 30px; line-height: 1; color: #fff; }
.capbox em {
  font-style: normal; font-family: var(--mk); font-size: 13px; line-height: 1;
  color: #fff; background: var(--red);
  padding: 4px 6px 3px; border: 2px solid var(--ink); border-radius: 6px;
  animation: maxflash 2.4s ease-in-out infinite;
}
.cb-drop {
  position: absolute; left: 12px; top: -34px;
  width: 26px; height: 26px;
  background: url("../assets/coin.svg") center / contain no-repeat;
  opacity: 0;
  animation: coindrop 2.4s ease-in infinite;
}
.strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.strip span {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  background: radial-gradient(circle at 50% 34%, #3d31a0, #1b1450 72%);
  border: 3px solid var(--ink);
  border-radius: 15px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7);
}
.strip svg { width: 38px; height: 38px; }
.strip .strip-q { animation: pulse 1.2s ease-in-out infinite; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
.kind { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }

/* the finish */
.stop-final { grid-template-columns: 1fr; justify-items: center; row-gap: 28px; }
.stop-final .spot { grid-column: 1; grid-row: 1; flex-direction: column; gap: 4px; }
.stop-final .reward { grid-column: 1; grid-row: 2; }
.goal-star { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.goal-star img {
  position: relative;
  width: 184px; height: auto;
  filter: drop-shadow(0 0 34px rgba(255, 214, 70, .7));
  animation: bob 3s ease-in-out infinite;
  transition: scale .5s cubic-bezier(.3, 1.6, .5, 1);
}
.stop-final.reached .goal-star img { scale: 1.12; }
.goal-rays {
  position: absolute; inset: -50px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 230, 120, .4) 0deg 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%);
  mask: radial-gradient(circle, #000 18%, transparent 68%);
  animation: spin 30s linear infinite;
}
.stop-final .place-new, .stop-final.reached .place-new {
  background: var(--rainbow);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.reward {
  width: 100%; max-width: 620px;
  padding: 30px 34px 34px;
  text-align: center; color: #fff;
  background: linear-gradient(180deg, #2d2196 0%, #1a1260 100%);
  border: 4px solid var(--ink);
  border-radius: 30px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .2), 0 10px 0 var(--ink), 0 34px 60px rgba(0, 0, 0, .45);
  transition: transform .5s cubic-bezier(.3, 1.5, .5, 1);
}
.stop-final.reached .reward { transform: translateY(-5px); }
.reward-kicker { margin: 0 0 12px; font-family: var(--mk); font-size: 18px; line-height: 1; color: var(--sky); }
.reward-title {
  display: flex; align-items: baseline; justify-content: center; gap: 16px;
  margin: 0 0 12px;
  font-family: var(--mk); font-weight: 400; font-size: 58px; line-height: 1;
  color: #fff; filter: var(--o2);
}
.rt-pos { color: var(--gold); }
.rt-pos small { font-size: .5em; }
.reward-sub { margin: 0; font-size: 17px; color: #d6d2ff; }
.reward-loot {
  display: flex; align-items: center; gap: 20px;
  width: fit-content; max-width: 100%;
  margin: 22px auto 26px;
  padding: 12px 22px 18px 12px;
  background: rgba(0, 0, 0, .25);
  border: 2px solid rgba(255, 255, 255, .1);
  border-radius: 22px;
}
.loot-name { margin: 0; font-family: var(--mk); font-size: 26px; line-height: 1.1; color: var(--gold); text-align: left; }
.loot-name span { color: #fff; }
.reward-name { width: fit-content; margin: 0 auto 6px; font-family: var(--mk); font-size: 64px; line-height: 1; filter: var(--o2); }
.reward-tag { margin: 0 0 10px; font-family: var(--mk); font-size: 28px; line-height: 1.1; color: #fff; filter: var(--o1); }
.reward-coming { margin: 0; font-family: var(--mk); font-size: 26px; line-height: 1.1; color: var(--sky); }
.reward-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* racers and race effects */
.racers { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.kart, .fx, .you-tag, .spark { position: absolute; left: 0; top: 0; will-change: transform; }
.kart { width: 24px; height: 33px; opacity: 0; transition: opacity .3s ease; }
.racers.on .kart { opacity: 1; }
.kart svg { width: 100%; height: 100%; overflow: visible; }
.kart.is-star svg { animation: rainbowkart .5s linear infinite; }
.you-tag {
  font-family: var(--mk); font-size: 12px; line-height: 1; white-space: nowrap;
  color: #3a1500; background: linear-gradient(180deg, #fff1a0, #ffc21a);
  padding: 4px 6px 3px;
  border: 2px solid var(--ink); border-radius: 6px;
  opacity: 0; transition: opacity .3s ease;
}
.racers.on .you-tag { opacity: 1; }
.spark {
  width: 12px; height: 12px;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
}
.fx { opacity: 0; }
.fx svg { width: 100%; height: 100%; overflow: visible; }
.fx-peel { width: 22px; height: 22px; }
.fx-shell { width: 34px; height: 34px; }
.fx-boom {
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0 18%, rgba(111, 211, 255, .75) 30%, rgba(47, 140, 255, .35) 55%, transparent 70%);
  box-shadow: 0 0 0 5px rgba(160, 225, 255, .9), 0 0 30px 10px rgba(47, 184, 255, .6);
}
.fx-pow {
  width: 40px; height: 40px;
  background: #fff;
  clip-path: polygon(50% 0, 60% 30%, 92% 12%, 72% 42%, 100% 55%, 68% 62%, 80% 96%, 50% 72%, 20% 96%, 32% 62%, 0 55%, 28% 42%, 8% 12%, 40% 30%);
}

/* ---------- ? box roulette ---------- */
.boxsec { background: radial-gradient(56% 46% at 50% 62%, rgba(139, 92, 255, .32), transparent 72%); }
.roulette {
  max-width: 780px; margin: 0 auto;
  padding: 26px 28px 32px;
  text-align: center;
  background: linear-gradient(180deg, #2d2196 0%, #1a1260 100%);
  border: 4px solid var(--ink);
  border-radius: 32px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .18), 0 10px 0 var(--ink), 0 40px 70px rgba(0, 0, 0, .45);
}
.r-top { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 16px; }
.r-label { font-family: var(--mk); font-size: 18px; line-height: 1; color: #c3d6ff; }
.r-pos { display: flex; gap: 6px; padding: 6px; background: rgba(0, 0, 0, .28); border-radius: 16px; }
.r-pos button {
  min-width: 64px;
  font-family: var(--mk); font-size: 22px; line-height: 1;
  color: #fff; background: transparent;
  padding: 8px 12px 6px;
  border: 3px solid transparent; border-radius: 11px;
}
.r-pos button small { font-size: .56em; }
.r-pos button:hover { background: rgba(255, 255, 255, .1); }
.r-pos button[aria-checked="true"] { color: var(--ink); background: linear-gradient(180deg, #fff1a0, #ffc21a); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.r-stage { display: flex; align-items: center; justify-content: center; gap: 48px; margin: 36px 0 36px; }
.r-box {
  position: relative;
  padding: 12px; border: 0; background: none;
  border-radius: 28px;
  -webkit-tap-highlight-color: transparent;
}
.r-box .qcube { transition: transform .15s ease; }
.r-box:hover .qcube { transform: scale(1.05); }
.r-box:active .qcube { transform: scale(.9); }
.r-box.hit .qc-in { animation-duration: .6s; }
.qcube-big { --s: 150px; }
.r-slot {
  position: relative; overflow: hidden;
  width: 150px; height: 150px; flex: none;
  border-radius: 36px;
  background: radial-gradient(circle at 50% 34%, #3d31a0, #120c40 72%);
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 8px var(--ink), 0 6px 0 var(--ink);
}
.r-slot.win { box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 8px var(--ink), 0 6px 0 var(--ink), 0 0 40px 8px rgba(255, 214, 70, .65); }
.r-reel { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; will-change: transform; }
.r-reel > span { position: relative; flex: none; display: grid; place-items: center; height: 142px; }
.r-reel svg { width: 96px; height: 96px; }
.r-reel .tri svg { position: absolute; width: 62px; height: 62px; }
.r-reel .tri svg:nth-child(1) { left: 50%; top: 14px; transform: translateX(-50%); }
.r-reel .tri svg:nth-child(2) { left: 16px; bottom: 16px; }
.r-reel .tri svg:nth-child(3) { right: 16px; bottom: 16px; }
.r-result { min-height: 3.2em; margin: 0 0 14px; font-size: 19px; line-height: 1.5; color: #e8e6ff; }
.r-result b { font-family: var(--mk); font-weight: 400; font-size: 24px; color: var(--gold); margin-right: 6px; }
.r-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 22px; font-family: var(--mk); font-size: 16px; line-height: 1; color: #c3d6ff; }
.r-stats b { font-weight: 400; color: #fff; }
.r-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ---------- How to buy (Mushroom Cup) ---------- */
.cup { background: linear-gradient(180deg, transparent, rgba(30, 143, 255, .1) 35%, transparent); }
.cup-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.cup-meta { display: grid; margin: 30px 0 0; }
.cup-meta div { display: grid; grid-template-columns: 136px 1fr; gap: 14px; padding: 12px 0; border-top: 2px dashed rgba(255, 255, 255, .16); }
.cup-meta dt { font-family: var(--mk); font-size: 16px; line-height: 1.3; color: var(--gold); }
.cup-meta dd { margin: 0; color: #d6d2ff; }
.cup-score { display: flex; align-items: center; gap: 12px; margin: 26px 0 0; font-family: var(--mk); font-size: 20px; line-height: 1; color: #fff; }
.cup-score svg { width: 46px; height: 46px; }
.cup-score b { font-weight: 400; color: var(--gold); }
.races { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.race {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; height: 100%;
  padding: 0 0 24px;
  text-align: left;
  color: #2a2250;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 24px;
  box-shadow: 0 7px 0 var(--ink);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.race:hover { transform: translateY(-3px); box-shadow: 0 10px 0 var(--ink); }
.race:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink); }
.race-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--rc); border-bottom: 4px solid var(--ink); }
.race-num { font-family: var(--mk); font-size: 19px; line-height: 1; color: #fff; filter: var(--o1); }
.race-map { width: 60px; height: 36px; overflow: visible; filter: drop-shadow(0 2px 0 var(--ink)); }
.race-map path { fill: none; stroke: #fff; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.race-name { padding: 6px 16px 0; font-family: var(--mk); font-size: 24px; line-height: 1; color: var(--ink); }
.race-text { padding: 0 16px; font-size: 16px; line-height: 1.5; color: #4a4275; }
.race-text em { font-style: normal; font-weight: 900; color: var(--ink); }
.race-done {
  position: absolute; right: 12px; bottom: 8px;
  font-family: var(--mk); font-size: 40px; line-height: 1;
  color: var(--gold); filter: var(--o2);
  opacity: 0; transform: scale(.3) rotate(-20deg);
  transition: opacity .25s ease, transform .4s cubic-bezier(.3, 1.6, .5, 1);
}
.race-done small { font-size: .5em; }
.race[aria-pressed="true"] { background: #fff3c4; }
.race[aria-pressed="true"] .race-done { opacity: 1; transform: rotate(-8deg); }

/* ---------- Buy ---------- */
.buy { padding-top: 60px; padding-left: var(--gutter); padding-right: var(--gutter); }
.buy-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 360px minmax(0, 1fr); align-items: center; gap: 44px;
  max-width: 1080px; margin: 0 auto;
  padding: 46px 52px;
  background: linear-gradient(135deg, #2d2196 0%, #1a1260 58%, #3a1670 100%);
  border: 4px solid var(--ink);
  border-radius: 36px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .18), 0 10px 0 var(--ink), 0 44px 80px rgba(0, 0, 0, .45);
}
.buy-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--rainbow); }
.buy-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.ba-rays {
  position: absolute; inset: -10%;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 230, 120, .34) 0deg 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 16%, transparent 66%);
  mask: radial-gradient(circle, #000 16%, transparent 66%);
  animation: spin 40s linear infinite;
}
.ba-star { position: relative; width: 74%; height: auto; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .35)); }
.ba-coin { position: absolute; height: auto; animation: coinspin 1.8s linear infinite; }
.ba-c1 { left: 2%; bottom: 10%; width: 70px; }
.ba-c2 { right: 4%; top: 8%; width: 54px; animation-delay: -.6s; }
.ba-c3 { right: 10%; bottom: 4%; width: 46px; animation-delay: -1.1s; }
.ca-box {
  display: flex; align-items: center; gap: 12px;
  margin: 26px 0;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .3);
  border: 3px solid var(--ink);
  border-radius: 16px;
}
.ca-code { flex: 1; min-width: 0; padding: 0; font-size: 15px; color: #fff; background: none; border: 0; word-break: break-all; }
.ca-box.live .ca-code { font-size: 14px; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tax-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: -8px 0 26px; font-size: 16px; line-height: 1.4; color: var(--mute); }
.tax-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mk); font-size: 16px; line-height: 1;
  color: #3a1500; background: linear-gradient(180deg, #fff1a0, #ffc21a);
  padding: 7px 10px 6px;
  border: 2px solid var(--ink); border-radius: 9px;
  box-shadow: 0 3px 0 var(--ink);
}
.tax-pill b { font-weight: 400; }

/* ---------- Footer ---------- */
.footer { position: relative; margin-top: 30px; padding: 0 0 50px; background: var(--night-0); }
.footer-flag { height: 26px; margin-bottom: 44px; background: var(--checker) 0 0 / 26px 26px; border-block: 4px solid var(--ink); }
.foot-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 24px; }
.foot-links a { font-family: var(--mk); font-size: 17px; line-height: 1; color: #fff; text-decoration: none; }
.foot-links a:hover { color: var(--gold); }
.disclaimer { max-width: 920px; font-size: 14px; line-height: 1.65; color: #8e89b8; }
.credits { font-size: 13px; color: #6f6a99; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: 24px; z-index: 300;
  width: fit-content; max-width: 560px; margin: 0 auto;
  padding: 14px 20px;
  font-weight: 800; font-size: 16px; line-height: 1.45; text-align: center;
  color: #fff;
  background: rgba(22, 15, 76, .95);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), 0 6px 0 var(--ink), 0 20px 40px rgba(0, 0, 0, .45);
  transform: translateY(calc(100% + 40px));
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
  pointer-events: none;
}
.toast.on { transform: translateY(0); }
.toast .t, .toast b { color: var(--gold); }
.toast b { font-family: var(--mk); font-weight: 400; }

/* ---------- Pause menu ---------- */
.pause {
  position: fixed; z-index: 320;
  min-width: 240px;
  padding: 10px;
  background: linear-gradient(180deg, #2d2196, #1a1260);
  border: 4px solid var(--ink);
  border-radius: 22px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2), 0 8px 0 var(--ink), 0 24px 50px rgba(0, 0, 0, .5);
}
.pause-head { padding: 6px 0 10px; font-family: var(--mk); font-size: 28px; line-height: 1; text-align: center; color: var(--gold); filter: var(--o1); }
.pause button {
  display: block; width: 100%;
  padding: 11px 14px 9px;
  font-family: var(--mk); font-size: 18px; line-height: 1; text-align: left;
  color: #fff; background: transparent;
  border: 0; border-radius: 12px;
}
.pause button:hover, .pause button:focus-visible { color: var(--ink); background: linear-gradient(180deg, #fff1a0, #ffc21a); outline: none; }

/* ---------- Trophy dialog ---------- */
.podium { max-width: min(94vw, 540px); padding: 0; border: 0; background: transparent; color: #fff; overflow: visible; }
.podium::backdrop { background: rgba(5, 3, 25, .72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.podium[open] .podium-in { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.podium-in {
  padding: 30px 30px 28px;
  text-align: center;
  background: linear-gradient(180deg, #2f5ee6, #1c35a8);
  border: 4px solid var(--ink);
  border-radius: 32px;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .25), 0 10px 0 var(--ink), 0 40px 80px rgba(0, 0, 0, .5);
}
.pd-kicker { margin: 0 0 8px; font-family: var(--mk); font-size: 20px; line-height: 1; color: var(--sky); }
.pd-title { margin: 0 0 20px; font-family: var(--mk); font-weight: 400; font-size: 34px; line-height: 1.05; color: var(--gold); filter: var(--o2); }
.pd-body { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; text-align: left; }
.pd-cup { flex: none; width: 124px; height: 124px; animation: bob 3s ease-in-out infinite; }
.pd-rank { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--mk); font-size: 20px; line-height: 1; }
.pd-stars { display: inline-flex; gap: 2px; }
.pd-stars svg { width: 32px; height: 32px; }
.pd-list { margin: 0; padding-left: 20px; font-weight: 800; line-height: 1.8; }

/* ---------- Star power ---------- */
.starpower { position: fixed; inset: 0; z-index: 250; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
.starpower::before {
  content: ""; position: absolute; inset: 0;
  border: 12px solid transparent;
  border-image: linear-gradient(90deg, #ff4d6d, #ff9f1c, #ffd21e, #3ddc84, #2fb8ff, #9a5cff, #ff4d6d) 1;
  box-shadow: inset 0 0 80px rgba(255, 255, 255, .35);
  animation: huespin .9s linear infinite;
}
.sp-text {
  position: absolute; left: 50%; top: 42%;
  font-family: var(--mk); font-size: clamp(52px, 10vw, 130px); line-height: 1; white-space: nowrap;
  color: var(--gold);
  filter: var(--o2) drop-shadow(0 0 30px rgba(255, 220, 90, .8));
  opacity: 0;
  transform: translate(-50%, -50%) scale(.3);
}
body.star-power .starpower { opacity: 1; }
body.star-power .sp-text { animation: sppop 1.6s cubic-bezier(.3, 1.5, .5, 1) forwards, rainbowtext .8s linear infinite; }
body.star-power .brand img, body.star-power .star-btn img { animation: huespin .7s linear infinite; }

.confetti { position: fixed; inset: 0; z-index: 260; pointer-events: none; width: 100%; height: 100%; }

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
@keyframes coinspin { to { transform: rotateY(360deg); } }
@keyframes qspin { from { transform: rotateX(-22deg) rotateY(0deg); } to { transform: rotateX(-22deg) rotateY(360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes twinkle { from { opacity: .25; } to { opacity: .9; } }
@keyframes floatup { 0% { opacity: 0; translate: 0 6px; } 15% { opacity: 1; } 100% { opacity: 0; translate: 0 -70px; } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes starboost { 0% { transform: scale(1) rotate(0); } 40% { transform: scale(1.15) rotate(-14deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes boxbob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-3px) rotate(6deg); } }
@keyframes coinbump { 0% { transform: scale(1); } 50% { transform: scale(1.35) rotate(-12deg); } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes maxflash { 0%, 38% { transform: scale(1); } 44% { transform: scale(1.35); background: #fff; color: var(--red); } 52%, 100% { transform: scale(1); } }
@keyframes coindrop {
  0% { opacity: 0; transform: translateY(-14px); }
  12% { opacity: 1; }
  42% { transform: translateY(26px); opacity: 1; }
  60% { transform: translate(26px, 2px) rotate(120deg); opacity: 1; }
  82% { transform: translate(52px, 40px) rotate(260deg); opacity: 0; }
  100% { opacity: 0; transform: translate(52px, 40px); }
}
@keyframes rainbowkart {
  from { filter: hue-rotate(0deg) drop-shadow(0 0 5px rgba(255, 255, 255, .9)); }
  to { filter: hue-rotate(360deg) drop-shadow(0 0 5px rgba(255, 255, 255, .9)); }
}
@keyframes huespin { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@keyframes rainbowtext { 0%, 100% { color: #ff4d6d; } 20% { color: #ff9f1c; } 40% { color: #ffd21e; } 60% { color: #3ddc84; } 80% { color: #2fb8ff; } 90% { color: #9a5cff; } }
@keyframes sppop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(3deg); }
  70% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -64%) scale(1.05); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .nav-links { gap: 20px; }
}
@media (max-width: 1060px) {
  .nav-links { display: none; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; padding-bottom: 110px; gap: 4px; text-align: left; }
  .hero-art { order: -1; margin-bottom: 22px; }
  .hero-stage { width: min(100%, 420px); }
  .hero-road { left: 50%; bottom: -6%; }
  .about-grid, .cup-grid { grid-template-columns: 1fr; gap: 46px; }
  .statcard { position: static; width: 100%; max-width: 460px; }
  .stop { column-gap: 26px; }
  .landmark { width: 146px; }
  .buy-card { grid-template-columns: 280px minmax(0, 1fr); gap: 30px; padding: 40px 36px; }
}
@media (max-width: 860px) {
  .buy-card { grid-template-columns: 1fr; padding: 34px 24px; text-align: left; }
  .buy-art { width: 240px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .section { padding: 90px 0; }
  .race-sec { padding-bottom: 100px; }
  .h2 { font-size: 44px; }
  .big { font-size: 19px; }
  .lede { font-size: 18px; }
  .btn-lg { min-height: 54px; padding: 0 22px; font-size: 22px; }
  .fact { align-items: flex-start; gap: 18px; padding: 20px 18px 22px; }
  .fact h3 { font-size: 24px; }
  .slot { width: 72px; height: 72px; border-radius: 20px; }
  .slot svg { width: 48px; height: 48px; }
  .ticker { padding: 22px 0; }
  .ticker-set span { font-size: 24px; }
  .ticker-set img { width: 26px; height: 26px; }

  /* map: the track runs down a rail on the left edge */
  .course { margin: 0 10px; padding: 0 6px 6px; border-radius: 26px; }
  .course-bar { height: 56px; }
  .cb-cup { font-size: 22px; }
  .cb-cup svg { width: 32px; height: 32px; }
  .trail { --rw: 36px; padding: 14px 12px 120px 76px; border-radius: 18px; }
  .course-sign { top: 84px; right: 14px; padding: 10px 16px 9px; }
  .cs-title { font-size: 24px; }
  .cs-sub { font-size: 12px; }
  .hud-wrap { top: 80px; }
  .hud { gap: 6px; }
  .hud-item { width: 50px; height: 50px; border-radius: 15px; }
  .hud-item svg { width: 34px; height: 34px; }
  .hud-coins { height: 40px; padding: 0 10px 0 6px; }
  .hud-coins img { width: 24px; height: 24px; }
  .hud-coins b { font-size: 21px; }
  .hud-box { display: none; }
  .hud-pos { font-size: 50px; }
  .stops { gap: 120px; margin-top: 250px; }
  .stop[data-lane] { grid-template-columns: minmax(0, 1fr); row-gap: 16px; justify-items: stretch; }
  .stop[data-lane] .spot { grid-column: 1; grid-row: 1; position: relative; flex-direction: row; justify-content: flex-start; gap: 0; }
  .stop[data-lane] .card, .stop[data-lane] .reward { grid-column: 1; grid-row: 2; justify-self: stretch; max-width: none; }
  .spot .boxrow { position: absolute; left: calc(-38px - var(--rw) / 2); top: 50%; margin-top: calc(var(--rw) * -.17); }
  .spot .boxrow-finish { margin-top: -9px; }
  .site { flex-direction: row; gap: 10px; }
  .landmark { width: 112px; }
  .place { font-size: 20px; white-space: normal; }
  .place-new { font-size: 26px; }
  .goal-star { width: 130px; height: 130px; }
  .goal-star img { width: 112px; }
  .goal-rays { inset: -30px; }
  .card { padding: 24px 18px 24px; border-radius: 22px; }
  .c-title { font-size: 26px; }
  .c-big { font-size: 32px; }
  .card .shout { font-size: 26px; }
  .card .shout-red { font-size: 38px; }
  .capline { gap: 14px; }
  .kinds { grid-template-columns: 1fr; }
  .strip span { width: 46px; height: 46px; border-radius: 13px; }
  .strip svg { width: 32px; height: 32px; }
  .reward { padding: 26px 16px 26px; }
  .reward-title { font-size: 40px; }
  .reward-name { font-size: 48px; }
  .reward-tag { font-size: 22px; }
  .reward-coming { font-size: 22px; }
  .loot-name { font-size: 20px; }
  .kart { width: 16px; height: 22px; }
  .you-tag { font-size: 10px; padding: 3px 4px 2px; }
  .fx-shell { width: 24px; height: 24px; }
  .fx-boom { width: 64px; height: 64px; }

  .roulette { padding: 22px 14px 26px; border-radius: 26px; }
  .r-stage { gap: 22px; }
  .qcube-big { --s: 108px; }
  .r-slot { width: 118px; height: 118px; border-radius: 30px; }
  .r-reel > span { height: 110px; }
  .r-reel svg { width: 74px; height: 74px; }
  .r-reel .tri svg { width: 48px; height: 48px; }
  .r-reel .tri svg:nth-child(1) { top: 8px; }
  .r-reel .tri svg:nth-child(2) { left: 10px; bottom: 10px; }
  .r-reel .tri svg:nth-child(3) { right: 10px; bottom: 10px; }
  .r-pos button { min-width: 54px; font-size: 20px; padding: 7px 8px 5px; }
  .races { grid-template-columns: 1fr; }
  .cup-meta div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 479px) {
  .hero-title { font-size: 52px; }
  .caps { gap: 8px; }
  .cap b { font-size: 28px; }
  .cap-vs { display: none; }
}
@media (max-width: 440px) {
  .nav { gap: 10px; }
  .nav .soon { display: none; }
  .brand { font-size: 26px; }
  .brand img { width: 34px; height: 34px; }
  .nav .btn-gold { padding: 0 14px; font-size: 18px; }
  .h2 { font-size: 36px; }
  .r-label { width: 100%; }
  .pd-body { flex-direction: column; text-align: center; }
  .pd-rank { justify-content: center; }
  .pd-list { list-style: none; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .ticker-track, .rays, .goal-rays, .ba-rays, .qc-in, .orbit, .ba-coin, .star-btn, .sc-art img, .goal-star img, .ba-star, .pd-cup, .lm-bob, .boxrow i, .cb-drop, .road-lights, .road-dash { animation: none !important; }
}

/* coins on the map pop when you drive through them */
.map-svg .coin { transform-box: fill-box; transform-origin: center; transition: opacity .25s ease, transform .25s ease; }
.map-svg .coin.got { opacity: 0; transform: translateY(-10px) scale(1.7); }
