/* ==========================================================================
   AquaRacers — Precision Marine Motorsport Telemetry & Carbon-Fiber RC UI
   ========================================================================== */

:root {
  /* Smoked Obsidian & Deep Maritime Glass Palette */
  --ocean-deep: #05111c;
  --glass-bg: rgba(7, 16, 26, 0.72);
  --glass-bg-elevated: rgba(9, 19, 31, 0.84);
  --glass-bg-card: rgba(11, 23, 36, 0.62);
  --glass-inset: rgba(4, 10, 18, 0.56);

  /* Specular Hairline Borders & Metallic Highlights */
  --border-hairline: rgba(190, 220, 245, 0.14);
  --border-subtle: rgba(190, 220, 245, 0.22);
  --border-bright: rgba(210, 232, 250, 0.34);
  --edge-specular: inset 0 1px 0 rgba(255, 255, 255, 0.09);

  /* Disciplined Marine Motorsport Accents */
  --champagne: #dfc07a;
  --champagne-bright: #f0d79a;
  --champagne-deep: #b89143;
  --ice: #f0f5fa;
  --titanium: #c7d6e4;
  --slate-light: #8ea5ba;
  --slate-muted: #5d758c;
  --telemetry-cyan: #67c8de;
  --telemetry-teal: #49b3a7;
  --bronze: #c78d5e;
  --emerald: #42b88a;
  --crimson: #d9464f;
  --crimson-soft: #eb8a91;
  --amber: #d99b3c;

  --font-sans: "Inter", "SF Pro Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", "Consolas", "Liberation Mono", monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-hud: 0 8px 26px rgba(2, 8, 16, 0.42), 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-panel: 0 24px 64px rgba(1, 7, 14, 0.68), 0 2px 6px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ocean-deep);
  color: var(--ice);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
}

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

.hidden {
  display: none !important;
}

/* Full-Viewport Shell & Canvas */
.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Mode Visibility Transitions */
.app-shell[data-mode="title"] .hud-top,
.app-shell[data-mode="title"] .rc-transmitter,
.app-shell[data-mode="title"] .missed-buoy-banner {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
}

.app-shell[data-mode="title"] .rc-transmitter {
  transform: translateY(14px);
}

.app-shell[data-mode="results"] .rc-transmitter,
.app-shell[data-mode="results"] .missed-buoy-banner {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Top Precision Telemetry HUD Bar
   ========================================================================== */

.hud-top {
  position: fixed;
  top: 10px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

/* Unified Instrument Telemetry Strip on Left */
.hud-left {
  gap: 0;
  background: var(--glass-bg);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  box-shadow: var(--edge-specular), var(--shadow-hud);
  overflow: hidden;
}

.hud-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 42px;
  padding: 5px 13px;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.hud-card + .hud-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(190, 220, 245, 0.14);
}

.hud-label {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--slate-light);
  line-height: 1;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.hud-value {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ice);
  line-height: 1.08;
}

/* Position Accent Bar (Refined Motorsport Indicator) */
.hud-position {
  min-width: 80px;
  padding-left: 14px;
  border-left: 3px solid var(--champagne);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hud-position.rank-1 {
  border-left-color: var(--champagne);
  background: linear-gradient(90deg, rgba(223, 192, 122, 0.14), transparent 78%);
}
.hud-position.rank-1 #hud-pos-num {
  color: var(--champagne-bright);
}

.hud-position.rank-2 {
  border-left-color: var(--titanium);
  background: linear-gradient(90deg, rgba(199, 214, 228, 0.12), transparent 78%);
}
.hud-position.rank-2 #hud-pos-num {
  color: var(--ice);
}

.hud-position.rank-3 {
  border-left-color: var(--bronze);
  background: linear-gradient(90deg, rgba(199, 141, 94, 0.14), transparent 78%);
}
.hud-position.rank-3 #hud-pos-num {
  color: #ddb089;
}

.hud-position.rank-other {
  border-left-color: var(--telemetry-cyan);
  background: linear-gradient(90deg, rgba(103, 200, 222, 0.08), transparent 78%);
}
.hud-position.rank-other #hud-pos-num {
  color: var(--titanium);
}

.pos-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1.05;
}

#hud-pos-num {
  font-size: 1.06rem;
  font-weight: 800;
}

