
:root{--bg:#101029;--ink:#fff;--muted:#a6a4cd;--violet:#7b6cf4;--surface:#211e53;--outline:#46418a;--yellow:#ffcf51;--cell:45px;font-family:Nunito,ui-rounded,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:dark}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;overscroll-behavior:none}
body{background:radial-gradient(ellipse 75% 32% at 48% -9%,#4640999c,transparent),linear-gradient(165deg,#18163e,#101028 65%);color:var(--ink);overflow-x:hidden;font-weight:700}
button,select{font:inherit}button{color:inherit;cursor:pointer}button:focus-visible,select:focus-visible{outline:3px solid #fde88e;outline-offset:3px}button:disabled{opacity:.46;cursor:not-allowed}
.ambient{position:fixed;pointer-events:none;border-radius:50%;filter:blur(90px);opacity:.15;z-index:-1}.ambient-a{width:340px;height:420px;background:#ef40b4;left:-220px;top:27vh}.ambient-b{width:400px;height:440px;background:#1e9dff;right:-300px;top:17vh}
.site-header{width:min(1170px,calc(100% - 48px));margin:0 auto;min-height:93px;display:flex;justify-content:space-between;align-items:center;gap:20px}.brand{display:flex;align-items:center;gap:12px}.brand-icon{width:44px;height:44px;padding:6px;background:#514ab0;border:1px solid #786de4;border-radius:13px;display:grid;grid-template-columns:1fr 1fr;gap:3px;transform:rotate(-8deg);box-shadow:0 8px 0 #131138,0 7px 22px #7468fa50}.brand-icon span{border-radius:5px;box-shadow:inset 0 2px 2px #fff7,inset 0 -4px 1px #0003}.brand-icon span:nth-child(1){background:#ff7378}.brand-icon span:nth-child(2){background:#ffc24f}.brand-icon span:nth-child(3){background:#4edbc8}.brand-icon span:nth-child(4){background:#66a4ff}.brand strong{display:block;font-size:20px;letter-spacing:.3px;font-weight:1000;line-height:1.02}.brand strong em{font-style:normal;color:#ffd257}.brand small{display:block;font-size:8px;letter-spacing:3px;font-weight:1000;margin-top:5px;color:#c6c4ed}.head-controls{display:flex;align-items:center;gap:14px}.version{border:1px solid #454070;color:#8f8ab7;font-size:10px;letter-spacing:1px;border-radius:100px;padding:7px 10px}.language{display:flex;align-items:center;gap:6px;background:#24204d;border:1px solid #4a457d;padding:7px 11px;border-radius:12px}.language select{border:0;background:transparent;color:white;font-weight:900;font-size:12px;cursor:pointer;outline:none}.language option{background:#24204d}
.main-grid{width:min(1170px,calc(100% - 36px));margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(350px,460px) minmax(0,1fr);gap:29px;align-items:center}.side-panel{align-self:center}.side-left{padding:0 0 48px 6px}.side-eyebrow{font-weight:1000;font-size:11px;letter-spacing:2.7px;color:#ffcb62}.side-left h1{font-size:clamp(27px,3.4vw,44px);font-weight:1000;line-height:1.1;margin:20px 0 15px;letter-spacing:-1.4px}.gradient-text{background:linear-gradient(94deg,#ffc562,#fe81d0,#aaa2ff);background-clip:text;color:transparent}.side-left>p{line-height:1.65;font-size:14px;color:#bbb9dc;max-width:270px;margin-bottom:18px}.showcase{height:160px;display:flex;align-items:center;justify-content:center;position:relative;perspective:350px}.showcase-squares{display:grid;grid-template-columns:repeat(3,38px);gap:7px;transform:rotate(-12deg) skew(2deg);filter:drop-shadow(0 20px 16px #0007)}.showcase-squares i{display:block;width:38px;height:38px;border-radius:9px;background:#ff726c;box-shadow:inset 0 -6px #bd4d58,inset 0 3px #ffc5c38f,0 5px #090826}.showcase-squares i:nth-child(2),.showcase-squares i:nth-child(6){background:#5ccaff;box-shadow:inset 0 -6px #277ad2,inset 0 3px #d2f0ff8f,0 5px #090826}.showcase-squares i:nth-child(3),.showcase-squares i:nth-child(7){background:#ffca53;box-shadow:inset 0 -6px #d68d2c,inset 0 3px #fff8cb9a,0 5px #090826}.showcase-squares i:nth-child(4),.showcase-squares i:nth-child(8){background:#a684fb;box-shadow:inset 0 -6px #704dc6,inset 0 3px #e0c9ff9a,0 5px #090826}.showcase-squares i:nth-child(5),.showcase-squares i:nth-child(9){background:#56da98;box-shadow:inset 0 -6px #209b76,inset 0 3px #caffdc9a,0 5px #090826}.showcase>span{position:absolute;font-size:37px;right:40px;top:18px;color:#ffe59d}.feature-row{display:flex;align-items:center;gap:12px;margin:16px 0}.feature-row>span{height:28px;width:28px;border-radius:9px;background:#264c68;color:#56eaa4;text-align:center;line-height:28px}.feature-row b,.feature-row small{display:block}.feature-row b{font-size:13px}.feature-row small{font-size:11px;color:#9996ba;margin-top:3px}
.game-panel{width:100%;border:1px solid #5449aa;background:linear-gradient(160deg,#302a75 0%,#221d5b 46%,#21194b 100%);box-shadow:0 14px 0 #0e0c2f,0 35px 75px #0605158a,inset 0 2px #6b5fb5;border-radius:28px;position:relative;overflow:hidden}.game-panel:before{content:"";position:absolute;width:300px;height:180px;background:#6e5dfb2b;filter:blur(60px);top:-160px;left:20%;pointer-events:none}.game-panel-inner{padding:20px 18px 17px}.hud-top{display:flex;align-items:center;gap:8px;justify-content:space-between}.level-tag,.timer-tag,.coin-tag,.square-btn{background:#15123e;border:1px solid #5148a1;border-bottom:3px solid #0b0930;border-radius:12px;height:48px;display:flex;align-items:center;justify-content:center;color:white}.level-tag{gap:6px;padding:0 10px;min-width:88px}.tag-caption{font-size:9px;letter-spacing:.8px;color:#d2cbff;font-weight:1000}.level-num{font-size:22px;font-weight:1000}.timer-tag{gap:7px;padding:0 12px;min-width:101px;font-weight:1000;font-size:19px;font-variant-numeric:tabular-nums}.timer-tag.danger{color:#ff949a;animation:tick 1s infinite}.timer-symbol{font-size:25px;color:#b5aaff;line-height:1}.coin-tag{gap:6px;min-width:65px;padding:0 6px;font-size:15px;font-weight:1000;color:#ffe5a3}.coin-symbol{border-radius:50%;background:linear-gradient(#ffe58a,#ffa723);border:2px solid #fff3bd;color:#b06909;box-shadow:0 2px #b56d11;height:22px;width:22px;line-height:17px;font-size:13px;text-align:center}.square-btn{font-size:19px;font-weight:1000;min-width:42px;padding:0}.level-caption{display:flex;align-items:center;gap:8px;margin:13px 0 15px;color:#c2bce8;font-size:11px;min-height:17px}.difficulty{background:#6851df;border-radius:5px;font-size:8px;letter-spacing:1px;color:#fff;padding:4px 6px;font-weight:1000}.move-caption{margin-left:auto;font-size:10px;white-space:nowrap}.play-area{position:relative}.board-frame{padding:14px;border-radius:23px;background:linear-gradient(180deg,#6b55d6,#5346b1);box-shadow:inset 0 3px #a295ff85,inset 0 -7px #281d6b,0 11px 25px #0a082c6e;border:3px solid #5141b9}.board{width:100%;aspect-ratio:7/9;position:relative;touch-action:none;border-radius:10px;background:linear-gradient(150deg,#171a4c,#17143d);box-shadow:0 0 0 2px #362c83,inset 0 0 23px #05041d88;overflow:visible;--unit:40px;user-select:none;-webkit-user-select:none}.board-grid{position:absolute;inset:0;background-image:linear-gradient(#fff 1px,transparent 1px),linear-gradient(90deg,#fff 1px,transparent 1px);background-size:calc(100% / 7) calc(100% / 9);background-position:0 0;opacity:.065;pointer-events:none;border-radius:9px}.board-layer{position:absolute;inset:0;pointer-events:none}.pieces-layer{pointer-events:auto}.gates-layer{z-index:1}.pieces-layer{z-index:4}.effect-layer{z-index:6}.wall{position:absolute;background:linear-gradient(145deg,#7880ac,#313657);border:2px solid #9ea4cb;border-bottom:5px solid #272940;border-radius:8px;box-shadow:inset 0 3px #d3d7f382,0 3px 7px #0005}.wall:after{content:"×";position:absolute;inset:0;display:grid;place-items:center;font-size:20px;color:#bbc0ddbb}
.gate{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;box-shadow:0 0 12px var(--glow),inset 0 3px #fff8,inset 0 -3px #0004;background:linear-gradient(120deg,var(--high),var(--color));border:2px solid #ffffff7a;border-radius:7px;pointer-events:none}.gate svg{width:20px;height:20px;filter:drop-shadow(0 2px 1px #0006)}.gate[data-side="top"]{transform:translateY(-62%)}.gate[data-side="bottom"]{transform:translateY(62%)}.gate[data-side="left"]{transform:translateX(-62%)}.gate[data-side="right"]{transform:translateX(62%)}.gate:after{content:"";background:#fff6;position:absolute;border-radius:3px}.gate[data-side="top"]:after,.gate[data-side="bottom"]:after{width:54%;height:3px;left:23%;bottom:4px}.gate[data-side="left"]:after,.gate[data-side="right"]:after{height:54%;width:3px;top:23%;right:4px}
.piece{position:absolute;border-radius:10px;touch-action:none;cursor:grab;border:1.5px solid var(--rim);background:linear-gradient(135deg,var(--high) 0%,var(--color) 38%,var(--shade) 100%);box-shadow:inset 0 3px #fff9,inset 2px 0 #fff5,inset 0 -6px 1px #0003,0 5px 0 var(--dark),0 9px 9px #0009;transition:left .18s cubic-bezier(.2,1.2,.25,1),top .18s cubic-bezier(.2,1.2,.25,1),opacity .25s,transform .25s;overflow:hidden;will-change:top,left,transform;z-index:3}.piece.dragging{transition:opacity .1s;z-index:10;cursor:grabbing;filter:brightness(1.13);box-shadow:inset 0 3px #fff9,inset 0 -6px #0003,0 11px 16px #000b}.piece.selected:not(.dragging){filter:brightness(1.08)}.piece.hint-glow{animation:hint-glow 1s ease-in-out 3}.piece.exiting{transition:transform .33s cubic-bezier(.25,.9,.3,1.2),opacity .31s;opacity:0;pointer-events:none;z-index:8}.piece .studs{position:absolute;inset:0;display:grid;grid-template-columns:repeat(var(--w),1fr);grid-template-rows:repeat(var(--h),1fr);align-items:center;justify-items:center;padding:3px}.stud{width:55%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 26%,#ffffff8c,transparent 57%),linear-gradient(150deg,var(--high),var(--shade));box-shadow:inset 0 2px 2px #ffffffa8,inset 0 -3px 3px #0003,0 3px 2px #0003;border:1px solid #ffffff48;max-width:36px}.piece .piece-shine{position:absolute;inset:2px;border:1px solid #ffffff25;border-radius:8px;pointer-events:none}.piece .piece-highlight{position:absolute;inset:-100%;transform:rotate(-45deg);background:linear-gradient(90deg,transparent 45%,#fff2 49%,transparent 53%);pointer-events:none}.piece.pulse .piece-highlight{animation:shine 1.7s infinite}.tutorial{display:flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:900;color:#d3cbfa;margin:10px 0 0;min-height:17px}.tutorial .hand{font-size:14px}.tutorial.rocket-alert{color:#ffc55e}.power-title{display:flex;gap:10px;align-items:center;margin:18px 0 10px;font-size:10px;letter-spacing:1.1px;font-weight:1000;color:#aaa0e5}.power-line{flex:1;height:1px;background:#51468e}.power-title button{border:0;background:transparent;color:#b7adee;font-size:11px;font-weight:900;padding:4px 0}.boosters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.booster{background:linear-gradient(180deg,#37317f,#25215c);border:1px solid #5c52b1;border-bottom:4px solid #14113e;box-shadow:inset 0 2px #ffffff1a;border-radius:13px;padding:8px 2px 9px;display:flex;align-items:center;gap:2px;flex-direction:column;transition:transform .12s,filter .12s}.booster:active{transform:translateY(3px);border-bottom-width:1px}.booster.active{border-color:#fede74;box-shadow:0 0 18px #ffce5870}.booster-icon{width:38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:11px;font-size:28px;font-weight:1000;line-height:1;text-shadow:0 2px #0005;box-shadow:inset 0 2px #fff7,inset 0 -4px #0003}.booster-icon.undo{background:linear-gradient(#65cfff,#2c7fdb);color:white}.booster-icon.hint{background:linear-gradient(#f8d26a,#e88b2d);color:#fff9d9}.booster-icon.time{background:linear-gradient(#9a75ff,#6343c9);font-size:18px}.booster-icon.time span{font-size:10px}.booster-icon.rocket{background:linear-gradient(#61d9a4,#239f78);font-size:23px}.booster b{font-size:10px;margin-top:5px}.booster small{font-size:9px;color:#ffd276;font-weight:1000}.booster:first-child small{color:#b2e9fe}
.right-card,.progress-card{border:1px solid #454079;background:#221e4a8c;border-radius:19px;padding:21px 18px;box-shadow:inset 0 1px #ffffff0d}.right-card{margin-top:40px}.mini-title{font-size:11px;font-weight:1000;letter-spacing:1.5px;color:#f5d081;margin-bottom:20px}.guide-row{display:flex;gap:11px;align-items:flex-start;margin:17px 0}.guide-icon{width:38px;height:38px;border:1px solid #584f9d;background:#38316d;display:grid;place-items:center;border-radius:11px;color:#c8b4ff;font-size:22px;flex-shrink:0}.guide-row b{font-size:12px}.guide-row p{font-size:11px;color:#a4a1cb;line-height:1.45;margin:5px 0 0}.progress-card{margin-top:15px}.progress-card .mini-title{margin-bottom:8px}.progress-numbers{display:flex;align-items:end;justify-content:space-between}.progress-numbers strong{font-size:36px;line-height:1;font-weight:1000}.progress-numbers strong span{font-size:16px;color:#9b92ce}.progress-numbers>span{font-size:13px;color:#ffd977}.progress-track{height:10px;border-radius:20px;background:#121032;overflow:hidden;margin-top:13px}.progress-track>div{height:100%;width:2%;background:linear-gradient(90deg,#eb87dd,#7e78ff);border-radius:20px;transition:width .25s}.progress-card p{font-size:10px;color:#9b96c6;line-height:1.5}.site-footer{font-size:10px;letter-spacing:.4px;color:#77739f;display:flex;align-items:center;justify-content:center;gap:13px;margin:30px 0 22px}.site-footer>span:first-child{color:#ffd674}
.toast{position:fixed;z-index:70;left:50%;bottom:33px;transform:translate(-50%,22px);max-width:min(400px,calc(100% - 25px));padding:12px 19px;background:#faf4ff;color:#322466;font-weight:1000;font-size:13px;border-radius:15px;box-shadow:0 10px 30px #000a;opacity:0;pointer-events:none;transition:transform .2s,opacity .2s;text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}
.overlay{position:fixed;inset:0;z-index:50;background:#080719ca;backdrop-filter:blur(9px);display:flex;align-items:center;justify-content:center;padding:18px;overflow-y:auto}.overlay[hidden]{display:none}.overlay-panel{width:min(410px,100%);padding:26px 25px 24px;background:linear-gradient(155deg,#3e337e,#211d57);border:1px solid #8174e9;border-bottom:7px solid #0e0b39;border-radius:27px;box-shadow:0 24px 80px #000b;position:relative;text-align:center;max-height:min(92vh,760px);overflow:auto}.modal-icon{width:74px;height:74px;margin:0 auto 11px;border-radius:23px;display:grid;place-items:center;font-size:38px;background:linear-gradient(#9f85ff,#6547d1);border:2px solid #ffffff70;box-shadow:inset 0 4px #fff7,0 5px #120d42}.modal-icon.win{background:linear-gradient(#ffdb76,#ed9838)}.modal-title{font-size:25px;font-weight:1000;margin:12px 0 6px}.modal-subtitle{font-size:13px;color:#c9bfef;font-weight:800;line-height:1.55;margin:0 0 15px}.stars{display:flex;gap:12px;justify-content:center;font-size:43px;margin:15px 0 6px;color:#ffd257;filter:drop-shadow(0 4px 0 #aa6d19)}.stars span.off{color:#716594;filter:grayscale(1)}.reward{padding:12px;border-radius:13px;background:#15123d;margin:14px 0 20px;color:#ffe19a;font-size:17px;font-weight:1000}.primary-action,.secondary-action{width:100%;border:0;border-bottom:4px solid #b57318;border-radius:12px;padding:14px 18px;background:linear-gradient(#ffe187,#ffc44c);color:#3e2566;font-size:14px;font-weight:1000;margin:5px 0;transition:transform .15s}.primary-action:active,.secondary-action:active{transform:translateY(2px)}.secondary-action{background:#423982;color:#e8e3ff;border:1px solid #8174c0;border-bottom:3px solid #1b174c}.modal-close{border:0;background:transparent;color:#b7aaf5;font-size:18px;font-weight:1000;position:absolute;top:13px;right:15px}.map-levels{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;max-height:min(45vh,300px);overflow:auto;padding:4px 2px 10px;margin:18px 0}.map-level{background:#423983;border:1px solid #7466bd;border-bottom:3px solid #1b1747;color:white;height:46px;border-radius:12px;font-size:15px;font-weight:1000}.map-level.done{background:#1f816e;border-color:#49b799}.map-level.current{background:#f4b951;color:#3a2867;border-color:#fff2ae}.map-level:disabled{opacity:.32}.modal-footnote{font-size:11px;color:#9c93cb;margin-top:10px}
@keyframes hint-glow{0%,100%{filter:brightness(1)}50%{filter:brightness(1.5) drop-shadow(0 0 15px #fff4a2)}}@keyframes tick{50%{background:#4b244b}}@keyframes shine{100%{transform:translate(100%,100%) rotate(-45deg)}}
@media(max-width:1100px){.main-grid{grid-template-columns:minmax(0,1fr) minmax(350px,460px);max-width:780px}.side-right{display:none}.side-left{padding:0}.side-left h1{font-size:36px}.showcase{height:120px}}
@media(max-width:720px){body{background:linear-gradient(155deg,#19143f,#0d0c28)}.site-header{min-height:70px;width:calc(100% - 28px)}.brand-icon{width:35px;height:35px;border-radius:10px;padding:5px}.brand strong{font-size:17px}.brand small{font-size:7px;letter-spacing:1.9px}.version{display:none}.language{padding:6px 7px}.language select{font-size:11px}.main-grid{display:block;width:min(470px,100%);margin:auto}.side-left{display:none}.game-panel{border-radius:22px 22px 0 0;box-shadow:none;border-left:0;border-right:0}.game-panel-inner{padding:13px max(12px,4vw) 19px}.board-frame{padding:13px}.level-caption{margin:9px 0 12px}.site-footer{margin:18px auto 16px}.game-panel{border-bottom:0}.hud-top{gap:6px}.level-tag,.timer-tag,.coin-tag,.square-btn{height:43px}.timer-tag{font-size:18px;min-width:96px}.level-tag{min-width:80px}.coin-tag{min-width:63px}.power-title{margin-top:13px}}
@media(max-width:360px){.board-frame{padding:10px}.game-panel-inner{padding:11px 10px 16px}.hud-top{gap:4px}.level-tag{padding:0 5px;min-width:70px}.tag-caption{font-size:8px}.level-num{font-size:19px}.timer-tag{min-width:81px;padding:0 5px;font-size:16px}.square-btn{min-width:38px}.coin-tag{min-width:56px}.booster-icon{width:34px;height:34px}.booster b{font-size:9px}.booster{padding:5px 1px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* v2 key and lock mechanic */
.gate.locked{z-index:5;filter:saturate(.5) grayscale(.3);box-shadow:0 0 0 3px #18132f,0 0 0 5px #ffdf85!important;opacity:.95}
.gate.locked svg{opacity:.24}
.gate .lock-symbol{position:absolute;inset:0;display:grid;place-items:center;z-index:2;font-size:clamp(13px,2.3vw,20px);text-shadow:0 2px #21112b;pointer-events:none}
.gate:not(.locked) .lock-symbol{display:none}
.gate.unlocked{animation:gate-open .55s ease-out}
@keyframes gate-open{0%{filter:brightness(2.4)}100%{filter:brightness(1)}}
.piece-key{position:absolute;z-index:5;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-15deg);font-size:clamp(22px,3.5vw,34px);filter:drop-shadow(0 3px 1px #5b2a14);pointer-events:none}
@media(max-width:400px){.piece-key{font-size:23px}}

/* V3: moving guards and timed color shutters */
.wall.mover{z-index:5;background:linear-gradient(145deg,#ffe3a0,#dc853b);border:2px solid #fff4d0;border-bottom:5px solid #995226;box-shadow:inset 0 2px #fff9,0 0 12px #faba5880;transition:left .42s ease,top .42s ease;}
.wall.mover:after{content:'⚙';font-size:clamp(13px,2.3vw,22px);color:#724325;text-shadow:0 1px #fff5;}
.gate[data-timed]{transition:filter .25s,opacity .25s;background:linear-gradient(120deg,var(--high),var(--color));}
.gate[data-timed] .timer-symbol-gate{position:absolute;z-index:4;font-size:clamp(12px,2vw,19px);text-shadow:0 2px 3px #0009;top:-8px;right:-8px;background:#211d53;border-radius:50%;width:22px;height:22px;display:grid;place-items:center;border:1px solid #ffdc87;}
.gate.timed-closed{filter:grayscale(.85) brightness(.55);border-color:#ee817d;box-shadow:0 0 0 3px #10102d,0 0 0 5px #f19681;}
.gate.timed-closed svg{opacity:.28}
.gate.timed-open{animation:timed-shimmer 1.4s infinite;}
@keyframes timed-shimmer{50%{filter:brightness(1.28)}}

/* V3.1: exit ghosts pass over the board until they clear the matching gate. */
.piece.gate-ghost{pointer-events:none!important;z-index:9!important;will-change:transform,opacity;}

/* V3.2: preserve finger tracking even on older iOS WebKit. */
.piece.dragging{touch-action:none;transition:none!important;user-select:none;-webkit-user-select:none}
.piece{backface-visibility:hidden;-webkit-backface-visibility:hidden}

/* V3.4: accessible daily reward, compact for small-screen PWA. */
.daily-card{display:flex;align-items:center;gap:9px;margin:13px 18px 16px;padding:12px 10px;background:linear-gradient(115deg,#54409b,#362a7b);border:1px solid #8273d9;border-radius:15px;box-shadow:inset 0 1px #ffffff32;min-width:0}
.daily-icon{font-size:24px;line-height:1;flex-shrink:0}
.daily-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.daily-copy strong{font-size:11px;letter-spacing:.3px}
.daily-copy small{font-size:10px;color:#e5daff}
.daily-claim{border:0;background:linear-gradient(#ffe28a,#ffbb49);color:#37245c;border-bottom:3px solid #b16d1c;border-radius:10px;font-size:10px;font-weight:1000;padding:10px 9px;min-height:39px;white-space:nowrap;flex-shrink:0}
.daily-claimed .daily-claim{background:#2a8c7c;border-color:#185249;color:white;opacity:1;cursor:default}
.world-map{max-height:min(44vh,370px);overflow-y:auto;overscroll-behavior:contain;text-align:left;padding:1px 4px 8px;scrollbar-width:thin;scrollbar-color:#9a89df transparent}
.world-section{border:1px solid #6a5bb3;background:#241e5c;padding:11px 10px 13px;border-radius:13px;margin-bottom:11px}
.world-heading{display:flex;align-items:center;gap:8px;margin-bottom:10px;color:#f1eaff}
.world-heading strong{font-size:11px;letter-spacing:.4px}
.world-heading small{margin-left:auto;color:#c1b6f3;font-size:10px}
.world-symbol{font-size:19px}
.world-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.world-grid .map-level{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;height:49px;line-height:1.15;padding:1px}
.world-grid .map-level span{font-size:14px}
.world-grid .map-level small{min-height:11px;font-size:9px;letter-spacing:-2px;color:#ffdf7d}
.world-grid .map-level.current small{color:#52368d}
.gate-spark{position:absolute;width:7px;height:7px;border-radius:3px;pointer-events:none;box-shadow:0 0 6px currentColor;animation:gate-spark-fly .45s ease-out both;transform:translate(-50%,-50%)}
@keyframes gate-spark-fly{to{opacity:0;transform:translate(calc(-50% + var(--sx)),calc(-50% + var(--sy))) scale(.2)}}
@media(max-width:360px){.daily-card{margin:10px 10px 14px;padding:10px 7px;gap:7px}.daily-claim{padding:8px 6px;font-size:9px}.daily-icon{font-size:21px}}
@media(prefers-reduced-motion:reduce){.gate-spark{animation:none;display:none}}

/* V3.5 — Immersive app layout. All controls must fit inside the visible viewport. */
html,body{width:100%;height:100%;height:100dvh;overflow:hidden!important;overscroll-behavior:none}
.site-header,.side-panel,.site-footer{display:none!important}
.main-grid{position:fixed;inset:0;width:100%;max-width:none;display:flex;align-items:stretch;justify-content:center;gap:0;margin:0}
.game-panel{height:100%;height:100dvh;width:min(100%,590px);max-width:590px;min-width:0;border-radius:0;border-top:0;border-bottom:0;box-shadow:0 0 70px #05041ab0;overflow:hidden;display:flex;flex-direction:column}
.game-panel-inner{height:100%;min-height:0;display:flex;flex-direction:column;gap:0;padding:calc(8px + env(safe-area-inset-top,0px)) 12px calc(8px + env(safe-area-inset-bottom,0px));overflow:hidden}
.hud-top{flex:0 0 auto;gap:6px}
.game-quick-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:7px;flex:0 0 auto}
.quick-action{display:flex;justify-content:center;align-items:center;gap:5px;min-width:0;min-height:34px;background:#342a76;border:1px solid #6352bc;border-bottom:2px solid #171242;border-radius:10px;font-size:10px;font-weight:1000;color:#f6eaff;white-space:nowrap;padding:4px 3px}
.quick-action:active{transform:translateY(1px)}
.fullscreen-btn{min-width:36px;font-size:22px}
.level-caption{flex:0 0 auto;min-height:16px;margin:8px 0 4px;font-size:10px;gap:5px}
#goal-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.play-area{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:100%;overflow:visible}
.board-frame{flex:0 0 auto;width:min(100%,400px);max-width:100%;padding:12px;border-width:3px;border-radius:20px;box-shadow:inset 0 3px #a295ff85,inset 0 -5px #281d6b,0 5px 17px #0a082c6e}
.board{aspect-ratio:7/9}
.tutorial{flex:0 0 auto;margin:2px auto 0;line-height:1.15;min-height:17px;max-width:100%;text-align:center;white-space:normal;font-size:10px}
.power-title{flex:0 0 auto;margin:5px 0 4px;font-size:9px;min-height:20px}
.power-title button{padding:3px}
.boosters{flex:0 0 auto;gap:7px;padding-bottom:1px}
.booster{min-height:73px;padding:5px 1px 4px;border-radius:12px;gap:1px}
.booster-icon{width:32px;height:32px;font-size:23px;border-radius:9px}
.booster-icon.time{font-size:17px}
.booster-icon.rocket{font-size:21px}
.booster b{font-size:10px;margin-top:3px;white-space:nowrap}
.booster small{font-size:9px}
.daily-card{display:none!important}
.overlay{padding:calc(9px + env(safe-area-inset-top,0px)) 10px calc(9px + env(safe-area-inset-bottom,0px))}
.overlay-panel{max-height:92dvh;padding:20px 18px;overflow:auto}
.reward-items{display:flex;flex-direction:column;gap:9px;max-height:min(51dvh,420px);overflow-y:auto;padding:2px}
.quest-item,.chest-item{display:flex;align-items:center;justify-content:space-between;gap:9px;background:#26205b;border:1px solid #5d4ba5;border-radius:12px;padding:11px 9px;text-align:left}
.quest-item>div{min-width:0;flex:1}
.quest-item strong{font-size:12px;display:block}
.quest-item span{display:block;font-size:11px;color:#bcaff8;margin:4px 0}
.quest-item button,.chest-item button{flex:0 0 auto;max-width:50%;border:1px solid #d9a64b;border-radius:8px;background:#ffe49a;color:#3d2764;font-weight:900;font-size:10px;min-height:38px;padding:6px}
.quest-item button:disabled,.chest-item button:disabled{background:#393075;border-color:#7461a8;color:#aba2d6;opacity:.75}
.quest-track{height:5px;background:#17143d;border-radius:6px;overflow:hidden}
.quest-track i{display:block;height:100%;background:#57dfb4;border-radius:6px}
.chest-item>span{font-size:22px}.chest-item strong{font-size:12px;flex:1}.chest-list{max-height:50dvh}
@media(max-width:720px){
 .main-grid{max-width:none;width:100%;display:flex}
 .game-panel{border-radius:0;border:0;width:100%;max-width:none;box-shadow:none}
 .game-panel-inner{padding:calc(6px + env(safe-area-inset-top,0px)) 10px calc(7px + env(safe-area-inset-bottom,0px))}
 .hud-top .level-tag,.hud-top .timer-tag,.hud-top .coin-tag,.hud-top .square-btn{height:40px}
 .timer-tag{min-width:80px;font-size:16px;padding:0 6px}
 .level-tag{min-width:73px;padding:0 7px}
 .coin-tag{min-width:58px;font-size:13px}
 .square-btn{min-width:34px}
 .board-frame{padding:11px;border-radius:17px}
 .booster{min-height:70px}
}
@media(max-width:360px){
 .game-panel-inner{padding-left:7px;padding-right:7px}
 .hud-top{gap:3px}.level-tag{min-width:63px;padding:0 3px}.timer-tag{min-width:68px;font-size:14px;padding:0 3px}.coin-tag{min-width:49px;padding:0 3px}.square-btn{min-width:30px}
 .quick-action{font-size:9px;gap:3px}
 .board-frame{padding:9px}
 .booster{min-height:65px}.booster-icon{width:28px;height:28px;font-size:21px}
 .booster b{font-size:9px}
}
@media(max-height:690px){
 .game-panel-inner{padding-top:calc(4px + env(safe-area-inset-top,0px));padding-bottom:calc(4px + env(safe-area-inset-bottom,0px))}
 .quick-action{min-height:29px}.game-quick-nav{margin-top:3px}
 .level-caption{margin:4px 0 2px}
 .power-title{min-height:16px;margin:2px 0}
 .tutorial{font-size:9px}
 .booster{min-height:63px;padding:3px 1px}
 .booster-icon{width:27px;height:27px;font-size:20px}
 .booster b{font-size:9px;margin-top:1px}
 .booster small{font-size:8px}
}

/* V3.6: remove the text strip under the board and the booster caption.
   Keep hidden JS-backed controls for save/game backward compatibility. */
.tutorial,.power-title{display:none!important;}
.game-panel-inner .play-area{gap:0;margin-top:auto;flex:0 1 auto;justify-content:flex-end;}
.game-panel-inner .boosters{margin-top:8px;margin-bottom:auto;}
.boosters .booster{touch-action:manipulation;}
@media(max-height:690px){.game-panel-inner .boosters{margin-top:5px;}}
