/* Hill Climb — sunlit arcade UI layered on the shared tokens. */

:root {
  --hc-sun: #ffb020;
  --hc-grass: #3ddc84;
  --hc-sky: #7fd2ff;
  --hc-hot: #ff5d3a;
  --hc-ink: rgba(9, 11, 17, 0.72);
}

/* No text selection, magnifier or callout menu anywhere in the game (iOS
   starts one on quick repeated taps and the page stalls while it does). */
body.game-page {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.code-input {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 80% at 50% 46%, rgba(0, 0, 0, 0) 45%, rgba(4, 6, 12, 0.6) 100%);
}

/* ---- HUD ---- */
.hud {
  z-index: 12;
}

.hud[hidden] {
  display: none;
}

.hud-back,
.hud-scores {
  background: var(--hc-ink);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.hud-scores {
  border-radius: 12px;
}

.hud-score .value {
  font-size: 19px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.hud-score .value small {
  font-size: 10px;
  color: var(--fg-1);
  margin-left: 1px;
}

.hud-score .label {
  font-size: 9px;
  letter-spacing: 0.12em;
}

.hud-score--coin .value {
  color: #ffd166;
}

.icon-btn {
  position: fixed;
  z-index: 13;
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  top: calc(env(safe-area-inset-top, 0px) + 76px);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--hc-ink);
  color: var(--fg-0);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.icon-btn.muted {
  color: #6a7080;
  text-decoration: line-through;
}

.icon-btn--pause {
  top: calc(env(safe-area-inset-top, 0px) + 124px);
  letter-spacing: -2px;
}

.icon-btn--pause[hidden] {
  display: none;
}

/* ---- gauges ---- */
.gauges {
  position: fixed;
  z-index: 12;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  padding: 0 14px 12px;
  pointer-events: none;
}

.gauges[hidden] {
  display: none;
}

.gauge {
  flex: 1 1 0;
  max-width: 160px;
}

.gauge-label {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--fg-1);
  margin-bottom: 4px;
}

.gauge-track {
  height: 9px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.gauge-track i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #3ddc84, #a8f5c8);
  transition: width 0.12s linear, background 0.25s ease;
}

.gauge-track i.warn {
  background: linear-gradient(90deg, var(--hc-sun), #ffd98a);
}

.gauge-track i.crit {
  background: linear-gradient(90deg, #ff3b5c, #ff8aa8);
  animation: fuel-crit 0.55s steps(2, end) infinite;
}

@keyframes fuel-crit {
  50% { opacity: 0.4; }
}

.speedo {
  margin-left: auto;
  text-align: right;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.speedo span {
  font-size: 32px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.03em;
}

.speedo small {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--fg-1);
  margin-left: 3px;
}

/* ---- airtime banner ---- */
.air-banner {
  position: fixed;
  z-index: 12;
  left: 50%;
  top: 20%;
  transform: translate(-50%, 0) scale(0.75);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.air-banner.on {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.air-time {
  display: block;
  font-size: 38px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.04em;
  text-shadow: 0 0 22px rgba(94, 230, 200, 0.5);
  font-variant-numeric: tabular-nums;
}

.air-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: var(--accent);
}

/* ---- drive pads ---- */
.controls {
  position: fixed;
  z-index: 12;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 46px);
  pointer-events: none;
}

.controls[hidden] {
  display: none;
}

.pad {
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  width: 104px;
  height: 72px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--hc-ink);
  backdrop-filter: blur(8px);
  color: var(--fg-0);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  cursor: pointer;
  touch-action: none;
  transition: transform 0.07s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.pad--gas {
  border-color: rgba(61, 220, 132, 0.4);
  color: #c8ffe0;
}

.pad--brake {
  border-color: rgba(255, 93, 58, 0.4);
  color: #ffd2c6;
}

.pad--gas.on {
  transform: scale(0.95);
  background: rgba(61, 220, 132, 0.28);
  box-shadow: 0 0 26px rgba(61, 220, 132, 0.35);
}

.pad--brake.on {
  transform: scale(0.95);
  background: rgba(255, 93, 58, 0.28);
  box-shadow: 0 0 26px rgba(255, 93, 58, 0.35);
}

/* ---- overlays ---- */
.overlay {
  z-index: 20;
  overflow-y: auto;
  padding: var(--space-4);
  /* Centred by the panel's auto margin instead, so a panel taller than the
     screen scrolls from its top rather than being cut off above. */
  justify-content: flex-start;
}

.panel {
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(22, 24, 34, 0.92), rgba(10, 12, 17, 0.95));
  backdrop-filter: blur(6px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  margin: auto;
}

.panel--wide {
  width: min(520px, 100%);
}

.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hc-grass);
  margin: 0;
}

.eyebrow--warn {
  color: var(--hc-hot);
}

.title {
  font-size: clamp(30px, 10vw, 50px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 30%, #ffe3a8 60%, var(--hc-sun) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 176, 32, 0.45));
  /* Italic glyphs overhang their box; without this the clip eats the last letter. */
  padding: 0 0.12em;
}

.title span {
  display: block;
  background: linear-gradient(180deg, #fff 30%, #bff3d4 60%, var(--hc-grass) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(61, 220, 132, 0.45));
}

.title--over {
  font-size: clamp(30px, 10vw, 44px);
}

.tagline {
  font-size: 13.5px;
  text-align: center;
  max-width: 34ch;
}

/* ---- wallet ---- */
.wallet {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.3);
}

.wallet b {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: #ffd166;
}

.wallet-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-1);
}

