:root {
  color-scheme: dark;
  --teal: #2ed4c7;
  --teal-dark: #0e6f73;
  --orange: #ff9a3d;
  --orange-dark: #b95722;
  --cream: #fff7df;
  --ink: #f2fffc;
  --panel: rgba(7, 31, 34, .9);
  --control: rgba(10, 45, 49, .8);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #102c2e;
  color: var(--ink);
  font-family: Inter, ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

button,
a { font: inherit; }

#gameShell,
#gameCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#gameCanvas {
  display: block;
  background: #73b96b;
}

#hud {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  min-height: 68px;
  padding: max(7px, env(safe-area-inset-top)) 178px 7px 66px;
  display: grid;
  grid-template-columns: minmax(126px, .72fr) minmax(180px, 1fr) minmax(150px, .9fr) minmax(220px, 1.15fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(128, 249, 235, .34);
  background: linear-gradient(180deg, rgba(6, 28, 31, .98), rgba(9, 46, 49, .9));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.hudPanel {
  min-width: 0;
  height: 52px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 13px;
  background: rgba(255, 255, 255, .055);
}

#brandPanel,
#orderPanel {
  padding: 7px 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#brandPanel strong {
  overflow: hidden;
  color: #fff;
  font-size: clamp(.92rem, 1.75vw, 1.2rem);
  font-weight: 950;
  letter-spacing: .065em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#brandPanel strong span { color: var(--orange); }
#brandPanel small { margin-top: 5px; color: rgba(173, 248, 238, .7); font-size: .66rem; font-weight: 900; letter-spacing: .12em; }
#orderPanel span { color: var(--orange); font-size: .69rem; font-weight: 950; letter-spacing: .12em; }
#orderPanel strong { overflow: hidden; margin-top: 2px; color: var(--cream); font-size: .93rem; text-overflow: ellipsis; white-space: nowrap; }

#mapButton {
  padding: 2px 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  place-items: center;
  gap: 6px;
  border-color: rgba(111, 242, 225, .28);
  color: #dffff9;
  cursor: pointer;
}
#mapButton > span { font-size: .61rem; font-weight: 950; letter-spacing: .12em; }
#mapButton:active { transform: scale(.98); }
#miniMap { width: min(100%, 190px); height: 48px; pointer-events: none; }

#statsPanel {
  padding: 5px 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

#statsPanel div { min-width: 0; display: grid; place-items: center; gap: 2px; border-left: 1px solid rgba(255, 255, 255, .1); }
#statsPanel div:first-child { border-left: 0; }
#statsPanel span { color: rgba(218, 249, 245, .62); font-size: .63rem; font-weight: 900; letter-spacing: .08em; }
#statsPanel strong { overflow: hidden; max-width: 100%; color: #fff; font-size: clamp(.84rem, 1.65vw, 1.05rem); text-overflow: ellipsis; }
#timerLabel.late { color: #ff7867; animation: latePulse .7s ease-in-out infinite alternate; }

.cornerButton {
  position: fixed;
  z-index: 25;
  top: max(12px, env(safe-area-inset-top));
  width: 40px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 12px;
  background: rgba(2, 18, 21, .68);
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  text-decoration: none;
}

#arcadeLink { left: max(9px, env(safe-area-inset-left)); }
#pauseButton { right: calc(max(9px, env(safe-area-inset-right)) + 88px); }
#resetButton { right: calc(max(9px, env(safe-area-inset-right)) + 44px); }
#screenButton { right: max(9px, env(safe-area-inset-right)); }

html.arcadeEmbedded #arcadeLink,
html.arcadeEmbedded #resetButton,
html.arcadeEmbedded #screenButton { display: none; }

html.arcadeEmbedded #pauseButton {
  width: 1px;
  height: 1px;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

html.arcadeEmbedded #hud {
  padding-right: max(10px, env(safe-area-inset-right));
  padding-left: max(10px, env(safe-area-inset-left));
}

#destinationArrow {
  position: fixed;
  z-index: 18;
  top: 76px;
  left: 50%;
  min-width: 88px;
  min-height: 32px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 197, 109, .62);
  border-radius: 99px;
  background: rgba(58, 31, 9, .8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  transform: translateX(-50%);
  pointer-events: none;
}

