:root {
  --bg-deep: #06101a;
  --glass-bg: rgba(7, 16, 26, 0.74);
  --glass-strong: rgba(6, 14, 24, 0.86);
  --glass-border: rgba(168, 224, 255, 0.22);
  --glass-rim: rgba(255, 255, 255, 0.09);
  --ink: #f4f9ff;
  --ink-dim: #9cb7cd;
  --cyan: #3bf0e4;
  --aqua: #24c6dc;
  --blue: #58a8ff;
  --amber: #ffb547;
  --orange: #ff6e38;
  --red: #ff4757;
  --yellow: #ffd93d;
  --emerald: #44f2a4;
  --shadow-lg: 0 18px 48px rgba(2, 8, 16, 0.62);
  --shadow-sm: 0 8px 24px rgba(2, 8, 16, 0.48);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-ui);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

#glCanvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1;
}

/* ========================================================================= */
/* CINEMATIC AIRBORNE BULLET-TIME VIGNETTE & FOCUS BADGE                     */
/* ========================================================================= */
.bullet-time-vignette {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  background:
    radial-gradient(
      ellipse 78% 72% at 50% 48%,
      rgba(59, 240, 228, 0.0) 44%,
      rgba(16, 86, 128, 0.16) 76%,
      rgba(4, 16, 30, 0.52) 100%
    );
  box-shadow:
    inset 0 0 84px rgba(59, 240, 228, 0.22),
    inset 0 0 28px rgba(255, 188, 72, 0.14);
}

.bullet-time-vignette.bullet-time-active,
body.bullet-time-active .bullet-time-vignette {
  opacity: 1;
}

.bullet-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(6, 20, 34, 0.90) 0%, rgba(10, 32, 48, 0.86) 100%);
  border: 1.5px solid rgba(59, 240, 228, 0.78);
  box-shadow:
    0 10px 28px rgba(2, 10, 20, 0.56),
    0 0 22px rgba(59, 240, 228, 0.30),
    inset 0 1px 0 rgba(255, 224, 148, 0.28);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.bt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 18px rgba(255, 198, 78, 0.65);
  animation: btPulse 0.95s ease-in-out infinite;
}

.bt-title {
  font-style: italic;
  font-weight: 900;
  color: #a6fff8;
  text-shadow: 0 0 12px rgba(59, 240, 228, 0.48);
}

.bt-sep {
  color: rgba(168, 224, 255, 0.55);
}

.bt-scale {
  font-size: 12px;
  font-weight: 900;
  color: #ffffff;
}

.bt-div {
  width: 1px;
  height: 13px;
  background: rgba(168, 224, 255, 0.28);
  margin: 0 2px;
}

.bt-air {
  font-size: 11px;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.06em;
}

