:root{color-scheme:dark;--cyan:#62efff;--violet:#9c70ff;--pink:#ff4faf;--panel:rgba(10,14,34,.88)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#02040b;color:#f5fbff;font-family:Inter,"Segoe UI","Noto Sans SC",sans-serif}body{display:grid;place-items:center}button,input{font:inherit;color:inherit}button{cursor:pointer}
#app{position:relative;width:min(100vw,56.25vh);height:min(100vh,177.78vw);max-width:520px;overflow:hidden;background:#030610;box-shadow:0 0 100px #16427566;touch-action:none;isolation:isolate}canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.hud{position:absolute;z-index:4;left:0;right:0;top:0;height:calc(74px + env(safe-area-inset-top));padding:calc(9px + env(safe-area-inset-top)) 12px 8px;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:7px;align-items:center;background:linear-gradient(180deg,#05091df8 0%,#080c20e6 72%,transparent 100%);border-bottom:1px solid #9c72ff42}.player,.scorebox,.stagebox{height:50px;border-radius:17px;border:1px solid #7eefff20;background:linear-gradient(105deg,#13243bd4,#251a42b0 82%,transparent);padding:8px 13px;overflow:hidden}.player{min-width:0}.player small,.scorebox small,.stagebox small{display:block;color:#80edf6b8;font-size:10px;line-height:12px;font-weight:800;letter-spacing:.13em;white-space:nowrap}.player strong{display:block;font-size:17px;line-height:22px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 0 10px #55efff88}.scorebox,.stagebox{text-align:center;min-width:65px;padding-inline:10px;background:linear-gradient(120deg,#173a48d9,#18314ecb)}.scorebox b,.stagebox b{font-size:18px;line-height:22px;color:#d7fdff;text-shadow:0 0 11px #3fe8ff}.stagebox{min-width:51px;background:linear-gradient(145deg,#4d2e75dc,#282448d6)}.pause{width:44px;height:44px;border-radius:50%;border:1px solid #8ff6ff30;background:#111830d9;font-size:17px;font-weight:900}
.launch-hint{position:absolute;z-index:3;left:50%;bottom:calc(8px + env(safe-area-inset-bottom));transform:translateX(-50%);white-space:nowrap;padding:5px 24px;color:#bdf8ffc7;font-size:13px;font-weight:900;letter-spacing:.13em;text-shadow:0 0 9px #52efff;background:linear-gradient(90deg,transparent,#152342a6,#2a1743a6,transparent);border-radius:13px;transition:.2s opacity}
.overlay{position:absolute;z-index:8;inset:0;display:grid;place-items:center;padding:25px;background:radial-gradient(circle at 50% 34%,#152253c5,#02040bef 72%);transition:.38s opacity,.38s transform}.overlay.hidden{opacity:0;pointer-events:none;transform:scale(1.035)}.card{width:min(100%,390px);max-height:82%;overflow:auto;padding:28px 25px;border:1px solid #90f3ff4d;border-radius:31px;text-align:center;background:linear-gradient(145deg,#172139f2,#110f25f2);box-shadow:0 24px 80px #000c,0 0 38px #7653ff26,inset 0 1px #fff1f;backdrop-filter:blur(18px)}.logo{position:relative;width:96px;height:96px;margin:2px auto 18px;display:grid;place-items:center;border-radius:50%;font:900 43px/1 monospace;border:4px solid var(--cyan);color:white;background:radial-gradient(circle,#b862ffc4,#17325c66 58%,transparent 60%);box-shadow:0 0 20px #64efff,inset 0 0 30px #7d51ff}.logo:after{content:"";position:absolute;width:122px;height:38px;border:3px solid var(--pink);border-radius:50%;transform:rotate(-18deg);box-shadow:0 0 14px var(--pink)}h1{margin:0;font-size:32px;letter-spacing:.08em;text-shadow:0 0 18px #70efff}.lead{margin:13px 0 21px;color:#c3ccdf;line-height:1.7;font-size:15px}.credit{margin-top:15px;color:#8593ad;font-size:12px;letter-spacing:.06em}.primary,.secondary{width:100%;padding:14px 18px;border-radius:18px;font-weight:900;letter-spacing:.07em}.primary{border:0;background:linear-gradient(115deg,#32dce9,#8556ff 58%,#ff54b4);box-shadow:0 8px 28px #6d54ff52}.secondary{margin-top:9px;border:1px solid #89efff32;background:#17203ad9}.name-input{width:100%;margin:6px 0 10px;padding:13px 16px;border-radius:15px;border:1px solid #71edff3d;background:#0a1128;outline:0}.name-input:focus{border-color:#6eeeff;box-shadow:0 0 14px #5aeaff33}
.how-to{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:16px 0}.how-to div{min-width:0;padding:10px 6px 9px;border:1px solid #7deeff2b;border-radius:15px;background:linear-gradient(155deg,#1a31518c,#17102d9c)}.how-to span{display:block;margin-bottom:5px;color:#6ff3ff;font:800 11px/1 monospace;letter-spacing:.08em;text-shadow:0 0 9px #42eaff}.how-to b,.how-to small{display:block}.how-to b{font-size:13px;color:#f4fbff}.how-to small{margin-top:4px;color:#aabbd2;font-size:10px;line-height:1.35}
#rankList{display:grid;gap:8px;margin:15px 0;text-align:left}.rank{display:grid;grid-template-columns:38px 1fr auto;align-items:center;padding:11px 13px;border-radius:15px;background:#121a31}.rank:first-child{background:linear-gradient(100deg,#273954,#20213e)}.rank>span{color:#78efff;font-weight:900}.rank:first-child>span{color:#ffe66d}.rank small{display:block;color:#77869f;font-size:11px}.empty{padding:24px;color:#8190a8;text-align:center}
@media(max-height:670px){.hud{height:64px}.player,.scorebox,.stagebox{height:44px;padding-block:5px}.player strong{font-size:15px}.scorebox b,.stagebox b{font-size:16px}.card{padding:20px 22px}.logo{width:75px;height:75px;font-size:35px;margin-bottom:13px}.logo:after{width:98px}h1{font-size:27px}.lead{font-size:14px;margin-block:8px 14px}}

/* The Android playfield starts below its header. Keep the browser physics canvas in
   the same safe region so the visible top rail and large orbs can never hide under HUD. */
:root{--playfield-top:calc(74px + env(safe-area-inset-top))}
canvas#game{inset:var(--playfield-top) 0 0;height:auto}
@media(max-height:670px){:root{--playfield-top:64px}}
