.park-sport-hud {
  --sport-ink: #253a33;
  --sport-paper: #f4ecd3;
  --sport-panel: #eee6ca;
  --sport-accent: #cde09a;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.park-sport-hud[hidden], .park-sport-hud [hidden] { display: none; }

.park-sport-panel {
  position: absolute;
  inset: .48rem auto auto .48rem;
  width: min(17.5rem, calc(100% - .96rem));
  max-height: calc(100% - .96rem);
  overflow: auto;
  padding: .42rem .52rem;
  background: var(--sport-panel);
  color: var(--sport-ink);
  border: 2px solid var(--sport-ink);
  box-shadow: 3px 3px #24392f99;
  font-size: .82rem;
  pointer-events: auto;
}

.park-sport-hud[data-phase="play"] .park-sport-panel {
  width: min(15.75rem, calc(100% - .96rem));
}

.park-sport-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .3rem;
}

.park-sport-panel h2, .park-sport-panel h3, .park-sport-panel p { margin: 0; }
.park-sport-panel h2 { font-size: .96rem; }
.park-sport-panel h3 { font-size: .86rem; }
.park-sport-panel p { line-height: 1.2; }
.park-sport-lobby section { padding-top: .45rem; }
.park-sport-lobby section + section { margin-top: .35rem; border-top: 1px solid #9ca68c; }
.park-sport-lobby section > div { display: flex; flex-wrap: wrap; gap: .38rem; margin: .35rem .1rem .18rem 0; }

.park-sport-button {
  padding: .21rem .42rem;
  border: 2px solid var(--sport-ink);
  background: var(--sport-paper);
  color: var(--sport-ink);
  box-shadow: inset 0 -2px #c4bb9c, 2px 2px #253a33;
  font: inherit;
  font-weight: 750;
  line-height: 1.12;
  cursor: pointer;
  touch-action: manipulation;
}

.park-sport-button:hover { background: #fff5d6; }
.park-sport-button:active { transform: translate(1px, 1px); box-shadow: inset 0 -1px #c4bb9c; }
.park-sport-button:focus-visible { outline: 2px solid #237d91; outline-offset: 2px; }
.park-sport-button:disabled { opacity: .78; cursor: default; }

.park-sport-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  text-align: center;
  gap: .3rem;
  padding: .27rem .3rem;
  margin-top: .35rem;
  background: #29493e;
  color: #fcf0d1;
  font-variant-numeric: tabular-nums;
}

.park-sport-score div { display: grid; }
.park-sport-score div span { overflow-wrap: anywhere; font-size: .68rem; }
.park-sport-score strong { font-size: 1.15rem; line-height: .98; }
.park-sport-clock { color: var(--sport-accent); font-size: .7rem; }
.park-sport-panel .park-sport-note, .park-sport-panel .park-sport-help { margin-top: .28rem; }
.park-sport-help { font-size: .74rem; }
.park-sport-panel [data-replay] { margin-top: .3rem; }

.park-sport-action {
  position: absolute;
  right: .58rem;
  bottom: .58rem;
  min-width: 4.3rem;
  min-height: 3.05rem;
  display: grid;
  align-content: center;
  padding: .3rem .68rem;
  background: var(--sport-accent);
  border-width: 3px;
  box-shadow: inset 0 -4px #8da564, 4px 4px #243a30;
  pointer-events: auto;
}

.park-sport-action[data-ready] { background: #fae19a; box-shadow: inset 0 -4px #cca452, 4px 4px #243a30; }
.park-sport-action kbd { font: inherit; font-size: .68rem; }

@media (any-pointer: coarse) {
  .park-sport-button { min-height: 44px; }
  .park-sport-action { min-width: 4.6rem; min-height: 3.15rem; }
  .park-sport-action kbd { display: none; }
}

@media (orientation: landscape) and (max-height: 500px) and (any-pointer: coarse),
       (orientation: landscape) and (max-height: 500px) and (max-width: 740px) {
  #world-foyer[data-park-game]:has(#world-controls:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }
  #world-foyer[data-park-game]:has(#world-controls:not([hidden])) > #world-controls { display: none; }
  .park-sport-hud[data-phase="play"] .park-sport-panel {
    width: min(13.5rem, calc(100% - .96rem));
    max-height: calc(100% - 8.35rem);
  }
  .park-sport-hud[data-phase="play"] .park-sport-help { display: none; }
}