@keyframes btPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.32); opacity: 0.65; }
}

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.txt-red { color: #ff6b78; }
.txt-yellow { color: #ffe15c; }
.txt-orange { color: #ff9a52; }
.txt-cyan { color: #54f6ec; }
.txt-magenta { color: #ff7ae8; }

/* Live Hydro-Arcade Overdrive Pill (Stunts, 3-Tier Drift Charge, Maelstrom Slingshot, Slipstream) */
.overdrive-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: rgba(6, 16, 28, 0.88);
  border: 1.5px solid var(--cyan);
  box-shadow: 0 8px 24px rgba(2, 10, 20, 0.56), 0 0 18px rgba(59, 240, 228, 0.32);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.od-tag {
  font-style: italic;
  color: #ffffff;
}

.od-detail {
  font-size: 10.5px;
  color: #b8f8ff;
}

.overdrive-pill.od-stunt {
  border-color: #ff6ce8;
  box-shadow: 0 8px 24px rgba(2, 10, 20, 0.56), 0 0 22px rgba(255, 108, 232, 0.44);
}
.overdrive-pill.od-stunt .od-tag { color: #ff9ef0; }
.overdrive-pill.od-stunt .od-detail { color: #ffe478; }

.overdrive-pill.od-drift-1 {
  border-color: #3bf0e4;
  box-shadow: 0 0 18px rgba(59, 240, 228, 0.38);
}
.overdrive-pill.od-drift-1 .od-tag { color: #8cfff7; }

.overdrive-pill.od-drift-2 {
  border-color: #ffb547;
  box-shadow: 0 0 22px rgba(255, 181, 71, 0.45);
}
.overdrive-pill.od-drift-2 .od-tag { color: #ffd98a; }

.overdrive-pill.od-drift-3 {
  border-color: #b46cff;
  box-shadow: 0 0 26px rgba(180, 108, 255, 0.58);
}
.overdrive-pill.od-drift-3 .od-tag { color: #dfbeff; }

.overdrive-pill.od-slingshot {
  border-color: #ff8c38;
  box-shadow: 0 0 24px rgba(255, 140, 56, 0.52);
}
.overdrive-pill.od-slingshot .od-tag { color: #ffc282; }

.overdrive-pill.od-draft {
  border-color: #65ffbe;
  box-shadow: 0 0 18px rgba(101, 255, 190, 0.36);
}
.overdrive-pill.od-draft .od-tag { color: #9effd5; }

/* ========================================================================= */
/* OVERLAYS (PRE-RACE TRACK SELECT & FINISH PODIUM)                          */
/* ========================================================================= */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, rgba(4, 14, 24, 0.34), rgba(3, 9, 17, 0.72));
  backdrop-filter: blur(4px);
}

.menu-shell {
  width: min(1040px, 96vw);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 24px 20px;
  border-radius: 22px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-rim);
  backdrop-filter: blur(14px);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.menu-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wake-emblem {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #3bf0e4 0%, #1d8cf8 55%, #ff8b38 100%);
  box-shadow: 0 0 26px rgba(59, 240, 228, 0.42);
  position: relative;
  flex-shrink: 0;
  transform: skewX(-10deg);
}

.wake-emblem::after {
  content: "";
  position: absolute;
  inset: 9px 7px;
  border-left: 3px solid rgba(255, 255, 255, 0.92);
  border-bottom: 3px solid rgba(255, 255, 255, 0.92);
  transform: rotate(-45deg) translate(2px, -3px);
}

.menu-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  font-weight: 700;
}

.menu-title {
  margin: 1px 0 0;
  font-size: 32px;
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-style: italic;
}

.menu-title span {
  color: var(--cyan);
}

.menu-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-dim);
}

/* Track Cards Grid (4 Ocean Circuits: 4-col wide, 2x2 medium, 1-col portrait) */
.track-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1080px) {
  .track-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.track-card {
  appearance: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(11, 23, 36, 0.84);
  border: 1.5px solid rgba(176, 222, 255, 0.16);
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.track-card:hover {
  transform: translateY(-3px);
  border-color: rgba(176, 228, 255, 0.44);
}

.track-card.selected.card-emerald {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan), 0 12px 32px rgba(59, 240, 228, 0.25);
}

.track-card.selected.card-atlantic {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), 0 12px 32px rgba(88, 168, 255, 0.26);
}

.track-card.selected.card-caldera {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 12px 32px rgba(255, 165, 64, 0.28);
}

.track-card.selected.card-abyssal {
  border-color: #a86cff;
  box-shadow: 0 0 0 1px #a86cff, 0 12px 32px rgba(168, 108, 255, 0.34);
}

.card-banner {
  height: 76px;
  padding: 10px 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.banner-emerald {
  background:
    radial-gradient(circle at 82% 24%, rgba(255, 250, 200, 0.85), transparent 34%),
    linear-gradient(155deg, #0b5d7a 0%, #159f9b 52%, #2ae0c5 100%);
}

.banner-atlantic {
  background:
    radial-gradient(circle at 76% 32%, rgba(188, 220, 255, 0.52), transparent 40%),
    linear-gradient(155deg, #0c1b2e 0%, #193c58 55%, #2c6278 100%);
}

.banner-caldera {
  background:
    radial-gradient(circle at 78% 72%, rgba(255, 198, 92, 0.92), transparent 42%),
    linear-gradient(155deg, #1b1726 0%, #6f2f2b 52%, #e87a30 100%);
}

.banner-abyssal {
  background:
    radial-gradient(circle at 72% 36%, rgba(88, 240, 255, 0.62), transparent 38%),
    radial-gradient(circle at 26% 78%, rgba(168, 108, 255, 0.65), transparent 44%),
    linear-gradient(155deg, #070b1a 0%, #1c1946 52%, #134a6b 100%);
}

.card-badge,
.card-swell {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 13, 22, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f4fbff;
}

.card-body {
  padding: 13px 15px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-body h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.card-body p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.46;
  color: #c2d6e8;
  flex: 1;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-dim);
}

.menu-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 12px;
  color: #d7e7f5;
}

.controls-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  justify-content: center;
  padding: 5px 8px;
}

.key-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--ink-dim);
  white-space: nowrap;
}

.key-item kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

.menu-footer {
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.btn-launch {
  appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  padding: 14px 44px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.1em;
  font-style: italic;
  color: #031520;
  background: linear-gradient(135deg, #4df7e6 0%, #2fd0ff 55%, #65ffbe 100%);
  box-shadow: 0 10px 30px rgba(45, 220, 232, 0.36);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.12s ease, filter 0.14s ease;
}

.btn-launch:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-launch:active {
  transform: scale(0.98);
}

.btn-launch-sm {
  padding: 11px 24px;
  font-size: 14px;
}

.btn-ghost,
.btn-secondary {
  appearance: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 11px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.14s ease, border-color 0.14s ease;
}

.btn-secondary {
  background: rgba(59, 240, 228, 0.14);
  border-color: rgba(59, 240, 228, 0.45);
  color: #d6fffb;
}

.btn-ghost:hover,
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.36);
}

/* ========================================================================= */
/* LIVE RACE HUD                                                             */
/* ========================================================================= */
.race-hud {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.nav-overlay-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 16;
  pointer-events: none;
}

.nav-cue-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.turn-cue-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: rgba(7, 15, 25, 0.86);
  border: 1.5px solid var(--cyan);
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #a8fff8;
  white-space: nowrap;
}

.turn-arrow {
  font-size: 14px;
  line-height: 1;
}

.turn-cue-pill.cue-carve {
  border-color: rgba(59, 240, 228, 0.85);
  color: #8cfff7;
}

.turn-cue-pill.cue-hairpin {
  border-color: rgba(255, 168, 56, 0.92);
  color: #ffd078;
  box-shadow: 0 0 20px rgba(255, 168, 56, 0.34);
  animation: btPulse 0.72s ease-in-out infinite;
}

.turn-cue-pill.cue-vortex {
  border-color: rgba(176, 114, 255, 0.92);
  color: #dfb8ff;
  box-shadow: 0 0 20px rgba(176, 114, 255, 0.36);
}

.turn-cue-pill.cue-wrong {
  border-color: rgba(255, 68, 86, 0.96);
  background: rgba(64, 8, 16, 0.90);
  color: #ff949e;
  box-shadow: 0 0 26px rgba(255, 68, 86, 0.55);
  animation: btPulse 0.45s ease-in-out infinite;
}

.hud-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.hud-btn {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}

.hud-btn:hover {
  background: rgba(18, 38, 58, 0.88);
  border-color: rgba(110, 232, 255, 0.48);
}

.hud-btn:active {
  transform: scale(0.97);
}

.hud-btn.is-off {
  color: var(--ink-dim);
  border-color: rgba(255, 181, 71, 0.32);
  background: rgba(8, 16, 26, 0.64);
}

.kbd {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #d9eeff;
}

/* Top-Left Bar */
.hud-top-left {
  position: fixed;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 452px;
}

.track-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

/* Top-Center Race Telemetry Strip + Buoy Indicator */
.hud-top-center {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.race-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 18px;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.race-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}

.timer-cell {
  min-width: 92px;
}

.cell-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

.cell-val {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
}

.pos-cell .cell-val strong {
  color: var(--cyan);
  font-style: italic;
}

.rescue-cell .cell-val strong {
  color: #ff9c47;
}

.cell-val small {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-dim);
  margin-left: 1px;
}

.race-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.14);
}

.next-buoy-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 15px;
  border-radius: var(--radius-pill);
  background: rgba(7, 15, 24, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.next-buoy-pill.pass-right {
  border-color: rgba(255, 78, 94, 0.85);
  color: #ff7a86;
  box-shadow: 0 0 18px rgba(255, 71, 87, 0.28);
}

.next-buoy-pill.pass-left {
  border-color: rgba(255, 217, 61, 0.85);
  color: #ffe36e;
  box-shadow: 0 0 18px rgba(255, 217, 61, 0.25);
}

.buoy-dist {
  font-size: 11px;
  color: var(--ink);
  opacity: 0.9;
}

/* Top-Right Mini-Map */
.hud-top-right {
  position: fixed;
  top: 14px;
  right: 14px;
}

.minimap-frame {
  padding: 8px;
  border-radius: 16px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

#minimapCanvas {
  display: block;
  width: 168px;
  height: 168px;
  border-radius: 10px;
  background: rgba(3, 12, 22, 0.62);
}

.minimap-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-dim);
}

.minimap-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.dot-red { background: var(--red); }
.dot-yellow { background: var(--yellow); }
.dot-orange { background: var(--orange); }

/* Center-Top Sleek Compact Callout Ribbon (keeps forward ocean horizon 100% clear!) */
.callout-banner {
  position: fixed;
  top: 98px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  padding: 6px 20px;
  border-radius: 999px;
  background: rgba(6, 15, 25, 0.76);
  border: 1.5px solid rgba(59, 240, 228, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  min-width: 190px;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.callout-main {
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.08em;
  line-height: 1.05;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(59, 240, 228, 0.45);
}

.callout-sub {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.callout-banner.tone-go {
  border-color: rgba(68, 242, 164, 0.75);
}
.callout-banner.tone-go .callout-main { color: #7dffbe; }

.callout-banner.tone-air {
  border-color: rgba(59, 240, 228, 0.85);
}
.callout-banner.tone-air .callout-main { color: #6efff3; }

.callout-banner.tone-rescue {
  border-color: rgba(255, 146, 56, 0.9);
}
.callout-banner.tone-rescue .callout-main { color: #ffb35c; }
.callout-banner.tone-rescue .callout-sub { color: #ffe0b3; }

.callout-banner.tone-warn {
  border-color: rgba(255, 80, 96, 0.85);
}
.callout-banner.tone-warn .callout-main { color: #ff7a86; }
.callout-banner.tone-warn .callout-sub { color: #ffc2c8; }

.callout-banner.tone-lap {
  border-color: rgba(255, 217, 61, 0.85);
}
.callout-banner.tone-lap .callout-main { color: #ffe46b; }

/* Bottom-Left Collapsible Engine Telemetry Panel (F3) */
.telemetry-panel {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 282px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(5, 12, 20, 0.86);
  border: 1px solid rgba(90, 228, 255, 0.3);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
}

.tel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  color: var(--cyan);
  padding-bottom: 7px;
  margin-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tel-grid {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 4px 8px;
  font-size: 11px;
}

.tel-k {
  color: var(--ink-dim);
}

.tel-v {
  color: #e6f6ff;
  text-align: right;
  font-weight: 700;
}

/* Bottom-Right Speed, Wave Power & Turbo Cluster */
.hud-bottom-right {
  position: fixed;
  right: 16px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.gauge-card {
  width: 248px;
  padding: 13px 16px 14px;
  border-radius: 18px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.speed-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.speed-readout {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.speed-num {
  font-family: var(--font-mono);
  font-size: 46px;
  line-height: 0.94;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(59, 240, 228, 0.35);
}

.speed-unit {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.air-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(59, 240, 228, 0.2);
  border: 1px solid rgba(59, 240, 228, 0.72);
  color: #84fff5;
}

.gauge-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

.power-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.power-pips {
  display: flex;
  gap: 4px;
  flex: 1;
}

.power-pip {
  height: 8px;
  flex: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.power-pip.active {
  background: linear-gradient(90deg, #3bf0e4, #5effb4);
  border-color: rgba(145, 255, 226, 0.8);
  box-shadow: 0 0 10px rgba(59, 240, 228, 0.55);
}

.power-pip.max {
  background: linear-gradient(90deg, #ffd93d, #ff8b38);
  border-color: rgba(255, 224, 112, 0.9);
  box-shadow: 0 0 12px rgba(255, 180, 64, 0.65);
}

.power-lvl {
  font-size: 11px;
  font-weight: 800;
  color: var(--cyan);
  min-width: 38px;
  text-align: right;
}

.turbo-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.turbo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.turbo-hint {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--amber);
}

.turbo-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.turbo-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #27d3f5 0%, #ff9f38 65%, #ffe657 100%);
  box-shadow: 0 0 14px rgba(255, 168, 56, 0.6);
  transition: width 0.06s linear;
}

/* ========================================================================= */
/* FINISH PODIUM OVERLAY                                                     */
/* ========================================================================= */
.finish-shell {
  width: min(680px, 95vw);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 24px 26px 22px;
  border-radius: 22px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.finish-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-align: center;
  text-transform: uppercase;
}

.finish-headline {
  margin: -8px 0 0;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.standings-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 12, 20, 0.66);
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.standings-table th {
  text-align: left;
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.standings-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.standings-table tr:last-child td {
  border-bottom: none;
}

.standings-table tr.is-player {
  background: rgba(59, 240, 228, 0.12);
  font-weight: 800;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

.finish-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.fstat-box {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.fstat-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.fstat-val {
  font-size: 16px;
  color: var(--ink);
}

.finish-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Responsive compactness */
@media (max-width: 900px) {
  .track-grid {
    grid-template-columns: 1fr;
  }
  .finish-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hud-top-left {
    max-width: 260px;
  }
}

/* ========================================================================= */
/* MOBILE MODE: TILT-TO-STEER + MULTI-TOUCH PEDALS & COMPACT PHONE HUD       */
/* ========================================================================= */
.mobile-only-pill,
.controls-mobile {
  display: none;
}

body.is-mobile .mobile-only-pill {
  display: inline-flex;
}

body.is-mobile .controls-desktop {
  display: none;
}

body.is-mobile .controls-mobile {
  display: flex;
}

.portrait-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(59, 240, 228, 0.12);
  border: 1px solid rgba(59, 240, 228, 0.36);
  color: #cffcf8;
  font-size: 12px;
  font-weight: 700;
}

.portrait-dismiss {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

/* Touch Controls Layer */
.touch-controls {
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
}

.touch-btn {
  pointer-events: auto;
  appearance: none;
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(168, 224, 255, 0.34);
  background: linear-gradient(180deg, rgba(10, 26, 42, 0.72) 0%, rgba(5, 14, 24, 0.84) 100%);
  color: var(--ink);
  font-family: var(--font-ui);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(2, 8, 16, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  touch-action: none;
  transition: transform 0.07s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.touch-btn.pressed {
  transform: scale(0.93);
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(24, 72, 96, 0.88) 0%, rgba(10, 34, 52, 0.94) 100%);
  box-shadow: 0 0 22px rgba(59, 240, 228, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.tbtn-main {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.08em;
  line-height: 1.05;
}

.tbtn-sub {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}

/* Left Thumb Cluster: Brake Pedal + Hop Button + Optional Pad Steer */
.touch-left-cluster {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.touch-left-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.touch-left-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.touch-hop-btn {
  width: 72px;
  height: 52px;
  border-radius: 16px;
  border-color: rgba(68, 242, 164, 0.48);
}

.touch-hop-btn .tbtn-main {
  color: #94ffd0;
}

.touch-hop-btn.pressed {
  border-color: var(--emerald);
  box-shadow: 0 0 22px rgba(68, 242, 164, 0.48);
}

.touch-trick-btn {
  width: 72px;
  height: 52px;
  border-radius: 16px;
  opacity: 0.66;
  border-color: rgba(255, 118, 232, 0.42);
  background: linear-gradient(180deg, rgba(44, 14, 48, 0.72) 0%, rgba(20, 8, 28, 0.86) 100%);
}

.touch-trick-btn .tbtn-main {
  color: #ff9ef0;
}

.touch-trick-btn.is-airborne {
  opacity: 1;
  border-color: #ff6ce8;
  background: linear-gradient(180deg, rgba(96, 20, 108, 0.88) 0%, rgba(44, 12, 62, 0.94) 100%);
  box-shadow: 0 0 22px rgba(255, 108, 232, 0.56);
}

.touch-trick-btn.is-tricking,
.touch-trick-btn.pressed {
  opacity: 1;
  border-color: #ffe478;
  box-shadow: 0 0 26px rgba(255, 228, 120, 0.68);
}

.touch-brake-pedal {
  width: 82px;
  height: 78px;
  border-radius: 18px;
  border-color: rgba(255, 92, 108, 0.52);
  background: linear-gradient(180deg, rgba(48, 14, 24, 0.72) 0%, rgba(22, 7, 14, 0.86) 100%);
}

.touch-brake-pedal .tbtn-main {
  color: #ff8b96;
}

.touch-brake-pedal.pressed {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(132, 24, 42, 0.88) 0%, rgba(68, 12, 22, 0.94) 100%);
  box-shadow: 0 0 22px rgba(255, 71, 87, 0.48);
}

.touch-steer-pads {
  display: flex;
  align-items: center;
  gap: 8px;
}

.touch-steer-btn {
  width: 66px;
  height: 78px;
  border-radius: 18px;
  font-size: 24px;
  font-weight: 900;
  color: #d6f9ff;
}

/* Bottom-Center Tilt Steering Horizon Meter */
.tilt-meter-bar {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 27;
}

.tilt-recenter-btn {
  pointer-events: auto;
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 12px 5px;
  min-width: 196px;
  border-radius: 14px;
  background: rgba(6, 15, 25, 0.74);
  border: 1px solid rgba(132, 224, 255, 0.30);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  touch-action: manipulation;
  cursor: pointer;
}

.tilt-recenter-btn:active {
  transform: scale(0.96);
  border-color: var(--cyan);
}

.tilt-track {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tilt-arrow-l,
.tilt-arrow-r {
  font-size: 9px;
  color: rgba(168, 224, 255, 0.65);
}

.tilt-rail {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.tilt-center-tick {
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 1px;
}

.tilt-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3bf0e4, #65ffbe);
  box-shadow: 0 0 8px rgba(59, 240, 228, 0.6);
}

.tilt-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 10px rgba(59, 240, 228, 0.85);
}

.tilt-status-text {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: #a9d5ec;
  white-space: nowrap;
}

/* Right Thumb Cluster: Focus + Turbo Boost + Gas Pedal + Auto-Gas */
.touch-right-cluster {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.touch-action-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.touch-focus-btn {
  width: 68px;
  height: 50px;
  border-radius: 15px;
  opacity: 0.62;
  border-color: rgba(145, 215, 255, 0.30);
}

.touch-focus-btn.is-airborne {
  opacity: 1;
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(16, 66, 88, 0.86) 0%, rgba(8, 32, 48, 0.92) 100%);
  box-shadow: 0 0 22px rgba(59, 240, 228, 0.45);
}

.touch-focus-btn.is-airborne .tbtn-main {
  color: #a6fff8;
}

.touch-focus-btn.is-bt-active {
  opacity: 1;
  border-color: #ffffff;
  box-shadow: 0 0 26px rgba(59, 240, 228, 0.72);
}

.touch-boost-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border-color: rgba(255, 181, 71, 0.52);
  background: linear-gradient(180deg, rgba(36, 22, 10, 0.78) 0%, rgba(18, 10, 6, 0.88) 100%);
}

.touch-boost-btn .tbtn-charge-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 217, 61, 0.42) 0%, rgba(255, 110, 56, 0.56) 100%);
  transition: height 0.08s linear;
}

.touch-boost-btn .tbtn-main {
  color: #ffe28a;
}

.touch-boost-btn.is-ready {
  border-color: rgba(255, 198, 72, 0.85);
  box-shadow: 0 0 18px rgba(255, 165, 56, 0.34);
}

.touch-boost-btn.is-boosting,
.touch-boost-btn.pressed {
  border-color: #ffe657;
  box-shadow: 0 0 28px rgba(255, 181, 71, 0.68);
}

.touch-gas-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.touch-auto-pill {
  pointer-events: auto;
  appearance: none;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(168, 224, 255, 0.30);
  background: rgba(6, 16, 26, 0.78);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}

.touch-auto-pill.is-active {
  background: rgba(59, 240, 228, 0.22);
  border-color: var(--cyan);
  color: #c8fffb;
  box-shadow: 0 0 14px rgba(59, 240, 228, 0.30);
}

.touch-gas-pedal {
  width: 82px;
  height: 118px;
  border-radius: 22px;
  border-color: rgba(59, 240, 228, 0.58);
  background: linear-gradient(180deg, rgba(12, 54, 68, 0.76) 0%, rgba(6, 26, 38, 0.88) 100%);
}

.touch-gas-pedal .tbtn-main {
  font-size: 16px;
  color: #a6fff8;
}

.touch-gas-pedal.is-auto {
  border-color: rgba(101, 255, 190, 0.75);
  box-shadow: 0 0 18px rgba(68, 242, 164, 0.32);
}

/* Mobile Compact HUD Rearrangement (Zero Overlap with Bottom Touch Pedals!) */
body.is-mobile .hud-top-left {
  top: max(8px, env(safe-area-inset-top, 0px));
  left: max(8px, env(safe-area-inset-left, 0px));
  gap: 5px;
  max-width: calc(50vw - 120px);
}

body.is-mobile #btnBackHub,
body.is-mobile .track-pill,
body.is-mobile .hud-pill .kbd {
  display: none;
}

@media (max-width: 560px) {
  body.is-mobile #btnGuide {
    display: none;
  }
}

body.is-mobile .hud-pill {
  padding: 5px 9px;
  font-size: 10.5px;
  gap: 4px;
}

body.is-mobile .hud-top-center {
  top: max(8px, env(safe-area-inset-top, 0px));
  gap: 5px;
}

body.is-mobile .race-strip {
  gap: 9px;
  padding: 5px 11px;
  border-radius: 13px;
}

body.is-mobile .race-cell {
  min-width: 36px;
}

body.is-mobile .timer-cell {
  min-width: 68px;
}

body.is-mobile .rescue-cell,
body.is-mobile .rescue-divider {
  display: none;
}

body.is-mobile .cell-label {
  font-size: 8px;
}

body.is-mobile .cell-val {
  font-size: 14px;
}

body.is-mobile .race-divider {
  height: 20px;
}

body.is-mobile .next-buoy-pill {
  padding: 3px 9px;
  font-size: 10px;
  gap: 6px;
}

body.is-mobile .turn-cue-pill {
  padding: 3px 9px;
  font-size: 9.5px;
  gap: 4px;
}

body.is-mobile .callout-banner {
  top: 77px;
  padding: 5px 14px;
  min-width: 150px;
}

body.is-mobile .callout-main {
  font-size: 15px;
}

body.is-mobile .callout-sub {
  font-size: 8.5px;
}

body.is-mobile .buoy-dist {
  font-size: 10px;
}

body.is-mobile .hud-top-right {
  top: max(8px, env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
}

body.is-mobile .minimap-frame {
  padding: 5px;
  border-radius: 12px;
}

body.is-mobile #minimapCanvas {
  width: 82px;
  height: 82px;
  border-radius: 8px;
}

body.is-mobile .minimap-legend {
  display: none;
}

/* Relocate Speedometer / Power / Turbo compact card cleanly beside Top-Right Mini-Map! */
body.is-mobile .hud-bottom-right {
  top: max(8px, env(safe-area-inset-top, 0px));
  right: calc(max(8px, env(safe-area-inset-right, 0px)) + 98px);
  bottom: auto;
  align-items: flex-end;
  gap: 5px;
}

body.is-mobile .gauge-card {
  width: 132px;
  padding: 6px 9px 7px;
  border-radius: 13px;
  gap: 5px;
}

body.is-mobile .speed-num {
  font-size: 24px;
}

body.is-mobile .speed-unit {
  font-size: 9.5px;
}

body.is-mobile .air-badge {
  font-size: 8px;
  padding: 2px 5px;
}

body.is-mobile .gauge-label {
  font-size: 8px;
}

body.is-mobile .power-row {
  gap: 5px;
}

body.is-mobile .power-pip {
  height: 6px;
}

body.is-mobile .power-lvl {
  font-size: 9px;
  min-width: 28px;
}

body.is-mobile .turbo-track {
  height: 7px;
}

body.is-mobile .turbo-hint {
  font-size: 8.5px;
}

body.is-mobile .bullet-time-badge {
  position: fixed;
  left: 50%;
  bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 56px);
  transform: translateX(-50%);
  padding: 5px 11px;
  font-size: 10px;
}

body.is-mobile .overdrive-pill {
  position: fixed;
  left: 50%;
  bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 88px);
  transform: translateX(-50%);
  padding: 4px 11px;
  font-size: 9.5px;
  z-index: 28;
}

/* Mobile Menu & Finish compactness for short landscape phone viewports */
body.is-mobile .overlay-backdrop {
  padding: max(10px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}

body.is-mobile .menu-shell {
  padding: 14px 16px;
  gap: 10px;
  border-radius: 16px;
}

body.is-mobile .menu-title {
  font-size: 22px;
}

body.is-mobile .menu-kicker {
  font-size: 9px;
}

body.is-mobile .menu-subtitle {
  font-size: 11px;
}

body.is-mobile .wake-emblem {
  width: 34px;
  height: 34px;
}

body.is-mobile .hub-back-link {
  display: none;
}

body.is-mobile .card-banner {
  height: 48px;
  padding: 7px 10px;
}

body.is-mobile .card-body {
  padding: 9px 11px 10px;
  gap: 5px;
}

body.is-mobile .card-body h2 {
  font-size: 14px;
}

body.is-mobile .card-body p {
  font-size: 11px;
  line-height: 1.35;
}

body.is-mobile .menu-summary-bar {
  font-size: 10.5px;
  padding: 7px 10px;
  gap: 6px;
}

body.is-mobile .menu-footer {
  position: sticky;
  bottom: -14px;
  margin: 2px -16px -14px;
  padding: 12px 16px 14px;
  background: linear-gradient(180deg, rgba(6, 14, 24, 0) 0%, rgba(6, 14, 24, 0.94) 34%, rgba(6, 14, 24, 0.98) 100%);
  z-index: 6;
}

body.is-mobile .btn-launch {
  width: 100%;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
}

/* Mobile Portrait Adjustments (narrow screens <= 560px) */
@media (max-width: 560px) {
  body.is-mobile .hud-top-left {
    max-width: calc(100vw - 16px);
    width: calc(100vw - 16px);
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 4px;
  }

  body.is-mobile .hud-top-left .hud-pill {
    padding: 4px 7px;
    font-size: 9.5px;
    white-space: nowrap;
  }

  body.is-mobile .hud-top-center {
    top: calc(max(8px, env(safe-area-inset-top, 0px)) + 34px);
    left: max(8px, env(safe-area-inset-left, 0px));
    transform: none;
    align-items: flex-start;
  }

  body.is-mobile .hud-top-right {
    top: calc(max(8px, env(safe-area-inset-top, 0px)) + 34px);
  }

  body.is-mobile .hud-bottom-right {
    top: calc(max(8px, env(safe-area-inset-top, 0px)) + 130px);
    right: max(8px, env(safe-area-inset-right, 0px));
  }

  body.is-mobile .gauge-card {
    width: 112px;
    padding: 6px 8px 6px;
  }

  body.is-mobile .gauge-card .air-badge {
    display: none;
  }

  body.is-mobile .speed-num {
    font-size: 21px;
  }

  body.is-mobile .power-row .gauge-label {
    display: none;
  }

  body.is-mobile .callout-banner {
    top: 212px;
    max-width: calc(100vw - 32px);
  }

  /* In portrait, place Tilt Horizon Meter cleanly ABOVE the left & right thumb pedals! */
  body.is-mobile .tilt-meter-bar {
    bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 158px);
  }

  body.is-mobile .bullet-time-badge {
    bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 208px);
  }

  body.is-mobile .overdrive-pill {
    bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 240px);
  }

  body.is-mobile .touch-gas-pedal {
    width: 74px;
    height: 108px;
  }

  body.is-mobile .touch-brake-pedal {
    width: 74px;
    height: 74px;
  }

  body.is-mobile .touch-hop-btn,
  body.is-mobile .touch-trick-btn {
    width: 64px;
    height: 48px;
  }

  body.is-mobile .touch-boost-btn {
    width: 66px;
    height: 66px;
  }

  body.is-mobile .touch-focus-btn {
    width: 64px;
    height: 46px;
  }

  body.is-mobile .touch-steer-btn {
    width: 54px;
    height: 70px;
    font-size: 20px;
  }
}

/* Mobile Landscape Short-Height Tweaks (<= 460px height, e.g., iPhone / Android Landscape) */
@media (max-height: 460px) and (min-width: 561px) {
  body.is-mobile .track-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  body.is-mobile .card-body p {
    display: none;
  }

  body.is-mobile .menu-summary-bar,
  body.is-mobile .menu-subtitle {
    display: none;
  }

  body.is-mobile .touch-gas-pedal {
    height: 102px;
    width: 78px;
  }

  body.is-mobile .touch-brake-pedal {
    height: 68px;
    width: 76px;
  }

  body.is-mobile .touch-hop-btn,
  body.is-mobile .touch-trick-btn {
    height: 46px;
    width: 66px;
  }

  body.is-mobile .touch-boost-btn {
    width: 66px;
    height: 66px;
  }

  body.is-mobile .touch-focus-btn {
    width: 64px;
    height: 44px;
  }
}


/* ========================================================================= */
/* STANDALONE WORMDB MULTIPLAYER, LOBBY, WORLD RECORDS & GHOST STYLES        */
/* ========================================================================= */
.menu-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.net-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(6, 18, 30, 0.82);
  border: 1px solid rgba(155, 220, 255, 0.25);
  color: #b7d7ec;
}

.net-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb703;
  box-shadow: 0 0 8px rgba(255, 183, 3, 0.75);
}

.net-status-pill.is-online {
  border-color: rgba(68, 242, 164, 0.65);
  color: #a9ffd8;
}

.net-status-pill.is-online .net-dot {
  background: #44f2a4;
  box-shadow: 0 0 10px rgba(68, 242, 164, 0.9);
}

.net-status-pill.is-offline {
  border-color: rgba(255, 110, 120, 0.45);
  color: #ffb8be;
}

.net-status-pill.is-offline .net-dot {
  background: #ff5868;
  box-shadow: none;
}

.btn-records {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-color: rgba(255, 217, 61, 0.42);
  color: #ffe88f;
}

.racer-setup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 9px 14px;
  border-radius: 13px;
  background: rgba(6, 16, 28, 0.78);
  border: 1px solid rgba(120, 215, 255, 0.20);
}

.racer-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.racer-lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

#inputCallsign {
  width: 126px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(59, 240, 228, 0.42);
  background: rgba(4, 12, 22, 0.90);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  outline: none;
}

#inputCallsign:focus {
  border-color: #3bf0e4;
  box-shadow: 0 0 0 2px rgba(59, 240, 228, 0.25);
}

.livery-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.liv-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.liv-swatch.selected {
  transform: scale(1.16);
  border-color: #ffffff;
  box-shadow: 0 0 12px var(--sw);
}

.ghost-toggle-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 228, 120, 0.35);
  background: rgba(10, 20, 32, 0.80);
  color: #b7d7ec;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.ghost-toggle-btn.is-on {
  border-color: rgba(255, 228, 120, 0.85);
  background: rgba(48, 36, 12, 0.75);
  color: #fff2b2;
}

.wr-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 24, 38, 0.85);
  border: 1px solid rgba(59, 240, 228, 0.32);
  font-size: 11px;
  color: #e6f7ff;
  margin-left: auto;
}

.wr-tag {
  padding: 2px 6px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(59, 240, 228, 0.22);
  color: #7ffff6;
}

.menu-footer-multi {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-online {
  background: linear-gradient(135deg, #2ef2e8 0%, #24b5ff 100%);
  color: #031522;
}

.btn-friend {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  border-radius: 999px;
}

.join-code-group {
  display: inline-flex;
  align-items: center;
  background: rgba(5, 14, 24, 0.86);
  border: 1px solid rgba(155, 220, 255, 0.28);
  border-radius: 999px;
  padding: 3px 4px 3px 12px;
  gap: 6px;
}

#inputRoomCode {
  width: 72px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  outline: none;
}

.btn-join-code {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.btn-solo {
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* Lobby & Leaderboard Shells */
.lobby-shell,
.lb-shell {
  width: min(740px, 95vw);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--glass-strong);
  border: 1px solid rgba(59, 240, 228, 0.35);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lobby-title {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.lobby-title span {
  color: #3bf0e4;
}

.lobby-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-link {
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 900;
  border-radius: 999px;
}

.lobby-track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lobby-track-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lt-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(155, 220, 255, 0.24);
  background: rgba(6, 16, 28, 0.78);
  color: #b7d7ec;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.lt-pill.selected {
  background: rgba(59, 240, 228, 0.20);
  border-color: #3bf0e4;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(59, 240, 228, 0.28);
}

.lobby-seats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.seat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(6, 16, 28, 0.80);
  border: 1px solid rgba(155, 220, 255, 0.18);
}

.seat-card.is-human {
  border-color: rgba(59, 240, 228, 0.55);
  background: rgba(8, 28, 42, 0.86);
}

.seat-card.is-me {
  border-color: #3bf0e4;
  box-shadow: 0 0 16px rgba(59, 240, 228, 0.22);
}

.seat-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seat-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.seat-name {
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
}

.seat-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-dim);
}

.seat-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #b7d7ec;
}

.seat-badge.is-host {
  background: rgba(255, 217, 61, 0.22);
  color: #ffe678;
}

.seat-badge.is-ready {
  background: rgba(68, 242, 164, 0.22);
  color: #88ffcb;
}

.lobby-sync-note {
  font-size: 11.5px;
  color: #9ec8e2;
  text-align: center;
}

.lobby-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.lobby-wait-banner {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffe678;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 217, 61, 0.45);
  background: rgba(34, 24, 6, 0.72);
}

.lb-table-wrap {
  max-height: 320px;
  overflow-y: auto;
}

.lb-empty {
  text-align: center;
  color: var(--ink-dim);
  padding: 22px 12px !important;
}

.worm-key-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(59, 240, 228, 0.14);
  border: 1px solid rgba(59, 240, 228, 0.35);
  color: #8afff7;
}

