.spectate-button {
  background: var(--cyan);
}

.spectate-bar {
  position: absolute;
  z-index: 120;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%) rotate(-1deg);
  pointer-events: auto;
}

.spectate-bar button,
.spectate-following {
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.spectate-bar button {
  min-height: 52px;
  padding: 8px 14px;
  font: inherit;
  text-transform: uppercase;
}

.spectate-close {
  width: 52px;
  padding: 0 !important;
  background: var(--pink) !important;
  font-size: 1.45rem !important;
  line-height: 1;
}

.spectate-next {
  background: var(--yellow) !important;
}

.spectate-following {
  min-width: clamp(190px, 34vw, 370px);
  padding: 8px 16px 10px;
  text-align: center;
}

.spectate-following strong,
.spectate-following b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spectate-following strong {
  font-size: clamp(0.86rem, 2.1vw, 1.2rem);
  line-height: 1.05;
}

.spectate-following b {
  margin-top: 4px;
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.turn-spectating .controls,
.turn-spectating .boost-hud,
.turn-spectating .race-position-hud {
  display: none !important;
}

.turn-spectating .message {
  opacity: 0 !important;
}

@media (max-height: 430px) {
  .spectate-bar {
    bottom: 8px;
    gap: 7px;
  }

  .spectate-bar button {
    min-height: 46px;
    padding: 6px 10px;
  }

  .spectate-close {
    width: 46px;
  }

  .spectate-following {
    min-width: clamp(165px, 31vw, 295px);
    padding: 6px 10px 8px;
  }

  .spectate-following strong {
    font-size: 0.8rem;
  }

  .spectate-following b {
    margin-top: 2px;
    font-size: 1rem;
  }
}
