:root {
  --sky1:#bfeaff; --sky2:#6db9f2; --ink:#123; --accent:#ff4f00; --accent2:#d93600;
  --safe-top:env(safe-area-inset-top,0px); --safe-right:env(safe-area-inset-right,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px); --safe-left:env(safe-area-inset-left,0px);
}
* { box-sizing:border-box; }
html,body { width:100%; height:100%; margin:0; overflow:hidden; position:fixed; overscroll-behavior:none; background:var(--sky2); color:var(--ink); font-family:Inter,ui-rounded,"SF Pro Rounded",system-ui,sans-serif; -webkit-user-select:none; user-select:none; touch-action:none; }
button { font:inherit; }
#shell { position:fixed; inset:0; overflow:hidden; }
#game { position:absolute; inset:0; width:100%; height:100%; display:block; }

.hidden { display:none !important; }

.iconBtn { position:absolute; z-index:7; top:calc(10px + var(--safe-top)); right:calc(10px + var(--safe-right)); width:42px; height:42px; padding:0; border:1px solid rgba(255,255,255,.5); border-radius:50%; background:rgba(255,255,255,.72); font-size:19px; cursor:pointer; box-shadow:0 4px 14px rgba(15,50,90,.18); }
.iconBtn:active { transform:scale(.92); }

#pauseHint { position:absolute; z-index:8; top:calc(56% + 0px); left:50%; transform:translate(-50%,-50%); padding:10px 18px; border-radius:999px; background:rgba(10,30,55,.78); color:#fff; font-size:13px; font-weight:900; letter-spacing:.09em; pointer-events:none; }

.overlay { position:absolute; z-index:20; inset:0; display:grid; place-items:center; padding:calc(18px + var(--safe-top)) calc(18px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(18px + var(--safe-left)); background:radial-gradient(circle at 50% 30%,rgba(191,234,255,.55),rgba(38,86,138,.55)); backdrop-filter:blur(7px); }
.panel { width:min(380px,100%); max-height:94vh; overflow:auto; padding:22px 22px 18px; border:1px solid rgba(255,255,255,.65); border-radius:24px; background:linear-gradient(165deg,rgba(255,255,255,.96),rgba(228,243,255,.97)); box-shadow:0 24px 60px rgba(10,40,80,.35), inset 0 1px rgba(255,255,255,.9); text-align:center; }

.logoCat { width:min(150px,42vw); height:auto; margin:0 auto 4px; display:block; filter:drop-shadow(0 10px 18px rgba(20,60,110,.25)); }
.bonkImg { width:84px; height:auto; margin:0 auto 4px; display:block; filter:drop-shadow(0 8px 14px rgba(20,60,110,.25)); }
.eyebrow { margin:4px 0 0; color:#4a7dab; font-size:10px; font-weight:950; letter-spacing:.16em; }
.panel h1 { margin:2px 0 0; font-size:34px; letter-spacing:-.02em; color:#0b3b8f; }
.panel h1 span { color:var(--accent); }
.panel h2 { margin:2px 0 0; font-size:26px; letter-spacing:-.01em; color:#0b3b8f; }
.tagline { margin:8px 0 0; color:#3c5a77; font-size:13px; line-height:1.45; }

.best { display:flex; align-items:center; justify-content:space-between; margin:16px 0 6px; padding:12px 15px; border-radius:13px; background:rgba(11,59,143,.08); }
.best span { color:#4a7dab; font-size:11px; font-weight:900; letter-spacing:.1em; }
.best strong { font-size:22px; color:#0b3b8f; }

.final { margin:12px 0 10px; }
.final small { display:block; color:#4a7dab; font-size:10px; font-weight:950; letter-spacing:.14em; }
.final strong { font-size:46px; line-height:1.1; color:#0b3b8f; }
.stats { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.stats div { padding:11px 4px; border-radius:11px; background:rgba(11,59,143,.08); }
.stats strong { display:block; margin-bottom:3px; font-size:19px; color:#0b3b8f; }
.stats small { color:#4a7dab; font-size:9px; font-weight:900; letter-spacing:.1em; }
.newBest { margin:12px 0 0; color:#0a8f4d; font-size:13px; font-weight:950; letter-spacing:.08em; animation:pop .25s ease-out; }

.primary,.secondary { display:block; width:100%; margin-top:12px; padding:14px 12px; border-radius:14px; font-size:15px; font-weight:950; letter-spacing:.06em; text-decoration:none; cursor:pointer; }
.primary { border:0; background:linear-gradient(var(--accent),var(--accent2)); color:#fff; box-shadow:0 6px 0 #9c2a00, 0 12px 26px rgba(180,60,0,.32); }
.primary:active { translate:0 4px; box-shadow:0 2px 0 #9c2a00; }
.secondary { border:1px solid rgba(11,59,143,.22); background:rgba(255,255,255,.6); color:#0b3b8f; }
.secondary:active { background:rgba(11,59,143,.08); }

@keyframes pop { from { transform:scale(.6); opacity:0; } to { transform:scale(1); opacity:1; } }
@media (prefers-reduced-motion:reduce) { * { animation-duration:.01ms !important; transition-duration:.01ms !important; } }
