html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #d8f2ff;
}

body {
  font-family: system-ui, sans-serif;
}

#race-view {
  display: block;
  width: 100vw;
  height: 100vh;
  outline: none;
}

.race-hud {
  position: fixed;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 14px;
  pointer-events: none;
  font-family: Impact, Haettenschweiler, "Arial Black", "Trebuchet MS", sans-serif;
  color: #fff7df;
  text-transform: uppercase;
  filter: drop-shadow(0 4px 0 #7b0710) drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
}

.race-hud--right {
  right: 18px;
  left: auto;
}

.race-hud__stat {
  min-width: 118px;
  padding: 8px 14px 10px;
  border: 3px solid #fff7df;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(219, 13, 28, 0.92), rgba(24, 82, 184, 0.86));
  transform: skewX(-8deg);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.24);
}

.race-hud__label,
.race-hud__value {
  display: block;
  transform: skewX(8deg);
}

.race-hud__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.race-hud__value {
  margin-top: 2px;
  font-size: 30px;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.control-panel {
  position: fixed;
  top: 92px;
  right: 18px;
  width: min(310px, calc(100vw - 36px));
  max-height: calc(100vh - 128px);
  padding: 16px;
  overflow: auto;
  border: 2px solid rgba(15, 42, 64, 0.32);
  border-radius: 8px;
  background: rgba(250, 253, 255, 0.92);
  box-shadow: 0 16px 40px rgba(12, 28, 42, 0.22);
  color: #142331;
  font-family: system-ui, sans-serif;
}

.control-panel[hidden] {
  display: none;
}

.control-panel__title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.2;
}

.control-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.control-field__label {
  font-size: 13px;
  font-weight: 700;
}

.control-field__inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: center;
}

.control-field input[type="range"] {
  width: 100%;
}

.control-field__number {
  box-sizing: border-box;
  width: 72px;
  padding: 5px 7px;
  border: 1px solid rgba(15, 42, 64, 0.35);
  border-radius: 5px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 13px;
}

.control-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
}

.control-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.control-button {
  width: 100%;
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 42, 64, 0.35);
  border-radius: 5px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.control-button[aria-pressed="true"] {
  border-color: rgba(34, 107, 138, 0.72);
  background: #dff7ff;
}

.control-stats {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 42, 64, 0.2);
}

.control-stat {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}

.control-stat dt {
  font-weight: 700;
}

.control-stat dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
