@import url('https://fonts.googleapis.com/css2?family=Teko:wght@600;700&display=swap');

.dr-shell {
  --dr-bg-0: #0d111a;
  --dr-bg-1: #16223b;
  --dr-panel: rgba(17, 24, 39, 0.9);
  --dr-border: rgba(148, 163, 184, 0.28);
  --dr-text: #f4f7ff;
  --dr-muted: #9aa7c8;
  --dr-accent: #4fd1c5;
  --dr-accent-2: #38b2ac;
  --dr-danger: #ff6b6b;
  --dr-warning: #ffd166;
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 600px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  color: var(--dr-text);
  background:
    linear-gradient(135deg, rgba(191, 219, 255, 0.26) 0%, rgba(17, 36, 68, 0.96) 18%, rgba(7, 16, 31, 0.99) 48%, rgba(33, 61, 104, 0.94) 74%, rgba(4, 10, 22, 0.99) 100%);
  box-shadow:
    0 20px 55px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(126, 166, 222, 0.34),
    0 0 28px rgba(28, 73, 145, 0.24);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.dr-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.16) 16%, rgba(255, 255, 255, 0) 32%),
    linear-gradient(180deg, rgba(255, 248, 214, 0.14) 0%, rgba(255, 248, 214, 0) 28%, rgba(255, 214, 96, 0.12) 100%);
  mix-blend-mode: screen;
}

.dr-screen {
  position: absolute;
  inset: 0;
  display: none;
}

.dr-screen.is-active {
  display: block;
}

.dr-screen-splash {
  background-color: #06080f;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.dr-splash-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 6, 12, 0.14) 0%, rgba(4, 6, 12, 0.18) 40%, rgba(4, 6, 12, 0.74) 100%);
}

.dr-splash-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 92px;
  z-index: 1;
  height: 0;
}

.dr-splash-btn.dr-btn-primary {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 136px;
  padding: 3px 18px 1px;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: #b30000;
  color: #ffffff;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(179, 0, 0, 0.28),
    0 0 20px rgba(179, 0, 0, 0.34);
  animation: dr-splash-btn-pulse 1.65s ease-in-out infinite;
}

.dr-splash-btn.dr-btn-primary:hover,
.dr-splash-btn.dr-btn-primary:focus-visible {
  background: #c40000;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.52);
}

.dr-splash-btn.dr-btn-primary:active {
  transform: translateX(-50%) translateY(1px) scale(0.988);
}

.dr-screen-start,
.dr-screen-car-select,
.dr-screen-overview,
.dr-screen-template,
.dr-screen-pit-game,
.dr-screen-pit-reward,
.dr-screen-results {
  padding: 26px 20px;
}

.dr-panel {
  height: 100%;
  border: 1px solid rgba(182, 194, 214, 0.34);
  border-radius: 14px;
  background: var(--dr-panel);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(112, 129, 156, 0.24),
    0 0 18px rgba(11, 18, 34, 0.18);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.dr-panel-wide {
  justify-content: flex-start;
}

.dr-garage-panel {
  justify-content: flex-start;
  gap: 16px;
  padding-top: 18px;
}

.dr-garage-head h3 {
  color: #ffffff;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dr-garage-stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.dr-garage-image-wrap {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}

.dr-garage-image {
  max-width: 100%;
  max-height: 210px;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.28));
}