#destinationArrow i { display: inline-block; color: var(--orange); font-size: 1.05rem; font-style: normal; filter: drop-shadow(0 0 5px rgba(255, 154, 61, .8)); }
#destinationArrow span { color: #fff2cc; font-size: .75rem; font-weight: 950; letter-spacing: .06em; }

#toast {
  position: fixed;
  z-index: 30;
  top: 116px;
  left: 50%;
  max-width: min(560px, calc(100% - 36px));
  padding: 9px 18px;
  border: 1px solid rgba(104, 241, 224, .52);
  border-radius: 99px;
  background: rgba(5, 38, 41, .9);
  color: #effffb;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

#toast.visible { opacity: 1; transform: translate(-50%, 0); }

#touchDrive {
  --knob-x: 0px;
  --knob-y: 0px;
  position: fixed;
  z-index: 24;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  width: clamp(116px, 18vw, 154px);
  aspect-ratio: 1;
  border: 1px solid rgba(195, 255, 248, .46);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 212, 199, .12), rgba(7, 43, 45, .13) 62%, rgba(7, 43, 45, .02) 72%);
  box-shadow: inset 0 0 27px rgba(69, 239, 222, .08), 0 7px 22px rgba(0, 0, 0, .18);
  backdrop-filter: blur(2px);
  pointer-events: none;
  transition: opacity .1s ease, transform .1s ease;
}

#touchDrive.floating { bottom: auto; transform: translate(-50%, -50%); }
.stickGate { position: absolute; inset: 12%; border: 1px solid rgba(195, 255, 248, .3); border-radius: 50%; }
.stickGate i { position: absolute; top: 50%; left: 12%; width: 76%; height: 1px; background: linear-gradient(90deg, transparent, rgba(195, 255, 248, .32), transparent); }
.stickGate i + i { transform: rotate(90deg); }
.touchDriveKnob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40%;
  aspect-ratio: 1;
  border: 2px solid rgba(239, 255, 252, .72);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .66), rgba(46, 212, 199, .46) 45%, rgba(9, 74, 76, .38));
  box-shadow: 0 0 18px rgba(46, 212, 199, .38);
  transform: translate(calc(-50% + var(--knob-x)), calc(-50% + var(--knob-y)));
}
#touchDrive > small { position: absolute; right: 0; bottom: 8%; left: 0; color: rgba(223, 255, 251, .72); font-size: .63rem; font-weight: 950; letter-spacing: .13em; text-align: center; }

