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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #14110e;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  color: #f4efe6;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#canvas-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, #281d14 0%, #120e0b 75%);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.9s;
}

#loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-card {
  width: min(380px, 86vw);
  text-align: center;
}

.loader-eyebrow {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #d9a05b;
  margin-bottom: 10px;
  font-weight: 600;
}

.loader-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 34px;
  letter-spacing: 0.04em;
  color: #f8f1e5;
  margin-bottom: 12px;
}

.loader-status {
  font-size: 12.5px;
  color: rgba(244, 239, 230, 0.65);
  margin-bottom: 20px;
  min-height: 18px;
}

.loader-bar-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 240, 220, 0.14);
  border-radius: 999px;
  overflow: hidden;
}

.loader-bar-fill {
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, #c67632, #f2c37d);
  transition: width 0.25s ease-out;
}

/* Minimalist Translucent HUD */
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.8s ease;
}

#hud.hud-hidden {
  opacity: 0;
  pointer-events: none;
}

#hud.hud-hidden .hud-panel {
  pointer-events: none;
}

.hud-panel {
  position: absolute;
  pointer-events: auto;
  background: rgba(18, 15, 12, 0.44);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 235, 205, 0.12);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.hud-top-left {
  top: 20px;
  left: 20px;
  padding: 12px 16px;
  min-width: 215px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e59b4c;
  box-shadow: 0 0 8px rgba(229, 155, 76, 0.8);
}

.brand-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: rgba(248, 241, 229, 0.72);
}

.fps-pill {
  margin-left: auto;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: rgba(241, 215, 176, 0.72);
  background: rgba(255, 235, 205, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

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

.quality-group {
  display: inline-flex;
  background: rgba(255, 245, 230, 0.05);
  border: 1px solid rgba(255, 235, 205, 0.12);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.quality-btn {
  border: none;
  background: transparent;
  color: rgba(248, 241, 229, 0.65);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.quality-btn:hover {
  color: #fff;
}

.quality-btn.active {
  background: rgba(224, 146, 68, 0.26);
  color: #ffebd0;
}

.telemetry-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

#speed-value {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff8ee;
  line-height: 1;
}

.speed-unit {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(248, 241, 229, 0.55);
}

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

.meta-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
}

.meta-label {
  color: rgba(248, 241, 229, 0.45);
  letter-spacing: 0.12em;
  width: 38px;
}

.meta-val {
  color: #f1d7b0;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* Minimalist Brass-Accented Alpine Trip Computer Plaque */
.alpine-plaque {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(224, 178, 114, 0.22);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plaque-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.plaque-key {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(232, 198, 146, 0.56);
}

.plaque-val {
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #f4dec0;
}

.plaque-sep {
  opacity: 0.28;
  font-size: 11px;
}

.plaque-radio-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(228, 176, 108, 0.26);
  background: rgba(228, 176, 108, 0.10);
  color: #f7dfbc;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.plaque-radio-btn:hover {
  background: rgba(228, 176, 108, 0.22);
  border-color: rgba(238, 190, 122, 0.52);
  color: #fff;
}

.radio-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(248, 241, 229, 0.35);
  transition: background 0.2s, box-shadow 0.2s;
}

.plaque-radio-btn.playing .radio-dot {
  background: #f2ae57;
  box-shadow: 0 0 7px rgba(242, 174, 87, 0.9);
}

.hud-top-right {
  top: 20px;
  right: 20px;
  padding: 9px 14px;
  font-size: 11.5px;
  color: rgba(248, 241, 229, 0.72);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  font-family: inherit;
  color: #f8e3c4;
  background: rgba(255, 235, 205, 0.12);
  border: 1px solid rgba(255, 235, 205, 0.18);
  border-radius: 4px;
}

.dot-sep {
  opacity: 0.35;
}

.hud-bottom-right {
  bottom: 20px;
  right: 20px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.control-row {
  display: flex;
  gap: 7px;
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 235, 205, 0.14);
  background: rgba(255, 245, 230, 0.06);
  color: rgba(248, 241, 229, 0.85);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.12s;
}

.hud-btn:hover {
  background: rgba(255, 245, 230, 0.14);
  border-color: rgba(255, 220, 170, 0.32);
  color: #fff;
}

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

.hud-btn.active {
  background: rgba(224, 146, 68, 0.22);
  border-color: rgba(235, 168, 92, 0.55);
  color: #ffebd0;
}

.btn-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(248, 241, 229, 0.35);
  transition: background 0.2s, box-shadow 0.2s;
}

.hud-btn.active .btn-indicator {
  background: #f2ae57;
  box-shadow: 0 0 8px rgba(242, 174, 87, 0.9);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(248, 241, 229, 0.68);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 48px;
}

#sun-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #273b6e 0%, #b84a27 24%, #e59c4a 55%, #f5dfb0 100%);
  outline: none;
  cursor: pointer;
}

