:root{--tile-height:43px;--accent:#547b51;--ink:#354e3c;--muted:#78836a;--surface:#fffcf0;--line:#dce3d1;font-family:'Segoe UI',Arial,sans-serif;color:var(--ink);background:#e3ecd8;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px;overflow:hidden}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default}button:focus-visible{outline:3px solid #b88cdb;outline-offset:3px}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;pointer-events:none}.app{height:100vh;height:100dvh;display:flex;flex-direction:column;isolation:isolate;padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);background:#e4ecd9}.hud{height:72px;flex-shrink:0;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 32px;position:relative;z-index:3;background:linear-gradient(#fffef6e8,#fffef600);gap:20px}.hud-left,.hud-right{display:flex;align-items:center;gap:10px}.hud-right{justify-content:flex-end}.soft-button,.round-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #fff9;background:#fffdf3bf;box-shadow:0 2px 2px #57683b06;transition:background .15s,transform .15s}.round-button{width:40px;height:40px;border-radius:50%}.soft-button{height:40px;padding:0 14px;border-radius:14px;gap:8px;font-size:12px;font-weight:600}.soft-button .icon{width:17px;height:17px}.round-button:hover,.soft-button:hover{background:#fffef5;transform:translateY(-1px)}.dedication{font-family:'Trebuchet MS',sans-serif;font-size:15px;letter-spacing:-.4px;margin-left:10px}.dedication b{color:#c78e9c;font-size:20px;margin-left:4px}.level-heading{text-align:center}.level-caption{display:flex;justify-content:center;align-items:center;gap:9px;font-size:9px;color:#7a866c;font-weight:600;letter-spacing:.6px}.tiny-heart{display:none}.difficulty{font-size:9px;background:#ecf0df;border-radius:8px;padding:3px 7px;letter-spacing:0;color:#6d8657}.difficulty.hard{color:#a26f46;background:#f4e6d1}.difficulty.boss{color:#94739b;background:#efe1ed}h1{font:700 23px/1.15 'Trebuchet MS',sans-serif;letter-spacing:-.65px;margin:6px 0 0}.playfield{position:relative;flex:1;min-height:0;overflow:hidden;z-index:0}#scene{position:absolute;inset:0;width:100%;height:100%;display:block}.scene-status{position:absolute;left:50%;bottom:31px;transform:translateX(-50%);font-size:10px;white-space:nowrap;color:#738367;background:#fff9e8b8;padding:5px 13px;border-radius:20px;pointer-events:none;box-shadow:0 1px 9px #78814b08}.field-progress{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);width:min(380px,70%);display:flex;align-items:center;gap:12px;font-size:10px;color:#617850;font-variant-numeric:tabular-nums;white-space:nowrap}.progress-track{height:5px;background:#75975b24;border-radius:5px;flex:1;overflow:hidden}.progress-track>div{height:100%;width:0;background:var(--accent);border-radius:5px;transition:width .2s}.dock{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 120px;gap:24px;align-items:start;width:min(100% - 48px,1000px);margin:0 auto;flex-shrink:0;background:#fffcf0ed;box-shadow:0 -8px 45px #54753a0c;border:1px solid #ffffffb0;border-bottom:0;border-radius:26px 26px 0 0;padding:16px 24px max(19px,env(safe-area-inset-bottom));min-height:202px}.section-label{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:8px;color:#899276;margin-bottom:10px;height:11px;white-space:nowrap}.section-label>span:first-child{font-weight:650;letter-spacing:1.2px}.section-label>span:last-child{display:flex;align-items:center;gap:4px}.section-label .icon{width:10px;height:10px}.slots{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.slot{height:var(--tile-height);min-width:0;border:1px dashed #d6dfc5;border-radius:12px;background:#edf2e2a1;display:grid;place-items:center;position:relative;color:#c1cbb0;font-size:8px}.slot:after{content:attr(data-index);position:absolute;right:6px;bottom:4px;font-size:7px}.slot.occupied{background:none;border:0}.mini-cube{width:100%;margin:0}.slot.waiting .mini-cube{opacity:.85}.slot-full .slot{border-color:#d89e91}.dock-note{font-size:10px;color:#8e977c;margin-top:15px}.tray{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.tray-column{display:grid;min-width:0;grid-template-rows:repeat(3,var(--tile-height)) 12px;gap:7px}.cube-button,.mini-cube{position:relative;min-width:0;border:1px solid #fffc;height:var(--tile-height);border-radius:12px;display:grid;place-items:center;font-weight:750;font-size:20px;color:var(--box-ink);background:linear-gradient(145deg,var(--light) -30%,var(--box) 58%,var(--dark) 150%);box-shadow:inset 0 2px 0 #fff9,inset 2px 0 0 #fff4,0 4px 0 var(--dark),0 6px 8px #65532c12;text-shadow:0 1px #ffffff78;transition:transform .14s,filter .14s}.cube-button:before,.mini-cube:before{content:'';position:absolute;top:4px;left:12%;right:12%;height:9px;background:linear-gradient(#fff8,#fff0);border-radius:5px}.cube-button:not(:disabled):hover{transform:translateY(-3px);filter:brightness(1.05)}.cube-button:not(:disabled):active{transform:translateY(2px);box-shadow:inset 0 2px 0 #fff7,0 2px 0 var(--dark)}.cube-button:disabled{opacity:.46;filter:saturate(.5);font-size:16px}.cube-symbol{position:absolute;left:6px;top:6px;font-size:6px;opacity:.7}.cube-lock{position:absolute;right:5px;bottom:3px;opacity:.5}.cube-lock .icon{width:10px;height:10px}.cube-button.hinted{outline:3px solid #9d7abb;outline-offset:3px;animation:hint .8s ease-in-out 3}.column-empty{height:var(--tile-height);border-radius:12px;border:1px dashed #e1e5d5;display:grid;place-items:center;color:#c3cbb3}.dock-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:4px}.tool-button{border:0;background:#edf1e344;border-radius:13px;display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center;font-size:9px;color:#7b886b;min-height:48px;padding:8px 3px;transition:background .15s}.tool-button:hover{background:#e7edda;color:#46633e}.tool-button b{font:700 19px 'Trebuchet MS',sans-serif;line-height:20px}.tool-button .icon{width:19px;height:19px}.tool-button[aria-pressed=true]{background:#e4ecd6;color:#49673c}.toast{position:fixed;z-index:20;left:50%;bottom:225px;transform:translate(-50%,8px);background:#344e3c;color:#fff9e8;padding:11px 17px;border-radius:13px;font-size:12px;max-width:min(90%,500px);text-align:center;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}.toast.show{opacity:1;transform:translate(-50%,0)}.pause-cover{position:absolute;inset:0;background:#e7edddb3;backdrop-filter:blur(9px);z-index:5;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:17px}.pause-cover[hidden]{display:none}.pause-leaf{font-size:48px;color:#8fa174}.pause-cover h2{font:700 26px 'Trebuchet MS',sans-serif;letter-spacing:-.5px;margin:0 0 8px}.primary-button{border:0;border-radius:15px;background:var(--accent);color:#fffaf0;padding:15px 21px;font-weight:650;font-size:13px;display:flex;align-items:center;justify-content:center;gap:10px;box-shadow:0 4px 0 color-mix(in srgb,var(--accent) 75%,#203723);transition:transform .15s,filter .15s}.primary-button:hover{filter:brightness(1.09);transform:translateY(-1px)}.primary-button:active{transform:translateY(2px);box-shadow:0 2px 0 #344f35}.primary-button .icon{width:18px;height:18px}dialog{border:1px solid #ffffffb0;border-radius:27px;background:#fffcf2;color:var(--ink);padding:32px;width:min(440px,calc(100% - 28px));max-height:calc(100dvh - 30px);overflow:auto;box-shadow:0 30px 110px #34472c38}dialog::backdrop{background:#304a3655;backdrop-filter:blur(7px)}.close-dialog{background:#ecf0e3;border:0;border-radius:50%;width:33px;height:33px;font-size:23px;color:#7f8b72;position:absolute;right:16px;top:16px;display:grid;place-items:center}.eyebrow{font-size:9px;letter-spacing:1.4px;font-weight:650;color:#879573}dialog h2{font:700 29px/1.16 'Trebuchet MS',sans-serif;letter-spacing:-.8px;margin:16px 0}dialog p{font-size:13px;line-height:1.8;color:#7b866e}dialog .primary-button{width:100%;margin-top:24px}kbd{border:1px solid #d8dfc9;border-bottom-width:2px;border-radius:4px;padding:0 4px;font:inherit}.levels-dialog{width:min(940px,calc(100% - 28px));padding:28px}.dialog-top{position:relative;padding-right:36px}.dialog-top h2{font-size:27px;margin:9px 0 23px}.dialog-top h2 span{color:#c58b9c}.dialog-top .close-dialog{right:-8px;top:-9px}.level-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px}.level-card{text-align:left;border:1px solid #e4e7d8;border-radius:17px;padding:10px;background:#f4f4e8;position:relative;transition:transform .15s,border-color .15s}.level-card:hover{transform:translateY(-3px);border-color:#a6b789}.level-card.current{border:2px solid var(--accent);padding:9px}.level-card .thumb{height:112px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--thumb-bg)}.thumb svg{height:96px;width:90px;filter:drop-shadow(0 3px 0 #72634314)}.level-card strong{display:block;margin-top:10px;font-size:12px;font-weight:650}.level-card .card-meta{display:flex;align-items:center;justify-content:space-between;margin-top:6px;font-size:9px;color:#8b947e}.done-mark{position:absolute;right:15px;top:14px;background:#fbfff0d9;color:#6d8b51;border-radius:50%;width:22px;height:22px;display:grid;place-items:center;font-weight:700}.menu-foot{margin-bottom:0;text-align:center;font-size:11px!important}.result-dialog{text-align:center}.result-art{width:100px;height:110px;margin:2px auto 20px;display:grid;place-items:center}.result-art svg{width:94px;height:100px;filter:drop-shadow(0 5px 0 #6a714617)}.result-dialog h2{margin-top:12px}.result-stats{display:flex;justify-content:center;gap:30px;margin:24px 0}.result-stats strong{display:block;font-size:23px;color:var(--accent);font-family:'Trebuchet MS',sans-serif}.result-stats span{font-size:10px;color:#929a83}.result-secondary{display:flex;justify-content:center;gap:35px;margin-top:20px}.text-button{border:0;background:none;padding:7px;font-size:11px;color:#849175}.flying-cube{position:fixed;z-index:50;pointer-events:none;border-radius:12px;display:grid;place-items:center;font-size:21px;font-weight:700;color:var(--box-ink);background:linear-gradient(145deg,var(--light),var(--box));box-shadow:inset 0 2px 0 #fffa,0 4px 0 var(--dark),0 10px 20px #53653629}@keyframes hint{50%{outline-offset:6px}}@media(min-width:1700px){.hud{padding-left:50px;padding-right:50px}.dock{margin-bottom:18px;border-radius:26px;border-bottom:1px solid #fff9}.toast{bottom:245px}}@media(max-width:1040px){.dock{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 110px;gap:20px;width:calc(100% - 32px);padding:14px 20px 17px}.dedication{display:none}.hud{padding:0 22px}.tool-button{font-size:8px;min-height:48px}.slots{gap:8px}.level-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:760px){.app{--tile-height:38px}.hud{height:61px;padding:0 14px;gap:8px;grid-template-columns:42px 1fr 82px}.hud-left .soft-button{width:39px;padding:0;border-radius:13px}.hud-left .soft-button span{display:none}.hud-left .soft-button .icon{width:18px;height:18px}.hud-right{gap:5px}.round-button{width:36px;height:36px}.fullscreen-button{display:none}.level-caption{gap:6px;font-size:8px;letter-spacing:.2px}.tiny-heart{display:inline;font-weight:400;color:#ad8193}.difficulty{font-size:8px;padding:2px 5px}.level-heading h1{font-size:18px;margin-top:5px}.dock{display:grid;grid-template-columns:1fr;gap:10px;width:100%;padding:10px max(18px,calc((100% - 460px)/2)) max(10px,env(safe-area-inset-bottom));min-height:0;border-radius:23px 23px 0 0}.waiting{position:relative;width:100%;min-width:0;margin:0 auto}.waiting .section-label{margin-bottom:6px;height:9px}.slots{gap:8px}.slot{border-radius:10px}.dock-note{display:none}.section-label{margin-bottom:7px;font-size:7px;height:10px}.tray{gap:8px}.tray-column{gap:6px}.cube-button,.mini-cube,.column-empty{border-radius:10px}.cube-button,.mini-cube{font-size:18px}.cube-button:disabled{font-size:14px}.cube-symbol{left:5px;top:5px}.dock-actions{display:flex;align-items:center;justify-content:space-around;margin:0;gap:4px}.tool-button{flex:1;min-height:26px;padding:3px 4px;flex-direction:row;gap:5px;font-size:9px;background:none;border-radius:8px}.tool-button .icon{height:15px;width:15px}.tool-button b{font-size:15px}.tool-button span{font-size:9px}.scene-status{font-size:8px;padding:3px 9px;bottom:26px}.field-progress{font-size:8px;bottom:9px;width:min(300px,72%);gap:8px}.progress-track{height:4px}.toast{bottom:280px;font-size:11px}.level-grid{grid-template-columns:repeat(2,1fr);gap:10px}.levels-dialog{padding:22px 16px}.dialog-top h2{font-size:23px}.level-card .thumb{height:100px}.level-card strong{font-size:11px}.level-card .card-meta{font-size:8px}.level-card .difficulty{font-size:7px}.level-card{padding:8px}.level-card.current{padding:7px}}@media(max-height:700px) and (max-width:760px){.app{--tile-height:34px}.hud{height:54px}.dock{gap:7px;padding-top:8px;padding-bottom:max(7px,env(safe-area-inset-bottom))}.waiting .section-label{display:none}.tray-column{gap:5px}.tool-button{min-height:23px}.queue .section-label{margin-bottom:5px}.scene-status{bottom:22px}.level-heading h1{font-size:16px}}@media(max-width:360px){.dock{padding-left:12px;padding-right:12px}.tray{gap:6px}.level-caption{font-size:7px;gap:4px}.level-heading h1{font-size:16px}.hud{padding:0 10px}.difficulty{font-size:7px}.tiny-heart{display:none}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(min-width:761px) and (max-width:950px){.dock{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 100px;gap:16px;padding-left:16px;padding-right:16px}.dock-actions{gap:8px}}
@media(pointer:coarse){.round-button,.soft-button{min-width:44px;min-height:44px}.app{--tile-height:44px}.tool-button{min-height:44px}.dock-actions{gap:4px}}
/* Stable pointer geometry and quiet HUD; counters remain accessible. */
.cube-button:not(:disabled):hover{transform:none;filter:brightness(1.035)}
.scene-status,.waiting .section-label,.queue .section-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none}
.cube-symbol,.slot:after{display:none}.column-empty{border-color:transparent;background:none}.waiting-ant{width:22px;height:22px}.level-pages{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:16px}.chapter-button{border:1px solid #dde4cf;border-radius:10px;padding:8px 13px;background:#f3f5e9;color:#6a7e5b;font-size:11px}.chapter-button.selected{background:var(--accent);color:#fff9ed;border-color:var(--accent)}

.love-note{flex-shrink:0;width:min(550px,100%);box-sizing:border-box;margin:0 auto;padding:7px 24px 9px;text-align:center;font-size:13px;line-height:1.6;color:#946780;font-weight:500}.love-level .tiny-heart{display:none}@media(max-height:700px){.love-note{font-size:12px;padding-top:3px;padding-bottom:5px}}

@media(pointer:coarse) and (max-width:760px){.hud{grid-template-columns:44px 1fr 94px}}
