:root{--night:#0d0907;--ink:#f6ead8;--muted:#bfa98d;--sand:#e9c48f;--dust:#8a6a4a;--teal:#5ff2c8;--teal-2:#1fbf96;--line:rgba(233,196,143,.18)}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;overflow:hidden;background:var(--night);color:var(--ink);font-family:Inter,system-ui,sans-serif;overscroll-behavior:none}
#game{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}

/* the same button as the header buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;padding:7px 14px;border:1px solid #1fbf96;border-radius:999px;background:rgba(13,9,7,.85);color:#5ff2c8;font:600 14px Inter,sans-serif;cursor:pointer}
.btn:hover{background:rgba(95,242,200,.12)}

body.playing .topnav{display:none}

/* menu and game over */
.menu{position:fixed;inset:0;z-index:20;display:grid;justify-items:center;align-items:start;overflow-y:auto;padding:max(88px,16vh) 16px 24px;background:radial-gradient(circle at center,rgba(13,9,7,.55),rgba(13,9,7,.85))}
.menu[hidden]{display:none}
.panel{width:min(420px,100%);text-align:center;display:flex;flex-direction:column;align-items:center;gap:16px}
.panel h1{font-family:Cinzel,serif;font-size:clamp(32px,6vw,48px);font-weight:700;letter-spacing:.06em;color:var(--sand);line-height:1.15}
.panel p{font-size:16px;color:var(--ink);line-height:1.5}
.panel .help,.panel .best{font-size:14px;color:var(--muted)}
.panel .result{font-size:18px;color:var(--teal);font-weight:600}
#nick{width:100%;max-width:300px;padding:12px 16px;border:1px solid var(--line);border-radius:999px;background:rgba(13,9,7,.85);color:var(--ink);font:500 16px Inter,sans-serif;text-align:center;outline:none}
#nick:focus{border-color:var(--teal-2)}
.picker{display:flex;align-items:center;gap:6px;width:100%;justify-content:center}
#skinPreview{width:min(360px,70vw);height:auto;aspect-ratio:360/110}
.arrow{flex:0 0 auto;width:44px;height:44px;border:1px solid #1fbf96;border-radius:50%;background:rgba(13,9,7,.85);color:#5ff2c8;font:600 26px/1 Inter,sans-serif;cursor:pointer;display:grid;place-items:center;padding-bottom:3px}
.arrow:hover{background:rgba(95,242,200,.12)}
.custom{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%}
.custom[hidden]{display:none}
.chosen{display:flex;gap:4px;min-height:16px}
.chosen i{width:16px;height:16px;border-radius:50%;background:var(--c);box-shadow:inset 0 -3px 4px rgba(0,0,0,.35)}
.swatches{display:grid;grid-template-columns:repeat(8,28px);gap:6px}
.swatches button{width:28px;height:28px;border-radius:50%;border:1px solid rgba(255,255,255,.25);background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.55),transparent 45%),var(--c);cursor:pointer}
.swatches button:hover{transform:scale(1.12)}
.btn.play{padding:10px 40px;font-size:16px}
.levels{display:flex;gap:8px}
.levels button{padding:7px 16px;border:1px solid #1fbf96;border-radius:999px;background:rgba(13,9,7,.85);color:#5ff2c8;font:600 14px Inter,sans-serif;cursor:pointer}
.levels button:hover{background:rgba(95,242,200,.12)}
.levels button[aria-checked="true"]{background:#5ff2c8;color:#062018;border-color:#5ff2c8}

/* in-game HUD */
.hud{position:fixed;inset:0;z-index:10;pointer-events:none}
.hud[hidden]{display:none}
.board{position:absolute;top:14px;right:14px;min-width:180px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:rgba(13,9,7,.6);font-size:13px;line-height:1.7;color:var(--muted);font-variant-numeric:tabular-nums}
.board div{display:flex;justify-content:space-between;gap:16px}
.board .me{color:var(--teal);font-weight:600}
.board span:first-child{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stats{position:absolute;left:16px;bottom:16px;display:flex;flex-direction:column;font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}
.stats strong{font-size:18px;color:var(--ink);font-weight:600}
.mini{position:absolute;right:14px;bottom:14px;width:150px;height:150px}
.boost{display:none;position:absolute;left:16px;bottom:76px;pointer-events:auto;padding:14px 22px;font-size:16px;touch-action:none;user-select:none;-webkit-user-select:none}
.boost.on{background:#5ff2c8;color:#062018}
@media (hover:none){.boost{display:inline-flex}}
@media (max-width:600px){.board{min-width:0;font-size:12px;top:10px;right:10px}.board span:first-child{max-width:90px}.mini{width:110px;height:110px}}