.pos-total {
  font-size: 0.72rem;
  color: var(--slate-muted);
  font-weight: 600;
}

.hud-lap {
  min-width: 74px;
}

.hud-timer {
  min-width: 112px;
}

.timer-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.penalty-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffecee;
  background: rgba(217, 70, 79, 0.86);
  border: 1px solid rgba(255, 166, 172, 0.38);
  box-shadow: 0 2px 10px rgba(217, 70, 79, 0.35);
}

.penalty-badge.flash {
  animation: penaltyFlash 0.55s ease-out 2;
}

@keyframes penaltyFlash {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(1.38); }
}

/* Center Course Plaque & Right Career Telemetry Strip */
.hud-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 13px;
  background: var(--glass-bg);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  box-shadow: var(--edge-specular), var(--shadow-hud);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--champagne);
  box-shadow: 0 0 6px rgba(223, 192, 122, 0.55);
  flex-shrink: 0;
}

.course-pill-name {
  color: var(--ice);
  letter-spacing: 0.02em;
}

.pill-sep {
  color: rgba(190, 220, 245, 0.25);
}

.course-pill-dir {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--champagne);
  letter-spacing: 0.1em;
}

.career-pill {
  gap: 9px;
  padding: 0 11px;
}

.career-pill-wl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
}

.wl-w {
  color: var(--emerald);
}

.wl-l {
  color: var(--crimson-soft);
}

.wl-dash {
  color: var(--slate-muted);
}

.career-pill-pct {
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(190, 220, 245, 0.08);
  border: 1px solid rgba(190, 220, 245, 0.16);
  color: var(--titanium);
  font-size: 0.69rem;
  font-weight: 700;
}

/* Precision Machined Action Icon Buttons */
.hud-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  background: var(--glass-bg);
  color: var(--titanium);
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  box-shadow: var(--edge-specular), var(--shadow-hud);
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn .icon-q {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
}

.icon-btn:hover {
  border-color: var(--border-bright);
  background: rgba(18, 35, 52, 0.88);
  color: var(--ice);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(0) scale(0.97);
}

.icon-btn[aria-pressed="true"] {
  color: var(--crimson-soft);
  border-color: rgba(217, 70, 79, 0.42);
  background: rgba(45, 16, 22, 0.78);
}

.icon-btn-accent {
  border-color: rgba(223, 192, 122, 0.30);
  color: var(--champagne);
}

.icon-btn-accent:hover {
  border-color: rgba(223, 192, 122, 0.58);
  color: var(--champagne-bright);
}

/* ==========================================================================
   Missed Buoy Warning Banner (Motorsport Race Control Alert)
   ========================================================================== */

.missed-buoy-banner {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: rgba(26, 10, 14, 0.88);
  border: 1px solid rgba(217, 70, 79, 0.55);
  border-left: 3px solid var(--crimson);
  box-shadow: var(--edge-specular), 0 10px 28px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(12px);
  color: #fcebec;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
  animation: raceAlertPulse 1.3s ease-in-out infinite;
}

.warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-xs);
  background: var(--crimson);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.72rem;
}

@keyframes raceAlertPulse {
  0%, 100% { border-color: rgba(217, 70, 79, 0.48); }
  50% { border-color: rgba(240, 118, 126, 0.92); }
}

/* ==========================================================================
   Broadcast Countdown & Telemetry Event Callout Toasts
   ========================================================================== */