.cycle-btn {
  border: 1px solid rgba(255, 235, 205, 0.14);
  background: rgba(255, 245, 230, 0.06);
  color: rgba(248, 241, 229, 0.72);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.cycle-btn:hover {
  background: rgba(255, 245, 230, 0.14);
  color: #fff;
}

.cycle-btn.active {
  background: rgba(114, 152, 224, 0.28);
  border-color: rgba(145, 182, 245, 0.55);
  color: #dce9ff;
}

#sun-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff6e8;
  border: 2px solid #d4893e;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s;
}

#sun-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-value {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #f1d7b0;
  min-width: 36px;
  text-align: right;
}

.hidden {
  display: none !important;
}

/* Cockpit Free-Look Pill */
.cockpit-pill {
  bottom: 20px;
  left: 20px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(248, 241, 229, 0.72);
}

.row-right-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Minimal GT Car Spec Popover */
.spec-popover {
  bottom: 202px;
  right: 20px;
  width: 268px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 30;
}

.spec-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.spec-heading {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(235, 200, 148, 0.65);
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.swatch-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.35), transparent 55%), var(--swatch);
  border: 2px solid rgba(255, 235, 205, 0.22);
  cursor: pointer;
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s;
}

.swatch-btn:hover {
  transform: scale(1.1);
}

.swatch-btn.active {
  border-color: #f6ca82;
  box-shadow: 0 0 0 2px rgba(246, 202, 130, 0.35);
  transform: scale(1.08);
}

.spec-sublabel {
  font-size: 11px;
  color: #f2dab5;
}

.trim-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.trim-btn {
  text-align: left;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 235, 205, 0.12);
  background: rgba(255, 245, 230, 0.05);
  color: rgba(248, 241, 229, 0.8);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.trim-btn:hover {
  background: rgba(255, 245, 230, 0.12);
  color: #fff;
}

.trim-btn.active {
  background: rgba(224, 146, 68, 0.22);
  border-color: rgba(235, 168, 92, 0.55);
  color: #ffebd0;
}

.plate-editor-row {
  display: flex;
  align-items: stretch;
  border-radius: 7px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 235, 205, 0.28);
  background: rgba(244, 242, 235, 0.94);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.plate-eu-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  background: linear-gradient(180deg, #0038a8, #00287a);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-right: 1px solid rgba(0, 0, 0, 0.22);
}

.plate-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #141518;
  font-family: "Arial Narrow", "Bahnschrift Condensed", monospace;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 5px 8px;
  text-align: center;
}

.plate-input:focus {
  background: #ffffff;
}

