/* Fonts are bundled with the game (no Google Fonts request needed) */
@font-face{font-family:'Bebas Neue';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/bebas-neue-latin-400-normal.woff2) format('woff2');}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/space-mono-latin-400-normal.woff2) format('woff2');}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/space-mono-latin-700-normal.woff2) format('woff2');}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html,body{height:100%;background:#0a0a0a;color:#fff;font-family:'Bebas Neue',sans-serif;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;}

/* ─── SCREENS ─── */
.screen{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;transition:opacity .4s,transform .4s;}
#homeScreen{background:#1a1a1a;z-index:20;}
#gameScreen{z-index:10;}
.view{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;transition:transform .38s cubic-bezier(.4,0,.2,1);}
#gameView{transform:translateX(0);}
#storeView{transform:translateX(100%);background:#0a0a0a;z-index:10;}
#bunkerView{transform:translateX(100%);background:rgba(10,10,10,.92);z-index:10;}
body.store-open #gameView{transform:translateX(-100%);}
body.store-open #storeView{transform:translateX(0);}
body.bunker-open #gameView{transform:translateX(-100%);}
body.bunker-open #bunkerView{transform:translateX(0);}
body.bunker-open #soundboardBtn,body.bunker-open #padEditToggleBtn,body.bunker-open #partyBtn,body.bunker-open #socialsBtn{display:none!important;}
body.store-open #soundboardBtn,body.store-open #padEditToggleBtn,body.store-open #partyBtn,body.store-open #socialsBtn{display:none!important;}

/* ─── HOME ─── */
#homeScreen{align-items:center;justify-content:space-between;padding:3rem 2rem 3.5rem;}
#homeScreen.hidden{opacity:0;pointer-events:none;transform:scale(.96);}
.home-logo{display:flex;flex-direction:column;align-items:center;gap:.4rem;margin-top:1rem;}
.home-logo-emoji{font-size:clamp(4rem,18vw,7rem);filter:drop-shadow(0 0 30px rgba(0,255,136,.6));animation:logoFloat 3s ease-in-out infinite;}
@keyframes logoFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}
.home-logo-title{font-family:'Bebas Neue',sans-serif;font-size:clamp(2.6rem,12vw,5rem);letter-spacing:.12em;color:#00ff88;line-height:1;text-shadow:0 0 40px rgba(0,255,136,.5);}
.home-logo-sub{font-size:.65rem;color:#5a9a6a;letter-spacing:.35em;text-transform:uppercase;}
.home-slots-label{font-size:.62rem;color:#888;letter-spacing:.35em;text-transform:uppercase;margin-bottom:.7rem;text-align:center;}
.home-slots{display:flex;flex-direction:column;gap:.7rem;width:100%;max-width:340px;}
.slot-card{background:#222;border:1px solid #3a3a3a;border-radius:12px;padding:.85rem 1.1rem;display:flex;align-items:center;gap:.9rem;cursor:pointer;touch-action:manipulation;transition:border-color .2s,background .2s,transform .15s;}
.slot-card:active{transform:scale(.97);}
.slot-card.has-save{border-color:#2a5a3a;}
.slot-card.has-save:active{background:#0a1a0f;border-color:#00ff88;}
.slot-card.empty-save:active{background:#1a1a1a;border-color:#333;}
.slot-icon{font-size:1.8rem;flex-shrink:0;}
.slot-info{flex:1;min-width:0;}
.slot-name{font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;color:#00ff88;line-height:1;}
.slot-name.empty{color:#666;}
.slot-detail{font-family:'Bebas Neue',sans-serif;font-size:.65rem;color:#5a9a6a;letter-spacing:.1em;text-transform:uppercase;line-height:1.5;}
.slot-detail.empty{font-family:'Bebas Neue',sans-serif;color:#444;}
.slot-actions{display:flex;gap:.4rem;flex-shrink:0;}
.slot-del-btn{background:transparent;border:1px solid #555;color:#777;font-size:.7rem;padding:.3rem .5rem;border-radius:6px;cursor:pointer;touch-action:manipulation;transition:border-color .2s,color .2s;}
.slot-del-btn:active{border-color:#ff4444;color:#ff4444;}
#deleteConfirm{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.85);z-index:100;display:none;align-items:center;justify-content:center;flex-direction:column;gap:1rem;}
#deleteConfirm.show{display:flex;}
.confirm-box{background:#141414;border:1px solid #333;border-radius:14px;padding:1.5rem 1.8rem;text-align:center;max-width:280px;}
.confirm-title{font-family:'Bebas Neue',sans-serif;font-size:1.4rem;color:#ff4444;letter-spacing:.1em;}
.confirm-sub{font-size:.58rem;color:#666;letter-spacing:.15em;text-transform:uppercase;margin-top:.4rem;}
.confirm-btns{display:flex;gap:.7rem;margin-top:1.2rem;}
.confirm-btn{flex:1;font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.1em;padding:.55rem;border-radius:8px;cursor:pointer;touch-action:manipulation;border:1px solid;}
.confirm-btn.yes{background:#1a0000;border-color:#ff4444;color:#ff4444;}
.confirm-btn.no{background:#1a1a1a;border-color:#333;color:#888;}

/* ─── GAME SCREEN ─── */
.app{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:100%;padding:1.4rem 1.5rem 1.5rem;padding-top:max(1.4rem,env(safe-area-inset-top,0px));position:relative;}
#alienLayer{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:15;overflow:hidden;}
.bouncer{position:absolute;font-size:2.02rem;line-height:1;will-change:transform;display:flex;flex-direction:column;align-items:center;gap:0;}
.bouncer-emoji{display:block;}
.bouncer-name{position:absolute;top:100%;left:50%;transform:translateX(-50%);margin-top:-1px;font-family:'Bebas Neue',sans-serif;font-size:15px;letter-spacing:.04em;white-space:nowrap;opacity:.9;text-shadow:-2px 0 0 #000,2px 0 0 #000,0 -2px 0 #000,0 2px 0 #000,-1.5px -1.5px 0 #000,1.5px -1.5px 0 #000,-1.5px 1.5px 0 #000,1.5px 1.5px 0 #000,0 0 6px #000;transition:opacity .3s;text-align:center;max-width:160px;padding:4px 3px;overflow:hidden;text-overflow:ellipsis;line-height:1;font-weight:700;}
.bouncer-name.hidden{opacity:0;}
.header{text-align:center;z-index:3;position:relative;width:100%;}
.game-title{font-family:'Bebas Neue',sans-serif;font-size:clamp(1.4rem,5.5vw,2.2rem);letter-spacing:.1em;line-height:1;color:#00ff88;transition:color .5s;display:flex;align-items:center;justify-content:center;gap:.3rem;}
.game-title-emoji{font-size:clamp(1.2rem,4.5vw,1.9rem);}
.subtitle{font-family:'Bebas Neue',sans-serif;font-size:.58rem;color:#3a6a4a;letter-spacing:.25em;text-transform:uppercase;margin-top:.15rem;}
.btn-left{position:absolute;left:0;top:50%;transform:translateY(-50%);}
.btn-right{position:absolute;right:0;top:50%;transform:translateY(-50%);}
.nav-btn{background:#1a1a1a;border:1px solid #333;color:#e8ff00;font-family:'Bebas Neue',sans-serif;font-size:.78rem;letter-spacing:.07em;padding:.3rem .55rem;border-radius:6px;cursor:pointer;transition:background .2s,border-color .2s;touch-action:manipulation;white-space:nowrap;}
.nav-btn:active{background:#252500;border-color:#e8ff00;}
.nav-btn.alien-btn{color:#00ff88;border-color:#1a3a2a;background:#0a1a0f;}
.nav-btn.alien-btn:active{background:#001a0a;border-color:#00ff88;}

/* ─── SOUNDBOARD BUTTON (bottom left, replaces options) ─── */
#padEditToggleBtn{position:fixed;bottom:1.4rem;left:7.8rem;z-index:50;font-family:'Bebas Neue',sans-serif;font-size:.82rem;letter-spacing:.08em;padding:.42rem .72rem;border-radius:50px;border:1px solid #333;background:#111;color:#666;cursor:pointer;touch-action:manipulation;transition:border-color .2s,color .2s,background .2s;}
#socialsBtn{display:none;}
body.desktop-mode #socialsBtn{display:block;position:fixed;bottom:1.4rem;left:7.8rem;z-index:50;font-family:'Bebas Neue',sans-serif;font-size:.82rem;letter-spacing:.08em;padding:.42rem .72rem;border-radius:50px;border:1px solid #333;background:#111;color:#666;cursor:pointer;touch-action:manipulation;transition:border-color .2s,color .2s,background .2s;}
body.desktop-mode #socialsBtn:active{background:#1a1a1a;border-color:#6699ff;color:#6699ff;}
#padEditToggleBtn:active{background:#1a1a1a;border-color:#555;}
#padEditToggleBtn.active{border-color:#a0a8ff;color:#a0a8ff;background:#0a0a1a;box-shadow:0 0 12px -3px rgba(160,168,255,.5);}
#soundboardBtn{position:fixed;bottom:1.4rem;left:1.4rem;z-index:50;font-family:'Bebas Neue',sans-serif;font-size:.82rem;letter-spacing:.08em;padding:.42rem .72rem;border-radius:50px;border:1px solid #333;background:#111;color:#666;cursor:pointer;touch-action:manipulation;transition:border-color .2s,color .2s,background .2s;}
#soundboardBtn:active{background:#1a1a1a;border-color:#555;color:#aaa;}
#soundboardBtn.unlocked{border-color:#a0a8ff;color:#a0a8ff;background:#0a0a1a;}

/* ─── SOUNDBOARD PANEL ─── */
#soundboardPanel{position:fixed;bottom:4.8rem;left:1.4rem;z-index:55;background:#141414;border:1px solid #2a2a2a;border-radius:14px;padding:1rem 1.2rem;min-width:240px;max-width:290px;display:none;flex-direction:column;gap:.65rem;box-shadow:0 8px 32px rgba(0,0,0,.7);animation:panelIn .18s cubic-bezier(.34,1.2,.64,1) forwards;max-height:70vh;overflow-y:auto;}
#soundboardPanel.open{display:flex;}
@keyframes panelIn{from{opacity:0;transform:translateY(8px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.sb-title{font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.18em;color:#444;text-transform:uppercase;padding-bottom:.4rem;border-bottom:1px solid #222;}
.sb-master-row{display:flex;align-items:center;justify-content:space-between;gap:.6rem;}
.sb-label{font-size:.56rem;letter-spacing:.15em;text-transform:uppercase;color:#888;flex-shrink:0;}
.sb-slider{flex:1;-webkit-appearance:none;appearance:none;height:3px;background:#333;border-radius:2px;outline:none;cursor:pointer;}
.sb-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:#a0a8ff;cursor:pointer;}
.sb-vol-num{font-family:'Bebas Neue',sans-serif;font-size:16px;width:38px;background:#111;border:1px solid #222;border-radius:4px;color:#888;text-align:center;padding:2px 2px;outline:none;-moz-appearance:textfield;flex-shrink:0;}
.sb-vol-num:focus{border-color:#a0a8ff;color:#a0a8ff;}
.sb-vol-num::-webkit-outer-spin-button,.sb-vol-num::-webkit-inner-spin-button{-webkit-appearance:none;}
.sb-sounds-list{display:flex;flex-direction:column;gap:.45rem;}
.sb-sound-row{display:flex;align-items:center;gap:.5rem;}
.sb-sound-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}
.sb-sound-name{font-family:'Bebas Neue',sans-serif;font-size:.58rem;letter-spacing:.08em;flex:0 0 70px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sb-sound-slider{flex:1;-webkit-appearance:none;appearance:none;height:3px;background:#333;border-radius:2px;outline:none;cursor:pointer;}
.sb-sound-slider::-webkit-slider-thumb{-webkit-appearance:none;width:11px;height:11px;border-radius:50%;background:#a0a8ff;cursor:pointer;}
.sb-mute-btn{font-size:.75rem;padding:.1rem .3rem;border-radius:5px;border:1px solid #2a2a2a;background:#111;cursor:pointer;touch-action:manipulation;transition:all .15s;flex-shrink:0;line-height:1;}
.sb-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem;}
.sb-checkbox-wrap{position:relative;display:inline-flex;align-items:center;cursor:pointer;flex-shrink:0;}
.sb-checkbox-wrap input{position:absolute;opacity:0;width:0;height:0;}
.sb-checkbox-track{width:34px;height:18px;background:#222;border-radius:9px;border:1px solid #333;transition:background .2s,border-color .2s;position:relative;display:block;}
.sb-checkbox-thumb{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#555;transition:transform .2s,background .2s;}
.sb-checkbox-wrap input:checked+.sb-checkbox-track{background:#0a1a0f;border-color:#00ff88;}
.sb-checkbox-wrap input:checked+.sb-checkbox-track .sb-checkbox-thumb{transform:translateX(16px);background:#00ff88;}
.sb-mute-btn.muted{border-color:#ff4444;}

/* Score */
.score-section{text-align:center;z-index:3;}
.score .w-unit{font-size:.42em;margin-left:.14em;letter-spacing:.04em;opacity:.8;}
.score{font-family:'Bebas Neue',sans-serif;font-size:clamp(2.6rem,12vw,5.5rem);line-height:1;letter-spacing:-.02em;}
.score-sub{font-family:'Bebas Neue',sans-serif;font-size:clamp(.52rem,1.8vw,.75rem);color:#3a6a4a;letter-spacing:.04em;line-height:1.3;margin-top:.15rem;min-height:.9rem;transition:opacity .3s;word-break:break-all;white-space:normal;overflow-wrap:break-word;padding:0 .5rem;}
.score.flash{text-shadow:0 0 40px rgba(255,255,255,.9);}
.multiplier{font-size:.62rem;letter-spacing:.25em;text-transform:uppercase;margin-top:.1rem;color:#e8ff00;transition:color .5s;}
.auto-info{margin-top:.28rem;display:none;flex-direction:column;align-items:center;gap:2px;}
.auto-info.visible{display:flex;}
.auto-info-row{font-size:.55rem;letter-spacing:.2em;text-transform:uppercase;color:#555;}
.auto-info-row span{color:#e8ff00;transition:color .5s;}
.energy-meter{margin-top:.3rem;flex-direction:column;align-items:center;gap:3px;--ec:#00ff88;}
.energy-segs{display:flex;gap:2px;}
.energy-seg{width:9px;height:7px;border-radius:2px;background:#16221c;border:1px solid #1d2d25;box-sizing:border-box;transition:background .15s,box-shadow .15s;}
.energy-seg.on{background:var(--ec);border-color:var(--ec);box-shadow:0 0 6px -1px var(--ec);}
.energy-label{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.18em;color:var(--ec);opacity:.85;}
.energy-meter.mid{--ec:#ffc83a;}
.energy-meter.low{--ec:#ff4a4a;}
.energy-meter.low .energy-seg.on{animation:energyPulse .9s ease-in-out infinite;}
.energy-meter.empty .energy-label{animation:energyPulse .9s ease-in-out infinite;opacity:1;}
@keyframes energyPulse{0%,100%{opacity:1;}50%{opacity:.35;}}
.auto-pulse{width:5px;height:5px;border-radius:50%;background:#e8ff00;display:inline-block;margin-right:4px;animation:pulse 1s ease-in-out infinite;vertical-align:middle;transition:background .5s;}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.65)}}
.alien-mult-info{margin-top:.2rem;font-size:.55rem;letter-spacing:.2em;text-transform:uppercase;color:#555;display:none;}
.alien-mult-info.visible{display:block;}
.alien-mult-info span{color:#00ff88;}

/* Dual tier grids */
.tiers-dual-wrap{display:flex;gap:18px;align-items:flex-start;justify-content:center;z-index:3;width:100%;}
.tiers-col{display:flex;flex-direction:column;align-items:center;gap:4px;}
.tiers-col::-webkit-scrollbar{display:none;}
.tiers-col-label{font-family:'Bebas Neue',sans-serif;font-size:.65rem;letter-spacing:.28em;text-transform:uppercase;color:#3a6a4a;margin-bottom:1px;}
.tiers-container{display:flex;flex-direction:column;gap:5px;align-items:center;overflow-y:auto;max-height:22vh;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
.tiers-container::-webkit-scrollbar{display:none;}
.tiers-divider{width:1px;background:#222;align-self:stretch;margin:0 2px;flex-shrink:0;}
.tier-row{display:flex;align-items:center;justify-content:center;gap:0;opacity:0;transform:translateY(6px);animation:tierIn .35s ease-out forwards;}
@keyframes tierIn{to{opacity:1;transform:translateY(0);}}
.tier-spacer{width:40px;flex-shrink:0;}
.tier-dots{display:flex;gap:5px;align-items:center;justify-content:center;flex:0 0 auto;margin:0 8px;}
.tier-dot{width:9px;height:9px;border-radius:50%;background:#333;flex-shrink:0;transition:background .12s,transform .12s,box-shadow .12s;}
.tier-dot.lit{transform:scale(1.3);}
.tier-dot.pop{animation:dotPop .3s cubic-bezier(.34,1.56,.64,1) forwards;}
@keyframes dotPop{0%{transform:scale(1.3)}50%{transform:scale(1.9)}100%{transform:scale(1.3)}}
.tier-mult{font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.05em;width:40px;flex-shrink:0;opacity:0;transition:opacity .5s;text-align:left;}
.tier-mult.show{opacity:1;}

/* ─── SEQUENCER (replaces dots when active) ─── */
.seq-area{width:100%;z-index:3;display:none;}
.seq-area.visible{display:block;}
.seq-area-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px;}
/* with every music button unlocked (VELOCITY, ROLL, VOX) the row can be wider than a small phone: wrap instead of running off the edge */
.seq-area-header{flex-wrap:wrap;row-gap:4px;}
.seq-area-label{font-family:'Bebas Neue',sans-serif;font-size:.6rem;letter-spacing:.22em;color:#3a3a6a;text-transform:uppercase;}
.seq-playpause-btn.playing{color:#00ff88;border-color:#00ff88;}
.seq-mode-pills{display:flex;gap:2px;background:#0a0a14;border:1px solid #1a1a2a;border-radius:5px;padding:2px;}
.seq-mode-pill{font-family:'Bebas Neue',sans-serif;font-size:.68rem;letter-spacing:.1em;padding:.12rem .38rem;border-radius:3px;border:none;background:transparent;color:#333;cursor:pointer;transition:all .12s;touch-action:manipulation;}
.seq-mode-pill.active{background:#1a1a3a;color:#a0a8ff;}
.seq-bpm-wrap{display:flex;align-items:center;gap:2px;}
.seq-bpm-btn{padding:.1rem .32rem!important;font-size:.85rem!important;line-height:1;}
.seq-bpm-display{font-family:'Bebas Neue',sans-serif;font-size:.72rem;letter-spacing:.08em;color:#a0a8ff;min-width:24px;text-align:center;}
.seq-bottom-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px;}
.seq-bottom-row button,.seq-bottom-row .seq-add-btn{white-space:nowrap;}
.seq-bottom-row .seq-add-btn{flex:0 0 auto;width:auto;padding:.2rem .6rem;margin-top:0;}
.seq-bottom-row #vtbViewBtn + *{margin-left:0;}
.seq-bottom-row #vtbViewBtn + #vtbKeyBtn + #vtbFxBtn + *{margin-left:auto;} /* VIEW, KEY and EFFECTS sit together on the left; everything after them goes to the right */
#vtbKeyBtn.active,#vtbFxBtn.active{border-color:#a0a8ff !important;color:#cfd3ff !important;box-shadow:0 0 8px -2px rgba(160,168,255,.7);}
.seq-save-pat-btn{font-family:'Bebas Neue',sans-serif;font-size:.65rem;letter-spacing:.08em;padding:.18rem .5rem;border-radius:4px;border:1px solid #1a1a3a;background:#0d0d1c;color:#5555aa;cursor:pointer;touch-action:manipulation;transition:all .12s;white-space:nowrap;}
.seq-save-pat-btn:hover{color:#a0a8ff;border-color:#a0a8ff;}
.seq-arrange-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:3px;}
/* Arrangement playhead */
.seq-arr-ph-row{display:flex;gap:2px;margin-bottom:3px;height:6px;}
.seq-arr-ph-cell{flex:1;border-radius:2px;background:#1a1a2a;transition:background .05s;}
.seq-arr-ph-cell.lit{background:#a0a8ff;box-shadow:0 0 6px #a0a8ff;}
/* Arrangement grid */
.seq-arr-grid{display:flex;gap:2px;flex-wrap:wrap;overflow-y:auto;-webkit-overflow-scrolling:touch;}
body.desktop-mode .seq-arr-grid{max-height:28vh;}
.seq-arr-bar{flex:1;min-width:calc(25% - 2px);max-width:calc(25% - 2px);aspect-ratio:1.6;border-radius:5px;border:1px solid #1a1a2a;background:#0d0d1c;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation;transition:all .12s;overflow:hidden;position:relative;}
.seq-arr-bar:hover{border-color:#2a2a4a;}
.seq-arr-bar.playing{box-shadow:0 0 8px var(--bc,#a0a8ff);border-color:var(--bc,#a0a8ff);}
.seq-arr-bar.empty{border-style:dashed;opacity:.5;}
.seq-arr-bar-name{font-family:'Bebas Neue',sans-serif;font-size:.65rem;letter-spacing:.07em;text-align:center;padding:0 2px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.seq-arr-bar-idx{font-size:.38rem;letter-spacing:.1em;opacity:.4;font-family:'Bebas Neue',sans-serif;}
/* Pattern library */
.match-card{border-radius:10px;cursor:pointer;position:relative;transform-style:preserve-3d;transition:transform .4s cubic-bezier(.4,0,.2,1);touch-action:manipulation;width:100%;aspect-ratio:3/4;}
.match-card.flipped{transform:rotateY(180deg);}
.match-card.matched{transform:rotateY(180deg);pointer-events:none;}
.match-card-face{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:10px;backface-visibility:hidden;display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;height:100%;}
.match-card-back{background:linear-gradient(135deg,#0a1a2a,#05100a);border:1px solid #0d2a1a;}
.match-card-back::after{content:'👾';font-size:clamp(1.8rem,5cqw,2.8rem);opacity:.3;}
.match-card-front{transform:rotateY(180deg);border:2px solid transparent;font-size:clamp(1.6rem,6cqw,3rem);}
.match-card.matched .match-card-front{border-color:#00ff88;box-shadow:0 0 14px -2px rgba(0,255,136,.5);}
.match-card.wrong .match-card-front{border-color:#ff4444;}
.seq-pat-library{display:flex;flex-direction:column;gap:3px;max-height:120px;overflow-y:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch;}
.seq-song-slots{display:flex;flex-direction:column;gap:3px;max-height:160px;overflow-y:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch;-webkit-scrollbar:none;}
.seq-song-slot{display:flex;align-items:center;gap:6px;padding:.32rem .5rem;background:#0d0d1c;border:1px solid #1a1a2a;border-radius:7px;cursor:pointer;touch-action:manipulation;transition:border-color .1s;}
.seq-song-slot.playing{border-color:var(--sc,#a0a8ff);background:color-mix(in srgb,var(--sc,#a0a8ff) 10%,transparent);}
.seq-song-slot-idx{font-family:'Bebas Neue',sans-serif;font-size:.65rem;letter-spacing:.08em;color:#333;width:12px;flex-shrink:0;text-align:center;}
.seq-song-slot-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;}
.seq-song-slot-name{font-family:'Bebas Neue',sans-serif;font-size:.7rem;letter-spacing:.08em;flex:1;}
.seq-song-slot-bars{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.08em;color:#333;flex-shrink:0;}
.seq-song-slot-del{font-size:.62rem;padding:.1rem .28rem;border-radius:3px;border:1px solid #1a1a2a;background:transparent;color:#443333;cursor:pointer;touch-action:manipulation;transition:all .1s;flex-shrink:0;}
.seq-song-slot-del:hover{color:#ff4444;border-color:#ff4444;}
.seq-pat-library::-webkit-scrollbar{display:none;}
.seq-pat-row{display:flex;align-items:center;gap:5px;padding:.3rem .5rem;background:#0d0d1c;border:1px solid #1a1a2a;border-radius:7px;cursor:pointer;touch-action:manipulation;transition:all .1s;}
.seq-pat-row:hover{border-color:#2a2a3a;}
.seq-pat-row.selected{border-color:#a0a8ff;background:#0f0f22;}
.seq-pat-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;}
.seq-pat-name{font-family:'Bebas Neue',sans-serif;font-size:.72rem;letter-spacing:.08em;flex:1;}
.seq-pat-actions{display:flex;gap:3px;}
.seq-pat-load-btn,.seq-pat-del-btn{font-family:'Bebas Neue',sans-serif;font-size:.6rem;letter-spacing:.07em;padding:.14rem .36rem;border-radius:3px;border:1px solid #1a1a2a;background:transparent;cursor:pointer;touch-action:manipulation;transition:all .1s;}
.seq-pat-load-btn{color:#5555aa;}.seq-pat-load-btn:hover{color:#a0a8ff;border-color:#a0a8ff;}
.seq-pat-del-btn{color:#553333;}.seq-pat-del-btn:hover{color:#ff4444;border-color:#ff4444;}
.seq-bpm-wrap{display:flex;align-items:center;gap:3px;}
.seq-bpm-btn{padding:.1rem .35rem!important;font-size:.85rem!important;line-height:1;}
.seq-bpm-display{font-family:'Bebas Neue',sans-serif;font-size:.75rem;letter-spacing:.1em;color:#a0a8ff;min-width:28px;text-align:center;}
.seq-hdr-btn{font-size:.75rem;padding:.15rem .4rem;border-radius:4px;border:1px solid #1a1a2a;background:#0d0d1c;color:#4444aa;cursor:pointer;touch-action:manipulation;transition:all .1s;line-height:1;}
.seq-hdr-btn:hover{border-color:#a0a8ff;color:#a0a8ff;}
.seq-ph-bar{display:grid;grid-template-columns:62px 1fr 42px;gap:4px;margin-bottom:3px;}
.seq-ph-cells{display:grid;grid-template-columns:repeat(16,1fr);gap:2px;}
.seq-ph-cell{height:3px;border-radius:1px;background:#222;transition:background .04s,box-shadow .04s;}
.seq-ph-cell.lit{background:#a0a8ff;box-shadow:0 0 5px #a0a8ff;}
.seq-layer-row{display:grid;grid-template-columns:62px 1fr 42px;gap:4px;align-items:center;padding:2px 0;border-top:1px solid #1a1a1a;}
.seq-layer-row:first-of-type{border-top:none;}
.seq-snd-pill{display:flex;align-items:center;gap:4px;background:#141414;border:1px solid #1e1e1e;border-radius:5px;padding:.2rem .35rem;cursor:pointer;touch-action:manipulation;min-width:0;overflow:hidden;transition:border-color .12s;}
.seq-snd-pill:hover{border-color:#2a2a2a;}
.seq-pill-dot{width:5px;height:5px;border-radius:50%;flex-shrink:0;}
.seq-pill-name{font-family:'Bebas Neue',sans-serif;font-size:.65rem;letter-spacing:.07em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
.seq-steps{display:grid;grid-template-columns:repeat(16,1fr);gap:2px;}
.seq-step{height:18px;border-radius:3px;background:#1a1a1a;border:1px solid transparent;cursor:pointer;touch-action:manipulation;transition:background .06s,box-shadow .06s;}
.seq-step:nth-child(4n+1){border-left:2px solid #252525;}
.seq-step:hover{background:#222;}
.seq-step.on{background:var(--lc);border-color:var(--lc);box-shadow:0 0 5px -1px var(--lc);}
.seq-step.flash{animation:sflash .12s ease-out;}
@keyframes sflash{0%{filter:brightness(2.5)}100%{filter:brightness(1)}}
.seq-row-ctrl{display:flex;gap:2px;justify-content:flex-end;}
.seq-rc-btn{font-size:.62rem;width:18px;height:18px;display:flex;align-items:center;justify-content:center;border-radius:3px;border:1px solid #222;background:#141414;color:#444;cursor:pointer;touch-action:manipulation;transition:all .1s;flex-shrink:0;}
.seq-rc-btn:hover{color:#888;border-color:#333;}
.seq-rc-btn.muted{color:#ff3355;border-color:#ff3355;}
.seq-add-btn{font-family:'Bebas Neue',sans-serif;font-size:.65rem;letter-spacing:.1em;width:100%;padding:.2rem 0;margin-top:3px;border-radius:4px;border:1px dashed #222;background:transparent;color:#333;cursor:pointer;touch-action:manipulation;transition:all .12s;text-align:center;}
.seq-add-btn:hover{border-color:#33ff99;color:#33ff99;}
.seq-add-btn:disabled{opacity:.2;cursor:default;pointer-events:none;}

/* ─── FULLSCREEN SEQUENCER MODAL ─── */
#seqFullModal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:200;background:#080810;display:none;flex-direction:column;padding:0;}
#seqFullModal.open{display:flex;}
#seqFullInner{display:flex;flex-direction:column;width:100%;height:100%;padding:1rem 1.2rem 1.4rem;gap:.7rem;overflow:hidden;transform-origin:center center;transition:transform .28s cubic-bezier(.4,0,.2,1),opacity .28s;}
#seqFullHeader{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;}
#seqFullTitle{font-family:'Bebas Neue',sans-serif;font-size:1.2rem;letter-spacing:.15em;color:#a0a8ff;}
#seqFullHint{font-size:.35rem;letter-spacing:.18em;color:#2a2a4a;text-transform:uppercase;}
body.desktop-mode #seqFullHint{display:none;}
body.desktop-mode #seqFullZoomHint{display:none;}
#seqFullCloseBtn{font-family:'Bebas Neue',sans-serif;font-size:.75rem;letter-spacing:.1em;padding:.3rem .7rem;border-radius:6px;border:1px solid #a0a8ff;background:#0a0a1a;color:#a0a8ff;cursor:pointer;touch-action:manipulation;}
#seqFullPhBar{display:grid;grid-template-columns:repeat(16,1fr);gap:3px;flex-shrink:0;}
#seqFullPhBar{grid-template-columns:80px 1fr 52px;gap:6px;}
#seqFullPhBar .seq-ph-cells{}
#seqFullPhBar .seq-ph-cell{height:5px;}
#seqFullLayers{flex:1;display:flex;flex-direction:column;gap:6px;overflow-y:auto;}
#seqFullLayers .seq-layer-row{display:grid;grid-template-columns:80px 1fr 52px;gap:6px;padding:4px 0;border-top:1px solid #1a1a1a;}
#seqFullLayers .seq-layer-row:first-of-type{border-top:none;}
#seqFullLayers .seq-snd-pill{padding:.3rem .5rem;}
#seqFullLayers .seq-pill-name{font-size:.72rem;}
#seqFullLayers .seq-steps{gap:3px;}
#seqFullLayers .seq-step{height:clamp(28px,5vh,48px);border-radius:5px;}
#seqFullLayers .seq-step:nth-child(4n+1){border-left:3px solid #252525;}
#seqFullLayers .seq-rc-btn{width:24px;height:24px;font-size:.65rem;}
#seqFullAddBtn{flex-shrink:0;font-size:.7rem;padding:.35rem 0;}

/* ─── VIEW TOGGLE BAR ─── */
.view-toggle-bar{display:flex;gap:5px;width:100%;z-index:3;margin-bottom:4px;}
.vtb-btn{flex:1;font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.12em;padding:.25rem .5rem;border-radius:6px;border:1px solid #1a1a2a;background:#0d0d1c;color:#2a2a5a;cursor:pointer;touch-action:manipulation;transition:all .18s;}
.vtb-btn.active{background:#1a1a3a;border-color:#a0a8ff;color:#a0a8ff;box-shadow:0 0 14px -4px rgba(160,168,255,.55);}
/* Score + trackers sit side by side on desktop once the sequencer is unlocked, so the combos stay visible while you make music */
body.seq-on.desktop-mode #scoreRow{display:flex;align-items:center;justify-content:center;gap:28px;width:100%;}
body.seq-on.desktop-mode #scoreRow .score-section{flex:1 1 0;min-width:0;}
/* DRUMPAD tracker | score | SEQUENCER tracker (symmetrical) */
body.seq-on.desktop-mode #tiersWrap{display:contents;}
body.seq-on.desktop-mode #tiersWrap > div:first-child{order:0;flex:0 0 185px;}
body.seq-on.desktop-mode #scoreRow .score-section{order:1;}
body.seq-on.desktop-mode #autoTiersCol{order:2;flex:0 0 185px;}
body.seq-on.desktop-mode #tiersDivider{display:none !important;}
/* locked headers: the label sits above the scrolling dots */
body.desktop-mode #scoreRow .tiers-col-label{display:block;font-size:.85rem;letter-spacing:.18em;color:#5fae85;margin-bottom:4px;text-align:center;}
body.desktop-mode #scoreRow #autoTiersCol .tiers-col-label{color:#5a9ad8 !important;}
.vtb-btn:not(.active):hover{border-color:#2a2a44;color:#4a4a88;}

.pad-edit-btn{font-family:'Bebas Neue',sans-serif;font-size:.72rem;letter-spacing:.12em;padding:.28rem .65rem;border-radius:6px;border:1px solid #2a2a2a;background:#111;color:#555;cursor:pointer;touch-action:manipulation;transition:all .15s;}
.pad-edit-btn:hover{border-color:#a0a8ff;color:#a0a8ff;}
.pad-edit-btn.active{border-color:#a0a8ff;color:#a0a8ff;background:#0a0a1a;box-shadow:0 0 10px -3px rgba(160,168,255,.5);}
.sb-editpads-btn{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.1em;padding:.22rem .55rem;border-radius:6px;border:1px solid #2a2a2a;background:#111;color:#555;cursor:pointer;touch-action:manipulation;transition:all .15s;white-space:nowrap;}
.sb-editpads-btn:hover{border-color:#a0a8ff;color:#a0a8ff;}
.sb-editpads-btn.active{border-color:#a0a8ff;color:#a0a8ff;background:#0a0a1a;box-shadow:0 0 8px -2px rgba(160,168,255,.5);}
.pad.edit-mode{border-color:#a0a8ff !important;box-shadow:0 0 0 1px #a0a8ff,0 0 12px -2px rgba(160,168,255,.4) !important;}
.pad.edit-mode .pad-edit-hint{display:flex;}
.pad-edit-hint{display:none;position:absolute;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;font-size:1.1rem;background:rgba(10,10,26,.55);border-radius:inherit;pointer-events:none;}

/* ─── COMPACT LAYOUT once the sequencer is unlocked (frees room for sequencer + trackers) ─── */
body.seq-on .app{padding-top:max(.5rem,env(safe-area-inset-top,0px));padding-bottom:.6rem;}
body.seq-on .game-title{font-size:clamp(.95rem,3.4vw,1.15rem);}
body.seq-on .game-title-emoji{font-size:clamp(.9rem,3vw,1.05rem);}
body.seq-on .header .subtitle{display:none;}
body.seq-on .score{font-size:clamp(2.6rem,11vw,3.7rem);}
body.seq-on .score-sub{min-height:0;margin-top:0;font-size:.55rem;line-height:1.1;}
body.seq-on .multiplier{display:none;}
body.seq-on .auto-info{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:.15rem .9rem;margin-top:.1rem;}
body.seq-on .auto-info-row{font-size:.5rem;letter-spacing:.14em;}
body.seq-on .alien-mult-info{font-size:.5rem;margin-top:.1rem;}
body.seq-on .pad-area{padding-bottom:.5rem;}
body.seq-on.desktop-mode .pad-area{max-width:680px;}
body.seq-on.desktop-mode .pad-grid[data-pads]{max-width:410px;margin:0 auto;}
body.seq-on.desktop-mode .pad-grid[data-pads="5"],body.seq-on.desktop-mode .pad-grid[data-pads="6"]{max-width:560px;}
body.seq-on.desktop-mode .pad-grid[data-pads="7"],body.seq-on.desktop-mode .pad-grid[data-pads="8"]{max-width:680px;}
body.seq-on.desktop-mode .pad{aspect-ratio:4/3;} /* same 4:3 rectangle as before the sequencer unlock */

/* ─── DRUM PAD GRID ─── */
.pad-area{width:100%;z-index:3;padding-bottom:4.5rem;}
body.desktop-mode .pad-area{padding-bottom:1rem;max-width:680px;width:100%;margin:0 auto;}
body.desktop-mode .pad{aspect-ratio:4/3;}
/* Pad grid size is the same whether or not the sequencer is unlocked: 4 pads = 410px wide column, 4:3 pads */
body.desktop-mode .pad-grid[data-pads]{max-width:410px;margin:0 auto;}
body.desktop-mode .pad-grid[data-pads="1"]{grid-template-columns:1fr;max-width:160px;margin:0 auto;}
body.desktop-mode .pad-grid[data-pads="2"]{max-width:326px;margin:0 auto;}
/* 5-8 pads: fill the game column (up to a comfortable size) */
body.desktop-mode .pad-grid[data-pads="5"],body.desktop-mode .pad-grid[data-pads="6"]{max-width:560px;margin:0 auto;}
body.desktop-mode .pad-grid[data-pads="7"],body.desktop-mode .pad-grid[data-pads="8"]{max-width:680px;margin:0 auto;}
/* Compact pad layout when arrangement view is active */
.pad-count-selector{display:flex;gap:4px;justify-content:center;margin-bottom:6px;flex-wrap:wrap;}
.pad-count-btn{font-family:'Bebas Neue',sans-serif;font-size:.72rem;letter-spacing:.1em;width:28px;height:28px;border-radius:6px;border:1px solid #2a2a2a;background:#111;color:#555;cursor:pointer;touch-action:manipulation;transition:all .15s;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.pad-count-btn.active{border-color:#a0a8ff;color:#a0a8ff;background:#0a0a1a;}
.pad-count-btn.locked{opacity:.25;cursor:not-allowed;}
.pad-grid{display:grid;gap:6px;width:100%;}
.pad-grid[data-pads="1"]{grid-template-columns:1fr;}
.pad-grid[data-pads="2"]{grid-template-columns:1fr 1fr;}
.pad-grid[data-pads="3"]{grid-template-columns:1fr 1fr 1fr;}
.pad-grid[data-pads="4"]{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;}
.pad-grid[data-pads="5"]{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr;}
.pad-grid[data-pads="6"]{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr;}
.pad-grid[data-pads="7"]{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr;}
.pad-grid[data-pads="8"]{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr;}
.pad{position:relative;overflow:hidden;border-radius:10px;background:#141414;border:1px solid #1e1e1e;cursor:pointer;touch-action:none;transition:transform .08s cubic-bezier(.34,1.56,.64,1),box-shadow .12s,border-color .15s;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;padding:.45rem .55rem;aspect-ratio:1.4/1;}
.pad::before{content:'';position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:radial-gradient(ellipse at 30% 30%,var(--pc) 0%,transparent 65%);opacity:.08;transition:opacity .12s;pointer-events:none;}
.pad.lit::before{opacity:.45;}
.pad.lit{transform:scale(.9);box-shadow:0 0 0 1px var(--pc),0 0 14px -3px var(--pc);}
.pad.lit .pad-rip{animation:prip .36s ease-out forwards;}
.pad-rip{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;pointer-events:none;background:radial-gradient(circle,var(--pc) 0%,transparent 70%);opacity:0;transform:scale(.3);}
@keyframes prip{0%{opacity:.25;transform:scale(.3)}100%{opacity:0;transform:scale(1.1)}}
.pad-dot{position:absolute;top:6px;right:6px;width:4px;height:4px;border-radius:50%;background:var(--pc);opacity:.35;transition:opacity .12s,box-shadow .12s;}
.pad.lit .pad-dot{opacity:1;box-shadow:0 0 5px 1px var(--pc);}
.pad-name{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:'Bebas Neue',sans-serif;font-size:clamp(.65rem,1.8vw,.88rem);letter-spacing:.09em;color:var(--pc);line-height:1;position:relative;z-index:1;}
.pad-key{position:absolute;top:.5rem;left:.6rem;z-index:2;min-width:1.35rem;height:1.35rem;padding:0 .3rem;box-sizing:border-box;display:flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.2);border-radius:5px;font-family:'Bebas Neue',sans-serif;font-size:.78rem;letter-spacing:.04em;color:rgba(255,255,255,.6);background:rgba(0,0,0,.3);line-height:1;pointer-events:none;}
body:not(.desktop-mode) .pad-key{display:none!important;}
.ghost-pad .ghost-key{border-color:color-mix(in srgb,var(--pc) 60%,transparent);color:var(--pc);background:rgba(0,0,0,.35);}
@supports not (color: color-mix(in srgb, red, blue)){.ghost-pad .ghost-key{border-color:rgba(255,204,68,.5);}}
.pad-sub{font-size:.48rem;letter-spacing:.12em;color:#444;text-transform:uppercase;margin-top:.1rem;position:relative;z-index:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.pad-click-hint{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-family:'Bebas Neue',sans-serif;font-size:clamp(.9rem,3vw,1.3rem);letter-spacing:.1em;color:rgba(255,255,255,.85);text-shadow:0 0 12px rgba(255,255,255,.4);pointer-events:none;z-index:2;text-align:center;padding:.3rem;}
.pad.no-sound{border-color:#2a1a1a;}
.pad.ghost-pad{opacity:.4;border:1px dashed #3a3a3a;filter:grayscale(.55);cursor:pointer;background:#0f0f0f;transition:opacity .25s,filter .25s,box-shadow .25s,transform .12s;}
.pad.ghost-pad .ghost-cost{font-family:'Bebas Neue',sans-serif;font-size:clamp(.85rem,2.2vw,1.1rem);letter-spacing:.1em;color:#9a9a9a;margin-top:.25rem;position:relative;z-index:1;white-space:nowrap;}
.pad.ghost-pad.affordable{opacity:.95;filter:none;border:1px dashed var(--pc);box-shadow:0 0 22px -5px var(--pc);animation:ghostPulse 1.5s ease-in-out infinite;}
.pad.ghost-pad.affordable .ghost-cost{color:var(--pc);}
.pad.ghost-pad:active{transform:scale(.95);}
.pad.ghost-pad.ghost-later{opacity:.28;}
/* v0.2.161: no buddy on screen until the bunker/shop cutscene is done; then it pops in */
body.nav-locked #alienLayer,body.buddy-hold #alienLayer{visibility:hidden!important;}
#alienLayer .bouncer.pop-in{animation:buddyPopIn .65s cubic-bezier(.3,1.6,.5,1) both;}
@keyframes buddyPopIn{0%{opacity:0;scale:.1;}60%{opacity:1;}100%{opacity:1;scale:1;}}
.pad.ghost-pad.nope{animation:ghostNope .4s ease-in-out;}
@keyframes ghostNope{0%,100%{transform:translateX(0);}25%{transform:translateX(-6px);}60%{transform:translateX(5px);}}
@keyframes ghostPulse{0%,100%{transform:scale(1);}50%{transform:scale(1.03);}}
.pad.no-sound .pad-name{color:#553333;}
/* pad that's unlocked but has no sound assigned */
.pad.edit-mode{border-color:#a0a8ff!important;cursor:crosshair;}

/* ─── ALIEN PROFILE MODAL ─── */
#alienNameModal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:210;background:rgba(0,0,0,.82);display:none;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);}
#alienNameModal.open{display:flex;}
#alienNameBox{background:#0a1a0f;border:1px solid var(--anc,#00ff88);border-radius:20px;padding:1.5rem 1.6rem 1.3rem;width:min(300px,88vw);display:flex;flex-direction:column;align-items:center;gap:.75rem;box-shadow:0 0 50px rgba(0,255,136,.12);animation:anmIn .22s cubic-bezier(.34,1.2,.64,1);position:relative;}
@keyframes anmIn{from{transform:scale(.88);opacity:0}to{transform:scale(1);opacity:1}}
#alienNameClose{position:absolute;top:.75rem;right:.75rem;font-size:.8rem;padding:.2rem .45rem;border-radius:5px;border:1px solid #1a3a2a;background:transparent;color:#3a6a4a;cursor:pointer;transition:all .12s;line-height:1;}
#alienNameClose:hover{color:#00ff88;border-color:#00ff88;}
#anmNavRow{display:flex;align-items:center;justify-content:space-between;width:100%;gap:.5rem;margin-top:.5rem;padding-top:.75rem;border-top:1px solid #1a3a2a;}
.anm-nav-btn{font-family:'Bebas Neue',sans-serif;font-size:1.8rem;line-height:1;padding:.1rem .6rem;border-radius:8px;border:1px solid #1a3a2a;background:transparent;color:#3a6a4a;cursor:pointer;touch-action:manipulation;transition:all .12s;flex-shrink:0;}
.anm-nav-btn:hover{color:var(--anc,#00ff88);border-color:var(--anc,#00ff88);}
.anm-nav-btn:disabled{opacity:.2;cursor:default;}
#anmCounter{font-family:'Bebas Neue',sans-serif;font-size:.75rem;letter-spacing:.2em;color:#3a6a4a;flex:1;text-align:center;}
#alienNamePreview{font-size:3.8rem;filter:drop-shadow(0 0 14px var(--anc,#00ff88));line-height:1;margin:.2rem 0;}
#anmName{font-family:'Bebas Neue',sans-serif;font-size:1.3rem;letter-spacing:.1em;color:var(--anc,#00ff88);min-height:1.4rem;text-align:center;}
#anmEditSection{width:100%;display:flex;flex-direction:column;gap:.5rem;}
#bdyTagField{font-family:'Bebas Neue',sans-serif;font-size:16px;background:#061208;border:1px solid #1a3a2a;border-radius:8px;padding:.5rem .7rem;color:#00ff88;outline:none;width:100%;text-align:center;letter-spacing:.05em;box-sizing:border-box;}
#bdyTagField{-webkit-appearance:none;appearance:none;}
#bdyTagField::-webkit-search-cancel-button,#bdyTagField::-webkit-search-decoration{-webkit-appearance:none;display:none;}
#bdyTagField:focus{border-color:var(--anc,#00ff88);}
#bdyTagField::placeholder{color:#1a4a2a;}
#alienNameBtns{display:flex;gap:.5rem;}
#alienNameSave{flex:1;font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.1em;padding:.38rem;border-radius:8px;border:1px solid var(--anc,#00ff88);background:#0a2015;color:var(--anc,#00ff88);cursor:pointer;touch-action:manipulation;transition:all .15s;}
#alienNameSave:hover{background:#0a3020;}
#alienNameClear{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.1em;padding:.38rem .65rem;border-radius:8px;border:1px solid #1a3a2a;background:transparent;color:#3a6a4a;cursor:pointer;touch-action:manipulation;transition:all .15s;}
#alienNameClear:hover{color:#ff4444;border-color:#ff4444;}
#anmEditBtn{font-family:'Bebas Neue',sans-serif;font-size:.75rem;letter-spacing:.12em;padding:.28rem .7rem;border-radius:6px;border:1px solid #1a3a2a;background:transparent;color:#3a6a4a;cursor:pointer;touch-action:manipulation;transition:all .12s;align-self:center;}
#anmEditBtn:hover{color:var(--anc,#00ff88);border-color:var(--anc,#00ff88);}

/* ─── SCORE STATS MODAL ─── */
#scoreStatsModal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:195;background:rgba(0,0,0,.82);display:none;align-items:flex-end;justify-content:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);}
#scoreStatsModal.open{display:flex;}
#scoreStatsBox{background:#0a0a1a;border:1px solid #1a1a2a;border-radius:20px 20px 0 0;width:100%;max-width:500px;max-height:88vh;max-height:88dvh;display:flex;flex-direction:column;animation:slideUp .22s cubic-bezier(.34,1.1,.64,1);}
#scoreStatsHeader{display:flex;align-items:center;justify-content:space-between;padding:1.1rem 1.3rem .8rem;flex-shrink:0;border-bottom:1px solid #1a1a2a;}
#scoreStatsTitle{font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.18em;color:#a0a8ff;}
#scoreStatsClose{font-size:1.1rem;min-width:44px;min-height:44px;border-radius:10px;border:1px solid #3a3a5a;background:#12122a;color:#a0a8ff;cursor:pointer;transition:all .12s;touch-action:manipulation;}
#scoreStatsDone{flex-shrink:0;margin:.4rem 1.1rem max(.9rem,env(safe-area-inset-bottom,0px));font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.18em;padding:.75rem;border-radius:12px;border:1px solid #a0a8ff;background:#0d0d22;color:#a0a8ff;cursor:pointer;touch-action:manipulation;}
#scoreStatsClose:hover{color:#a0a8ff;border-color:#a0a8ff;}
#scoreStatsList{flex:1;overflow-y:auto;padding:.8rem 1.1rem 2rem;display:flex;flex-direction:column;gap:.55rem;touch-action:pan-y;-webkit-overflow-scrolling:touch;}
#scoreStatsList::-webkit-scrollbar{display:none;}
.ss-section-label{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.2em;color:#333;margin-top:.4rem;}
.ss-row{display:flex;align-items:center;gap:.75rem;padding:.6rem .8rem;background:#0d0d1d;border:1px solid #1a1a2a;border-radius:10px;}
.ss-row.active{border-color:#2a2a4a;background:#0f0f22;}
.ss-icon{font-size:1.3rem;flex-shrink:0;width:2rem;text-align:center;}
.ss-info{flex:1;min-width:0;}
.ss-label{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.1em;color:#555;}
.ss-label.active{color:#a0a8ff;}
.ss-desc{font-size:.65rem;color:#333;letter-spacing:.08em;margin-top:1px;}
.ss-desc.active{color:#555;}
.ss-val{font-family:'Bebas Neue',sans-serif;font-size:1.3rem;letter-spacing:.04em;color:#2a2a4a;text-align:right;flex-shrink:0;}
.ss-val.active{color:#e0e8ff;}
.ss-val.gold{color:#ffcc44;}
.ss-val.green{color:#00ff88;}
.ss-total-row{display:flex;align-items:center;justify-content:space-between;padding:.8rem 1rem;background:#0a0a20;border:1px solid #2a2a5a;border-radius:12px;margin-top:.3rem;}
.ss-total-label{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.15em;color:#5555aa;}
.ss-total-val{font-family:'Bebas Neue',sans-serif;font-size:1.8rem;letter-spacing:.04em;color:#a0a8ff;}

/* ─── PAD ASSIGN MODAL ─── */
#padAssignModal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:190;background:rgba(0,0,0,.75);display:none;align-items:flex-end;justify-content:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);}
#padAssignModal.open{display:flex;}
#padAssignInner{background:#0d0d1c;border:1px solid #1a1a2a;border-radius:18px 18px 0 0;width:100%;max-width:500px;max-height:75vh;display:flex;flex-direction:column;padding:1.1rem 1.2rem 2rem;gap:.65rem;animation:slideUp .22s cubic-bezier(.34,1.1,.64,1);touch-action:pan-y;}
@keyframes slideUp{from{transform:translateY(40px);opacity:0}to{transform:translateY(0);opacity:1}}
#padAssignHeader{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;}
#padAssignTitle{font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.15em;color:#a0a8ff;}
#padAssignClose{font-size:.9rem;padding:.25rem .55rem;border-radius:6px;border:1px solid #1a1a2a;background:#111;color:#555;cursor:pointer;touch-action:manipulation;transition:all .12s;}
#padAssignClose:hover{color:#a0a8ff;border-color:#a0a8ff;}
#padAssignFilters{display:flex;gap:5px;flex-wrap:wrap;flex-shrink:0;}
#padAssignList{flex:1;min-height:0;overflow-y:scroll;display:flex;flex-direction:column;gap:3px;touch-action:pan-y;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
#padAssignList::-webkit-scrollbar{width:3px;}
#padAssignList::-webkit-scrollbar-track{background:transparent;}
#padAssignList::-webkit-scrollbar-thumb{background:#2a2a4a;border-radius:2px;}
.pa-filter-chip{font-family:'Bebas Neue',sans-serif;font-size:.58rem;letter-spacing:.08em;padding:.12rem .42rem;border-radius:4px;border:1px solid #1a1a2a;background:#111;color:#444;cursor:pointer;touch-action:manipulation;transition:all .1s;}
.pa-filter-chip.on{border-color:#a0a8ff;color:#a0a8ff;background:#0a0a1a;}
.pa-item{display:flex;align-items:center;gap:10px;padding:.55rem .65rem;border-radius:9px;border:1px solid transparent;cursor:pointer;touch-action:manipulation;transition:background .07s,border-color .07s;}
.pa-item:hover{background:#111;}
.pa-item.active{background:#0d0d22;border-color:#a0a8ff;}
.pa-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;}
.pa-info{flex:1;min-width:0;}
.pa-name{font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.08em;line-height:1;}
.pa-desc{font-size:.52rem;letter-spacing:.12em;text-transform:uppercase;color:#444;margin-top:2px;}
.pa-vol-wrap{display:flex;align-items:center;gap:6px;flex-shrink:0;}
.pa-vol-slider{-webkit-appearance:none;appearance:none;width:60px;height:3px;background:#222;border-radius:2px;outline:none;cursor:pointer;}
.pa-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:11px;height:11px;border-radius:50%;background:#a0a8ff;cursor:pointer;}
.pa-preview{font-size:.65rem;padding:.18rem .38rem;border-radius:4px;border:1px solid #1a1a2a;color:#444;background:#111;cursor:pointer;touch-action:manipulation;transition:all .1s;flex-shrink:0;}
.pa-vol-num{font-family:'Bebas Neue',sans-serif;font-size:16px;width:38px;background:#111;border:1px solid #1a1a2a;border-radius:4px;color:#888;text-align:center;padding:2px 2px;outline:none;-moz-appearance:textfield;}
.pa-vol-num:focus{border-color:#a0a8ff;color:#a0a8ff;}
.pa-vol-num::-webkit-outer-spin-button,.pa-vol-num::-webkit-inner-spin-button{-webkit-appearance:none;}
.pa-preview:hover{color:#aaa;}

/* notification toast */
.edit-mode-badge{display:none;}
.edit-mode-badge.show{opacity:1;}
.toast{position:fixed;top:5.2rem;left:50%;transform:translateX(-50%);background:#1a1a2a;border:1px solid #a0a8ff;border-radius:10px;padding:.8rem 1.25rem;color:#a0a8ff;font-family:'Bebas Neue',sans-serif;font-size:clamp(1rem,.9rem + .35vw,1.18rem);line-height:1.25;letter-spacing:.1em;z-index:200;opacity:0;pointer-events:none;transition:opacity .3s;text-align:center;max-width:min(360px,88vw);}
.toast.show{opacity:1;pointer-events:none;}

/* ─── PAGE HEADER ─── */
.page-header{display:flex;align-items:center;padding:1.7rem 1.4rem .85rem;padding-top:max(1.7rem,env(safe-area-inset-top,0px));gap:1rem;flex-shrink:0;}
.back-btn{background:#1a1a1a;border:1px solid #333;color:#e8ff00;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;padding:.4rem .8rem;border-radius:6px;cursor:pointer;flex-shrink:0;touch-action:manipulation;transition:background .2s;}
.back-btn:active{background:#252500;}
.page-title-wrap{flex:1;}
.page-title{font-family:'Bebas Neue',sans-serif;font-size:1.8rem;letter-spacing:.1em;color:#e8ff00;line-height:1;}
.page-sub{font-family:'Bebas Neue',sans-serif;font-size:.62rem;color:#666;letter-spacing:.2em;text-transform:uppercase;margin-top:.25rem;}
.page-sub span{color:#e8ff00;}

/* ─── STORE ─── */
.store-scroll{flex:1;overflow-y:auto;overflow-x:hidden;padding:0 1.1rem 2rem;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#2a2a4a #0d0d1c;}
.store-scroll::-webkit-scrollbar{width:5px;}
.store-scroll::-webkit-scrollbar-track{background:#0d0d1c;border-radius:3px;}
.store-scroll::-webkit-scrollbar-thumb{background:#2a2a5a;border-radius:3px;}
.store-scroll::-webkit-scrollbar-thumb:hover{background:#4444aa;}
.store-section-label{font-family:'Bebas Neue',sans-serif;font-size:.75rem;letter-spacing:.22em;color:#333;text-transform:uppercase;padding:.5rem 0 .3rem;border-top:1px solid #1a1a1a;margin-top:.7rem;}
.store-section-label:first-child{border-top:none;margin-top:0;}
.tracks-row{display:flex;gap:.7rem;margin-top:.6rem;}
.upgrade-card{flex:1;background:#141414;border:1px solid #222;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;}
.upgrade-card-header{padding:.7rem .85rem .5rem;border-bottom:1px solid #1c1c1c;}
.upgrade-card-title{font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.1em;color:#e8ff00;line-height:1;}
.upgrade-card-sub{font-size:.58rem;color:#888;letter-spacing:.12em;text-transform:uppercase;margin-top:.15rem;}
.upgrade-buy-btn{margin:.55rem .8rem .8rem;background:#0f0f0f;border:1px solid #2a2a2a;border-radius:8px;padding:.6rem .7rem;cursor:pointer;touch-action:manipulation;transition:border-color .2s,background .2s;display:flex;align-items:center;gap:.45rem;}
.upgrade-buy-btn.buyable{border-color:#e8ff00;}
.upgrade-buy-btn.buyable:active{background:#1a1a00;}
.upgrade-buy-btn.locked{cursor:not-allowed;opacity:.5;}
.upgrade-buy-btn.maxed{cursor:default;opacity:.4;border-color:#333;}
.upgrade-counter{width:2.2rem;height:2.2rem;border-radius:7px;background:#1a1a1a;border:1px solid #2a2a2a;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;}
.upgrade-counter-num{font-family:'Bebas Neue',sans-serif;font-size:1rem;color:#e8ff00;line-height:1;}
.upgrade-counter-lbl{font-size:.55rem;color:#888;letter-spacing:.08em;text-transform:uppercase;margin-top:1px;}
.upgrade-effect{flex:1;min-width:0;}
.upgrade-effect-main{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.07em;line-height:1.1;color:#fff;}
.upgrade-effect-sub{display:none;}
.upgrade-price{font-family:'Bebas Neue',sans-serif;font-size:.78rem;color:#e8ff00;text-align:right;flex-shrink:0;line-height:1.2;}
.upgrade-price small{display:block;font-size:.58rem;color:#999;letter-spacing:.05em;font-family:'Bebas Neue',sans-serif;}
.upgrade-price.cant-afford{color:#ff4444;}
.upgrade-price.cant-afford small{color:#663333;}
/* drum pad upgrade card — single wide */
.drum-upgrade-row{display:flex;flex-direction:column;gap:.5rem;margin-top:.6rem;}
.drum-card{background:#141414;border:1px solid #1a1a2a;border-radius:12px;overflow:hidden;}
.drum-card-header{padding:.65rem .85rem .45rem;border-bottom:1px solid #1a1a2a;}
.drum-card-title{font-family:'Bebas Neue',sans-serif;font-size:.92rem;letter-spacing:.1em;color:#a0a8ff;line-height:1;}
.drum-card-sub{font-size:.58rem;color:#7a7aaa;letter-spacing:.12em;text-transform:uppercase;margin-top:.12rem;}
.drum-buy-btn{margin:.5rem .8rem .75rem;background:#0f0f12;border:1px solid #1a1a2a;border-radius:8px;padding:.55rem .65rem;cursor:pointer;touch-action:manipulation;transition:border-color .2s,background .2s;display:flex;align-items:center;gap:.42rem;}
.drum-buy-btn.buyable{border-color:#a0a8ff;}
.drum-buy-btn.buyable:active{background:#0a0a1a;}
.drum-buy-btn.locked{cursor:not-allowed;opacity:.5;}
.drum-buy-btn.maxed{cursor:default;opacity:.35;border-color:#1a1a2a;}
.drum-counter{width:2.2rem;height:2.2rem;border-radius:7px;background:#0f0f1a;border:1px solid #1a1a2a;display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;}
.drum-counter-num{font-family:'Bebas Neue',sans-serif;font-size:1rem;color:#a0a8ff;line-height:1;}
.drum-counter-lbl{font-size:.55rem;color:#7a7aaa;letter-spacing:.08em;text-transform:uppercase;margin-top:1px;}
.drum-price{font-family:'Bebas Neue',sans-serif;font-size:.78rem;color:#a0a8ff;text-align:right;flex-shrink:0;line-height:1.2;}
.drum-price small{display:block;font-size:.58rem;color:#7a7aaa;letter-spacing:.05em;font-family:'Bebas Neue',sans-serif;}
.drum-price.cant-afford{color:#ff4444;}
.drum-price.cant-afford small{color:#663333;}

/* alien store */
.alien-store-card{margin-top:.8rem;background:#0a1a0f;border:1px solid #1a3a2a;border-radius:12px;padding:.8rem .95rem;display:flex;align-items:center;gap:.75rem;cursor:pointer;touch-action:manipulation;transition:border-color .2s,background .2s;}
.alien-store-card.buyable{border-color:#00ff88;}
.alien-store-card.buyable:active{background:#0a2015;}
.alien-store-card.locked{cursor:not-allowed;opacity:.5;}
.alien-card-icon{font-size:1.9rem;flex-shrink:0;}
.alien-card-info{flex:1;}
.alien-card-name{font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;color:#00ff88;line-height:1;}
.alien-card-stats{font-size:.52rem;color:#3a6a4a;letter-spacing:.12em;text-transform:uppercase;margin-top:.25rem;line-height:1.7;}
.alien-card-stats span{color:#00ff88;}
.alien-card-price{font-family:'Bebas Neue',sans-serif;font-size:.9rem;color:#00ff88;text-align:right;flex-shrink:0;line-height:1.2;}
.alien-card-price small{display:block;font-size:.52rem;color:#3a6a4a;letter-spacing:.05em;font-family:'Bebas Neue',sans-serif;}
.alien-card-price.cant-afford{color:#ff4444;}
.alien-card-price.cant-afford small{color:#663333;}

/* lock overlay */
.card-lock-overlay{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:12px;background:rgba(10,10,10,.93);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem;z-index:5;border:1px solid #1a1a1a;transition:opacity .3s;}
.card-lock-overlay.unlocked{opacity:0;pointer-events:none;}
.lock-icon{font-size:1.4rem;}
.lock-label{font-size:.5rem;color:#444;letter-spacing:.25em;text-transform:uppercase;}
.lock-cost{font-family:'Bebas Neue',sans-serif;font-size:.75rem;color:#666;letter-spacing:.08em;}
.lock-cost.affordable{color:#e8ff00;}
.lock-btn{margin-top:.35rem;font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.1em;padding:.3rem .8rem;border-radius:8px;border:1px solid #333;background:#1a1a1a;color:#555;cursor:pointer;touch-action:manipulation;transition:border-color .2s,color .2s,background .2s;}
.lock-btn.affordable{border-color:#e8ff00;color:#e8ff00;background:#1a1a00;}
.lock-btn.affordable:active{background:#252500;}

/* ─── BUNKER ─── */
.bunker-body{flex:1;display:flex;flex-direction:column;padding:0 1.1rem 5.5rem;overflow:hidden;}
.bunker-toggles{display:flex;gap:.5rem;flex-shrink:0;margin-bottom:.4rem;}
.bunker-toggle-btn{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.1em;padding:.22rem .6rem;border-radius:6px;border:1px solid #1a3a2a;background:#0a1a0f;color:#3a6a4a;cursor:pointer;touch-action:manipulation;transition:all .15s;}
.bunker-toggle-btn.active{border-color:#00ff88;color:#00ff88;background:#0a2015;}
.bunker-toggle-btn:not(.active):hover{border-color:#1a5a2a;color:#1a7a3a;}
.bunker-stats{display:flex;gap:.7rem;margin-bottom:.65rem;flex-shrink:0;}
.bunker-stat{flex:1;background:#141414;border:1px solid #1a3a2a;border-radius:8px;padding:.45rem .55rem;text-align:center;}
.bunker-stat-val{font-family:'Bebas Neue',sans-serif;font-size:1.3rem;color:#00ff88;line-height:1;}
.bunker-stat-label{font-size:.5rem;color:#3a6a4a;letter-spacing:.2em;text-transform:uppercase;margin-top:.1rem;}
body.desktop-mode .bunker-stat-val{font-size:1.6rem!important;}
body.desktop-mode .bunker-stat-label{font-size:.55rem!important;display:block!important;}
.bunker-number-label{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.15em;color:#1a4a2a;text-align:center;margin-bottom:.3rem;flex-shrink:0;}
.bunker-grid-wrap{scrollbar-width:none;-ms-overflow-style:none;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;position:relative;padding:0 .2rem;}
.bunker-grid{display:grid;grid-template-columns:repeat(9,1fr);gap:3px;width:100%;}
.bunker-grid-wrap::-webkit-scrollbar{display:none;width:0;height:0;}
.alien-cell{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0f1a13;border:1px solid #1a2a1f;border-radius:4px;font-size:0;transition:background .2s,border-color .2s;position:relative;overflow:hidden;cursor:default;gap:1px;}
.alien-cell.occupied{background:#0a1a0f;font-size:clamp(.65rem,1.6vw,.95rem);animation:alienIn .4s cubic-bezier(.34,1.56,.64,1) forwards;cursor:pointer;}
.alien-cell-name{font-size:clamp(6px,1.8vw,13px);letter-spacing:.02em;opacity:.85;text-align:center;width:100%;overflow:hidden;white-space:nowrap;padding:0 2px;line-height:1.1;font-weight:600;}
.alien-cell-name.hidden{display:none;}
@keyframes alienIn{0%{transform:scale(0) rotate(-20deg);opacity:0}100%{transform:scale(1) rotate(0);opacity:1}}
.alien-cell.onscreen{outline:2px solid #44eebb;outline-offset:-2px;}
body.pick-mode .alien-cell.occupied:not(.onscreen){opacity:.45;}
.alien-cell.occupied::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(transparent 50%,rgba(0,255,68,.04) 50%);background-size:100% 4px;pointer-events:none;animation:scanlines 2s linear infinite;}
@keyframes scanlines{0%{background-position:0 0}100%{background-position:0 8px}}
.bunker-progress-wrap{margin-top:.55rem;flex-shrink:0;}
.bunker-progress-label{display:flex;justify-content:space-between;font-size:.5rem;color:#3a6a4a;letter-spacing:.2em;text-transform:uppercase;margin-bottom:4px;}
.bunker-progress-bar-bg{height:5px;background:#111;border-radius:3px;overflow:hidden;}
.bunker-progress-bar{height:100%;background:#00ff88;border-radius:3px;transition:width .3s ease;}
/* Incubator egg cells */

/* ── Alien Gems ── */
.gem-counter{display:flex;align-items:center;gap:.35rem;font-family:'Bebas Neue',sans-serif;font-size:.75rem;letter-spacing:.12em;color:#44eebb;}
.gem-icon{font-size:.9rem;}
/* ── Skill Tree Unlock Button ── */
#skillTreeUnlockBtn{width:100%;font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.15em;padding:.6rem .8rem;border-radius:12px;border:2px solid #1a2a4a;background:#080d1a;color:#2a4a8a;cursor:pointer;touch-action:manipulation;transition:all .2s;margin-bottom:.4rem;display:flex;align-items:center;justify-content:space-between;gap:.5rem;}
#skillTreeUnlockBtn.unlocked{border-color:#44aaff;color:#44aaff;background:#050d20;box-shadow:0 0 16px -4px rgba(68,170,255,.35);}
#skillTreeUnlockBtn.can-afford{border-color:#6688cc;color:#6688cc;}
#skillTreeUnlockCost{font-size:.6rem;color:#2a3a5a;letter-spacing:.08em;}
#skillTreeUnlockBtn.unlocked #skillTreeUnlockCost{color:#2255aa;}
#skillTreeUnlockBtn.can-afford #skillTreeUnlockCost{color:#5577bb;}
/* ── Skill Tree Modal ── */
#skillTreeModal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:310;background:#030510;display:none;flex-direction:column;overflow:hidden;}
#skillTreeModal.open{display:flex;}
#skillTreeHeader{display:flex;align-items:center;justify-content:space-between;padding:.8rem 1.2rem;border-bottom:1px solid #0a0a2a;flex-shrink:0;background:#040612;}
#skillTreeTitle{font-family:'Bebas Neue',sans-serif;font-size:1.2rem;letter-spacing:.15em;color:#44aaff;}
#skillTreeGemDisplay{display:flex;align-items:center;gap:.45rem;font-family:'Bebas Neue',sans-serif;font-size:1.4rem;color:#44eebb;}
#skillTreeCloseBtn{font-family:'Bebas Neue',sans-serif;font-size:.75rem;letter-spacing:.12em;padding:.35rem .9rem;border-radius:8px;border:1px solid #1a1a3a;background:#080814;color:#555;cursor:pointer;touch-action:manipulation;}
#skillTreeCanvas{flex:1;overflow:hidden;position:relative;cursor:grab;user-select:none;-webkit-user-select:none;touch-action:none;}
#skillTreeCanvas.dragging{cursor:grabbing;}
#skillTreeInner{position:absolute;will-change:transform;}
.st-node{position:absolute;display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer;touch-action:manipulation;}
.st-node-circle{width:54px;height:54px;border-radius:50%;border:2px solid #1a1a3a;background:#07090f;display:flex;align-items:center;justify-content:center;font-size:1.35rem;transition:all .2s;position:relative;}
.st-node.center .st-node-circle{width:72px;height:72px;font-size:1.9rem;border-color:#44aaff;box-shadow:0 0 22px -4px rgba(68,170,255,.5);}
.st-node.unlocked .st-node-circle{border-color:#44eebb;background:#040f0a;box-shadow:0 0 12px -3px rgba(68,238,187,.4);}
.st-node.available .st-node-circle{border-color:#2255aa;animation:stPulse 2s ease-in-out infinite;}
.st-node.locked .st-node-circle{border-color:#111;opacity:.5;}
.st-node.placeholder .st-node-circle{border-color:#1a1a22;border-style:dashed;opacity:.35;}
/* Node float animations — each branch offset so they don't all move in sync */
@keyframes stFloat0{0%,100%{transform:translate(0px,0px);}25%{transform:translate(3px,-4px);}50%{transform:translate(-2px,5px);}75%{transform:translate(-4px,-2px);}}
@keyframes stFloat1{0%,100%{transform:translate(0px,0px);}25%{transform:translate(-4px,3px);}50%{transform:translate(5px,-2px);}75%{transform:translate(2px,4px);}}
@keyframes stFloat2{0%,100%{transform:translate(0px,0px);}25%{transform:translate(4px,4px);}50%{transform:translate(-3px,-5px);}75%{transform:translate(3px,-3px);}}
@keyframes stFloat3{0%,100%{transform:translate(0px,0px);}25%{transform:translate(-5px,-3px);}50%{transform:translate(2px,4px);}75%{transform:translate(4px,2px);}}
@keyframes stFloat4{0%,100%{transform:translate(0px,0px);}25%{transform:translate(3px,5px);}50%{transform:translate(-4px,2px);}75%{transform:translate(-3px,-4px);}}
.st-node{animation:stFloat0 6s ease-in-out infinite;}
.st-node:nth-child(3n){animation-name:stFloat1;animation-duration:7s;}
.st-node:nth-child(3n+1){animation-name:stFloat2;animation-duration:5.5s;}
.st-node:nth-child(4n){animation-name:stFloat3;animation-duration:8s;}
.st-node:nth-child(5n){animation-name:stFloat4;animation-duration:6.5s;}
.st-node.center{animation:stFloat4 9s ease-in-out infinite;}

/* Silhouette nodes — one step beyond available */
.st-node.silhouette .st-node-circle{background:#0a0a0f;border-color:#111;filter:brightness(0.15);}
.st-node.silhouette .st-node-label{color:#111;font-size:.7rem;letter-spacing:.06em;}
.st-node.silhouette .st-node-cost{display:none;}
.st-node.silhouette:active{transform:none!important;}
@keyframes stPulse{0%,100%{box-shadow:0 0 8px -3px rgba(34,85,170,.4);}50%{box-shadow:0 0 18px -2px rgba(34,85,170,.7);}}
.st-node-label{font-family:'Bebas Neue',sans-serif;font-size:.88rem;letter-spacing:.08em;color:#5b6d8f;text-align:center;max-width:120px;line-height:1.2;text-transform:uppercase;margin-top:3px;}
.st-node.unlocked .st-node-label{color:#3a8a6a;}
.st-node.available .st-node-label{color:#4466aa;}
.st-node.center .st-node-label{color:#4a8add;font-size:1rem;}
.st-node-cost{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.04em;color:#3f7a62;display:flex;align-items:center;gap:4px;margin-top:2px;}
.st-node.available .st-node-cost{color:#44eebb;text-shadow:0 0 8px rgba(68,238,187,.35);}
.st-node.unlocked .st-node-cost{display:none;}
.st-node-check{position:absolute;top:-3px;right:-3px;width:16px;height:16px;border-radius:50%;background:#44eebb;display:none;align-items:center;justify-content:center;font-size:.5rem;color:#020a06;font-weight:700;}
.st-node.unlocked .st-node-check{display:flex;}
.st-line{position:absolute;height:2px;background:#0d1020;transform-origin:0 50%;pointer-events:none;border-radius:1px;}
.st-line.active{background:#1a3a2a;}
.st-branch-label{position:absolute;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.18em;text-transform:uppercase;pointer-events:none;text-align:center;}
#stDetailPop{position:fixed;z-index:330;display:none;flex-direction:column;gap:.5rem;background:#07090f;border:1px solid #1a2a4a;border-radius:12px;padding:1.1rem 1.3rem;box-shadow:0 4px 28px rgba(0,0,0,.85);min-width:300px;max-width:340px;}
#stDetailPop.open{display:flex;}
#stDetailIcon{font-size:2rem;text-align:center;}
#stDetailName{font-family:'Bebas Neue',sans-serif;font-size:1.35rem;letter-spacing:.1em;color:#e2e6ee;text-align:center;}
#stDetailDesc{font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.06em;color:#9aa4b8;line-height:1.45;text-align:center;}
#stDetailCost{font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.06em;color:#44eebb;text-align:center;}
#stDetailBuyBtn{font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.12em;padding:.6rem;border-radius:8px;border:1px solid #1a3a2a;background:#040f07;color:#44eebb;cursor:pointer;touch-action:manipulation;transition:all .15s;text-align:center;}
#stDetailBuyBtn:disabled{opacity:.4;cursor:default;}
#stDetailBuyBtn.owned{border-color:#1a2a1a;color:#2a5a3a;cursor:default;}
#stDetailClose{font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.1em;padding:.4rem;border-radius:6px;border:1px solid #1a1a2a;background:transparent;color:#667;cursor:pointer;touch-action:manipulation;text-align:center;}

.egg-cell{background:#1a1400;border:1px solid #2a2200;border-radius:5px;aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:1.1rem;transition:all .2s;position:relative;}
.egg-cell.has-egg{background:#1a1400;border-color:#aa8844;box-shadow:0 0 8px -2px rgba(232,204,68,.3);animation:eggGlow 3s ease-in-out infinite;}
@keyframes eggGlow{0%,100%{box-shadow:0 0 8px -2px rgba(232,204,68,.3);}50%{box-shadow:0 0 16px -2px rgba(232,204,68,.6);}}

.bunker-full-banner{display:none;text-align:center;padding:.45rem 1rem;background:#0a2015;border:1px solid #00ff88;border-radius:8px;margin-bottom:.5rem;flex-shrink:0;}
.bunker-full-banner.show{display:block;}
.bunker-full-title{font-family:'Bebas Neue',sans-serif;font-size:1rem;color:#00ff88;letter-spacing:.1em;}
.bunker-full-sub{font-size:.52rem;color:#3a6a4a;letter-spacing:.2em;text-transform:uppercase;margin-top:.12rem;}

/* Misc */
.particle{position:fixed;font-family:'Bebas Neue',sans-serif;font-size:1.1rem;pointer-events:none;z-index:200;animation:floatUp .8s ease-out forwards;will-change:transform,opacity;}
@keyframes floatUp{0%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-80px) scale(.4)}}
.unlock-flash{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:150;animation:flashFull .55s ease-out forwards;}
@keyframes flashFull{0%{opacity:.35}100%{opacity:0}}
.grid-bg{position:fixed;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(rgba(255,255,255,.015) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.015) 1px,transparent 1px);background-size:40px 40px;pointer-events:none;z-index:0;}
#partyOverlay{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:2;opacity:0;}
#partyOverlay.active{opacity:1;}
#partyBtn{position:fixed;bottom:1.4rem;right:1.4rem;z-index:50;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;padding:.55rem .9rem;border-radius:50px;border:2px solid #ff00cc;background:#1a001a;color:#ff00cc;cursor:pointer;touch-action:manipulation;display:none;animation:partyBtnPulse 2s ease-in-out infinite;}
#partyBtn.visible{display:block;}
#partyBtn.active{background:#330033;border-color:#ff66ff;color:#ff66ff;}
@keyframes partyBtnPulse{0%,100%{box-shadow:0 0 10px rgba(255,0,204,.4);}50%{box-shadow:0 0 25px rgba(255,0,204,.9),0 0 50px rgba(255,0,204,.3);}}

/* mini sound picker for sequencer */
.mini-picker{position:fixed;z-index:210;background:#0d0d1c;border:1px solid #1a1a2a;border-radius:10px;padding:.45rem .45rem .38rem;width:200px;max-height:240px;overflow-y:auto;box-shadow:0 8px 40px rgba(0,0,0,.85);opacity:0;pointer-events:none;transform:scale(.93) translateY(-4px);transition:opacity .12s,transform .12s;}
.mini-picker.open{opacity:1;pointer-events:all;transform:none;}
.mp-filters{display:flex;gap:3px;flex-wrap:wrap;margin-bottom:.35rem;}
.mp-chip{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.07em;padding:.08rem .32rem;border-radius:3px;border:1px solid #1a1a2a;background:#111;color:#444;cursor:pointer;touch-action:manipulation;transition:all .1s;}
.mp-chip.on{border-color:#a0a8ff;color:#a0a8ff;}
.mp-list{display:flex;flex-direction:column;gap:1px;}
.mp-item{display:flex;align-items:center;gap:5px;padding:.22rem .32rem;border-radius:4px;cursor:pointer;touch-action:manipulation;transition:background .07s;}
.mp-item:hover{background:#141414;}
.mp-item.active{background:rgba(160,168,255,.07);}
.mp-dot{width:5px;height:5px;border-radius:50%;flex-shrink:0;}
.mp-name{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.07em;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.mp-hear{font-size:.52rem;padding:.06rem .24rem;border-radius:3px;border:1px solid #1a1a2a;color:#444;background:#111;cursor:pointer;touch-action:manipulation;white-space:nowrap;flex-shrink:0;transition:all .1s;}
.mp-hear:hover{color:#aaa;}
@keyframes arrowBounce{from{transform:translateY(0);}to{transform:translateY(6px);}}
@keyframes editPulse{0%,100%{opacity:.6;transform:scale(1);}50%{opacity:1;transform:scale(1.04);}}

/* ─── SETTINGS PANEL ─── */
#settingsPanel{position:fixed;top:0;right:0;bottom:0;left:0;z-index:310;background:rgba(0,0,0,.88);display:none;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);}
#settingsPanel.open{display:flex;}
#settingsBox{background:#0f1116;border:1px solid #23262e;border-radius:20px;padding:1.05rem 1.2rem 1.05rem;width:100%;max-width:358px;display:flex;flex-direction:column;gap:.15rem;box-shadow:0 24px 60px rgba(0,0,0,.55);}
.settings-title{font-family:'Bebas Neue',sans-serif;font-size:1.12rem;letter-spacing:.26em;color:#d6dbe4;text-align:center;margin-bottom:.1rem;}
.alien-step-btn{width:30px;height:30px;border-radius:6px;border:1px solid #666;background:#1c1c1c;color:#fff;font-size:1.2rem;line-height:1;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;touch-action:manipulation;}
.alien-step-btn:hover{border-color:#fff;background:#2a2a2a;}
/* v0.2.259: sections, so the list reads in groups instead of one long column */
.settings-sec{display:flex;align-items:center;gap:.55rem;margin:.75rem 0 .05rem;font-family:'Bebas Neue',sans-serif;font-size:.6rem;letter-spacing:.26em;color:#5a6270;}
.settings-sec::after{content:'';flex:1;height:1px;background:linear-gradient(90deg,rgba(255,255,255,.12),rgba(255,255,255,0));}
.settings-row{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.42rem 0;min-height:38px;}
.settings-label{font-family:'Bebas Neue',sans-serif;font-size:.82rem;letter-spacing:.09em;color:#c3cad6;}
.settings-sub{font-family:'Space Mono',monospace;font-size:.54rem;letter-spacing:.02em;color:#5c6472;margin-top:2px;}
.settings-value{font-family:'Bebas Neue',sans-serif;font-size:.7rem;letter-spacing:.06em;color:#3ddc9a;margin-top:1px;}
.settings-ctl{display:flex;align-items:center;gap:.45rem;flex-shrink:0;}
.settings-ctl .sb-slider{width:96px;flex:0 0 auto;}
.settings-select{font-family:'Bebas Neue',sans-serif;font-size:15px;letter-spacing:.08em;background:#12141a;border:1px solid #2a2e38;border-radius:8px;color:#aeb6c6;padding:.3rem .45rem;cursor:pointer;}
.settings-chips{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin-top:.2rem;}
.settings-chip{font-family:'Bebas Neue',sans-serif;font-size:.68rem;letter-spacing:.08em;padding:.45rem .25rem;border-radius:9px;border:1px solid #23262e;background:#12141a;color:#8b93a3;cursor:pointer;touch-action:manipulation;transition:color .15s,border-color .15s;}
.settings-chip:active{color:#e2e7ef;border-color:#3d4350;}
.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:.45rem;margin-top:.8rem;}
.settings-actions .settings-close-btn{margin:0;}
.settings-foot{margin-top:.55rem;text-align:center;font-family:'Bebas Neue',sans-serif;font-size:.58rem;letter-spacing:.2em;color:#3f4550;}
.settings-foot #settingsVersion{color:#4f8a6f;}
body:not(.desktop-mode) #settingsFullscreenRow{display:none;}   /* the button is desktop-only anyway: no empty row on phones */
.settings-sub{font-size:.56rem;letter-spacing:.12em;color:#444;text-transform:uppercase;margin-top:.1rem;}
.settings-toggle{position:relative;width:42px;height:24px;flex-shrink:0;cursor:pointer;}
.settings-toggle input{position:absolute;opacity:0;width:0;height:0;}
.settings-toggle-track{display:block;width:100%;height:100%;background:#222;border-radius:12px;border:1px solid #333;transition:background .2s,border-color .2s;}
.settings-toggle-thumb{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#555;transition:transform .2s,background .2s;}
.settings-toggle input:checked+.settings-toggle-track{background:#0a1a0f;border-color:#00ff88;}
.settings-toggle input:checked+.settings-toggle-track+.settings-toggle-thumb{transform:translateX(18px);background:#00ff88;}
.settings-close-btn{width:100%;font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.15em;padding:.55rem;border-radius:10px;border:1px solid #2a2e38;background:#14161c;color:#9aa2b2;cursor:pointer;touch-action:manipulation;transition:all .15s;margin-top:.3rem;}
.settings-close-btn:active{border-color:#aaa;color:#ccc;}
.settings-close-btn.primary{background:#0a1a12;border-color:#00ff88;color:#7dffc0;font-weight:400;}
.settings-close-btn.quiet{background:#12141a;border-color:#23262e;color:#8b93a3;}
.settings-danger-btn{width:100%;font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.15em;padding:.5rem;border-radius:8px;border:1px solid #2a1a1a;background:#140808;color:#ff4444;cursor:pointer;touch-action:manipulation;transition:all .15s;}
.settings-vol-row{display:flex;align-items:center;gap:.5rem;}
.settings-vol-row .sb-slider{flex:1;}

/* ─── DESKTOP LAYOUT ─── */
/* Only activates when body has .desktop-mode class */

/* Scale up all rem-based text on desktop */
body.desktop-mode{font-size:calc(22px * var(--ds,1));}

/* ── Desktop: cap home screen oversized elements ── */
body.desktop-mode .home-logo-emoji{font-size:clamp(3rem,8vw,5rem) !important;}
body.desktop-mode .home-logo-title{font-size:clamp(2rem,6vw,3.5rem) !important;}
body.desktop-mode .score{font-size:clamp(2rem,6vw,4rem) !important;}

/* ── Desktop: enforce readable minimum font sizes ── */
/* Sub-labels, stats, small captions */
body.desktop-mode .home-logo-sub,
/* score-sub, auto-info, alien-mult now visible on desktop */
body.desktop-mode .tiers-col-label,
body.desktop-mode .seq-area-label,
body.desktop-mode .seq-area-label,
body.desktop-mode .bunker-progress-label,
body.desktop-mode .bunker-full-sub,
body.desktop-mode .home-slots-label,
body.desktop-mode .sb-label,
body.desktop-mode .sb-title,
body.desktop-mode .settings-sub,
body.desktop-mode .pad-sub,
body.desktop-mode .pa-desc,
body.desktop-mode .seq-arr-bar-idx,
body.desktop-mode .upgrade-card-sub,
body.desktop-mode .drum-card-sub,
body.desktop-mode .alien-card-stats,

body.desktop-mode .multiplier,
body.desktop-mode .lock-label,
body.desktop-mode #matchingGameLock,
body.desktop-mode .confirm-sub,
body.desktop-mode #shopPinchHint{display:none;}
body.desktop-mode .seq-save-pat-btn,
body.desktop-mode .seq-hdr-btn,
body.desktop-mode .seq-mode-pill,
body.desktop-mode .seq-bpm-display,
body.desktop-mode .seq-pat-name,
body.desktop-mode .seq-arr-bar-name,
body.desktop-mode .mp-name,
body.desktop-mode .mp-hear,
body.desktop-mode .pa-filter-chip,
body.desktop-mode .upgrade-effect-sub,
body.desktop-mode .drum-price small,
body.desktop-mode .upgrade-price small,
body.desktop-mode .alien-card-price small,
body.desktop-mode .store-section-label,
body.desktop-mode .anm-nav-btn,
body.desktop-mode #anmCounter,
body.desktop-mode .bunker-toggle-btn,
body.desktop-mode .bunker-number-label,
body.desktop-mode #progLabel,
body.desktop-mode #progPct,
body.desktop-mode #scoreSubEl,
body.desktop-mode .tier-mult,
body.desktop-mode .vtb-btn,
body.desktop-mode .nav-btn,
body.desktop-mode .back-btn,
body.desktop-mode .seq-song-slot-name,
body.desktop-mode .seq-song-slot-bars,
body.desktop-mode .seq-pill-name,
body.desktop-mode #padKeybindDisplay{
  font-size:max(0.78rem, 12px) !important;
  font-family:'Bebas Neue',sans-serif !important;
  letter-spacing:.08em !important;
  min-height:unset;
}

/* Inline style tiny fonts — target by element type in key containers */
body.desktop-mode .store-scroll *[style*="font-size:."],
body.desktop-mode .bunker-body *[style*="font-size:."],
body.desktop-mode #scoreStatsBox *[style*="font-size:."],
body.desktop-mode #alienNameBox *[style*="font-size:."],
body.desktop-mode #padAssignInner *[style*="font-size:."],
body.desktop-mode #tipsModal *[style*="font-size:."],
body.desktop-mode #settingsBox *[style*="font-size:."]{
  font-size:max(0.75rem, 12px) !important;
  font-family:'Bebas Neue',sans-serif !important;
  letter-spacing:.08em !important;
}
/* Never override the arrow labels — they already have correct styling */
body.desktop-mode #arrowShop *,
body.desktop-mode #arrowActivate *{
  font-size:revert !important;
  font-family:revert !important;
}
/* tipsOwnedLabel uses Space Mono intentionally — don't override */
body.desktop-mode #tipsOwnedLabel{
  font-family:'Bebas Neue',sans-serif !important;
  font-size:0.85rem !important;
  letter-spacing:.08em !important;
  color:#666 !important;
}
/* Header text — ensure readable size on desktop */
body.desktop-mode .page-sub{
  font-family:'Bebas Neue',sans-serif !important;
  font-size:0.85rem !important;
  letter-spacing:.15em !important;
  display:block !important;
}
body.desktop-mode .subtitle{
  font-family:'Bebas Neue',sans-serif !important;
  font-size:0.85rem !important;
  letter-spacing:.2em !important;
  display:block !important;
}
body.desktop-mode .page-title{
  font-size:1.6rem !important;
}
body.desktop-mode .bunker-stat-label{
  font-family:'Bebas Neue',sans-serif !important;
  font-size:0.55rem !important;
  letter-spacing:.15em !important;
  display:block !important;
}

/* Slightly larger for labels that should be clearly readable */
body.desktop-mode .upgrade-effect-main,
body.desktop-mode .drum-card-title,
body.desktop-mode .upgrade-card-title,
body.desktop-mode .alien-card-name,
body.desktop-mode .page-title,
body.desktop-mode .pa-name,
body.desktop-mode .seq-pat-name,
body.desktop-mode .settings-label,
body.desktop-mode .lock-btn,
body.desktop-mode .confirm-title,
body.desktop-mode #padAssignTitle,
body.desktop-mode .drum-counter-num,
body.desktop-mode .upgrade-counter-num,
body.desktop-mode .bunker-stat-val,
body.desktop-mode .alien-card-price,
body.desktop-mode .drum-price,
body.desktop-mode .upgrade-price,
body.desktop-mode .slot-name,
body.desktop-mode .game-title,
body.desktop-mode .nav-btn,
body.desktop-mode .back-btn{
  font-size:max(0.95rem, 15px) !important;
  font-family:'Bebas Neue',sans-serif !important;
  letter-spacing:.08em !important;
}

body.desktop-mode{overflow:hidden;}

/* File select screen — larger fonts on desktop */
body.desktop-mode .home-slots{max-width:520px;}
body.desktop-mode .slot-card{padding:1.1rem 1.4rem;gap:1.1rem;border-radius:14px;}
body.desktop-mode .slot-name{font-size:1.3rem !important;letter-spacing:.12em !important;}
body.desktop-mode .slot-detail{font-size:.85rem !important;line-height:1.6 !important;}
body.desktop-mode .home-slots-label{font-size:.65rem !important;letter-spacing:.25em !important;}
body.desktop-mode .home-logo-sub{font-size:.65rem !important;letter-spacing:.25em !important;}
body.desktop-mode .slot-icon{width:44px !important;height:44px !important;font-size:1.8rem !important;}

/* Outer shell: 3-column grid — bunker | game | shop */
body.desktop-mode #gameScreen{
  display:grid !important;
  grid-template-columns:var(--bunker-w,360px) 1fr var(--shop-w,380px);
  grid-template-rows:100vh;
  height:100vh;
  overflow:hidden;
}

/* ── Game view stays in center column ── */
body.desktop-mode #gameView{
  grid-column:2;
  grid-row:1;
  transform:none !important;
  position:relative;
  height:100vh;
  overflow:hidden;
  border-left:1px solid #1a1a1a;
  border-right:1px solid #1a1a1a;
}

/* ── Store becomes right sidebar ── */
body.desktop-mode #storeView{
  grid-column:3;
  grid-row:1;
  transform:none !important;
  position:relative;
  height:100vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border-left:1px solid #1a2a1a;
  background:#0a0a0a;
  transition:width .3s cubic-bezier(.4,0,.2,1);
}
body.desktop-mode #storeView.sidebar-collapsed{
  width:0;
  overflow:hidden;
  border:none;
}

/* ── Bunker becomes left sidebar ── */
body.desktop-mode #bunkerView{
  grid-column:1;
  grid-row:1;
  transform:none !important;
  position:relative;
  height:100vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border-right:1px solid #1a2a1a;
  background:#0a0a0a;
  transition:width .3s cubic-bezier(.4,0,.2,1);
  z-index:auto;
}
body.desktop-mode #bunkerView.sidebar-collapsed{
  width:0;
  overflow:hidden;
  border:none;
}

/* Cancel the slide-in/out transforms on desktop */
body.desktop-mode.store-open #gameView,
body.desktop-mode.bunker-open #gameView{transform:none !important;}
body.desktop-mode.store-open #storeView,
body.desktop-mode.bunker-open #bunkerView{transform:none !important;}

/* Sidebar scroll areas */
body.desktop-mode .store-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;}
/* Prevent sequencer from overflowing game column */
body.desktop-mode .app{overflow:hidden;}
body.desktop-mode .seq-area{overflow:hidden;box-sizing:border-box;}
body.desktop-mode .seq-layer-row{min-width:0;}
body.desktop-mode .seq-steps{min-width:0;overflow:hidden;}
/* Stack performance/tier2 upgrade cards vertically on desktop — no cramped columns */
body.desktop-mode .tracks-row{flex-direction:column;gap:.5rem;}
body.desktop-mode .upgrade-card{flex:none;width:100%;}
/* Narrow sequencer area on desktop to avoid overlap with sidebar tabs */
body.desktop-mode .seq-area{padding:0 2.2rem;}
body.desktop-mode .pad-area{padding-left:.5rem;padding-right:.5rem;}
/* Keep toggle tabs from being overlapped by collapse buttons */
body.desktop-mode .view-toggle-bar{padding:0 2.8rem;}
body.desktop-mode .bunker-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:5rem;}

/* Hide the BACK buttons on desktop sidebars — use collapse toggles instead */
body.desktop-mode #closeStoreBtn,
body.desktop-mode #closeBunkerBtn{display:none;}

/* Desktop sidebar collapse toggle buttons */
.desktop-collapse-btn{
  position:fixed;top:50%;z-index:50;
  background:#1a1a00;border:2px solid #e8ff00;color:#e8ff00;
  font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.1em;
  padding:.55rem .32rem;border-radius:6px;cursor:pointer;
  touch-action:manipulation;transition:all .2s;
  writing-mode:vertical-rl;text-orientation:mixed;line-height:1;
  display:none;box-shadow:0 0 12px -3px rgba(232,255,0,.35);
}
body.desktop-mode.game-active .desktop-collapse-btn{display:flex;align-items:center;z-index:51;}
#collapseShopBtn{right:0;transform:translateY(-50%);}
#collapseBunkerBtn{left:0;transform:translateY(-50%);}
.desktop-collapse-btn:hover{color:#fff;border-color:#fff;background:#333300;box-shadow:0 0 18px -3px rgba(232,255,0,.6);}

/* On desktop, hide the old slide-nav buttons that say SHOP / BUNKER */
body.desktop-mode #openStoreBtn,
body.desktop-mode #openBunkerBtn{display:none;}

/* Desktop: always show soundboard/pad buttons regardless of sidebar state */
body.desktop-mode.store-open #soundboardBtn,
body.desktop-mode.store-open #padEditToggleBtn,
body.desktop-mode.store-open #socialsBtn,
body.desktop-mode.store-open #partyBtn,
body.desktop-mode.bunker-open #soundboardBtn,
body.desktop-mode.bunker-open #padEditToggleBtn,
body.desktop-mode.bunker-open #socialsBtn,
body.desktop-mode.bunker-open #partyBtn{display:block !important;}
/* On desktop: party button sits just inside the right edge of the game view column */
body.desktop-mode #padEditToggleBtn{right:unset;left:14.2rem;}
body.desktop-mode #partyBtn{
  bottom:1.4rem;right:calc(var(--shop-w,380px) + 1.4rem);
  transform:none;
  z-index:52;
}
/* When shop is collapsed, move it back to normal right edge */
body.desktop-mode #storeView.sidebar-collapsed ~ * #partyBtn,
body.desktop-mode #partyBtn.shop-collapsed{
  right:1.4rem;
}

/* Desktop: alienLayer spans full width, above sidebars but below modals */
body.desktop-mode #alienLayer{z-index:180;}

/* Mobile view mode — iPhone proportions (390x844) centered with black bars */
body.mobile-view-mode{background:#000;display:flex;align-items:center;justify-content:center;}
body.mobile-view-mode #gameScreen{
  position:relative !important;
  width:390px !important;
  height:844px !important;
  max-width:390px !important;
  flex-shrink:0;
  overflow:hidden;
  border-radius:44px;
  box-shadow:0 0 0 1px #222, 0 0 60px rgba(0,0,0,.8);
  grid-template-columns:none !important;
  display:flex !important;
}
body.mobile-view-mode #gameScreen #bunkerView,
body.mobile-view-mode #gameScreen #storeView{
  display:none !important;
}
body.mobile-view-mode #gameScreen #gameView{
  width:390px !important;
  grid-column:auto !important;
  transform:none !important;
}

/* Settings button — replaces options button positioning */
#settingsOpenBtn{
  position:fixed;bottom:1.4rem;left:1.4rem;z-index:50;
  font-family:'Bebas Neue',sans-serif;font-size:.82rem;letter-spacing:.08em;
  padding:.42rem .72rem;border-radius:50px;
  border:1px solid #333;background:#111;color:#666;
  cursor:pointer;touch-action:manipulation;
  transition:border-color .2s,color .2s,background .2s;
}
#settingsOpenBtn:active{background:#1a1a1a;border-color:#555;}

/* Desktop: sidebar header tweaks */
body.desktop-mode .page-header{
  padding:.8rem 1rem;
  border-bottom:1px solid #1a1a1a;
  flex-shrink:0;
}
body.desktop-mode .page-title{font-size:1rem;}

/* Desktop: store zoom hint hidden (no need to zoom on desktop) */
body.desktop-mode .store-zoom-hint{display:none;}

@keyframes settingsIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
#settingsBox{animation:settingsIn .18s cubic-bezier(.34,1.1,.64,1);}

/* 4+ sequencer tracks on shorter screens: show 3.5 rows, scroll for the rest (no visible scrollbar) */
#seqLayersContainer.seq-scroll{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
#seqLayersContainer.seq-scroll::-webkit-scrollbar{display:none;}

/* Settings: never taller than the screen — scrolls (no visible scrollbar) and tightens up on shorter windows */
#settingsBox{max-height:94vh;max-height:94dvh;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:none;}
#settingsBox::-webkit-scrollbar{display:none;}
@media (max-height:950px){
  #settingsBox{gap:.4rem;padding:1rem 1.3rem 1.2rem;}
  #settingsBox .settings-row{padding:.3rem 0;}
  #settingsBox .settings-close-btn{padding:.4rem;margin-top:.1rem;}
}

/* Early game: while the ACTIVATE arrow is showing, leave space under the score so the arrow never covers it */
.score-section{transition:margin-bottom .25s ease;}
/* (v0.2.125) no extra room for the ACTIVATE arrow any more: it sits beside the button, so nothing jumps */

/* The DRUMPAD label only appears once the SEQUENCER tracker exists beside it */
body:not(.seq-on) #manualTiersCol .tiers-col-label{display:none !important;}

/* Early game: the ACTIVATE button needs its own space under the score ("×1 per tap" used to be hidden behind it) */
body.drum-overlay:not(.desktop-mode) #tiersWrap > div:first-child{min-height:76px;margin-top:18px;}

/* v0.2.20: single VIEW menu, hideable drum pads, no steps/sec + earning line under the score */
.auto-info,.auto-info.visible{display:none !important;}
body.pads-hidden .pad-area{display:none !important;}
#viewMenu{position:fixed;z-index:300;flex-direction:column;gap:2px;padding:6px;border-radius:10px;border:1px solid #2a2a5a;background:#0c0c1c;box-shadow:0 8px 24px rgba(0,0,0,.6);min-width:170px;}
#viewMenu .vm-row{display:flex;align-items:center;gap:.6rem;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.12em;padding:.55rem .7rem;border-radius:7px;border:none;background:transparent;color:#667;cursor:pointer;text-align:left;touch-action:manipulation;}
#viewMenu .vm-row.on{color:#cfd2ff;}
#viewMenu .vm-row:active{background:#1a1a3a;}
#viewMenu .vm-check{display:inline-block;width:1.1rem;text-align:center;color:#00ff88;}

/* v0.2.21 phone composition once the sequencer is unlocked: stack from the top with even gaps
   (instead of spreading to the edges) and keep the pads clear of the SETTINGS / Edit Pads buttons */
body.seq-on:not(.desktop-mode) .app{justify-content:flex-start;gap:.7rem;}
body.seq-on:not(.desktop-mode) .pad-area{padding-bottom:4.6rem;}

/* v0.2.23: phone pads are sized in JS (fitPadArea) to stop above SETTINGS / EDIT PADS */
body.pad-fit:not(.desktop-mode) .pad-grid{grid-auto-rows:1fr;}
body.pad-fit:not(.desktop-mode) .pad{aspect-ratio:auto;min-height:0;}
body.pad-fit:not(.desktop-mode).seq-on .pad-area{padding-bottom:0;}
.seq-bottom-row .seq-save-pat-btn{white-space:nowrap;}
/* phone: keep VIEW / ADD / SAVE-LOAD / trash / EXPORT on a single line */
body:not(.desktop-mode) #seqPatternView .seq-bottom-row{flex-wrap:nowrap;gap:3px;}
body:not(.desktop-mode) #seqPatternView .seq-bottom-row>button{font-size:.58rem;letter-spacing:.04em;padding:.2rem .32rem;flex:0 0 auto;}
body:not(.desktop-mode) #seqPatternView .seq-bottom-row>#seqAddBtn{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:clip;}
body:not(.desktop-mode) #seqPatternView .seq-bottom-row>#seqClearBtn{padding-left:.5rem;padding-right:.5rem;width:auto;}
#seqClearBtn svg{width:15px;height:15px;margin:0 auto;}

/* v0.2.24: less clutter under the score: no energy countdown text, no alien boost line (the energy bar stays) */
#energyLabel,#alienMultInfo,.alien-mult-info{display:none !important;}

/* v0.2.27: no "MAX n TRACKS" placeholder; the add button only appears while a track can actually be added */
#seqAddBtn:disabled,#seqFullAddBtn:disabled{display:none !important;}

/* v0.2.29: tracks are fixed to what's unlocked (no add / delete), VIEW left + other buttons right, more room under the energy bar */
.seq-add-btn,#seqAddBtn,#seqFullAddBtn{display:none !important;}
#seqPatternView .seq-bottom-row #seqSavePatBtn{margin-left:auto;}
.energy-meter{margin-bottom:8px;}

/* v0.2.30: SOLO button next to MUTE */
.seq-rc-btn.seq-solo-btn.solo-on{background:#2a2400;border-color:#ffd23a;color:#ffd23a;}
.seq-rc-btn.seq-solo-btn.solo-dim{opacity:.55;}

/* ═══ v0.2.32: 16 / 32 / 64-step loops ═══ */
.seq-ph-cells,.seq-steps{grid-template-columns:repeat(var(--n,16),1fr);}
#seqHScroll{position:relative;overflow-x:auto;}
#seqHInner{width:calc(var(--n,16) * 6.25%);min-width:100%;}
#seqHScroll.seq-scroll{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
#seqLayersContainer.seq-scroll{overflow:visible;max-height:none !important;}
/* when the loop is longer than the screen, the sound pill (left) and M/S (right) stay pinned while the steps scroll */
body.seq-wide .seq-layer-row>.seq-snd-pill{position:sticky;left:0;z-index:2;}
body.seq-wide .seq-layer-row>.seq-row-ctrl{position:sticky;right:0;z-index:2;background:#0a0a0a;}
body.seq-wide .seq-ph-bar>:first-child{position:sticky;left:0;z-index:2;background:#0a0a0a;}
body.seq-wide .seq-ph-bar>:last-child{position:sticky;right:0;z-index:2;background:#0a0a0a;}
#seqHScroll .seq-ph-bar{position:sticky;top:0;z-index:3;background:#0a0a0a;padding-bottom:2px;}
/* phone: drag freely, no scrollbars */
body:not(.desktop-mode) #seqHScroll{scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;}
body:not(.desktop-mode) #seqHScroll::-webkit-scrollbar{display:none;}
/* desktop: a slim glowing horizontal scrollbar (vertical stays invisible) */
body.desktop-mode #seqHScroll{padding-bottom:2px;}
body.desktop-mode #seqHScroll::-webkit-scrollbar{height:10px;width:0;}
body.desktop-mode #seqHScroll::-webkit-scrollbar:vertical{width:0;display:none;}
body.desktop-mode #seqHScroll::-webkit-scrollbar-track{background:#0e0e1c;border-radius:8px;border:1px solid #1c1c34;}
body.desktop-mode #seqHScroll::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#4a52c8,#a0a8ff);border-radius:8px;border:1px solid #0e0e1c;box-shadow:0 0 8px rgba(160,168,255,.55);}
body.desktop-mode #seqHScroll::-webkit-scrollbar-thumb:hover{background:linear-gradient(90deg,#6a72e8,#c4c9ff);}
@-moz-document url-prefix(){body.desktop-mode #seqHScroll{scrollbar-width:thin;scrollbar-color:#a0a8ff #0e0e1c;}}
/* fullscreen sequencer: long loops scroll sideways */
#seqFullLayers{overflow:auto;}
body.seq-wide #seqFullLayers .seq-layer-row,body.seq-wide #seqFullPhBar{min-width:calc(var(--n,16) * 30px + 150px);}
#seqFullPhBar{position:sticky;top:0;z-index:3;background:#080810;padding-bottom:3px;}
/* steps menu shares the VIEW menu look */
#stepsMenu{position:fixed;z-index:300;flex-direction:column;gap:2px;padding:6px;border-radius:10px;border:1px solid #2a2a5a;background:#0c0c1c;box-shadow:0 8px 24px rgba(0,0,0,.6);min-width:150px;}
#stepsMenu .vm-row{display:flex;align-items:center;gap:.6rem;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.12em;padding:.55rem .7rem;border-radius:7px;border:none;background:transparent;color:#667;cursor:pointer;text-align:left;touch-action:manipulation;}
#stepsMenu .vm-row.on{color:#cfd2ff;}
#stepsMenu .vm-row.locked{opacity:.45;}
#stepsMenu .vm-row:active{background:#1a1a3a;}
#stepsMenu .vm-check{display:inline-block;width:1.1rem;text-align:center;color:#00ff88;}
#stepsMenu .vm-sep{height:1px;background:#22224a;margin:3px 6px;}
#stepsMenu{min-width:200px;}
#stepsMenu .vm-sep{height:1px;background:#22224a;margin:3px 6px;}
#stepsMenu{min-width:200px;}
#patStartModal .confirm-btn.yes{color:#00ff88;border-color:#00cc88;background:#04170e;}

/* v0.2.34: matching game uses the whole desktop window (grid sized in JS) */
body.desktop-mode #matchingModal>div[style*="max-width:460px"]{max-width:min(92vw,1100px) !important;}
body.desktop-mode #matchGrid{overflow-y:hidden;}

/* v0.2.37: bigger trackers on desktop */
body.desktop-mode .tier-dots{gap:8px;margin:0 10px;}
body.desktop-mode .tier-dot{width:14px;height:14px;}
body.desktop-mode .tier-spacer{width:58px;}
body.desktop-mode .tier-mult{width:58px;font-size:1.15rem !important;letter-spacing:.05em !important;}
body.desktop-mode .tiers-container{gap:8px;}
body.desktop-mode #scoreRow .tiers-col-label{font-size:1.05rem !important;letter-spacing:.2em !important;margin-bottom:6px;}
body.seq-on.desktop-mode #tiersWrap > div:first-child,body.seq-on.desktop-mode #autoTiersCol{flex:0 0 250px;}

/* v0.2.40 — save-file screen: never squash the logo text on small phones (iPhone 7 etc.) */
#homeScreen{overflow-y:auto;overflow-x:hidden;touch-action:pan-y;-webkit-overflow-scrolling:touch;justify-content:flex-start;gap:1.2rem;}
#homeScreen>*{flex-shrink:0;}
#homeScreen>div:last-child{margin-top:auto;padding-top:.8rem;}
.home-logo>*{flex-shrink:0;}
.home-logo-sub{line-height:1.5;text-align:center;}
@media (max-height:720px){
  #homeScreen{padding:1.4rem 1.2rem 1.6rem;gap:.8rem;}
  .home-logo{margin-top:0;gap:.25rem;}
  .home-logo-emoji{font-size:clamp(3rem,14vw,4.5rem);}
  .home-logo-title{font-size:clamp(2.2rem,10.5vw,3.2rem);}
  .home-slots{gap:.5rem;}
  .slot-card{padding:.65rem 1rem;}
}
.home-logo-title{text-align:center;}

/* v0.2.41 phone composition without the sequencer: stack from the top with even gaps, pads fill the free space,
   bigger tracker dots / multiplier text so the tracker reads easily */
body.pad-fit:not(.desktop-mode):not(.seq-on) .app{justify-content:flex-start;gap:.9rem;}
body.pad-fit:not(.desktop-mode):not(.seq-on) .pad-area{padding-bottom:0;}
body:not(.desktop-mode) .tier-dot{width:12px;height:12px;}
body:not(.desktop-mode) .tier-dots{gap:7px;margin:0 9px;}
body:not(.desktop-mode) .tiers-container{gap:8px;max-height:28vh;}
body:not(.desktop-mode) .tier-mult{font-size:1.1rem;width:48px;}

/* v0.2.42 score breakdown: aliens never float over it; clearer, larger, higher-contrast text for small phones */
body.stats-open #alienLayer{visibility:hidden;}
#scoreStatsBox{max-height:92vh;max-height:92dvh;}
#scoreStatsList{gap:.45rem;padding:.7rem 1rem 1.2rem;}
.ss-section-label{font-size:.8rem;color:#6d6da8;margin-top:.6rem;letter-spacing:.24em;}
.ss-row{padding:.55rem .75rem;gap:.65rem;}
.ss-label{font-size:1.05rem;color:#8a8ab5;line-height:1.1;}
.ss-desc{font-size:.78rem;color:#6f6f95;letter-spacing:.04em;line-height:1.25;text-transform:none;}
.ss-desc.active{color:#8f8fb8;}
.ss-val{font-size:1.5rem;color:#5a5a85;}
.ss-total-label{font-size:1rem;color:#8a8aca;}
.ss-total-val{font-size:2.1rem;}

.match-card{align-self:start;}

/* v0.2.46 window scaling: --ds (desktop scale) is set from the window size in applyWindowScale() */
#tooSmallOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:99999;background:#07070f;display:none;align-items:center;justify-content:center;text-align:center;padding:1rem;}
body.too-small #tooSmallOverlay{display:flex;}
.ts-box{max-width:420px;}
.ts-emoji{font-size:2.4rem;margin-bottom:.4rem;}
.ts-msg{font-family:'Bebas Neue',sans-serif;font-size:1.5rem;letter-spacing:.14em;color:#00ff88;}
.ts-sub{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.14em;color:#667;margin-top:.4rem;}
body.desktop-mode .tier-dots{gap:calc(8px*var(--ds,1));margin:0 calc(10px*var(--ds,1));}
body.desktop-mode .tier-dot{width:calc(14px*var(--ds,1));height:calc(14px*var(--ds,1));}
body.desktop-mode .tier-spacer,body.desktop-mode .tier-mult{width:calc(58px*var(--ds,1));}
body.seq-on.desktop-mode #tiersWrap > div:first-child,body.seq-on.desktop-mode #autoTiersCol{flex:0 0 calc(250px*var(--ds,1));}
body.desktop-mode .pad-area,body.seq-on.desktop-mode .pad-area{max-width:calc(680px*var(--ds,1));}
/* short desktop windows: tighter spacing so the sequencer + pads always fit */
body.desktop-mode.short-win .app{gap:.35rem;padding-top:.7rem;padding-bottom:.7rem;}
body.desktop-mode.short-win .pad-area{padding-bottom:.4rem;}

/* narrow centre column (small desktop windows): score on top, the two trackers side by side underneath */
body.seq-on.desktop-mode.narrow-center #scoreRow{flex-wrap:wrap;row-gap:.4rem;column-gap:12px;}
body.seq-on.desktop-mode.narrow-center #scoreRow .score-section{order:-1;flex:0 0 100%;}
body.seq-on.desktop-mode.narrow-center #tiersWrap > div:first-child,body.seq-on.desktop-mode.narrow-center #autoTiersCol{flex:0 1 calc(200px*var(--ds,1));}
body.desktop-mode.narrow-center .score{font-size:clamp(2.2rem,7vw,4rem);}
body.desktop-mode.narrow-center .seq-area-header{gap:4px 6px;flex-wrap:wrap;justify-content:center;}
body.desktop-mode.narrow-center .seq-area-header .seq-mode-pill{padding-left:.3rem;padding-right:.3rem;letter-spacing:.04em;}
body.desktop-mode.narrow-center .seq-area-header .seq-hdr-btn{padding-left:.3rem;padding-right:.3rem;}

/* v0.2.47 popups scale with the desktop window (--ds) */
body.desktop-mode #scoreStatsBox{max-width:calc(500px*var(--ds,1));}
body.desktop-mode #scoreStatsBox,body.desktop-mode #seqFullModal,body.desktop-mode .confirm-box{font-size:inherit;}
body.desktop-mode .confirm-box{max-width:calc(380px*var(--ds,1));}
body.desktop-mode #matchingModal>div[style*="max-width:460px"]{max-width:min(94vw,calc(1100px*max(var(--ds,1),.9))) !important;}

/* ── MORE menu + modals ── */
#moreMenu{position:fixed;z-index:300;flex-direction:column;gap:2px;padding:6px;border-radius:10px;border:1px solid #2a2a5a;background:#0c0c1c;box-shadow:0 8px 24px rgba(0,0,0,.6);min-width:210px;display:none;}
#moreMenu[style*="display: flex"],#moreMenu[style*="display:flex"]{display:flex;}
#moreMenu .vm-row{display:flex;align-items:center;gap:.6rem;font-family:'Bebas Neue',sans-serif;font-size:1.05rem;letter-spacing:.12em;padding:.6rem .75rem;border-radius:7px;border:none;background:transparent;color:#cfd2ff;cursor:pointer;text-align:left;touch-action:manipulation;}
#moreMenu .vm-row:active{background:#1a1a3a;}
.more-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:320;background:rgba(0,0,0,.78);display:none;align-items:center;justify-content:center;padding:.8rem;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);}
.more-box{width:100%;max-width:calc(440px*var(--ds,1));max-height:92vh;max-height:92dvh;overflow-y:auto;background:#0a0a1a;border:1px solid #2a2a5a;border-radius:16px;padding:1rem 1.1rem 1.1rem;touch-action:pan-y;-webkit-overflow-scrolling:touch;font-family:'Bebas Neue',sans-serif;}
.more-head{display:flex;align-items:center;gap:.6rem;margin-bottom:.4rem;}
.more-title{flex:1;font-size:1.25rem;letter-spacing:.16em;color:#a0a8ff;}
.more-x,.more-back{font-family:'Bebas Neue',sans-serif;border:1px solid #3a3a5a;background:#12122a;color:#a0a8ff;border-radius:8px;cursor:pointer;touch-action:manipulation;}
.more-x{width:36px;height:36px;font-size:1rem;}
.more-back{padding:.35rem .6rem;font-size:.9rem;letter-spacing:.1em;}
.more-sub{font-size:.85rem;letter-spacing:.06em;color:#7a7aa8;line-height:1.45;margin:.2rem 0 .8rem;font-family:'Inter',system-ui,sans-serif;}
.more-foot{font-size:.95rem;letter-spacing:.1em;color:#7a7aa8;text-align:center;margin:.8rem 0 .2rem;}
.more-done{display:block;width:100%;margin-top:.8rem;font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.18em;padding:.7rem;border-radius:12px;border:1px solid #a0a8ff;background:#12122a;color:#a0a8ff;cursor:pointer;touch-action:manipulation;}
.more-done.alt{border-color:#3a3a5a;color:#8a8ab5;}
.key-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.key-btn{font-family:'Bebas Neue',sans-serif;font-size:1.5rem;letter-spacing:.06em;padding:.7rem 0;border-radius:10px;border:1px solid #2a2a5a;background:#0d0d1d;color:#8a8ab5;cursor:pointer;touch-action:manipulation;}
.key-btn.on{border-color:#00ff88;color:#00ff88;background:#04170e;box-shadow:0 0 14px -4px rgba(0,255,136,.6);}
.key-off{font-size:1.15rem;}
.fx-list{display:flex;flex-direction:column;gap:8px;}
.fx-row{display:flex;align-items:center;gap:.7rem;padding:.7rem .8rem;border-radius:10px;border:1px solid #1f1f3c;background:#0d0d1d;cursor:pointer;touch-action:manipulation;font-family:'Bebas Neue',sans-serif;text-align:left;}
.fx-row.active{border-color:#3a4a8a;}
.fx-dot{width:12px;height:12px;border-radius:50%;flex-shrink:0;}
.fx-name{flex:1;font-size:1.15rem;letter-spacing:.1em;}
.fx-go{color:#5a5a8a;font-size:1.4rem;}
.fx-badges{display:flex;gap:5px;}
.fx-badge{font-size:.72rem;letter-spacing:.1em;padding:.15rem .4rem;border-radius:5px;border:1px solid #26264a;color:#3c3c64;}
.fx-badge.on{border-color:#00cc88;color:#00ff88;background:#04170e;}
.fx-sec{border:1px solid #1f1f3c;border-radius:12px;padding:.7rem .8rem .8rem;margin-top:.7rem;background:#0c0c1b;}
.fx-sec-title{font-size:1.05rem;letter-spacing:.2em;color:#a0a8ff;margin-bottom:.5rem;}
.fx-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:.5rem;}
.fx-chip{font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.08em;padding:.4rem .7rem;border-radius:8px;border:1px solid #2a2a5a;background:#0d0d1d;color:#8a8ab5;cursor:pointer;touch-action:manipulation;}
.fx-chip.on{border-color:#a0a8ff;color:#e0e4ff;background:#1a1a3a;box-shadow:0 0 10px -4px rgba(160,168,255,.7);}
.fx-slider{margin:.2rem 0 .5rem;}
.fx-sl-label{display:flex;justify-content:space-between;font-size:.85rem;letter-spacing:.14em;color:#7a7aa8;margin-bottom:.15rem;}
.fx-sl-val{color:#cfd2ff;}
.fx-slider input[type=range]{width:100%;accent-color:#a0a8ff;touch-action:pan-y;height:28px;}
.fx-clear{font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.14em;padding:.45rem .8rem;border-radius:8px;border:1px solid #aa3344;background:#1a0b10;color:#e0485c;cursor:pointer;touch-action:manipulation;}
.fx-clear:disabled{opacity:.35;cursor:default;}
.fx-foot{display:flex;gap:8px;}
.fx-foot .more-done{flex:1;}
.fx-foot{position:sticky;bottom:-1.1rem;background:#0a0a1a;padding-bottom:.2rem;}

/* v0.2.48 phone trackers: compact so both columns fit side by side; if rows don't fit, the top multiplier row stays visible and the rest scroll above it */
body.seq-on:not(.desktop-mode) .tier-dot{width:9px;height:9px;}
body.seq-on:not(.desktop-mode) .tier-dots{gap:4px;margin:0 4px;}
body.seq-on:not(.desktop-mode) .tier-spacer,body.seq-on:not(.desktop-mode) .tier-mult{width:36px;}
body.seq-on:not(.desktop-mode) .tier-mult{font-size:.85rem;}
body.seq-on:not(.desktop-mode) .tiers-container{gap:5px;max-height:62px;}
body:not(.desktop-mode) .tiers-container.scrolls{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 16px);mask-image:linear-gradient(to bottom,transparent 0,#000 16px);}

/* v0.2.49 phone: pads show only the sound name (no 'DRUMS' category line); empty pads keep their 'tap to assign' hint */
body:not(.desktop-mode) .pad-sub:not(.empty){display:none;}

/* v0.2.50 iPhone/Safari: make the card flip render reliably (prefixed 3D properties, no clipping of the flipped face) */
.match-card{-webkit-transform-style:preserve-3d;will-change:transform;}
.match-card-face{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:visible;-webkit-transform:translateZ(0);}
.match-card-front{-webkit-transform:rotateY(180deg) translateZ(0);transform:rotateY(180deg) translateZ(0);}
.match-card-back{-webkit-transform:rotateY(0deg) translateZ(1px);transform:rotateY(0deg) translateZ(1px);}
/* desktop sequencer: wider name column so sound names are not cut off (scales with the window) */
body.desktop-mode .seq-layer-row,body.desktop-mode .seq-ph-bar{grid-template-columns:calc(104px*var(--ds,1)) 1fr calc(48px*var(--ds,1));}
body.desktop-mode .seq-snd-pill{padding:.2rem .5rem;gap:6px;}

/* v0.2.52 phone: SHOP / BUNKER buttons sit 10px lower */
body:not(.desktop-mode) .btn-left,body:not(.desktop-mode) .btn-right{top:calc(50% + 10px);}

/* v0.2.53 desktop trackers: a bit smaller (dots were too big once the window scaling kicked in) */
/* v0.2.231: a little more air between the tracker dots (were too close) */
body.desktop-mode .tier-dots{gap:calc(9px*var(--ds,1));margin:0 calc(10px*var(--ds,1));}
body.desktop-mode .tier-dot{width:calc(10px*var(--ds,1));height:calc(10px*var(--ds,1));}
body.desktop-mode .tier-spacer,body.desktop-mode .tier-mult{width:calc(50px*var(--ds,1));}
body.desktop-mode .tier-mult{font-size:1rem !important;}
body.desktop-mode .tiers-container{gap:calc(6px*var(--ds,1));}
body.seq-on.desktop-mode #tiersWrap > div:first-child,body.seq-on.desktop-mode #autoTiersCol{flex:0 0 calc(210px*var(--ds,1));}
body.desktop-mode #scoreRow .tiers-col-label{font-size:.95rem !important;}

#zoomResetBtn{position:fixed;top:0;left:0;z-index:99998;transform-origin:0 0;font-family:'Bebas Neue',sans-serif;font-size:15px;letter-spacing:.14em;padding:.5rem .9rem;border-radius:999px;border:1px solid #00ff88;background:rgba(4,23,14,.94);color:#00ff88;box-shadow:0 4px 18px rgba(0,0,0,.6);touch-action:manipulation;}

/* v0.2.55 score breakdown on small phones: rows never shrink/overlap (list scrolls instead), tighter text */
#scoreStatsList>*{flex-shrink:0;}
@media (max-width:480px){
  .ss-row{padding:.5rem .65rem;gap:.55rem;}
  .ss-icon{font-size:1.15rem;width:1.6rem;}
  .ss-label{font-size:.9rem;letter-spacing:.06em;}
  .ss-desc{font-size:.68rem;letter-spacing:.02em;}
  .ss-val{font-size:1.2rem;}
  .ss-section-label{font-size:.72rem;}
  .ss-total-val{font-size:1.8rem;}
  .ss-total-label{font-size:.9rem;}
}

/* v0.2.56 aliens bounce over the matching game (they never block taps) */
body.match-open #alienLayer{z-index:240;}

/* v0.2.57 matching game: lighter, snappier cards */
.match-card{will-change:auto;contain:layout style;-webkit-tap-highlight-color:transparent;transition-duration:.28s;}
.match-card:active:not(.flipped){transform:scale(.96);}
.match-card.flipped:active{transform:rotateY(180deg);}

/* v0.2.58 lighter alien layer */
#alienLayer{contain:layout style;}
.bouncer{backface-visibility:hidden;}

/* v0.2.59 phone/tablet performance: no live blur behind pop-ups (very costly on older iPhones), calmer skill-tree motion */
body:not(.desktop-mode) #alienNameModal,
body:not(.desktop-mode) #scoreStatsModal,
body:not(.desktop-mode) #padAssignModal,
body:not(.desktop-mode) #settingsPanel,
body:not(.desktop-mode) .more-modal{-webkit-backdrop-filter:none;backdrop-filter:none;}
body:not(.desktop-mode) #alienNameModal,
body:not(.desktop-mode) #scoreStatsModal,
body:not(.desktop-mode) .more-modal{background:rgba(0,0,0,.9);}
body:not(.desktop-mode) .st-node{animation:none;}
body:not(.desktop-mode) .alien-cell.occupied::after{animation:none;}
@media (prefers-reduced-motion:reduce){.st-node,.alien-cell.occupied::after,.home-logo-emoji{animation:none !important;}}

/* v0.2.65 organised sound picker: SOURCE / CONTINENT rows, grouped list, search */
#padAssignFilters{flex-direction:column;gap:6px;}
.pa-frow{display:flex;gap:5px;flex-wrap:wrap;align-items:center;}
.pa-flabel{font-family:'Bebas Neue',sans-serif;font-size:.55rem;letter-spacing:.14em;color:#444;min-width:5.2em;}
.pa-filter-chip.pa-planet{border-color:#1d4a3f;color:#3d8a76;}
.pa-filter-chip.pa-planet.on{border-color:#44eebb;color:#44eebb;background:#04140f;}
.pa-filter-chip.pa-cont{border-color:#1a3a33;}
.pa-filter-chip.pa-cont.on{border-color:#88ddbb;color:#88ddbb;background:#06130f;}
.pa-search{flex:1;min-width:0;font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.1em;padding:.3rem .55rem;border-radius:6px;border:1px solid #2a2a4a;background:#0b0b14;color:#cfd3ff;outline:none;-webkit-appearance:none;appearance:none;}
.pa-search:focus{border-color:#a0a8ff;}
.pa-group{display:flex;justify-content:space-between;align-items:baseline;position:sticky;top:0;z-index:2;background:#07070d;padding:.4rem .5rem .25rem;margin-top:.25rem;border-bottom:1px solid #1a1a2a;font-family:'Bebas Neue',sans-serif;letter-spacing:.14em;}
.pa-group span{font-size:.8rem;color:#a0a8ff;}
.pa-group em{font-style:normal;font-size:.6rem;color:#555;}
.pa-empty{padding:1.2rem;text-align:center;font-family:'Bebas Neue',sans-serif;letter-spacing:.14em;color:#444;font-size:.8rem;}
#padAssignInner{max-height:84vh;}
body:not(.desktop-mode) #padGpRow{display:none !important;}
#shopPinchHint{display:none !important;}
body.desktop-mode #matchGrid{overflow-x:hidden !important;}
/* v0.2.77 early game (no sequencer yet) on desktop: big square pads */
body.desktop-mode:not(.seq-on) .pad{aspect-ratio:1/1;}
/* v0.2.78 desktop, pads hidden: keep the score + sequencer grouped in the middle instead of dropping the sequencer to the bottom */
body.desktop-mode.pads-hidden .app{justify-content:center;gap:clamp(1.5rem,6vh,4rem);}
/* v0.2.79 early game desktop: lift the pads off the bottom edge */
body.desktop-mode:not(.seq-on) .pad-area{padding-bottom:5.5rem;}

/* v0.2.79 TIPS button glows when you can afford the next tip */
@keyframes tipsGlow{0%,100%{box-shadow:0 0 4px 0 rgba(232,255,0,.25);border-color:#aaaa33;color:#d6d640;}50%{box-shadow:0 0 16px 3px rgba(232,255,0,.6);border-color:#e8ff00;color:#f4ff66;}}
#tipsBtn.tips-glow{animation:tipsGlow 1.4s ease-in-out infinite;background:#1a1a04 !important;}
/* v0.2.79 desktop side tabs (SHOP / BUNKER) 40% larger */
body.desktop-mode .desktop-collapse-btn{font-size:1.19rem;padding:.77rem .45rem;border-radius:8px;}

/* tips page: larger text on desktop */
body.desktop-mode #tipsModal>div:first-child{zoom:1.04;}

/* v0.2.80: step counts — small numbers inside each sequencer step (View menu → STEP COUNTS) */
.seq-steps{counter-reset:stp;}
.seq-step{counter-increment:stp;position:relative;}
body.sc-beats .seq-step:nth-child(4n+1)::after,
body.sc-ends .seq-step:nth-child(4n)::after,
body.sc-all .seq-step::after{
  content:counter(stp);position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;
  font-family:'Bebas Neue',sans-serif;font-size:.7rem;line-height:1;letter-spacing:.04em;color:#8a8a9a;pointer-events:none;
}
body.sc-all .seq-step::after{font-size:.62rem;}
.seq-step.on::after{color:rgba(0,0,0,.7) !important;}
#seqFullLayers .seq-step::after{font-size:.95rem !important;}
#viewMenu .vm-sub{padding-left:1.6rem;}
#viewMenu .vm-sub.dim{opacity:.5;}

/* v0.2.81: phone page dots (carousel position) + the galaxy map as a sliding page */
#skillTreeModal{transition:transform .38s cubic-bezier(.4,0,.2,1);}
#pageDots{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 7px);transform:translateX(-50%);z-index:320;display:none;align-items:center;gap:7px;padding:5px 9px;border-radius:99px;background:rgba(8,10,18,.55);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:0;transition:opacity .9s ease;pointer-events:none;}
body.game-active:not(.desktop-mode) #pageDots{display:flex;}
#pageDots.show{opacity:1;transition:opacity .25s ease;}
#pageDots .pd{width:6px;height:6px;border-radius:99px;background:#3a3f55;transition:width .28s cubic-bezier(.4,0,.2,1),background .28s,box-shadow .28s;}
#pageDots .pd.on{width:18px;background:#00ff88;box-shadow:0 0 8px rgba(0,255,136,.7);}
body:has(#seqFullModal.open) #pageDots{display:none !important;}
#pageDots{bottom:calc(env(safe-area-inset-bottom,0px) + 3px);padding:3px 8px;}
@media (max-width:600px){#skillTreeTitle{font-size:.95rem;letter-spacing:.08em;}#skillTreeGemDisplay{font-size:1.15rem;}}

/* v0.2.81: dismissable maxed shop cards */
.drum-card-header,.upgrade-card-header{position:relative;}
.shop-dismiss-btn{position:absolute;right:.7rem;top:.55rem;font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.12em;padding:.22rem .7rem;border-radius:8px;border:1px solid #2a2a3a;background:#0c0c14;color:#8a8aa8;cursor:pointer;touch-action:manipulation;}
.shop-dismiss-btn:active{background:#1a1a2a;color:#cfd2ff;}
.shop-dismissed{display:none !important;}

/* v0.2.81: galaxy map zoom control (right side) */
#stZoomCtl{position:absolute;right:10px;top:50%;transform:translateY(-50%);z-index:5;display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 5px;border-radius:14px;background:rgba(6,9,22,.78);border:1px solid #14183a;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);}
#stZoomCtl button{width:30px;height:30px;border-radius:9px;border:1px solid #1a2050;background:#080c1c;color:#7aa8ff;font-family:'Bebas Neue',sans-serif;font-size:1.3rem;line-height:1;cursor:pointer;touch-action:manipulation;padding:0;}
#stZoomCtl button:active{background:#12184a;}
#stZoomTrack{width:30px;height:150px;position:relative;}
#stZoomSlider{position:absolute;left:50%;top:50%;width:150px;height:24px;margin:0;transform:translate(-50%,-50%) rotate(-90deg);-webkit-appearance:none;appearance:none;background:transparent;cursor:pointer;touch-action:none;}
#stZoomSlider::-webkit-slider-runnable-track{height:4px;border-radius:99px;background:#1a2260;}
#stZoomSlider::-moz-range-track{height:4px;border-radius:99px;background:#1a2260;}
#stZoomSlider::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;margin-top:-7px;border-radius:50%;background:#44aaff;box-shadow:0 0 8px rgba(68,170,255,.7);border:none;}
#stZoomSlider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#44aaff;box-shadow:0 0 8px rgba(68,170,255,.7);border:none;}
#stZoomSlider:focus{outline:none;}
#shopShowDismissedBtn{display:block;margin:1.2rem auto 2.2rem;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.14em;padding:.5rem 1.2rem;border-radius:10px;border:1px solid #2a2a3a;background:#0c0c14;color:#7a7a98;cursor:pointer;touch-action:manipulation;}
#shopShowDismissedBtn.on{border-color:#4a4a8a;color:#cfd2ff;}
.shop-dismissed-shown{opacity:.6;}

/* v0.2.82: "saves found from version 0.1" card on the home screen */
.legacy-card{margin-top:.9rem;display:flex;align-items:center;gap:.8rem;padding:.8rem 1rem;border-radius:14px;border:1px dashed #2f6a4a;background:linear-gradient(135deg,rgba(0,255,136,.07),rgba(0,255,136,.015));color:#7fe0aa;text-decoration:none;font-family:'Bebas Neue',Impact,sans-serif;transition:border-color .2s,background .2s,transform .12s,box-shadow .2s;-webkit-tap-highlight-color:transparent;}
.legacy-card:hover{border-style:solid;border-color:#00ff88;box-shadow:0 0 16px -4px rgba(0,255,136,.5);}
.legacy-card:active{transform:scale(.985);}
.legacy-card .lc-icon{font-size:1.7rem;line-height:1;flex-shrink:0;filter:drop-shadow(0 0 6px rgba(0,255,136,.35));}
.legacy-card .lc-text{display:flex;flex-direction:column;gap:.15rem;flex:1;min-width:0;text-align:left;}
.legacy-card .lc-title{font-size:1.1rem;letter-spacing:.1em;color:#b8ffd6;line-height:1.1;}
.legacy-card .lc-sub{font-size:.85rem;letter-spacing:.18em;color:#4f9a72;}
.legacy-card .lc-arrow{font-size:1.5rem;color:#00ff88;flex-shrink:0;transition:transform .2s;}
.legacy-card:hover .lc-arrow{transform:translateX(4px);}
#slotSubtitle.renamable{cursor:pointer;transition:color .15s;}
#slotSubtitle.renamable:hover{color:#00ff88;}
#slotSubtitle input{pointer-events:auto;}

/* v0.2.84: the BUNKER button's page lives on the LEFT (slides in from the left), the SHOP's on the right */
#bunkerView{transform:translateX(-100%);}
body.bunker-open #gameView{transform:translateX(100%);}
body.bunker-open #bunkerView{transform:translateX(0);}

/* v0.2.85: the tracker rows scroll (overflow:auto), which clipped the dots' glow into a hard line.
   Give the glow room inside the scroll box and pull the layout back with matching negative margins. */
.tiers-container{padding:14px 16px;margin:-14px -16px;box-sizing:content-box;}
.tiers-col{position:relative;z-index:2;}

/* matching game: larger header/buttons on desktop */
body.desktop-mode #matchTitle{font-size:2.4rem !important;}
body.desktop-mode #matchSubtitle{font-size:1.2rem !important;}
body.desktop-mode #matchCloseBtn{font-size:1.5rem !important;padding:.55rem 1.3rem !important;}
body.desktop-mode #matchPairsDisplay,body.desktop-mode #matchScoreDisplay{font-size:1.35rem !important;}
body.desktop-mode #matchVictoryTitle{font-size:4rem !important;}
body.desktop-mode #matchVictoryReward{font-size:1.7rem !important;}
body.desktop-mode #matchVictoryClose{font-size:1.9rem !important;padding:1rem 3.2rem !important;}

/* v0.2.85 desktop, 4 pads before the sequencer: center title + score + pads vertically (same feel as after buying the sequencer) */
body.desktop-mode:not(.seq-on):not(.pads-hidden) .app{justify-content:center;gap:clamp(1.2rem,5vh,3.5rem);}
body.desktop-mode:not(.seq-on) .pad-area{padding-bottom:1rem;}
/* v0.2.85 bunker + tips headers bigger; bunker cells shorter (grid is long and scrolls) */
#bunkerView .page-header{padding-top:1.2rem;padding-bottom:.7rem;}
#bunkerView .page-title{font-size:2.1rem !important;}
#bunkerView .page-sub{font-size:.9rem !important;letter-spacing:.1em !important;white-space:nowrap;}
#bunkerView #tipsBtn{font-size:1.15rem !important;padding:.4rem 1rem !important;border-radius:10px !important;}
.bunker-stat{padding:.35rem .55rem;}
.bunker-stat-val{font-size:1.6rem;}
.bunker-stat-label{font-size:.7rem;}
body.desktop-mode .bunker-stat-val{font-size:1.9rem !important;}
body.desktop-mode .bunker-stat-label{font-size:.75rem !important;}

/* v0.2.85 sequencer sound pill: tinted with the track color so it reads as a label, not an empty step */
.seq-snd-pill{--lc:#44ddaa;background:color-mix(in srgb,var(--lc) 16%,#0c0c10) !important;border:1px solid color-mix(in srgb,var(--lc) 55%,#111) !important;box-shadow:0 0 8px -2px color-mix(in srgb,var(--lc) 45%,transparent), inset 0 1px 0 color-mix(in srgb,var(--lc) 25%,transparent);}
.seq-snd-pill:hover{border-color:var(--lc) !important;}
.seq-pill-name{font-weight:700;}

/* v0.2.86 bunker header: BACK left, title centered, TIPS right — buttons same height + width */
#bunkerView .page-header{align-items:center;gap:.6rem;}
#bunkerView .page-title-wrap{text-align:center;min-width:0;}
#bunkerView .page-title,#bunkerView .page-sub{text-align:center;}
#bunkerView .back-btn,#bunkerView #tipsBtn{box-sizing:border-box;flex:0 0 5.6rem;width:5.6rem;height:2.7rem;display:flex;align-items:center;justify-content:center;padding:0 !important;font-size:1.15rem !important;letter-spacing:.1em;border-radius:10px !important;}
#bunkerView .bunker-hdr-right{flex:0 0 5.6rem;display:flex;justify-content:flex-end;}
#bunkerView .page-sub{font-size:.8rem !important;letter-spacing:.08em !important;}
body.desktop-mode #bunkerView .page-header::before{content:'';flex:0 0 5.6rem;}

/* v0.2.87 matching game button glows whenever a level is ready to play */
@keyframes matchGlow{0%,100%{box-shadow:0 0 5px 0 rgba(0,255,136,.25);border-color:#00cc70;color:#00e07a;}50%{box-shadow:0 0 18px 3px rgba(0,255,136,.65);border-color:#66ffbb;color:#aaffd6;}}
#matchingGameBtn.match-glow{animation:matchGlow 1.4s ease-in-out infinite;}

/* v0.2.87 bunker header: TIPS on the left, BACK on the right */
#bunkerView .bunker-hdr-right{order:1;justify-content:flex-start;}
#bunkerView .page-title-wrap{order:2;}
#bunkerView .back-btn{order:3;}
body.desktop-mode #bunkerView .page-header::before{order:3;}

/* v0.2.88 TIPS button 25% smaller (BACK unchanged) */
#bunkerView #tipsBtn{width:4.2rem;height:2.03rem;flex:0 0 4.2rem;font-size:.86rem !important;border-radius:8px !important;}
#anmName{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;}
#anmName:hover{text-shadow:0 0 10px var(--anc,#00ff88);}

/* v0.2.89 skill tree: bigger close button + gem count; matching victory popup 30% smaller */
#skillTreeGemDisplay{font-size:2.1rem !important;gap:.5rem;}
#skillTreeCloseBtn{font-size:1.15rem !important;letter-spacing:.1em;padding:.5rem 1.1rem !important;border-radius:10px !important;color:#8a8aaa !important;border-color:#2a2a5a !important;}
@media (max-width:600px){#skillTreeGemDisplay{font-size:1.7rem !important;}#skillTreeCloseBtn{font-size:1rem !important;padding:.45rem .8rem !important;}}
#matchVictory>*{zoom:.7;}

/* ── v0.2.90 Musical Toolkit: hub bubbles, music facts, key pairs ── */
.st-node.hub .st-node-circle{width:84px;height:84px;font-size:2.2rem;border-width:3px;box-shadow:0 0 26px -6px rgba(255,204,0,.55);}
.st-node.hub .st-node-label{font-size:1.08rem;color:#b89a3a;letter-spacing:.12em;}
.st-node.hub.unlocked .st-node-label{color:#3a8a6a;}
.st-node.hub.unlocked .st-node-circle{box-shadow:0 0 26px -4px rgba(68,238,187,.5);}
#stDetailFact{background:#0b0d18;border:1px solid #2a2a14;border-left:3px solid #ffcc00;border-radius:8px;padding:.55rem .7rem;text-align:left;}
.st-fact-head{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.14em;color:#ffcc00;margin-bottom:.2rem;}
.st-fact-text{font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.05em;line-height:1.4;color:#c9cbe0;}
.key-grid.key-grid-pairs{grid-template-columns:repeat(6,1fr);gap:6px;}
.key-pair{display:flex;flex-direction:column;gap:4px;}
.key-pair .key-btn{font-size:1.2rem;padding:.5rem 0;}
.key-pair .key-btn.key-min{font-size:1rem;background:#0a0a16;color:#7a7aa8;}
.key-btn.locked{opacity:.35;font-size:.9rem!important;}
.key-pair .key-btn.key-min.on{color:#00ff88;background:#04170e;}
@media (max-width:420px){.key-pair .key-btn{font-size:1rem;}.key-pair .key-btn.key-min{font-size:.85rem;}}

/* ── v0.2.90 Piano roll ── */
.roll-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 4px;}
.roll-chip{font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.08em;padding:.18rem .5rem;border-radius:5px;border:1px solid #2a2a4a;background:#0c0c18;color:#8a8ab5;cursor:pointer;touch-action:manipulation;}
.roll-chip.on{border-color:#a0a8ff;color:#d0d4ff;background:#15153a;}
.roll-chip.muted{border-color:#ff4466;color:#ff4466;}
.roll-chip.roll-layer{color:#cfd2ff;border-color:#4a52c8;}
.roll-chip.roll-back{margin-left:auto;}
.roll-snaps{display:flex;align-items:center;gap:3px;}
.roll-snap-lbl{font-family:'Bebas Neue',sans-serif;font-size:.7rem;letter-spacing:.12em;color:#55557a;margin-right:2px;}
.roll-select{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.08em;padding:.15rem .35rem;border-radius:5px;border:1px solid #2a2a4a;background:#0c0c18;color:#cfd2ff;max-width:150px;}
/* same 3 columns as a sequencer row, so roll columns sit exactly under the steps */
.seq-roll{display:grid;grid-template-columns:62px 1fr 42px;gap:4px;padding:2px 0;--rh:15px;--lc:#a0a8ff;}
body.desktop-mode .seq-roll{grid-template-columns:calc(104px*var(--ds,1)) 1fr calc(48px*var(--ds,1));}
body.roll-on #seqHScroll{max-height:min(46vh,360px);overflow-y:auto;}
body.roll-on.desktop-mode #seqHScroll{max-height:min(52vh,440px);}
.roll-keys{display:flex;flex-direction:column;position:sticky;left:0;z-index:2;background:#0a0a0a;}
.roll-key{height:var(--rh);box-sizing:border-box;border-bottom:1px solid #151515;background:#d8d8e0;color:#222;font-family:'Bebas Neue',sans-serif;font-size:.62rem;line-height:var(--rh);padding-left:4px;cursor:pointer;border-radius:0 3px 3px 0;user-select:none;touch-action:manipulation;}
.roll-key.black{background:#33333f;color:#ccc;margin-right:30%;border-bottom-color:#0a0a0a;}
.roll-key.tonic{box-shadow:inset 3px 0 0 #00ff88;}
.roll-side{position:sticky;right:0;z-index:2;background:#0a0a0a;}
.roll-area{position:relative;overflow:hidden;border-radius:4px;background:#0d0d12;touch-action:pan-x pan-y;cursor:crosshair;}
.roll-rows{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;pointer-events:none;}
.roll-row{height:var(--rh);flex:none;box-sizing:border-box;border-bottom:1px solid #16161e;}
.roll-row.black{background:#09090d;}
.roll-row.inkey{background:rgba(0,255,136,.045);}
.roll-row.black.inkey{background:rgba(0,255,136,.03);}
.roll-row.tonic{background:rgba(0,255,136,.1);}
.roll-row.c{border-bottom-color:#2a2a3a;}
/* vertical lines: every step, every beat (4 steps) and every bar (16 steps), like the sequencer */
.roll-lines{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;
  background-image:linear-gradient(to right,rgba(160,168,255,.4) 0 2px,transparent 2px),linear-gradient(to right,rgba(255,255,255,.2) 0 1px,transparent 1px),linear-gradient(to right,rgba(255,255,255,.07) 0 1px,transparent 1px);
  background-size:calc(1600% / var(--n,16)) 100%,calc(400% / var(--n,16)) 100%,calc(100% / var(--n,16)) 100%;}
.roll-notes{position:absolute;top:0;right:0;bottom:0;left:0;}
.roll-note{position:absolute;left:calc(var(--s) * 100% / var(--n,16));width:calc(var(--l) * 100% / var(--n,16) - 1px);height:calc(var(--rh) - 2px);margin-top:1px;
  background:var(--lc);border-radius:3px;box-shadow:0 0 6px -1px var(--lc);cursor:grab;touch-action:none;box-sizing:border-box;border:1px solid rgba(0,0,0,.35);}
.roll-note-h{position:absolute;right:0;top:0;bottom:0;width:7px;cursor:ew-resize;border-left:1px solid rgba(0,0,0,.3);}
.roll-ph{position:absolute;top:0;bottom:0;left:calc(var(--s,0) * 100% / var(--n,16));width:calc(100% / var(--n,16));background:rgba(160,168,255,.12);border-left:1px solid #a0a8ff;pointer-events:none;display:none;}
.roll-empty{grid-column:1 / -1;font-family:'Bebas Neue',sans-serif;letter-spacing:.08em;color:#7a7aa8;text-align:center;padding:1.2rem .6rem;font-size:.95rem;}
.clear-roll-lbl{font-family:'Bebas Neue',sans-serif;letter-spacing:.14em;color:#cc88ff;font-size:.85rem;margin:.9rem 0 .4rem;text-align:center;}
@media (max-width:600px){#rollPickModal{align-items:flex-end;}#rollPickModal .more-box{border-radius:18px 18px 0 0;width:100%;max-width:none;}#rollPickModal .fx-row{padding:.9rem .8rem;}}

/* ── v0.2.91 Effects window: groups + collapsible sections ── */
.fx-group{font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.18em;color:#6a6aa0;margin:.9rem 0 .1rem .2rem;}
.fx-list .fx-group:first-child,.fx-body .fx-group:first-child{margin-top:.3rem;}
.fx-badge.on{border-color:#3a3a8a;color:#a0a8ff;}
.fx-sec.fx-coll{padding:0;margin-top:.45rem;overflow:hidden;}
.fx-sec-head{display:flex;align-items:center;gap:.6rem;width:100%;padding:.65rem .8rem;background:transparent;border:0;cursor:pointer;touch-action:manipulation;font-family:'Bebas Neue',sans-serif;text-align:left;}
.fx-sec-head .fx-sec-title{flex:1;margin:0;}
.fx-sec-state{font-size:.75rem;letter-spacing:.12em;padding:.1rem .45rem;border-radius:5px;border:1px solid #26264a;color:#3c3c64;}
.fx-sec-state.on{border-color:#00ff88;color:#00ff88;}
.fx-sec-caret{color:#5a5a8a;transition:transform .15s;}
.fx-coll.open .fx-sec-caret{transform:rotate(180deg);}
.fx-sec-body{display:none;padding:0 .8rem .8rem;}
.fx-coll.open .fx-sec-body{display:block;}
.fx-note{font-size:.85rem;letter-spacing:.05em;color:#7a7aa8;margin-bottom:.5rem;line-height:1.35;}

/* ── v0.2.92 phones: the piano roll opens full screen ── */
body.roll-on #seqPhBar{display:none;} /* the roll has its own playhead */
body.roll-full #seqArea{position:fixed;top:0;right:0;bottom:0;left:0;z-index:210;margin:0;max-width:none;background:#06060c;
  display:flex;flex-direction:column;box-sizing:border-box;padding:calc(env(safe-area-inset-top,0px) + 8px) 8px calc(env(safe-area-inset-bottom,0px) + 8px);}
body.roll-full #seqPatternView{flex:1;min-height:0;display:flex;flex-direction:column;}
body.roll-full #seqHScroll{flex:1;min-height:0;max-height:none !important;}
body.roll-full .seq-roll{grid-template-columns:44px 1fr;gap:3px;}
body.roll-full .roll-side{display:none;}
body.roll-full .roll-key{font-size:.58rem;}
body.roll-full #pageDots{display:none !important;}
body.roll-full .toast{z-index:260;}
body.roll-full .seq-bottom-row{flex-wrap:wrap;row-gap:4px;}
/* everything that floats over the game hides while the full-screen roll is open */
body.roll-full #settingsOpenBtn,body.roll-full #soundboardBtn,body.roll-full #partyBtn,body.roll-full #padEditToggleBtn,body.roll-full #padEditBtn,
body.roll-full #arrowActivate,body.roll-full #arrowShop,body.roll-full #editModeReminder,
body.roll-full .bouncer,body.roll-full .particle{visibility:hidden !important;pointer-events:none !important;}

/* ── VOCALS (VOX button): layers of recorded takes on the song timeline ── */
body.vox-on #seqPatternView,body.vox-on #seqArrangeView,body.vox-on #seqSongView{display:none !important;}
.vox-view{display:none;flex-direction:column;gap:5px;margin-top:4px;--lh:46px;--hw:118px;}
body.vox-on .vox-view{display:flex;height:min(58vh,480px);}
.vox-bar,.vox-selbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.vox-title{font-family:'Bebas Neue',sans-serif;letter-spacing:.12em;color:#ff7ad9;font-size:.95rem;margin-right:2px;}
.roll-chip.vox-rec{border-color:#ff3355;color:#ff6680;}
.roll-chip.vox-rec.recording{background:#ff2244;color:#fff;border-color:#ff2244;animation:voxPulse 1s ease-in-out infinite;}
@keyframes voxPulse{50%{box-shadow:0 0 0 4px #ff224455;}}
.vox-selbar{padding:3px 6px;border:1px solid #2a2a48;border-radius:7px;background:#0b0b18;height:26px;flex-wrap:nowrap !important;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none;}
.vox-selbar>*{flex:0 0 auto;}
.vox-selbar.empty{border-style:dashed;border-color:#1e1e36;background:none;}
.vox-sel-hint{font-size:.72rem;color:#5a5a88;}
.vox-sel-lbl{font-family:'Bebas Neue',sans-serif;letter-spacing:.08em;color:#cfd2ff;font-size:.85rem;}
.vox-gain{display:flex;align-items:center;gap:5px;font-family:'Bebas Neue',sans-serif;font-size:.8rem;color:#8a8ab5;letter-spacing:.08em;}
.vox-gain input{width:90px;}
.vox-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;border:1px solid #1e1e36;border-radius:8px;background:#07070f;overscroll-behavior:contain;}
.vox-heads{flex:0 0 var(--hw);border-right:1px solid #1e1e36;background:#0a0a16;}
.vox-ruler-pad{height:22px;border-bottom:1px solid #1e1e36;}
.vox-lh{height:var(--lh);box-sizing:border-box;padding:3px 5px;border-bottom:1px solid #15152a;display:flex;flex-direction:column;justify-content:center;gap:3px;border-left:3px solid var(--c);}
.vox-lh.quiet{opacity:.5;}
.vox-lh-r{display:flex;align-items:center;gap:4px;min-width:0;}
.vox-arm{width:20px;height:20px;flex:0 0 20px;border-radius:50%;border:1px solid #3a3a5a;background:#10101e;color:#3a3a5a;font-size:11px;line-height:1;padding:0;cursor:pointer;touch-action:manipulation;}
.vox-lh.armed .vox-arm{color:#ff2244;border-color:#ff2244;background:#2a0812;}
.vox-nm{flex:1;min-width:0;text-align:left;background:none;border:none;color:var(--c);font-family:'Bebas Neue',sans-serif;letter-spacing:.08em;font-size:.85rem;padding:0;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.vox-lb{font-family:'Bebas Neue',sans-serif;font-size:.72rem;letter-spacing:.06em;min-width:22px;height:18px;padding:0 4px;border-radius:4px;border:1px solid #2a2a4a;background:#0c0c18;color:#7a7aa8;cursor:pointer;touch-action:manipulation;}
.vox-lb.m-on{border-color:#ff4466;color:#ff4466;}.vox-lb.s-on{border-color:#ffcc00;color:#ffcc00;}.vox-lb.fx-on{border-color:#a0a8ff;color:#d0d4ff;background:#15153a;}
.vox-tl{flex:1;min-width:0;overflow-x:auto;overflow-y:hidden;position:relative;-webkit-overflow-scrolling:touch;}
.vox-inner{position:relative;min-height:100%;}
.vox-ruler{height:22px;position:relative;border-bottom:1px solid #1e1e36;cursor:pointer;background:#0a0a16;}
.vox-bar-n{position:absolute;top:4px;padding-left:3px;font:10px/1 ui-monospace,Menlo,monospace;color:#5a5a88;border-left:1px solid #2a2a48;height:18px;box-sizing:border-box;pointer-events:none;}
.vox-lanes{position:relative;background-repeat:repeat;}
.vox-lane{height:var(--lh);box-sizing:border-box;border-bottom:1px solid #15152a;position:relative;}
.vox-lane.armed{background:linear-gradient(90deg,#ff224410,transparent 60%);}
.vox-clip{position:absolute;top:3px;height:calc(var(--lh) - 7px);box-sizing:border-box;border-radius:6px;border:1px solid var(--c);
  background:#161628;background:color-mix(in srgb,var(--c) 16%,#0a0a16);overflow:hidden;cursor:grab;touch-action:pan-x pan-y;user-select:none;-webkit-user-select:none;}
.vox-clip canvas{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;}
.vox-clip.sel{box-shadow:0 0 0 2px #fff;touch-action:none;z-index:2;}
.vox-clip.missing{border-style:dashed;background:repeating-linear-gradient(45deg,#2a0a14,#2a0a14 6px,#14060c 6px,#14060c 12px);}
.vox-clip.live{border-color:#ff2244;background:#ff224430;pointer-events:none;}
.vox-clip-lbl{position:absolute;left:5px;top:2px;font:9px/1 ui-monospace,Menlo,monospace;color:#fff;opacity:.75;pointer-events:none;white-space:nowrap;text-shadow:0 1px 2px #000;}
.vox-h{position:absolute;top:0;bottom:0;width:9px;cursor:ew-resize;z-index:1;}
.vox-h.l{left:0;}.vox-h.r{right:0;}
.vox-clip.sel .vox-h{background:#ffffff22;}
@media (pointer:coarse){.vox-clip.sel .vox-h{width:16px;}}
.vox-ph{position:absolute;top:0;bottom:0;left:0;width:2px;background:#ff3355;pointer-events:none;z-index:4;display:none;will-change:transform;}
.vox-flag{position:absolute;top:0;bottom:0;width:0;border-left:2px solid #22dd88;pointer-events:none;z-index:3;}
.vox-flag::before{content:'';position:absolute;top:0;left:0;border-left:10px solid #22dd88;border-bottom:7px solid transparent;}
.vox-end{position:absolute;top:0;bottom:0;width:0;border-left:2px dashed #ffcc0088;pointer-events:none;z-index:3;}
.vox-end::after{content:attr(data-lbl);position:absolute;top:5px;left:3px;font:9px/1 ui-monospace,Menlo,monospace;color:#ffcc00aa;}
.vox-past{position:absolute;top:22px;bottom:0;right:0;background:#00000066;pointer-events:none;z-index:1;}
.vox-foot{display:flex;align-items:center;gap:8px;min-height:18px;}
.vox-meter{flex:0 0 70px;height:6px;border-radius:3px;background:#15152a;overflow:hidden;}
.vox-meter-fill{height:100%;width:0;background:#22dd88;transition:width .05s linear;}
.vox-meter-fill.hot{background:#ff3355;}
.vox-foot-txt{font-size:.72rem;color:#7a7aa8;line-height:1.3;}
.vox-view.recording .vox-scroll{border-color:#ff224488;}
.vox-mrow{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:6px 0;}
.vox-mrow .more-done{flex:1;}
.vox-name-in{width:100%;box-sizing:border-box;padding:.4rem .6rem;border-radius:7px;border:1px solid #2a2a5a;background:#0a0a1a;color:#cfd2ff;font:inherit;font-size:16px;margin:4px 0 10px;}
.vox-set .fx-group{margin-top:12px;}
.vox-set select.roll-select{max-width:100%;}
/* phones: VOX opens full screen, like the piano roll */
body.vox-full #seqArea{position:fixed;top:0;right:0;bottom:0;left:0;z-index:210;margin:0;max-width:none;background:#06060c;
  display:flex;flex-direction:column;box-sizing:border-box;padding:calc(env(safe-area-inset-top,0px) + 8px) 8px calc(env(safe-area-inset-bottom,0px) + 8px);}
body.vox-full .vox-view{flex:1;min-height:0;height:auto;}
@media (max-width:700px){.vox-view{--lh:50px;--hw:92px;}}
body.vox-full #seqArea{max-width:none;width:auto;}
body.vox-full #pageDots{display:none !important;}
body.vox-full .toast{z-index:260;}
body.vox-full #settingsOpenBtn,body.vox-full #soundboardBtn,body.vox-full #partyBtn,body.vox-full #padEditToggleBtn,body.vox-full #padEditBtn,
body.vox-full #arrowActivate,body.vox-full #arrowShop,body.vox-full #editModeReminder,
body.vox-full .bouncer,body.vox-full .particle{visibility:hidden !important;pointer-events:none !important;}
body.vox-full .vox-lb{min-width:24px;height:20px;}
.vox-loop{position:absolute;top:0;bottom:0;background:#22dd8812;border-left:1px solid #22dd8855;border-right:1px solid #22dd8855;pointer-events:none;z-index:0;}
.vox-loop::before{content:'';position:absolute;left:0;right:0;top:0;height:22px;background:#22dd8833;}
.vox-fade-v{font:9px/1 ui-monospace,Menlo,monospace;color:#8a8ab5;min-width:36px;}
.vox-gain input{width:70px;}
.roll-key.midi-on{background:#66ffaa !important;}
.roll-chip.midi-rec{border-color:#ff3355;color:#ff6680;}
.roll-chip.midi-rec.on{background:#ff2244;color:#fff;}
/* ── vocal chops ── */
.chop-box{max-width:min(640px,96vw);}
.chop-wave{width:100%;height:120px;border-radius:8px;border:1px solid #2a2a48;display:block;margin:6px 0;touch-action:manipulation;cursor:crosshair;}
.chop-slices{display:flex;flex-wrap:wrap;gap:5px;margin:4px 0;}
.chop-list{display:flex;flex-direction:column;gap:6px;max-height:min(60vh,520px);overflow-y:auto;margin:6px 0;}
.chop-row{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:5px 6px;border-radius:8px;border:1px solid #1e1e36;border-left:3px solid var(--c);background:#0a0a16;}
.chop-name{width:96px;min-width:0;background:#0c0c18;border:1px solid #2a2a4a;border-radius:5px;color:var(--c);font-family:'Bebas Neue',sans-serif;letter-spacing:.08em;font-size:.9rem;padding:.15rem .35rem;}
.chop-len,.chop-semi{font:10px/1 ui-monospace,Menlo,monospace;color:#8a8ab5;min-width:22px;text-align:center;}
.chop-pad{max-width:96px;}
@media (pointer:coarse){.chop-name{font-size:16px;}}
/* ── automation ── */
body.auto-on #seqPatternView,body.auto-on #seqArrangeView,body.auto-on #seqSongView{display:none !important;}
body.auto-on .auto-view{display:flex;}
body.auto-on .vox-view:not(.auto-view){display:none;}
.auto-title{color:#ffcc00;}
.auto-scroll{flex:1;min-height:0;display:flex;border:1px solid #1e1e36;border-radius:8px;background:#07070f;overflow:hidden;}
.auto-axis{flex:0 0 52px;position:relative;border-right:1px solid #1e1e36;background:#0a0a16;font:9px/1 ui-monospace,Menlo,monospace;color:#7a7aa8;}
.auto-ax-top{position:absolute;top:28px;left:4px;right:2px;}.auto-ax-bot{position:absolute;bottom:8px;left:4px;right:2px;}
.auto-tl{height:100%;}
.auto-tl .vox-inner{height:100%;display:flex;flex-direction:column;}
.auto-area{position:relative;flex:1;min-height:140px;touch-action:pan-x;cursor:crosshair;}
.auto-svg{position:absolute;left:0;top:0;overflow:visible;}
.auto-line{fill:none;stroke-width:2.5;}
.auto-fill{opacity:.12;}
.auto-def{stroke:#3a3a5a;stroke-dasharray:4 4;stroke-width:1.5;}
.auto-pt{stroke:#fff;stroke-width:1.5;cursor:grab;touch-action:none;}
body.vox-on .auto-view{display:none !important;}
.chop-pitch{display:inline-flex;align-items:center;gap:3px;white-space:nowrap;}

/* bunker header: the line under BUNKER stays between TIPS and BACK (wraps between its two parts if it has to) */
#bunkerView .page-sub{white-space:normal !important;overflow-wrap:normal;font-size:clamp(.66rem,3.4vw,.8rem) !important;line-height:1.25;}
#bunkerView .page-sub span{white-space:nowrap;}
#bunkerView .page-title-wrap{flex:1 1 0;min-width:0;}
#bunkerView .page-title{font-size:clamp(1.5rem,9vw,2.1rem) !important;}
#alienNameRandom{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.08em;padding:.38rem .65rem;border-radius:8px;border:1px solid var(--anc,#00ff88);background:transparent;color:var(--anc,#00ff88);cursor:pointer;touch-action:manipulation;white-space:nowrap;}
#alienNameRandom:active{transform:scale(.96);}

/* ══════════════════════════════════════════════
   SIDEWAYS PHONE (body.phone-land) — slim header, full-height sequencer, one row of pads
   ══════════════════════════════════════════════ */
body.phone-land #gameView .app{justify-content:flex-start;gap:4px;padding:4px max(10px,env(safe-area-inset-right,0px)) max(4px,env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));overflow:hidden;}
body.phone-land #gameView .header{flex:0 0 auto;height:30px;}
body.phone-land #gameView .header .game-title,body.phone-land #gameView .header .subtitle{display:none !important;}
body.phone-land .btn-left,body.phone-land .btn-right{top:50% !important;}
body.phone-land .nav-btn{font-size:.68rem;padding:.22rem .5rem;}
/* score + points/sec sit in the middle of the header */
body.phone-land #scoreRow{position:absolute;top:4px;left:50%;transform:translateX(-50%);height:30px;display:flex;align-items:center;gap:8px;z-index:4;margin:0 !important;width:auto;max-width:44vw;}
body.phone-land #scoreRow .score-section{display:flex;align-items:baseline;gap:7px;margin:0 !important;white-space:nowrap;}
body.phone-land .score{font-size:1.45rem !important;line-height:1;}
body.phone-land #scoreSubEl,body.phone-land #multEl,body.phone-land #autoInfo,body.phone-land #energyMeter,body.phone-land #alienMultInfo{display:none !important;}
.land-rate{display:none;font-family:'Bebas Neue',sans-serif;font-size:.72rem;letter-spacing:.08em;color:#5fae85;}
body.phone-land .land-rate{display:inline;}
/* no trackers sideways — except the one-time ACTIVATE button, so it can still be bought */
body.phone-land #tiersWrap{display:none !important;}
body.phone-land.drum-overlay #tiersWrap{display:block !important;margin:0 !important;}
body.phone-land.drum-overlay #tiersWrap .tiers-col-label,body.phone-land.drum-overlay #tiersContainer,body.phone-land.drum-overlay #tiersDivider,body.phone-land.drum-overlay #autoTiersCol{display:none !important;}
body.phone-land.drum-overlay #tiersWrap > div:first-child{min-height:0 !important;margin-top:0 !important;}
body.phone-land #drumTrackerActivateBtn{transform:none !important;animation:none !important;font-size:.6rem !important;padding:.2rem .55rem !important;}
body.phone-land #soundboardBtn{display:none !important;}
body.phone-land #drumTrackerOverlay{position:static !important;background:none !important;-webkit-backdrop-filter:none !important;backdrop-filter:none !important;}
body.phone-land #arrowActivate,body.phone-land #arrowShop{display:none !important;}
/* utility buttons move up into the header row (JS lines them up next to BUNKER / SHOP) */
body.phone-land #settingsOpenBtn,body.phone-land #soundboardBtn,body.phone-land #padEditToggleBtn,body.phone-land #partyBtn{bottom:auto !important;top:calc(4px + env(safe-area-inset-top,0px));font-size:.62rem !important;padding:.24rem .5rem !important;animation:none;border-width:1px;}
body.phone-land #partyBtn{box-shadow:0 0 8px -2px #ff00cc;}
/* sequencer takes all the room between the header and the pads */
body.phone-land.seq-on .seq-area.visible{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;margin:0 !important;scrollbar-width:none;}
body.phone-land .seq-area::-webkit-scrollbar{display:none;}
body.phone-land .seq-area-header{position:sticky;top:0;z-index:4;background:#0a0a0a;}
body.phone-land .seq-step{height:var(--seq-step-h,20px);}
body.phone-land .pad-area{flex:0 0 auto;padding:0 !important;margin:0 !important;max-width:none !important;}
body.phone-land:not(.seq-on) .pad-area{flex:1 1 0;min-height:0;display:flex;flex-direction:column;justify-content:flex-end;}
body.phone-land .pad-grid{grid-template-columns:repeat(var(--np,1),minmax(0,1fr)) !important;grid-template-rows:none !important;grid-auto-rows:1fr;max-width:none !important;margin:0 auto !important;}
body.phone-land .pad{aspect-ratio:auto !important;min-height:0;padding:.3rem .45rem;}

/* ══════════════════════════════════════════════
   DESKTOP DAW MODE (body.daw-wide) — sequencer unlocked and the side panels closed (or FILL chosen)
   ══════════════════════════════════════════════ */
body.daw-wide #gameView .app{justify-content:flex-start;gap:.5rem;padding-top:.7rem;padding-bottom:4.4rem;}
body.daw-wide .header{flex:0 0 auto;}
body.daw-wide .score{font-size:clamp(2rem,4.2vh,3rem) !important;}
body.daw-wide #scoreRow{flex:0 0 auto;margin-top:0 !important;}
body.daw-wide .tiers-container{max-height:13vh;}
body.daw-wide.seq-on .seq-area.visible{flex:1 1 0;min-height:0;overflow-y:auto;overscroll-behavior:contain;margin-top:0 !important;scrollbar-width:thin;scrollbar-color:#2a2a4a transparent;}
body.daw-wide .seq-area-header{position:sticky;top:0;z-index:4;background:#0a0a0a;}
body.daw-wide .seq-step{height:var(--seq-step-h,18px);}
body.daw-wide .seq-arr-grid{max-height:none;}
body.daw-wide .pad-area,body.daw-wide.seq-on .pad-area{flex:0 0 auto;max-width:none !important;padding-bottom:0 !important;margin-top:0 !important;}
body.daw-wide .pad-grid[data-pads]{grid-template-columns:repeat(var(--np,1),minmax(0,1fr)) !important;grid-template-rows:none !important;grid-auto-rows:clamp(64px,12vh,120px);max-width:calc(var(--np,1) * 230px) !important;margin:0 auto !important;}
body.daw-wide .pad{aspect-ratio:auto !important;}
/* opt-in FILL button in an empty side column */
.daw-fill{position:fixed;top:12px;z-index:52;display:none;font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.12em;padding:.5rem .9rem;border-radius:50px;border:1px solid #2a2a4a;background:#0d0d1c;color:#a0a8ff;cursor:pointer;opacity:.75;transition:opacity .15s,border-color .15s,box-shadow .15s;overflow:hidden;-webkit-user-select:none;user-select:none;}
#dawFillBtn{left:12px;}#dawFillBtnR{right:12px;}
.daw-fill i{position:absolute;left:0;top:0;bottom:0;width:calc(var(--hp,0)*100%);background:rgba(160,168,255,.28);pointer-events:none;}
.daw-fill span{position:relative;}
.daw-fill:hover{opacity:1;border-color:#a0a8ff;box-shadow:0 0 14px -3px rgba(160,168,255,.6);}
.daw-fill.show{display:block;}
/* sideways phone: the bunker scrolls as one page instead of squeezing the alien grid into a sliver */
body.phone-land .bunker-body{overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding-bottom:1.5rem;}
body.phone-land .bunker-grid-wrap{flex:none;overflow:visible;}
body.phone-land .bunker-grid{max-width:480px;margin:0 auto;}

/* ══════════════════════════════════════════════
   SOLAR-SYSTEM SKILL TREE — orbit ring, docks, 3D view
   ══════════════════════════════════════════════ */
#skillTreeInner{transform-style:preserve-3d;}
#skillTreeGround{position:absolute;left:0;top:0;will-change:transform;pointer-events:none;}
.st-orbit{position:absolute;border-radius:50%;border:2px dashed rgba(120,150,255,.28);box-shadow:0 0 30px -6px rgba(90,130,255,.35),inset 0 0 30px -6px rgba(90,130,255,.25);pointer-events:none;animation:stOrbitSpin 240s linear infinite;}
@keyframes stOrbitSpin{to{transform:rotate(360deg);}}
.st-dock{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid #335;background:#05060c;pointer-events:none;box-shadow:0 0 10px -2px currentColor;}
#stViewToggle{position:absolute;left:max(14px,env(safe-area-inset-left,0px));bottom:max(14px,env(safe-area-inset-bottom,0px));z-index:6;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.12em;padding:.45rem .9rem;border-radius:50px;border:1px solid #2a2a5a;background:rgba(8,8,20,.85);color:#a0a8ff;cursor:pointer;touch-action:manipulation;box-shadow:0 0 14px -4px rgba(160,168,255,.5);}
#stViewToggle:hover{border-color:#a0a8ff;color:#cfd3ff;}
/* every node is exactly as wide as its bubble, so the bubble sits dead on its map spot; the name hangs centred underneath */
/* (the node box is 124px wide and centred on the spot, so a 120px name never sticks out of it: anything that overflows a node to the
   left gets cut off once the node is its own 3D layer. Only the bubble, name and price catch taps, so the map still drags between them.) */
.st-node{--nx:35px;--pad:0px;width:124px;box-sizing:content-box;padding:var(--pad);margin:calc(var(--pad) * -1) 0 0 calc((var(--pad) + var(--nx)) * -1);pointer-events:none;}
.st-node.center{--nx:26px;}
.st-node.hub{--nx:20px;}
.st-node > *{pointer-events:auto;}
.st-node-cost{white-space:nowrap;}
/* 3D: nodes and labels stand up off the disc and face the camera (--st-bb = the camera's turn, undone; set by js/35) */
#skillTreeModal.st-3d .st-node,#skillTreeModal.st-3d .st-branch-label{rotate:x -52deg;rotate:var(--st-bb,1 0 0 -52deg);}
#skillTreeModal.st-3d .st-node{transform-origin:50% 27px;}
#skillTreeModal.st-3d .st-node.center{transform-origin:50% 36px;}
#skillTreeModal.st-3d .st-node.hub{transform-origin:50% 42px;}
#skillTreeModal.st-3d .st-node.st-body{transform-origin:50% 57px;}
#skillTreeModal.st-3d .st-node.st-body.center{transform-origin:50% 66px;}
#skillTreeModal.st-3d #skillTreeCanvas{background:radial-gradient(ellipse at 22% 18%,rgba(120,60,200,.16) 0%,rgba(120,60,200,0) 42%),radial-gradient(ellipse at 84% 30%,rgba(30,150,170,.13) 0%,rgba(30,150,170,0) 40%),radial-gradient(ellipse at 50% 72%,#0a1030 0%,#030510 62%);}
#skillTreeModal.st-3d .st-line{height:3px;}
/* sky: star layers that drift as you fly (hidden in the flat map), and a haze over the far edge of the disc */
.st-sky,.st-haze{display:none;position:absolute;pointer-events:none;}
#skillTreeModal.st-3d .st-sky,#skillTreeModal.st-3d .st-haze{display:block;}
.st-sky{top:0;left:0;right:0;bottom:0;overflow:hidden;}
.st-sky i{position:absolute;left:-256px;top:-256px;right:0;bottom:0;background-repeat:repeat;background-size:256px 256px;will-change:transform;}
.st-haze{left:0;right:0;top:0;height:24%;z-index:2;background:linear-gradient(#030510 0%,rgba(3,5,16,.82) 30%,rgba(3,5,16,0) 100%);}
.st-ground{fill:none;stroke:rgba(120,150,255,.13);stroke-width:2;stroke-dasharray:3 14;}
.st-ground.far{stroke:rgba(120,150,255,.08);}
/* compass: the needle shows where north is; tap = face north */
#stCompass{display:none;position:absolute;left:max(14px,env(safe-area-inset-left,0px));bottom:calc(max(14px,env(safe-area-inset-bottom,0px)) + 3.1rem);z-index:6;width:2.9rem;height:2.9rem;border-radius:50%;border:1px solid #2a2a5a;background:rgba(8,8,20,.85);cursor:pointer;touch-action:manipulation;padding:0;box-shadow:0 0 14px -4px rgba(160,168,255,.5);transition:opacity .3s;}
#skillTreeModal.st-3d #stCompass{display:block;}
#stCompass.off{opacity:.45;}
#stCompass .stc-needle{position:absolute;left:50%;top:50%;width:0;height:0;}
#stCompass .stc-needle::before{content:'';position:absolute;left:-5px;top:-17px;border:5px solid transparent;border-bottom:15px solid #ff5a6a;border-top:0;}
#stCompass .stc-needle::after{content:'';position:absolute;left:-5px;top:2px;border:5px solid transparent;border-top:15px solid #5a6088;border-bottom:0;}
#stCompass .stc-n{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);text-align:center;font-family:'Bebas Neue',sans-serif;font-size:.8rem;line-height:1;color:#e8ecff;text-shadow:0 0 4px #000,0 0 4px #000;pointer-events:none;}
/* ── bodies: the core is a star, Quad Suns are suns, planets and continents are lit spheres ──
   (--pad = clear room round the bubble so its glow isn't cut to a square when the node becomes its own 3D layer) */
.st-node.st-body{--pad:30px;}
.st-node[data-sun]{z-index:3;}
.st-node.st-sun .st-node-circle,.st-node.st-star .st-node-circle,.st-node.st-planet .st-node-circle{border:0;font-size:0;}
.st-node.st-body.available .st-node-circle{opacity:.5;animation:none;}
/* suns */
.st-node.st-sun .st-node-circle{background:radial-gradient(circle at 38% 32%,#fffdf2 0%,var(--cl) 20%,var(--c) 58%,var(--cd) 100%);box-shadow:0 0 12px 1px var(--c),0 0 26px 8px var(--cg);}
.st-node.st-sun.unlocked .st-node-circle::before,.st-node.st-star.unlocked .st-node-circle::before{content:'';position:absolute;top:-22px;left:-22px;right:-22px;bottom:-22px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,0) 50%,var(--cg) 58%,rgba(255,255,255,0) 71%);animation:stCorona 3.4s ease-in-out infinite;pointer-events:none;}
@keyframes stCorona{0%,100%{transform:scale(.9);opacity:.55;}50%{transform:scale(1.08);opacity:1;}}
/* the Tucana Core: a white-blue star with a four-point flare */
.st-node.st-star{--cg:rgba(120,190,255,.38);}
.st-node.st-star .st-node-circle{background:radial-gradient(circle at 40% 34%,#ffffff 0%,#dff1ff 24%,#6fb8ff 60%,#1a4a9a 100%);box-shadow:0 0 14px 2px #7fc4ff,0 0 28px 10px rgba(80,160,255,.35);}
.st-node.st-star .st-node-circle::after{content:'';position:absolute;left:-26px;right:-26px;top:50%;height:2px;margin-top:-1px;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(220,240,255,.9) 50%,rgba(255,255,255,0));box-shadow:none;pointer-events:none;}
.st-node.st-star .st-node-check{z-index:1;}
/* planets: sunlit top-left, night side bottom-right, a thin glowing atmosphere; some have cloud bands or a ring */
.st-node.st-planet .st-node-circle{transform:scale(1.26);background:radial-gradient(circle at 31% 27%,rgba(255,255,255,.5) 0%,rgba(255,255,255,0) 26%),radial-gradient(circle at 34% 30%,var(--lite) 0%,var(--base) 46%,var(--dark) 92%);box-shadow:0 0 0 1.5px var(--atm),0 0 14px 1px var(--atm);}
.st-node.st-planet.banded .st-node-circle{background:radial-gradient(circle at 31% 27%,rgba(255,255,255,.5) 0%,rgba(255,255,255,0) 26%),radial-gradient(circle at 30% 26%,rgba(0,0,0,0) 30%,var(--dark) 96%),repeating-linear-gradient(var(--band),var(--b1) 0,var(--b1) 6px,var(--b2) 9px,var(--b1) 13px),linear-gradient(var(--lite),var(--base));}
.st-node.st-planet .st-node-label{margin-top:12px;}
.st-node.st-planet.ringed .st-node-circle::before{content:'';position:absolute;left:-38%;right:-38%;top:34%;bottom:34%;border-radius:50%;border:3px solid var(--ringc);transform:rotate(-16deg);pointer-events:none;}
.st-node.st-planet.ringed .st-node-circle::after{content:'';position:absolute;left:0;right:0;top:0;height:50%;border-radius:999px 999px 0 0;background:inherit;background-size:100% 200%;background-position:top;transform:rotate(-16deg);transform-origin:50% 100%;pointer-events:none;}
.st-node.st-planet .st-node-check{z-index:1;}
/* continents: small worlds in their planet's colours (they keep their icon) */
.st-node.st-world .st-node-circle{border-color:var(--atm);background:radial-gradient(circle at 32% 27%,var(--lite) 0%,var(--base) 55%,var(--dark) 100%);}
.st-node.st-world.unlocked .st-node-circle{border-color:#44eebb;}
/* phone/tablet: the ACTIVATE hint arrow belongs to the main screen — never float it over the shop or bunker */
body.store-open:not(.desktop-mode) #arrowActivate,body.bunker-open:not(.desktop-mode) #arrowActivate{display:none !important;}

/* ══ ALIEN PARTY STYLES ══ */
#partyStyleBtn{position:fixed;z-index:53;display:none;font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.1em;padding:.32rem .75rem;border-radius:50px;border:1px solid #ff66ff;background:rgba(26,0,26,.9);color:#ff99ff;cursor:pointer;touch-action:manipulation;white-space:nowrap;box-shadow:0 0 12px -3px rgba(255,0,204,.6);}
#partyStyleBtn.show{display:block;}
#partyStyleBtn:active{transform:scale(.96);}
body.phone-land #partyStyleBtn{font-size:.62rem;padding:.2rem .5rem;}
body.store-open:not(.desktop-mode) #partyStyleBtn,body.bunker-open:not(.desktop-mode) #partyStyleBtn{display:none !important;}
.party-eqbar{position:absolute;transform-origin:50% 100%;border-radius:4px 4px 1px 1px;pointer-events:none;background:var(--c);background:linear-gradient(to top,color-mix(in srgb,var(--c) 15%,transparent),var(--c));box-shadow:0 0 10px -2px var(--c);opacity:.55;will-change:transform;}

/* ══════════════════════════════════════════════
   WORM WHACK
   ══════════════════════════════════════════════ */
#wormGameBtn{width:100%;margin-top:.35rem;font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.15em;padding:.55rem .8rem;border-radius:12px;border:1px solid #6a3a20;background:#140904;color:#ff9966;cursor:pointer;touch-action:manipulation;transition:all .2s;box-shadow:0 0 14px -6px #ff6644;}
#wormGameBtn:hover{border-color:#ff9966;box-shadow:0 0 18px -4px #ff6644;}
#wwOverlay,#phOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9500;display:none;flex-direction:column;background:#05060c;color:#e8e8f0;font-family:'Bebas Neue',sans-serif;user-select:none;-webkit-user-select:none;touch-action:none;padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0);}
#wwOverlay.open,#phOverlay.open{display:flex;}
.ww-hud{flex:0 0 auto;display:flex;align-items:center;gap:.9rem;padding:.4rem .7rem;border-bottom:1px solid #1a1a2a;position:relative;background:#080810;}
.ww-title{flex:1;min-width:0;font-size:1.05rem;letter-spacing:.12em;color:#ff9966;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ww-stat{display:flex;flex-direction:column;align-items:center;line-height:1;}
.ww-stat span{font-size:1.2rem;letter-spacing:.05em;}
.ww-stat small{font-size:.55rem;letter-spacing:.2em;color:#667;}
.ww-score span{color:#e8ff00;min-width:4.5ch;text-align:center;}
.ww-prog{position:absolute;left:0;right:0;bottom:-1px;height:2px;background:transparent;}
.ww-prog div{height:100%;width:0;background:linear-gradient(90deg,#ff6644,#ffd166);}
.ww-x{flex:0 0 auto;width:34px;height:34px;border-radius:10px;border:1px solid #2a2a4a;background:#0d0d1c;color:#a0a8ff;font-size:1rem;cursor:pointer;touch-action:manipulation;}
.ww-arena{flex:1 1 auto;min-height:0;position:relative;overflow:hidden;}
#wwCanvas{display:block;}
.ww-pads{flex:0 0 auto;display:grid;gap:8px;padding:8px;height:clamp(130px,30vh,250px);background:#07070d;border-top:1px solid #1a1a2a;}
.ww-pads.one-row{height:clamp(70px,24vh,130px);}
.ww-pad{position:relative;border-radius:14px;border:2px solid var(--c);background:#0b0b14;background:color-mix(in srgb,var(--c) 14%,#0b0b14);box-shadow:inset 0 0 22px -8px var(--c),0 0 10px -6px var(--c);color:#fff;font-family:'Bebas Neue',sans-serif;cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;transition:transform .06s;}
.ww-pad .k{font-size:1.15rem;color:var(--c);letter-spacing:.08em;}
.ww-pad .nm{font-size:.62rem;letter-spacing:.18em;color:#99a;}
.ww-pad.lit{animation:wwPadLit .16s ease-out;}
@keyframes wwPadLit{0%{transform:scale(.94);background:var(--c);}100%{transform:scale(1);}}
.ww-panel{position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;display:none;align-items:center;justify-content:center;background:rgba(3,4,10,.86);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);padding:12px;overflow-y:auto;touch-action:pan-y;}
.ww-panel.open{display:flex;}
.ww-panel-inner{width:100%;max-width:640px;max-height:100%;overflow-y:auto;background:#0a0a14;border:1px solid #2a2a4a;border-radius:18px;padding:16px;box-shadow:0 0 40px -10px #ff6644;}
.ww-sel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.ww-big{font-size:2rem;letter-spacing:.1em;color:#ff9966;line-height:1;}
.ww-big.win{color:#00ff99;}.ww-big.lose{color:#ff8866;}
.ww-sub{font-family:system-ui,sans-serif;font-size:.78rem;color:#889;margin-top:4px;}
.ww-sel-bonus{margin:10px 0;font-size:.9rem;letter-spacing:.1em;color:#aab;}
.ww-sel-bonus b{color:#e8ff00;}
.ww-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;}
@media (min-width:560px){.ww-grid{grid-template-columns:repeat(10,1fr);}}
.ww-tile{aspect-ratio:1;border-radius:10px;border:1px solid #2a2a4a;background:#0e0e1a;color:#e8e8f0;font-family:'Bebas Neue',sans-serif;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;cursor:pointer;touch-action:manipulation;padding:0;}
.ww-tile .n{font-size:1.15rem;line-height:1;}
.ww-tile .st{font-size:.62rem;color:#ffd166;letter-spacing:0;line-height:1;}
.ww-tile .st i{font-style:normal;color:#333348;}
.ww-tile.boss{border-color:#7a2a3a;background:#1a0a10;}
.ww-tile.sel{border-color:#ff9966;box-shadow:0 0 12px -3px #ff6644;}
.ww-tile.locked{opacity:.4;}
.ww-detail{margin-top:12px;padding:12px;border-radius:12px;background:#07070f;border:1px solid #1e1e34;text-align:center;}
.ww-d-name{font-size:1.35rem;letter-spacing:.08em;color:#fff;}
.ww-d-meta{font-family:system-ui,sans-serif;font-size:.78rem;color:#99a;margin-top:4px;}
.ww-d-meta b{color:#e8ff00;}
.ww-d-new{margin-top:6px;font-size:.95rem;letter-spacing:.1em;color:#ffd166;}
.ww-play,.ww-btn{margin-top:10px;font-family:'Bebas Neue',sans-serif;font-size:1.2rem;letter-spacing:.18em;padding:.55rem 1.6rem;border-radius:12px;border:1px solid #ff9966;background:#2a1208;color:#ffbb88;cursor:pointer;touch-action:manipulation;}
.ww-btn{border-color:#2a2a4a;background:#0e0e1a;color:#a0a8ff;font-size:1rem;padding:.5rem 1.1rem;}
.ww-btn.ww-play{border-color:#ff9966;background:#2a1208;color:#ffbb88;}
.ww-res{text-align:center;max-width:460px;}
.ww-stars{font-size:2.6rem;letter-spacing:.15em;margin:6px 0;}
.ww-stars span{color:#2a2a3a;}.ww-stars span.on{color:#ffd166;text-shadow:0 0 14px #ffaa00;}
.ww-res-acc{font-size:2.4rem;color:#fff;line-height:1;}
.ww-res-acc small{display:block;font-size:.7rem;letter-spacing:.2em;color:#889;margin-top:2px;}
.ww-res-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin:12px 0;}
.ww-res-grid div{background:#07070f;border:1px solid #1e1e34;border-radius:10px;padding:6px;display:flex;flex-direction:column;}
.ww-res-grid b{font-size:1.25rem;font-weight:normal;}
.ww-res-grid small{font-size:.55rem;letter-spacing:.2em;color:#778;}
.ww-reward{font-size:1.05rem;letter-spacing:.1em;color:#e8ff00;margin:6px 0;}
.ww-res-btns{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;}

/* PLANET HOP */
#planetHopBtn{width:100%;margin-top:.35rem;font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.15em;padding:.55rem .8rem;border-radius:12px;border:1px solid #1f5a6a;background:#03121a;color:#7fe8ff;cursor:pointer;touch-action:manipulation;box-shadow:0 0 14px -6px #00e5ff;}
#planetHopBtn:hover{border-color:#7fe8ff;box-shadow:0 0 18px -4px #00e5ff;}
.ph-pads{grid-template-columns:1fr 1fr;grid-template-rows:1fr;height:clamp(96px,22vh,170px);}
.ph-pads .ww-pad .k{font-size:1.5rem;}
.ph-pads .ww-pad .nm{font-size:.6rem;text-align:center;padding:0 6px;}
@media (max-height:520px) and (orientation:landscape){.ph-pads{height:clamp(64px,22vh,110px);}}
.ph-grid{grid-template-columns:repeat(5,1fr) !important;}

/* minigame SYNC calibration */
#mgSync{position:fixed;z-index:9800;}
.mg-tap{display:block;width:100%;height:clamp(140px,32vh,240px);margin:6px 0;border-radius:18px;border:2px solid #e8ff00;background:#141600;color:#e8ff00;font-family:'Bebas Neue',sans-serif;font-size:2.4rem;letter-spacing:.12em;cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent;transition:transform .05s;}
.mg-off{min-width:5.5em;align-self:center;font-size:1.3rem;color:#fff;margin-top:10px;}
.mg-sync-btn{margin-top:0;padding:.35rem .7rem;font-size:.85rem;border-color:#5a5a10;color:#e8ff00;background:#141600;}

/* minigame tabs + YOUR BEATS picker */
.mg-tabs{display:flex;gap:6px;margin:10px 0 2px;}
.mg-tab{flex:1;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.15em;padding:.45rem;border-radius:10px;border:1px solid #2a2a4a;background:#0e0e1a;color:#8890b8;cursor:pointer;touch-action:manipulation;}
.mg-tab.sel{border-color:#ff9966;color:#ffbb88;background:#2a1208;}
#phSelect .mg-tab.sel{border-color:#7fe8ff;color:#7fe8ff;background:#071420;}
.mg-src-list{display:flex;flex-direction:column;gap:6px;max-height:min(42vh,320px);overflow-y:auto;text-align:left;}
.mg-src{display:flex;align-items:center;gap:10px;padding:.5rem .7rem;border-radius:10px;border:1px solid #23233a;border-left:4px solid var(--c);background:#0b0b16;color:#e8e8f0;cursor:pointer;touch-action:manipulation;font-family:'Bebas Neue',sans-serif;}
.mg-src.sel{border-color:var(--c);box-shadow:0 0 12px -4px var(--c);}
.mg-src .kd{font-size:.6rem;letter-spacing:.18em;color:#778;min-width:7.5em;}
.mg-src .nm{flex:1;font-size:1.05rem;letter-spacing:.06em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mg-src .bs{font-size:.8rem;color:#ffd166;}
.mg-diffs{display:flex;gap:6px;justify-content:center;margin:10px 0 4px;}
.mg-diff{font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.14em;padding:.4rem .9rem;border-radius:10px;border:1px solid #2a2a4a;background:#0e0e1a;color:#8890b8;cursor:pointer;touch-action:manipulation;}
.mg-diff.sel{border-color:#e8ff00;color:#e8ff00;background:#141600;}
.mg-src .nm{text-align:left;}

/* Planet Hop buttons: icon, action, the drum they play, beat lights, a glow that builds toward your next press */
.ph-pads .ph-pad{flex-direction:row;justify-content:flex-start;gap:clamp(8px,2vw,18px);padding:10px clamp(12px,3vw,26px) 10px;overflow:hidden;
  background:radial-gradient(120% 140% at 0% 100%,color-mix(in srgb,var(--c) calc(18% + var(--cue,0)*30%),transparent),transparent 70%),linear-gradient(180deg,#141428,#0a0a16);
  box-shadow:inset 0 0 calc(18px + var(--cue,0)*26px) -8px var(--c),0 0 calc(8px + var(--cue,0)*22px) -6px var(--c),inset 0 -3px 0 color-mix(in srgb,var(--c) 45%,transparent);
  border-color:color-mix(in srgb,var(--c) calc(55% + var(--cue,0)*45%),#223);}
.ph-pads .ph-pad:active,.ph-pads .ph-pad.lit{transform:translateY(2px) scale(.985);}
.ph-pad .ph-ico{flex:0 0 auto;width:clamp(40px,8.5vh,76px);height:clamp(40px,8.5vh,76px);border-radius:50%;display:grid;place-items:center;border:2px solid var(--c);background:color-mix(in srgb,var(--c) 16%,#070710);box-shadow:0 0 14px -4px var(--c);}
.ph-pad .ph-ico svg{width:58%;height:58%;fill:none;stroke:var(--c);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;}
.ph-pad .ph-ico svg circle{fill:var(--c);stroke:none;}
.ph-pad.lit .ph-ico{background:var(--c);}.ph-pad.lit .ph-ico svg{stroke:#0a0a16;}.ph-pad.lit .ph-ico svg circle{fill:#0a0a16;}
.ph-pad .ph-txt{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;text-align:left;}
.ph-pad .ph-act{font-size:clamp(1.5rem,5vh,2.8rem);line-height:1;letter-spacing:.08em;color:#fff;text-shadow:0 0 12px var(--c);}
.ph-pad .ph-snd{font-size:clamp(.9rem,2.6vh,1.35rem);letter-spacing:.12em;color:var(--sc,#fff);padding:2px 9px;border-radius:999px;border:1px solid color-mix(in srgb,var(--sc,#fff) 55%,transparent);background:rgba(0,0,0,.35);white-space:nowrap;}
.ph-pad.lit .ph-snd{background:var(--sc,#fff);color:#0a0a16;}
.ph-pad .ph-tip{font-family:system-ui,sans-serif;font-size:clamp(.75rem,1.9vh,1rem);color:#aab;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.ph-pad .ph-keys{position:absolute;right:12px;bottom:8px;font-size:1rem;letter-spacing:.14em;color:color-mix(in srgb,var(--c) 70%,#fff);opacity:.85;}
.ph-pad .ph-beat{position:absolute;top:8px;right:12px;display:flex;gap:5px;}
.ph-pad .ph-beat i{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.14);transition:background .08s;}
.ph-pad .ph-beat i.on{background:var(--c);box-shadow:0 0 8px var(--c);}
.ph-pad .ph-beat i.hit{transform:scale(1.35);}
.ph-pads.solo{grid-template-columns:1fr;}
.ph-pads.solo #phBounce{display:none;}
.ph-pads.solo .ph-pad{justify-content:center;}
@media (max-height:520px) and (orientation:landscape){.ph-pad .ph-tip{display:none;}.ph-pad .ph-act{font-size:1.3rem;}.ph-pad .ph-ico{width:36px;height:36px;}}
@media (max-width:480px){.ph-pad .ph-tip{display:none;}.ph-pads .ph-pad{gap:8px;padding:8px 10px;}.ph-pad .ph-keys{display:none;}}
/* narrow phones: stack the icon over the words so BOUNCE and the drum chip always fit */
@media (max-width:600px) and (orientation:portrait){
  .ph-pads{height:clamp(118px,21vh,176px);}
  .ph-pads:not(.solo) .ph-pad{flex-direction:column;justify-content:center;align-items:center;gap:4px;padding:16px 6px 6px;}
  .ph-pads:not(.solo) .ph-pad .ph-txt{align-items:center;text-align:center;gap:4px;max-width:100%;}
  .ph-pads:not(.solo) .ph-pad .ph-ico{width:clamp(34px,6.2vh,54px);height:clamp(34px,6.2vh,54px);}
  .ph-pads:not(.solo) .ph-pad .ph-act{font-size:clamp(1.3rem,8vw,2.3rem);letter-spacing:.06em;}
  .ph-pads:not(.solo) .ph-pad .ph-snd{font-size:clamp(.8rem,3.6vw,1.05rem);padding:1px 8px;max-width:100%;overflow:hidden;text-overflow:ellipsis;}
  .ph-pads:not(.solo) .ph-pad .ph-beat{top:6px;right:50%;transform:translateX(50%);}
}
/* Planet Hop: no text selection, callout or magnifier when tapping fast */
#phOverlay,#phOverlay *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
#phPads,#phPads .ph-pad{touch-action:none;-webkit-tap-highlight-color:transparent;}

/* ── v0.2.111 minigame hub: bunker prices, GAMES button, the COCKPIT page ── */
.mg-price{display:inline-block;margin-left:.45rem;padding:.05rem .45rem;border-radius:8px;border:1px solid currentColor;font-size:.78rem;letter-spacing:.1em;opacity:.9;}
#planetHopBtn.mg-locked{opacity:.85;box-shadow:none;}
#mgGamesBtn{display:block;width:calc(100% - 2rem);margin:.6rem 1rem .2rem;font-family:'Bebas Neue',sans-serif;font-size:1.05rem;letter-spacing:.18em;padding:.6rem .8rem;border-radius:12px;border:1px solid #2a5a8a;background:linear-gradient(90deg,#06101e,#0b1830);color:#9fd4ff;cursor:pointer;touch-action:manipulation;box-shadow:0 0 18px -6px #4da6ff;}
#mgGamesBtn small{font-size:.7rem;letter-spacing:.14em;color:#4f7fa8;margin-left:.4rem;}
#mgGamesBtn:hover{border-color:#9fd4ff;}
#cockpitView{transform:translateX(-100%);background:#04050c;z-index:11;overflow:hidden;}
body.cockpit-open #cockpitView{transform:translateX(0);}
body.cockpit-open #soundboardBtn,body.cockpit-open #padEditToggleBtn,body.cockpit-open #partyBtn,body.cockpit-open #socialsBtn{display:none!important;}
#cockpitView .page-header{padding-top:1.2rem;padding-bottom:.6rem;}
#cockpitView .page-title{font-size:2.1rem!important;}
.ck-window{position:relative;flex:0 0 auto;height:clamp(110px,22vh,190px);margin:0 .8rem;border-radius:46% 46% 14px 14px/38% 38% 14px 14px;overflow:hidden;
  background:radial-gradient(ellipse at 50% 120%,#1a2a5a 0%,#0a0f26 45%,#03040c 100%);border:2px solid #22355e;box-shadow:inset 0 0 40px rgba(77,166,255,.18),0 0 24px -10px #4da6ff;}
.ck-stars{position:absolute;top:-50%;right:-50%;bottom:-50%;left:-50%;background-image:radial-gradient(1px 1px at 10% 20%,#fff,transparent),radial-gradient(1px 1px at 30% 70%,#cde,transparent),radial-gradient(1.5px 1.5px at 55% 35%,#fff,transparent),radial-gradient(1px 1px at 75% 60%,#bcd,transparent),radial-gradient(1px 1px at 90% 15%,#fff,transparent),radial-gradient(1px 1px at 45% 85%,#def,transparent);background-size:180px 120px;animation:ckDrift 40s linear infinite;opacity:.8;}
@keyframes ckDrift{to{transform:translate(-180px,0);}}
.ck-planet{position:absolute;border-radius:50%;animation:ckBob 7s ease-in-out infinite;}
.ck-planet.p1{width:44px;height:44px;left:14%;top:26%;background:radial-gradient(circle at 35% 35%,#e8e8f4,#7a7a90 60%,#2a2a3a);box-shadow:0 0 14px rgba(200,200,255,.3);}
.ck-planet.p2{width:30px;height:30px;left:50%;top:18%;background:radial-gradient(circle at 35% 35%,#e8fbff,#5f9bc6 60%,#173a5a);box-shadow:0 0 14px rgba(127,232,255,.35);animation-delay:-2s;}
.ck-planet.p3{width:38px;height:38px;left:76%;top:34%;background:radial-gradient(circle at 35% 35%,#ffcf8a,#c2340a 60%,#3a0a04);box-shadow:0 0 16px rgba(255,120,40,.4);animation-delay:-4s;}
@keyframes ckBob{50%{transform:translateY(-6px);}}
.ck-dash{position:absolute;left:0;right:0;bottom:0;height:22%;background:linear-gradient(#0d1428,#070b18);border-top:2px solid #22355e;display:flex;align-items:center;justify-content:center;gap:10px;}
.ck-dash i{width:8px;height:8px;border-radius:50%;background:#1f3a5e;animation:ckBlink 2.4s infinite;}
.ck-dash i:nth-child(2){animation-delay:.4s;background:#3a2a5e}.ck-dash i:nth-child(3){animation-delay:.8s;background:#1f5e3a}.ck-dash i:nth-child(4){animation-delay:1.2s;background:#5e3a1f}.ck-dash i:nth-child(5){animation-delay:1.6s}
@keyframes ckBlink{50%{filter:brightness(2.6);box-shadow:0 0 8px currentColor;}}
.ck-bonus{text-align:center;font-family:'Bebas Neue',sans-serif;letter-spacing:.1em;color:#7fb0d8;font-size:.95rem;padding:.6rem .8rem 0;}
.ck-bonus b{color:#9fffd8;font-size:1.15rem;}
.ck-bonus small{display:block;color:#4f6f8a;font-size:.75rem;}
.ck-list{flex:1 1 auto;overflow-y:auto;touch-action:pan-y;padding:.2rem .4rem;}
.ck-list #mgList{padding:.4rem .6rem;gap:.45rem;}
.ck-list #mgList button{font-size:1.1rem!important;padding:.8rem .9rem!important;border-radius:14px!important;margin-top:0!important;}
.ck-soon{display:flex;gap:.5rem;padding:.2rem 1rem 1rem;flex-wrap:wrap;justify-content:center;}
.ck-soon-card{flex:1 1 40%;min-width:130px;display:flex;flex-direction:column;align-items:center;gap:.1rem;padding:.55rem;border-radius:12px;border:1px dashed #22355e;background:#060a16;font-family:'Bebas Neue',sans-serif;color:#4f6f8a;letter-spacing:.12em;}
.ck-soon-card span{font-size:1.4rem;filter:grayscale(1) brightness(.6);}
.ck-soon-card b{font-size:1rem;color:#6f8faa;}
.ck-soon-card small{font-size:.7rem;}
#beatDefenseBtn{width:100%;margin-top:.35rem;font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.15em;padding:.55rem .8rem;border-radius:12px;border:1px solid #5a2a7a;background:#10061a;color:#d9a6ff;cursor:pointer;touch-action:manipulation;box-shadow:0 0 14px -6px #b04dff;}
/* desktop: the cockpit opens as a window over the game */
body.desktop-mode #cockpitView{display:none;transform:none;left:50%;top:50%;right:auto;bottom:auto;width:min(560px,92vw);height:min(760px,90vh);translate:-50% -50%;border:1px solid #22355e;border-radius:18px;box-shadow:0 0 0 100vmax rgba(0,0,0,.6),0 0 60px -10px #4da6ff;z-index:9400;}
body.desktop-mode.cockpit-open #cockpitView{display:flex;}
/* Beat Defense */
#bdOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9500;display:none;flex-direction:column;background:#05060c;color:#e8e8f0;font-family:'Bebas Neue',sans-serif;user-select:none;-webkit-user-select:none;touch-action:none;padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0);}
#bdOverlay.open{display:flex;}
#bdOverlay,#bdOverlay *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
.bd-bar{flex:0 0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:6px;padding:8px;background:#07070d;border-top:1px solid #1a1a2a;}
.bd-tw,.bd-go{font-family:'Bebas Neue',sans-serif;border-radius:12px;padding:.5rem .3rem;cursor:pointer;touch-action:none;display:flex;flex-direction:column;align-items:center;gap:2px;line-height:1.05;}
.bd-tw{border:2px solid var(--c);background:color-mix(in srgb,var(--c) 10%,#0b0b14);color:#fff;opacity:.75;}
.bd-tw b{font-size:1.15rem;letter-spacing:.1em;color:var(--c);}
.bd-tw small{font-size:.72rem;letter-spacing:.05em;color:#aab;}
.bd-tw.sel{opacity:1;box-shadow:0 0 16px -4px var(--c),inset 0 0 14px -6px var(--c);transform:translateY(-2px);}
.bd-go{border:2px solid #9fffd8;background:#06201a;color:#9fffd8;font-size:1.2rem;letter-spacing:.12em;justify-content:center;}
.bd-go:disabled{opacity:.35;}
#bdOverlay .bd-spd{width:auto;padding:0 .55rem;font-family:'Bebas Neue',sans-serif;letter-spacing:.08em;font-size:1rem;}
#bdOverlay .bd-spd.on{border-color:#9fffd8;color:#9fffd8;box-shadow:0 0 10px -2px #9fffd8;}

/* ── alien buddies (3D craft buddies replace the old alien emoji) ── */
.bouncer-buddy{display:block;margin:-13px;pointer-events:none;}
.bi{display:inline-block;vertical-align:middle;line-height:0;}
.bi canvas,.buddy-icon{display:inline-block;vertical-align:middle;}
.home-logo-emoji canvas{margin:0 auto;}
.cell-buddy{display:block;pointer-events:none;}
#alienNamePreview canvas{display:block;}
#anmDesignBtn{font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;padding:.55rem 1rem;border-radius:10px;border:1px solid #44eebb;background:linear-gradient(180deg,#0f3a2c,#0a1f17);color:#bfffe9;cursor:pointer;}
#anmDesignBtn.locked{border-color:#1a3a2a;background:#0a1a0f;color:#4a7a66;}
#buddyDesigner{position:fixed;top:0;right:0;bottom:0;left:0;z-index:240;background:rgba(2,6,10,.86);display:none;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:env(safe-area-inset-top) 8px env(safe-area-inset-bottom);}
#buddyDesigner.open{display:flex;}
#buddyDesigner .bd-box{width:min(440px,96vw);max-height:96vh;overflow-y:auto;background:#07140f;border:1px solid #44eebb;border-radius:20px;padding:12px 12px 14px;display:flex;flex-direction:column;align-items:center;gap:10px;box-shadow:0 0 50px rgba(68,238,187,.15);}
#buddyDesigner .bd-top{display:flex;align-items:center;gap:8px;width:100%;}
#buddyDesigner .bd-title{flex:1;text-align:center;}
#buddyDesigner .bd-h{font-family:'Bebas Neue',sans-serif;font-size:1.5rem;letter-spacing:.12em;color:#44eebb;line-height:1;}
#buddyDesigner .bd-name{font-family:'Bebas Neue',sans-serif;font-size:1.05rem;letter-spacing:.08em;color:#cfeee2;opacity:.85;}
#buddyDesigner .bd-nav,#buddyDesigner .bd-x{width:42px;height:42px;border-radius:12px;border:1px solid #1d4a3a;background:#0b231a;color:#bfffe9;font-size:1.4rem;cursor:pointer;}
#buddyDesigner .bd-nav:disabled{opacity:.3;}
#bdCanvas{touch-action:none;cursor:grab;border-radius:16px;background:radial-gradient(ellipse at 50% 40%,#123327,#06110c 70%);}
#buddyDesigner .bd-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;width:100%;}
#buddyDesigner .bd-tabs button,#buddyDesigner .bd-row button,#buddyDesigner .bd-actions button{font-family:'Bebas Neue',sans-serif;font-size:1.05rem;letter-spacing:.08em;min-height:42px;border-radius:12px;border:1px solid #1d4a3a;background:#0b231a;color:#cfeee2;cursor:pointer;}
#buddyDesigner .bd-tabs button.on,#buddyDesigner .bd-row button.on{border-color:#44eebb;background:#124434;color:#fff;box-shadow:0 0 10px rgba(68,238,187,.35);}
#buddyDesigner .bd-pick{font-family:'Bebas Neue',sans-serif;font-size:1.05rem;letter-spacing:.1em;color:#9fd9c4;}
#buddyDesigner .bd-swatches{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;width:100%;}
#buddyDesigner .bd-sw{aspect-ratio:1;border-radius:50%;border:3px solid rgba(255,255,255,.12);cursor:pointer;min-width:34px;}
#buddyDesigner .bd-sw.on{border-color:#fff;box-shadow:0 0 0 2px #44eebb,0 0 12px #44eebb;}
#buddyDesigner .bd-opts{width:100%;display:flex;flex-direction:column;gap:6px;}
#buddyDesigner .bd-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
#buddyDesigner .bd-row span{font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;color:#9fd9c4;min-width:58px;}
#buddyDesigner .bd-row button{flex:1;padding:0 6px;}
#buddyDesigner .bd-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;width:100%;}
#buddyDesigner .bd-actions .bd-done{background:linear-gradient(180deg,#19e48a,#0aa865);color:#06281a;border-color:#3dffa8;}

/* matching game: drawn card art (space & science pictures + alien buddies) */
.match-face-art{width:100%;height:100%;display:block;pointer-events:none;}

/* party glow: a coloured halo behind each buddy (a plain gradient, so it shows on every browser) */
.bouncer-halo{position:absolute;left:50%;top:26px;width:120px;height:120px;border-radius:50%;pointer-events:none;z-index:-1;opacity:0;
  transform:translate(-50%,-50%) scale(.55);background:radial-gradient(circle,var(--c) 0%,color-mix(in srgb,var(--c) 45%,transparent) 32%,transparent 68%);}
@supports not (background:color-mix(in srgb,red 50%,transparent)){.bouncer-halo{background:radial-gradient(circle,var(--c) 0%,transparent 66%);}}

/* ── SHOP GRID: two cards per row ── */
body.shop-b .shop-shelf{display:grid;grid-template-columns:1fr 1fr;gap:.55rem;align-items:start;}
body.shop-b .shop-shelf > .drum-upgrade-row,body.shop-b .shop-shelf > .tracks-row,body.shop-b .shop-shelf > div:not([class]){display:contents;}
body.shop-b .shop-shelf .upgrade-card,body.shop-b .shop-shelf .drum-card,body.shop-b .shop-shelf .alien-store-card{width:auto !important;min-width:0;margin:0 !important;}
body.shop-b .shop-shelf .alien-store-card{flex-direction:column;align-items:flex-start;gap:.3rem;}
body.shop-b .shop-shelf .upgrade-buy-btn,body.shop-b .shop-shelf .drum-buy-btn{flex-wrap:wrap;gap:.35rem;}
body.shop-b .shop-shelf .upgrade-price,body.shop-b .shop-shelf .drum-price{margin-left:auto;}
body.shop-b .store-section-label{color:#6a6a8a;font-size:.85rem;}

/* bigger, easier-to-read prices */
.upgrade-price,.drum-price{font-size:1.15rem !important;}
.upgrade-price small,.drum-price small{font-size:.72rem !important;}
.alien-card-price{font-size:1.3rem !important;}
.alien-card-price small{font-size:.72rem !important;}
.lock-cost{font-size:1rem !important;}
#skillTreeUnlockCost{font-size:1.05rem !important;letter-spacing:.1em;color:#4a6aa0;}
#skillTreeUnlockBtn.can-afford #skillTreeUnlockCost{color:#8fb0ff;}

/* "go here next" glow: the BUNKER and MATCHING GAME buttons once your first gem can unlock the Matching Game */
@keyframes leadGlow{0%,100%{box-shadow:0 0 5px 0 rgba(0,255,136,.3);border-color:#1f8a5a;}50%{box-shadow:0 0 18px 4px rgba(0,255,136,.7);border-color:#00ff88;color:#b8ffdc;}}
#openBunkerBtn.lead-glow,#matchingGameBtn.lead-glow{animation:leadGlow 1.4s ease-in-out infinite;}
@media (prefers-reduced-motion:reduce){#openBunkerBtn.lead-glow,#matchingGameBtn.lead-glow{animation:none;box-shadow:0 0 14px 3px rgba(0,255,136,.6);border-color:#00ff88;}}

/* ── egg hatch (loot-box reveal) ── */
#eggReveal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:400;display:none;flex-direction:column;align-items:center;justify-content:center;gap:.6rem;
  background:radial-gradient(ellipse at 50% 55%,rgba(10,40,28,.97),rgba(2,6,6,.98) 70%);padding:env(safe-area-inset-top) 12px env(safe-area-inset-bottom);overflow:hidden;}
#eggReveal.on{display:flex;}
#eggReveal.special{background:radial-gradient(ellipse at 50% 55%,rgba(60,40,6,.97),rgba(8,4,0,.98) 70%);}
#eggReveal canvas{touch-action:none;cursor:pointer;position:relative;z-index:2;}
#eggReveal .er-top{text-align:center;position:relative;z-index:2;min-height:4.2rem;}
#eggReveal .er-kicker{font-family:'Bebas Neue',sans-serif;font-size:1.15rem;letter-spacing:.25em;color:#7fd8b0;}
#eggReveal.special .er-kicker{color:#ffd23f;text-shadow:0 0 12px rgba(255,210,63,.6);}
#eggReveal .er-title{font-family:'Bebas Neue',sans-serif;font-size:2.4rem;letter-spacing:.08em;color:#e9fff4;line-height:1.05;text-shadow:0 0 18px rgba(0,255,136,.35);}
#eggReveal .er-hint{font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.2em;color:#9fd9c4;opacity:0;transition:opacity .6s;position:relative;z-index:2;min-height:1.4rem;}
#eggReveal .er-hint.on{opacity:.8;animation:erPulse 1.4s ease-in-out infinite;}
@keyframes erPulse{50%{opacity:.35;}}
#eggReveal .er-btns{display:flex;gap:.6rem;opacity:0;transform:translateY(10px);transition:opacity .4s,transform .4s;pointer-events:none;position:relative;z-index:2;}
#eggReveal.show-btns .er-btns{opacity:1;transform:none;pointer-events:auto;}
#eggReveal .er-btns button{font-family:'Bebas Neue',sans-serif;font-size:1.25rem;letter-spacing:.12em;min-height:48px;padding:0 1.4rem;border-radius:14px;border:1px solid #2a5a48;background:#0b231a;color:#cfeee2;cursor:pointer;}
#eggReveal .er-btns .er-ok{background:linear-gradient(180deg,#19e48a,#0aa865);color:#06281a;border-color:#3dffa8;}
#eggReveal.special .er-btns .er-ok{background:linear-gradient(180deg,#ffe36a,#e0a020);color:#3a2400;border-color:#fff1a0;}
#eggReveal .er-rays{position:absolute;left:50%;top:52%;width:180vmax;height:180vmax;transform:translate(-50%,-50%) scale(.2);opacity:0;pointer-events:none;z-index:1;
  background:radial-gradient(circle,rgba(0,255,136,.14) 0%,rgba(0,255,136,.05) 18%,transparent 34%);border-radius:50%;}
#eggReveal.special .er-rays{background:radial-gradient(circle,rgba(255,210,63,.3) 0%,rgba(255,210,63,.1) 18%,transparent 34%);}
#eggReveal.open-burst .er-rays{animation:erRays 1s cubic-bezier(.2,.8,.2,1) forwards;}
@keyframes erRays{to{opacity:1;transform:translate(-50%,-50%) scale(1);}}
@keyframes erSpin{from{rotate:0deg;}to{rotate:360deg;}}
/* the new buddy waits hidden on screen until it hatches, then pops in */
.bouncer.hatching{visibility:hidden;}
.bouncer.hatched .bouncer-buddy{animation:bPop .8s cubic-bezier(.34,1.56,.64,1);}
@keyframes bPop{0%{transform:scale(0);}100%{transform:scale(1);}}

/* ── v0.2.123 BEST BUDDY page, accessories, puzzles, theme songs ── */
#bbOpenBtn{display:block;width:calc(100% - 2rem);margin:.6rem 1rem .2rem;font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.18em;padding:.65rem .8rem;border-radius:12px;border:1px solid #8a6a10;background:linear-gradient(90deg,#1e1606,#30240b);color:#ffe28a;cursor:pointer;touch-action:manipulation;box-shadow:0 0 18px -6px #ffd23f;}
#bbOpenBtn small{font-size:.8rem;letter-spacing:.14em;color:#a8904f;margin-left:.4rem;}
#bestBuddyView{transform:translateX(-100%);background:#0a0820;z-index:11;overflow:hidden;}
body.bestbuddy-open #bestBuddyView{transform:translateX(0);}
body.bestbuddy-open #soundboardBtn,body.bestbuddy-open #padEditToggleBtn,body.bestbuddy-open #partyBtn,body.bestbuddy-open #socialsBtn{display:none!important;}
#bestBuddyView .page-header{padding-top:1.2rem;padding-bottom:.4rem;}
#bestBuddyView .page-title{font-size:2.1rem!important;}
.bb-stage{position:relative;flex:1 1 auto;min-height:220px;margin:0 .7rem;border-radius:22px;overflow:hidden;border:2px solid #2f2560;box-shadow:inset 0 0 40px rgba(140,110,255,.18),0 0 24px -10px #9b5cff;touch-action:manipulation;}
.bb-stage canvas{position:absolute;left:0;top:0;width:100%;height:100%;}
.bb-empty{position:absolute;top:0;right:0;bottom:0;left:0;display:none;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-family:'Bebas Neue',sans-serif;font-size:1.5rem;letter-spacing:.1em;color:#cfc8ff;}
.bb-empty small{font-size:1rem;color:#8a80c8;}
.bb-namebar{display:flex;align-items:center;justify-content:space-between;padding:.55rem .8rem .2rem;}
.bb-arrow{flex:0 0 auto;width:3.4rem;height:3.4rem;border-radius:50%;border:2px solid #4a3a8a;background:radial-gradient(circle at 40% 35%,#2a1f5a,#120c30);color:#ffe28a;font-size:1.3rem;cursor:pointer;touch-action:manipulation;}
.bb-arrow:active{transform:scale(.92);}
.bb-arrow:disabled,.bb-btns button:disabled{opacity:.35;}
.bb-name{flex:1 1 auto;text-align:center;font-family:'Bebas Neue',sans-serif;letter-spacing:.1em;min-width:0;}
.bb-name b{display:block;font-size:1.7rem;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bb-name small{display:block;font-size:.95rem;color:#8a80c8;}
.bb-btns{display:flex;flex-wrap:wrap;justify-content:center;padding:.3rem .5rem calc(.8rem + env(safe-area-inset-bottom));}
.bb-btns button{flex:1 1 40%;margin:.25rem;min-height:3rem;font-family:'Bebas Neue',sans-serif;font-size:1.15rem;letter-spacing:.12em;border-radius:14px;border:1px solid #4a3a8a;background:linear-gradient(180deg,#221a4a,#140f30);color:#e6e0ff;cursor:pointer;touch-action:manipulation;}
.bb-btns button.wide{flex-basis:90%;border-color:#8a6a10;background:linear-gradient(180deg,#3a2c0a,#1e1606);color:#ffe28a;}
.bb-btns button.wide.on{border-color:#ffd23f;box-shadow:0 0 16px -4px #ffd23f;}
.bb-sheet{position:absolute;left:0;right:0;bottom:0;max-height:62%;display:flex;flex-direction:column;background:#0d0a26;border-top:2px solid #4a3a8a;border-radius:20px 20px 0 0;box-shadow:0 -10px 30px rgba(0,0,0,.6);transform:translateY(105%);visibility:hidden;transition:transform .3s cubic-bezier(.3,.9,.3,1),visibility 0s .3s;z-index:3;padding-bottom:env(safe-area-inset-bottom);}
.bb-sheet.open{transform:translateY(0);visibility:visible;transition:transform .3s cubic-bezier(.3,.9,.3,1),visibility 0s;}
#bestBuddyView.sheet-open .bb-btns{visibility:hidden;}
.bb-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:.6rem .9rem .3rem;font-family:'Bebas Neue',sans-serif;letter-spacing:.14em;color:#ffe28a;font-size:1.25rem;}
.bb-sheet-head button{font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.12em;padding:.45rem 1.1rem;border-radius:12px;border:1px solid #3dffa8;background:linear-gradient(180deg,#19e48a,#0aa865);color:#06281a;cursor:pointer;}
.bb-tabs{display:flex;padding:0 .5rem .4rem;}
.bb-tabs button{flex:1 1 0;margin:0 .2rem;font-family:'Bebas Neue',sans-serif;font-size:1.05rem;letter-spacing:.1em;padding:.4rem 0 .25rem;border-radius:10px;border:1px solid #2f2560;background:#140f30;color:#a89ee0;cursor:pointer;}
.bb-tabs button small{display:block;font-size:.8rem;color:#6f66a8;}
.bb-tabs button.on{border-color:#ffd23f;color:#ffe28a;background:#2a2008;}
.bb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));grid-gap:.45rem;gap:.45rem;padding:.2rem .7rem .9rem;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;}
.bb-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-height:92px;padding:.3rem .2rem .35rem;border-radius:12px;border:1px solid #2f2560;background:#140f30;color:#cfc8ff;cursor:pointer;font-family:'Bebas Neue',sans-serif;}
.bb-tile canvas{display:block;margin:0 auto auto;}
.bb-tile small{font-size:.82rem;letter-spacing:.06em;line-height:1.05;text-align:center;}
.bb-tile.on{border-color:#ffd23f;background:#2a2008;box-shadow:0 0 12px -3px #ffd23f;}
.bb-tile.locked{opacity:.55;}
.bb-tile .bb-lock,.bb-tile .bb-none{font-size:1.7rem;margin:auto;}
.bb-tile .bb-none{color:#6f66a8;}
#anmSongBtn{font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;padding:.55rem 1rem;border-radius:10px;border:1px solid #8a6a10;background:linear-gradient(180deg,#3a2c0a,#1e1606);color:#ffe28a;cursor:pointer;margin-top:.4rem;}
#themeBanner{display:none;align-items:center;padding:.5rem .7rem;margin:0 0 .4rem;border-radius:14px;border:2px solid var(--c,#ffd23f);background:linear-gradient(90deg,#1e1606,#2a2008);font-family:'Bebas Neue',sans-serif;letter-spacing:.1em;}
#themeBanner .tb-txt{flex:1 1 auto;min-width:0;}
#themeBanner small{display:block;font-size:.85rem;color:#c8b070;}
#themeBanner b{display:block;font-size:1.35rem;color:var(--c,#ffe28a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#themeBanner button{flex:0 0 auto;margin-left:.4rem;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;padding:.5rem .8rem;border-radius:10px;border:1px solid #5a4a2a;background:#140f08;color:#e6d6a8;cursor:pointer;}
#themeBanner button.ok{border-color:#3dffa8;background:linear-gradient(180deg,#19e48a,#0aa865);color:#06281a;}
/* desktop: Best Buddy opens as a window over the game */
body.desktop-mode #bestBuddyView{display:none;transform:none;left:50%;top:50%;right:auto;bottom:auto;width:min(560px,92vw);height:min(780px,92vh);margin-left:calc(min(560px,92vw) / -2);margin-top:calc(min(780px,92vh) / -2);border:1px solid #4a3a8a;border-radius:18px;box-shadow:0 0 0 100vmax rgba(0,0,0,.6),0 0 60px -10px #9b5cff;}
body.desktop-mode.bestbuddy-open #bestBuddyView{display:flex;z-index:900;}

/* puzzles */
#pzModal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9600;display:none;align-items:center;justify-content:center;background:rgba(4,3,14,.94);font-family:'Bebas Neue',sans-serif;color:#e6e0ff;-webkit-user-select:none;user-select:none;}
#pzModal.open{display:flex;}
.pz-box{width:min(440px,100%);max-height:100%;overflow-y:auto;display:flex;flex-direction:column;align-items:center;padding:calc(.8rem + env(safe-area-inset-top)) .8rem calc(1rem + env(safe-area-inset-bottom));}
.pz-head{width:100%;display:flex;align-items:flex-start;justify-content:space-between;}
.pz-head small{display:block;font-size:1rem;letter-spacing:.2em;color:#8a80c8;}
.pz-head b{display:block;font-size:2rem;letter-spacing:.08em;color:#ffe28a;line-height:1.05;}
#pzClose{width:2.8rem;height:2.8rem;border-radius:50%;border:1px solid #4a3a8a;background:#140f30;color:#e6e0ff;font-size:1.2rem;cursor:pointer;}
.pz-how{width:100%;font-family:system-ui,-apple-system,sans-serif;font-size:1rem;line-height:1.35;color:#cfc8ff;margin:.4rem 0 .7rem;}
.pz-area{display:flex;flex-direction:column;align-items:center;width:100%;}
.pz-foot{display:flex;flex-wrap:wrap;justify-content:center;margin-top:.7rem;}
.pz-foot button{margin:.25rem;min-height:2.8rem;font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.12em;padding:0 1.1rem;border-radius:12px;border:1px solid #4a3a8a;background:#140f30;color:#e6e0ff;cursor:pointer;}
.pz-foot button.go{border-color:#3dffa8;background:linear-gradient(180deg,#19e48a,#0aa865);color:#06281a;}
.pz-info{font-size:1.3rem;letter-spacing:.1em;color:#9fffd8;margin-bottom:.5rem;min-height:1.6rem;}
.pz-board{position:relative;border-radius:12px;overflow:hidden;background:#05040f;border:2px solid #4a3a8a;}
.pz-tile{position:absolute;left:0;top:0;border-radius:6px;transition:transform .16s ease;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);}
.pz-tile i{position:absolute;left:3px;top:1px;font-style:normal;font-size:.9rem;color:#fff;text-shadow:0 1px 2px #000;}
.pz-tile.tw{transition:transform .2s ease;}
.pz-grid{display:grid;grid-gap:6px;gap:6px;}
.pz-bulb{border-radius:50%;border:2px solid #2f2560;background:radial-gradient(circle at 40% 35%,#2a2450,#0d0a26);cursor:pointer;transition:background .15s,box-shadow .15s;}
.pz-bulb.on{border-color:#ffe28a;background:radial-gradient(circle at 40% 35%,#fffbe0,#ffd23f 45%,#e0a020);box-shadow:0 0 14px -2px #ffd23f;}
.pz-grid.done .pz-bulb{animation:pzPop .5s ease;}
@keyframes pzPop{50%{transform:scale(1.12);}}
.pz-pads{display:grid;grid-template-columns:1fr 1fr;grid-gap:10px;gap:10px;width:min(320px,84vw);}
.pz-pad{height:min(140px,30vw);border-radius:20px;border:3px solid var(--c);background:radial-gradient(circle at 40% 35%,rgba(255,255,255,.12),rgba(0,0,0,.25)),#120c2a;color:var(--c);font-family:'Bebas Neue',sans-serif;font-size:1.4rem;letter-spacing:.12em;cursor:pointer;touch-action:none;}
.pz-pad.hit{animation:pzHit .32s ease;}
@keyframes pzHit{0%{background-color:var(--c);color:#120c2a;transform:scale(.95);}100%{background-color:#120c2a;}}
.pz-pads.wait .pz-pad{opacity:.75;}
.pz-tubes{display:flex;flex-wrap:wrap;justify-content:center;max-width:360px;}
.pz-tube{display:flex;flex-direction:column-reverse;align-items:center;justify-content:flex-start;width:52px;height:178px;margin:.3rem;padding:6px 0;border-radius:6px 6px 24px 24px;border:2px solid #6a5aa8;background:rgba(160,140,255,.08);cursor:pointer;}
.pz-tube.sel{border-color:#ffe28a;box-shadow:0 0 12px -3px #ffd23f;}
.pz-tube i{display:block;width:36px;height:36px;margin:2px 0;border-radius:50%;}
.pz-tube i.empty{background:transparent;}
.pz-tube i.up{transform:translateY(-14px);box-shadow:0 6px 10px rgba(0,0,0,.4);}
.pz-maze{border-radius:12px;border:2px solid #4a3a8a;touch-action:none;}
.pz-arrows{display:grid;grid-template-columns:repeat(3,58px);grid-template-rows:repeat(2,52px);grid-gap:6px;gap:6px;margin-top:.6rem;}
.pz-arrows button{border-radius:12px;border:1px solid #4a3a8a;background:#140f30;color:#ffe28a;font-size:1.3rem;cursor:pointer;touch-action:none;}
.pz-arrows .a0{grid-column:2;grid-row:1;}.pz-arrows .a3{grid-column:1;grid-row:2;}.pz-arrows .a2{grid-column:2;grid-row:2;}.pz-arrows .a1{grid-column:3;grid-row:2;}
.pz-odd{padding:0;border-radius:12px;border:2px solid #2f2560;background:#140f30;cursor:pointer;}
.pz-odd.good{border-color:#3dffa8;box-shadow:0 0 14px -3px #3dffa8;}
.pz-odd.bad{border-color:#ff5a5a;animation:pzShake .35s;}
@keyframes pzShake{25%{transform:translateX(-5px);}75%{transform:translateX(5px);}}
.pz-beat{width:100%;}
.pz-brow{margin-bottom:.5rem;}
.pz-brow b{display:block;font-size:1.15rem;letter-spacing:.12em;}
.pz-brow b small{font-size:.95rem;color:#8a80c8;margin-left:.5rem;}
.pz-bcells{display:grid;grid-gap:3px;gap:3px;}
.pz-bcells button{height:2.6rem;border-radius:6px;border:1px solid #2f2560;background:#140f30;cursor:pointer;padding:0;}
.pz-bcells button.beat{border-color:#4a3a8a;background:#1c1540;}
.pz-bcells button.on{background:var(--c);border-color:#fff;}
.pz-bcells button.ph{box-shadow:inset 0 0 0 2px #ffe28a;}
.pz-beat.done .pz-bcells button.on{animation:pzPop .4s ease;}
.pz-win{position:absolute;top:0;right:0;bottom:0;left:0;display:none;align-items:center;justify-content:center;background:rgba(4,3,14,.86);}
#pzModal.won .pz-win{display:flex;}
.pz-win-box{width:min(380px,92vw);text-align:center;padding:1.2rem 1rem;border-radius:20px;border:2px solid #ffd23f;background:radial-gradient(ellipse at 50% 0%,#3a2c0a,#120c22 70%);box-shadow:0 0 50px -10px #ffd23f;animation:anmIn .35s cubic-bezier(.34,1.2,.64,1);}
.pz-win-box > small{display:block;font-size:1.1rem;letter-spacing:.25em;color:#ffd23f;}
.pz-win-box > b{display:block;font-size:2.1rem;letter-spacing:.08em;color:#fff6d8;}
.pz-rewards{display:grid;grid-template-columns:1fr 1fr;grid-gap:.5rem;gap:.5rem;margin:.8rem 0;}
.pz-rw{display:flex;flex-direction:column;align-items:center;padding:.4rem;border-radius:12px;border:1px solid #4a3a8a;background:#140f30;}
.pz-rw small{font-size:1rem;letter-spacing:.06em;color:#fff6d8;}
.pz-rw i{font-style:normal;font-size:.85rem;letter-spacing:.14em;color:#8a80c8;}
.pz-win-btns{display:flex;justify-content:center;}
.pz-win-btns button{flex:1 1 0;margin:0 .25rem;min-height:3rem;font-family:'Bebas Neue',sans-serif;font-size:1.15rem;letter-spacing:.12em;border-radius:14px;border:1px solid #8a6a10;background:linear-gradient(180deg,#3a2c0a,#1e1606);color:#ffe28a;cursor:pointer;}
.pz-win-btns button.ok{border-color:#3dffa8;background:linear-gradient(180deg,#19e48a,#0aa865);color:#06281a;}
body.bestbuddy-open #settingsOpenBtn{display:none!important;}
/* v0.2.124: the buddy card sits at a fixed spot near the top (it used to re-centre whenever the keyboard or the
   name box opened, so it slid up and down while you were naming) */
#alienNameModal{align-items:flex-start;padding-top:calc(env(safe-area-inset-top) + 7vh);overflow-y:auto;-webkit-overflow-scrolling:touch;}
body.desktop-mode #alienNameModal{align-items:center;padding-top:0;}
/* shop: a long word (SEQUENCER, DRUMPAD…) never runs under the price; the price drops to its own line instead */
.upgrade-buy-btn,.drum-buy-btn{flex-wrap:wrap;}
.upgrade-buy-btn .upgrade-effect,.drum-buy-btn .upgrade-effect{min-width:-webkit-min-content;min-width:min-content;}
.upgrade-price,.drum-price{margin-left:auto;}
/* title screen pencil: black & white; on saved files it sits left of the ✕ with a safe gap */
.slot-edit-btn{font-family:system-ui,-apple-system,sans-serif;font-size:.8rem;padding:.12rem .32rem;border-radius:5px;border:1px solid #3a3a3a;background:transparent;color:#bbb;cursor:pointer;touch-action:manipulation;line-height:1;flex-shrink:0;-webkit-filter:grayscale(1);filter:grayscale(1);}
.slot-edit-btn.big{font-size:.95rem;padding:.3rem .5rem;border-radius:6px;border-color:#555;color:#ddd;margin-right:.2rem;}
.slot-actions{display:flex;align-items:center;gap:0;}
/* small action buttons on the right of a settings row (INTRO ▶ REPLAY, VIEW OPEN ▸) */
.settings-mini-btn{flex-shrink:0;font-family:'Bebas Neue',sans-serif;font-size:16px;letter-spacing:.1em;background:#0d0d1c;border:1px solid #2a2a4a;border-radius:6px;color:#a0a8ff;padding:.35rem .75rem;cursor:pointer;touch-action:manipulation;}
.settings-mini-btn:active{border-color:#a0a8ff;background:#16163a;}
#settingsViewRow > div{flex:1 1 auto;min-width:0;}
#settingsViewSummary{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.08em;color:#44eebb;margin-top:3px;}
/* Settings ▸ VIEW panel: takes the settings box's place until BACK */
#settingsViewSheet{display:none;background:#111;border:1px solid #2a2a2a;border-radius:20px;padding:1.4rem 1.5rem 1.6rem;width:100%;max-width:340px;flex-direction:column;gap:.7rem;max-height:94vh;max-height:94dvh;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:none;animation:settingsIn .18s cubic-bezier(.34,1.1,.64,1);}
#settingsViewSheet::-webkit-scrollbar{display:none;}
#settingsPanel.view-open #settingsBox{display:none;}
#settingsPanel.view-open #settingsViewSheet{display:flex;}
.svs-sub{font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.06em;color:#778;text-align:center;line-height:1.25;}
#settingsViewList{display:flex;flex-direction:column;gap:.4rem;}
.svs-row{display:flex;align-items:center;gap:.75rem;width:100%;font-family:'Bebas Neue',sans-serif;font-size:1.2rem;letter-spacing:.1em;padding:.65rem .8rem;border-radius:10px;border:1px solid #22224a;background:#0d0d1c;color:#778;cursor:pointer;text-align:left;touch-action:manipulation;}
.svs-row.on{color:#e4e6ff;border-color:#44eebb;background:#0a1a14;}
.svs-row:active{background:#1a1a3a;}
.svs-row.sub{width:auto;margin-left:1.6rem;font-size:1.05rem;padding:.5rem .75rem;}
.svs-row.sub.on{border-color:#2f8f74;background:#0b1512;}
.svs-row.dim{opacity:.5;}
.svs-check{flex-shrink:0;width:1.35rem;height:1.35rem;display:inline-flex;align-items:center;justify-content:center;border:1.5px solid #3a3a6a;border-radius:5px;color:#00ff88;font-size:1rem;line-height:1;}
.svs-row.on .svs-check{border-color:#44eebb;}
.svs-row.sub .svs-check{border-radius:50%;width:1.15rem;height:1.15rem;font-size:.8rem;}
.svs-sep{height:1px;background:#22224a;margin:.25rem .3rem;}
@media (max-height:700px){.svs-row{padding:.5rem .7rem;font-size:1.1rem;}.svs-row.sub{padding:.4rem .7rem;}#settingsViewList{gap:.3rem;}}
/* shop: no emoji-style icons (the little buddy icons stood in for the old alien emoji); only the 💎 stays */
#storeView .bi,#storeView .buddy-icon{display:none!important;}
/* iPhones zoom the whole page in when you tap a text box with text smaller than 16px; never let that happen */
input[type=text],input[type=number],input[type=search],input:not([type]),textarea,select{font-size:16px!important;}
/* v0.2.127 matching cards: ARCADE TILE faces (drawn on canvas) + slowly swirling pixel-galaxy backs */
.match-card-back{background:transparent;border:0;}
.match-card-back::after{content:none;}
.match-card-front{border-width:0;}
.match-card.matched .match-card-front{box-shadow:0 0 0 2px #00ff88,0 0 16px -2px rgba(0,255,136,.6);border-radius:14%;}
.match-card.wrong .match-card-front{box-shadow:0 0 0 2px #ff4444;border-radius:14%;}
.mg-gal{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:14%;overflow:hidden;background:#0e0822;border:3px solid #1d1530;box-shadow:inset 0 3px 0 rgba(255,255,255,.12),0 3px 0 rgba(0,0,0,.35);-webkit-mask-image:-webkit-radial-gradient(white,black);}
.mg-gal i{position:absolute;left:-15%;top:3.75%;width:130%;height:97.5%;background:var(--mg-galaxy) center/contain no-repeat;image-rendering:pixelated;image-rendering:crisp-edges;-webkit-animation:mgSpin 48s linear infinite;animation:mgSpin 48s linear infinite;will-change:transform;}
.match-card:nth-child(2n) .mg-gal i{-webkit-animation-delay:-13s;animation-delay:-13s;}
.match-card:nth-child(3n) .mg-gal i{-webkit-animation-delay:-29s;animation-delay:-29s;-webkit-animation-duration:56s;animation-duration:56s;}
.match-card:nth-child(5n) .mg-gal i{-webkit-animation-delay:-41s;animation-delay:-41s;}
@-webkit-keyframes mgSpin{to{-webkit-transform:rotate(360deg);}}
@keyframes mgSpin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce){.mg-gal i{-webkit-animation:none;animation:none;}}
/* v0.2.129 shop buttons (phone): the same two-row layout for EVERY button. What you get sits on top (count badge +
   name, full width so names never squeeze); the price sits on its own strip along the bottom, number and PTS on one
   line. Nothing can overlap and every button in the grid lines up. */
body:not(.desktop-mode) .upgrade-buy-btn,body:not(.desktop-mode) .drum-buy-btn{flex-wrap:wrap;align-items:center;padding-bottom:0;overflow:hidden;}
body:not(.desktop-mode) .upgrade-buy-btn .upgrade-effect,body:not(.desktop-mode) .drum-buy-btn .upgrade-effect{flex:1 1 0;min-width:0;}
body:not(.desktop-mode) .upgrade-price,body:not(.desktop-mode) .drum-price{flex:1 0 100%;display:flex;align-items:baseline;justify-content:flex-end;margin:.5rem -.7rem 0 -.7rem;padding:.32rem .75rem .38rem;border-top:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.035);text-align:right;line-height:1;}
body:not(.desktop-mode) .upgrade-price small,body:not(.desktop-mode) .drum-price small{display:inline;margin-left:.3rem;}

/* ── Explore the Galaxies intro (js/59-galaxy-intro.js) ── */
#galaxyIntro{position:fixed;top:0;right:0;bottom:0;left:0;z-index:900;display:none;background:#02030a;touch-action:none;}
#galaxyIntro.on{display:block;}
#galaxyIntro canvas{position:absolute;top:0;left:0;}
#galaxyIntro .gi-text{position:absolute;left:0;right:0;top:66%;text-align:center;opacity:0;transform:scale(.86);transition:opacity .45s,transform 1.2s cubic-bezier(.2,.8,.2,1);pointer-events:none;}
#galaxyIntro.gi-show .gi-text{opacity:1;transform:none;}
#galaxyIntro .gi-kicker{font-family:'Bebas Neue',sans-serif;font-size:1.3rem;letter-spacing:.35em;color:#ffd25a;text-shadow:0 0 12px rgba(255,190,80,.6);}
#galaxyIntro .gi-title{font-family:'Bebas Neue',sans-serif;font-size:2.7rem;letter-spacing:.1em;color:#f2fbff;line-height:1.05;text-shadow:0 0 22px rgba(120,220,255,.7);padding:0 1rem;}
#galaxyIntro .gi-skip{position:absolute;bottom:calc(1.4rem + env(safe-area-inset-bottom,0px));left:0;right:0;text-align:center;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.25em;color:rgba(200,230,255,.35);}
body.galaxy-intro .bouncer,body.unlock-scene .bouncer{visibility:hidden;}

/* hold-to-launch charge on the Explore the Galaxies button */
#skillTreeUnlockBtn{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
#skillTreeUnlockBtn>span{position:relative;z-index:1;}
#skillTreeUnlockBtn::before{content:'';position:absolute;top:0;bottom:0;left:0;width:calc(var(--hp,0)*100%);background:linear-gradient(90deg,rgba(68,120,255,.25),rgba(120,220,255,.55));box-shadow:0 0 18px rgba(120,220,255,.6);pointer-events:none;}
#skillTreeUnlockBtn.charging{border-color:#8fd8ff;color:#cfeeff;box-shadow:0 0 calc(10px + var(--hp,0)*26px) rgba(120,220,255,.55);}
#skillTreeUnlockBtn.launched{animation:stLaunch .5s ease-out;}
@keyframes stLaunch{0%{box-shadow:0 0 40px rgba(200,240,255,.9);}100%{box-shadow:0 0 0 rgba(200,240,255,0);}}
#skillTreeUnlockBtn.nudge{animation:stNudge .35s ease-in-out;}
@keyframes stNudge{0%,100%{transform:none;}25%{transform:translateX(-4px);}75%{transform:translateX(4px);}}

/* ── Explore the Galaxies button: a little window into space ── */
#skillTreeUnlockBtn{justify-content:flex-start;gap:.85rem;padding:.75rem 1rem;min-height:74px;border-radius:16px;border:2px solid #22305a;color:#6f84b8;text-align:left;
  background:radial-gradient(1px 1px at 18% 30%,rgba(255,255,255,.7),transparent 60%),radial-gradient(1px 1px at 62% 72%,rgba(255,255,255,.55),transparent 60%),
    radial-gradient(1.5px 1.5px at 84% 22%,rgba(200,230,255,.8),transparent 60%),radial-gradient(1px 1px at 40% 85%,rgba(255,255,255,.4),transparent 60%),
    radial-gradient(1px 1px at 92% 64%,rgba(255,255,255,.5),transparent 60%),radial-gradient(1px 1px at 30% 12%,rgba(255,255,255,.45),transparent 60%),
    radial-gradient(ellipse at 15% 50%,rgba(120,70,200,.35),transparent 55%),radial-gradient(ellipse at 85% 40%,rgba(30,120,170,.3),transparent 60%),#070b1c;}
#skillTreeUnlockBtn .st-lbl{display:flex;flex-direction:column;gap:.15rem;flex:1;min-width:0;}
#skillTreeUnlockBtn .st-name{font-size:1.35rem;letter-spacing:.12em;line-height:1;color:inherit;}
#skillTreeUnlockBtn #skillTreeUnlockCost{font-size:1rem !important;letter-spacing:.12em;line-height:1;}
/* orbit icon: a little sun with two moons on dashed orbits (colours slowly cycle) */
#skillTreeUnlockBtn .st-orbit{position:relative;width:44px;height:44px;flex:none;}
#skillTreeUnlockBtn .st-orbit i{position:absolute;left:50%;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fffbe8,#ffd25a 50%,#ff9a2e);box-shadow:0 0 10px rgba(255,190,80,.7);}
#skillTreeUnlockBtn .st-orbit b{position:absolute;left:3px;top:13px;width:36px;height:16px;border:1px dashed rgba(160,190,255,.45);border-radius:50%;animation:stOrb 6s linear infinite;}
#skillTreeUnlockBtn .st-orbit b::after{content:'';position:absolute;left:-3px;top:4px;width:6px;height:6px;border-radius:50%;background:#3fe6ff;box-shadow:0 0 6px #3fe6ff;}
#skillTreeUnlockBtn .st-orbit b+b{transform:rotate(60deg);animation-duration:9s;animation-direction:reverse;}
#skillTreeUnlockBtn .st-orbit b+b::after{background:#ff4fa8;box-shadow:0 0 6px #ff4fa8;left:auto;right:-3px;}
@keyframes stOrb{from{filter:hue-rotate(0deg);}to{filter:hue-rotate(360deg);}}
#skillTreeUnlockBtn .st-go{flex:none;width:12px;height:12px;border-top:3px solid currentColor;border-right:3px solid currentColor;transform:rotate(45deg);margin-right:.3rem;opacity:.8;}
/* locked and can't afford yet: dim and quiet */
#skillTreeUnlockBtn:not(.can-afford):not(.unlocked){filter:saturate(.45) brightness(.8);}
#skillTreeUnlockBtn:not(.can-afford):not(.unlocked) .st-go{display:none;}
/* ready to launch: bright, with a slow breathing glow */
#skillTreeUnlockBtn.can-afford{border-color:#7fb0ff;color:#dbe8ff;animation:stReady 2.4s ease-in-out infinite;}
#skillTreeUnlockBtn.can-afford #skillTreeUnlockCost{color:#ffd25a;}
@keyframes stReady{0%,100%{box-shadow:0 0 10px -2px rgba(120,170,255,.35);}50%{box-shadow:0 0 22px 0 rgba(120,200,255,.6);}}
#skillTreeUnlockBtn.unlocked{border-color:#44aaff;color:#cfe6ff;}
#skillTreeUnlockBtn.unlocked #skillTreeUnlockCost{color:#5fc4ff;}
#skillTreeUnlockBtn.charging{animation:none;}

/* ── BUDDY KEYS (v0.2.136) ── */
.pad-area{position:relative;}
#buddyKeys{position:absolute;z-index:6;display:none;flex-direction:column;gap:6px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none;}
body.keys-on #buddyKeys{display:flex;}
body.keys-on #padGrid{visibility:hidden;}
body.keys-on #padEditToggleBtn,body.keys-on #padCountSelector{display:none!important;}
#bkCanvas{display:block;touch-action:none;-webkit-tap-highlight-color:transparent;}
.bk-bar{display:flex;align-items:center;gap:6px;height:40px;padding:0 2px;font-family:'Bebas Neue',sans-serif;}
.bk-voice{min-width:5.6em;text-align:center;font-size:1.3rem;letter-spacing:.1em;text-shadow:0 0 12px currentColor;}
.bk-arrow{width:36px;height:36px;border-radius:50%;border:1px solid #3a3360;background:#15122a;position:relative;cursor:pointer;touch-action:manipulation;flex:none;}
.bk-arrow::after{content:'';position:absolute;left:50%;top:50%;width:9px;height:9px;border-left:3px solid #c9bfff;border-bottom:3px solid #c9bfff;transform:translate(-30%,-50%) rotate(45deg);}
.bk-arrow.r::after{transform:translate(-70%,-50%) rotate(-135deg);}
.bk-arrow:active{background:#241d48;}
.bk-oct{margin-left:auto;display:flex;align-items:center;gap:6px;color:#b7aee0;font-size:1rem;letter-spacing:.12em;}
.bk-oct span{min-width:2.6em;text-align:center;}
.bk-oct button{width:36px;height:36px;border-radius:50%;border:1px solid #3a3360;background:#15122a;color:#e6e0ff;font-family:'Bebas Neue',sans-serif;font-size:1.3rem;line-height:1;cursor:pointer;touch-action:manipulation;padding:0;}
.bk-oct button:disabled{opacity:.3;}
#keysSwitch{position:absolute;z-index:7;display:none;border:1px solid #4a3d99;border-radius:50px;background:#110d24;padding:2px;box-shadow:0 0 12px -5px #8f73ff;}
#keysSwitch button{font-family:'Bebas Neue',sans-serif;font-size:.88rem;letter-spacing:.1em;padding:.28rem .75rem;border:0;border-radius:50px;background:transparent;color:#7d72b0;cursor:pointer;touch-action:manipulation;}
#keysSwitch button.on{background:#6b55d9;color:#fff;}
.bk-voice{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;}
.bk-oct{flex:none;}
@media (max-width:350px){
  .bk-bar{gap:4px;}
  .bk-voice{font-size:1.15rem;letter-spacing:.05em;}
  .bk-arrow,.bk-oct button{width:32px;height:32px;}
  .bk-oct{gap:3px;font-size:.92rem;}
  .bk-oct span{min-width:2.1em;}
}
body.phone-land #keysSwitch button{font-size:.7rem;padding:.2rem .55rem;}

/* ── v0.2.137 BUDDY NAME CARD: stays still while you type (see js/58-name-card-keyboard.js) ──
   Touch screens: the real text field is invisible and parked at the top of the card (so iPhone Safari never
   scrolls the page for it); #bdyTagShow is the name box you see, drawn in the usual spot. */
#bdyTagShow{display:none;}
body.bt-proxy #bdyTagShow{display:block;box-sizing:border-box;min-height:37px;padding:.5rem .7rem;border:1px solid #1a3a2a;border-radius:8px;background:#061208;
  font-family:'Bebas Neue',sans-serif;font-size:16px;line-height:19px;letter-spacing:.05em;color:var(--anc,#00ff88);text-align:center;white-space:pre;overflow:hidden;
  cursor:text;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;}
body.bt-proxy #bdyTagShow.focus{border-color:var(--anc,#00ff88);}
body.bt-proxy #bdyTagShow .bt-ph{color:#1a4a2a;}
body.bt-proxy #bdyTagShow .bt-sel{background:rgba(110,160,255,.38);border-radius:2px;}
.bt-caret{display:inline-block;width:2px;height:17px;margin:0 1px;vertical-align:-3px;background:var(--anc,#00ff88);border-radius:1px;animation:btBlink 1.06s steps(1,end) .5s infinite;}
@keyframes btBlink{0%{opacity:0}50%{opacity:1}}
body.bt-proxy #bdyTagField{position:absolute;top:6px;left:50%;width:1px;height:1px;min-width:0;margin:0;padding:0;border:0;border-radius:0;opacity:0;
  font-size:16px;color:transparent;background:transparent;caret-color:transparent;pointer-events:none;-webkit-user-select:text;user-select:text;}
/* short screens: the card sits a little higher (and on the smallest, the buddy is smaller) so the name box and its
   buttons stay above the keyboard. Picked once when the card opens, so nothing shifts while the keyboard comes and goes. */
body:not(.desktop-mode) #alienNameModal.fit-short{padding-top:calc(env(safe-area-inset-top) + 14px);}
body:not(.desktop-mode) #alienNameModal.fit-tiny{padding-top:calc(env(safe-area-inset-top) + 6px);}
#alienNameModal.fit-tiny #alienNameBox{padding-top:.9rem;padding-bottom:.9rem;gap:.5rem;}
#alienNameModal.fit-tiny #alienProfileBuddy{width:92px!important;height:92px!important;}
#alienNameModal.fit-tiny #alienNamePreview{margin:0;}

/* ── v0.2.137 KEYBOARD STEADY (js/61-keyboard-steady.js): touch screens type into an invisible box at the top of
   the screen so Safari never scrolls; the box you tapped shows a focus ring + a drawn caret ── */
.kbs-catcher{position:fixed;top:4px;left:50%;width:1px;height:1px;min-width:0;margin:0;padding:0;border:0;border-radius:0;opacity:0;
  font-size:16px;color:transparent;background:transparent;caret-color:transparent;pointer-events:none;z-index:1;-webkit-user-select:text;user-select:text;-webkit-appearance:none;appearance:none;}
#kbsCaret{display:none;position:fixed;left:0;top:0;width:2px;height:16px;border-radius:1px;pointer-events:none;z-index:2147483000;}
#kbsCaret.kbs-blink{animation:btBlink 1.06s steps(1,end) .5s infinite;}
input.kbs-on{box-shadow:0 0 0 1.5px currentColor!important;}
input.kbs-all{background-image:linear-gradient(rgba(110,160,255,.3),rgba(110,160,255,.3))!important;}
@media (hover:none) and (pointer:coarse){
  .pa-search{font-size:16px;}
  #seqBpmDisplay input{font-size:16px!important;width:54px!important;}
}
/* v0.2.137: the shop's DISMISS button is now a small ✕ in the card's corner (a + when it brings a card back).
   The circle you see is 24px; the button itself is 34px, so it's easy to hit. */
.shop-dismiss-btn{right:.2rem;top:.2rem;width:34px;height:34px;padding:0;border:0;border-radius:50%;color:#7c7c9c;font-size:0;letter-spacing:0;line-height:0;
  background:radial-gradient(circle,#0c0c16 0,#0c0c16 11px,#30304a 11.5px,#30304a 12.5px,rgba(48,48,74,0) 13px);-webkit-tap-highlight-color:transparent;transition:transform .2s,color .15s;}
.shop-dismiss-btn::before,.shop-dismiss-btn::after{content:'';position:absolute;left:50%;top:50%;width:11px;height:1.6px;border-radius:1px;background:currentColor;}
.shop-dismiss-btn::before{transform:translate(-50%,-50%) rotate(45deg);}
.shop-dismiss-btn::after{transform:translate(-50%,-50%) rotate(-45deg);}
.shop-dismiss-btn.restore{transform:rotate(45deg);color:#a6abff;}
.shop-dismiss-btn:active{color:#e2e4ff;background:radial-gradient(circle,#1c1c2e 0,#1c1c2e 11px,#4a4a7a 11.5px,#4a4a7a 12.5px,rgba(74,74,122,0) 13px);}
.drum-card-header.has-x,.upgrade-card-header.has-x{padding-right:30px;}
/* v0.2.137: on phones, pop-ups that have a text box sit near the TOP, so their box is already clear of the keyboard
   and nothing has to move when it comes up. (The save sheets drop down from the top instead of rising from below.) */
@keyframes kbsDrop{from{transform:translateY(-100%)}to{transform:translateY(0)}}
@media (hover:none) and (pointer:coarse){
  #savePatModal,#saveArrModal{align-items:flex-start!important;}
  #savePatModal>div,#saveArrModal>div{border-radius:0 0 20px 20px!important;padding:calc(env(safe-area-inset-top) + 1.1rem) 1.4rem 1.3rem!important;animation:kbsDrop .22s cubic-bezier(.34,1.1,.64,1)!important;}
  #patStartModal,.more-modal.kbs-top{align-items:flex-start!important;padding-top:calc(env(safe-area-inset-top) + 18px)!important;}
}
.kbs-spacer{flex:none;pointer-events:none;}
/* v0.2.137 (phones): the sound picker keeps one height, so it doesn't grow and shrink (moving the search box) as
   you type a search, and short result lists sit up high where the keyboard can't cover them */
@media (hover:none) and (pointer:coarse){#padAssignInner{height:84vh;max-height:84vh;}#padAssignList{flex:1 1 auto;min-height:0;}}

/* v0.2.138 organic skill tree: curved links, nebula glow, planet orbit rings (js/62-tree-layout.js) */
.st-links{position:absolute;overflow:visible;pointer-events:none;}
.st-link{fill:none;stroke-linecap:round;stroke-width:2.5;}
.st-link.ghost{stroke:#0f1328;stroke-width:2;}
.st-link.dim{stroke:#1e2648;stroke-width:2.2;}
.st-link.lit{stroke-opacity:.45;stroke-width:3;}
.st-link.next{stroke-opacity:.9;stroke-width:3;stroke-dasharray:1 9;animation:stFlow 1.4s linear infinite;}
@keyframes stFlow{to{stroke-dashoffset:-20;}}
body:not(.desktop-mode) .st-link.next{animation:none;}
@media (prefers-reduced-motion:reduce){.st-link.next{animation:none;}}
#skillTreeModal.st-3d .st-link{stroke-width:3.5;}
#skillTreeModal.st-3d .st-link.ghost{stroke-width:2.5;}
.st-nebula{position:absolute;border-radius:50%;pointer-events:none;}
.st-halo{position:absolute;border-radius:50%;border:2px dashed;pointer-events:none;opacity:.45;}
.st-halo.on{opacity:.85;}

/* v0.2.139 unlock cutscenes (js/63-unlock-cutscenes.js): same look as the galaxy launch, tinted per scene (--usc) */
#unlockScene{position:fixed;top:0;right:0;bottom:0;left:0;z-index:900;display:none;background:#02030a;touch-action:none;--usc:#ffd25a;}
#unlockScene.on{display:block;}
#unlockScene canvas{position:absolute;top:0;left:0;}
#unlockScene .us-text{position:absolute;left:0;right:0;top:66%;text-align:center;pointer-events:none;}
#unlockScene .us-kicker,#unlockScene .us-title,#unlockScene .us-sub{opacity:0;transform:translateY(14px);transition:opacity .4s,transform .9s cubic-bezier(.2,.8,.2,1),letter-spacing 1.4s cubic-bezier(.2,.8,.2,1);}
#unlockScene .us-kicker{font-family:'Bebas Neue',sans-serif;font-size:1.3rem;letter-spacing:.35em;color:var(--usc);text-shadow:0 0 12px var(--usc);}
#unlockScene .us-title{font-family:'Bebas Neue',sans-serif;font-size:2.7rem;letter-spacing:.32em;color:#f2fbff;line-height:1.05;text-shadow:0 0 22px var(--usc);padding:0 1rem;transform:scale(.9);transition-delay:.08s;}
#unlockScene .us-sub{font-family:'Bebas Neue',sans-serif;font-size:1.15rem;letter-spacing:.14em;color:rgba(230,240,255,.8);margin-top:.35rem;padding:0 1rem;transition-delay:.25s;}
#unlockScene.us-show .us-kicker,#unlockScene.us-show .us-sub{opacity:1;transform:none;}
#unlockScene.us-show .us-title{opacity:1;transform:none;letter-spacing:.1em;}
#unlockScene .us-skip{position:absolute;bottom:calc(1.4rem + env(safe-area-inset-bottom,0px));left:0;right:0;text-align:center;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.25em;color:rgba(200,230,255,.35);}
#stDetailBuyBtn.replay{border-color:#2a3f6a;background:#060b18;color:#8fc4ff;}
/* the node you just unlocked gets two bright rings when the map lands on it */
.st-node.st-fresh .st-node-circle{animation:stFresh 1.1s ease-out 2;}
@keyframes stFresh{0%{box-shadow:0 0 0 0 rgba(255,255,255,.9),0 0 18px 4px rgba(255,255,255,.5);}100%{box-shadow:0 0 0 26px rgba(255,255,255,0),0 0 18px 4px rgba(255,255,255,0);}}

/* ═══════ NEW-FILE INTRO: the three real pages come together ═══════ */
#introStage{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9;display:none;pointer-events:none;background:radial-gradient(ellipse at 50% 42%,#15153a 0%,#08081c 55%,#020208 100%);transition:opacity .8s;}
#introStage.on{display:block;}
#introStage canvas{position:absolute;left:0;top:0;}
#introStage .in-lbl{position:absolute;transform:translateX(-50%);font-family:'Bebas Neue',sans-serif;font-size:24px;font-size:clamp(20px,2.6vw,30px);letter-spacing:.22em;color:#8f9ce8;white-space:nowrap;text-shadow:0 0 14px rgba(120,140,255,.55);transition:color .35s,text-shadow .35s;}
#introStage .in-lbl.foc{color:#fff;text-shadow:0 0 16px rgba(160,180,255,.95);}
#introCatch{position:fixed;top:0;right:0;bottom:0;left:0;z-index:950;display:none;touch-action:none;}
#introCatch.on{display:block;}
#introCatch .in-skip{position:absolute;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);font-family:'Bebas Neue',sans-serif;font-size:16px;letter-spacing:.2em;color:rgba(200,210,255,.55);animation:inSkip 1s .9s both;}
@keyframes inSkip{from{opacity:0}}
html body.intro-run.intro-run #gameView,html body.intro-run.intro-run #storeView,html body.intro-run.intro-run #bunkerView{transform:var(--itf) !important;transition:none !important;will-change:transform,opacity;overflow:hidden;border-radius:var(--itr,0);box-shadow:0 0 0 6px rgba(140,160,255,var(--ita,0)),0 24px 70px rgba(0,0,0,.65);}
html body.intro-run.intro-run #gameView{background:#0a0a0a;}
html body.intro-run.intro-run #bunkerView{background:#0b0b10;}
body.intro-run #soundboardBtn,body.intro-run #settingsOpenBtn,body.intro-run #padEditToggleBtn,body.intro-run #socialsBtn,body.intro-run #partyBtn,body.intro-run #pageDots,body.intro-run #collapseBunkerBtn,body.intro-run #collapseShopBtn,body.intro-run #dawFillBtn,body.intro-run #dawFillBtnR,body.intro-run #editModeBadge,body.intro-run #arrowActivate,body.intro-run #arrowShop,body.intro-run #zoomResetBtn{opacity:0 !important;pointer-events:none !important;}
body.intro-run #alienLayer{visibility:hidden;}
body.intro-ui-in #soundboardBtn,body.intro-ui-in #settingsOpenBtn,body.intro-ui-in #padEditToggleBtn,body.intro-ui-in #socialsBtn,body.intro-ui-in #pageDots,body.intro-ui-in #collapseBunkerBtn,body.intro-ui-in #collapseShopBtn{animation:introUiIn .7s ease-out both;}
@keyframes introUiIn{from{opacity:0;transform:translateY(8px);}}
/* page parts building themselves (each has its own start time in --ibd) */
body.intro-run .ib{animation-duration:.55s;animation-delay:var(--ibd,0s);animation-fill-mode:both;animation-timing-function:cubic-bezier(.3,1.5,.6,1);}
body.intro-run .ib-pop{animation-name:ibPop;}
body.intro-run .ib-drop{animation-name:ibDrop;animation-timing-function:cubic-bezier(.2,1.25,.5,1);}
body.intro-run .ib-rise{animation-name:ibRise;animation-timing-function:cubic-bezier(.2,1.2,.5,1);}
body.intro-run .ib-slide{animation-name:ibSlide;animation-timing-function:cubic-bezier(.2,1.15,.5,1);}
@keyframes ibPop{from{opacity:0;transform:scale(.35);}}
@keyframes ibDrop{from{opacity:0;transform:translateY(-70px);}}
@keyframes ibRise{from{opacity:0;transform:translateY(60px);}}
@keyframes ibSlide{from{opacity:0;transform:translateX(90px);}}
/* the light that sweeps over as the game wakes up, and the hi-hat calling you */
#introSweep{position:fixed;top:0;bottom:0;left:0;width:45vw;z-index:940;pointer-events:none;opacity:0;background:linear-gradient(100deg,rgba(255,255,255,0) 0%,rgba(190,215,255,.16) 45%,rgba(255,255,255,.28) 50%,rgba(190,215,255,.16) 55%,rgba(255,255,255,0) 100%);}
#introSweep.go{animation:introSweep .9s cubic-bezier(.4,0,.3,1) both;}
@keyframes introSweep{0%{opacity:1;transform:translateX(-50vw);}100%{opacity:1;transform:translateX(150vw);}}
.pad.intro-hi{animation:introHi 1.1s ease-out infinite !important;}
@keyframes introHi{0%{box-shadow:0 0 0 0 rgba(150,190,255,.85),0 0 22px rgba(150,190,255,.6);}100%{box-shadow:0 0 0 18px rgba(150,190,255,0),0 0 0 rgba(150,190,255,0);}}
body.mobile-view-mode #settingsIntroRow{display:none;}

/* ═══════ FIRST SEQUENCER TRACK: boot-up ═══════ */
.seq-area.seq-boot{animation:seqBootGlow 1.5s ease-out both;}
@keyframes seqBootGlow{0%{box-shadow:0 0 0 0 rgba(68,238,187,0);}25%{box-shadow:0 0 0 2px rgba(68,238,187,.9),0 0 28px rgba(68,238,187,.55);}100%{box-shadow:0 0 0 0 rgba(68,238,187,0);}}
.seq-prep .seq-step,.seq-prep .seq-ph-cell,.seq-prep .seq-layer-row{opacity:0;}
.seq-boot .sq-pop{animation:sqPop .5s var(--ibd,0s) cubic-bezier(.3,1.6,.6,1) both;}
@keyframes sqPop{0%{opacity:0;transform:scale(.3);}45%{opacity:1;background-color:rgba(68,238,187,.85);box-shadow:0 0 10px rgba(68,238,187,.8);}}
.seq-boot .sq-row{animation:ibSlide .45s var(--ibd,0s) cubic-bezier(.2,1.15,.5,1) both;}
.seq-boot-sweep{position:absolute;top:0;bottom:0;left:0;width:18%;pointer-events:none;z-index:5;border-radius:inherit;background:linear-gradient(90deg,rgba(68,238,187,0),rgba(68,238,187,.35) 50%,rgba(68,238,187,0));animation:seqSweep .95s .12s cubic-bezier(.45,0,.4,1) both;}
@keyframes seqSweep{from{transform:translateX(-100%);opacity:1;}90%{opacity:1;}to{transform:translateX(560%);opacity:0;}}

/* ═══════ ALIEN PARTY unlock: disco ball over the real screen ═══════ */
#partyFx{position:fixed;top:0;right:0;bottom:0;left:0;z-index:14;display:none;touch-action:none;}
#partyFx.on{display:block;}
body.desktop-mode #partyFx{z-index:170;}
#partyBtn.pb-land{animation:pbLand .7s cubic-bezier(.3,1.6,.5,1) both,partyBtnPulse 1s ease-in-out .7s 3 !important;}
@keyframes pbLand{0%{transform:translateY(-60px) scale(.4);opacity:0;}60%{opacity:1;}100%{transform:none;opacity:1;}}

/* sequencer sound picker: FILL 1 2 3 4 ALL (quick-start a beat with the track's sound) */
.mini-picker{max-height:300px;max-height:min(300px,72vh);}
.mp-fill{margin:0 0 .45rem;padding:0 0 .5rem;border-bottom:1px solid #1d1d36;}
.mp-fill-hd{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.1em;color:#8a8ab0;margin:0 0 .3rem .1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mp-fill-row{display:flex;gap:4px;}
.mp-fill-btn{flex:1 1 0;min-width:0;height:32px;padding:0;font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.04em;line-height:1;border-radius:6px;border:1px solid #2a2a4a;background:#111124;color:#9a9ac0;cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;transition:background .1s,color .1s,border-color .1s;}
.mp-fill-btn.all{flex:1.5 1 0;}
/* v0.2.171: 1–8 in two rows, CLEAR tall on the right */
.mp-fill-row.mp-fill-grid{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:32px;gap:4px;}
.mp-fill-grid .mp-fill-btn{height:auto;}
.mp-fill-grid .mp-fill-btn.all{grid-column:1 / span 2;}
.mp-fill-grid .mp-fill-btn.clear{grid-column:3 / span 2;font-size:1rem;letter-spacing:.08em;color:#ff6b7a;border-color:#4a2230;background:#1a0d14;}
.mp-fill-grid .mp-fill-btn.clear:active{background:#2a1220;}
.mp-fill-btn:active{transform:scale(.94);}
.mp-fill-btn.on{background:var(--lc);border-color:var(--lc);color:#0a0a14;box-shadow:0 0 8px -2px var(--lc);}
.seq-step.mp-filled{animation:mpFilled .4s cubic-bezier(.3,1.6,.6,1);}
@keyframes mpFilled{0%{transform:scale(.45);}}

/* ═══════ BUNKER / SHOP buttons: chunkier, glowing, with little drawn icons ═══════ */
#openBunkerBtn,#openStoreBtn{display:inline-flex;align-items:center;gap:.34rem;font-size:.98rem;letter-spacing:.11em;line-height:1;padding:.42rem .72rem .42rem .52rem;border-radius:13px;border:1.5px solid;overflow:hidden;
  transition:filter .15s,box-shadow .2s,border-color .2s;-webkit-tap-highlight-color:transparent;}
#openBunkerBtn{color:#5dffb0;border-color:rgba(0,255,136,.55);background:linear-gradient(180deg,#123b2a 0%,#0a1d13 55%,#07130d 100%);
  box-shadow:0 0 14px -5px rgba(0,255,136,.8),inset 0 1px 0 rgba(255,255,255,.16),inset 0 -2px 0 rgba(0,0,0,.4);}
#openStoreBtn{color:#ffe14d;border-color:rgba(255,210,63,.62);background:linear-gradient(180deg,#3d3008 0%,#1d1704 55%,#131003 100%);
  box-shadow:0 0 14px -5px rgba(255,210,63,.8),inset 0 1px 0 rgba(255,255,255,.18),inset 0 -2px 0 rgba(0,0,0,.4);}
#openBunkerBtn:active,#openStoreBtn:active{filter:brightness(1.35);}
#openBunkerBtn:active{background:linear-gradient(180deg,#123b2a 0%,#0a1d13 55%,#07130d 100%);border-color:#00ff88;}
#openStoreBtn:active{background:linear-gradient(180deg,#3d3008 0%,#1d1704 55%,#131003 100%);border-color:#ffe14d;}
.nb-ico{width:19px;height:19px;flex-shrink:0;display:block;filter:drop-shadow(0 0 3px currentColor);}
.nb-lbl{display:block;padding-top:1px;}
/* a soft shine sweeps across now and then */
#openBunkerBtn::after,#openStoreBtn::after{content:'';position:absolute;top:0;bottom:0;left:-60%;width:45%;pointer-events:none;
  background:linear-gradient(100deg,rgba(255,255,255,0),rgba(255,255,255,.2),rgba(255,255,255,0));animation:nbShine 6s ease-in-out infinite;}
#openStoreBtn::after{animation-delay:3s;}
@keyframes nbShine{0%,80%{left:-60%;}100%{left:130%;}}
body.phone-land #openBunkerBtn,body.phone-land #openStoreBtn{font-size:.8rem;padding:.26rem .55rem .26rem .42rem;border-radius:10px;}
body.phone-land .nb-ico{width:15px;height:15px;}
/* SHOP: something new you can afford (until you look) */
#openStoreBtn.nb-deal{animation:nbDeal 1.5s ease-in-out infinite;}
@keyframes nbDeal{0%,100%{box-shadow:0 0 10px -4px rgba(255,210,63,.7),inset 0 1px 0 rgba(255,255,255,.18);}50%{box-shadow:0 0 22px 1px rgba(255,210,63,.8),inset 0 1px 0 rgba(255,255,255,.18);border-color:#ffe14d;}}
#openStoreBtn.nb-deal::before,#collapseShopBtn.nb-deal::before{content:'';position:absolute;top:3px;right:3px;width:8px;height:8px;border-radius:50%;background:#ff4f7a;box-shadow:0 0 6px #ff4f7a;animation:nbDot 1.5s ease-in-out infinite;}
@keyframes nbDot{50%{transform:scale(1.3);}}
/* BUNKER: your buddy's home is new (until you visit) */
#openBunkerBtn.nb-new,#collapseBunkerBtn.nb-new{animation:leadGlow 1.4s ease-in-out infinite;}
/* desktop side tabs, same colours */
#collapseBunkerBtn{color:#5dffb0;border-color:rgba(0,255,136,.6);background:linear-gradient(90deg,#07130d,#123b2a);box-shadow:0 0 14px -4px rgba(0,255,136,.7),inset 0 1px 0 rgba(255,255,255,.14);border-radius:0 11px 11px 0;border-left:none;padding:.7rem .4rem;}
#collapseShopBtn{color:#ffe14d;border-color:rgba(255,210,63,.65);background:linear-gradient(270deg,#131003,#3d3008);box-shadow:0 0 14px -4px rgba(255,210,63,.7),inset 0 1px 0 rgba(255,255,255,.16);border-radius:11px 0 0 11px;border-right:none;padding:.7rem .4rem;}
#collapseBunkerBtn:hover{color:#c8ffe4;border-color:#00ff88;background:linear-gradient(90deg,#0a1d13,#1a4d37);box-shadow:0 0 20px -3px rgba(0,255,136,.8);}
#collapseShopBtn:hover{color:#fff4b0;border-color:#ffe14d;background:linear-gradient(270deg,#1d1704,#4d3d0a);box-shadow:0 0 20px -3px rgba(255,210,63,.8);}
#collapseShopBtn.nb-deal{animation:nbDealTab 1.5s ease-in-out infinite;}
@keyframes nbDealTab{50%{box-shadow:0 0 24px 0 rgba(255,210,63,.85);border-color:#ffe14d;}}
#collapseBunkerBtn,#collapseShopBtn{position:fixed;overflow:visible;}

/* ═══════ locked until the first buddy ═══════ */
body.nav-locked #openBunkerBtn,body.nav-locked #openStoreBtn{visibility:hidden;pointer-events:none;}
body.nav-locked #collapseBunkerBtn,body.nav-locked #collapseShopBtn,body.nav-locked #pageDots{display:none !important;}
body.nav-locked.desktop-mode:not(.intro-run) #bunkerView,body.nav-locked.desktop-mode:not(.intro-run) #storeView{width:0 !important;overflow:hidden;border:none;}
/* …and they pop in when the first buddy has hatched */
body.nav-reveal #openBunkerBtn,body.nav-reveal #openStoreBtn,body.nav-reveal #collapseBunkerBtn,body.nav-reveal #collapseShopBtn{animation:navPopIn .65s cubic-bezier(.3,1.6,.5,1) both;}
body.nav-reveal #openStoreBtn,body.nav-reveal #collapseShopBtn{animation-delay:.45s;}
@keyframes navPopIn{0%{opacity:0;transform:translateY(-50%) scale(.2);}60%{opacity:1;}}

/* ═══════ the first egg, waiting next to the score ═══════ */
#padEgg{position:absolute;z-index:6;display:flex;flex-direction:column;align-items:center;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;}
#padEgg .pe-body{transform-origin:50% 88%;will-change:transform;}
#padEgg canvas{display:block;}
#padEgg .pe-glow{position:absolute;left:50%;top:44%;width:96px;height:96px;margin:-48px 0 0 -48px;border-radius:50%;pointer-events:none;opacity:0;transition:opacity .4s;
  background:radial-gradient(circle,rgba(0,255,136,.42) 0%,rgba(0,255,136,.14) 45%,rgba(0,255,136,0) 70%);}
#padEgg.ready .pe-glow{opacity:1;animation:peGlow 1.5s ease-in-out infinite;}
@keyframes peGlow{50%{transform:scale(1.18);}}
#padEgg .pe-tag{margin-top:-2px;font-family:'Bebas Neue',sans-serif;font-size:15px;letter-spacing:.08em;line-height:1;padding:3px 8px 2px;border-radius:999px;color:#c9c2a8;background:rgba(20,18,12,.85);border:1px solid rgba(255,240,200,.25);white-space:nowrap;}
#padEgg.ready .pe-tag{color:#00ff88;border-color:rgba(0,255,136,.7);box-shadow:0 0 10px -2px rgba(0,255,136,.7);}
#padEgg .pe-tag.bump{animation:peBump .4s cubic-bezier(.3,1.6,.5,1);}
@keyframes peBump{40%{transform:scale(1.25);color:#fff;}}
#padEgg.rolling{animation:peRoll 1.2s cubic-bezier(.25,.7,.35,1) both;}
#padEgg.rolling .pe-tag{animation:peTagIn .35s .95s both;}
@keyframes peRoll{0%{transform:translateX(75vw) rotate(720deg);opacity:0;}8%{opacity:1;}72%{transform:translateX(-10px) rotate(-14deg);}86%{transform:translateX(4px) rotate(6deg);}100%{transform:none;}}
@keyframes peTagIn{from{opacity:0;transform:translateY(-6px) scale(.6);}}
#padEggFly{position:fixed;z-index:401;pointer-events:none;transform-origin:50% 50%;}
body.intro-run #padEgg,body.store-open:not(.desktop-mode) #padEgg,body.bunker-open:not(.desktop-mode) #padEgg{visibility:hidden;}

/* ═══════ SEQUENCER TEASER: a dashed outline with its price, from the very start ═══════ */
.seq-teaser{display:flex;flex-direction:column;gap:.45rem;width:100%;box-sizing:border-box;margin:.35rem 0 .25rem;padding:.6rem .75rem .55rem;border:2px dashed rgba(68,238,187,.36);border-radius:14px;
  background:rgba(68,238,187,.025);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:'Bebas Neue',sans-serif;color:#5f8f80;position:relative;text-align:left;transition:border-color .3s,background .3s;}
.seq-teaser .sqt-head{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;}
.seq-teaser .sqt-name{font-size:1.05rem;letter-spacing:.32em;color:#6fd8b6;opacity:.7;}
.seq-teaser .sqt-price{font-size:1.15rem;letter-spacing:.06em;color:#9ab8ae;}
.seq-teaser .sqt-price small{font-size:.72em;margin-left:.2em;letter-spacing:.1em;opacity:.8;}
.seq-teaser .sqt-steps{display:flex;gap:4px;}
.seq-teaser .sqt-step{flex:1 1 0;min-width:0;height:22px;border-radius:5px;border:1.5px dashed rgba(68,238,187,.22);box-sizing:border-box;transition:background .25s,border-color .25s,box-shadow .25s;}
.seq-teaser .sqt-step.beat{border-color:rgba(68,238,187,.42);}
.seq-teaser .sqt-step.on{background:rgba(68,238,187,.45);border-style:solid;border-color:rgba(68,238,187,.8);}
.seq-teaser .sqt-step.lit{background:rgba(160,255,225,.85);border-style:solid;border-color:#b8ffe8;box-shadow:0 0 10px rgba(68,238,187,.8);transition:none;}
.seq-teaser.fade .sqt-step.on{background:transparent;border-style:dashed;border-color:rgba(68,238,187,.22);transition:all .6s;}
.seq-teaser .sqt-bar{display:block;height:3px;border-radius:2px;background:rgba(68,238,187,.1);overflow:hidden;}
#seqTeaserFill{display:block;height:100%;width:0;background:linear-gradient(90deg,#1f7a5f,#44eebb);transition:width .4s;}
.seq-teaser:active{background:rgba(68,238,187,.07);}
.seq-teaser.ready{border-color:#44eebb;animation:sqtReady 1.4s ease-in-out infinite;}
.seq-teaser.ready .sqt-name{opacity:1;color:#b8ffe8;}
.seq-teaser.ready .sqt-price{color:#44eebb;}
@keyframes sqtReady{50%{box-shadow:0 0 22px -2px rgba(68,238,187,.55);background:rgba(68,238,187,.08);}}
body.phone-land .seq-teaser{margin:.2rem 0;padding:.4rem .6rem;gap:.3rem;}
body.phone-land .seq-teaser .sqt-step{height:16px;}
@media (max-height:700px){.seq-teaser{padding:.45rem .65rem .4rem;gap:.35rem;}.seq-teaser .sqt-step{height:18px;}}
body.phone-land #padEgg .pe-tag{font-size:12px;padding:2px 6px 1px;}
body.phone-land #padEgg .pe-glow{width:60px;height:60px;margin:-30px 0 0 -30px;}
body.phone-land #padEgg{flex-direction:row-reverse;align-items:center;gap:3px;}
body.phone-land #padEgg .pe-tag{margin-top:0;}

/* ♪ GROOVE (next to VIEW): lit while the background groove is on */
#vtbGrooveBtn[data-on="1"]{color:#7dffc4 !important;border-color:rgba(68,238,187,.65) !important;box-shadow:0 0 10px -3px rgba(68,238,187,.6);}
#vtbGrooveBtn[data-on="0"]{opacity:.6;}
#vtbGrooveBtn{flex:0 0 auto;min-width:2.4em;font-size:1.05rem;line-height:1;padding-left:.55rem;padding-right:.55rem;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;}

/* ═══════ ALIEN PARTY card: same build as PET ALIEN BUDDY beside it, so they line up (same height, prices on one line) ═══════ */
body.shop-b .shop-shelf #alienBuyBtn,body.shop-b .shop-shelf #partyStoreCard{align-self:stretch;}
body.shop-b .shop-shelf #alienBuyBtn .alien-card-price,body.shop-b .shop-shelf #partyStoreCard .alien-card-price{margin-top:auto;}
.party-store-card{position:relative;overflow:hidden;background:linear-gradient(155deg,#2b0a2c 0%,#170619 55%,#0e0412 100%);border-color:#4a1a4a;}
.party-store-card::before{content:'';position:absolute;top:-30%;right:-20%;width:90%;height:120%;pointer-events:none;opacity:.55;
  background:conic-gradient(from 200deg at 78% 18%,rgba(255,95,184,0) 0deg,rgba(255,95,184,.22) 12deg,rgba(255,95,184,0) 24deg,rgba(63,230,255,.18) 40deg,rgba(63,230,255,0) 52deg,rgba(255,210,63,.16) 68deg,rgba(255,210,63,0) 80deg);}
.party-store-card .alien-card-info{position:relative;z-index:1;padding-right:34px;}
.party-store-card .alien-card-name{color:#ff6ee6;text-shadow:0 0 10px rgba(255,80,220,.45);}
.party-store-card .alien-card-stats{color:#9a5a96;}
.party-store-card .alien-card-stats span{color:#ffa6f2;}
.party-store-card .psc-next{font-family:'Bebas Neue',sans-serif;font-size:.95rem;letter-spacing:.08em;line-height:1.1;color:#e9d2ff;margin-top:.15rem;}
.party-store-card .alien-card-price{position:relative;z-index:1;color:#ff6ee6;}
.party-store-card .alien-card-price small{color:#8a4a86;}
.party-store-card .alien-card-price.cant-afford{color:#ff4444;}
.party-store-card .alien-card-price.cant-afford small{color:#663333;}
.party-store-card.buyable{border-color:#ff44dd;box-shadow:0 0 16px -5px rgba(255,68,221,.75),inset 0 1px 0 rgba(255,255,255,.08);}
.party-store-card.buyable:active{background:linear-gradient(155deg,#3a0e3c 0%,#200822 55%,#140618 100%);}
.party-store-card.locked{opacity:.72;}
.party-store-card.maxed{cursor:default;border-color:#6a2a66;}
/* a little disco ball hanging in the corner */
.psc-ball{position:absolute;top:16px;right:12px;width:26px;height:26px;border-radius:50%;z-index:1;
  background:radial-gradient(circle at 34% 30%,rgba(255,255,255,.95) 0 9%,rgba(255,255,255,0) 32%),
    repeating-linear-gradient(0deg,rgba(20,10,40,.35) 0 1px,transparent 1px 4.4px),
    repeating-linear-gradient(90deg,rgba(20,10,40,.35) 0 1px,transparent 1px 4.4px),
    radial-gradient(circle at 45% 40%,#f2f0ff 0%,#b9b6dc 45%,#5a5682 100%);
  box-shadow:0 0 10px rgba(255,140,240,.55);animation:pscSpin 3s linear infinite;}
.psc-ball::before{content:'';position:absolute;left:50%;bottom:100%;width:1px;height:16px;margin-left:-.5px;background:rgba(220,210,255,.55);}
.psc-ball::after{content:'';position:absolute;top:3px;left:15px;width:4px;height:4px;border-radius:50%;background:#fff;box-shadow:0 0 6px 2px #fff;animation:pscTwinkle 1.6s ease-in-out infinite;}
@keyframes pscSpin{to{background-position:0 0,4.4px 0,0 4.4px,0 0;filter:hue-rotate(0deg);}}
@keyframes pscTwinkle{0%,100%{opacity:0;transform:scale(.4);}50%{opacity:1;transform:scale(1);}}

/* ═══════ the party button during a party: the style's name, a dot per style (tap = next style, past the last one
   = party over), and press-and-hold fills it up to end the party ═══════ */
#partyBtn{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;}
#partyBtn.pb-split{display:none;align-items:center;white-space:nowrap;position:fixed;overflow:hidden;}
#partyBtn.pb-split.visible{display:inline-flex;}
#partyBtn.pb-multi .pb-style{color:#ffd2ff;}
#partyBtn .pb-pips{display:inline-flex;gap:4px;margin-left:.55rem;align-items:center;}
#partyBtn .pb-pips i{display:block;width:6px;height:6px;border-radius:50%;background:rgba(255,140,240,.3);}
#partyBtn .pb-pips i.on{background:#ffd2ff;box-shadow:0 0 6px #ff8cf0;}
#partyBtn.pb-split::before{content:'';position:absolute;top:0;bottom:0;left:0;width:0;background:rgba(255,80,220,.35);pointer-events:none;}
#partyBtn.pb-holding::before{animation:pbHold .55s linear forwards;}
@keyframes pbHold{to{width:100%;}}
body.desktop-mode.bunker-open #partyBtn.pb-split{display:inline-flex !important;}
#partyStyleBtn{display:none !important;}

/* the disco ball that drops in when you start a party (under the party button, never in the way of taps) */
#partyFxStart{position:fixed;top:0;right:0;bottom:0;left:0;z-index:49;display:none;pointer-events:none;}
#partyFxStart.on{display:block;}
#partyFxStart canvas{display:block;}
#partyBtn.pb-split{padding-left:.8rem;padding-right:.8rem;}
#partyBtn.pb-tight{font-size:.82rem;padding:.48rem .6rem;}
#partyBtn.pb-tight .pb-pips{margin-left:.4rem;gap:3px;}
#partyBtn .pb-style,#partyBtn .pb-pips{position:relative;}

/* DRUMS | KEYS in the sequencer's button row (between VIEW and ♪) */
.keys-switch-seq{display:inline-flex;flex:0 0 auto;align-items:stretch;border:1px solid #4a3d99;border-radius:8px;background:#110d24;padding:2px;gap:2px;box-shadow:0 0 10px -5px #8f73ff;}
.keys-switch-seq button{font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.1em;line-height:1;padding:.3rem .55rem;border:0;border-radius:6px;background:transparent;color:#7d72b0;cursor:pointer;touch-action:manipulation;}
.keys-switch-seq button.on{background:#6b55d9;color:#fff;}
body.phone-land .keys-switch-seq button{font-size:.72rem;padding:.2rem .42rem;}


/* v0.2.147: before the first buddy, the sequencer teaser is an empty stage for the egg; it fades in with BUNKER/SHOP */
#seqTeaser.tz-hold{border-color:transparent!important;background:transparent!important;box-shadow:none!important;pointer-events:none;animation:none!important;}
#seqTeaser.tz-hold>*{visibility:hidden;}
#seqTeaser.tz-in{animation:tzIn 1.1s .5s cubic-bezier(.3,1.4,.5,1) both;}
@keyframes tzIn{0%{opacity:0;transform:scale(.92);}100%{opacity:1;transform:none;}}

/* v0.2.154: fallbacks for browsers without color-mix() (Safari 15 and older — an iPhone 7 tops out at iOS 15).
   Without these the tinted backgrounds and borders below were dropped there. */
@supports not (background:color-mix(in srgb,red 50%,transparent)){
  .seq-song-slot.playing{background:rgba(160,168,255,.1);}
  .seq-snd-pill{background:#11141a !important;border:1px solid var(--lc) !important;box-shadow:0 0 8px -3px var(--lc);}
  .ph-pads .ph-pad{background:radial-gradient(120% 140% at 0% 100%,rgba(255,255,255,.07),transparent 70%),linear-gradient(180deg,#141428,#0a0a16);
    box-shadow:inset 0 0 calc(18px + var(--cue,0)*26px) -8px var(--c),0 0 calc(8px + var(--cue,0)*22px) -6px var(--c),inset 0 -3px 0 var(--c);border-color:var(--c);}
  .ph-pad .ph-ico{background:#0d0d1a;}
  .ph-pad .ph-snd{border:1px solid rgba(255,255,255,.4);}
  .ph-pad .ph-keys{color:#fff;}
  .bd-tw{background:#0f0f1a;}
}
/* very narrow phones (under 360px wide): the map's title makes way so the gem count and CLOSE both fit */
@media (max-width:359px){#skillTreeTitle{display:none;}#skillTreeHeader{padding-left:.7rem;padding-right:.7rem;}}

/* v0.2.180: energy unit symbols (mJ, J, kJ, MJ …) in Space Mono: Bebas Neue has no lowercase, so "mJ" would read as megajoules */
.ju{font-family:'Space Mono',monospace;font-weight:700;text-transform:none;letter-spacing:-.03em;}
span.ju{font-size:.82em;}
.score .w-unit.ju{font-size:.32em;letter-spacing:-.02em;}

/* v0.2.181 matching game: BUDDIES OFF hides the buddies floating over the cards */
body.match-open.match-hide-buddies #alienLayer{visibility:hidden;}

/* v0.2.181: the whole bunker scrolls (js/75); the grid is full height and clips only for its pinch-zoom */
.bunker-body{overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;min-height:0;scrollbar-width:none;-ms-overflow-style:none;}
.bunker-body::-webkit-scrollbar{display:none;width:0;height:0;}
.bunker-grid-wrap{flex:none;overflow:hidden;}
/* the games buttons float at the bottom while you scroll */
#bunkerDock{position:-webkit-sticky;position:sticky;bottom:0;z-index:5;flex:none;margin:0 -1.1rem;padding:.9rem 0 .5rem;
  background:linear-gradient(rgba(10,10,10,0),rgba(10,10,10,.9) 38%,rgba(10,10,10,.97));}
#bunkerDock.empty{padding:0;background:none;}
#bunkerDock #mgList{padding:0 1rem .15rem !important;}
#bunkerDock #bbOpenBtn,#bunkerDock #mgGamesBtn{margin-top:.35rem;margin-bottom:.15rem;}
/* the scroll area ends above the buttons that sit over the bottom of the bunker (SETTINGS etc.), so nothing scrolls behind them
   and the floating dock lands right on top of them */
body .bunker-body{padding-bottom:0;margin-bottom:5.5rem;}
body.desktop-mode .bunker-body{padding-bottom:0;margin-bottom:5rem;}
body.phone-land .bunker-body{padding-bottom:0;margin-bottom:1.5rem;}
#bunkerView .bunker-progress-wrap{padding-bottom:.6rem;}

/* v0.2.182: one-time note on the file select after the official-run fresh start */
#runNotice{display:flex;flex-direction:column;align-items:center;gap:.45rem;text-align:center;margin:0 auto .9rem;max-width:26rem;padding:.8rem 1rem .9rem;
  border:1px solid #2a5a3a;border-radius:14px;background:rgba(6,20,13,.92);font-family:'Bebas Neue',sans-serif;}
#runNotice b{font-weight:normal;font-size:1.25rem;letter-spacing:.12em;color:#33ff99;}
#runNotice span{font-size:.95rem;letter-spacing:.06em;line-height:1.3;color:#9fd8bc;}
#runNotice button{font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.16em;padding:.4rem 1.2rem;border-radius:10px;border:1px solid #33ff99;background:#0a2a18;color:#33ff99;cursor:pointer;touch-action:manipulation;}

/* v0.2.182 Alien Designer: accessory tiles (HAT / GLASSES / SHOES) */
#bdSwatches.bd-accs{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem;}
.bd-acc{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:64px;height:70px;padding:3px;border-radius:10px;border:1px solid #1d4a36;background:#06140d;color:#8fd8b4;cursor:pointer;touch-action:manipulation;}
.bd-acc.on{border-color:#44eebb;box-shadow:0 0 10px -2px #44eebb;background:#0a2418;}
.bd-acc small{font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.06em;line-height:1;max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bd-acc canvas{width:44px;height:44px;}
.bd-none{font-size:1.2rem;color:#5f8f78;line-height:44px;height:44px;}
.bd-more{width:100%;text-align:center;font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.14em;color:#3f8a66;margin-top:.2rem;}

/* v0.2.183 Alien Awakening: the trail canvas sits behind every buddy; the party menu gets TRAILS + SPEED */
#trailCanvas{position:absolute;left:0;top:0;pointer-events:none;}
#partyMenu .pm-awake{border-top:1px solid rgba(255,255,255,.12);margin-top:.35rem;padding-top:.4rem;display:flex;flex-direction:column;gap:.3rem;}
#partyMenu .pm-sub{font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.2em;color:#7fe0c0;text-align:center;}
#partyMenu .pm-speed{display:flex;align-items:center;gap:.5rem;padding:.3rem .6rem;font-family:'Bebas Neue',sans-serif;letter-spacing:.12em;color:#cfe;font-size:1rem;touch-action:none;}
#partyMenu .pm-speed input{flex:1;min-width:110px;accent-color:#44eebb;}
#partyMenu .pm-speed b{font-weight:normal;min-width:2.6em;text-align:right;color:#44eebb;}

/* v0.2.184 Egg Incubator (js/77): lamps at the top of the bunker, waiting eggs, racer row, egg page, racer card, shop cards */
#incubatorSection{display:none!important;}
#eggArea{margin:.1rem 0 .6rem;}
#eggArea .inc-strip{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 2px 6px;-webkit-overflow-scrolling:touch;scrollbar-width:none;}
#eggArea .inc-strip::-webkit-scrollbar{display:none;}
#eggArea .inc-card{flex:0 0 calc((100% - 16px)/3);max-width:150px;scroll-snap-align:start;background:#06140d;border:1px solid #1f6a45;border-radius:12px;padding:0 0 .5rem;cursor:pointer;touch-action:manipulation;text-align:center;position:relative;}
#eggArea .inc-card.empty{border-color:#164030;}
#eggArea .inc-card.ready{border-color:#ffd23f;box-shadow:0 0 14px -4px rgba(255,210,63,.6);}
#eggArea .inc-art{display:block;width:100%;}
#eggArea .inc-lbl{font-family:'Bebas Neue',sans-serif;font-size:.78rem;letter-spacing:.08em;color:#5fbf8f;line-height:1.1;padding:0 .3rem;min-height:1.7em;display:flex;align-items:center;justify-content:center;}
#eggArea .inc-bar{height:6px;margin:.25rem .55rem 0;border-radius:3px;background:#0e2a1c;overflow:hidden;}
#eggArea .inc-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#ff8a3d,#ffd23f);border-radius:3px;}
#eggArea .inc-info{font-family:'Bebas Neue',sans-serif;font-size:.7rem;letter-spacing:.08em;color:#7fc7a2;margin-top:.25rem;min-height:1.1em;padding:0 .2rem;}
#eggArea .inc-power{font-family:'Bebas Neue',sans-serif;font-size:.72rem;letter-spacing:.1em;color:#ffb35a;text-align:center;margin:.1rem 0 .35rem;}
#eggArea .inc-tray-wrap{margin-top:.2rem;}
#eggArea .inc-sub{font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.14em;color:#2f9a68;margin:0 0 .2rem .1rem;}
#eggArea .inc-tray{display:flex;gap:.4rem;overflow-x:auto;background:#071a10;border:1px solid #164030;border-radius:10px;padding:.35rem;}
#eggArea .inc-tray-egg{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;background:none;border:1px solid transparent;border-radius:8px;padding:.1rem .3rem;cursor:pointer;color:#ffd23f;touch-action:manipulation;}
#eggArea .inc-tray-egg small{font-family:'Bebas Neue',sans-serif;font-size:.6rem;letter-spacing:.06em;white-space:nowrap;}
#eggArea .inc-need{font-family:'Bebas Neue',sans-serif;font-size:.7rem;letter-spacing:.12em;color:#3f8a66;margin-top:.3rem;text-align:center;}
#eggArea .inc-shake{animation:incShake .28s;}
@keyframes incShake{0%,100%{transform:none}25%{transform:translateX(-4px) rotate(-1.5deg)}75%{transform:translateX(4px) rotate(1.5deg)}}
.racer-row{margin:0 0 .5rem;}
.racer-cell{position:relative;}
.racer-cell .racer-shoe{position:absolute;right:1px;top:1px;width:11px;height:8px;opacity:.9;background:no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'><path d='M2 3c2 0 4 1 5 3l4 2c3 1 7 1 9 3v2H2z' fill='%23ffd23f'/><path d='M2 12h18' stroke='%23fff' stroke-width='1.5'/></svg>");}
#eggPage,#racerCard{position:fixed;inset:0;z-index:330;display:none;align-items:center;justify-content:center;background:rgba(3,8,6,.94);}
#eggPage.on,#racerCard.on{display:flex;}
#eggPage .ep-box{width:min(420px,94vw);max-height:96vh;overflow:auto;display:flex;flex-direction:column;align-items:center;gap:.45rem;padding:.6rem 0 1rem;}
#eggPage .ep-hdr{width:100%;display:flex;align-items:center;justify-content:space-between;}
#eggPage .ep-hdr button,#eggPage .ep-ctrls button,#racerCard button{font-family:'Bebas Neue',sans-serif;letter-spacing:.12em;font-size:.95rem;padding:.45rem .9rem;border-radius:10px;border:1px solid #1f6a45;background:#06140d;color:#9fe8c4;cursor:pointer;touch-action:manipulation;}
#eggPage .ep-title{font-family:'Bebas Neue',sans-serif;font-size:1.3rem;letter-spacing:.14em;}
#eggPage .ep-bar{width:70%;height:7px;border-radius:4px;background:#0e2a1c;overflow:hidden;}
#eggPage .ep-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#ff8a3d,#ffd23f);}
#eggPage .ep-info{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.12em;color:#7fc7a2;}
#eggPage .ep-grid{display:grid;grid-template-columns:repeat(16,1fr);gap:2px;width:100%;}
#eggPage .ep-cell{aspect-ratio:1;border:0;border-radius:3px;background:#0b2418;padding:0;cursor:pointer;touch-action:manipulation;}
#eggPage .ep-cell.beat{background:#123a28;}
#eggPage .ep-cell.on{background:var(--c);}
#eggPage .ep-cell.now{outline:2px solid #fff;outline-offset:-2px;}
#eggPage .ep-pads{display:flex;gap:.5rem;width:100%;}
#eggPage .ep-padw{flex:1;display:flex;flex-direction:column;gap:.3rem;}
#eggPage .ep-pad{height:min(26vw,110px);border-radius:14px;border:2px solid var(--c);background:#0a0f0c;color:var(--c);font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.1em;cursor:pointer;touch-action:none;-webkit-user-select:none;user-select:none;}
#eggPage .ep-pad.hit{animation:epHit .18s;}
@keyframes epHit{0%{background:var(--c);color:#000}100%{background:#0a0f0c}}
#eggPage .ep-swap{font-size:1rem;padding:.2rem;border-radius:8px;border:1px solid #1f3a2c;background:#06140d;color:#7fc7a2;cursor:pointer;}
#eggPage .ep-ctrls{display:flex;gap:.5rem;}
#eggPage .ep-rec{color:#ff6a6a!important;border-color:#5a1f1f!important;}
#eggPage .ep-rec.on{background:#3a0a0a!important;}
#racerCard .rc-box{width:min(380px,92vw);display:flex;flex-direction:column;align-items:center;gap:.5rem;background:#06140d;border:1px solid #1f6a45;border-radius:16px;padding:1rem .8rem;}
#racerCard .rc-kick{font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.2em;color:#7fe0c0;}
#racerCard input{font-family:'Bebas Neue',sans-serif;font-size:1.6rem;letter-spacing:.12em;text-align:center;background:transparent;border:0;border-bottom:1px dashed #1f6a45;width:80%;outline:none;}
#racerCard .rc-kind{font-family:'Bebas Neue',sans-serif;font-size:.75rem;letter-spacing:.12em;color:#5fbf8f;text-align:center;}
#racerCard .rc-btns{display:flex;gap:.5rem;}
.inc-shop.inc-cant .upgrade-price{color:#666;}
body.phone-land #eggArea .inc-card{max-width:118px;}

/* v0.2.184+ polish: on phones the floating buddies fade out over full pages (bunker, shop, vault) so they never cover what you tap;
   on every device they hide behind the egg page and the racer card. They keep floating underneath and fade back in on the main screen. */
#alienLayer{transition:opacity .3s,visibility 0s;}
body:not(.desktop-mode).bunker-open #alienLayer,body:not(.desktop-mode).store-open #alienLayer,body:not(.desktop-mode).vault-open #alienLayer,
body.egg-page-open #alienLayer,body.racer-open #alienLayer{opacity:0;visibility:hidden;transition:opacity .3s,visibility 0s .3s;}

/* v0.2.186 DNA Splice (js/78) */
#eggArea .inc-splice-btn{display:flex;align-items:center;justify-content:center;gap:.45rem;width:100%;margin-top:.5rem;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.16em;padding:.55rem;border-radius:12px;border:1px solid #3a6a1f;background:#0a1a06;color:#9dff3f;cursor:pointer;touch-action:manipulation;}
#eggArea .dna-ico{width:14px;height:18px;background:no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 20'><path d='M2 1c0 6 10 6 10 12s-10 4-10 6M12 1c0 6-10 6-10 12s10 4 10 6' fill='none' stroke='%239dff3f' stroke-width='1.6'/><path d='M4 5h6M3 9h8M3 13h8M4 17h6' stroke='%239dff3f' stroke-width='1' opacity='.6'/></svg>");}
#spliceView,#splicePick{position:fixed;inset:0;z-index:330;display:none;align-items:center;justify-content:center;background:rgba(3,8,4,.98);}
#spliceView.on,#splicePick.on{display:flex;}
#splicePick{z-index:335;}
#spliceView .sv-box{width:min(430px,94vw);max-height:96vh;overflow:auto;display:flex;flex-direction:column;align-items:center;gap:.55rem;padding:.6rem 0 1rem;}
#spliceView .sv-hdr,#splicePick .sv-hdr{width:100%;display:flex;align-items:center;justify-content:space-between;gap:.5rem;}
#spliceView button,#splicePick .sv-hdr button{font-family:'Bebas Neue',sans-serif;letter-spacing:.12em;font-size:.95rem;padding:.45rem .9rem;border-radius:10px;border:1px solid #3a6a1f;background:#0a1a06;color:#c6ff9a;cursor:pointer;touch-action:manipulation;}
#spliceView .sv-title,#splicePick .sv-title{font-family:'Bebas Neue',sans-serif;font-size:1.35rem;letter-spacing:.18em;color:#9dff3f;}
#spliceView .sv-parents{display:flex;align-items:center;justify-content:center;gap:.4rem;width:100%;}
#spliceView .sv-par{flex:1;display:flex;flex-direction:column;align-items:center;gap:.2rem;padding:.4rem .2rem!important;border-style:dashed!important;min-height:120px;justify-content:center;}
#spliceView .sv-par.set{border-style:solid!important;}
#spliceView .sv-par b{font-weight:normal;font-size:.85rem;letter-spacing:.08em;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#spliceView .sv-genes{display:flex;flex-direction:column;gap:.25rem;width:100%;}
#spliceView .sv-gene{display:flex;align-items:center;gap:.45rem;font-family:'Bebas Neue',sans-serif;letter-spacing:.1em;color:#7fc79a;font-size:.85rem;}
#spliceView .sv-gene span{width:5.2rem;}
#spliceView .sv-gene em{font-style:normal;font-size:.7rem;color:#3f7a4f;}
#spliceView .sv-gene small{font-size:.7rem;color:#ffd23f;letter-spacing:.12em;}
#spliceView .sv-chip{display:inline-block;width:26px;height:18px;border-radius:5px;border:2px solid rgba(255,255,255,.12);opacity:.55;}
#spliceView .sv-chip.on{opacity:1;border-color:#fff;box-shadow:0 0 8px rgba(255,255,255,.35);transform:scale(1.15);}
#spliceView .sv-genes.done .sv-chip:not(.on){opacity:.2;}
#spliceView .sv-note{font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.1em;color:#7fc79a;text-align:center;line-height:1.35;}
#spliceView .sv-go{font-size:1.15rem!important;padding:.65rem 1.4rem!important;border-color:#9dff3f!important;color:#9dff3f!important;}
#spliceView .sv-go.cant,#spliceView .sv-go:disabled{opacity:.45;}
#splicePick .sp-box{width:min(460px,94vw);max-height:92vh;display:flex;flex-direction:column;gap:.5rem;}
#splicePick .sp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:4px;overflow:auto;padding-bottom:1rem;}
#splicePick .sp-cell{display:flex;flex-direction:column;align-items:center;background:#0a1a0f;border:1px solid #1a3a24;border-radius:8px;padding:.2rem 0;cursor:pointer;touch-action:manipulation;color:#7fc79a;}
#splicePick .sp-cell.racer{border-color:#ffd23f;}
#splicePick .sp-cell:disabled{opacity:.25;}
#splicePick .sp-cell small{font-family:'Bebas Neue',sans-serif;font-size:.6rem;letter-spacing:.05em;max-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
body.splice-open #alienLayer{opacity:0;visibility:hidden;}

/* v0.2.187 Buddy Race (js/79) */
.race-open-btn{display:flex;align-items:center;justify-content:center;gap:.3rem;width:100%;margin:0 0 .6rem;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.16em;padding:.55rem;border-radius:12px;border:1px solid #6a5a1f;background:#1a1406;color:#ffd23f;cursor:pointer;touch-action:manipulation;}
#raceOverlay{position:fixed;inset:0;z-index:9600;display:none;background:#05060c;color:#e8e8f0;font-family:'Bebas Neue',sans-serif;-webkit-user-select:none;user-select:none;}
#raceOverlay.on{display:block;}
#raceOverlay button{font-family:'Bebas Neue',sans-serif;letter-spacing:.12em;font-size:1rem;padding:.5rem 1rem;border-radius:10px;border:1px solid #6a5a1f;background:#1a1406;color:#ffe9a0;cursor:pointer;touch-action:manipulation;}
#raceOverlay .rl-lobby,#raceOverlay .rl-res{position:absolute;inset:0;flex-direction:column;align-items:center;gap:.6rem;padding:max(.8rem,env(safe-area-inset-top)) 1rem 1rem;overflow:auto;}
#raceOverlay .rl-hdr{width:min(480px,100%);display:flex;align-items:center;justify-content:space-between;}
#raceOverlay .rl-title{font-size:1.6rem;letter-spacing:.18em;color:#ffd23f;text-align:center;}
#raceOverlay .rl-recs{display:flex;align-items:center;gap:.25rem;font-size:1.1rem;color:#ffd23f;min-width:3.6rem;justify-content:flex-end;}
#raceOverlay .rl-sub{font-size:.85rem;letter-spacing:.2em;color:#8a7a4a;margin-top:.3rem;}
#raceOverlay .rl-pick,#raceOverlay .rl-rivals{display:flex;flex-wrap:wrap;gap:.45rem;justify-content:center;width:min(480px,100%);}
#raceOverlay .rl-card{display:flex;flex-direction:column;align-items:center;padding:.3rem .4rem!important;border-radius:12px;border:1px solid #3a3420;background:#0e0c06;min-width:76px;}
#raceOverlay .rl-card.on{border-color:#ffd23f!important;box-shadow:0 0 12px -3px rgba(255,210,63,.6);}
#raceOverlay .rl-card.cpu{opacity:.8;min-width:64px;}
#raceOverlay .rl-card small{font-size:.75rem;letter-spacing:.08em;color:#e8dcb0;}
#raceOverlay .rl-prize{display:flex;align-items:center;gap:.3rem;font-size:.95rem;letter-spacing:.12em;color:#ffd23f;margin-top:.4rem;}
#raceOverlay .rl-go{font-size:1.3rem!important;padding:.65rem 2.2rem!important;border-color:#ffd23f!important;color:#ffd23f!important;}
#raceOverlay .rc-race{position:absolute;inset:0;flex-direction:column;}
#raceOverlay .rr-hud{display:flex;align-items:center;gap:.6rem;padding:max(.4rem,env(safe-area-inset-top)) .6rem .4rem;}
#raceOverlay .rr-hud button{padding:.3rem .7rem;}
#raceOverlay .rr-pos{font-size:1.5rem;color:#ffd23f;letter-spacing:.1em;min-width:2.6rem;}
#raceOverlay .rr-prog{flex:1;height:6px;border-radius:3px;background:#1a1a2a;overflow:hidden;}
#raceOverlay .rr-prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,#9dff3f,#ffd23f);}
#raceOverlay #rrCanvas{flex:1;width:100%;display:block;touch-action:none;}
#raceOverlay .rr-tap{position:absolute;left:0;right:0;bottom:max(1.2rem,env(safe-area-inset-bottom));text-align:center;font-size:1.1rem;letter-spacing:.25em;color:rgba(255,255,255,.65);transition:opacity .4s;pointer-events:none;}
#raceOverlay .res-list{display:flex;flex-direction:column;gap:.3rem;width:min(380px,100%);}
#raceOverlay .res-row{display:flex;align-items:center;gap:.5rem;padding:.25rem .6rem;border-radius:10px;background:#0e0c06;border:1px solid #2a2618;}
#raceOverlay .res-row.you{border-color:#9dff3f;}
#raceOverlay .res-row b{font-weight:normal;font-size:1.3rem;color:#ffd23f;width:1.2rem;}
#raceOverlay .res-row span{flex:1;font-size:1rem;letter-spacing:.08em;}
#raceOverlay .res-row small{font-size:.75rem;letter-spacing:.1em;color:#8a7a4a;}
#raceOverlay .rl-btns{display:flex;gap:.6rem;margin-top:.4rem;}
body.race-open #alienLayer{visibility:hidden;}

/* v0.2.188 extra bunkers (js/80) */
#bxNav{display:flex;align-items:center;gap:.4rem;margin:0 0 .45rem;padding:.25rem .3rem;border:1px solid var(--bx-edge,#1a2a1f);border-radius:12px;background:rgba(0,0,0,.25);}
#bxNav .bx-arrow{font-family:'Bebas Neue',sans-serif;font-size:1.5rem;line-height:1;width:2.2rem;height:2.2rem;border-radius:10px;border:1px solid var(--bx-edge,#1a3a2a);background:#0a1a0f;color:var(--bx-acc,#00ff88);cursor:pointer;touch-action:manipulation;flex-shrink:0;}
#bxNav #bxName{flex:1;min-width:0;font-family:'Bebas Neue',sans-serif;font-size:1.15rem;letter-spacing:.14em;text-align:center;background:transparent;border:0;border-bottom:1px dashed var(--bx-edge,#1a3a2a);outline:none;color:var(--bx-acc,#00ff88);padding:.1rem 0;}
#bxNav #bxCount{font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.1em;color:#7fc79a;white-space:nowrap;}
#bxNav #bxTheme{width:1.6rem;height:1.6rem;border-radius:50%;border:2px solid rgba(255,255,255,.6);cursor:pointer;flex-shrink:0;}
#bunkerView.bx-themed .page-title{color:var(--bx-acc)!important;}
#bunkerView.bx-themed .bunker-grid .alien-cell:not(.occupied){background:var(--bx-bg);border-color:var(--bx-edge);}
#bunkerView.bx-themed .bunker-grid .alien-cell.occupied{background:var(--bx-bg);}
#bunkerView.bx-themed .bunker-progress-bar{background:var(--bx-acc);}
#anmMoveRow{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.3rem;margin:.3rem 0;}
#anmMoveRow span{font-family:'Bebas Neue',sans-serif;font-size:.8rem;letter-spacing:.14em;color:#7fc79a;margin-right:.2rem;}
#anmMoveRow .anm-bx{font-family:'Bebas Neue',sans-serif;font-size:.95rem;width:2rem;height:2rem;border-radius:8px;border:1px solid #1a3a2a;background:#0a1a0f;color:#cfe;cursor:pointer;touch-action:manipulation;}
#anmMoveRow .anm-bx:disabled{opacity:.3;}

/* v0.2.190 memory diet (js/81): far-away bubbles in the 3D tree are not drawn at all; buddies underneath an open tree stop drawing */
#skillTreeModal.st-3d .st-cull{display:none!important;}
body.tree-open #alienLayer{visibility:hidden;}

/* v0.2.191 "what's your name?" card (js/82): small, at the bottom, never covers the music */
#nameAsk{position:fixed;left:50%;bottom:calc(5.2rem + env(safe-area-inset-bottom,0px));transform:translate(-50%,140%);opacity:0;pointer-events:none;z-index:250;width:min(340px,92vw);
  background:#06140d;border:1px solid #2f9a68;border-radius:16px;padding:.8rem .9rem .6rem;box-shadow:0 10px 30px rgba(0,0,0,.6);transition:transform .35s cubic-bezier(.2,.9,.3,1.2),opacity .25s;text-align:center;font-family:'Bebas Neue',sans-serif;}
#nameAsk.on{transform:translate(-50%,0);opacity:1;pointer-events:auto;}
#nameAsk .na-q{font-size:1rem;letter-spacing:.14em;color:#7fc79a;line-height:1.3;}
#nameAsk .na-q b{font-weight:normal;font-size:1.35rem;color:#00ff88;}
#nameAsk .na-row{display:flex;gap:.4rem;margin:.55rem 0 .3rem;}
#nameAsk input{flex:1;min-width:0;font-family:'Bebas Neue',sans-serif;font-size:1.2rem;letter-spacing:.12em;text-transform:uppercase;padding:.45rem .6rem;border-radius:10px;border:1px solid #1f6a45;background:#020a06;color:#e8fff2;outline:none;}
#nameAsk #naOk{font-family:'Bebas Neue',sans-serif;font-size:1.1rem;letter-spacing:.12em;padding:.45rem 1rem;border-radius:10px;border:1px solid #00ff88;background:#0a2a18;color:#00ff88;cursor:pointer;}
#nameAsk .na-later{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.14em;background:none;border:0;color:#4f8a6a;cursor:pointer;padding:.2rem .6rem;}
#nameAsk .na-x{position:absolute;right:.4rem;top:.3rem;background:none;border:0;color:#4f8a6a;font-size:1rem;cursor:pointer;padding:.2rem .4rem;}
body.desktop-mode #nameAsk{bottom:2rem;}

/* v0.2.193 the two eggs after the first hatch (js/83): same look as the first egg (#padEgg) */
.twinEgg{position:absolute;z-index:6;display:flex;flex-direction:column;align-items:center;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;}
.twinEgg .pe-body{transform-origin:50% 88%;will-change:transform;}
.twinEgg canvas{display:block;}
.twinEgg .pe-glow{position:absolute;left:50%;top:44%;width:96px;height:96px;margin:-48px 0 0 -48px;border-radius:50%;pointer-events:none;opacity:0;transition:opacity .4s;
  background:radial-gradient(circle,rgba(0,255,136,.42) 0%,rgba(0,255,136,.14) 45%,rgba(0,255,136,0) 70%);}
.twinEgg.ready .pe-glow{opacity:1;animation:peGlow 1.5s ease-in-out infinite;}
.twinEgg .pe-tag{margin-top:-2px;font-family:'Bebas Neue',sans-serif;font-size:15px;letter-spacing:.08em;line-height:1;padding:3px 8px 2px;border-radius:999px;color:#c9c2a8;background:rgba(20,18,12,.85);border:1px solid rgba(255,240,200,.25);white-space:nowrap;}
.twinEgg.ready .pe-tag{color:#00ff88;border-color:rgba(0,255,136,.7);box-shadow:0 0 10px -2px rgba(0,255,136,.7);}
.twinEgg .pe-tag.bump{animation:peBump .4s cubic-bezier(.3,1.6,.5,1);}
.twinEgg.rolling{animation:peRoll 1.2s cubic-bezier(.25,.7,.35,1) both;}
.twinEgg.rolling .pe-tag{animation:peTagIn .35s .95s both;}
body.intro-run .twinEgg,body.store-open:not(.desktop-mode) .twinEgg,body.bunker-open:not(.desktop-mode) .twinEgg,body.vault-open:not(.desktop-mode) .twinEgg{visibility:hidden;}
body.phone-land .twinEgg .pe-tag{font-size:12px;padding:2px 6px 1px;}

/* v0.2.196: the onboarding arrows never catch taps (and never hide their own button from the on-screen check) */
#arrowActivate,#arrowShop{pointer-events:none;}

/* v0.2.208 (Galaxy Fold / big system font): js/18 fitPadArea adds pad-squeeze when the header leaves the pads too little room */
body.pad-squeeze:not(.desktop-mode) .score,body.pad-squeeze:not(.desktop-mode).seq-on .score{font-size:min(2.6rem,7vh,11vw) !important;}
body.pad-squeeze:not(.desktop-mode) .game-title{font-size:min(1.15rem,3.2vh) !important;}
body.pad-squeeze:not(.desktop-mode) .score-sub{font-size:.6rem !important;min-height:0;}
body.pad-squeeze:not(.desktop-mode) .game-header,body.pad-squeeze:not(.desktop-mode) .score-section{margin-top:0 !important;margin-bottom:0 !important;padding-top:2px !important;padding-bottom:2px !important;}

/* v0.2.210: the next drum pad's energy bar (same look as the Fusebox power bars, js/85 .spb) */
.pad.ghost-pad .gp-bar{height:7px;border-radius:0 0 12px 12px;z-index:3;}
.pad.ghost-pad.ghost-later .gp-bar{display:none;}

/* v0.2.212: the drum tracker's ACTIVATE (testers weren't noticing it). Dark while you save up (with an energy strip);
   bright green, glowing and pulsing once you can afford it, with the five dots it switches on lighting up in a chase. */
#drumTrackerActivateBtn.act-btn{position:relative;overflow:hidden;display:inline-flex;align-items:center;gap:.5rem;font-family:'Bebas Neue',sans-serif;font-size:1rem;letter-spacing:.12em;
  padding:.45rem 1rem calc(.45rem + 6px);border-radius:12px;border:1.5px solid rgba(0,255,136,.45);background:linear-gradient(180deg,#0b2a17,#04140a);color:#7dffbf;cursor:pointer;
  touch-action:manipulation;white-space:nowrap;box-shadow:0 0 14px -4px rgba(0,255,136,.45),inset 0 1px 0 rgba(255,255,255,.08);transition:transform .3s cubic-bezier(.34,1.56,.64,1),background .3s,color .3s,box-shadow .3s;}
#drumTrackerActivateBtn .ab-dots{display:inline-flex;gap:3px;}
#drumTrackerActivateBtn .ab-dots i{width:6px;height:6px;border-radius:50%;background:rgba(0,255,136,.28);}
#drumTrackerActivateBtn .ab-price{font-size:.85em;opacity:.8;padding-left:.45rem;border-left:1px solid rgba(0,255,136,.3);}
#drumTrackerActivateBtn .ab-bar{height:5px;border-radius:0 0 10px 10px;}
#drumTrackerActivateBtn.can{background:linear-gradient(180deg,#5dffb0,#00d870);color:#02200f;border-color:#b6ffd9;transform:scale(1.12);
  animation:abPulse 1.4s ease-in-out infinite;}
#drumTrackerActivateBtn.can .ab-price{opacity:1;border-left-color:rgba(2,32,15,.35);}
#drumTrackerActivateBtn.can .ab-dots i{background:rgba(2,32,15,.3);animation:abDot 1.1s steps(1) infinite;}
#drumTrackerActivateBtn.can .ab-dots i:nth-child(2){animation-delay:.15s;}#drumTrackerActivateBtn.can .ab-dots i:nth-child(3){animation-delay:.3s;}
#drumTrackerActivateBtn.can .ab-dots i:nth-child(4){animation-delay:.45s;}#drumTrackerActivateBtn.can .ab-dots i:nth-child(5){animation-delay:.6s;}
@keyframes abDot{0%{background:#ffe14d;box-shadow:0 0 6px #ffe14d;}40%{background:rgba(2,32,15,.3);box-shadow:none;}}
#drumTrackerActivateBtn.can::after{content:'';position:absolute;top:0;bottom:0;width:40%;left:-60%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);animation:abShine 2.2s ease-in-out infinite;}
@keyframes abShine{0%,55%{left:-60%;}100%{left:130%;}}
@keyframes abPulse{0%,100%{box-shadow:0 0 18px -2px rgba(0,255,136,.75),0 0 0 0 rgba(0,255,136,.55);}50%{box-shadow:0 0 28px 2px rgba(0,255,136,.9),0 0 0 9px rgba(0,255,136,0);}}
#drumTrackerActivateBtn:active{transform:scale(.96);}
body.phone-land #drumTrackerActivateBtn.act-btn{font-size:.72rem !important;padding:.22rem .6rem calc(.22rem + 4px) !important;gap:.35rem;}
body.phone-land #drumTrackerActivateBtn .ab-dots i{width:4px;height:4px;}
body.phone-land #drumTrackerActivateBtn .ab-bar{height:3px;}
body.phone-land #drumTrackerActivateBtn.act-btn.can{animation:abPulse 1.4s ease-in-out infinite !important;}

/* v0.2.213: a pad's hotkey badge opens that pad's edit window (js/05) */
body.desktop-mode .pad .pad-key:not(.ghost-key){pointer-events:auto;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .15s;}
body.desktop-mode .pad .pad-key:not(.ghost-key):hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.55);color:#fff;transform:scale(1.12);}

/* v0.2.217: on desktop the sequencer teaser stays clear of the BUNKER / FUSEBOX edge tabs */
body.desktop-mode .seq-teaser{width:calc(100% - 100px);margin-left:auto;margin-right:auto;}

/* v0.2.219: bigger, easier-to-spot bunker game buttons with drawn icons (cards for the matching game, a hopping buddy on a ringed planet for Planet Hop) */
#matchingGameBtn,#planetHopBtn{position:relative;min-height:3.1rem;padding-left:3.4rem !important;text-align:left;font-size:.95rem !important;}
#matchingGameBtn::before,#planetHopBtn::before{content:'';position:absolute;left:.6rem;top:50%;width:2.3rem;height:2.3rem;margin-top:-1.15rem;background:center/contain no-repeat;pointer-events:none;}
#matchingGameBtn::before{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Cg%20transform%3D%22rotate%28-14%2014%2021%29%22%3E%3Crect%20x%3D%225%22%20y%3D%229%22%20width%3D%2217%22%20height%3D%2224%22%20rx%3D%223.5%22%20fill%3D%22%23062a17%22%20stroke%3D%22%2300ff88%22%20stroke-width%3D%222%22/%3E%3Ctext%20x%3D%2213.5%22%20y%3D%2226%22%20font-family%3D%22Arial%20Black%2CArial%22%20font-weight%3D%22900%22%20font-size%3D%2213%22%20fill%3D%22%2300ff88%22%20text-anchor%3D%22middle%22%3E%3F%3C/text%3E%3C/g%3E%3Cg%20transform%3D%22rotate%2812%2026%2020%29%22%3E%3Crect%20x%3D%2217%22%20y%3D%227%22%20width%3D%2217%22%20height%3D%2224%22%20rx%3D%223.5%22%20fill%3D%22%230b3d22%22%20stroke%3D%22%237dffbf%22%20stroke-width%3D%222%22/%3E%3Cellipse%20cx%3D%2225.5%22%20cy%3D%2220%22%20rx%3D%226%22%20ry%3D%225.4%22%20fill%3D%22%2338e598%22/%3E%3Ccircle%20cx%3D%2223.3%22%20cy%3D%2219.5%22%20r%3D%221.7%22%20fill%3D%22%23fff%22/%3E%3Ccircle%20cx%3D%2227.7%22%20cy%3D%2219.5%22%20r%3D%221.7%22%20fill%3D%22%23fff%22/%3E%3Ccircle%20cx%3D%2223.5%22%20cy%3D%2219.8%22%20r%3D%22.9%22%20fill%3D%22%2314202e%22/%3E%3Ccircle%20cx%3D%2227.9%22%20cy%3D%2219.8%22%20r%3D%22.9%22%20fill%3D%22%2314202e%22/%3E%3Cpath%20d%3D%22M22.5%2015.2%20L21%2012.2%20M28.5%2015.2%20L30%2012.2%22%20stroke%3D%22%2338e598%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22/%3E%3Ccircle%20cx%3D%2221%22%20cy%3D%2212%22%20r%3D%221.2%22%20fill%3D%22%23ff7ad0%22/%3E%3Ccircle%20cx%3D%2230%22%20cy%3D%2212%22%20r%3D%221.2%22%20fill%3D%22%23ff7ad0%22/%3E%3C/g%3E%3C/svg%3E");}
#planetHopBtn::before{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2040%2040%22%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2226%22%20r%3D%2210%22%20fill%3D%22%230e5a73%22/%3E%3Cpath%20d%3D%22M12%2022%20Q20%2019%2028%2023%22%20stroke%3D%22%235fd8ff%22%20stroke-width%3D%221.6%22%20fill%3D%22none%22%20opacity%3D%22.7%22/%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2228%22%20r%3D%221.6%22%20fill%3D%22%230a3f52%22/%3E%3Ccircle%20cx%3D%2224%22%20cy%3D%2231%22%20r%3D%221.2%22%20fill%3D%22%230a3f52%22/%3E%3Cellipse%20cx%3D%2220%22%20cy%3D%2227%22%20rx%3D%2218%22%20ry%3D%224.6%22%20fill%3D%22none%22%20stroke%3D%22%237fe8ff%22%20stroke-width%3D%222%22%20transform%3D%22rotate%28-12%2020%2027%29%22/%3E%3Cpath%20d%3D%22M10.2%2030.5%20Q20%2026%2030%2022%22%20stroke%3D%22%230e5a73%22%20stroke-width%3D%223%22%20fill%3D%22none%22/%3E%3Cg%20transform%3D%22translate%2820%209%29%22%3E%3Cellipse%20cx%3D%220%22%20cy%3D%220%22%20rx%3D%225.2%22%20ry%3D%224.7%22%20fill%3D%22%2338e598%22/%3E%3Ccircle%20cx%3D%22-1.9%22%20cy%3D%22-.4%22%20r%3D%221.5%22%20fill%3D%22%23fff%22/%3E%3Ccircle%20cx%3D%221.9%22%20cy%3D%22-.4%22%20r%3D%221.5%22%20fill%3D%22%23fff%22/%3E%3Ccircle%20cx%3D%22-1.8%22%20cy%3D%22-.2%22%20r%3D%22.8%22%20fill%3D%22%2314202e%22/%3E%3Ccircle%20cx%3D%222%22%20cy%3D%22-.2%22%20r%3D%22.8%22%20fill%3D%22%2314202e%22/%3E%3Cpath%20d%3D%22M-2.4%20-4%20L-3.8%20-6.8%20M2.4%20-4%20L3.8%20-6.8%22%20stroke%3D%22%2338e598%22%20stroke-width%3D%221.3%22%20stroke-linecap%3D%22round%22/%3E%3C/g%3E%3Cpath%20d%3D%22M14%2016%20Q20%2010%2026%2016%22%20stroke%3D%22%23ffe14d%22%20stroke-width%3D%221.2%22%20fill%3D%22none%22%20stroke-dasharray%3D%221.5%202%22/%3E%3C/svg%3E");}
#planetHopBtn.mg-locked::before{opacity:.75;}
#matchingGameBtn.match-glow::before,#planetHopBtn:not(.mg-locked)::before{animation:mgIconBob 2.4s ease-in-out infinite;}
@keyframes mgIconBob{0%,100%{transform:translateY(0) rotate(0);}50%{transform:translateY(-2px) rotate(-4deg);}}
.ck-list #matchingGameBtn,.ck-list #planetHopBtn{padding-left:3.6rem !important;}

/* v0.2.225: Planet Hop flashes when it can be unlocked or has a level you haven't cleared */
@keyframes phGlow{0%,100%{box-shadow:0 0 5px 0 rgba(0,229,255,.25);border-color:#1f8aa0;color:#7fe8ff;}50%{box-shadow:0 0 18px 3px rgba(0,229,255,.65);border-color:#7ff4ff;color:#d4fbff;}}
#planetHopBtn.ph-glow{animation:phGlow 1.4s ease-in-out infinite;}
#planetHopBtn.ph-glow::before{animation:mgIconBob 2.4s ease-in-out infinite;}
/* v0.2.226: the simple Planet Hop level box */
#phSelect .ww-sub,#phSelect #phDetail{display:none !important;}
#phSelect.ph-simple .mg-tabs{display:none !important;}
#phSelect .ph-grid{grid-template-columns:repeat(5,1fr);}

/* v0.2.236: the gem ring hides while ALIEN GEM MATH is open (kept after js/88 was removed) */
body.stats-open #gemRing{display:none !important;}

/* v0.2.238: the next-world card after the last level of a Planet Hop world */
#phWorldHint{position:fixed;inset:0;z-index:1200;display:none;align-items:center;justify-content:center;background:rgba(2,4,10,.84);padding:16px;}
#phWorldHint.open{display:flex;}
#phWorldHint .pwh-box{width:100%;max-width:420px;border-radius:18px;border:1px solid #2a4a6a;background:linear-gradient(160deg,#04101c,#02060c);padding:22px 20px;text-align:center;font-family:'Bebas Neue',sans-serif;}
#phWorldHint .pwh-kicker{font-size:.9rem;letter-spacing:.3em;color:#4a7a9a;}
#phWorldHint .pwh-big{font-size:1.7rem;letter-spacing:.14em;color:#7fe8ff;margin:.3rem 0 .5rem;}
#phWorldHint .pwh-sub{font-size:1rem;letter-spacing:.08em;color:#a8c6d8;line-height:1.35;}
#phWorldHint .pwh-btns{display:flex;gap:8px;justify-content:center;margin-top:16px;flex-wrap:wrap;}

/* v0.2.239: Planet Hop level box — one world per line */
#phGrid.ph-worlds{display:block !important;}
.ph-world{margin-bottom:10px;}
.ph-world-name{font-family:'Bebas Neue',sans-serif;font-size:.78rem;letter-spacing:.22em;margin:0 0 4px 2px;}
.ph-world-row{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;}
.ph-world:last-child{margin-bottom:0;}

/* v0.2.241: boss arena HUD — energy bar, ZAP, boss hearts */
#phBossHud{display:none;position:fixed;left:50%;bottom:17%;transform:translateX(-50%);width:min(360px,78vw);z-index:6;align-items:center;gap:8px;}
#phBossHud.on{display:flex;}
#phBossHud .pbh-energy{flex:1;height:15px;border-radius:8px;border:1px solid #2a5a7a;background:#08131c;overflow:hidden;position:relative;}
#phBossHud .pbh-energy i{display:block;height:100%;width:0;background:linear-gradient(90deg,#2a7dff,#7ff6ff);box-shadow:0 0 10px #4ae0ff;transition:width .12s;}
#phBossHud .pbh-energy::before,#phBossHud .pbh-energy::after{content:'';position:absolute;top:0;bottom:0;width:1px;background:rgba(255,255,255,.22);}
#phBossHud .pbh-energy::before{left:33.33%;}
#phBossHud .pbh-energy::after{left:66.66%;}
#phBossHud .pbh-energy b{position:absolute;right:6px;top:0;line-height:15px;font-family:'Bebas Neue',sans-serif;font-size:.62rem;letter-spacing:.1em;color:#bfe9ff;opacity:.85;}
#phBossHud .pbh-zap{flex-shrink:0;font-size:1rem;padding:.45rem .9rem;border-color:#4ae0ff;color:#bff6ff;}
#phBossHud .pbh-zap.lit{background:#0a2a3a;box-shadow:0 0 14px #4ae0ff;animation:pbhZap .9s ease-in-out infinite;}
@keyframes pbhZap{50%{box-shadow:0 0 22px 4px #4ae0ff;}}
#phBossHud .pbh-hp{font-family:'Bebas Neue',sans-serif;color:#ff9a8a;font-size:1.15rem;letter-spacing:.08em;min-width:3ch;text-align:center;}