.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.countdown-value {
  font-family: var(--font-mono);
  font-size: clamp(4.2rem, 10vw, 6.8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #ffffff 18%, #b9ccde 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 24px rgba(2, 10, 20, 0.72));
  animation: countdownReveal 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

.countdown-value.is-go {
  background: linear-gradient(180deg, #fff6db 12%, #dfc07a 68%, #b68d3c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 28px rgba(2, 10, 20, 0.78)) drop-shadow(0 0 18px rgba(223, 192, 122, 0.32));
}

.countdown-sub {
  margin-top: 12px;
  padding: 5px 14px;
  border-radius: var(--radius-xs);
  background: rgba(7, 16, 26, 0.78);
  border: 1px solid var(--border-subtle);
  border-top-color: rgba(223, 192, 122, 0.32);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--titanium);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-hud);
}

@keyframes countdownReveal {
  0% { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.toast-container {
  position: fixed;
  top: 102px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  width: min(92vw, 400px);
}

.race-toast {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: rgba(7, 16, 26, 0.86);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--telemetry-cyan);
  box-shadow: var(--edge-specular), var(--shadow-hud);
  backdrop-filter: blur(14px);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ice);
  text-align: center;
  animation: toastSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.race-toast.toast-info {
  border-left-color: var(--telemetry-cyan);
  color: var(--ice);
}

.race-toast.toast-gold {
  border-left-color: var(--champagne);
  border-color: rgba(223, 192, 122, 0.36);
  border-left-width: 3px;
  background: linear-gradient(90deg, rgba(44, 34, 15, 0.90), rgba(10, 20, 32, 0.88));
  color: var(--champagne-bright);
}

.race-toast.toast-warn {
  border-left-color: var(--amber);
  border-color: rgba(217, 155, 60, 0.36);
  border-left-width: 3px;
  background: linear-gradient(90deg, rgba(44, 28, 10, 0.90), rgba(10, 20, 32, 0.88));
  color: #f8d8a2;
}

.race-toast.toast-danger {
  border-left-color: var(--crimson);
  border-color: rgba(217, 70, 79, 0.42);
  border-left-width: 3px;
  background: linear-gradient(90deg, rgba(48, 14, 18, 0.92), rgba(10, 20, 32, 0.88));
  color: #f8cdd0;
}

.race-toast.leaving {
  animation: toastSlideOut 0.22s ease forwards;
}

@keyframes toastSlideIn {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

/* ==========================================================================
   Bottom-Right Carbon-Fiber & Brushed-Aluminum RC Transmitter Widget
   ========================================================================== */

.rc-transmitter {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 22;
  width: 244px;
  transition: opacity 0.24s ease, transform 0.24s ease;
  touch-action: none;
}

/* Machined 2.4GHz SMA Stubby Antenna */
.rc-antenna {
  position: relative;
  margin-left: 22px;
  width: 8px;
  height: 22px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #10161d 0%, #3d4b59 38%, #1e2730 72%, #0c1117 100%);
  border: 1px solid rgba(190, 220, 245, 0.12);
  border-bottom: none;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.45);
}

/* Knurled metallic base collar */
.rc-antenna::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -2px;
  right: -2px;
  height: 6px;
  border-radius: 1px;
  background: repeating-linear-gradient(
    90deg,
    #35424f 0px,
    #7f94a8 1px,
    #25303b 2px,
    #25303b 3px
  );
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

/* Subtle metallic tip cap */
.rc-antenna::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 4px;
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(90deg, #876c34, #dfc07a 50%, #7a5f2a);
}

/* Woven 2x2 Carbon-Fiber Faceplate + Anodized Aluminum Bezel */
.rc-body {
  position: relative;
  padding: 11px 13px 12px;
  border-radius: 12px;
  background-color: #10161e;
  background-image:
    linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 42%, rgba(0, 0, 0, 0.35) 100%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.032) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.032) 75%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.32) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.32) 75%);
  background-size: 100% 100%, 6px 6px, 6px 6px;
  background-position: 0 0, 0 0, 3px 3px;
  border: 1px solid rgba(186, 210, 232, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.65),
    inset 0 0 0 2px rgba(25, 35, 46, 0.85),
    0 18px 42px rgba(1, 6, 12, 0.68),
    0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Miniature Recessed Corner Hex Screws */