.spec-footer {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 235, 205, 0.12);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Direct Mobile Glassmorphism Touch Controls */
.mobile-controls {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 26;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.mobile-left,
.mobile-right {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  touch-action: none;
}

.mobile-gyro-row,
.mobile-aux-row {
  display: flex;
  gap: 6px;
}

.mobile-steer-row,
.mobile-pedal-row {
  display: flex;
  gap: 8px;
}

.touch-pad {
  width: 68px;
  height: 62px;
  border-radius: 14px;
  border: 1px solid rgba(255, 232, 198, 0.24);
  background: rgba(18, 15, 12, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8e6c8;
  font-size: 20px;
  cursor: pointer;
}

.touch-pad.pressed,
.touch-pill.pressed,
.touch-pedal.pressed {
  transform: scale(0.95);
  border-color: #f6ca82;
  background: rgba(228, 152, 68, 0.45);
}

.touch-pill {
  flex: 1;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 232, 198, 0.22);
  background: rgba(18, 15, 12, 0.48);
  backdrop-filter: blur(12px);
  color: #f7e7cc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.touch-pedal {
  width: 72px;
  height: 78px;
  border-radius: 14px;
  border: 1px solid rgba(255, 232, 198, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.touch-pedal.brake {
  background: rgba(154, 42, 34, 0.42);
  color: #ffd6d0;
}

.touch-pedal.gas {
  background: rgba(208, 134, 54, 0.42);
  color: #fff2da;
}

/* Wireless Phone Remote QR Pairing Modal */
.remote-modal-card {
  width: min(410px, 92vw);
}

.remote-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.qr-frame {
  padding: 12px;
  border-radius: 16px;
  background: #fdf7ec;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}

.qr-frame canvas {
  display: block;
  width: 204px;
  height: 204px;
  image-rendering: pixelated;
}

.remote-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #f4dfc0;
}

.remote-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f0ad4e;
  box-shadow: 0 0 8px rgba(240, 173, 78, 0.85);
}

.remote-dot.linked {
  background: #52d992;
  box-shadow: 0 0 10px rgba(82, 217, 146, 0.9);
}

.remote-url-box {
  display: block;
  font-family: monospace;
  font-size: 12px;
  color: #f9e3bc;
  text-decoration: none;
  background: rgba(255, 240, 215, 0.09);
  border: 1px solid rgba(255, 232, 198, 0.22);
  border-radius: 8px;
  padding: 8px 12px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
  transition: background 0.16s, border-color 0.16s;
}

.remote-url-box:hover {
  background: rgba(255, 240, 215, 0.16);
  border-color: rgba(245, 192, 112, 0.55);
  color: #fff;
}

.remote-ip-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.remote-lan-warn {
  font-size: 11px;
  line-height: 1.4;
  color: #ffd79e;
  background: rgba(224, 148, 66, 0.16);
  border: 1px solid rgba(242, 182, 104, 0.38);
  border-radius: 8px;
  padding: 6px 10px;
}

.remote-static-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(248, 241, 229, 0.78);
}

.share-url-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(235, 178, 102, 0.34);
  background: rgba(224, 152, 72, 0.14);
  color: #f9e2be;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.share-url-btn:hover {
  background: rgba(224, 152, 72, 0.28);
  border-color: rgba(242, 192, 118, 0.65);
  color: #fff;
}

/* Prominent Refined Slow-TV Ambient Mode Button */
.tv-mode-btn {
  background: linear-gradient(135deg, rgba(224, 148, 66, 0.28), rgba(168, 90, 42, 0.26));
  border-color: rgba(242, 182, 104, 0.52);
  color: #fff0d6;
  font-weight: 600;
}

.tv-mode-btn:hover {
  background: linear-gradient(135deg, rgba(234, 160, 78, 0.42), rgba(188, 106, 52, 0.38));
  border-color: rgba(250, 204, 134, 0.8);
}

.tv-mode-btn.active {
  background: linear-gradient(135deg, rgba(238, 162, 74, 0.55), rgba(186, 104, 48, 0.48));
  border-color: #ffd089;
  box-shadow: 0 0 14px rgba(238, 162, 74, 0.35);
}

/* Alpine Rally Game Mode Button & Minimalist Arcade HUD */
.game-mode-btn {
  background: rgba(54, 152, 106, 0.18);
  border-color: rgba(96, 206, 152, 0.42);
  color: #dffae9;
  font-weight: 600;
}

.game-mode-btn:hover {
  background: rgba(54, 152, 106, 0.34);
  border-color: rgba(126, 232, 178, 0.72);
}

.game-mode-btn.active {
  background: rgba(62, 174, 118, 0.44);
  border-color: #82ebb5;
  box-shadow: 0 0 14px rgba(82, 214, 148, 0.32);
}

.game-hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 22;
}

.game-timer-panel {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 22px;
  text-align: center;
  min-width: 196px;
}

.game-stage-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2px;
}

.game-eyebrow {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(242, 206, 154, 0.72);
}

.game-cp-dist {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: #9be8c2;
  font-variant-numeric: tabular-nums;
}

.game-timer-val {
  font-size: 32px;
  font-weight: 300;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: #fff8ee;
}

.game-timer-val.urgent {
  color: #ff6e54;
  text-shadow: 0 0 14px rgba(255, 110, 84, 0.65);
}