/* ---- stage select ---- */
.stage-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--fg-0);
  font-family: var(--font-family);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(150deg, color-mix(in srgb, var(--st-a) 26%, #10131b), #10131b 78%);
  transition: transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.stage-card.on {
  border-color: var(--st-glow);
  box-shadow: 0 0 0 1px var(--st-glow), 0 10px 30px rgba(0, 0, 0, 0.45);
}

.stage-card:active {
  transform: scale(0.98);
}

.stage-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.st-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.st-blurb {
  font-size: 11.5px;
  color: var(--fg-1);
  line-height: 1.3;
}

.st-best {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--st-glow);
}

/* ---- garage ---- */
.vehicles {
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.vehicles::-webkit-scrollbar {
  display: none;
}

.vehicle {
  flex: 0 0 auto;
  width: 96px;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 10px 6px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, color-mix(in srgb, var(--v-a) 28%, transparent), color-mix(in srgb, var(--v-b) 22%, transparent));
  color: var(--fg-0);
  font-family: var(--font-family);
  cursor: pointer;
}

.vehicle.on {
  border-color: var(--v-a);
  box-shadow: 0 0 0 1px var(--v-a), 0 6px 18px -8px var(--v-a);
}

.vehicle.locked {
  filter: saturate(0.35);
}

.vehicle.locked.on {
  filter: none;
}

.v-icon {
  font-size: 26px;
  line-height: 1.1;
}

.v-name {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.v-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffd166;
}

.vehicle.driving .v-tag {
  color: var(--hc-grass);
}

.vehicle-detail {
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid color-mix(in srgb, var(--v-a) 40%, transparent);
  text-align: left;
}

.vd-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.vd-icon {
  font-size: 34px;
  line-height: 1;
}

.vd-head b {
  display: block;
  font-size: 15px;
}

.vd-blurb {
  font-size: 11px;
  color: var(--fg-1);
  line-height: 1.3;
}

.vd-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
}

.vd-stat {
  display: grid;
  gap: 3px;
}

.vd-stat i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-1);
}

.vd-stat em {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.vd-stat s {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--v-a), #ffffff);
}

.vd-action {
  width: 100%;
}

.parts-title {
  margin: 4px 0 0;
  width: 100%;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-1);
}

.parts.locked {
  opacity: 0.45;
}

.parts {
  width: 100%;
  display: grid;
  gap: 8px;
}

.part {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.part.maxed {
  border-color: rgba(61, 220, 132, 0.35);
}

.part-icon {
  font-size: 22px;
  line-height: 1;
}

.part-body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  display: grid;
  gap: 3px;
}

.part-body b {
  font-size: 14px;
}

.part-blurb {
  font-size: 11px;
  color: var(--fg-1);
  line-height: 1.25;
}

.pips {
  display: flex;
  gap: 3px;
  margin-top: 2px;
}

.pips i {
  width: 16px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
}

.pips i.on {
  background: linear-gradient(90deg, var(--hc-grass), #a8f5c8);
}

.part-value {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-1);
}

.buy {
  flex: 0 0 auto;
  min-height: 42px;
  min-width: 74px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg-1);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.buy.afford {
  background: rgba(255, 209, 102, 0.16);
  border-color: rgba(255, 209, 102, 0.45);
  color: #ffd166;
}

.buy:disabled {
  cursor: default;
  color: var(--hc-grass);
}

/* ---- results ---- */
.controls-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 6px;
}

.controls-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.controls-list b {
  flex: 0 0 78px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hc-sun);
}

.controls-list span {
  font-size: 12.5px;
  color: var(--fg-1);
}

.score-hero {
  font-size: clamp(44px, 15vw, 64px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 176, 32, 0.5);
}

.score-hero small {
  font-size: 0.34em;
  font-style: normal;
  color: var(--fg-1);
  margin-left: 2px;
}

.result-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.result-grid div {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.result-grid b {
  display: block;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.result-grid span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-1);
}

.verdict {
  font-size: 13px;
  text-align: center;
  color: var(--hc-grass);
}

.actions {
  flex-wrap: wrap;
  justify-content: center;
}

.toast {
  top: 32%;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .gauge-track i.crit {
    animation: none;
  }
}

/* ---- level progress ---- */
.progress {
  position: fixed;
  z-index: 12;
  left: 50%;
  transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 66px);
  width: min(360px, calc(100% - 140px));
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.progress[hidden] {
  display: none;
}