.worm-receipt-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(8, 28, 42, 0.86);
  border: 1px solid rgba(68, 242, 164, 0.65);
  color: #b7ffdf;
  font-size: 12px;
  font-weight: 800;
}

.worm-receipt-banner.is-wr {
  border-color: #ffd93d;
  background: rgba(44, 30, 8, 0.88);
  color: #fff2a8;
  box-shadow: 0 0 22px rgba(255, 217, 61, 0.28);
}

.hud-net-pill {
  border-color: rgba(68, 242, 164, 0.55);
  color: #a9ffd8;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
}

.hud-net-pill .net-dot {
  background: #44f2a4;
}

body.is-mobile .menu-header-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

body.is-mobile .net-status-pill {
  padding: 4px 8px;
  font-size: 9.5px;
}

body.is-mobile .btn-records {
  padding: 4px 9px;
  font-size: 10px;
}

body.is-mobile .racer-setup-bar {
  padding: 6px 10px;
  gap: 6px 8px;
}

body.is-mobile #inputCallsign {
  width: 96px;
  font-size: 11px;
  padding: 4px 7px;
}

body.is-mobile .wr-chip {
  margin-left: 0;
  font-size: 10px;
}

body.is-mobile .menu-footer-multi {
  gap: 7px;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(6, 13, 22, 0.0) 0%, rgba(6, 13, 22, 0.94) 18%, rgba(6, 13, 22, 0.98) 100%);
}

