.turn-sr-only {
  position: absolute !important;
  width: 0.75px !important;
  height: 0.75px !important;
  padding: 0 !important;
  margin: -0.75px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.stats .race-position-hud {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 1;
  min-width: 0;
  padding: 5.25px 7.5px 6px;
  border-radius: 10.5px;
  background: color-mix(in srgb, var(--turn-surface-page) 90%, transparent);
  text-align: left;
  transform: none;
  transform-origin: center;
}

.stats .race-position-hud[hidden] {
  display: block !important;
  visibility: hidden;
}

.stats .race-position-hud span {
  display: block;
  font-size: inherit;
  letter-spacing: inherit;
}

.stats .race-position-hud strong {
  display: block;
  margin-top: 2.25px;
  font-size: max(var(--turn-text-floor, 11px), clamp(0.7125rem, 2.5vw, 1.05rem));
  line-height: 1;
  letter-spacing: -0.04em;
}

.stats .chip:nth-child(2),
.stats .chip:nth-child(3) {
  width: clamp(51px, 8vw, 67.5px);
}

.stats .chip:nth-child(4),
.stats .chip:nth-child(5) {
  width: clamp(84px, 13vw, 109.5px);
}

/* POSITION is the longest label in the row: the chip fits it, never narrower than its
   neighbours (it overflowed into TIME on a phone in landscape). */
.stats .chip.race-position-hud {
  flex-shrink: 0;
  width: auto;
  min-width: clamp(51px, 8vw, 67.5px);
  white-space: nowrap;
}

.stats .race-position-hud.position-pop {
  z-index: 2;
  animation: turn-position-pop 360ms cubic-bezier(.16,.82,.24,1);
}

@keyframes turn-position-pop {
  0%, 100% {
    background: color-mix(in srgb, var(--turn-surface-page) 90%, transparent);
    transform: scale(1);
  }

  38% {
    background: var(--yellow);
    transform: scale(1.16) rotate(2deg);
  }

  72% {
    transform: scale(1.06) rotate(-1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stats .race-position-hud.position-pop {
    animation: none;
    background: var(--yellow);
  }
}

@media (max-height: 322.5px) {
  .stats .chip:nth-child(1) {
    width: 84px;
  }

  .stats .chip:nth-child(2),
  .stats .chip:nth-child(3) {
    width: 51px;
  }

  .stats .chip:nth-child(4),
  .stats .chip:nth-child(5) {
    width: 84px;
  }

  .map-wrap {
    width: min(20vw, 117px);
  }
}

@media (max-width: 570px) and (orientation: landscape) {
  .topbar {
    gap: 6px;
  }

  .stats {
    gap: 4.5px;
  }

  .stats .chip:nth-child(1) {
    width: 81px;
  }

  .stats .chip:nth-child(2),
  .stats .chip:nth-child(3) {
    width: 48px;
  }

  .stats .chip:nth-child(4),
  .stats .chip:nth-child(5) {
    width: 84px;
  }

  .stats .race-position-hud span {
    font-size: max(var(--turn-text-floor, 11px), 0.375rem);
  }

  .map-wrap {
    width: min(18vw, 99px);
  }
}