.rc-screw {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8da2b5, #2b3844 65%, #0e141a 100%);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.8), 0 0.5px 0 rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.rc-screw-tl { top: 5px; left: 5px; }
.rc-screw-tr { top: 5px; right: 5px; }
.rc-screw-bl { bottom: 5px; left: 5px; }
.rc-screw-br { bottom: 5px; right: 5px; }

.rc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.rc-brand {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: var(--titanium);
}

.rc-brand-sub {
  font-weight: 600;
  color: var(--slate-muted);
  letter-spacing: 0.06em;
}

.rc-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Realistic Bezeled Status LED */
.rc-led {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #a8f0d4, #2ca374 60%, #144d37 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.75),
    0 0 6px rgba(66, 184, 138, 0.55);
}

.rc-led.warn {
  background: radial-gradient(circle at 35% 35%, #ffb8bd, #d9464f 60%, #6b171d 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.75),
    0 0 8px rgba(217, 70, 79, 0.75);
}

.rc-buoy-readout {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--champagne);
  letter-spacing: 0.08em;
}

/* Recessed Monochrome-Ice/Amber Telemetry LCD Screen */
.rc-lcd {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  margin-bottom: 9px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(180deg, #071720 0%, #0b222e 55%, #071923 100%);
  border: 1px solid rgba(130, 175, 200, 0.22);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.75),
    inset 0 0 14px rgba(103, 200, 222, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* Subtle diagonal glass glare across LCD */
.rc-lcd::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}

.rc-speed-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.rc-speed-num {
  font-size: 1.52rem;
  font-weight: 700;
  line-height: 1;
  color: #cfeff7;
  text-shadow: 0 0 10px rgba(103, 200, 222, 0.28);
  min-width: 2ch;
}

.rc-speed-unit {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(162, 212, 226, 0.68);
}

.rc-lcd-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.rc-meta-item {
  font-size: 0.66rem;
  font-weight: 700;
  color: #9cb9c9;
  letter-spacing: 0.04em;
}

.rc-wake-tag {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(73, 179, 167, 0.14);
  border: 1px solid rgba(73, 179, 167, 0.28);
  color: #7bd6ca;
}

.rc-wake-tag.choppy {
  background: rgba(217, 155, 60, 0.18);
  border-color: rgba(223, 192, 122, 0.42);
  color: var(--champagne-bright);
}

/* Interactive Controls Well */
.rc-controls-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 9px;
  align-items: stretch;
}

/* Anodized Throttle Trigger Housing */
.rc-throttle-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(6, 12, 18, 0.78), rgba(12, 20, 29, 0.72));
  border: 1px solid rgba(180, 208, 232, 0.14);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.55);
  cursor: ns-resize;
  touch-action: none;
  transition: border-color 0.15s ease;
}

.rc-throttle-pad.active {
  border-color: rgba(223, 192, 122, 0.5);
}

.rc-pad-label {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--slate-muted);
}

.rc-throttle-housing {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 76px;
}

/* Millimeter calibration tick marks beside throttle slot */
.rc-throttle-ticks {
  position: absolute;
  inset: 4px 2px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(165, 192, 214, 0.28) 0px,
      rgba(165, 192, 214, 0.28) 1px,
      transparent 1px,
      transparent 7px
    );
  opacity: 0.75;
  pointer-events: none;
}

.rc-throttle-track {
  position: relative;
  width: 16px;
  height: 76px;
  border-radius: 4px;
  background: linear-gradient(90deg, #050a0f, #0d1720 50%, #050a0f);
  border: 1px solid rgba(180, 208, 232, 0.18);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.rc-throttle-mid {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(223, 192, 122, 0.45);
}

.rc-throttle-fill {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, #74d1e5, #3d988e);
  transition: background 0.12s ease;
}

.rc-throttle-fill.is-reverse {
  background: linear-gradient(180deg, var(--amber), var(--crimson));
}

/* Machined Aluminum Grip-Ridged Throttle Thumb */
.rc-throttle-thumb {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 11px;
  transform: translateY(-50%);
  border-radius: 3px;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.25) 0px,
      rgba(255, 255, 255, 0.25) 1px,
      rgba(20, 30, 40, 0.45) 1px,
      rgba(20, 30, 40, 0.45) 3px
    ),
    linear-gradient(90deg, #7e93a6, #d4e1ec 48%, #6d8194);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(0, 0, 0, 0.7);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.72);
}

/* Recessed Steering Wheel Bay */
.rc-wheel-pad {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px 6px 5px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 46%, rgba(16, 28, 40, 0.78), rgba(5, 11, 17, 0.88));
  border: 1px solid rgba(180, 208, 232, 0.14);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.62);
  cursor: ew-resize;
  touch-action: none;
  transition: border-color 0.15s ease;
}

.rc-wheel-pad.active {
  border-color: rgba(223, 192, 122, 0.5);
}

.rc-wheel-arc {
  position: absolute;
  top: 6px;
  width: 78px;
  height: 14px;
  border-top: 1px dashed rgba(223, 192, 122, 0.32);
  border-radius: 50%;
  pointer-events: none;
}