body.is-mobile .menu-footer-multi .btn-launch {
  width: 100%;
  flex: 0 0 auto;
  padding: 11px 14px;
  font-size: 13px;
}

body.is-mobile .btn-friend,
body.is-mobile .btn-solo {
  padding: 9px 12px;
  font-size: 11px;
}

body.is-mobile .lobby-seats-grid {
  grid-template-columns: 1fr;
}

body.is-mobile .hud-net-pill {
  display: none;
}


/* ========================================================================= */
/* GLOBAL MMO PLAYGROUND CTA, ZONE TELEPORT BAR & SOCIAL CHAT/EMOTE DOCK     */
/* ========================================================================= */
.menu-footer-multi {
  flex-direction: column;
  gap: 9px;
}

.btn-mmo-hero {
  width: min(560px, 100%);
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  background: linear-gradient(135deg, #2ef2e8 0%, #19c3ff 52%, #44f2a4 100%);
  color: #031522;
  box-shadow: 0 10px 28px rgba(46, 242, 232, 0.34);
}

.mmo-online-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(3, 21, 34, 0.84);
  color: #7ffff6;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.menu-footer-subrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-online-sm {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  border-radius: 999px;
  border-color: rgba(59, 240, 228, 0.55);
  color: #a9fff8;
}

/* Playground Mode HUD overrides (zero race clutter & guaranteed top-bar clearance on 1280px laptops!) */
body.is-playground #raceStrip,
body.is-playground #nextBuoyPill,
body.is-playground .minimap-legend {
  display: none !important;
}

