:root{--bg:#070b19;--panel:#111a35;--text:#f6f8ff;--muted:#8796bc;--pink:#ff3f91;--cyan:#38edff;--purple:#9864ff;--gold:#ffc855;color-scheme:dark;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
*{box-sizing:border-box}html,body{min-height:100%;margin:0}body{background:var(--bg);color:var(--text);overflow-x:hidden;-webkit-tap-highlight-color:transparent}button,select{font:inherit;touch-action:manipulation}button{cursor:pointer}button:focus-visible,select:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}.hidden{display:none!important}
.aurora{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:-1;background:radial-gradient(ellipse at 50% -15%,#17306a 0,transparent 55%),radial-gradient(ellipse at 100% 100%,#21113e 0,transparent 48%),#080d20}.aurora:after{content:"";position:absolute;inset:0;opacity:.20;background-image:linear-gradient(#94bcff12 1px,transparent 1px),linear-gradient(90deg,#94bcff12 1px,transparent 1px);background-size:54px 54px;mask-image:linear-gradient(transparent 0%,black 55%,transparent)}.aurora i{position:absolute;width:45vw;height:45vw;border-radius:50%;filter:blur(100px);opacity:.22;animation:float 14s ease-in-out infinite alternate}.aurora i:nth-child(1){background:#8846ff;left:-18vw;top:15%}.aurora i:nth-child(2){background:#00c8ff;right:-25vw;top:10%;animation-delay:-5s}.aurora i:nth-child(3){background:#ff418a;left:40%;bottom:-35vw;animation-delay:-9s}
#app{max-width:1100px;min-height:100dvh;margin:auto;padding:env(safe-area-inset-top) max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));display:flex;flex-direction:column}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff14;flex-shrink:0}.brand{display:flex;align-items:center;gap:12px;letter-spacing:1.8px}.brand-gem{width:41px;height:41px;display:grid;place-items:center;border-radius:12px;color:#fff;font-size:26px;font-weight:1000;text-shadow:0 0 18px #fff;background:linear-gradient(130deg,#f946a5,#8754fc 56%,#28d7fe);box-shadow:0 0 25px #9f43ff50;transform:rotate(-8deg)}.brand strong{display:block;font-size:15px;font-weight:950}.brand strong span{color:var(--pink)}.brand small{display:block;margin-top:4px;color:#9ca9cd;font-size:9px;letter-spacing:2px}.top-actions{display:flex;gap:9px}.icon-btn,.pause-btn{width:40px;height:40px;background:#ffffff0e;color:#eaf5ff;border:1px solid #ffffff29;border-radius:12px;font-size:23px}.icon-btn:active,.pause-btn:active{transform:scale(.93)}
main{flex:1;display:flex;flex-direction:column}.screen{width:100%}.start-screen{margin:auto;max-width:900px}.hero{position:relative;text-align:center;padding:50px 0 18px;isolation:isolate}.eyebrow,.section-label{font-size:10px;color:#87a3d7;font-weight:850;letter-spacing:2.2px}.eyebrow{color:#72e9ff;margin-bottom:12px}.hero h1{font-size:clamp(42px,8vw,86px);line-height:.94;font-weight:1000;letter-spacing:-3px;margin:0;text-shadow:0 8px 55px #1b154f}.hero h1 em{font-style:normal;background:linear-gradient(110deg,#fc4c98,#ffa44b);background-clip:text;color:transparent}.hero h1>span{display:block;font-size:.59em;letter-spacing:9px;margin:10px 0 0;background:linear-gradient(90deg,#32e4fa,#9f6aff);background-clip:text;color:transparent}.hero p{color:#b0bee0;font-size:16px;margin:17px 0}.hero-tags{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.hero-tags span{padding:8px 10px;border:1px solid #86bdff2a;border-radius:100px;background:#ffffff0a;color:#bdd8ff;font-size:10px;letter-spacing:1px;font-weight:750}.orbit{position:absolute;border:1px solid #65bdff12;border-radius:50%;left:50%;top:20%;transform:translateX(-50%);z-index:-2;pointer-events:none}.orbit-one{width:410px;height:410px;box-shadow:0 0 90px #8349ff22}.orbit-two{width:570px;height:570px;top:-25%;border-style:dashed}.hero-stack{height:60px;position:relative;display:flex;align-items:center;justify-content:center;gap:3px;filter:drop-shadow(0 0 25px #9964ff)}.hero-cube{width:38px;height:38px;border:3px solid #ffffff40;border-radius:7px;transform:rotate(-12deg);background:linear-gradient(130deg,#ff7ab0,#ec369e);box-shadow:inset -8px -9px 12px #22104d55,0 0 20px #e74fa577;animation:bob 3s ease-in-out infinite}.cube-two{background:linear-gradient(130deg,#33efff,#1f70fc);animation-delay:-.8s;transform:translateY(-10px) rotate(8deg)}.cube-three{background:linear-gradient(130deg,#fbd86d,#ff9235);animation-delay:-1.2s}.cube-four{background:linear-gradient(130deg,#c596ff,#7347ff);animation-delay:-1.9s;transform:translateY(-12px) rotate(10deg)}
.glass{background:linear-gradient(143deg,#182644b8,#0c152dbf);border:1px solid #a6c8ff24;box-shadow:0 15px 50px #0000003b,inset 0 1px #ffffff10;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.start-panel{max-width:650px;margin:10px auto 25px;border-radius:23px;padding:20px}.mode-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-top:15px}.mode-card{min-height:113px;border:1px solid #a6bbff24;border-radius:15px;background:#09122ec0;color:#d7e8ff;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;padding:10px 5px;transition:.2s}.mode-card.chosen{border-color:#2de8ff;box-shadow:inset 0 0 25px #36caff17,0 0 20px #30defb20;background:#163054}.mode-card .mode-emoji{font-size:28px;color:#6deeff}.mode-card strong{font-size:10px;letter-spacing:.7px}.mode-card small{font-size:9px;line-height:1.3;color:#9fafca}.primary-btn{width:100%;border:0;margin-top:17px;border-radius:13px;padding:16px 22px;display:flex;align-items:center;justify-content:center;gap:12px;color:white;font-weight:950;letter-spacing:2px;font-size:15px;background:linear-gradient(110deg,#ec377f 0%,#9857ed 55%,#3b92ff 100%);box-shadow:0 8px 32px #d848ac55;transition:.2s}.primary-btn:hover{filter:brightness(1.1)}.primary-btn:active{transform:scale(.985)}.primary-btn b{font-size:22px;line-height:0}.start-meta{display:flex;gap:14px;justify-content:space-between;margin-top:15px;color:#8497bc;font-size:10px;letter-spacing:.9px}.start-meta b{color:#ffe78a}
.game-screen{padding-top:12px}.game-header{display:flex;align-items:center;gap:8px;max-width:850px;margin:0 auto 10px}.stat{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;min-width:0;border:1px solid #a5baff21;background:#121e3cc4;border-radius:11px;height:56px}.stat small{color:#84a2d5;font-weight:800;font-size:9px;letter-spacing:1.5px}.stat strong{font-size:19px;color:#fff;font-variant-numeric:tabular-nums}.pause-btn{width:49px;height:56px;color:var(--cyan);font-size:24px}.game-layout{display:flex;justify-content:center;align-items:flex-start;gap:18px}.play-area{display:flex;align-items:center;flex-direction:column;min-width:0}.board-frame{position:relative;border:3px solid #5d75c9;border-radius:13px;box-shadow:0 0 0 4px #0b1232,0 0 28px #3971ff44,0 0 80px #8b40ff19;overflow:hidden;background:#060e21;touch-action:none;width:min(355px,calc((100dvh - 264px)/2),calc(100vw - 34px));min-width:150px;aspect-ratio:1/2}.board-frame canvas{display:block;width:100%;height:100%}.grid-glow{position:absolute;inset:0;background:linear-gradient(140deg,#71d9ff09,transparent 30%,#b14cff08);pointer-events:none}.particles{position:absolute;inset:0;pointer-events:none;overflow:hidden}.particle{position:absolute;width:7px;height:7px;border-radius:2px;box-shadow:0 0 15px currentColor;animation:burst 630ms ease-out forwards}.announcement{position:absolute;top:36%;left:50%;width:98%;transform:translate(-50%,-50%) scale(.7);text-align:center;font-weight:1000;letter-spacing:2px;font-size:clamp(19px,5vw,34px);color:#fff;text-shadow:0 2px #951ba9,0 0 30px #ff2cbb;pointer-events:none;opacity:0}.announcement.active{animation:announce 1.05s ease-out forwards}.touch-controls{display:flex;justify-content:space-between;gap:6px;width:100%;margin-top:12px}.control-btn{border:1px solid #a0c6ff43;box-shadow:inset 0 1px #ffffff23;background:#182347df;color:#e4f0ff;border-radius:13px;min-height:53px;flex:1;font-size:20px;user-select:none;-webkit-user-select:none;touch-action:none}.control-btn:active{background:#365fb2;transform:scale(.94)}.control-rotate{color:#ff8ecc;font-size:27px}.control-drop{color:#70edff;font-size:27px}.gesture-hint{font-size:10px;text-align:center;margin:11px 0 0;color:#7189bd}.game-sidebar{width:205px;display:flex;flex-direction:column;gap:12px}.side-card{border-radius:17px;padding:14px}.next-card{display:flex;flex-direction:column;align-items:center;gap:3px}.next-card canvas{width:105px;height:92px}.side-card .section-label{display:block;text-align:center}.energy-track,.boss-track{width:100%;height:10px;background:#080f2b;border:1px solid #8297ff2a;border-radius:50px;overflow:hidden;margin-top:13px}.energy-track>div{width:0;height:100%;border-radius:50px;background:linear-gradient(90deg,#33caff,#aa69ff,#f74eaa);box-shadow:0 0 20px #f74eaa;transition:width .2s}.energy-text{text-align:right;font-size:10px;color:#aec5ed;margin-top:8px}.bonus-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}.bonus{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:11px 3px;background:#0b1636;border:1px solid #698bba44;border-radius:10px;color:#d6e6ff}.bonus:disabled{opacity:.37;filter:grayscale(.75)}.bonus:not(:disabled):active{transform:scale(.94);background:#264574}.bonus span{font-size:24px}.bonus small{font-size:9px;letter-spacing:1px}.bonus b{position:absolute;top:4px;right:5px;font-size:10px;color:var(--cyan)}.side-tip strong{font-size:39px;display:block;color:#ffa0d3;text-align:center;margin:8px 0}.side-tip small{display:block;color:#8ca1c3;font-size:10px;text-align:center;line-height:1.4}.boss-panel{width:min(600px,100%);margin:0 auto 11px;border:1px solid #ff4a7480;background:#46132dd9;border-radius:12px;padding:8px 12px;color:#ffb3c5;font-size:11px;letter-spacing:2px}.boss-track{height:7px;margin-top:6px}.boss-track>div{height:100%;width:100%;background:linear-gradient(90deg,#fc7e36,#ff2768);transition:width .2s}
footer{text-align:center;font-size:9px;letter-spacing:2px;color:#526790;padding-top:16px;margin-top:auto}footer span{color:#ad5dfe}
.modal{position:fixed;inset:0;background:#050717c7;display:grid;place-items:center;z-index:20;padding:20px;backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}.modal-panel{position:relative;width:min(400px,100%);padding:26px;border-radius:23px;text-align:center}.modal-close{position:absolute;top:12px;right:15px;border:0;background:none;font-size:29px;color:#9cadce}.modal-icon{font-size:37px;margin-bottom:8px}.modal h2{margin:0 0 8px;font-weight:950;letter-spacing:2px}.modal p{color:#a2b3d6;font-size:13px;line-height:1.5}.modal .secondary-btn{margin-top:10px;width:100%;border:1px solid #7689b64d;background:#111b3e;color:#c8dcff;border-radius:12px;padding:13px;font-weight:800;letter-spacing:1px}.settings-content{text-align:left;padding:15px 0 0}.settings-content>label:not(.toggle-line){display:block;font-size:11px;color:#9ab0d3;font-weight:800;letter-spacing:1px;margin-bottom:8px}.settings-content select{width:100%;padding:13px;border:1px solid #8f98e65e;background:#0e1b3c;color:white;border-radius:11px;margin-bottom:10px}.toggle-line{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #a8b9ff1e;font-size:11px;font-weight:750;color:#bfcce9}.toggle-line input{accent-color:#c55aff;width:20px;height:20px}.final-score{display:flex;flex-direction:column;color:#8ba2cb;letter-spacing:1px}.final-score strong{font-size:38px;color:#fff;letter-spacing:-1px}
@keyframes float{to{transform:translate(10vw,5vw)}}@keyframes bob{50%{translate:0 -12px}}@keyframes announce{0%{opacity:0;transform:translate(-50%,-50%) scale(.5)}18%{opacity:1;transform:translate(-50%,-50%) scale(1.18)}28%{transform:translate(-50%,-50%) scale(1)}78%{opacity:1}100%{opacity:0;transform:translate(-50%,-70%) scale(1.05)}}@keyframes burst{from{opacity:1;transform:translate(0,0) rotate(0)}to{opacity:0;transform:translate(var(--x),var(--y)) rotate(540deg)}}
@media(min-width:770px){.hero{padding-top:55px}.start-screen{max-width:850px}.board-frame{width:min(355px,calc((100dvh - 230px)/2))}.game-sidebar{width:220px}.game-header{max-width:600px}.game-screen{padding-top:22px}}
@media(max-width:620px){.topbar{height:59px}.brand-gem{width:35px;height:35px;font-size:22px}.brand strong{font-size:12px}.brand small{font-size:7px}.icon-btn{width:36px;height:36px}.hero{padding-top:35px}.hero-stack{height:57px}.hero h1{letter-spacing:-2px}.hero h1>span{letter-spacing:5px}.hero p{font-size:13px}.hero-tags span{font-size:8px}.start-panel{padding:13px;border-radius:15px}.mode-grid{gap:6px}.mode-card{min-height:94px}.mode-card strong{font-size:8px}.mode-card small{font-size:8px}.mode-card .mode-emoji{font-size:24px}.start-meta{font-size:8px}.game-header{gap:5px;margin-bottom:8px}.stat{height:47px}.stat strong{font-size:17px}.stat small{font-size:8px}.pause-btn{width:43px;height:47px}.game-layout{gap:8px}.game-sidebar{width:70px;gap:7px}.side-card{padding:5px;border-radius:9px}.side-card .section-label{font-size:7px;letter-spacing:0}.next-card canvas{width:63px;height:58px}.energy-track{height:7px;margin-top:8px}.energy-text{font-size:8px}.bonus-grid{grid-template-columns:1fr;gap:3px;margin-top:6px}.bonus{padding:4px}.bonus span{font-size:19px}.bonus small{font-size:7px}.bonus b{right:2px;top:1px;font-size:9px}.side-tip{display:none}.board-frame{width:min(calc((100dvh - 215px)/2),calc(100vw - 112px));min-width:0}.touch-controls{margin-top:9px;gap:3px}.control-btn{min-height:49px;border-radius:10px;font-size:17px}.gesture-hint{font-size:9px}.game-layout{justify-content:center}.play-area{width:auto}.game-header{max-width:440px}footer{font-size:8px}}
@media(max-height:720px) and (max-width:620px){.topbar{height:47px}.game-screen{padding-top:7px}.game-header{margin-bottom:5px}.stat,.pause-btn{height:39px}.board-frame{width:min(calc((100dvh - 165px)/2),calc(100vw - 112px))}.control-btn{min-height:38px}.touch-controls{margin-top:6px}.gesture-hint{display:none}.hero{padding-top:10px}.hero-stack{height:35px}.hero p{margin:6px}.start-panel{margin-top:3px}.mode-card{min-height:75px}.hero-tags{display:none}}
@media(orientation:landscape) and (max-height:550px){.topbar{height:45px}.game-screen{padding-top:5px}.game-header{margin-bottom:5px}.stat,.pause-btn{height:36px}.board-frame{width:min(250px,calc((100dvh - 138px)/2))}.control-btn{min-height:30px}.gesture-hint{display:none}.game-sidebar{width:160px}.bonus-grid{grid-template-columns:repeat(2,1fr)}.start-screen{display:flex;align-items:center;gap:20px}.hero{width:45%;padding:0}.hero-tags,.hero-stack{display:none}.start-panel{width:55%;margin:5px}.mode-card{min-height:75px}footer{display:none}}
@media(prefers-reduced-motion:reduce){.aurora i,.hero-cube{animation:none}.particle{animation-duration:180ms}.announcement.active{animation-duration:700ms}}

/* Distinct energy atmospheres for later reactor worlds */
.world-label{display:flex;align-items:center;justify-content:center;gap:12px;letter-spacing:2.8px;font-size:10px;font-weight:900;color:#8ceeff;margin:0 auto 11px;text-shadow:0 0 15px #55dcff85}.world-label span{color:#c95aff}
body[data-world="lava"] .aurora{background:radial-gradient(ellipse at 50% -10%,#69311a 0,transparent 58%),radial-gradient(ellipse at 100% 100%,#45102d 0,transparent 48%),#160c17}
body[data-world="ice"] .aurora{background:radial-gradient(ellipse at 50% -10%,#176383 0,transparent 58%),radial-gradient(ellipse at 100% 100%,#18365e 0,transparent 48%),#081322}
body[data-world="void"] .aurora{background:radial-gradient(ellipse at 50% -10%,#49236d 0,transparent 58%),radial-gradient(ellipse at 100% 100%,#1a0a38 0,transparent 48%),#090817}
body[data-world="lava"] .world-label{color:#ffc06b;text-shadow:0 0 15px #ff6d3080}
body[data-world="ice"] .world-label{color:#9df4ff;text-shadow:0 0 15px #3de4fa80}
body[data-world="void"] .world-label{color:#e2a0ff;text-shadow:0 0 15px #aa48ff80}
@media(max-width:620px){.world-label{font-size:9px;margin-bottom:7px}.board-frame{width:min(calc((100dvh - 237px)/2),calc(100vw - 112px))}}
@media(max-height:720px) and (max-width:620px){.world-label{margin-bottom:3px;font-size:8px}.board-frame{width:min(calc((100dvh - 184px)/2),calc(100vw - 112px))}}
@media(orientation:landscape) and (max-height:550px){.world-label{margin-bottom:2px}.board-frame{width:min(250px,calc((100dvh - 158px)/2))}}
