:root{font-family:Inter,system-ui,-apple-system,sans-serif;color:#edf2ff;background:#0b1020}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 20% 0,#1b2850 0,transparent 42%),#0b1020}header{max-width:1120px;margin:auto;padding:26px 20px 12px;display:flex;align-items:center;justify-content:space-between}.brand{font-weight:850;letter-spacing:.12em;color:#a9baff}header a{color:#a9baff;text-decoration:none}main{max-width:1120px;margin:0 auto;padding:22px 20px;display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px}h1{font-size:clamp(28px,4vw,44px);margin:0 0 8px}p{color:#a4b2cf;line-height:1.55}.panel{background:#141e35;border:1px solid #2b3b5a;border-radius:18px;padding:20px;box-shadow:0 16px 45px #0003}.meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 0}.stat{background:#1d2a47;border-radius:10px;padding:10px 14px;min-width:100px}.stat small{display:block;color:#98a9ca}.stat strong{font-size:22px}.arena{position:relative;width:100%;height:min(55vh,440px);min-height:300px;background:#0a1328;border:1px solid #354c76;border-radius:14px;overflow:hidden;touch-action:none;user-select:none}canvas{display:block;width:100%;height:100%;touch-action:none}button{border:0;background:#7189fa;color:white;font-weight:750;padding:12px 18px;border-radius:10px;cursor:pointer}button:hover{background:#8ba0ff}button:disabled{opacity:.5;cursor:not-allowed}.buttons{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.secondary{background:#273858}.secondary:hover{background:#344a73}input{background:#0d172a;color:white;border:1px solid #45577a;padding:11px;border-radius:9px;min-width:0;flex:1}.leaderboard{padding-left:20px}.leaderboard li{padding:10px 0;border-bottom:1px solid #2b3b5a;display:flex;justify-content:space-between;gap:10px}.hint{font-size:13px;color:#96a7c6}.pill{background:#223355;padding:6px 10px;border-radius:99px;font-size:12px;color:#afc1ed}.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#071021a9;text-align:center;padding:24px;pointer-events:none}.overlay.hidden{display:none}.overlay h2{font-size:28px}.overlay p{color:#d4def5}aside h2{margin:0 0 8px}footer{max-width:1120px;margin:0 auto;padding:0 20px 30px;color:#8191b2;font-size:12px}@media(max-width:760px){main{grid-template-columns:1fr}header{padding-top:18px}.arena{min-height:310px;height:50vh}aside{order:2}}

/* GAME UPGRADES */
.toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:12px 0}
.toolbar label{display:grid;gap:5px;font-size:13px;color:#bfd0f8}
select{background:#101a30;border:1px solid #475f87;color:#f0f4ff;padding:10px;border-radius:9px;min-width:124px}
.settings{margin-top:16px;padding:14px 16px;border:1px solid #344768;background:#111c32;border-radius:12px}
.settings summary{cursor:pointer;font-weight:700;color:#c6d6ff}
.custom-grid{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0}
.custom-grid label{font-size:12px;color:#c8d7f5;min-width:0;flex:1 1 170px}
.custom-grid input[type=file]{margin-top:8px;width:100%;font-size:11px;padding:8px;min-height:44px}
#custom-status{font-size:12px}
#game{cursor:crosshair}
.game-fullscreen:fullscreen{width:100vw!important;height:100dvh!important;max-height:none!important;min-height:0!important;border:0;border-radius:0;background:#081121}
.game-fullscreen:fullscreen canvas{width:100%;height:100%}
.advice{padding:12px 15px;margin:12px 0;border-left:3px solid #839bff;background:#1b2a4a;border-radius:8px;font-size:13px;color:#dce6ff;line-height:1.6}
fieldset{border:0;padding:0;margin:0}
@media(max-width:700px){.toolbar label{flex:1 1 128px}select{width:100%}button{min-height:44px}}