#controls {
  position: fixed;
  z-index: 26;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: clamp(132px, 17vw, 178px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.controlButton {
  min-height: clamp(47px, 9vh, 66px);
  padding: 7px;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 1px solid rgba(197, 252, 244, .52);
  border-radius: 17px;
  background: linear-gradient(180deg, rgba(16, 72, 76, .92), rgba(6, 35, 38, .94));
  box-shadow: 0 7px 20px rgba(0, 0, 0, .26), inset 0 1px rgba(255, 255, 255, .14);
  color: #fff;
  font-size: clamp(.75rem, 1.5vw, 1rem);
  font-weight: 950;
  letter-spacing: .05em;
  text-align: center;
  touch-action: none;
}
.controlButton small { color: rgba(224, 255, 251, .66); font-size: .6rem; letter-spacing: .1em; }
.controlButton.active { transform: scale(.97); filter: brightness(1.25); }
.controlButton.pedal { background: linear-gradient(180deg, rgba(33,151,112,.96), rgba(11,74,60,.98)); border-color: rgba(174,255,214,.75); }
.controlButton.pedal { grid-column: 1 / -1; }
.controlButton.reverse { background: linear-gradient(180deg, rgba(48,105,141,.96), rgba(23,54,79,.98)); border-color: rgba(166,218,255,.8); }
.controlButton.reverse small { letter-spacing: 0; }
.controlButton.pedal.active { transform: scale(.97); filter: brightness(1.24); }
.controlButton.brake { background: linear-gradient(180deg, rgba(183,62,55,.95), rgba(91,28,31,.96)); border-color: rgba(255,184,170,.75); }
.controlButton.brake.active { transform: scale(.97); filter: brightness(1.24); }
.controlButton.action {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  width: clamp(185px, 24vw, 245px);
  min-height: 62px;
  border: 2px solid #fff0aa;
  background: linear-gradient(180deg, #ffb146, #d96528);
  box-shadow: 0 0 0 4px rgba(255, 161, 62, .15), 0 8px 25px rgba(0, 0, 0, .35);
  color: #20150c;
  font-size: 1.08rem;
  opacity: 0;
  transform: translateY(8px) scale(.95);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.controlButton.action.ready { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; animation: actionPulse .75s ease-in-out infinite alternate; }

.gameOverlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  display: none;
  place-items: center;
  overflow: auto;
  background: rgba(2, 17, 20, .7);
  backdrop-filter: blur(5px);
}
.gameOverlay.visible { display: grid; }
#startScreen { background: linear-gradient(90deg, rgba(2, 18, 20, .92), rgba(4, 27, 28, .54), rgba(2, 18, 20, .78)), url("/newber-order-card.webp") center / cover no-repeat; }

.mapOverlay { background: rgba(2, 17, 20, .84); }
.mapCard {
  width: min(820px, calc(100% - 20px));
  max-height: calc(100dvh - 24px);
  padding: clamp(13px, 2.4vw, 22px);
  gap: 10px;
  overflow: auto;
}
.mapHeading { display: flex; align-items: center; justify-content: space-between; gap: 18px; text-align: left; }
.mapHeading h2 { margin-top: 4px; font-size: clamp(1.55rem, 4vw, 2.45rem); }
.mapCloseButton {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 13px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}
.mapDestination {
  min-width: 0;
  padding: 8px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 177, 76, .46);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 140, 45, .15), rgba(255, 240, 166, .06));
  text-align: left;
}
.mapDestination > span { color: #ffad4d; font-size: .68rem; font-weight: 950; letter-spacing: .1em; white-space: nowrap; }
.mapDestination > strong { overflow: hidden; color: #fff8dc; font-size: .94rem; text-overflow: ellipsis; white-space: nowrap; }
.mapDestination > small { color: rgba(216, 255, 248, .76); font-size: .64rem; font-weight: 900; letter-spacing: .05em; white-space: nowrap; }
#worldMap {
  display: block;
  width: 100%;
  height: auto;
  max-height: 48dvh;
  border: 1px solid rgba(117, 244, 226, .38);
  border-radius: 17px;
  background: #112e31;
}
.mapLegend { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; color: rgba(235,255,251,.76); font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.mapLegend span { display: inline-flex; align-items: center; gap: 6px; }
.mapLegend span::before { width: 9px; height: 9px; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; background: #65f1dd; content: ""; }
.mapLegend .routeLineKey::before { width: 24px; height: 4px; border: 0; border-radius: 99px; background: linear-gradient(90deg, #ff9a3d, #fff0a6); box-shadow: 0 0 7px rgba(255, 196, 99, .55); }
.mapLegend .pickupDot::before { background: #ff9a3d; }
.mapLegend .deliveryDot::before { background: #fff0a6; }
.routeList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; text-align: left; }
.routeStop { min-width: 0; padding: 8px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(255,255,255,.045); }
.routeStop.current { border-color: rgba(255, 168, 72, .7); background: rgba(255, 143, 46, .12); }
.routeStop b { display: block; color: #fff1bd; font-size: .7rem; letter-spacing: .07em; }
.routeStop span { min-width: 0; margin-top: 4px; display: flex; align-items: center; gap: 5px; overflow: hidden; color: rgba(226,255,250,.75); font-size: .64rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.routeStop span i { flex: 0 0 auto; min-width: 45px; color: #ffae52; font-size: .55rem; font-style: normal; font-weight: 950; letter-spacing: .06em; }
.routeStop span.dropoff i { color: #fff0a6; }
.routeStop span.active { color: #fff; font-weight: 900; }
.routeStop span.done { opacity: .48; text-decoration: line-through; }
.mapNote { margin: 0; color: rgba(220,249,244,.66); font-size: .7rem; font-weight: 750; }

.overlayCard {
  width: min(560px, calc(100% - 24px));
  padding: clamp(20px, 4vw, 38px);
  display: grid;
  gap: 15px;
  border: 1px solid rgba(119, 241, 227, .5);
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(6, 34, 37, .96), rgba(12, 54, 54, .94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55), inset 0 0 36px rgba(46, 212, 199, .06);
  text-align: center;
}
.startCard { max-height: calc(100dvh - 28px); overflow-y: auto; }
.eyebrow { margin: 0; color: #8df3e8; font-size: .72rem; font-weight: 950; letter-spacing: .15em; }
.overlayCard h1,
.overlayCard h2 { margin: 0; color: #fff; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 950; letter-spacing: .05em; line-height: .95; text-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
.overlayCard h1 span { color: var(--orange); }
.overlayCard h2 { font-size: clamp(1.8rem, 4.2vw, 3rem); }
.overlayCard > p:not(.eyebrow) { margin: 0; color: rgba(236, 255, 251, .86); font-size: 1rem; font-weight: 700; line-height: 1.4; }
.overlayCard > small { color: rgba(220, 249, 244, .67); font-size: .75rem; line-height: 1.35; }
.startSteps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.startSteps span { min-height: 46px; padding: 7px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; background: rgba(255, 255, 255, .05); color: #fff7dc; font-size: .74rem; font-weight: 900; }
.startSteps b { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #24170e; }
.primaryButton,
.secondaryButton {
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 15px;
  background: linear-gradient(180deg, #3fe2d3, #12868b);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .22);
  color: #062b2c;
  font-size: .95rem;
  font-weight: 950;
  letter-spacing: .06em;
}
.secondaryButton { background: rgba(255, 255, 255, .08); color: #fff; }
.compactCard { width: min(420px, calc(100% - 24px)); }
.summaryCard { width: min(720px, calc(100% - 20px)); gap: 11px; }
.summaryStats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.summaryStats div { padding: 10px; display: grid; gap: 4px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 12px; background: rgba(255, 255, 255, .055); }
.summaryStats span { color: rgba(214, 249, 244, .66); font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.summaryStats strong { color: #fff1b1; font-size: 1.35rem; }
.unlockMessage {
  padding: 9px 12px;
  border: 1px solid rgba(128, 246, 218, .42);
  border-radius: 12px;
  background: rgba(21, 114, 93, .25);
  color: #a9ffdc;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.upgradePanel { padding: 10px; border: 1px solid rgba(255, 184, 86, .34); border-radius: 15px; background: rgba(70, 38, 13, .28); }
.upgradePanel > p { margin: 0 0 8px; display: flex; justify-content: space-between; gap: 12px; color: #ffe3a7; font-size: .75rem; }
.upgradePanel > p span { color: rgba(255, 244, 220, .62); font-size: .68rem; }
.upgradeGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.upgradeGrid button { min-height: 51px; padding: 7px; display: grid; gap: 3px; border: 1px solid rgba(255, 204, 119, .38); border-radius: 11px; background: rgba(35, 21, 10, .5); color: #fff; }
.upgradeGrid button:disabled { opacity: .42; }
.upgradeGrid b { font-size: .7rem; }
.upgradeGrid span { color: #ffd18a; font-size: .68rem; }

#rotateMessage { display: none; }

@keyframes actionPulse { from { box-shadow: 0 0 0 3px rgba(255, 161, 62, .1), 0 8px 25px rgba(0, 0, 0, .35); } to { box-shadow: 0 0 0 8px rgba(255, 161, 62, .2), 0 8px 28px rgba(0, 0, 0, .42); } }
@keyframes latePulse { from { opacity: 1; } to { opacity: .52; } }

@media (max-width: 780px) {
  #hud { min-height: 55px; padding: 5px 148px 5px 62px; grid-template-columns: minmax(108px, .7fr) minmax(145px, 1fr) minmax(185px, 1.15fr); gap: 5px; }
  #mapButton {
    position: fixed;
    z-index: 27;
    top: 61px;
    left: max(8px, env(safe-area-inset-left));
    width: 76px;
    height: 29px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 99px;
    background: rgba(6, 39, 42, .88);
  }
  #mapButton > span { font-size: .62rem; }
  #miniMap { display: none; }
  .hudPanel { height: 45px; border-radius: 9px; }
  #brandPanel, #orderPanel { padding: 4px 7px; }
  #brandPanel strong { font-size: .84rem; }
  #brandPanel small, #orderPanel span { font-size: .52rem; }
  #orderPanel strong { font-size: .74rem; }
  #statsPanel { padding: 3px 5px; }
  #statsPanel span { font-size: .48rem; }
  #statsPanel strong { font-size: .73rem; }
  .cornerButton { top: 7px; width: 34px; height: 38px; border-radius: 9px; }
  #pauseButton { right: 82px; }
  #resetButton { right: 44px; }
  #screenButton { right: 6px; }
  #destinationArrow { top: 61px; min-height: 27px; padding: 3px 8px; }
  #toast { top: 94px; font-size: .69rem; }
  #touchDrive { width: 108px; bottom: 6px; left: 7px; }
  #controls { right: 8px; bottom: 8px; width: 126px; gap: 5px; }
  .controlButton { min-height: 42px; border-radius: 12px; font-size: .7rem; }
  .controlButton small { font-size: .48rem; }
  .controlButton.action { min-height: 48px; font-size: .88rem; }
  .overlayCard { padding: 14px 18px; gap: 9px; border-radius: 18px; }
  .startCard { width: min(560px, calc(100% - 8px)); margin: 0; }
  .overlayCard h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
  .overlayCard h2 { font-size: 1.7rem; }
  .overlayCard > p:not(.eyebrow) { font-size: .78rem; }
  .startSteps span { min-height: 35px; padding: 4px; font-size: .6rem; }
  .primaryButton, .secondaryButton { min-height: 39px; font-size: .74rem; }
  .summaryCard { gap: 7px; }
  .summaryStats div { padding: 6px; }
  .summaryStats strong { font-size: 1rem; }
  .upgradePanel { padding: 6px; }
  .upgradeGrid button { min-height: 39px; padding: 4px; }
  .mapCard { width: min(720px, calc(100% - 12px)); padding: 10px 12px; gap: 7px; }
  .mapDestination { padding: 6px 8px; gap: 7px; }
  .mapDestination > span { font-size: .58rem; }
  .mapDestination > strong { font-size: .78rem; }
  .mapDestination > small { font-size: .56rem; }
  #worldMap { max-height: 42dvh; border-radius: 12px; }
  .mapCloseButton { width: 36px; height: 36px; }
  .routeList { gap: 5px; }
  .routeStop { padding: 6px 7px; }
  .mapNote { font-size: .62rem; }
}

@media (max-height: 390px) and (orientation: landscape) {
  #hud { min-height: 48px; }
  .hudPanel { height: 39px; }
  #brandPanel strong { font-size: .75rem; }
  #brandPanel small { display: none; }
  #destinationArrow { top: 52px; }
  #toast { top: 84px; }
  #touchDrive { width: 96px; }
  #controls { width: 114px; }
  .controlButton { min-height: 37px; }
  .overlayCard { padding: 10px 15px; gap: 6px; }
  .startCard { max-height: calc(100dvh - 12px); }
  .startCard .eyebrow { font-size: .6rem; }
  .startCard .startSteps b { width: 20px; height: 20px; }
  .overlayCard h1 { font-size: 2rem; }
  .overlayCard > p:not(.eyebrow), .overlayCard > small { font-size: .65rem; }
  .startSteps span { min-height: 29px; }
  .summaryStats div { padding: 4px; }
  .upgradePanel > p { margin-bottom: 4px; }
  .upgradeGrid button { min-height: 34px; }
  #mapButton { top: 52px; height: 26px; }
  .mapCard { grid-template-columns: minmax(0, 1.45fr) minmax(190px, .7fr); grid-template-areas: "heading heading" "destination destination" "map routes" "legend note"; align-items: center; }
  .mapHeading { grid-area: heading; }
  .mapDestination { grid-area: destination; }
  #worldMap { grid-area: map; max-height: 58dvh; }
  .mapLegend { grid-area: legend; }
  .routeList { grid-area: routes; grid-template-columns: 1fr; }
  .mapNote { grid-area: note; }
}

@media (orientation: portrait) {
  #rotateMessage {
    position: fixed;
    z-index: 100;
    inset: 0;
    padding: 30px;
    display: grid;
    place-content: center;
    gap: 12px;
    background: linear-gradient(160deg, #0a3033, #081e23);
    color: #fff;
    text-align: center;
  }
  #rotateMessage div { color: var(--orange); font-size: 3rem; }
  #rotateMessage strong { font-size: 1.3rem; }
  #rotateMessage span { color: rgba(225, 251, 247, .72); font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