.rc-wheel-rotor {
  width: 84px;
  height: 84px;
  will-change: transform;
}

.rc-wheel-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.65));
}

.wheel-tire-base {
  fill: none;
  stroke: #1b222a;
  stroke-width: 9.5;
}

.wheel-tire-knurl {
  fill: none;
  stroke: rgba(110, 130, 148, 0.28);
  stroke-width: 2.2;
  stroke-dasharray: 2.2 2.6;
}

.wheel-tire-inner {
  fill: none;
  stroke: #0c1116;
  stroke-width: 1.5;
}

.wheel-rim {
  fill: none;
  stroke: url(#rc-metal-rim);
  stroke-width: 3.2;
}

.wheel-marker {
  fill: var(--champagne);
  stroke: rgba(25, 18, 6, 0.65);
  stroke-width: 0.7;
}

.wheel-spoke {
  fill: url(#rc-spoke-grad);
  stroke: rgba(215, 230, 245, 0.22);
  stroke-width: 0.6;
}

.wheel-cutout {
  fill: #091118;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 0.6;
}

.wheel-hub {
  fill: url(#rc-hub-grad);
  stroke: #7c92a6;
  stroke-width: 1.2;
}

.wheel-hub-ring {
  fill: none;
  stroke: rgba(223, 192, 122, 0.45);
  stroke-width: 0.8;
}

.wheel-hex {
  fill: #8da2b5;
  stroke: #18232d;
  stroke-width: 0.9;
}

.wheel-cap {
  fill: #1b2733;
}

.rc-wheel-hints {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 7px;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--slate-muted);
}

/* ==========================================================================
   Overlays & Precision Motorsport Glassmorphic Panels
   ========================================================================== */

.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 38%, rgba(5, 16, 26, 0.28), rgba(3, 10, 18, 0.64));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
}

.modal-backdrop {
  z-index: 60;
  background: rgba(3, 10, 18, 0.72);
  backdrop-filter: blur(8px);
}

.overlay-card {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(168deg, rgba(10, 22, 35, 0.84) 0%, rgba(6, 15, 25, 0.91) 100%);
  border: 1px solid var(--border-subtle);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    var(--shadow-panel);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  animation: cardSettle 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle top champagne hairline sheen on major cards */
.overlay-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(223, 192, 122, 0.45), transparent);
  pointer-events: none;
}

@keyframes cardSettle {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Title Card */
.title-card {
  max-width: 760px;
}

.title-hero {
  text-align: center;
  margin-bottom: 20px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  margin-bottom: 10px;
  border-radius: var(--radius-xs);
  background: rgba(223, 192, 122, 0.08);
  border: 1px solid rgba(223, 192, 122, 0.24);
  color: var(--champagne);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.badge-rule {
  display: inline-block;
  width: 14px;
  height: 1px;
  background: rgba(223, 192, 122, 0.6);
}

.game-title {
  margin: 0;
  font-size: clamp(2.35rem, 5.2vw, 3.45rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--ice);
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.game-title span {
  background: linear-gradient(180deg, #f7e4b5 10%, #dfc07a 58%, #b38c3f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.game-subtitle {
  margin: 9px 0 0;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--slate-light);
}

.title-grid {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-box {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--glass-bg-card);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--edge-specular);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(190, 220, 245, 0.09);
}

.panel-kicker {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--slate-light);
}

.preview-course-name {
  margin: 0 0 11px;
  font-size: 1.16rem;
  font-weight: 700;
  color: var(--ice);
  letter-spacing: 0.01em;
}

.course-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.meta-chip {
  display: flex;
  flex-direction: column;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--glass-inset);
  border: 1px solid rgba(190, 220, 245, 0.09);
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--slate-muted);
  margin-bottom: 2px;
}

.meta-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ice);
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(223, 192, 122, 0.34);
  background: rgba(223, 192, 122, 0.08);
  color: var(--champagne);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.btn-chip svg {
  width: 12px;
  height: 12px;
}

.btn-chip:hover {
  background: rgba(223, 192, 122, 0.18);
  border-color: rgba(223, 192, 122, 0.65);
  color: var(--champagne-bright);
}

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

/* Career Stats Grid */
.career-total-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--slate-light);
}