.progress-track {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--hc-sun), #fff0b0);
}

.progress-track b {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #ff5d3a;
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(255, 93, 58, 0.7);
}

.progress-flag {
  font-size: 14px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.hud-score .value.over-par {
  color: #ff9a7a;
}

/* ---- mode tabs ---- */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.mode-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-1);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.mode-tab small {
  font-size: 10px;
  color: #ffd166;
  margin-left: 4px;
  letter-spacing: 0;
}

.mode-tab.on {
  background: linear-gradient(180deg, rgba(255, 176, 32, 0.22), rgba(255, 176, 32, 0.08));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.45);
}

.levels-view,
.endless-view {
  width: 100%;
  display: grid;
  gap: 10px;
}

.levels-view[hidden],
.endless-view[hidden] {
  display: none;
}

/* ---- world tabs ---- */
.world-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.world-tabs::-webkit-scrollbar {
  display: none;
}

.world-tab {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 7px;
  align-items: center;
  text-align: left;
  min-width: 118px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(150deg, color-mix(in srgb, var(--st-a) 45%, #10131b), color-mix(in srgb, var(--st-b) 18%, #10131b));
  color: var(--fg-0);
  font-family: var(--font-family);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.world-tab.on {
  border-color: var(--st-glow);
  box-shadow: 0 0 0 1px var(--st-glow), 0 6px 18px rgba(0, 0, 0, 0.4);
}

.world-tab.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.wt-num {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 13px;
  font-weight: 900;
  color: var(--st-glow);
}

.wt-name {
  font-size: 13px;
  font-weight: 800;
}

.wt-stars {
  font-size: 10px;
  font-weight: 800;
  color: #ffd166;
}

/* ---- level tiles ---- */
.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.level-tile {
  position: relative;
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 10px 6px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--fg-0);
  font-family: var(--font-family);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.level-tile:active {
  transform: scale(0.97);
}

.level-tile.done {
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.1), rgba(255, 255, 255, 0.03));
}

.level-tile.on {
  border-color: var(--st-glow);
  box-shadow: 0 0 0 1px var(--st-glow), 0 8px 22px rgba(0, 0, 0, 0.45);
}

.level-tile.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.lt-num {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1;
}

.lt-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.lt-stars {
  font-size: 15px;
  letter-spacing: 1px;
  color: #ffd166;
  text-shadow: 0 0 8px rgba(255, 209, 102, 0.4);
}

.lt-meta {
  font-size: 9.5px;
  color: var(--fg-1);
  letter-spacing: 0.04em;
}

/* ---- results: stars ---- */
.stars-row {
  display: flex;
  gap: 8px;
  font-size: 44px;
  line-height: 1;
}

.stars-row[hidden] {
  display: none;
}

.stars-row i {
  font-style: normal;
  color: rgba(255, 255, 255, 0.14);
}

.stars-row i.on {
  color: #ffd166;
  text-shadow: 0 0 22px rgba(255, 209, 102, 0.7);
  animation: star-pop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1) both;
  animation-delay: var(--d);
}

.stars-row i:nth-child(2) {
  transform: translateY(-8px);
  font-size: 1.15em;
}

@keyframes star-pop {
  from {
    transform: scale(0.2) rotate(-40deg);
    opacity: 0;
  }
}

.star-goals {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 5px;
}

.star-goals[hidden] {
  display: none;
}

.star-goals li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--fg-1);
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.star-goals li b {
  color: rgba(255, 255, 255, 0.3);
}

.star-goals li.ok {
  color: var(--fg-0);
}

.star-goals li.ok b {
  color: #ffd166;
}

@media (prefers-reduced-motion: reduce) {
  .stars-row i.on {
    animation: none;
  }
}

/* Short landscape phones: tighten the panels so results fit on one screen. */
@media (max-height: 500px) {
  .panel {
    gap: 10px;
    padding: 14px 16px;
  }

  .overlay--over .panel {
    width: min(620px, 100%);
  }

  .overlay--over .result-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .result-grid div {
    padding: 6px;
  }

  .result-grid b {
    font-size: 17px;
  }

  .score-hero {
    font-size: 40px;
  }

  .stars-row {
    font-size: 32px;
  }

  .star-goals li {
    padding: 4px 10px;
  }

  .title--over {
    font-size: 30px;
  }
}

/* ---- gift codes ---- */
.link-btn {
  margin-top: 2px;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--fg-1);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.link-btn:hover {
  color: #ffd166;
}

.code-form {
  width: 100%;
  display: grid;
  gap: 10px;
}

.code-input {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.3);
  color: var(--fg-0);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.code-input:focus {
  outline: none;
  border-color: #ffd166;
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.2);
}

.code-msg {
  min-height: 1.3em;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-1);
}

.code-msg.ok {
  color: var(--hc-grass);
}

.code-msg.bad {
  color: #ff5d8f;
}
