:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #f4f3e6;
  background: #101715;
  --lime: #e6ff77;
  --rose: #ff806f;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(ellipse at 50% 0%, #273b31, #101715 55%); }
main { width: min(100%, 590px); margin: auto; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.masthead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 11px; }
.mark { width: 21px; height: 21px; border: 3px solid var(--lime); border-radius: 50%; position: relative; }
.mark::after { content: ""; position: absolute; inset: 3px; background: var(--lime); clip-path: polygon(50% 0%,100% 38%,81% 100%,19% 100%,0 38%); }
h1 { font-size: clamp(24px, 5vw, 34px); letter-spacing: -.075em; margin: 0; line-height: 1; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid white; outline-offset: 3px; }
button:disabled { cursor: default; }
#pause { border: 1px solid #607568; background: #27372e; color: #f4f3e6; border-radius: 8px; min-width: 72px; min-height: 39px; font-weight: 650; }
#pause:disabled { opacity: .48; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; text-align: center; background: #17221d; border: 1px solid #43594c; border-radius: 12px 12px 4px 4px; overflow: hidden; }
.team { display: flex; align-items: center; gap: clamp(6px, 2vw, 16px); justify-content: center; padding: 8px 5px; font-size: 11px; letter-spacing: .13em; font-weight: 800; }
.team strong { font-size: 25px; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.team i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.away i { background: var(--rose); }
time { align-content: center; padding: 0 12px; background: #303f31; font-size: 19px; font-weight: 850; font-variant-numeric: tabular-nums; }
.arena { position: relative; overflow: hidden; display: grid; place-items: center; border: 1px solid #536b59; border-radius: 4px 4px 14px 14px; background: #12241c; margin-top: 4px; min-height: 245px; }
canvas { display: block; height: min(61dvh, 670px); width: auto; max-width: 100%; object-fit: contain; aspect-ratio: 520 / 680; touch-action: none; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: #0c171389; backdrop-filter: blur(2px); }
.overlay[hidden] { display: none; }
.panel { width: min(85%, 350px); text-align: center; background: #14211eef; border: 1px solid #68806a; border-radius: 16px; padding: clamp(16px, 5vw, 28px); }
.match-detail { color: var(--lime); font-size: 11px; font-weight: 850; letter-spacing: .17em; margin: 0; }
h2 { font-size: clamp(40px, 10vw, 64px); line-height: .95; margin: 10px 0; letter-spacing: -.08em; }
#overlay-help { color: #c9d4c9; font-size: 14px; margin: 12px 0 18px; }
#start { width: 100%; min-height: 46px; color: #132016; background: var(--lime); display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 8px; padding: 0 15px; font-weight: 850; }
.event { position: absolute; pointer-events: none; left: 50%; top: 44%; translate: -50% -50%; white-space: nowrap; font-size: clamp(24px, 7vw, 42px); font-weight: 900; text-shadow: 0 3px 12px #091713; }
.touch { display: none; }
.keyboard { text-align: center; color: #c0cdc2; font-size: 12px; margin: 12px 0 0; }
.keyboard span { display: inline-block; width: 13px; }
kbd { font: inherit; font-weight: 750; color: #f4f3e6; }
@media (pointer: coarse), (max-width: 640px) {
  .keyboard { display: none; }
  .touch { display: flex; align-items: center; justify-content: space-between; gap: 7px; width: 100%; margin-top: 8px; min-height: clamp(58px, 11dvh, 96px); background: #26392c; border: 1px solid #627957; border-radius: 13px; color: var(--lime); padding: 0 15px; touch-action: none; user-select: none; -webkit-user-select: none; }
  .touch:active { background: #425a39; }
  .touch:disabled { opacity: .62; }
  .touch strong, .touch small { display: block; letter-spacing: .09em; }
  .touch strong { font-size: 12px; }
  .touch small { color: #d2decc; font-size: 10px; margin-top: 5px; }
  .touch-icon { font-size: 27px; }
  canvas { height: min(67dvh, calc((100vw - 26px) * 680 / 520)); }
}
