@font-face { font-family: Oxanium; font-weight: 500; font-display: swap; src: url(/fonts/Oxanium-Medium.ttf) format('truetype'); }
@font-face { font-family: Oxanium; font-weight: 600; font-display: swap; src: url(/fonts/Oxanium-SemiBold.ttf) format('truetype'); }
@font-face { font-family: Oxanium; font-weight: 700; font-display: swap; src: url(/fonts/Oxanium-Bold.ttf) format('truetype'); }
@font-face { font-family: Oxanium; font-weight: 800; font-display: swap; src: url(/fonts/Oxanium-ExtraBold.ttf) format('truetype'); }

:root {
  --ground: #05070D;
  --surface: #0E1320;
  --sunk: #0A0F1A;
  --raised: #161D2E;
  --line: #232B3F;
  --line-strong: #3A4560;
  --text: #F4F7FF;
  --text-2: #C9D3E8;
  --text-3: #B4BFD6;
  --muted: #8D99B3;
  --lime: #C6F432;
  --on-lime: #0B1000;
  --display: Oxanium, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--lime); }
a:hover { color: #E2FF8A; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
label:has(input.vh:focus-visible) { outline: 3px solid var(--lime); outline-offset: 3px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; border: 0; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 10; background: var(--lime); color: var(--on-lime); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 16px; }
kbd { font: 13px ui-monospace, Menlo, monospace; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* header */
.top { border-bottom: 1px solid #1B2335; }
.top-row { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: 1px; color: var(--text); text-decoration: none; }
.brand span { color: var(--lime); }
.brand small { font-weight: 600; font-size: 20px; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--text-2); text-decoration: none; font-size: 15px; }
.nav a:not(.btn):hover { color: var(--text); text-decoration: underline; }

/* buttons */
.btn {
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; text-decoration: none; background: transparent; color: var(--text); white-space: nowrap;
}
.btn-sm { min-height: 44px; padding: 0 14px; border-radius: 10px; font-size: 15px; }
.btn-line { border-color: var(--line-strong); }
.btn-line:hover:not(:disabled) { background: var(--raised); }
.btn-soft { border-color: var(--line-strong); background: var(--raised); font-weight: 700; }
.btn-soft:hover { background: #1E2740; color: var(--text); }
.btn-lime { background: var(--lime); color: var(--on-lime); font-weight: 700; }
.btn-lime:hover:not(:disabled) { background: #D6FF55; color: var(--on-lime); }
.btn-white { background: var(--text); color: var(--ground); font-weight: 700; }
.btn-big { min-height: 56px; border-radius: 14px; font-size: 18px; font-weight: 800; }
.linkish { background: none; border: 0; padding: 0; color: var(--lime); text-decoration: underline; font-size: 14px; min-height: 24px; }
.strong-link { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }

/* layout */
.lab { padding-top: 24px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 28px; }
.title-row { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; }
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
h2 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.step { color: var(--lime); }
.note { padding: 12px 16px; border-radius: 12px; background: #121A0A; border: 1px solid #3D4D1A; color: #DDF98A; font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.row-top { align-items: flex-start; }
.card { min-width: 0; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* setup */
.setup { flex: 3 1 520px; gap: 18px; }
.teams { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.team { flex: 1 1 240px; min-width: 0; margin: 0; padding: 16px; border-radius: 16px; background: var(--sunk); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.team-top { display: flex; align-items: center; gap: 12px; }
.ball { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 5px solid; box-shadow: 0 0 0 1px var(--line-strong); }
.team-side { display: block; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); }
.team-code { display: block; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: 1px; min-height: 30px; }
.team-fields { display: flex; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); min-width: 0; }
.field.name { flex: 3 1 0; }
.field.code { flex: 1 1 0; min-width: 72px; }
.small-label { font-size: 13px; color: var(--muted); }
input[type=text], input:not([type]) {
  min-height: 44px; min-width: 0; width: 100%; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--ground); color: var(--text); font-size: 16px;
}
.field.code input { font-family: var(--display); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 0 10px; }
#share-url { font: 14px ui-monospace, Menlo, monospace; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; font-size: 14px; color: var(--text-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 3px solid transparent; }
.swatch .dot { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; }
.swatch .tick { display: none; fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.swatch:has(input:checked) { border-color: var(--lime); }
.swatch:has(input:checked) .tick { display: block; }
.swatch:hover { border-color: var(--line-strong); }
.swatch:has(input:checked):hover { border-color: var(--lime); }
.setup-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pitch { flex: 1 1 220px; }
.segmented { display: flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--ground); border: 1px solid var(--line-strong); }
.segmented label { flex: 1; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; color: var(--text-2); font-weight: 600; cursor: pointer; }
.segmented .tick { display: none; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.segmented label:has(input:checked) { background: var(--lime); color: var(--on-lime); font-weight: 700; }
.segmented label:has(input:checked) .tick { display: block; }
#kickoff { flex: 1 1 200px; }

/* latest video */
.latest { flex: 2 1 300px; }
.latest-video { align-self: center; width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 10px; }
.channel-fallback { display: flex; align-items: center; justify-content: center; text-align: center; aspect-ratio: 9 / 16; border-radius: 18px; border: 1px dashed var(--line-strong); padding: 20px; font-weight: 700; }
.vcard { display: flex; flex-direction: column; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.35; background: none; border: 0; padding: 0; text-align: left; width: 100%; }
.vthumb { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--surface); aspect-ratio: 9 / 16; }
.vthumb img, .vthumb iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.vplay { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; background: rgba(5,7,13,0.72); display: flex; align-items: center; justify-content: center; }
.vcard.big .vthumb { border-radius: 18px; border: 2px solid var(--lime); }
.vcard.big .vplay { left: 50%; top: 50%; right: auto; bottom: auto; width: 72px; height: 72px; margin: -36px 0 0 -36px; border: 2px solid var(--text); }
.vcard.big .vtitle { font-size: 17px; font-weight: 700; }
.badge { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-size: 13px; font-weight: 800; }
.vcard:hover .vtitle { text-decoration: underline; }

/* stage */
.stage-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.stage { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #000; display: flex; justify-content: center; }
#arena { display: block; height: min(78vh, 980px); max-width: 100%; aspect-ratio: 1080 / 1660; width: auto; }
.stage-play {
  position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%);
  min-height: 64px; padding: 0 28px; border-radius: 999px; border: 0;
  background: var(--lime); color: var(--on-lime); font-weight: 800; font-size: 20px;
  display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 10px 40px rgba(198,244,50,0.25); white-space: nowrap;
}
.stage-play[hidden] { display: none; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.controls .keys { margin-left: auto; }
#pause .i-play { display: none; }
#pause.paused .i-pause { display: none; }
#pause.paused .i-play { display: block; }
#sound[aria-pressed=true] { border-color: var(--lime); }

/* side */
.side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ft-score { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1.1; }
.stats { width: 100%; border-collapse: collapse; font-size: 15px; }
.stats th, .stats td { padding: 6px 0; border-bottom: 1px solid #1B2335; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.stats th[scope=row], .stats thead th:first-child { text-align: left; }
.stats thead th { color: var(--muted); font-weight: 600; border-bottom-color: var(--line); }
.share { gap: 12px; }
.share h2 { font-size: 18px; }
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-buttons .btn { flex: 1 1 120px; }

/* blocks */
.block { display: flex; flex-direction: column; gap: 14px; }
.block-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
#vid-h { font-size: 22px; }
.recent { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.recent li { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.recent .score { display: block; font-family: var(--display); font-weight: 800; font-size: 18px; }
.recent .meta { display: block; font-size: 14px; color: var(--muted); }
.recent .grow { flex: 1; min-width: 0; }
.videos { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }

/* footer */
.foot { border-top: 1px solid #1B2335; }
.foot-row { padding-top: 24px; padding-bottom: 36px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--text-3); }

@media (pointer: coarse) {
  .controls .keys { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