body.is-playground .hud-top-left {
  max-width: min(390px, 31vw);
}

.hub-top-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
}

.hub-bar-main {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 15px;
  background: var(--glass-strong);
  border: 1px solid rgba(59, 240, 228, 0.38);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.hub-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #88ffcb;
  padding-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}

.hub-live-tag .net-dot {
  background: #44f2a4;
  box-shadow: 0 0 8px rgba(68, 242, 164, 0.9);
}

.hub-zone-pills {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hub-zone-btn {
  appearance: none;
  border: 1px solid rgba(155, 220, 255, 0.24);
  background: rgba(6, 18, 30, 0.78);
  color: #d6f0ff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.hub-zone-btn:hover,
.hub-zone-btn.active {
  background: rgba(59, 240, 228, 0.22);
  border-color: #3bf0e4;
  color: #ffffff;
}

.hub-score-strip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(6, 15, 26, 0.76);
  border: 1px solid rgba(255, 217, 61, 0.30);
  font-size: 10px;
  font-weight: 800;
  color: #c5e3f5;
  white-space: nowrap;
}

.hub-score-strip strong {
  color: #ffe678;
}

/* Social Chat & Quick-Emote Dock */
.hub-social-dock {
  position: fixed;
  left: 16px;
  bottom: 14px;
  width: min(328px, 34vw);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  z-index: 24;
}

.hub-chat-log {
  max-height: 132px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(5, 13, 23, 0.62);
  border: 1px solid rgba(135, 210, 245, 0.16);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  line-height: 1.32;
}

.hub-chat-log:empty {
  display: none;
}

.hub-chat-line {
  color: #e6f6ff;
  word-break: break-word;
}

.hub-chat-line .hc-name {
  font-weight: 900;
  color: #3bf0e4;
  margin-right: 5px;
}

.hub-chat-line.is-sys {
  color: #9dc8e0;
  font-style: italic;
}

.hub-chat-line.is-stunt {
  color: #ffe678;
  font-weight: 800;
}

.hub-emote-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hub-emote-btn {
  appearance: none;
  border: 1px solid rgba(155, 220, 255, 0.25);
  background: rgba(6, 16, 28, 0.80);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.hub-emote-btn:hover {
  transform: translateY(-1px);
  border-color: #3bf0e4;
}

.hub-chat-form {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px 4px 10px;
  border-radius: 999px;
  background: rgba(5, 14, 24, 0.84);
  border: 1px solid rgba(59, 240, 228, 0.30);
  backdrop-filter: blur(10px);
}

#inputHubChat {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12px;
  outline: none;
}

.hub-chat-send {
  appearance: none;
  border: none;
  background: rgba(59, 240, 228, 0.24);
  color: #9efff8;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

/* Mobile Playground Responsive Layout (zero overlap with minimap, speedometer & touch pedals!) */
body.is-mobile .btn-mmo-hero {
  width: 100%;
  flex: 0 0 auto;
  padding: 11px 14px;
  font-size: 13px;
}

body.is-mobile.is-playground .hud-top-center {
  max-width: calc(100vw - 114px);
}

body.is-mobile .hub-top-bar {
  width: 100%;
  align-items: flex-start;
  gap: 4px;
}

body.is-mobile .hub-bar-main {
  width: 100%;
  padding: 5px 7px;
  gap: 4px 5px;
  flex-wrap: wrap;
  justify-content: flex-start;
  border-radius: 12px;
}

body.is-mobile .hub-live-tag {
  font-size: 9px;
  padding-right: 4px;
  border-right: none;
}

body.is-mobile .hub-zone-pills {
  flex-wrap: wrap;
  gap: 3px;
}

body.is-mobile .hub-zone-btn {
  font-size: 8px;
  padding: 3px 6px;
}

body.is-mobile .hub-score-strip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 8px;
  padding: 2px 7px;
}

body.is-mobile .hub-social-dock {
  left: 8px;
  bottom: auto;
  top: calc(max(8px, env(safe-area-inset-top, 0px)) + 126px);
  width: min(252px, calc(100vw - 134px));
}

body.is-mobile .hub-emote-row {
  flex-wrap: wrap;
  gap: 4px;
}

body.is-mobile .hub-emote-btn {
  font-size: 11px;
  padding: 3px 7px;
}

body.is-mobile .hub-social-dock.is-collapsed .hub-chat-log,
body.is-mobile .hub-social-dock.is-collapsed .hub-chat-form {
  display: none;
}

body.is-mobile .hub-chat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 240, 228, 0.45);
  background: rgba(6, 18, 30, 0.85);
  color: #ffffff;
  font-size: 11px;
}
