:root{
  --night:#07141d;--night-2:#0c2130;--ink:#effff7;--muted:#9fb8b0;
  --cyan:#28e0d0;--coral:#ff735f;--lime:#d5ff55;--panel:#102b39;
  --line:rgba(232,255,247,.18);--shadow:0 24px 70px rgba(0,0,0,.38);
  color-scheme:dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--night);color:var(--ink)}
body{min-height:100dvh;overflow-x:hidden;background:
  radial-gradient(circle at 18% 10%,rgba(40,224,208,.14),transparent 28rem),
  radial-gradient(circle at 85% 72%,rgba(255,115,95,.11),transparent 32rem),var(--night)}
button,input{font:inherit}button{touch-action:manipulation}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid var(--lime);outline-offset:3px}
#shell{min-height:100dvh}.topbar{height:68px;padding:0 clamp(14px,3vw,36px);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;border-bottom:1px solid var(--line);background:rgba(7,20,29,.86);backdrop-filter:blur(16px);position:relative;z-index:20}
.back{color:var(--ink);font-weight:850;letter-spacing:.12em;text-decoration:none;font-size:12px;justify-self:start}.back:hover{color:var(--lime)}
.brand{display:flex;align-items:center;gap:10px;font-weight:950;letter-spacing:.06em;font-size:14px;line-height:1}.brand small{display:block;color:var(--cyan);font-size:9px;letter-spacing:.16em;margin-top:4px}.brand-ball{display:grid;place-items:center;width:34px;height:34px;border:2px solid var(--cyan);border-radius:50%;color:var(--cyan);font-size:11px;transform:rotate(-8deg)}
.pill{justify-self:end;font-weight:900;font-size:10px;letter-spacing:.12em;border-radius:999px;padding:7px 10px;border:1px solid var(--line);color:var(--muted)}.pill.online{color:var(--lime);border-color:rgba(213,255,85,.45)}.pill.connecting{color:#ffe56b}.pill.offline{color:#ff9c90}
main{min-height:calc(100dvh - 68px)}.screen{display:none}.screen.active{display:block}.screen[hidden]{display:none!important}
#welcome-screen{max-width:1180px;margin:0 auto;padding:clamp(42px,8vw,92px) clamp(18px,5vw,60px) 40px;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:clamp(30px,6vw,80px);align-items:center}.screen#welcome-screen.active{display:grid}
.eyebrow{margin:0 0 16px;color:var(--cyan);font-size:12px;font-weight:950;letter-spacing:.2em}.hero-copy h1,.lobby-head h1,.result-screen h1{font-size:clamp(54px,8vw,112px);line-height:.78;letter-spacing:-.065em;margin:0;text-transform:uppercase}.hero-copy h1 em{font-style:normal;color:transparent;-webkit-text-stroke:2px var(--coral)}.lede{max-width:620px;color:#c8ddd6;font-size:clamp(17px,2vw,22px);line-height:1.5;margin:30px 0 0}
.entry-card{background:linear-gradient(145deg,rgba(18,52,67,.98),rgba(10,31,43,.98));border:1px solid var(--line);border-radius:24px;padding:clamp(20px,4vw,34px);box-shadow:var(--shadow)}
.primary,.secondary,.ghost,.tiny{border:0;border-radius:12px;cursor:pointer;font-weight:950;letter-spacing:.06em}.primary{width:100%;padding:17px 20px;background:var(--lime);color:#101b0b;box-shadow:0 10px 25px rgba(213,255,85,.12)}.primary:hover{filter:brightness(1.06);transform:translateY(-1px)}.primary:disabled,.secondary:disabled{opacity:.4;cursor:not-allowed;transform:none}.primary span{float:right}.secondary{padding:14px 18px;background:transparent;color:var(--ink);border:1px solid rgba(239,255,247,.36)}.secondary:hover{border-color:var(--cyan);color:var(--cyan)}.ghost{padding:12px 16px;color:var(--muted);background:transparent}.ghost:hover{color:var(--ink)}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:10px;font-weight:850;letter-spacing:.14em;margin:24px 0}.or:before,.or:after{content:"";height:1px;background:var(--line);flex:1}
#join-form label{display:block;font-size:10px;font-weight:900;letter-spacing:.16em;color:var(--muted);margin-bottom:8px}.join-row{display:flex;gap:10px}.join-row input{min-width:0;flex:1;padding:14px;border-radius:12px;border:1px solid var(--line);background:#071923;color:var(--ink);font-weight:900;letter-spacing:.13em;text-transform:uppercase}.join-row input::placeholder{color:#688078}.hint,.status{color:var(--muted);font-size:12px;line-height:1.45}.status{min-height:18px}.status.error{color:#ff9c90}.status.good{color:var(--lime)}
.privacy-note{grid-column:1/-1;display:flex;gap:14px;align-items:flex-start;padding:16px 18px;border-left:3px solid var(--cyan);background:rgba(16,43,57,.62);color:var(--muted);font-size:13px}.privacy-note strong{color:var(--ink);white-space:nowrap;font-size:11px;letter-spacing:.1em}
#lobby-screen{max-width:1180px;margin:auto;padding:clamp(28px,5vw,60px) clamp(16px,4vw,50px)}.lobby-head{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:end}.lobby-head h1{font-size:clamp(44px,6vw,76px);line-height:.9}.lobby-head p:not(.eyebrow){color:var(--muted);margin:14px 0 0}.code-card{min-width:260px;background:var(--panel);border:1px solid var(--line);padding:16px;border-radius:18px}.code-card>span{display:block;color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.16em}.code-card strong{display:block;font-size:25px;letter-spacing:.12em;margin:7px 0 12px}.copy-row{display:flex;gap:8px}.tiny{font-size:10px;padding:9px 11px;background:#0a1d28;color:var(--cyan);border:1px solid rgba(40,224,208,.28)}
.teams{display:grid;grid-template-columns:1fr auto 1fr;gap:18px;align-items:center;margin:38px 0 26px}.team{border:1px solid var(--line);border-radius:22px;padding:18px;background:rgba(12,33,48,.75)}.team h2{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:17px;letter-spacing:.12em}.team h2 span{width:12px;height:12px;border-radius:50%}.cyan-team h2{color:var(--cyan)}.cyan-team h2 span{background:var(--cyan)}.coral-team h2{color:var(--coral)}.coral-team h2 span{background:var(--coral)}.slots{display:grid;gap:10px}.slot{width:100%;display:grid;grid-template-columns:42px 1fr auto;align-items:center;text-align:left;gap:12px;border:1px solid var(--line);border-radius:14px;background:#091d28;color:var(--ink);padding:12px;cursor:pointer}.slot:hover:not(:disabled){border-color:var(--lime)}.slot:disabled{cursor:not:none}.slot .shirt{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.06);font-weight:950}.cyan-team .shirt{color:var(--cyan)}.coral-team .shirt{color:var(--coral)}.slot strong{font-size:13px}.slot small{display:block;color:var(--muted);font-size:10px;margin-top:3px;letter-spacing:.08em}.slot .occupant{font-size:10px;font-weight:950;letter-spacing:.08em;color:var(--muted)}.slot.you{border-color:var(--lime);box-shadow:inset 0 0 0 1px var(--lime)}.slot.you .occupant{color:var(--lime)}.slot.taken{opacity:.68}.slot.ready .occupant{color:var(--cyan)}.versus-mark{font-size:16px;font-weight:950;color:var(--muted)}.lobby-actions,.result-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.lobby-actions .primary,.lobby-actions .secondary,.result-actions .primary{width:auto;min-width:210px}.centered{text-align:center}
.match-screen{position:relative;height:calc(100dvh - 68px);overflow:hidden;background:#061018}.match-screen.active{display:block}.match-screen canvas{display:block;width:100%;height:100%;touch-action:none}.scoreboard{position:absolute;top:12px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:auto 28px 92px 28px auto;align-items:center;gap:9px;padding:9px 15px;border-radius:14px;background:rgba(5,17,24,.88);border:1px solid var(--line);box-shadow:0 10px 30px rgba(0,0,0,.28);font-weight:950}.scoreboard>strong{font-size:24px;text-align:center}.scoreboard>div{text-align:center}.scoreboard time{display:block;font-size:19px}.scoreboard small{display:block;color:var(--muted);font-size:8px;letter-spacing:.1em}.cyan-label{color:var(--cyan)}.coral-label{color:var(--coral)}
.match-banner{position:absolute;top:76px;left:50%;transform:translateX(-50%);padding:7px 14px;background:var(--lime);color:#111c0b;font-size:11px;font-weight:950;letter-spacing:.14em;border-radius:999px;transition:.25s;pointer-events:none}.match-banner.hidden{opacity:0;transform:translate(-50%,-8px)}.match-meta{position:absolute;left:14px;right:14px;top:14px;display:flex;justify-content:space-between;color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.08em;pointer-events:none}.controls{position:absolute;left:0;right:0;bottom:0;min-height:132px;padding:12px max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));display:grid;grid-template-columns:116px 1fr auto;align-items:center;gap:16px;background:linear-gradient(0deg,rgba(5,17,24,.98),rgba(5,17,24,.8),transparent);pointer-events:none}.controls[hidden]{display:none!important}.joystick,.actions button{pointer-events:auto}.joystick{position:relative;width:108px;height:108px;border:1px solid rgba(239,255,247,.3);border-radius:50%;background:rgba(7,25,35,.7);touch-action:none}.joystick:before{content:"";position:absolute;inset:23px;border:1px dashed rgba(239,255,247,.18);border-radius:50%}.joystick span{position:absolute;left:35px;top:35px;width:38px;height:38px;border-radius:50%;background:var(--cyan);box-shadow:0 0 25px rgba(40,224,208,.34);transform:translate(0,0)}.joystick small{position:absolute;left:0;right:0;bottom:-1px;text-align:center;font-size:8px;letter-spacing:.15em;color:var(--muted)}.control-copy{display:flex;flex-direction:column;gap:5px;color:var(--muted);font-size:10px}.control-copy strong{color:var(--ink);font-size:11px;letter-spacing:.1em}.actions{display:flex;gap:10px}.action{min-width:90px;height:72px;border:1px solid var(--line);border-radius:18px;background:rgba(11,35,47,.9);color:var(--ink);font-size:13px;font-weight:950;letter-spacing:.04em}.action small{display:block;color:var(--muted);font-size:7px;margin-top:5px;letter-spacing:.08em}.action:active,.action.held{transform:scale(.96);border-color:var(--lime)}.action.shoot{border-color:rgba(255,115,95,.5);color:#ff9688}.action.pass{border-color:rgba(40,224,208,.45);color:var(--cyan)}
.result-screen{min-height:calc(100dvh - 68px);padding:10vh 20px;text-align:center}.result-screen h1{font-size:clamp(56px,9vw,108px);line-height:.86}.result-screen>p:not(.eyebrow){color:var(--muted);font-size:18px}.result-screen #result-score{color:var(--ink);font-size:clamp(28px,5vw,54px);font-weight:950}.result-actions{margin-top:30px}.toast{position:fixed;z-index:50;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;padding:11px 16px;border-radius:999px;background:var(--ink);color:var(--night);font-size:12px;font-weight:900;transition:.2s;pointer-events:none}.toast.show{opacity:1;transform:translate(-50%,0)}
.slot:disabled{cursor:not-allowed}
@media(max-width:760px){.topbar{grid-template-columns:auto 1fr auto}.brand{justify-self:center}.brand>span:last-child{display:none}#welcome-screen{grid-template-columns:1fr;padding-top:34px}.privacy-note{display:block}.privacy-note strong{display:block;margin-bottom:6px}.lobby-head{grid-template-columns:1fr}.code-card{min-width:0}.teams{grid-template-columns:1fr;gap:12px}.versus-mark{text-align:center}.controls{grid-template-columns:104px 1fr;gap:8px}.control-copy{display:none}.actions{justify-content:flex-end}.action{min-width:72px;height:64px;font-size:11px}.match-meta{top:66px}.match-meta span:last-child{display:none}}
@media(max-width:520px){.topbar{height:60px}.back{font-size:10px}.pill{font-size:8px;padding:6px 8px}main{min-height:calc(100dvh - 60px)}.hero-copy h1{font-size:58px}.entry-card{padding:18px}.join-row{flex-direction:column}.join-row .secondary{width:100%}.match-screen{height:calc(100dvh - 60px)}.scoreboard{top:8px;grid-template-columns:auto 24px 76px 24px auto;gap:5px;padding:7px 10px}.scoreboard>strong{font-size:20px}.controls{min-height:116px;grid-template-columns:86px 1fr}.joystick{width:84px;height:84px}.joystick span{left:27px;top:27px;width:30px;height:30px}.actions{gap:6px}.action{min-width:60px;height:58px;border-radius:14px;font-size:10px;padding:4px}.action small{font-size:6px}.match-banner{top:62px}.lobby-actions>*{width:100%!important}.code-card strong{font-size:20px}}
@media(max-height:500px) and (orientation:landscape){.topbar{height:52px}.match-screen{height:calc(100dvh - 52px)}.scoreboard{top:6px}.controls{min-height:96px;padding:6px max(10px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));grid-template-columns:82px 1fr;gap:8px}.joystick{width:78px;height:78px}.joystick:before{inset:16px}.joystick span{left:25px;top:25px;width:28px;height:28px}.actions{gap:6px}.action{min-width:72px;height:54px;border-radius:14px}.match-meta{top:10px}.match-meta span:first-child{max-width:35vw}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