.career-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.results-career-grid {
  grid-template-columns: repeat(6, 1fr);
}

.stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  background: var(--glass-inset);
  border: 1px solid rgba(190, 220, 245, 0.09);
  text-align: center;
}

.stat-num {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--ice);
  line-height: 1.15;
}

.stat-label {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--slate-muted);
}

.stat-win .stat-num {
  color: var(--emerald);
}

.stat-loss .stat-num {
  color: var(--crimson-soft);
}

.stat-pct .stat-num {
  color: var(--champagne);
}

/* Controls Legend Strip */
.controls-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px 16px;
  padding: 9px 14px;
  margin-bottom: 18px;
  border-radius: var(--radius-md);
  background: var(--glass-inset);
  border: 1px solid rgba(190, 220, 245, 0.10);
}

.control-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--slate-light);
}

.control-item kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 21px;
  padding: 0 5px;
  border-radius: var(--radius-xs);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(190, 220, 245, 0.22);
  border-bottom-color: rgba(190, 220, 245, 0.34);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ice);
}

.or-sep {
  color: var(--slate-muted);
  font-size: 0.7rem;
}

/* Refined Machined Action Buttons */
.title-actions,
.results-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn-primary {
  background: linear-gradient(180deg, #275e80 0%, #163d57 100%);
  color: var(--ice);
  border-color: rgba(145, 206, 236, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 22px rgba(4, 18, 32, 0.45);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #30729a 0%, #1c4c6b 100%);
  border-color: rgba(180, 224, 248, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 10px 26px rgba(6, 28, 48, 0.52);
}

.btn-start {
  min-width: 224px;
  font-size: 0.9rem;
  background: linear-gradient(180deg, #e7ca84 0%, #c49b49 100%);
  color: #140f05;
  border-color: rgba(255, 238, 194, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 28px rgba(0, 0, 0, 0.45);
}

.btn-start:hover {
  background: linear-gradient(180deg, #f2d99b 0%, #d2a957 100%);
  border-color: #fff3d1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 12px 32px rgba(0, 0, 0, 0.52);
}

.btn-kbd-hint {
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(20, 15, 5, 0.16);
  border: 1px solid rgba(20, 15, 5, 0.18);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.btn-secondary {
  background: rgba(16, 32, 48, 0.78);
  color: var(--ice);
  border-color: var(--border-subtle);
  box-shadow: var(--edge-specular);
}

.btn-secondary:hover {
  background: rgba(24, 46, 68, 0.90);
  border-color: var(--border-bright);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--slate-light);
  border-color: var(--border-hairline);
}

.btn-ghost:hover {
  color: var(--ice);
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Post-Race Motorsport Classification Overlay
   ========================================================================== */

.results-card {
  max-width: 780px;
}

.results-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(190, 220, 245, 0.12);
}

.results-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 1.32rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.results-rank-badge.rank-1 {
  background: linear-gradient(165deg, #efd596, #bc9240);
  color: #161004;
  border: 1px solid rgba(255, 241, 202, 0.6);
}

.results-rank-badge.rank-2 {
  background: linear-gradient(165deg, #e2ecf5, #8fa5ba);
  color: #0b1622;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.results-rank-badge.rank-3 {
  background: linear-gradient(165deg, #dfb086, #9b6338);
  color: #1c0f04;
  border: 1px solid rgba(255, 220, 186, 0.42);
}

.results-rank-badge.rank-other {
  background: rgba(16, 33, 50, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--titanium);
}

.results-headings {
  flex: 1;
  min-width: 0;
}

.results-headline {
  margin: 0;
  font-size: clamp(1.28rem, 2.8vw, 1.72rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ice);
}

.results-subtitle {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--slate-light);
}

.outcome-pill {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.outcome-win {
  background: rgba(66, 184, 138, 0.14);
  border: 1px solid rgba(66, 184, 138, 0.46);
  color: #7ee2b8;
}

.outcome-loss {
  background: rgba(217, 70, 79, 0.14);
  border: 1px solid rgba(217, 70, 79, 0.42);
  color: var(--crimson-soft);
}

/* Motorsport Timing-Tower Classification Table */
.results-table-wrap {
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  background: var(--glass-inset);
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.results-table thead tr {
  background: linear-gradient(180deg, rgba(190, 220, 245, 0.06), rgba(190, 220, 245, 0.01));
}

.results-table th {
  padding: 9px 12px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--slate-muted);
  border-bottom: 1px solid rgba(190, 220, 245, 0.14);
}

.results-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(190, 220, 245, 0.07);
  color: var(--titanium);
}

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

.results-table .num-col {
  text-align: right;
}

.results-table tbody tr.is-player {
  background: linear-gradient(90deg, rgba(223, 192, 122, 0.14), rgba(103, 200, 222, 0.05) 65%, transparent);
}

.results-table tbody tr.is-player td {
  color: var(--ice);
}

.results-table tbody tr.is-player td:first-child {
  box-shadow: inset 3px 0 0 var(--champagne);
}

.boat-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.livery-swatch {
  position: relative;
  width: 16px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.livery-swatch-stripe {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: 0;
  width: 6px;
  transform: skewX(-20deg);
}

.boat-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--slate-muted);
}

.you-tag {
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(223, 192, 122, 0.2);
  border: 1px solid rgba(223, 192, 122, 0.45);
  color: var(--champagne-bright);
  font-family: var(--font-mono);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pen-cell-nonzero {
  color: var(--amber);
  font-weight: 700;
}

.pen-cell-zero {
  color: var(--slate-muted);
}

.adj-cell {
  font-weight: 700;
  color: var(--ice);
}

.results-career-box {
  margin-bottom: 18px;
}

.reset-career-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-link-danger {
  background: none;
  border: none;
  padding: 2px 4px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--crimson-soft);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.14s ease;
}

.btn-link-danger:hover {
  opacity: 1;
  text-decoration: underline;
}

.reset-confirm-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reset-confirm-text {
  font-size: 0.72rem;
  color: var(--champagne);
  font-weight: 600;
}

.btn-mini {
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: rgba(16, 32, 48, 0.9);
  color: var(--ice);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-mini-danger {
  background: rgba(185, 42, 52, 0.88);
  border-color: rgba(240, 145, 152, 0.45);
  color: #ffffff;
}

/* ==========================================================================
   Water Race Rules Modal
   ========================================================================== */

.rules-card {
  max-width: 720px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(190, 220, 245, 0.12);
}

.modal-title {
  margin: 4px 0 0;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ice);
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 13px;
  border-radius: var(--radius-md);
  background: var(--glass-bg-card);
  border: 1px solid var(--border-hairline);
}

.rule-badge {
  flex-shrink: 0;
  min-width: 58px;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.06em;
}

.badge-amber {
  background: rgba(217, 155, 60, 0.14);
  border: 1px solid rgba(217, 155, 60, 0.40);
  color: #ecc075;
}

.badge-red {
  background: rgba(217, 70, 79, 0.16);
  border: 1px solid rgba(217, 70, 79, 0.44);
  color: #f29ca2;
}

.badge-aqua {
  background: rgba(103, 200, 222, 0.12);
  border: 1px solid rgba(103, 200, 222, 0.36);
  color: #9be0ef;
}

.badge-teal {
  background: rgba(73, 179, 167, 0.12);
  border: 1px solid rgba(73, 179, 167, 0.36);
  color: #84d5cb;
}

.badge-gold {
  background: rgba(223, 192, 122, 0.14);
  border: 1px solid rgba(223, 192, 122, 0.42);
  color: var(--champagne-bright);
}

.rule-copy h3 {
  margin: 0 0 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ice);
}

.rule-copy p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.46;
  color: var(--slate-light);
}

.rule-copy strong {
  color: var(--ice);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 960px) {
  .hud-center {
    display: none;
  }

  .title-grid,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .results-career-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .hud-top {
    top: 8px;
    left: 8px;
    right: 8px;
    flex-wrap: wrap;
  }

  .career-pill {
    display: none;
  }

  .hud-card {
    padding: 4px 9px;
    min-height: 38px;
  }

  .hud-position {
    min-width: 68px;
  }

  .hud-timer {
    min-width: 94px;
  }

  .rc-transmitter {
    right: 10px;
    bottom: 10px;
    width: 218px;
  }

  .overlay-card {
    padding: 18px 16px;
  }

  .results-header {
    flex-wrap: wrap;
  }
}
