:root{color-scheme:dark;--bg:#090c25;--lime:#baff42;--cyan:#06edfa;--text:#f0f5ff;--muted:#98a6c7;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;background:var(--bg)}body{overscroll-behavior:none}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:3px solid #fff;outline-offset:5px}button:disabled{opacity:.35;cursor:default}button[hidden],[hidden]{display:none!important}.app{max-width:1560px;margin:auto;padding:0 30px}.topbar{height:94px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:14px;color:var(--text);text-decoration:none;font-size:19px;letter-spacing:.045em;font-weight:850}.brand-icon{width:38px;height:38px;filter:drop-shadow(0 3px 8px #baff4220)}.brand strong{display:inline-block;color:var(--lime);font-size:20px;font-style:italic;margin-left:6px}.top-actions{display:flex;gap:10px}.icon-button{height:42px;padding:0 14px;border:1px solid #27314c;border-radius:11px;background:#11172d;color:#bfcbe2;display:flex;align-items:center;justify-content:center;gap:9px;font-size:14px;font-weight:650}.icon-button:hover:not(:disabled){background:#202c44;color:white}.icon-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stage{height:calc(100dvh - 166px);min-height:380px;max-height:880px;position:relative;border:1px solid #29335c;border-radius:22px;overflow:hidden;isolation:isolate;background:#131130;box-shadow:0 22px 100px #0003;touch-action:none;user-select:none}.stage::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 100px #090c252a}canvas{display:block;width:100%;height:100%}.hud{position:absolute;top:26px;left:28px;right:28px;display:flex;align-items:center;justify-content:space-between;gap:30px;z-index:2}.level-label{display:flex;gap:12px;align-items:center}.level-number{color:#7c94bc;font-size:16px;font-weight:750;width:39px;height:41px;border:1px solid #7086b343;display:grid;place-items:center;border-radius:9px;background:#14213965}.level-label div{display:flex;flex-direction:column;gap:5px}.small-label{font-size:12px;letter-spacing:.14em;color:#9baacf}.level-label strong{font-size:15px;letter-spacing:.07em}.progress-section{display:grid;grid-template-columns:1fr 48px;gap:7px 12px;width:min(350px,40%);align-items:center}.progress-section>span{font-size:12px;letter-spacing:.12em;color:#b0bad2;grid-column:1 / -1}.progress-section>strong{font-size:15px;text-align:right;color:var(--lime);font-variant-numeric:tabular-nums}.progress-track{height:7px;background:#ffffff18;border-radius:8px;overflow:hidden}.progress-track>div{width:0;height:100%;background:linear-gradient(90deg,var(--cyan),var(--lime));border-radius:8px;box-shadow:0 0 12px #baff4280}.menu{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:3;background:linear-gradient(90deg,#0a102338,#0b0e225c 40%,#0c0f2840);backdrop-filter:blur(2px)}.menu-content{width:390px;text-align:center;padding:22px 16px 25px;transform:translate(8%,-3%)}.level-tag{display:flex;justify-content:center;align-items:center;gap:10px;color:#d9e6ff;font-size:13px;font-weight:750;letter-spacing:.1em}.difficulty-symbol{color:var(--lime);font-size:25px;line-height:1}.tag-difficulty{font-size:12px;letter-spacing:.06em;border:1px solid #baff4250;background:#baff4210;color:var(--lime);padding:5px 8px;border-radius:5px}h1{font-size:clamp(44px,5.4vw,80px);line-height:.97;letter-spacing:-.06em;margin:26px 0 21px;font-weight:900;text-shadow:0 8px 30px #0004}h1 em{font-style:normal;color:var(--lime)}.menu p{font-size:16px;line-height:1.6;color:#bac7e0;margin:0 0 27px}.play-button{background:var(--lime);color:#152521;border:0;border-radius:13px;width:100%;height:61px;display:flex;justify-content:center;align-items:center;gap:12px;font-size:19px;font-weight:850;box-shadow:0 5px 0 #5f8c30,0 10px 36px #baff4220;transition:transform .15s,filter .15s}.play-button:hover{filter:brightness(1.1);transform:translateY(-2px)}.play-button:active{transform:translateY(3px);box-shadow:0 2px 0 #5f8c30}.play-button svg{width:22px;height:22px}.menu-hint{display:block;margin-top:24px;color:#929fbc;font-size:12px;font-weight:650;letter-spacing:.13em}.result{display:flex;justify-content:center;gap:35px;margin:0 0 25px}.result>div{display:flex;flex-direction:column;gap:6px}.result span{font-size:12px;color:#9fb0ca;letter-spacing:.08em}.result strong{font-size:29px;color:var(--lime)}.jump-button{position:absolute;right:26px;bottom:25px;z-index:4;display:flex;align-items:center;justify-content:center;gap:10px;padding:0 27px;height:62px;min-width:142px;background:#baff421c;border:1px solid #baff4270;border-radius:14px;color:var(--lime);font-size:17px;font-weight:850;backdrop-filter:blur(8px);touch-action:none}.jump-button:active{background:#baff4240;transform:translateY(2px)}.jump-button svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.stage-caption{position:absolute;bottom:30px;left:28px;display:flex;gap:10px;align-items:center;color:#8094b5;font-size:12px;letter-spacing:.17em;font-weight:650;z-index:2}.caption-line{height:1px;width:30px;background:#4b7191}.controls{height:72px;display:flex;align-items:center;justify-content:space-between;gap:15px;color:#8e9aba;font-size:14px}.controls>div{display:flex;gap:11px;align-items:center}kbd{font:650 12px inherit;font-family:inherit;font-size:12px;font-weight:650;padding:5px 9px;border:1px solid #2b3451;border-bottom-width:3px;border-radius:5px;color:#bac7df;min-width:29px;text-align:center}.control-divider{width:1px;height:17px;background:#26324a;margin:0 8px}.touch-hint{display:none}.toast{position:absolute;bottom:104px;left:50%;transform:translateX(-50%);z-index:5;color:#dbe8fd;background:#14213adb;border:1px solid #00e8ff35;border-radius:12px;font-size:15px;font-weight:650;transition:opacity .3s;text-align:center;pointer-events:none;opacity:0;padding:12px 18px;max-width:90%}.toast.visible{opacity:1}
@media(max-width:720px){.app{padding:0 12px}.topbar{height:76px;gap:6px}.brand{font-size:14px;gap:8px;letter-spacing:0}.brand strong{font-size:17px;margin-left:3px}.brand-icon{width:30px;height:30px}.top-actions{gap:6px}.icon-button{width:39px;height:39px;padding:8px}.icon-button span{display:none}.stage{height:calc(100dvh - 134px);min-height:380px;border-radius:16px}.hud{top:18px;left:17px;right:17px;gap:15px}.level-number{display:none}.level-label strong{font-size:13px}.small-label{font-size:12px}.progress-section{width:43%;gap:5px 8px;grid-template-columns:1fr 38px}.progress-section>span{letter-spacing:.04em}.menu-content{width:min(340px,92%);transform:translate(0,-1%);padding:15px}h1{font-size:58px;margin:21px 0 18px}.menu p{font-size:15px;margin-bottom:23px}.play-button{height:56px}.stage-caption{bottom:24px;left:17px;font-size:12px;letter-spacing:.07em}.jump-button{right:17px;bottom:19px;height:59px;min-width:125px;padding:0 20px}.controls{height:58px;justify-content:center}.controls>div{display:none}.touch-hint{display:block;font-size:13px}.result{gap:24px}.result span{font-size:12px}}
@media(max-height:590px) and (min-width:721px){.topbar{height:68px}.stage{height:calc(100dvh - 124px);min-height:300px}.controls{height:56px}.menu-content{padding:10px;width:330px}h1{font-size:45px;margin:15px 0}.menu p{font-size:14px;margin-bottom:16px}.play-button{height:49px}.menu-hint{margin-top:16px}}
@media(prefers-reduced-motion:reduce){.play-button,.toast{transition:none}}
.short-brand{display:none}.avatar-mini{width:24px;height:24px;image-rendering:pixelated;border:1px solid #8596b855;border-radius:3px}.menu-options{display:flex;gap:10px;margin-top:19px}.menu-options button{flex:1;background:#15233a99;border:1px solid #596e8f55;color:#cfdef7;padding:10px 7px;border-radius:9px;font-size:14px;font-weight:650}.menu-options button:hover{border-color:var(--cyan);color:#fff}.menu-hint{margin-top:16px}.menu-content{padding-top:64px}.game-dialog{width:min(820px,calc(100vw - 28px));max-height:calc(100dvh - 38px);overflow-y:auto;margin:auto;padding:28px;background:#10162d;color:var(--text);border:1px solid #45577c;border-radius:20px;box-shadow:0 24px 120px #0008}.game-dialog::backdrop{background:#030815b8;backdrop-filter:blur(8px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;gap:15px}.dialog-header h2{font-size:28px;letter-spacing:-.04em;margin:8px 0 0}.close-button{display:grid;place-items:center;flex-shrink:0;width:38px;height:38px;background:#26304c;color:#cfddf3;border:1px solid #475578;border-radius:10px;font-size:28px;line-height:1}.dialog-intro{font-size:16px;line-height:1.5;color:#aabbd6;margin:18px 0 23px}.level-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.level-card{color:#e6f1ff;background:linear-gradient(150deg,#1b2b46,#171d35);border:1px solid #3b4b68;border-radius:14px;padding:17px;text-align:left;display:flex;flex-direction:column;gap:13px;min-height:208px;transition:border-color .15s,background .15s}.level-card:hover{border-color:var(--card-color);background:#263350}.level-card[aria-pressed="true"]{border-color:var(--lime);box-shadow:inset 0 0 0 1px #baff4245}.level-card-top{display:flex;align-items:center;justify-content:space-between}.level-mode{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:750;letter-spacing:.09em;color:var(--card-color)}.level-mode svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}.level-index{color:#8699b9;font-size:13px}.level-card strong{font-size:19px;letter-spacing:-.025em}.level-card p{font-size:14px;line-height:1.5;color:#aab9cf;margin:0;flex:1}.level-card-bottom{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#9bb0ca}.difficulty-badge{color:var(--card-color);background:#a2befc0b;border-radius:5px;padding:5px 7px;font-weight:700}.level-selected{color:var(--lime);font-weight:750}.editor-layout{display:grid;grid-template-columns:minmax(230px,1fr) minmax(220px,.8fr);gap:30px}.drawing-area{display:flex;align-items:center;flex-direction:column;gap:15px}#pixel-editor{width:100%;max-width:320px;height:auto;aspect-ratio:1;image-rendering:pixelated;background:#fff;border:1px solid #5f6f8c;border-radius:5px;touch-action:none;cursor:crosshair}.drawing-caption{font-size:13px;color:#96aaca;text-align:center;line-height:1.6}.drawing-tools{display:flex;flex-direction:column;gap:17px}.paint-tools{display:flex;gap:7px}.paint-tools button,.edit-actions button{border:1px solid #445779;border-radius:8px;background:#1a2540;color:#cfdef7;padding:9px 11px;font-size:14px;font-weight:650}.paint-tools button[aria-pressed="true"]{color:var(--lime);border-color:var(--lime);background:#baff4210}.tool-label{font-size:12px;letter-spacing:.13em;color:#9baecb}.palette{display:grid;grid-template-columns:repeat(6,1fr);gap:9px}.swatch{height:34px;aspect-ratio:1;border:2px solid transparent;border-radius:7px;box-shadow:inset 0 0 0 1px #9dadc746}.swatch[aria-pressed="true"]{border-color:#fff;outline:2px solid var(--cyan);outline-offset:2px}.custom-color{display:flex;align-items:center;justify-content:space-between;color:#b8cbe2;font-size:14px}.custom-color input{width:52px;height:34px;background:#1b2941;border:1px solid #46597a;border-radius:7px;cursor:pointer}.edit-actions{display:flex;gap:8px}.drawing-tools .play-button{height:52px;font-size:17px}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:900px){.brand{font-size:16px;gap:9px}.icon-button{padding:0 10px}.icon-button span{display:none}.icon-button{width:40px}.level-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:460px){.full-brand{display:none}.short-brand{display:inline}.brand{font-size:16px}.top-actions{gap:5px}.icon-button{width:35px;height:37px;padding:7px}.brand-icon{width:27px}.game-dialog{padding:20px 17px}.dialog-header h2{font-size:25px}.level-grid{grid-template-columns:1fr}.level-card{min-height:164px;gap:10px}.editor-layout{grid-template-columns:1fr;gap:20px}.drawing-area{gap:10px}#pixel-editor{max-width:280px}.drawing-tools{gap:14px}.palette{grid-template-columns:repeat(6,1fr);gap:10px}.swatch{height:36px;width:100%;aspect-ratio:auto}.paint-tools button{flex:1}.menu-content{padding-top:65px}h1{font-size:50px;margin:18px 0}.menu p{font-size:14px;margin-bottom:18px}.menu-options{margin-top:16px}.menu-hint{margin-top:14px}.dialog-intro{font-size:15px}}
@media(max-height:650px){.menu-content{padding:48px 12px 12px;width:min(330px,92%)}h1{font-size:40px;margin:10px 0}.menu p{font-size:14px;margin-bottom:12px}.play-button{height:48px}.menu-options{margin-top:12px}.menu-hint{margin-top:10px}}
@media(max-height:520px){.menu{overflow:auto;align-items:flex-start;padding:64px 0 20px}.menu-content{padding:0 16px;transform:none}.menu h1{font-size:37px}.menu h1 br{display:none}.menu h1 em::before{content:" "}}
.icon-name-label{display:flex;flex-wrap:wrap;gap:5px;font-size:14px;color:#d5e2f6}.icon-name-label>span{color:#91a6c5}.icon-name-label input{width:100%;margin-top:4px;padding:11px 12px;font:inherit;font-size:16px;color:#edf5ff;background:#0b1429;border:1px solid #425576;border-radius:8px}.icon-name-label input::placeholder{color:#8195b3}.secondary-icon-button{background:#1b2942;color:#cbdcf6;border:1px solid #455c80;border-radius:9px;padding:11px 14px;font-size:14px;font-weight:700}.secondary-icon-button:hover:not(:disabled){border-color:var(--cyan);color:#fff}.saved-icons{margin-top:28px;padding-top:22px;border-top:1px solid #344563}.collection-heading{display:flex;align-items:center;gap:12px}.collection-heading h3{margin:0;font-size:20px;letter-spacing:-.025em}.collection-count{background:#27374f;border-radius:20px;padding:4px 10px;color:var(--lime);font-size:14px;font-weight:750}.collection-status{font-size:14px;line-height:1.6;color:#9eb3d2;margin:12px 0 16px}.collection-status.error{color:#ffc48d}.saved-icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px;margin-top:15px}.saved-icon-card{display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0;padding:14px 10px;background:#182641;border:1px solid #3b5073;border-radius:12px;color:#dceafb;text-align:center}.saved-icon-card:hover:not(:disabled){border-color:var(--cyan)}.saved-icon-card[aria-pressed="true"]{border-color:var(--lime);background:#baff420b}.saved-icon-card canvas{width:64px;height:64px;image-rendering:pixelated;border-radius:4px;border:1px solid #8fa3c855}.saved-icon-card strong{font-size:14px;font-weight:650;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.saved-icon-card .saved-icon-use{font-size:12px;font-weight:750;color:var(--lime)}#pixel-editor[aria-disabled="true"]{opacity:.7;cursor:wait}.drawing-tools .play-button:disabled{opacity:.6;cursor:wait}
@media(max-width:460px){.saved-icon-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.saved-icons{margin-top:24px}}
.face-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;width:100%;max-width:320px}.face-picker button{min-height:38px;padding:7px;border:1px solid #425778;border-radius:8px;color:#cfdef7;background:#1a2540;font-size:14px;font-weight:700}.face-picker button[aria-pressed="true"]{color:var(--lime);border-color:var(--lime);background:#baff4210}.active-face{align-self:center;color:#cfdef7;font-size:15px}.cube-preview-row{display:flex;align-items:center;gap:17px;width:100%;max-width:320px}.cube-preview-row canvas{width:144px;height:144px;flex-shrink:0;border:1px solid #3b5272;border-radius:12px;touch-action:none;cursor:grab}.cube-preview-row canvas:active{cursor:grabbing}.cube-preview-row strong{display:block;color:#d7e6fc;font-size:14px;margin-bottom:7px}.cube-preview-row span{font-size:13px;color:#96aaca;line-height:1.7}.edit-actions button{padding:9px 8px;font-size:13px;flex:1}.saved-icon-card canvas,.avatar-mini{image-rendering:auto}.avatar-mini{border:0}#cube-preview[aria-disabled="true"]{opacity:.7;cursor:wait}
@media(max-width:620px){.editor-layout{grid-template-columns:1fr}.drawing-tools{width:100%;max-width:360px;justify-self:center}.cube-preview-row canvas{width:120px;height:120px}.face-picker{max-width:320px}}
.boost-hint{position:absolute;top:89px;right:28px;z-index:2;max-width:calc(100% - 34px);border:1px solid #ff68c670;background:#37182ce0;color:#ffbce6;border-radius:8px;padding:8px 12px;font-size:12px;letter-spacing:.08em;font-weight:800;pointer-events:none}.boost-hint::before{content:"";display:inline-block;width:9px;height:9px;border:2px solid #ff68c6;border-radius:50%;margin-right:9px;vertical-align:middle}.boost-hint.active{background:#ff68c6;color:#24132a;border-color:#ffd7f1;box-shadow:0 0 22px #ff68c635}.boost-hint.active::before{border-color:#30132a}.jump-button.booster-controls{color:#ffb9e4;background:#ff68c61c;border-color:#ff68c690}.jump-button.booster-controls:active{background:#ff68c640}
@media(max-width:720px){.boost-hint{top:83px;right:17px;font-size:11px;padding:7px 9px}.controls .touch-hint{font-size:12px}}

.a2g-bar{height:36px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 30px;background:#0d1b31;border-bottom:1px solid #314259;color:#adbeda;font-size:12px}.a2g-bar a{color:#d4e8ff;text-decoration:none;font-weight:700}.a2g-bar a:hover{text-decoration:underline}.a2g-bar span{color:#8ca5c5}.stage{height:calc(100dvh - 202px)}
@media(max-width:720px){.a2g-bar{padding:0 13px}.stage{height:calc(100dvh - 170px)}}
@media(max-width:460px){.a2g-bar span{display:none}}
@media(max-height:590px) and (min-width:721px){.stage{height:calc(100dvh - 160px)}}
