@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@400;500;600;700&display=swap');
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#070916;color:#eff6ff;font-family:Rajdhani,sans-serif}body{display:flex;justify-content:center;align-items:center;padding:18px;background:radial-gradient(ellipse at 50% 10%,#18204b 0,#0b1026 40%,#060812 100%)}.shell{width:min(560px,100%)}header,footer{display:flex;align-items:center;justify-content:space-between;padding:10px 8px 14px}.brand{display:flex;align-items:center;gap:11px}.brand-hero{width:42px;height:48px;display:flex;align-items:center;justify-content:center;flex:0 0 42px;filter:drop-shadow(0 0 8px #31bfe766)}.brand b,.hero{font-family:Orbitron,sans-serif;letter-spacing:2px;font-weight:800}.brand b{font-size:20px}.brand i{font-style:normal;color:#6ceaff}.brand small{display:block;color:#8291bb;font:8px Orbitron;margin-top:4px;letter-spacing:1.4px}.headright{display:flex;align-items:center;gap:12px}.topscore{font:9px Orbitron;color:#8e9bbd}.topscore strong{color:#fff;font-size:15px;margin-left:8px}.sound{background:#101a3b;border:1px solid #3c558b;border-radius:7px;color:#76eaff;width:32px;height:32px}.game-wrap{position:relative;width:100%;border:1px solid #36416f;border-radius:15px;overflow:hidden;box-shadow:0 0 45px #2739a52b,0 20px 60px #0008;background:#080d24}.game-wrap canvas{display:block;width:100%;height:auto;aspect-ratio:2/3}.hud{position:absolute;top:15px;left:17px;right:17px;display:flex;align-items:flex-start;justify-content:space-between;pointer-events:none}.scorebox small{display:block;font:8px Orbitron;color:#8d9bc3}.scorebox b{font:700 18px Orbitron;color:#fff}.crystalbox{font:700 14px Orbitron;color:#72f2ff;text-shadow:0 0 10px #52eaff}.gravitybox{font:700 9px Orbitron;letter-spacing:1px;padding:8px 10px;border:1px solid #6b83c8;border-radius:20px;background:#0d153bba;color:#9ceeff}.powerhud{position:absolute;top:62px;left:17px;font:8px Orbitron;letter-spacing:1px;color:#b9ffdf;text-shadow:0 0 10px #4cffbb;opacity:0;transition:opacity .2s}.powerhud.show{opacity:1}.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:25px;background:linear-gradient(180deg,#080d24a8,#090d27ef 65%,#080d24f5)}.hidden{display:none!important}.eyebrow{font:9px Orbitron;color:#7cecff;letter-spacing:3px;margin-bottom:15px}.hero{font-size:clamp(35px,9vw,58px);line-height:1.12;text-shadow:0 0 24px #4ddcff55}.hero span{color:#70eaff}.overlay p{font-size:17px;line-height:1.35;color:#b5c3e5;margin:18px 0 22px}.how{font:8px Orbitron;color:#8999c4;display:flex;gap:7px;align-items:center;margin-bottom:24px;flex-wrap:wrap;justify-content:center}.how span{border:1px solid #536a9d;border-radius:5px;padding:6px 8px;color:#d7f8ff;font-size:9px}#play,#again,.pause button{border:0;border-radius:7px;padding:15px 27px;background:linear-gradient(100deg,#51dff2,#7888ff);color:#071025;font:900 11px Orbitron;letter-spacing:1.5px;box-shadow:0 0 25px #4edff455}#play b,#again b{font-size:16px;margin-left:12px}.touchhint{color:#68779f;font-size:10px;margin-top:17px}.smallhero{font-size:42px}.result{display:flex;gap:48px;margin:22px 0}.result small{display:block;font:8px Orbitron;color:#8291b9;margin-bottom:7px}.result b{font:700 24px Orbitron}.result div+div b{color:#70eaff}.pause{position:absolute;inset:0;background:#060a1ddc;display:flex;flex-direction:column;gap:22px;align-items:center;justify-content:center;font:16px Orbitron;letter-spacing:2px;color:#9af1ff}.pause button{padding:12px 25px}footer{font:7px Orbitron;letter-spacing:1.4px;color:#68779e;padding-top:14px}footer b{color:#69eaff}.mobile-controls{display:none;gap:12px;justify-content:center;margin-top:12px}.mobile-controls button{height:48px;min-width:70px;border:1px solid #3c558b;border-radius:10px;background:#111b3b;color:#b8f5ff;font:13px Orbitron}.mobile-controls #flip{min-width:110px;background:#172956;color:#6ceaff;font-size:11px}@media(max-width:600px){body{padding:8px}.shell{width:min(480px,100%)}.mobile-controls{display:flex}footer{font-size:6px}.overlay p{font-size:15px}.how{font-size:7px}}
/* V2.1 viewport-fit pass: keep the whole game visible without page scrolling */
html,body{width:100%;height:100%;min-height:0;overflow:hidden}
body{height:100dvh;padding:0;align-items:stretch}
.shell{height:100dvh;width:min(560px,100vw);margin:0 auto;display:flex;flex-direction:column;min-height:0;padding:clamp(4px,1.2vh,12px) 8px}
header{flex:0 0 auto;padding:4px 4px 8px;min-height:42px}
.game-wrap{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center}
.game-wrap canvas{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;aspect-ratio:2/3}
footer{flex:0 0 auto;padding:7px 4px 2px;min-height:20px}
.mobile-controls{flex:0 0 auto;margin:5px auto 0;width:100%;max-width:480px}
@media(max-width:600px){
 body{padding:0}
 .shell{width:100vw;padding:4px 6px max(4px,env(safe-area-inset-bottom))}
 header{min-height:38px;padding:2px 3px 5px}
 .brand b{font-size:17px}.brand-hero{width:36px;height:36px}
 .game-wrap{width:100%;border-radius:10px}
 .mobile-controls{margin-top:5px;gap:8px}
 .mobile-controls button{height:42px;min-width:64px}
 .mobile-controls #flip{min-width:100px}
 footer{font-size:5.5px;min-height:17px;padding-top:5px}
}
@media(max-height:650px){
 .shell{padding-top:2px;padding-bottom:2px}
 header{min-height:32px;padding-bottom:3px}
 .orb{width:27px;height:27px}
 .brand small{font-size:6px}
 .mobile-controls{margin-top:3px}
 .mobile-controls button{height:36px}
 footer{display:none}
 .overlay p{margin:10px 0 12px}
 .eyebrow{margin-bottom:8px}
 .how{margin-bottom:12px}
}

@media(max-width:420px){.brand-hero{width:38px;height:38px;flex-basis:38px}.brand{gap:8px}}

@media(max-width:420px){.brand-hero{width:38px;height:43px;flex-basis:38px}}
