/* Painted arcade art direction. Layout and semantics remain in style.css. */
:root {
  color: #edf4e6;
  background: #09131f;
  --ink: #dce9ed;
  --cream: #101e2c;
  --muted: #a6b9c3;
  --line: #435666;
  --yellow: #ffdb72;
  --teal: #63d5e9;
}
body {
  background:
    radial-gradient(ellipse at 55% 0, #213d50aa, transparent 65%), #09131f;
  color: #edf4e6;
}
body[data-page="garage"],
body[data-page="workshop"] {
  background:
    linear-gradient(#07111edd, #07111ef5),
    url("../public/art/garage.webp") center/cover fixed;
}
body[data-page="map"] {
  background:
    linear-gradient(#07111ec9, #07111ef5),
    var(--world-image) center/cover fixed;
}
.shell {
  display: block;
  padding-bottom: 92px;
}
.main {
  max-width: 1440px;
  padding: 0 36px 32px;
  margin: auto;
}
.rail {
  inset: auto 0 0;
  width: 100%;
  height: 84px;
  flex-direction: row;
  justify-content: center;
  padding: 10px 24px;
  background: linear-gradient(#1c3041f5, #070f19);
  border-top: 3px solid #687984;
  box-shadow: 0 -5px 25px #0008;
  gap: 28px;
}
.rail .mark {
  font-size: 38px;
  letter-spacing: -3px;
  filter: drop-shadow(0 2px 0 #000);
}
.rail nav {
  flex-direction: row;
  gap: 12px;
  margin: 0;
  width: min(800px, 75%);
}
.nav {
  flex: 1;
  height: 56px;
  flex-direction: row;
  gap: 9px;
  font: 800 18px var(--display);
  text-transform: uppercase;
  color: #d4e6ef;
  min-width: 0;
}
.rail .bottom {
  margin: 0;
  flex-direction: row;
  gap: 16px;
}
.rail .bottom button {
  min-width: 32px;
  min-height: 44px;
}
.topbar {
  height: 85px;
  border-bottom: 1px solid #71869a55;
}
.wordmark {
  font-size: 34px;
  font-style: italic;
  text-shadow: 2px 3px #020810;
  color: #f5edce;
}
.wordmark em {
  color: #ffc74f;
}
.topbar .wordmark small {
  color: #abc1ce;
  letter-spacing: 4px;
  font-style: normal;
}
.chip,
.nav,
.outline,
.primary,
.hudpause,
.pedal,
.wheelpick {
  border: 12px solid transparent;
  border-image: url("../public/art/frame-0.webp") 48 65 fill / 12px / 0 stretch;
  border-radius: 12px;
  background: none;
  box-shadow: 0 3px 10px #0007;
  color: #f6f5dc;
  text-shadow: 1px 2px #03111c;
}
.chip {
  padding: 0 10px;
  min-height: 49px;
  min-width: 112px;
  font-size: 21px;
  font-style: italic;
}
.chip .articon {
  width: 33px;
  height: 33px;
}
.chip.stars {
  min-width: 104px;
}
.chip.stars svg {
  color: #ffd054;
  width: 23px;
  height: 23px;
}
.avatar {
  background: linear-gradient(#ffc535, #ac5106);
  border: 4px ridge #9caeb7;
  color: #14212c;
  box-shadow: 0 3px 8px #0009;
}
.primary {
  border-image-source: url("../public/art/frame-1.webp");
  padding: 4px 18px;
  min-height: 55px;
  font: 800 22px var(--display);
  letter-spacing: 0.6px;
  box-shadow: 0 5px 15px #0009;
}
.outline {
  padding: 1px 12px;
  min-height: 41px;
  font: 700 16px var(--display);
}
.nav.active,
.wheelpick.active {
  border-image-source: url("../public/art/frame-3.webp");
  background: none;
  color: #fff2b3;
}
.primary:hover,
.outline:hover:not(:disabled),
.nav:hover {
  filter: brightness(1.2);
}
button:disabled {
  opacity: 0.45;
  filter: saturate(0.35);
}
button:focus-visible {
  outline: 3px solid #67e9ff;
  outline-offset: 3px;
}
.eyebrow {
  color: #a9c0cd;
}
.pagehead {
  margin: 24px 0 20px;
}
.pagehead h1 {
  font-size: 40px;
  color: #fff0bf;
  text-shadow: 2px 3px #020710;
}
.pagehead p {
  color: #b0c3ce;
}
.season {
  color: #9bb4c1;
}
.dot {
  background: #50ddde;
  box-shadow: 0 0 10px #50ddde;
}
.homehero {
  border: 3px ridge #a1afad;
  border-radius: 10px;
  min-height: 450px;
  box-shadow: 0 15px 35px #0008;
}
.homehero canvas {
  width: 100%;
}
.homehero:after {
  background: linear-gradient(90deg, #071420f0, #071420b5 28%, transparent 65%);
}
.herocopy {
  padding: 36px;
  max-width: 485px;
}
.herocopy h2 {
  font-size: clamp(58px, 6vw, 86px);
  text-shadow:
    3px 4px 0 #081625,
    0 0 24px #0007;
  transform: skew(-4deg);
}
.herocopy p {
  color: #d0d8d2;
}
.badge {
  background: #06121bbf;
  color: #ffdc85;
  border-color: #718b9a;
}
.herometa {
  color: #cad9db;
}
.stripe {
  color: #fff2c9;
  text-shadow: 1px 2px #000;
}
.heroindex {
  background: #071a28bd;
  padding: 10px 15px;
  border-radius: 6px;
}
.panel,
.carcard,
.level,
.worldcard,
.equip,
.part,
.crate,
.workcard,
.spinpanel,
.modal {
  background: linear-gradient(130deg, #233b4c, #0b1825 65%);
  border: 3px ridge #718490;
  box-shadow:
    inset 0 0 20px #0006,
    0 5px 15px #0005;
  border-radius: 10px;
  color: #ecf0dd;
}
.worldcard {
  padding: 0;
}
.worldcard.current,
.carcard.active {
  border-color: #e7ba4b;
  box-shadow: 0 0 18px #ffc3312b;
}
.worldcard .worldinfo {
  background: linear-gradient(#243a48, #101e2b);
}
.worldcard p {
  color: #acc0c8;
}
.worldcard.locked canvas {
  filter: saturate(0.7) brightness(0.8);
}
.worldcard h3 {
  font-size: 19px;
}
.worldgrid {
  gap: 14px;
}
.sectiontitle h2 {
  color: #fff0c9;
  font-size: 26px;
}
.textbutton {
  color: #b7d8e6;
}
.footer {
  color: #839eae;
}
.mini-stats b {
  color: #ffde82;
}
.vehiclepanel canvas {
  background: radial-gradient(#344955, #0c1823);
}
.rewardicon {
  background: #152c3c;
  border: 4px ridge #a4b4be;
  color: #ffce5b;
}
.mapbanner {
  background:
    linear-gradient(90deg, #07121eef, #07121e77),
    var(--world-image) center 40% / cover;
  border: 3px ridge #788d96;
  color: #fff0c6;
  min-height: 138px;
}
.mapbanner h2 {
  font-size: 46px;
  text-shadow: 2px 3px #08131a;
}
.mapbanner p {
  color: #d5e7e7;
}
.worldtabs button {
  background: #142a3c;
  border: 1px solid #506676;
  color: #b3cbd6;
}
.worldtabs button.active {
  background: #265477;
  color: #fff0b2;
  border-color: #82ccde;
}
.level .rating {
  color: #ffca4d;
  text-shadow: 1px 2px #000;
}
.level .info {
  background: linear-gradient(#203749, #0b1926);
}
.level.locked {
  opacity: 0.62;
}
.garagegrid {
  grid-template-columns: 1fr 1.28fr;
  gap: 22px;
  align-items: stretch;
}
.showcase {
  display: flex;
  flex-direction: column;
  grid-column: 2;
  grid-row: 1;
  border: 3px ridge #8397a0;
  border-radius: 12px;
  box-shadow: 0 15px 30px #0007;
  background: #091521;
}
.showcase canvas {
  aspect-ratio: 1.5;
}
@media (min-width: 761px) {
  .showcase canvas {
    height: clamp(210px, calc(100dvh - 445px), 420px);
  }
}
.showcase .label {
  position: static;
  order: -1;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  border-bottom: 1px solid #496270;
  background: linear-gradient(135deg, #203744, #0b1722);
  text-shadow: 2px 3px #02070d;
}
.showcase .label .eyebrow {
  grid-column: 1;
}
.showcase .label .engine-preview {
  grid-column: 2;
  grid-row: 1 / 3;
}
.showcase .label h2 {
  grid-column: 1;
  color: #ffebb5;
  font-size: 38px;
}
.upgrades {
  grid-column: 1;
  grid-row: 1;
  gap: 12px;
}
.upgrade {
  padding: 16px;
  gap: 12px;
  position: relative;
}
.upgrade h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 26px;
}
.upgrade .articon {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(2px 4px 3px #0009);
}
.upgrade p {
  font-size: 12px;
  max-width: 275px;
}
.upgrade .outline {
  border-image-source: url("../public/art/frame-2.webp");
  background: none;
  min-width: 130px;
  font-size: 16px;
  white-space: normal;
  line-height: 1.05;
}
.upgrade .bar {
  height: 12px;
  width: 240px;
  border: 2px ridge #bcc6c9;
  background: #061422;
}
.bar i {
  background: linear-gradient(#cdff69, #4caa16 45%, #225c08);
}
.customize {
  background: linear-gradient(#1b3040, #0c1925);
  border-top: 2px solid #556c7a;
  padding: 16px 20px;
}
.wheelpick {
  font-size: 12px;
  min-height: 32px;
  padding: 0 4px;
  border-width: 8px;
}
.swatch {
  width: 28px;
  height: 28px;
  border: 3px ridge #94a1ac;
}
.swatch.active {
  border-color: #fff2a9;
  box-shadow: 0 0 12px #ffe588;
}
.customrow > span {
  color: #9bb8c7;
}
.cargrid {
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
}
.carcard {
  background: radial-gradient(ellipse at 50% 25%, #29465a, #0c1b29 75%);
  padding: 14px;
}
.carcard canvas {
  height: auto;
  aspect-ratio: 1.74;
}
.carcard h3 {
  color: #f4e2ae;
}
.carcard .outline {
  margin-top: 13px;
}
.carcard p {
  color: #abc1cd;
}
.workcard,
.workcard.secondary {
  background:
    linear-gradient(100deg, #122638f5, #132636c4),
    url("../public/art/garage.webp") center/cover;
  color: #e4ecde;
}
.workcard.secondary {
  border-color: #a895cd;
}
.workcard h2 {
  color: #ffdf94;
}
.workcard p {
  opacity: 1;
  color: #afc5d1;
}
.workcard .primary {
  font-size: 18px;
  min-height: 49px;
}
.equipment .equip {
  border-style: ridge;
  min-height: 125px;
}
.equip .articon {
  float: left;
  width: 64px;
  height: 72px;
  margin-right: 18px;
  object-fit: contain;
}
.part .particon {
  width: 100%;
  height: 114px;
  background: radial-gradient(
    color-mix(in srgb, var(--rarity), transparent 70%),
    transparent 68%
  );
  border: 0;
}
.particon .articon {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 5px 6px #0008);
}
.part {
  border-color: var(--rarity);
  border-top-width: 3px;
}
.part .actions .outline {
  font-size: 13px;
  min-height: 36px;
  padding: 0 6px;
}
.part p {
  font-size: 12px;
}
.empty {
  background: #112536b3;
  color: #bacdd4;
  border-color: #6a7e8c;
}
.crate h3 {
  color: #ffe292;
}
.spinwheel {
  border: 12px ridge #c1ccd1;
  box-shadow:
    0 0 0 4px #142636,
    0 10px 20px #0009;
}
.spinwheel:after {
  background: #122537;
  border: 4px ridge #a9b7bf;
}
.spinpanel h2 {
  color: #ffe49b;
}
.modal {
  border: 6px ridge #a1afb7;
  box-shadow: 0 25px 80px #000b;
  background: radial-gradient(ellipse at top, #25435a, #071723 80%);
}
.modal h2 {
  color: #ffeaab;
  text-shadow: 2px 3px #000;
}
.modal p {
  color: #bed0db;
}
.key {
  background: #324959;
  color: #fff1c8;
  border-color: #10202d;
}
.resultstats b {
  color: #ffdc71;
}
.resultscore {
  filter: drop-shadow(2px 3px #000);
}
.danger {
  color: #ff9b85;
}
.settingsrow {
  border-color: #4b6170;
}
.savewarning {
  color: #192a33;
}
.rankbox {
  border: 5px ridge #a2afb7;
  background: radial-gradient(ellipse at 20% 20%, #245470, #071721);
  border-radius: 16px;
  box-shadow: 0 4px 12px #0009;
}
.rankbox strong {
  color: #ffeb9c;
  text-shadow: 0 0 10px #63cfea55;
}
.hudpause {
  border-image-source: url("../public/art/frame-2.webp");
  width: 52px;
  height: 52px;
}
.hudpause svg {
  width: 26px;
  height: 26px;
}
.progresshud .bar {
  border: 3px ridge #bac6cb;
  height: 15px;
  background: #081927;
}
.progresshud label {
  text-shadow: 1px 2px #000;
  font-weight: 800;
}
.progresshud .bar i {
  background: linear-gradient(#eeff99, #f6b625);
}
.meters {
  border: 3px ridge #9eafb8;
  background: #0c2032e8;
  box-shadow: 0 3px 12px #0005;
}
.meters .bar {
  height: 10px;
  background: #061420;
  border: 1px solid #94aab6;
}
.meters .health {
  background: linear-gradient(#ffb26b, #e73d20 55%, #881e0c);
}
.meters .nitro {
  background: linear-gradient(#b6ffff, #14b8e7 55%, #136094);
}
.pedal {
  border-image-width: 10px;
  border-width: 10px;
  box-shadow: 0 5px 14px #0008;
}
.pedal.gas {
  border-image-source: url("../public/art/frame-2.webp");
  background: none;
  color: #fff4c9;
}
.pedal.boost {
  border-image-source: url("../public/art/frame-3.webp");
  background: none;
  color: #ccffff;
}
.finish-overlay { display: flex; align-items: flex-start; overflow-y: auto; padding: 80px 20px 24px; }
.finish-fireworks {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.modal.finish-podium {
  position: relative;
  z-index: 1;
  text-align: center;
  overflow: visible;
  margin: auto;
  max-height: none;
  flex-shrink: 0;
  padding-top: 64px;
  border-color: #ffe4a3;
  background: radial-gradient(ellipse at 50% 0%, #75613288, transparent 62%), linear-gradient(150deg,#253c4e,#081a29 75%);
  box-shadow: inset 0 0 0 3px #ad894966, inset 0 2px 0 #fff8d1, 0 15px 80px #000b, 0 0 60px #ffc35326;
  animation: podium-arrive .65s cubic-bezier(.2,.9,.25,1.15) both;
}
.finish-podium .eyebrow { color: #e7c98e; }
.finish-podium h2 { font-size: clamp(29px,5vw,43px); text-shadow: 0 3px #070f16, 0 0 28px #ffa33235; }
.finish-medal {
  position: absolute;
  top: -63px;
  left: calc(50% - 53px);
  width: 106px;
  height: 106px;
  border-radius: 50%;
  border: 5px solid #edc86e;
  background: radial-gradient(circle at 32% 20%,#637e87,#103345 45%,#040e1b 80%);
  box-shadow: 0 0 0 3px #15202b, 0 0 0 6px #c7a566, inset 0 0 0 3px #9eb7bc, 0 10px 24px #0008;
  display: grid;
  place-content: center;
  color: #ffe6a0;
  font: 900 57px/1 var(--display);
}
.finish-medal:before,.finish-medal:after {
  content: '';
  position: absolute;
  top: 22px;
  width: 49px;
  height: 48px;
  z-index: -1;
  background: repeating-linear-gradient(0deg,#665332 0 3px,#f8d994 4px 8px,#aa874c 9px 14px);
}
.finish-medal:before { right: 100%; clip-path: polygon(0 0,100% 10%,100% 100%,32% 68%); }
.finish-medal:after { left: 100%; clip-path: polygon(0 10%,100% 0,68% 68%,0 100%); }
.finish-medal i { font: normal 16px/1 sans-serif; color: #ffd36d; }
.finish-podium .resultscore { display: flex; justify-content: center; gap: 10px; margin: 19px 0; }
.finish-podium .resultscore span { display: inline-block; font-size: 62px; color: #617281; }
.finish-podium .resultscore .earned {
  color: #ffca55;
  text-shadow: 0 2px #fff1b5, 0 5px #9d5713, 0 8px 10px #0008;
  filter: drop-shadow(0 0 12px #ffad4260);
  animation: podium-star .65s cubic-bezier(.2,.9,.25,1.3) both;
  animation-delay: calc(.45s + var(--star) * .25s);
}
.finish-podium .resultstats { border-color: #c5a56560; background: linear-gradient(90deg,transparent,#e5b5580d,transparent); }
.finish-podium [data-result-coins] { color: #ffe295; font-variant-numeric: tabular-nums; }
.finish-still,.finish-still .resultscore .earned { animation: none !important; }
@keyframes podium-arrive { from { opacity: 0; transform: translateY(28px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes podium-star { from { opacity: 0; transform: translateY(-28px) rotate(-18deg) scale(1.7); } to { opacity: 1; transform: none; } }
@media(max-height:600px) {
  .finish-overlay { padding-top: 50px; }
  .modal.finish-podium { padding-top: 30px; }
  .finish-medal { transform: scale(.65); top:-66px; }
  .finish-podium .resultscore { margin: 5px 0; }
  .finish-podium .resultscore span { font-size: 40px; }
  .finish-podium h2 { font-size: 28px; }
}
@media(prefers-reduced-motion:reduce) {
  .modal.finish-podium,.finish-podium .resultscore .earned { animation: none; }
}
.racereminder.pad-active {
  color: #e8fcff;
  border: 1px solid #8eeaff;
  border-radius: 8px;
  padding: 9px 18px 12px;
  background: linear-gradient(#59d9ff, #59d9ff) left bottom / var(--pad-remaining) 3px no-repeat, linear-gradient(135deg, #073c56ed, #061b31ed);
  box-shadow: 0 0 24px #25bfff70, inset 0 1px #ffffff50;
  text-shadow: 0 1px 3px #001423;
}
.racereminder {
  background: #0b2032bb;
  color: #dcecf0;
}
.loading {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 22px;
  background:
    linear-gradient(#071626d9, #071626eb),
    url("../public/art/garage.webp") center/cover;
}
.loading h1 {
  font: 800 32px var(--display);
  color: #ffe3a2;
}
.loading p {
  color: #a5bdca;
}
.loadingwheel {
  width: 90px;
  height: 90px;
  background: url("../public/art/prop-0.webp") center/contain no-repeat;
  animation: spin 2s linear infinite;
}
.articon {
  object-fit: contain;
}
@media (max-width: 1000px) {
  .main {
    padding: 0 22px 24px;
  }
  .rail {
    gap: 15px;
    padding: 9px 14px;
  }
  .rail nav {
    width: 85%;
    gap: 8px;
  }
  .rail .mark {
    display: none;
  }
  .nav {
    font-size: 16px;
  }
  .garagegrid {
    grid-template-columns: 1fr 1.1fr;
  }
  .upgrade {
    padding: 12px;
    flex-wrap: wrap;
  }
  .upgrade > div {
    flex: 1;
  }
  .upgrade .articon {
    width: 44px;
    height: 44px;
  }
  .upgrade .outline {
    min-width: 110px;
  }
  .showcase canvas {
    aspect-ratio: 1.15;
  }
  .showcase .label h2 {
    font-size: 30px;
  }
  .equipment {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .shell {
    padding-bottom: 82px;
  }
  .main {
    padding: 0 14px 20px;
  }
  .topbar {
    height: 74px;
  }
  .wordmark {
    font-size: 25px;
  }
  .chip {
    min-width: 75px;
    min-height: 39px;
    font-size: 16px;
    padding: 0 3px;
    border-width: 9px;
  }
  .chip.stars {
    min-width: 73px;
  }
  .chip .articon {
    width: 24px;
    height: 24px;
  }
  .wallet {
    gap: 5px;
  }
  .avatar {
    display: none;
  }
  .wallet .mobile-settings {
    padding: 0 3px;
    min-width: 30px;
    color: #d3e7e9;
  }
  .rail {
    height: 74px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    gap: 0;
  }
  .rail nav {
    width: 100%;
    gap: 4px;
  }
  .rail .bottom {
    display: none;
  }
  .nav {
    height: 55px;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    border-width: 8px;
    border-image-width: 8px;
    padding: 3px 0;
    border-radius: 6px;
  }
  .nav svg {
    width: 18px;
    height: 18px;
  }
  .pagehead h1 {
    font-size: 32px;
  }
  .pagehead {
    margin: 22px 0 17px;
  }
  .homehero {
    min-height: 460px;
  }
  .homehero canvas {
    width: 145%;
    height: 65%;
    top: auto;
    bottom: 0;
    right: -20%;
  }
  .homehero:after {
    background: linear-gradient(#071420ed 0%, #071420b0 32%, transparent 70%);
  }
  .herocopy {
    padding: 24px 22px;
  }
  .herocopy h2 {
    font-size: 54px;
    margin: 17px 0 12px;
  }
  .herocopy p {
    max-width: 245px;
    font-size: 12px;
  }
  .herocopy .primary {
    min-width: 180px;
    margin-top: 16px;
  }
  .herometa {
    display: none;
  }
  .heroindex {
    bottom: 15px;
    right: 13px;
    padding: 7px 10px;
  }
  .stripe {
    display: none;
  }
  .worldgrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .worldcard canvas {
    aspect-ratio: 1.8;
  }
  .sectiontitle h2 {
    font-size: 23px;
  }
  .sectiontitle .textbutton {
    max-width: 132px;
    font-size: 10px;
  }
  .homebottom {
    grid-template-columns: 1fr;
  }
  .vehiclepanel {
    padding: 14px;
    gap: 12px;
    grid-template-columns: 125px 1fr;
  }
  .vehiclepanel canvas {
    width: 125px;
    height: 90px;
  }
  .vehiclepanel .mini-stats {
    gap: 12px;
    flex-wrap: wrap;
  }
  .garagegrid {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  .showcase canvas {
    aspect-ratio: 1.5;
  }
  .showcase .label {
    padding: 12px;
    column-gap: 8px;
  }
  .showcase .label .engine-preview {
    min-width: 0;
    padding: 10px;
    font-size: 11px;
  }
  .showcase .label h2 {
    font-size: 30px;
    margin-top: 3px;
  }
  .customize {
    padding: 12px 15px;
  }
  .upgrades {
    gap: 10px;
  }
  .upgrade {
    flex-wrap: nowrap;
    padding: 12px;
  }
  .upgrade h3 {
    font-size: 23px;
  }
  .upgrade p {
    font-size: 11px;
  }
  .upgrade .outline {
    min-width: 100px;
    max-width: 120px;
    font-size: 15px;
  }
  .cargrid,
  .partgrid,
  .crategrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .carcard {
    padding: 10px;
  }
  .carcard h3 {
    font-size: 22px;
  }
  .carcard p {
    font-size: 9px;
    gap: 6px;
  }
  .carcard .outline {
    font-size: 13px;
    padding: 0 3px;
  }
  .part {
    padding: 12px;
  }
  .part .particon {
    height: 100px;
  }
  .particon .articon {
    height: 95px;
    width: 95px;
  }
  .part .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .part .actions .outline {
    font-size: 12px;
  }
  .worktop {
    grid-template-columns: 1fr;
  }
  .workcard {
    padding: 21px;
  }
  .equipment .equip {
    padding: 12px;
  }
  .equip .articon {
    float: none;
    width: 55px;
    height: 55px;
    margin: 0 0 9px;
  }
  .equip p {
    font-size: 11px;
  }
  .modal {
    padding: 23px 20px;
    border-width: 5px;
  }
  .modal h2 {
    font-size: 33px;
  }
  .modal .actions .primary {
    font-size: 19px;
  }
  .modal .actions .outline {
    font-size: 16px;
  }
  .mapbanner {
    min-height: 128px;
    padding: 20px;
  }
  .levelgrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .level .info {
    padding: 12px;
    flex-direction: column;
    gap: 7px;
  }
  .level h3 {
    font-size: 21px;
  }
  .level small {
    font-size: 9px;
  }
  .crate {
    padding: 15px 10px;
  }
  .crate h3 {
    font-size: 22px;
  }
  .crate .outline {
    font-size: 14px;
  }
  .spinpanel {
    padding: 24px 18px;
  }
  .footer {
    padding-bottom: 8px;
  }
  .hudpause {
    width: 44px;
    height: 44px;
  }
  .rankbox {
    border-width: 3px;
  }
  .meters {
    border-width: 2px;
  }
  .loading .wordmark {
    font-size: 48px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .hudtop {
    padding-top: 10px;
  }
  .rankbox {
    padding: 8px 12px;
  }
  .rankbox strong {
    font-size: 33px;
  }
  .hudpause {
    width: 42px;
    height: 42px;
  }
  .pedal {
    height: 55px;
    width: 58px;
  }
  .pedal.gas {
    height: 65px;
    width: 70px;
  }
  .hudbottom {
    bottom: 12px;
  }
  .meters {
    padding: 8px 10px;
  }
  .racereminder {
    bottom: 85px;
  }
  .modal {
    max-height: 94dvh;
    padding: 18px 24px;
  }
  .modal h2 {
    font-size: 28px;
  }
  .modal .controlslist {
    gap: 6px;
    margin: 12px 0;
  }
  .modal .actions {
    margin-top: 15px;
  }
}
.upgrade .outline {
  border: 12px solid transparent;
  border-image: url("../public/art/frame-2.webp") 48 65 fill / 12px / 0 stretch;
}
.pedal.gas {
  border: 12px solid transparent;
  border-image: url("../public/art/frame-2.webp") 48 65 fill / 12px / 0 stretch;
}
@media (prefers-reduced-motion: reduce) {
  .loadingwheel {
    animation: none;
  }
}
.meters {
  position: fixed;
  top: max(122px, calc(env(safe-area-inset-top) + 110px));
  left: max(22px, env(safe-area-inset-left));
  bottom: auto;
  width: 180px;
}
@media (max-width: 760px) {
  .meters {
    top: 104px;
    left: max(12px, env(safe-area-inset-left));
    width: 156px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .meters {
    top: 99px;
    left: max(20px, env(safe-area-inset-left));
    width: 174px;
    padding: 8px 10px;
  }
  .racereminder {
    bottom: 92px;
  }
}
/* Unity race surface and expanded collections */
.unity-active #app {
  position: relative;
  z-index: 2;
}
.unity-active .raceview {
  background: transparent;
}
.unity-active #racecanvas {
  visibility: hidden;
}
.unity-countdown {
  position: fixed;
  left: 45%;
  top: 30%;
  font:
    900 100px "Barlow Condensed",
    sans-serif;
  color: #ffcd42;
  text-shadow:
    0 5px 0 #172331,
    0 8px 25px #000;
}
.online-launch {
  margin-top: 12px;
  display: block;
  background: #0b2639d9;
  color: #a9e7ff;
  border-color: #3e8caa;
}
.chaptertabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.chaptertabs .selected {
  background: #b9f044;
  color: #15221b;
  border-color: #b9f044;
}
.wheelshop {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.wheelcard {
  background: linear-gradient(145deg, #1b2b39, #0b1621);
  border: 1px solid #395267;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
}
.wheelcard img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}
.wheelcard h3 {
  margin: 5px 0;
}
.wheelcard p {
  font-size: 12px;
  color: #afc1ce;
  min-height: 30px;
}
.wheelcard button {
  width: 100%;
  font-size: 12px;
}
.shopgrid {
  margin-bottom: 36px;
}
.shopgrid .articon {
  width: 68px;
  height: 68px;
  display: block;
  margin-bottom: 12px;
}
.field {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 18px 0;
  color: #bcd1db;
}
.field input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 13px;
  border-radius: 6px;
  border: 1px solid #526778;
  background: #081725;
  color: #fff;
  font:
    600 18px Barlow,
    sans-serif;
}
.lobby-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 20px 0;
}
.lobby-slot {
  border: 1px dashed #385065;
  border-radius: 8px;
  padding: 6px;
  opacity: 0.6;
  text-align: center;
}
.lobby-slot.ready {
  opacity: 1;
  border-style: solid;
  border-color: #96ce52;
}
.lobby-slot img {
  width: 100%;
  height: 65px;
  object-fit: contain;
}
.lobby-slot b {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.lobby-slot small {
  font-size: 9px;
  color: #9bb5c8;
}
.customrow {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .lobby-slots {
    grid-template-columns: repeat(3, 1fr);
  }
  .chaptertabs button {
    font-size: 11px;
    padding: 9px;
  }
  .wheelshop {
    grid-template-columns: repeat(2, 1fr);
  }
  .online-launch {
    font-size: 12px;
  }
  .unity-countdown {
    font-size: 70px;
  }
}

.audio-slider {
  display: grid;
  grid-template-columns: 145px minmax(90px, 1fr) 42px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  color: #d8e7e2;
}
.audio-slider input {
  width: 100%;
  accent-color: #ffc44b;
  cursor: pointer;
  min-height: 32px;
}
.audio-slider output {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #ffc44b;
}
.now-playing {
  border-left: 3px solid #ffc44b;
  padding-left: 12px;
}
.smallcopy a {
  color: #a9ddcc;
  text-underline-offset: 3px;
}
.engine-preview {
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 13px;
}
@media (max-width: 500px) {
  .audio-slider {
    grid-template-columns: 110px minmax(70px, 1fr) 38px;
    gap: 8px;
    font-size: 14px;
  }
}

/* Keep driving hints in the sky, away from wheels and landing surfaces. */
.racereminder {
  top: max(88px, calc(env(safe-area-inset-top) + 78px));
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  max-width: 52vw;
  text-align: center;
  pointer-events: none;
}
@media (max-width: 760px) and (orientation: portrait) {
  .racereminder {
    top: 225px;
    max-width: 90vw;
    width: max-content;
    font-size: 10px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .racereminder {
    top: max(69px, calc(env(safe-area-inset-top) + 61px));
    bottom: auto;
    max-width: 50vw;
    font-size: 9px;
    padding: 5px 8px;
  }
}

.ad-reward {
  padding: 22px;
  margin: 18px 0;
  background: linear-gradient(120deg, #132c3d, #172425);
  border-color: #b88d3c;
  text-align: left;
}
.ad-reward > div {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ad-reward .articon {
  width: 60px;
  height: 60px;
}
.ad-reward h3 {
  margin: 4px 0;
  color: #ffe3a2;
  font: 800 24px var(--display);
}
.ad-reward p {
  margin: 8px 0;
}
.ad-reward > button {
  margin-top: 12px;
  width: 100%;
}
.ad-reward #ad-status {
  font-size: 13px;
  color: #b2eaff;
  min-height: 18px;
}
.ad-busy #app button,
.ad-busy .overlay button {
  pointer-events: none;
  opacity: 0.6;
}
.ad-busy {
  cursor: progress;
}
@media (max-height: 500px) {
  .ad-reward {
    padding: 12px;
  }
  .ad-reward h3 {
    font-size: 20px;
  }
  .ad-reward .articon {
    width: 42px;
    height: 42px;
  }
}

.level .track-preview {
  width: 100%;
  aspect-ratio: 480/245;
  object-fit: cover;
  display: block;
}
.level .track-meta {
  font-size: 11px;
  color: #afc4c9;
  margin: 6px 0;
}
.level h3 {
  font-size: 21px;
  line-height: 1.15;
}
.racelevel {
  max-width: 240px;
  white-space: normal;
  line-height: 1.15;
}
/* Three destinations; all utilities live in the header. */
.rail nav {
  width: min(760px, 100%);
  gap: 18px;
}
.rail {
  gap: 0;
}
.topbar {
  height: auto;
  min-height: 92px;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 0;
}
.top-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.round-tool {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 4px ridge #c3d1d9;
  border-radius: 50%;
  color: #342010;
  background: radial-gradient(
    circle at 32% 20%,
    #fffbc5,
    #ffd64f 38%,
    #bd6512 83%
  );
  box-shadow:
    inset 0 0 0 2px #754014,
    0 3px 8px #0009;
}
.round-tool svg {
  width: 24px;
  height: 24px;
}
.round-tool:hover {
  filter: brightness(1.18);
}
.mute-slash {
  position: absolute;
  width: 30px;
  height: 3px;
  background: #721907;
  transform: rotate(-45deg);
}
.prize-launch {
  width: 68px;
  position: relative;
  background: none;
  border: 0;
  color: #c5ff87;
  padding: 0 0 13px;
  flex: none;
}
.prize-launch img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px #000);
}
.prize-launch span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font: 900 13px var(--display);
  text-shadow: 0 2px #000;
  letter-spacing: 1px;
}
.prize-launch.ready img {
  animation: prize-idle 15s linear infinite;
}
@keyframes prize-idle {
  to {
    transform: rotate(360deg);
  }
}
.worldhub {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 2px ridge #7891a2;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(130deg, #233d50, #091723);
  margin: 0 0 28px;
}
.worldhub > div {
  padding: 32px;
}
.worldhub h2 {
  font: 900 clamp(28px, 3vw, 44px) var(--display);
  color: #ffe8aa;
  margin: 8px 0;
}
.worldhub p {
  color: #bcd0dc;
  margin: 12px 0 22px;
}
.worldhub > img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}
.worldhub .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.rewards-modal {
  max-width: 1000px;
  position: relative;
  padding: 30px;
}
.rewards-modal > .pagehead {
  display: none;
}
.reward-close {
  position: sticky;
  float: right;
  top: 0;
  z-index: 2;
  font: 900 30px var(--display);
  background: radial-gradient(at 30% 20%, #ffb279, #bc2e21);
  color: white;
}
.rewards-modal > h2 {
  padding-right: 56px;
  margin-bottom: 22px;
}
.rewards-modal .spinpanel {
  background: radial-gradient(at 25% 40%, #1d3a4c, #081824);
  padding: 22px;
  gap: 32px;
}
.wheel-stage {
  position: relative;
  flex: 0 0 52%;
  max-width: 450px;
  aspect-ratio: 1;
}
.prize-disc {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 4s cubic-bezier(0.12, 0.68, 0.12, 1);
}
.prize-disc > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px #0009);
}
.prize-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 45px;
  line-height: 1;
  color: #ffdf74;
  text-shadow:
    0 3px #070e14,
    2px 0 #e2f2f5,
    -2px 0 #e2f2f5;
  filter: drop-shadow(0 2px 3px #000);
}
.prize-labels {
  position: absolute;
  inset: 0;
}
.prize-labels > span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16%;
  height: 30%;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(calc(var(--sector) * 45deg))
    translateY(-17%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  color: #fff1b4;
  font: 900 clamp(18px, 2.5vw, 27px) var(--display);
  text-shadow: 0 2px 2px #000;
}
.prize-labels .articon {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.spin-copy {
  flex: 1;
}
.spin-copy .primary {
  width: 100%;
  font-size: 22px;
  min-height: 58px;
}
.spin-copy h2 {
  font-size: 34px;
}
.spin-copy #spin-result {
  min-height: 48px;
  color: #bdff8b;
  font-weight: 700;
}
.rewards-modal .crategrid {
  grid-template-columns: repeat(3, 1fr);
}
.shopgrid,
.partgrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.shopgrid .part {
  text-align: center;
  padding: 20px;
}
.shopgrid .particon,
.part .particon {
  height: 174px;
  display: grid;
  place-items: center;
}
.shopgrid .particon .articon,
.part .particon .articon {
  width: 164px;
  height: 164px;
}
.shopgrid h3 {
  font-size: 27px;
}
.shopgrid .part > button {
  width: 100%;
  min-height: 48px;
  font-size: 17px;
}
.wheelshop {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.wheelcard img {
  width: 100%;
  height: 190px;
  filter: drop-shadow(0 9px 7px #0009);
}
.wheelcard h3 {
  font-size: 25px;
}
.wheelcard p,
.part p {
  font-size: 14px;
}
.wheelcard button {
  font-size: 16px;
  min-height: 48px;
}
.equipment .articon {
  width: 92px;
  height: 92px;
}
.part .actions .outline {
  min-height: 44px;
  font-size: 15px;
}
@media (max-width: 900px) {
  .wheelshop {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shopgrid,
  .partgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .top-tools {
    gap: 8px;
  }
  .worldhub > div {
    padding: 24px;
  }
  .worldhub .online-launch {
    font-size: 15px;
  }
}
@media (max-width: 600px) {
  .main {
    padding-left: 14px;
    padding-right: 14px;
  }
  .topbar {
    gap: 8px;
    min-height: 134px;
    justify-content: center;
    padding: 10px 0;
  }
  .wallet {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }
  .top-tools {
    width: 100%;
    justify-content: flex-end;
    gap: 14px;
  }
  .round-tool {
    width: 44px;
    height: 44px;
  }
  .prize-launch {
    width: 54px;
    padding-bottom: 10px;
  }
  .prize-launch img {
    width: 48px;
    height: 48px;
  }
  .prize-launch span {
    font-size: 11px;
  }
  .rail {
    height: 74px;
    padding: 8px 10px;
  }
  .rail nav {
    width: 100%;
    gap: 8px;
  }
  .nav {
    font-size: 17px;
    height: 52px;
  }
  .worldhub {
    grid-template-columns: 1fr;
  }
  .worldhub > img {
    grid-row: 1;
    min-height: 0;
    height: 155px;
  }
  .worldhub > div {
    padding: 20px;
  }
  .worldhub .actions {
    gap: 8px;
  }
  .worldhub .primary,
  .worldhub .outline {
    width: 100%;
    font-size: 19px;
  }
  .shopgrid,
  .partgrid,
  .wheelshop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .shopgrid .part,
  .wheelcard {
    padding: 12px 8px;
  }
  .shopgrid .particon,
  .part .particon {
    height: 142px;
  }
  .shopgrid .particon .articon,
  .part .particon .articon {
    width: 134px;
    height: 134px;
  }
  .wheelcard img {
    height: 150px;
  }
  .wheelcard h3,
  .shopgrid h3 {
    font-size: 23px;
  }
  .wheelcard p,
  .part p {
    font-size: 12px;
  }
  .wheelcard button,
  .shopgrid .part > button {
    font-size: 15px;
  }
  .rewards-modal {
    padding: 18px 10px;
    max-height: 94dvh;
  }
  .rewards-modal > h2 {
    font-size: 28px;
  }
  .rewards-modal .spinpanel {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }
  .wheel-stage {
    flex: auto;
    width: 100%;
    max-width: 350px;
  }
  .spin-copy {
    width: 100%;
    text-align: center;
  }
  .spin-copy h2 {
    font-size: 28px;
  }
  .prize-labels > span {
    font-size: 23px;
  }
  .prize-labels .articon {
    width: 29px;
    height: 29px;
  }
  .rewards-modal .crategrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .equipment .articon {
    width: 86px;
    height: 86px;
  }
  .footer {
    justify-content: center;
  }
  .shell {
    padding-bottom: 84px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .prize-launch.ready img {
    animation: none;
  }
  .prize-disc {
    transition-duration: 0.1s;
  }
}

/* The workshop displays the installed wheels on the actual selected body. */
.wheel-workbench {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  overflow: hidden;
  padding: 0;
  margin: 0 0 24px;
}
.wheel-workbench canvas {
  width: 100%;
  display: block;
  aspect-ratio: 900/480;
}
.wheel-workbench > div {
  padding: 24px;
  align-self: center;
}
.wheel-workbench h2 {
  font-size: 36px;
  margin: 10px 0;
}
.wheelcard.equipped {
  border: 2px solid #f3c65a;
  box-shadow: inset 0 0 24px #e8b14a18;
}
.wheelcard .wheel-art-button {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 0;
}
.wheel-art-button:hover img {
  transform: scale(1.05);
}
.wheel-art-button img {
  transition: transform 0.18s;
}
.wheel-detail {
  display: block;
  width: min(320px, 80%);
  margin: 20px auto;
}
.wheelcard .wheel-art-button:focus-visible {
  outline: 3px solid #ffd969;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .wheel-workbench {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .wheel-workbench > div {
    padding: 16px;
  }
  .wheel-workbench h2 {
    font-size: 30px;
  }
  .wheel-workbench canvas {
    max-height: 210px;
    object-fit: cover;
  }
}
.settingsrow select {
  max-width: 58%;
  padding: 12px 15px;
  border: 1px solid #66808e;
  border-radius: 10px;
  background: #102432;
  color: #fff;
  font:
    600 17px Barlow,
    sans-serif;
}
.reward-access {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid #d1a25b;
  border-radius: 12px;
  background: linear-gradient(145deg, #4b3825, #19222b);
  color: #ffdf91;
  font:
    800 13px Barlow,
    sans-serif;
  letter-spacing: 1px;
}
.reward-access svg {
  width: 24px;
  height: 24px;
}
.crate-pages {
  justify-content: center;
  align-items: center;
}
.celebration.modal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(620px, 95vw);
  max-width: 620px;
  text-align: center;
  padding: 42px 32px;
  background: radial-gradient(ellipse at 50% 38%, #34586b, #0c1925 68%);
  border: 2px solid #e9c782;
  box-shadow:
    0 0 0 5px #17232d,
    0 0 0 7px #71858a,
    0 28px 100px #000c;
  animation: reward-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.celebration-content {
  position: relative;
  z-index: 2;
}
.celebration h2 {
  font-size: clamp(30px, 5vw, 48px);
  margin: 10px 0;
}
.reward-crown {
  font-size: 36px;
  color: #ffdc80;
  letter-spacing: 14px;
  text-shadow: 0 0 26px #ffa826;
}
.reward-treasure {
  height: 165px;
  margin: 8px auto;
  filter: drop-shadow(0 12px 22px #0008);
  animation: reward-bounce 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.reward-treasure .articon {
  width: 165px;
  height: 165px;
  object-fit: contain;
}
.reward-amount {
  display: block;
  color: #ffdb79;
  font:
    900 clamp(60px, 10vw, 92px)/1 Barlow,
    sans-serif;
  text-shadow:
    0 5px 0 #68410c,
    0 0 35px #ffb62b66;
}
.reward-currency {
  font-size: 18px !important;
  letter-spacing: 5px;
  margin: 10px 0 20px !important;
  color: #fff2c9 !important;
  font-weight: 800;
}
.reward-scrap {
  font-weight: 800;
  color: #aaddeb !important;
}
.celebration .primary {
  width: min(100%, 330px);
  min-height: 58px;
  margin-top: 12px;
  font-size: 20px;
}
.reward-rays {
  position: absolute;
  z-index: 0;
  inset: -100%;
  background: repeating-conic-gradient(
    from 0deg,
    #ffdf7b0f 0deg 12deg,
    transparent 12deg 30deg
  );
  animation: reward-rays 45s linear infinite;
}
.reward-sparks {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.reward-sparks i {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  font-style: normal;
  color: #ffdd81;
  font-size: calc(var(--size) * 1px);
  animation: reward-glint 1.7s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.13s);
}
@keyframes reward-enter {
  from {
    transform: scale(0.75);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes reward-bounce {
  from {
    transform: translateY(60px) scale(0.2);
  }
  to {
    transform: translateY(0) scale(1);
  }
}
@keyframes reward-rays {
  to {
    transform: rotate(360deg);
  }
}
@keyframes reward-glint {
  50% {
    opacity: 0.15;
    transform: scale(0.45) rotate(50deg);
  }
}
@media (max-width: 600px) {
  .reward-access {
    padding: 8px;
  }
  .reward-access span {
    display: none;
  }
  .top-tools {
    gap: 7px !important;
  }
  .celebration.modal {
    padding: 25px 18px;
  }
  .reward-treasure,
  .reward-treasure .articon {
    width: 130px;
    height: 130px;
  }
  .celebration .eyebrow {
    font-size: 10px;
  }
}
@media (max-height: 550px) {
  .celebration.modal {
    padding: 15px 24px;
  }
  .reward-treasure,
  .reward-treasure .articon {
    width: 85px;
    height: 85px;
  }
  .reward-crown {
    font-size: 22px;
  }
  .celebration h2 {
    font-size: 30px;
  }
  .reward-amount {
    font-size: 55px;
  }
  .reward-currency {
    margin: 5px 0 !important;
  }
  .celebration .primary {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .celebration,
  .reward-rays,
  .reward-sparks i,
  .reward-treasure {
    animation: none !important;
  }
}

.reward-access {
  border: 10px solid transparent;
  border-image: url("../public/art/frame-0.webp") 48 65 fill / 10px / 0 stretch;
  background: none;
  box-shadow: 0 3px 10px #0007;
  text-shadow: 1px 2px #03111c;
}
/* Portrait HUD has its own full-width progress row: units never collide with Start. */
@media (max-width: 760px) and (orientation: portrait) {
  .hudtop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas: "rank pause" "progress progress";
    gap: 12px;
    align-items: start;
  }
  .rankbox {
    grid-area: rank;
    min-width: 0;
    min-height: 66px;
  }
  .rankbox > div:last-child {
    min-width: 0;
  }
  .racelevel {
    max-width: none;
    font-size: 10px;
  }
  .hudpause {
    grid-area: pause;
  }
  .progresshud {
    grid-area: progress;
    width: 100%;
    max-width: none;
    padding: 0;
  }
  .progresshud label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 10px;
    white-space: nowrap;
  }
  .progresshud .bar {
    margin-top: 6px;
  }
  .meters {
    top: max(154px, calc(env(safe-area-inset-top) + 144px));
  }
  .racereminder {
    top: max(255px, calc(env(safe-area-inset-top) + 245px));
  }
}

/* Celebration must fit inside the overlay padding on narrow phones. */
.overlay .celebration.modal{width:min(620px,100%);min-width:0;max-height:calc(100dvh - 40px);overflow-y:auto}.equipment-celebration .acquired-art{max-width:100%}.equipment-celebration .celebration-content{min-width:0}@media(max-height:550px){.equipment-celebration .acquired-art{height:110px}.equipment-celebration h3{margin:5px}}