.game-score-panel {
  top: 20px;
  right: 20px;
  padding: 10px 16px;
  min-width: 210px;
  text-align: right;
}

.game-score-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.game-mult-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(235, 162, 68, 0.28);
  border: 1px solid rgba(245, 188, 102, 0.55);
  color: #ffe3b0;
  font-variant-numeric: tabular-nums;
}

.game-score-val {
  font-size: 27px;
  font-weight: 400;
  color: #fff8ec;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.game-best-line {
  font-size: 10px;
  color: rgba(248, 241, 229, 0.58);
  margin-top: 3px;
}

.game-feed {
  position: absolute;
  top: 108px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.feed-item {
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(18, 15, 12, 0.58);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 225, 175, 0.22);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #ffdfb0;
  animation: feedPop 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.feed-item.emerald { border-color: rgba(114, 228, 168, 0.5); color: #bdf7d6; }
.feed-item.cyan { border-color: rgba(124, 212, 248, 0.5); color: #cdefff; }
.feed-item.amber { border-color: rgba(248, 182, 86, 0.55); color: #ffe5b3; }
.feed-item.red { border-color: rgba(248, 104, 88, 0.55); color: #ffc6be; }

@keyframes feedPop {
  0% { opacity: 0; transform: translateX(14px); }
  12% { opacity: 1; transform: translateX(0); }
  78% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

.game-drift-pill {
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-color: rgba(245, 180, 78, 0.55);
  background: rgba(34, 22, 12, 0.62);
}

.drift-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #f6b656;
}

#game-drift-pts {
  font-size: 18px;
  font-weight: 600;
  color: #fff3da;
  font-variant-numeric: tabular-nums;
}

.drift-dist {
  font-size: 11px;
  color: rgba(248, 241, 229, 0.72);
  font-variant-numeric: tabular-nums;
}

/* Run Complete Summary Modal */
.game-over-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 10, 8, 0.68);
  backdrop-filter: blur(12px);
}

.game-over-card {
  width: min(440px, 90vw);
  padding: 28px 30px;
  border-radius: 18px;
  background: rgba(24, 19, 15, 0.88);
  border: 1px solid rgba(245, 206, 152, 0.24);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.go-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 28px;
  color: #fff6e8;
  margin-bottom: 20px;
}

.go-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.go-stat {
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(255, 245, 230, 0.05);
  border: 1px solid rgba(255, 235, 205, 0.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.go-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: rgba(248, 241, 229, 0.52);
}

.go-num {
  font-size: 20px;
  font-weight: 500;
  color: #fff6e8;
  font-variant-numeric: tabular-nums;
}

.go-num.accent {
  color: #f5b95b;
}

.go-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* AAA Photo Mode Collapsible Bottom Bar */
.photo-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100vw - 32px));
  z-index: 35;
  padding: 12px 16px;
  background: rgba(16, 14, 12, 0.56);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 232, 198, 0.16);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.photo-bar.ui-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
}

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

.photo-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #f6e1c2;
}

.photo-hints {
  font-size: 11px;
  color: rgba(248, 241, 229, 0.58);
  margin-left: 6px;
}

.photo-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.photo-sliders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 235, 205, 0.1);
}

.photo-slider-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(248, 241, 229, 0.72);
}

.photo-slider-item label {
  min-width: 56px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
  color: rgba(248, 241, 229, 0.62);
}

.photo-slider-item input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 235, 205, 0.22);
  outline: none;
  cursor: pointer;
}

.photo-slider-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff6e8;
  border: 2px solid #d4893e;
}

.photo-slider-item span {
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #f1d7b0;
}

@media (max-width: 720px) {
  .photo-sliders {
    grid-template-columns: 1fr;
  }
  .photo-hints {
    display: none;
  }
}

/* Scenic Toast */
#scenic-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 25;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(18, 15, 12, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 225, 180, 0.16);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #f3dfc0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#scenic-toast.toast-hidden {
  opacity: 0;
  transform: translateY(8px);
}

@media (max-width: 720px) {
  .hud-top-right {
    display: none;
  }
  .hud-bottom-right {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
  .hud-top-left {
    top: 14px;
    left: 14px;
  }
  .control-row {
    justify-content: space-between;
  }
}
