:root {
  --bg: #000000;
  --card: #141416;
  --ink: #f4f3f0;
  --soft: rgba(244, 243, 240, 0.56);
  --line: rgba(244, 243, 240, 0.1);
  --goal: #3ecf8e;
  --miss: #ff6b5a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ps { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(348px, 100%); padding: 18px 14px 14px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.ps__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px; }
.ps__head strong { font-size: 16px; line-height: 20px; font-weight: 720; letter-spacing: -0.01em; }
.ps__turn { display: block; height: 16px; overflow: hidden; font-size: 12.500px; line-height: 16px; font-weight: 680; color: var(--soft); white-space: nowrap; transition: color 0.3s; }
.ps__turn span { display: block; }
.ps[data-over] .ps__turn { color: var(--goal); }

.ps__teams { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.ps__team { display: grid; grid-template-columns: minmax(0, 1fr) auto 30px; gap: 10px; align-items: center; height: 48px; padding: 0 4px 0 10px; border-radius: 14px; transition: background-color 0.3s; }
.ps__team.is-up { background: rgba(244, 243, 240, 0.07); }
.ps__team b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.3s; }
.ps__slots { display: flex; gap: 5px; }
.ps__slot { position: relative; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 1.500px rgba(244, 243, 240, 0.18); transition: background-color 0.25s, box-shadow 0.25s; }
.ps__slot svg { display: block; width: 14px; height: 14px; fill: none; stroke-width: 2.300; stroke-linecap: round; stroke-linejoin: round; }
.ps__slot path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ps__slot[data-kick="goal"] { background: var(--goal); box-shadow: inset 0 0 0 1.500px var(--goal); }
.ps__slot[data-kick="goal"] svg { stroke: #06281a; }
.ps__slot[data-kick="miss"] { box-shadow: inset 0 0 0 1.500px var(--miss); }
.ps__slot[data-kick="miss"] svg { stroke: var(--miss); }
.ps__score { display: block; height: 28px; overflow: hidden; font-size: 24px; line-height: 28px; font-weight: 760; font-stretch: 92%; text-align: center; font-variant-numeric: tabular-nums; }
.ps__score span { display: block; }
.ps[data-over] .ps__team:not(.is-won) b { opacity: 0.5; }

.ps__acts { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; height: 44px; }
.ps__btn { display: grid; place-items: center; height: 44px; border-radius: 22px; font-size: 14px; font-weight: 720; white-space: nowrap; transition: opacity 0.3s, background-color 0.3s; }
.ps__btn--goal { background: var(--goal); color: #06281a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.ps__btn--miss { box-shadow: inset 0 0 0 1.500px rgba(244, 243, 240, 0.26); }
.ps__btn--new { position: absolute; inset: 0; background: var(--ink); color: #141416; opacity: 0; pointer-events: none; }
.ps[data-over] .ps__btn--goal, .ps[data-over] .ps__btn--miss { opacity: 0; pointer-events: none; }
.ps[data-over] .ps__btn--new { opacity: 1; pointer-events: auto; }
.ps__btn:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f4f3f0; stroke: #000000; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); z-index: 6; }

@media (hover: hover) { .ps__btn--miss:hover { box-shadow: inset 0 0 0 1.500px var(--ink); } }
@media (max-width: 350px) { .ps { padding: 16px 11px 12px; } .ps__team { gap: 8px; padding-left: 8px; } .ps__slots { gap: 4px; } .ps__team b { font-size: 13.500px; } }
@media (prefers-reduced-motion: reduce) { .ps__turn, .ps__team, .ps__team b, .ps__slot, .ps__btn { transition: none; } }