.dr-garage-arrow {
  appearance: none;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(182, 194, 214, 0.34);
  background: rgba(10, 16, 28, 0.84);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.dr-garage-arrow > span {
  display: block;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.dr-garage-arrow-left > span {
  border-right: 14px solid #ffffff;
}

.dr-garage-arrow-right > span {
  border-left: 14px solid #ffffff;
}

.dr-garage-arrow:hover,
.dr-garage-arrow:focus-visible {
  background: rgba(24, 38, 62, 0.96);
  border-color: rgba(182, 194, 214, 0.52);
}

.dr-garage-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 14px;
}

.dr-garage-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(154, 167, 200, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.dr-garage-dot.is-active {
  background: #f3f5f7;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 10px rgba(255, 255, 255, 0.18);
}

.dr-garage-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-height: 96px;
}

.dr-garage-title {
  margin: 0;
  color: #ffffff;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.dr-garage-lock-note {
  margin: 0;
  color: #f7d36d;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 24px;
  line-height: 1;
}

.dr-garage-description {
  margin: 0;
  color: #d8e0f3;
  font-size: 14px;
  line-height: 1.5;
  max-width: 320px;
}

.dr-garage-actions {
  margin-top: auto;
  margin-bottom: 22px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.dr-garage-continue.dr-btn-primary {
  position: static !important;
  left: auto !important;
  right: auto !important;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  transform: none !important;
  min-width: 136px;
  padding: 3px 18px 1px;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: #b30000;
  color: #ffffff;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(179, 0, 0, 0.28),
    0 0 20px rgba(179, 0, 0, 0.34);
  animation: dr-vehicle-continue-pulse 1.65s ease-in-out infinite;
}

.dr-garage-continue.dr-btn-primary:hover,
.dr-garage-continue.dr-btn-primary:focus-visible {
  background: #c40000;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.52);
}

.dr-garage-continue.dr-btn-primary:active {
  transform: translateY(1px) scale(0.988);
}

.dr-garage-continue[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.12);
  animation: none;
}

.dr-screen-pit-game .dr-panel,
.dr-screen-pit-reward .dr-panel {
  border: 2px solid rgba(244, 205, 92, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 196, 0.22),
    0 0 0 1px rgba(255, 222, 125, 0.5),
    0 0 0 4px rgba(160, 118, 18, 0.16),
    0 0 24px rgba(232, 182, 49, 0.28);
}

.dr-kicker {
  color: var(--dr-accent);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.dr-title,
.dr-title-sm {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dr-title {
  font-size: 38px;
  line-height: 1;
}

.dr-title-sm {
  font-size: 30px;
}

.dr-subtitle {
  margin: 0;
  color: var(--dr-muted);
  font-size: 15px;
}

.dr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.dr-screen-pit-reward .dr-actions {
  justify-content: center;
  width: 100%;
  display: flex;
  margin-top: 12px;
}

.dr-btn {
  appearance: none;
  border: 1px solid var(--dr-border);
  border-radius: 10px;
  background: rgba(13, 17, 26, 0.7);
  color: var(--dr-text);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.dr-btn:hover,
.dr-btn:focus-visible {
  background: rgba(28, 38, 60, 0.92);
  border-color: rgba(148, 163, 184, 0.5);
}

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

.dr-btn-primary {
  background: linear-gradient(145deg, var(--dr-accent), var(--dr-accent-2));
  border-color: rgba(79, 209, 197, 0.7);
  color: #09121f;
}

.dr-btn-primary:hover,
.dr-btn-primary:focus-visible {
  background: linear-gradient(145deg, #67e2d8, #48c4bb);
}

.dr-screen-pit-reward [data-dr-action="reward-continue"] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  min-width: 164px;
  padding: 8px 18px 6px;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  border-radius: 12px;
  border: 1px solid rgba(255, 245, 196, 0.52);
  background: linear-gradient(180deg, #f7d36d 0%, #e3b237 52%, #b98712 100%);
  color: #112444;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(232, 182, 49, 0.3),
    0 0 18px rgba(232, 182, 49, 0.24);
}

.dr-screen-pit-game .dr-actions {
  justify-content: center;
  width: 100%;
  display: flex;
  margin-top: 12px;
}

.dr-screen-pit-game [data-dr-action="pit-stop"] {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  min-width: 164px;
  padding: 8px 18px 6px;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  border-radius: 12px;
  border: 1px solid rgba(255, 245, 196, 0.52);
  background: linear-gradient(180deg, #f7d36d 0%, #e3b237 52%, #b98712 100%);
  color: #112444;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(232, 182, 49, 0.3),
    0 0 18px rgba(232, 182, 49, 0.24);
}

.dr-screen-pit-game [data-dr-action="pit-stop"]:hover,
.dr-screen-pit-game [data-dr-action="pit-stop"]:focus-visible {
  background: linear-gradient(180deg, #ffdf85 0%, #efbf48 52%, #c7951a 100%);
  color: #0d1b34;
  border-color: rgba(255, 248, 219, 0.72);
}

.dr-screen-pit-reward [data-dr-action="reward-continue"][hidden] {
  display: none !important;
}

.dr-screen-pit-reward [data-dr-action="reward-continue"]:hover,
.dr-screen-pit-reward [data-dr-action="reward-continue"]:focus-visible {
  background: linear-gradient(180deg, #ffdf85 0%, #efbf48 52%, #c7951a 100%);
  color: #0d1b34;
  border-color: rgba(255, 248, 219, 0.72);
}


.dr-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dr-overview-head h3 {
  margin: 0;
  font-size: 22px;
}

.dr-overview-head-pit h3 {
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.dr-overview-head-chest h3 {
  color: #f0c24f;
  text-shadow: 0 0 14px rgba(232, 182, 49, 0.22);
}

.dr-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--dr-border);
  background: rgba(7, 10, 18, 0.85);
}

.dr-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--dr-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}

.dr-toggle-btn.is-active {
  background: rgba(79, 209, 197, 0.22);
  color: var(--dr-text);
}

.dr-overview-meta {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dr-muted);
  font-size: 12px;
}

.dr-snapshot {
  margin-top: 10px;
  border: 1px solid var(--dr-border);
  border-radius: 12px;
  background: rgba(9, 13, 24, 0.7);
  padding: 10px;
  min-height: 190px;
}

.dr-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 8px;
}

.dr-row + .dr-row {
  margin-top: 6px;
}

.dr-row.is-you {
  background: rgba(79, 209, 197, 0.13);
}

.dr-rank {
  color: var(--dr-muted);
  font-weight: 700;
}

.dr-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dr-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.dr-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dr-text);
  text-decoration: none;
}

.dr-name:hover,
.dr-name:focus-visible {
  color: #d7fff9;
}

.dr-score {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.dr-empty {
  color: var(--dr-muted);
  font-size: 14px;
  padding: 8px;
}

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

.dr-template-card {
  border: 1px solid var(--dr-border);
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.78);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dr-template-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dr-template-size {
  color: var(--dr-muted);
  font-size: 12px;
}

.dr-template-preview {
  width: 100%;
  max-height: 88px;
  object-fit: contain;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    linear-gradient(45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%, transparent 75%, rgba(148, 163, 184, 0.12) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
}

.dr-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  z-index: 4;
  height: 69px;
}

.dr-status-tile,
.dr-turn-tile {
  position: absolute;
  top: 0;
  width: 69px;
  height: 69px;
  border: 2px solid rgba(214, 231, 255, 0.96);
  border-radius: 8px;
  background: rgba(7, 10, 18, 0.75);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  text-align: center;
  pointer-events: none;
  overflow: hidden;
}

.dr-status-tile::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 11px;
  opacity: 0;
  background:
    conic-gradient(
      from -90deg,
      var(--dr-status-border-color, rgba(72, 255, 170, 0.92)) 0turn,
      var(--dr-status-border-color, rgba(72, 255, 170, 0.92)) calc(var(--dr-status-progress, 0) * 1turn),
      rgba(255, 255, 255, 0.08) calc(var(--dr-status-progress, 0) * 1turn),
      rgba(255, 255, 255, 0.08) 1turn
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  padding: 8px;
  z-index: 2;
  pointer-events: none;
}

.dr-status-tile {
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.34;
}

.dr-turn-tile {
  right: 0;
  opacity: 0.34;
}

.dr-status-tile.is-active,
.dr-turn-tile.is-active {
  opacity: 1;
}

.dr-status-tile.is-timed::before {
  opacity: 1;
}

.dr-status-tile.is-timed {
  border-color: transparent !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dr-status-tile.is-flash::before {
  opacity: 1;
  animation: dr-status-flash 0.5s ease-out 1;
}

.dr-status-tile.is-warning::before {
  opacity: 1;
  background:
    conic-gradient(
      from -90deg,
      rgba(255, 64, 64, 0.98) 0turn,
      rgba(255, 64, 64, 0.98) calc(var(--dr-status-progress, 0) * 1turn),
      rgba(255, 92, 92, 0.12) calc(var(--dr-status-progress, 0) * 1turn),
      rgba(255, 92, 92, 0.12) 1turn
    );
}

.dr-status-tile.is-warning-blink::before {
  opacity: 1;
  animation: dr-status-warning-blink 0.56s ease-out 1;
}

.dr-status-tile.is-positive {
  border-color: rgba(72, 255, 170, 0.82);
}

.dr-status-tile.is-negative {
  border-color: rgba(255, 49, 49, 0.9);
}

.dr-status-tile.is-weather {
  border-color: rgba(214, 234, 255, 0.92);
}

.dr-turn-tile {
  border-color: rgba(214, 231, 255, 0.96);
}

.dr-status-name,
.dr-turn-name {
  position: relative;
  z-index: 1;
  max-width: 100%;
  font-size: 10px;
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.dr-turn-number {
  position: absolute;
  right: 5px;
  bottom: 2px;
  z-index: 2;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.dr-turn-tile:not(.is-active) .dr-turn-number {
  display: none;
}

.dr-status-time {
  position: relative;
  z-index: 1;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
  color: #d6e7ff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.dr-status-image,
.dr-turn-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}

.dr-status-tile.has-image {
  background: rgba(7, 10, 18, 0.88);
}

.dr-status-tile.has-image .dr-status-name,
.dr-turn-tile.has-image .dr-turn-name {
  display: none;
}

.dr-turn-tile.has-image {
  background: rgba(7, 10, 18, 0.88);
}

@keyframes dr-status-flash {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.1);
  }
  35% {
    opacity: 1;
    transform: scale(1.045);
    filter: brightness(1.85);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes dr-splash-btn-pulse {
  0% {
    transform: translateX(-50%) scale(1);
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(179, 0, 0, 0.28),
      0 0 0 0 rgba(179, 0, 0, 0.34);
  }
  50% {
    transform: translateX(-50%) scale(1.035);
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(214, 54, 54, 0.44),
      0 0 0 10px rgba(179, 0, 0, 0),
      0 0 24px rgba(179, 0, 0, 0.46);
  }
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(179, 0, 0, 0.28),
      0 0 0 0 rgba(179, 0, 0, 0);
  }
}

@keyframes dr-garage-btn-pulse {
  0% {
    transform: scale(1);
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(179, 0, 0, 0.28),
      0 0 0 0 rgba(179, 0, 0, 0.34);
  }
  50% {
    transform: scale(1.035);
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(214, 54, 54, 0.44),
      0 0 0 10px rgba(179, 0, 0, 0),
      0 0 24px rgba(179, 0, 0, 0.46);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(179, 0, 0, 0.28),
      0 0 0 0 rgba(179, 0, 0, 0);
  }
}

@keyframes dr-vehicle-continue-pulse {
  0% {
    transform: scale(1);
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(179, 0, 0, 0.28),
      0 0 20px rgba(179, 0, 0, 0.34);
  }
  50% {
    transform: scale(1.035);
    box-shadow:
      0 16px 34px rgba(0, 0, 0, 0.32),
      0 0 0 1px rgba(214, 54, 54, 0.44),
      0 0 0 10px rgba(179, 0, 0, 0),
      0 0 24px rgba(179, 0, 0, 0.46);
  }
  100% {
    transform: scale(1);
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.28),
      0 0 0 1px rgba(179, 0, 0, 0.28),
      0 0 20px rgba(179, 0, 0, 0.34);
  }
}

@keyframes dr-status-warning-blink {
  0% {
    opacity: 1;
    filter: brightness(1.15);
  }
  45% {
    opacity: 1;
    filter: brightness(2.3);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

.dr-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(7, 10, 18, 0.75);
  font-size: 12px;
  font-weight: 700;
}

.dr-chip-position {
  position: absolute;
  left: 0;
  top: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 69px;
  height: 69px;
  padding: 6px;
  border: 2px solid rgba(214, 231, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.dr-chip-position-value {
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
}

.dr-chip-position-time {
  display: block;
  max-width: 100%;
  min-width: 4.6ch;
  text-align: center;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 23px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  color: #d6e7ff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.dr-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0e131c;
}

.dr-health,
.dr-boost,
.dr-accelerator {
  position: absolute;
  top: 94px;
  bottom: 112px;
  width: 28px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.dr-health {
  left: 10px;
}

.dr-boost {
  right: 10px;
  bottom: 314px;
}

.dr-accelerator {
  right: -5px;
  top: 312px;
  bottom: 112px;
  width: 58px;
  gap: 5px;
}

.dr-boost.is-near-miss-flash .dr-boost-track {
  border-color: rgba(255, 224, 130, 0.98);
  background: rgba(56, 42, 10, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 214, 102, 0.68),
    0 0 0 1px rgba(255, 214, 102, 0.32),
    0 0 16px rgba(255, 193, 7, 0.4);
}

.dr-boost.is-near-miss-flash .dr-boost-fill {
  background: linear-gradient(180deg, #fff1a6 0%, #ffd54f 52%, #ffb300 100%);
}

.dr-boost.is-near-miss-flash .dr-boost-pct {
  color: #fff0b8;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.4);
}

.dr-boost.is-slipstream-refill .dr-boost-track {
  border-color: rgba(255, 214, 102, 0.98);
  background: rgba(60, 42, 8, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 230, 158, 0.7),
    0 0 0 1px rgba(255, 214, 102, 0.28),
    0 0 16px rgba(255, 193, 7, 0.34);
}

.dr-boost.is-slipstream-refill .dr-boost-fill {
  background: linear-gradient(180deg, #fff2a6 0%, #ffd54f 50%, #d49a00 100%);
}

.dr-boost.is-slipstream-refill .dr-boost-pct {
  color: #ffe9a3;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.34);
}

.dr-lives {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.dr-shield {
  display: none;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 14px;
  color: #67e8f9;
  text-shadow: 0 0 8px rgba(103, 232, 249, 0.72);
  transform: scaleX(1.08);
}

.dr-shield.is-active {
  display: block;
}

.dr-heart {
  display: block;
  line-height: 1;
  font-size: 12px;
  color: #ff6578;
  text-shadow: 0 0 6px rgba(255, 101, 120, 0.45);
  transform-origin: center;
}

.dr-heart.is-empty {
  color: rgba(196, 203, 218, 0.34);
  text-shadow: none;
}

.dr-heart.is-life-intro {
  animation: dr-heart-intro 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes dr-heart-intro {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.35);
  }
  58% {
    opacity: 1;
    transform: translateY(-2px) scale(1.28);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dr-boost-track,
.dr-health-track {
  width: 14px;
  height: 100%;
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.52);
  background: rgba(10, 14, 24, 0.82);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(9, 12, 20, 0.6);
}

.dr-accelerator-track {
  position: relative;
  width: 18px;
  height: 100%;
  flex: 1;
  overflow: visible;
  margin: 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(180deg, rgba(8, 13, 21, 0.94), rgba(14, 21, 33, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(9, 12, 20, 0.75),
    0 10px 18px rgba(0, 0, 0, 0.22);
}

.dr-accelerator-track::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 16%),
    repeating-linear-gradient(
      180deg,
      rgba(196, 216, 235, 0.18) 0 1px,
      transparent 1px 21%
    );
  pointer-events: none;
}

.dr-accelerator-track::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 6px;
  width: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(82, 101, 122, 0.1), rgba(124, 144, 168, 0.24) 35%, rgba(92, 111, 132, 0.14) 100%);
  pointer-events: none;
}

.dr-boost-fill,
.dr-health-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  transition: height 80ms linear;
}

.dr-accelerator-fill {
  position: absolute;
  left: 50%;
  width: 6px;
  transform: translateX(-50%);
  bottom: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(215, 241, 255, 0.18) 0%, rgba(127, 217, 255, 0.3) 24%, rgba(52, 183, 255, 0.52) 58%, rgba(11, 110, 206, 0.74) 100%);
  transform-origin: bottom center;
  transition: height 80ms linear;
  box-shadow:
    0 0 14px rgba(52, 183, 255, 0.28);
}

.dr-accelerator.is-boosting .dr-accelerator-fill {
  background: linear-gradient(180deg, rgba(255, 240, 196, 0.2) 0%, rgba(255, 213, 95, 0.34) 22%, rgba(255, 140, 42, 0.58) 58%, rgba(195, 73, 18, 0.82) 100%);
  box-shadow:
    0 0 18px rgba(255, 184, 59, 0.34);
}

.dr-accelerator.is-braking .dr-accelerator-fill {
  background: linear-gradient(180deg, rgba(255, 197, 197, 0.18) 0%, rgba(255, 123, 123, 0.28) 28%, rgba(240, 59, 59, 0.52) 60%, rgba(143, 15, 29, 0.78) 100%);
  box-shadow:
    0 0 14px rgba(240, 59, 59, 0.3);
}

.dr-accelerator-indicator {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 34px;
  height: 10px;
  transform: translate(-50%, 0);
  border-radius: 999px;
  background: linear-gradient(180deg, #f7fbff 0%, #cce8ff 40%, #72c9ff 100%);
  border: 1px solid rgba(227, 242, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(12, 20, 32, 0.55),
    0 0 18px rgba(84, 198, 255, 0.42);
  transition: bottom 80ms linear, background 90ms ease, box-shadow 90ms ease;
}

.dr-accelerator.is-boosting .dr-accelerator-indicator {
  background: linear-gradient(180deg, #fff8df 0%, #ffe08b 42%, #ffb44a 100%);
  border-color: rgba(255, 242, 196, 0.8);
  box-shadow:
    0 0 0 1px rgba(38, 24, 6, 0.58),
    0 0 20px rgba(255, 184, 59, 0.5);
}

.dr-accelerator.is-braking .dr-accelerator-indicator {
  background: linear-gradient(180deg, #ffe0e0 0%, #ffabab 40%, #ff6666 100%);
  border-color: rgba(255, 220, 220, 0.76);
  box-shadow:
    0 0 0 1px rgba(42, 10, 14, 0.6),
    0 0 18px rgba(240, 59, 59, 0.44);
}

.dr-boost-fill {
  background: linear-gradient(180deg, #78f2db 0%, #39bdb3 52%, #2d7fa0 100%);
}

.dr-health-fill {
  background: linear-gradient(180deg, #ff8a80 0%, #ff4658 48%, #a4162a 100%);
}

.dr-boost-pct {
  min-width: 34px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: rgba(234, 241, 255, 0.96);
}

.dr-health-pct {
  min-width: 34px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 211, 211, 0.96);
}

.dr-accelerator-top,
.dr-accelerator-bottom,
.dr-accelerator-current {
  min-width: 58px;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  pointer-events: none;
}

.dr-accelerator-top,
.dr-accelerator-bottom {
  font-size: 9px;
  color: rgba(213, 229, 248, 0.76);
}

.dr-accelerator-current {
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 28px;
  line-height: 0.95;
  letter-spacing: 0.03em;
  color: rgba(236, 244, 255, 0.96);
  text-shadow: 0 0 10px rgba(52, 183, 255, 0.22);
}

.dr-accelerator.is-boosting .dr-accelerator-current {
  color: #ffe8b1;
  text-shadow: 0 0 10px rgba(255, 184, 59, 0.28);
}

.dr-accelerator.is-braking .dr-accelerator-current {
  color: #ffd0d0;
  text-shadow: 0 0 10px rgba(240, 59, 59, 0.26);
}

.dr-pit-callout {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Teko", "Segoe UI", Tahoma, sans-serif;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ff3131;
  background: rgba(6, 8, 14, 0.58);
  text-shadow: 0 0 18px rgba(255, 49, 49, 0.7), 0 2px 0 rgba(0, 0, 0, 0.7);
}

.dr-pit-panel {
  justify-content: flex-start;
}

.dr-pit-wheel {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 12px auto 4px;
}

.dr-pit-wheel-placeholder {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 10px solid #111827;
  background:
    url("../images/pit-wheel.png") center / cover no-repeat,
    radial-gradient(circle at center, #4b5563 0 16%, #111827 17% 24%, #707885 25% 42%, #202938 43% 58%, #080b12 59% 100%);
  color: rgba(244, 247, 255, 0.42);
  font-weight: 800;
  text-transform: uppercase;
}

.dr-pit-bar {
  position: absolute;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.42);
  border: 2px solid rgba(226, 232, 240, 0.26);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.24);
}

.dr-pit-bar-horizontal {
  left: 8%;
  right: 8%;
  top: calc(50% - 9px);
  height: 18px;
}

.dr-pit-bar-vertical {
  top: 8%;
  bottom: 8%;
  left: calc(50% - 9px);
  width: 18px;
}

.dr-pit-success,
.dr-pit-marker {
  position: absolute;
  border-radius: 999px;
}

.dr-pit-bar-horizontal .dr-pit-success {
  top: 0;
  bottom: 0;
  background:
    linear-gradient(
      90deg,
      rgba(255, 116, 116, 0.18) 0%,
      rgba(255, 116, 116, 0.18) 16.666%,
      rgba(255, 210, 110, 0.18) 16.666%,
      rgba(255, 210, 110, 0.18) 33.333%,
      rgba(72, 255, 170, 0.2) 33.333%,
      rgba(72, 255, 170, 0.2) 66.666%,
      rgba(255, 210, 110, 0.18) 66.666%,
      rgba(255, 210, 110, 0.18) 83.333%,
      rgba(255, 116, 116, 0.18) 83.333%,
      rgba(255, 116, 116, 0.18) 100%
    );
  box-shadow: inset 0 0 0 1px rgba(246, 255, 252, 0.2);
}

.dr-pit-bar-vertical .dr-pit-success {
  left: 0;
  right: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 116, 116, 0.18) 0%,
      rgba(255, 116, 116, 0.18) 16.666%,
      rgba(255, 210, 110, 0.18) 16.666%,
      rgba(255, 210, 110, 0.18) 33.333%,
      rgba(72, 255, 170, 0.2) 33.333%,
      rgba(72, 255, 170, 0.2) 66.666%,
      rgba(255, 210, 110, 0.18) 66.666%,
      rgba(255, 210, 110, 0.18) 83.333%,
      rgba(255, 116, 116, 0.18) 83.333%,
      rgba(255, 116, 116, 0.18) 100%
    );
  box-shadow: inset 0 0 0 1px rgba(246, 255, 252, 0.2);
}

.dr-pit-bar-horizontal .dr-pit-marker {
  top: -5px;
  width: 10px;
  height: 28px;
  background: #f8fafc;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.72), 0 0 0 1px rgba(0, 0, 0, 0.42);
  opacity: 0.32;
}

.dr-pit-bar-vertical .dr-pit-marker {
  left: -5px;
  width: 28px;
  height: 10px;
  background: #f8fafc;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.72), 0 0 0 1px rgba(0, 0, 0, 0.42);
  opacity: 0.32;
}

.dr-pit-marker.is-active {
  opacity: 1;
}

.dr-pit-stage {
  min-height: 22px;
  text-align: center;
  color: var(--dr-muted);
  font-size: 14px;
  font-weight: 700;
}

[data-dr-action="pit-stop"] {
  touch-action: none;
}

.dr-reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}

.dr-reward-grid.is-revealed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px 14px;
}

.dr-reward-box {
  position: relative;
  min-height: 82px;
  border: 1px solid rgba(255, 49, 49, 0.45);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(43, 18, 24, 0.92), rgba(12, 14, 22, 0.92));
  color: #f9fafb;
  font-weight: 900;
  font-size: 11px;
  line-height: 1.1;
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 8px 6px;
  --dr-chest-hold-progress: 0;
  --dr-chest-glow-alpha: 0.08;
  --dr-chest-shake: 0px;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.dr-reward-box[hidden] {
  display: none !important;
}

.dr-reward-chest-glow {
  position: absolute;
  inset: 12px;
  border-radius: 10px;
  background: radial-gradient(circle at center, rgba(255, 219, 92, var(--dr-chest-glow-alpha)) 0%, rgba(255, 175, 36, calc(var(--dr-chest-glow-alpha) * 0.7)) 45%, rgba(255, 175, 36, 0) 78%);
  opacity: 0;
  transform: scale(calc(0.85 + var(--dr-chest-hold-progress) * 0.28));
  transition: opacity 100ms linear, transform 100ms linear;
  pointer-events: none;
  z-index: 0;
}

.dr-reward-chest-image,
.dr-reward-label,
.dr-reward-hold {
  position: relative;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

.dr-reward-chest-image {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.dr-reward-label {
  display: block;
  text-align: center;
  font-size: 10px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.dr-reward-hold {
  display: none;
  color: rgba(255, 228, 146, 0.92);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.dr-reward-box.is-mystery .dr-reward-hold {
  display: block;
}

.dr-reward-box.is-mystery .dr-reward-label {
  display: none;
}

.dr-reward-box.is-opened .dr-reward-label,
.dr-reward-box.is-revealed-other .dr-reward-label {
  display: block;
}

.dr-reward-box.is-holding {
  animation: dr-reward-chest-shake 0.12s linear infinite;
}

.dr-reward-box.is-holding .dr-reward-chest-glow,
.dr-reward-box.is-bursting .dr-reward-chest-glow {
  opacity: 1;
}

.dr-reward-box.is-bursting {
  animation: dr-reward-chest-burst 0.22s ease-out 1;
}

.dr-reward-box.is-opened:not(.has-reward-image) .dr-reward-chest-image,
.dr-reward-box.is-revealed-other:not(.has-reward-image) .dr-reward-chest-image,
.dr-reward-box.is-opened .dr-reward-hold,
.dr-reward-box.is-revealed-other .dr-reward-hold {
  display: none;
}

.dr-reward-box.is-opened.has-reward-image .dr-reward-chest-image,
.dr-reward-box.is-revealed-other.has-reward-image .dr-reward-chest-image {
  display: block;
  width: 52px;
  height: 52px;
}

.dr-reward-box.is-opened {
  border-color: rgba(255, 244, 170, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 243, 184, 0.42),
    0 0 22px rgba(255, 205, 76, 0.42),
    0 0 44px rgba(255, 196, 54, 0.3);
}

.dr-reward-box.is-revealed-other {
  border-color: rgba(214, 231, 255, 0.3);
  background: linear-gradient(180deg, rgba(30, 34, 46, 0.92), rgba(11, 14, 22, 0.92));
}

.dr-reward-box.is-revealed-other .dr-reward-label {
  color: rgba(214, 231, 255, 0.76);
}

.dr-reward-grid.is-revealed .dr-reward-box.is-reveal-featured {
  order: 0;
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 188px);
  min-height: 146px;
  padding: 12px 10px 10px;
  gap: 8px;
  opacity: 1 !important;
  filter: none !important;
  border-color: rgba(255, 231, 146, 0.98);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 224, 115, 0.16) 0%, rgba(255, 224, 115, 0) 48%),
    linear-gradient(180deg, rgba(56, 39, 10, 0.96), rgba(18, 14, 12, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 196, 0.2),
    0 0 0 2px rgba(232, 182, 49, 0.28),
    0 0 28px rgba(255, 205, 76, 0.34),
    0 0 58px rgba(255, 187, 32, 0.22);
}

.dr-reward-grid.is-revealed .dr-reward-box.is-reveal-featured .dr-reward-chest-image {
  width: 74px;
  height: 74px;
  z-index: 3;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}

.dr-reward-grid.is-revealed .dr-reward-box.is-reveal-featured .dr-reward-label {
  font-size: 12px;
  line-height: 1.08;
  color: #fff6cf;
  text-shadow: 0 0 14px rgba(255, 206, 84, 0.28);
  z-index: 3;
}

.dr-reward-grid.is-revealed .dr-reward-box.is-reveal-featured .dr-reward-chest-glow {
  opacity: 1;
  inset: 4px;
  background:
    radial-gradient(circle at center, rgba(255, 229, 127, 0.42) 0%, rgba(255, 193, 56, 0.26) 42%, rgba(255, 175, 36, 0) 76%);
  transform: scale(1.08);
}

.dr-reward-grid.is-revealed .dr-reward-box.is-reveal-secondary {
  order: 1;
  min-height: 98px;
  opacity: 0.68;
  filter: grayscale(0.18);
}

.dr-reward-grid.is-revealed .dr-reward-box.is-reveal-secondary .dr-reward-chest-image {
  width: 42px;
  height: 42px;
}

.dr-reward-grid.is-revealed .dr-reward-box.is-reveal-secondary .dr-reward-label {
  font-size: 9px;
}

.dr-reward-box:disabled {
  cursor: default;
  opacity: 1;
}

.dr-reward-box.is-picked {
  border-color: rgba(79, 209, 197, 0.9);
  background: linear-gradient(180deg, rgba(24, 87, 83, 0.95), rgba(11, 22, 28, 0.95));
}

.dr-reward-box.is-picked.is-positive {
  border-color: rgba(72, 255, 170, 0.9);
}

.dr-reward-box.is-picked.is-negative {
  border-color: rgba(255, 49, 49, 0.95);
  background: linear-gradient(180deg, rgba(93, 20, 31, 0.95), rgba(21, 12, 18, 0.95));
}

@keyframes dr-reward-chest-shake {
  0% {
    transform: translate(calc(var(--dr-chest-shake) * -0.45), calc(var(--dr-chest-shake) * -0.2)) rotate(-1.2deg);
  }
  25% {
    transform: translate(calc(var(--dr-chest-shake) * 0.45), calc(var(--dr-chest-shake) * 0.15)) rotate(1deg);
  }
  50% {
    transform: translate(calc(var(--dr-chest-shake) * -0.3), calc(var(--dr-chest-shake) * 0.35)) rotate(-0.8deg);
  }
  75% {
    transform: translate(calc(var(--dr-chest-shake) * 0.3), calc(var(--dr-chest-shake) * -0.25)) rotate(0.9deg);
  }
  100% {
    transform: translate(calc(var(--dr-chest-shake) * -0.2), calc(var(--dr-chest-shake) * 0.18)) rotate(-0.55deg);
  }
}

@keyframes dr-reward-chest-burst {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  45% {
    transform: scale(1.08);
    filter: brightness(2);
  }
  100% {
    transform: scale(0.96);
    filter: brightness(1.15);
  }
}

.dr-mobile-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8;
  display: none;
  height: calc(52px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.dr-control {
  position: absolute;
  bottom: calc(8px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  pointer-events: auto;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(9, 12, 20, 0.85);
  color: #f6f8ff;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.dr-control-boost {
  background: rgba(79, 209, 197, 0.22);
  letter-spacing: 0.02em;
  min-height: 32px;
  padding: 5px 12px;
  opacity: 0.72;
}

.dr-control-boost.is-active {
  background: rgba(79, 209, 197, 0.36);
  border-color: rgba(79, 209, 197, 0.9);
  box-shadow: 0 0 0 1px rgba(79, 209, 197, 0.3) inset;
  opacity: 0.92;
}

.dr-control-brake {
  left: 50%;
  bottom: calc(44px + env(safe-area-inset-bottom));
  background: rgba(255, 209, 102, 0.18);
  letter-spacing: 0.02em;
  min-height: 30px;
  padding: 5px 11px;
  opacity: 0.72;
}

.dr-control-brake.is-active {
  background: rgba(255, 209, 102, 0.34);
  border-color: rgba(255, 209, 102, 0.85);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.26) inset;
  opacity: 0.94;
}

.dr-control-left,
.dr-control-right {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 2px 8px;
  color: rgba(246, 248, 255, 0.62);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
  left: 50%;
}

.dr-control-boost {
  left: 50%;
}

.dr-mobile-zones {
  position: absolute;
  left: 0;
  right: 0;
  top: 60px;
  bottom: calc(64px + env(safe-area-inset-bottom));
  z-index: 3;
  display: none;
  pointer-events: none;
}

.dr-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  border: 0;
  background: transparent;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.dr-zone-left {
  left: 0;
}

.dr-zone-right {
  right: 0;
}

.dr-results-meta {
  color: var(--dr-muted);
  font-size: 14px;
}


@media (pointer: coarse), (max-width: 860px) {
  .dr-mobile-controls,
  .dr-mobile-zones {
    display: grid;
  }

  .dr-control-left,
  .dr-control-right {
    display: none;
  }

  .dr-control-boost,
  .dr-control-brake {
    bottom: calc(8px + env(safe-area-inset-bottom));
    min-height: 32px;
  }

  .dr-control-brake {
    transform: translateX(-50%);
  }

  .dr-health,
  .dr-boost {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .dr-boost {
    bottom: calc(286px + env(safe-area-inset-bottom));
  }

  .dr-accelerator {
    bottom: calc(92px + env(safe-area-inset-bottom));
    top: 298px;
  }
}

@media (max-width: 480px) {
  .dr-shell {
    border-radius: 12px;
    max-width: 100%;
  }

  .dr-screen-start,
  .dr-screen-car-select,
  .dr-screen-overview,
  .dr-screen-template,
  .dr-screen-pit-game,
  .dr-screen-pit-reward,
  .dr-screen-results {
    padding: 12px;
  }

  .dr-splash-actions {
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .dr-template-grid {
    grid-template-columns: 1fr;
  }

  .dr-title {
    font-size: 33px;
  }

}



