:root{color-scheme:dark;--bg:#252923;--panel:#30362d;--cream:#f1eed5;--dim:#a9ae97;--lime:#c9dc99;--gold:#dbbf78;--line:#697159;font-family:"Segoe UI","Microsoft YaHei",sans-serif}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0,#3d4533 0,transparent 60%),var(--bg);color:var(--cream);min-height:100vh}button,.button,select{font:inherit}button,.button{cursor:pointer;border:1px solid #737a60;background:#3d4435;color:var(--cream);border-radius:5px;padding:9px 14px;transition:background .15s,border-color .15s}button:hover,.button:hover{background:#515c42;border-color:var(--lime)}button:focus-visible,a:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #dfca8b;outline-offset:3px}button:disabled{opacity:.4;cursor:default}button.primary{background:var(--lime);color:#273226;border-color:#e2edc0;font-weight:700}button.primary:hover{background:#deecbb}[hidden]{display:none!important}a{color:var(--lime)}.game-shell{width:min(1120px,calc(100% - 64px));margin:30px auto 20px}.masthead{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:34px}.brand{text-decoration:none;color:var(--cream);display:flex;align-items:center;gap:12px}.brand-creature{width:62px;height:64px;display:block}.brand-creature svg{width:100%;height:100%}.logo{font:bold 52px/1 Georgia,serif;letter-spacing:-3px;display:block;text-shadow:0 3px #121811}.logo-dot{color:var(--lime)}.brand-caption{font-size:11px;letter-spacing:2px;color:#b7bea5;display:block;margin-top:9px}.brand-caption span{margin:0 3px}.masthead nav{display:flex;gap:8px;align-items:center}.masthead nav button{font-size:13px;background:#ffffff05;border-color:#637052;padding:10px 15px}.masthead nav button span{font-size:11px;margin-left:8px;color:#c6d59f}.eyebrow{color:var(--lime);font-size:11px;letter-spacing:2px;margin:0 0 10px}.level-heading{display:flex;align-items:end;justify-content:space-between;margin:0 2px 17px;gap:16px}h1{font-size:25px;line-height:1.2;margin:0;font-weight:600;display:flex;align-items:center;gap:16px}.level-number{font:32px/1 Georgia,serif;color:var(--gold);border-right:1px solid #767d5d;padding-right:17px}.level-stats{display:flex;align-items:center;gap:20px}.level-stats>span{display:flex;flex-direction:column;gap:4px}.level-stats small{font-size:10px;color:var(--dim);letter-spacing:1px}.level-stats strong{font:20px Georgia,serif;font-weight:400}.level-stats button{padding:5px 9px;margin-left:-12px;border-color:#697055;background:transparent}.game-frame{border:2px solid #b6b18b;border-radius:7px;box-shadow:0 15px 45px #080d0960,0 0 0 3px #111910,0 0 0 5px #606549;overflow:hidden}.brick-surround{padding:22px 54px;background-color:#493c35;background-image:linear-gradient(0deg,transparent 85%,#241f1bd9 86%,#a27d5530 94%,transparent 95%),linear-gradient(90deg,transparent 91%,#241f1bbf 93%,transparent 96%),linear-gradient(90deg,#221b1630,transparent 45%,#92826310);background-size:49px 21px,49px 42px,10px 7px;box-shadow:inset 0 5px 15px #131810aa}.board-wrap{position:relative;box-shadow:0 7px 12px #10191480;background:#32483e}.board{display:grid;grid-template-columns:repeat(14,1fr);gap:0;position:relative;outline:none}.cell{aspect-ratio:1;border-radius:0;border:1px solid #648272;background-color:#9db7aa;background-image:repeating-linear-gradient(135deg,transparent 0 6px,#e5ebd22a 7px 8px,transparent 9px 15px),radial-gradient(ellipse at 20% 15%,#d8e2c26b,transparent 65%);box-shadow:inset 1px 1px 0 #edf2d47a,inset -1px -1px 0 #456c636b;position:relative;padding:0;min-width:0;overflow:visible;cursor:pointer}.cell:hover{background-color:#b8c6a0;box-shadow:inset 0 0 0 2px #fff4bc}.cell svg{position:absolute;width:100%;height:113%;bottom:0;left:0;filter:drop-shadow(2px 3px 2px #152c2635);pointer-events:none;z-index:2}.cell.wall{background:#536857;cursor:default}.cell.wall svg{height:116%}.cell.freeze{background-color:#9bccea;background-image:linear-gradient(45deg,#a9dcf9aa,transparent),repeating-linear-gradient(135deg,transparent 0 10px,#eafbff44 11px 12px)}.cell.freeze:after{content:'❄';position:absolute;inset:0;display:grid;place-items:center;color:#e1f7ff;font-size:clamp(15px,3vw,36px);opacity:.7}.cell.heat{background:radial-gradient(circle,#ffe5a6,#f5a263 50%,#b76843);box-shadow:inset 0 0 0 4px #ddc1a1}.cell.heat:after{content:'≋';font-size:32px;color:#8b4123;position:absolute;inset:0;display:grid;place-items:center}.cell.water{background:repeating-radial-gradient(ellipse at 20% 100%,#326c84 0 9px,#5999a8 10px 12px,#4a8498 13px 18px)}.cell.pickup{background-color:#669cbf;box-shadow:inset 0 0 0 2px #cfdbc3}.cell.pickup svg{width:80%;height:88%;left:10%;bottom:4%}.cell.baby{background-color:#97b69a}.beam-layer{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;overflow:visible;filter:drop-shadow(0 0 4px #5aff73)}.beam-layer line{stroke:#80ff72;stroke-width:.095;stroke-linecap:round}.beam-layer line.core{stroke:#dbffb8;stroke-width:.027}.player{position:absolute;width:7.1428%;height:10%;z-index:5;pointer-events:none;transition:left .12s ease,top .12s ease}.player svg{width:100%;height:108%;position:absolute;bottom:0}.cell.explosion:before{content:'';position:absolute;inset:-5%;z-index:4;background:radial-gradient(circle,#fff5c2,#ffb142 40%,#f3752450 70%,transparent 75%);animation:blast .6s both;pointer-events:none}@keyframes blast{0%{opacity:1;transform:scale(.7)}100%{opacity:0;transform:scale(1.3)}}.inventory-bar{background:linear-gradient(#788c49,#536a36);border-top:3px solid #c2c49a;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:inset 0 2px 0 #98a964,inset 0 -4px 0 #314024}.inventory-group{display:flex;align-items:center;gap:18px;min-width:0}.inventory-title{display:flex;flex-direction:column;gap:5px;white-space:nowrap}.inventory-title>span{font-size:14px;color:#eff3ce;letter-spacing:3px}.inventory-title small{font-size:9px;letter-spacing:1px;color:#d1ddaf}.inventory{display:flex;gap:6px;flex:1;min-width:0}.slot{position:relative;width:50px;height:53px;padding:0;border:2px solid #d8c899;border-radius:2px;box-shadow:1px 2px 0 #2b3525,inset 2px 2px 2px #d6eff482,inset -2px -2px 2px #192f66;background:radial-gradient(circle at 35% 25%,#c2e3eb,#649ec7 35%,#2a669c 75%)}.slot:hover{background-color:#74adc9}.slot.empty{opacity:.7;cursor:default}.slot.selected{border-color:#fff5b6;box-shadow:0 0 0 2px #e6d28e,0 0 12px #fffbb54d}.slot svg{width:100%;height:100%;position:absolute;inset:0}.slot kbd{font:9px "Segoe UI",sans-serif;position:absolute;top:1px;left:3px;color:#f1f4cd;text-shadow:0 1px #285c83;z-index:1}.slot-label{font-size:9px;background:#1f3c5599;position:absolute;bottom:0;left:0;right:0;line-height:14px}.game-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}.game-actions button{padding:5px 9px;font-size:11px;background:#34432b;border-color:#9da477;border-radius:3px;white-space:nowrap}.under-board{min-height:55px;display:flex;align-items:center;gap:8px;padding:12px 1px}.under-board p{margin:0;flex:1;color:#c7ceb7;font-size:12px;line-height:1.6}.under-board button{padding:5px 9px;font-size:11px}.under-board kbd{color:#a9b399;font-size:9px}.game-footer{border-top:1px solid #606b4c;display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:13px;font-size:10px;letter-spacing:.5px;color:#9aa88a}.game-footer>span{display:flex;align-items:center;gap:7px}.status-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:#afce87}.desktop-tip span{color:#667658;margin:0 4px}.game-footer button{border:0;padding:0;font-size:10px;color:#b4c29d;background:transparent}.result-panel{position:absolute;z-index:9;inset:20% 20%;padding:20px;background:#283326f5;border:2px solid #d3c58c;box-shadow:0 8px 30px #0006;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;border-radius:5px}.result-panel>span{width:70px;height:70px}.result-panel svg{height:100%;width:100%}.result-panel h2{margin:8px 0;font-size:26px}.result-panel p{font-size:12px;color:#c3cdb0;max-width:330px;line-height:1.7;margin:0 0 16px}.result-panel>div{display:flex;gap:8px}.result-panel button{font-size:12px}.touch-directions{display:none}dialog{color:var(--cream);background:var(--panel);border:1px solid #a8b18e;border-radius:9px;padding:27px;width:min(780px,calc(100% - 28px));max-height:85vh;overflow:auto;box-shadow:0 25px 80px #0008}dialog::backdrop{background:#121b15c7;backdrop-filter:blur(4px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:19px}.dialog-heading h2{margin:0;font-size:25px;font-weight:600}.dialog-heading>button{background:transparent;padding:3px 10px;font-size:23px;color:#c9ceba}.lead{color:#d8ddc5;line-height:1.8;font-size:14px}dialog p{font-size:13px;color:#bac4ac;line-height:1.85}.dialog-note{font-size:11px!important;color:#99a88e!important}.chapter-tabs{display:flex;gap:8px;margin-bottom:20px}.chapter-tabs button{flex:1;font-size:12px}.chapter-tabs button.active{background:#c4d891;color:#273023}.level-list{display:grid;grid-template-columns:1fr 1fr;gap:9px}.level-card{display:flex;align-items:center;gap:12px;text-align:left;padding:14px;background:#3b4436}.level-card .number{font:24px Georgia,serif;color:var(--gold);width:28px}.level-card .level-name{font-size:13px;flex:1}.level-card small{font-size:10px;color:#c4d891}.level-card.current{border-color:#d9cd8e}.guide-basics{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.guide-basics h3{color:var(--gold);font-size:14px;margin:12px 0 3px}.guide-basics p{font-size:12px;margin:4px 0}.tool-guide{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:20px 0}.tool-guide article{display:flex;align-items:center;gap:13px;background:#252e23;padding:10px;border-radius:4px}.tool-guide .tool-image{width:40px;flex-shrink:0}.tool-image svg{width:100%}.tool-guide h3{margin:0 0 4px;font-size:13px;color:#e7dab1}.tool-guide p{margin:0;font-size:11px;line-height:1.6}.wide-dialog{width:min(930px,calc(100% - 24px))}.editor-layout{display:grid;grid-template-columns:1fr 1fr;gap:25px}.editor-layout label{font-size:12px;display:block;margin-bottom:7px;color:#d5dcc0}select{background:#232c23;color:var(--cream);border:1px solid #7d8768;border-radius:3px;padding:7px;width:100%;margin-bottom:10px}.editor-board{display:grid;gap:1px;background:#465a46}.editor-board button{aspect-ratio:1;padding:0;border-radius:0;font:13px monospace;min-width:0;border:0;background:#729283}.editor-board button.solid{background:#455e48}.editor-board button.placed{background:#355377;color:#fff3bd}textarea{resize:vertical;width:100%;min-height:230px;padding:12px;background:#1c271f;color:#e6eccc;font:14px/1.4 Consolas,monospace;border:1px solid #798468;border-radius:4px;white-space:pre;overflow:auto;letter-spacing:2px}.editor-error{color:#f2be91;min-height:21px;font-size:12px}.editor-actions{display:flex;flex-wrap:wrap;gap:7px}.editor-actions button,.editor-actions .button{font-size:11px;margin:0;display:inline-block}.toggle-label{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #5e694e;padding:16px 0;font-size:14px}.toggle-label input{width:19px;height:19px;accent-color:var(--lime)}#audio-dialog{max-width:430px}
@media(min-width:1300px){.game-shell{margin-top:38px}.brick-surround{padding:24px 65px}.slot{width:54px;height:57px}.masthead{margin-bottom:38px}}
@media(max-width:1050px){.game-shell{width:calc(100% - 40px)}.brick-surround{padding:20px 35px}.inventory-title{display:none}.slot{width:47px;height:49px}.desktop-tip{display:none!important}.masthead nav button{padding:9px 10px}.inventory-bar{gap:10px;padding:12px}.inventory{gap:5px}}
@media(max-width:760px){.game-shell{width:calc(100% - 24px);margin:15px auto}.masthead{margin-bottom:23px;align-items:center;gap:8px}.logo{font-size:39px}.brand-creature{width:42px;height:46px}.brand{gap:6px}.brand-caption{font-size:8px;letter-spacing:1px;margin-top:6px}.masthead nav{gap:4px;flex-wrap:wrap;justify-content:end;max-width:230px}.masthead nav button{font-size:10px;padding:7px 8px}.masthead nav button span{display:none}.level-heading{margin-bottom:13px}.level-heading h1{font-size:18px;gap:10px}.level-number{font-size:25px;padding-right:10px}.eyebrow{font-size:9px;letter-spacing:1px;margin-bottom:7px}.level-stats{gap:12px}.level-stats small{font-size:8px}.level-stats strong{font-size:15px}.level-stats button{margin-left:-5px;padding:4px 6px}.brick-surround{padding:13px 14px}.inventory-bar{flex-direction:column;gap:11px;padding:11px 10px}.inventory-group{width:100%;justify-content:center}.inventory{gap:5px;justify-content:space-between;max-width:530px}.slot{width:calc((100% - 45px)/10);height:auto;aspect-ratio:1;flex-shrink:1;min-width:0}.slot-label{display:none}.game-actions{display:flex;width:100%;justify-content:center;gap:9px}.game-actions button{padding:6px 13px;font-size:11px}.under-board{flex-wrap:wrap;min-height:62px;gap:6px}.under-board p{font-size:11px;flex-basis:100%}.under-board button{font-size:10px}.game-footer{font-size:9px}.game-footer button{font-size:9px}.touch-directions{display:block;margin:16px auto 0;text-align:center}.touch-directions button{width:45px;height:37px;margin:3px;padding:6px;color:#d4ddb7}.result-panel{inset:12% 10%;padding:13px}.result-panel>span{width:45px;height:45px}.result-panel h2{font-size:20px;margin:5px 0}.result-panel p{font-size:10px;margin-bottom:10px}.result-panel button{font-size:10px;padding:6px 8px}.editor-layout{grid-template-columns:1fr}.guide-basics{grid-template-columns:1fr}.tool-guide{grid-template-columns:1fr}.chapter-tabs{gap:4px}.chapter-tabs button{font-size:10px;padding:8px 6px}dialog{padding:20px}.level-list{gap:6px}.level-card{padding:10px;gap:6px}.level-card .number{font-size:20px;width:24px}.level-card .level-name{font-size:11px}.level-card small{font-size:9px}.cell.heat:after{font-size:18px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Native Redone artwork overrides the earlier vector prototype. */
:root{--bg:#211716;--panel:#e5c78b;--cream:#ffe7ac;--dim:#baa48e;--lime:#f0cb78;--gold:#f2c678;--line:#6f5442}body{background:#211716 url('./assets/MenuBackgroundTile.png') repeat}.game-shell{width:min(1180px,calc(100% - 48px));margin:20px auto}.masthead{margin-bottom:18px}.logo{font-family:Georgia,serif;color:#dfbefe;text-shadow:2px 3px #311c41}.brand-creature{position:relative;width:64px;height:74px}.brand-creature img{height:100%;width:100%;object-fit:contain}.brand-caption{color:#c8afd6}.masthead nav button{background:#211f20;border-color:#8c8580;color:#ffeac5}.level-heading{background:#211716d9;padding:12px;margin:0}.level-heading h1{font-size:23px}.game-frame{border:2px solid #a66b3c;border-radius:0;box-shadow:0 10px 30px #0009}.brick-surround{padding:20px 56px;background:#362620 url('./assets/MenuBackgroundTile.png') repeat;box-shadow:inset 0 0 15px #000}.board-wrap{background:#211716;box-shadow:0 2px 8px #000}.cell,.cell:hover,.cell.wall,.cell.pickup,.cell.baby{background-image:var(--floor);background-size:100% 100%;background-color:#a9927b;border:0;box-shadow:none;aspect-ratio:1}.cell:hover{filter:brightness(1.14)}.cell.freeze:after,.cell.heat:after{display:none}.cell .sprite{position:absolute;width:100%;height:130%;bottom:0;left:0;object-fit:fill;pointer-events:none;z-index:2;image-rendering:auto;filter:none}.cell.wall .sprite{height:129.7%}.cell.pickup:before{content:'';position:absolute;inset:0;background:url('./assets/ItemBackgroundOutline.png') center/100% 100%;z-index:1;pointer-events:none}.cell.pickup>.sprite{width:80%;height:100%;left:10%;bottom:2%;object-fit:contain}.plate{position:absolute;inset:0;pointer-events:none}.plate .sprite{width:100%;height:100%;z-index:0}.cell.baby>.sprite{height:115.6%}.cell .sprite[src*="Torch"],.cell .sprite[src*="WaterBucket"],.cell .sprite[src*="Wrench"],.cell .sprite[src*="Hammer"]{height:100%;object-fit:contain}.cell .sprite[src*="Bomb"]{height:125%}.beam-layer{filter:drop-shadow(0 0 2px #21ff2a);z-index:3}.beam-layer line{stroke:#26ff33;stroke-width:.055}.beam-layer line.core{stroke:#c3ffc8;stroke-width:.018}.player{transition:left .15s linear,top .15s linear;z-index:5}.player .sprite{position:absolute;width:100%;height:129.7%;bottom:0;object-fit:contain;pointer-events:none}.player.frozen .sprite{height:129.7%}.player.wet .sprite{height:129.7%}.inventory-bar{background:#d58d22 url('./assets/DownInGameUI.png') center/100% 100%;border:0;min-height:92px;box-shadow:none;padding:18px 16px 8px;gap:14px}.inventory-group{flex:1;min-width:0}.inventory{width:100%;gap:5px}.slot,.slot:hover{background:transparent url('./assets/SlotBackground.png') center/100% 100%;border:0;border-radius:0;box-shadow:none;width:clamp(35px,5vw,64px);height:auto;aspect-ratio:1;flex:1;max-width:64px}.slot .sprite{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:5px;pointer-events:none}.slot kbd{color:#fff2b9;text-shadow:1px 1px #142d63;font-size:10px;left:5px;top:3px}.slot.empty{opacity:1}.slot.selected{box-shadow:inset 0 0 0 3px #5afb2d}.slot-label{display:none}.game-actions{grid-template-columns:repeat(2,1fr);gap:3px;max-width:236px}.game-actions button{background:#211f1e url('./assets/ButtonBackground.png') center/100% 100%;border:1px solid #898681;border-radius:0;color:#ffe8b0;font-size:10px;padding:5px 10px}.game-actions #restart,.game-actions #levels-bottom{grid-column:span 2}.game-actions #wait{grid-column:span 2}.game-actions{grid-template-columns:repeat(4,1fr);max-width:250px}.game-actions #undo,.game-actions #hint,.game-actions #wait{grid-column:auto}.game-actions #wait{grid-column:span 2}.under-board{background:#211716e0;padding:12px;min-height:48px}.under-board p{color:#ead8be}.game-footer{background:#211716d9;padding:10px;border-color:#694936}.game-footer button,.game-footer>span{color:#bdac9e}.result-panel{background:#e8c887 url('./assets/LevelResultPanelWinBackground.png') center/100% 100%;border:0;box-shadow:0 5px 20px #0008;border-radius:0;padding:26px;color:#352821;inset:23% 27%}.result-panel[data-result=dead]{background-image:url('./assets/LevelResultPanelLoseBackground.png')}.result-panel h2{font-size:24px}.result-panel p{color:#45382b}.result-panel>span{display:none}dialog{background:#e8cb90;color:#372822;border:4px ridge #cca66d;border-radius:0;box-shadow:0 15px 60px #0008}dialog p{color:#4e3c2a}dialog .eyebrow{color:#704e37}.dialog-note{color:#715942!important}.dialog-heading>button{color:#4d3426}dialog button,dialog .button,dialog select{background:#665344;color:#ffebc0;border-color:#997352}.chapter-tabs button.active{background:#9e6d36;color:#fff3c4}.level-card{background:#f5dca5;color:#452c20;border-color:#be9564}.level-card .number,.level-card small,.guide-basics h3,.tool-guide h3{color:#754322}.level-card.current{border-color:#6b391f;box-shadow:inset 0 0 0 1px #6b391f}.guide-basics p{color:#4d3b28}.tool-guide article{background:#f6daa0}.tool-image .sprite{width:44px;height:50px;object-fit:contain}.tool-guide p{color:#513923}.editor-layout label{color:#513923}textarea{background:#392e27;color:#fff0c3;border-color:#8a6b48}.toggle-label{border-color:#b28c57}.toggle-label input{accent-color:#79501f}.editor-error{color:#942d12!important}html[data-paused=true] .board-wrap{filter:brightness(.6)}.level-stats>span{white-space:nowrap}.level-stats{flex-shrink:0}.cell.explosion:before{z-index:6}.touch-directions button{background:#262321;color:#f0d49b}
@media(min-width:1300px){.game-shell{margin-top:20px}.brick-surround{padding:18px 66px}.masthead{margin-bottom:18px}}
@media(max-width:1050px){.brick-surround{padding:15px 28px}.inventory-bar{padding:16px 10px 8px}.game-actions{max-width:210px}}
@media(max-width:760px){.game-shell{width:calc(100% - 12px);margin:8px auto}.brand-creature{width:38px;height:48px}.masthead{margin:0 4px 12px}.masthead nav{max-width:250px}.masthead nav button{padding:6px 7px}.logo{font-size:36px}.brand-caption{font-size:8px}.level-heading{padding:10px 6px;gap:8px}.level-heading h1{font-size:16px;gap:8px}.level-heading>div:first-child{min-width:0}.level-number{font-size:22px;padding-right:8px}.level-stats{gap:8px}.level-stats small{font-size:7px}.level-stats strong{font-size:13px}.level-stats button{padding:3px 5px}.brick-surround{padding:12px 3px}.inventory-bar{padding:15px 5px 8px;gap:8px}.slot{max-width:none;width:auto}.slot .sprite{padding:3px}.inventory{gap:2px;max-width:none}.slot kbd{font-size:8px;left:3px;top:2px}.game-actions{max-width:none;display:flex;flex-wrap:wrap;gap:4px}.game-actions button{padding:5px 9px;font-size:10px}.result-panel{inset:15% 12%;padding:15px}.result-panel h2{font-size:19px}.under-board{padding:9px}.eyebrow{letter-spacing:1px;font-size:9px}.game-footer{padding:10px 6px}.brand{gap:4px}.masthead nav button span{display:none}.level-list{grid-template-columns:1fr 1fr}.level-card small{display:none}.touch-directions{margin-top:10px}}
@font-face{font-family:Redone;src:url('./assets/LiberationSans.ttf') format('truetype');font-display:swap}@font-face{font-family:RedoneDOS;src:url('./assets/PerfectDOSVGA437.ttf') format('truetype');font-display:swap}:root{font-family:Redone,"Microsoft YaHei",sans-serif}.game-actions button{font-family:RedoneDOS,"Microsoft YaHei",sans-serif}.level-heading h1{font-family:Redone,"Microsoft YaHei",sans-serif}
.cell .sprite{object-fit:contain;object-position:center bottom}.player.dead .sprite{height:129.7%}
.walkthrough-text{font-size:16px;line-height:2;white-space:pre-wrap;overflow-wrap:anywhere}#walkthrough-dialog{max-height:85dvh;overflow:auto}.chapter-tabs{flex-wrap:wrap}.game-actions #walkthrough-button{grid-column:span 2}#walkthrough-button[hidden]{display:none}
@media(min-width:761px){.game-shell{width:min(1180px,calc(100% - 48px),max(760px,calc((100dvh - 370px)*1.6 + 132px)))}.brand-creature{height:60px;width:53px}.logo{font-size:44px}.masthead{margin-bottom:14px}.level-heading{padding:10px 12px}.inventory-bar{min-height:86px}.slot kbd{font-size:9px}.game-footer{padding:9px 10px}}
/* Continuous rays and a persistent character layer, driven by the scene clock. */
.beam-layer{filter:none;contain:layout style}.beam-layer path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.beam-layer .beam-halo{stroke:#30e74c;stroke-width:.14;opacity:.18;filter:drop-shadow(0 0 2px #39ff59)}
.beam-layer .beam-color{stroke:#42f65c;stroke-width:.052;opacity:.95}.beam-layer path.core{stroke:#dbffe4;stroke-width:.017}
.beam-layer{overflow:hidden}.cell.wall>.sprite,.cell.laser>.sprite,.cell.mirror>.sprite,.cell.fan>.sprite,.cell.bomb>.sprite{z-index:4}.cell.bomb>.sprite{height:125%}
/* Direction classes survive both Canvas painting and embedded offline URLs. */
.cell.laser>.sprite.laser-right,.cell.laser>.sprite.laser-left{width:120%;height:156%;left:-10%}
.cell.laser>.sprite.laser-right{bottom:-3.1818%}.cell.laser>.sprite.laser-left{bottom:-1.6429%}
.cell.fan>img.sprite{width:var(--frame-width,100%);height:var(--frame-height,109.375%);left:var(--frame-left,0%);bottom:var(--frame-bottom,0%);object-fit:fill}
.cell.fan>canvas.native-fan-frame{width:100%;height:109.375%;left:0;bottom:0;object-fit:fill}
.cell:hover{filter:none}.cell:hover>.sprite,.cell:hover>.plate{filter:brightness(1.14)}
.cell:focus,.cell:focus-visible{outline:none;outline-offset:0}
.player{transition:none;will-change:left,top}.cell.burning>.sprite{filter:sepia(.18) drop-shadow(0 0 3px #ed973c)}
.brand-creature .sprite{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
#fast-toggle[aria-pressed=true]{color:#c5ffc7;border-color:#83ce86;background:#285130}
.effect-layer{position:absolute;inset:0;z-index:6;pointer-events:none;overflow:visible}
.scene-effect{position:absolute;pointer-events:none}.scene-effect .sprite{position:absolute;width:130%;height:155%;left:-15%;bottom:-5%;object-fit:contain;object-position:center bottom;z-index:0}
.scene-effect .scene-sparks{position:absolute;left:-190%;top:-205%;width:480%;height:480%;z-index:2;pointer-events:none}
.scene-sparks path{fill:none;stroke-linecap:round}
.cell.explosion:before{animation:blast .55s ease-out both;opacity:.75}
html[data-board-active=false] .cell.explosion:before{animation-play-state:paused}
.compact-menu-button{display:none}#compact-dialog{max-width:520px}#compact-navigation nav,#compact-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px}#compact-navigation button,#compact-actions button{min-height:36px;font-size:13px}#compact-account .game-switcher{margin:0;padding:8px 0;justify-content:start;flex-wrap:wrap}#compact-save .game-footer{background:none;flex-wrap:wrap;padding:10px 0 0;border-color:#b28c57;color:#513923}#compact-save .game-footer>span,#compact-save .game-footer button{color:#513923}
/* A single short heading leaves almost the whole landscape height for play. */
@media(orientation:landscape) and (max-height:560px) and (max-width:999px){
 .game-shell{width:100%;max-width:none;height:100dvh;margin:0;padding:4px max(6px,env(safe-area-inset-right)) 4px max(6px,env(safe-area-inset-left));display:grid;grid-template-columns:minmax(0,1fr) 156px;grid-template-rows:26px minmax(0,1fr);grid-template-areas:"heading menu" "frame frame";gap:4px}
 .masthead{display:none}.compact-menu-button{display:block;grid-area:menu;min-height:0;padding:3px 8px;font-size:12px;line-height:18px;background:#34261e;border-radius:0}.game-shell>.game-switcher{display:none}
 .level-heading{grid-area:heading;padding:0 6px;align-items:center;gap:5px;background:transparent}.level-heading .eyebrow{display:none}.level-heading h1{font-size:14px;gap:7px}.level-number{font-size:17px;padding-right:7px}.level-stats{gap:10px}.level-stats>span{flex-direction:row;align-items:center;gap:4px}.level-stats small{font-size:9px}.level-stats strong{font-size:12px}.level-stats button{margin:0;padding:1px 5px}
 .level-heading>div:first-child,.level-heading h1,#level-title{min-width:0}#level-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.level-number{flex-shrink:0}
 .game-frame{grid-area:frame;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) 156px;grid-template-rows:minmax(0,1fr);border-width:1px}
 .brick-surround{min-height:0;min-width:0;padding:3dvh 2px 2px;display:flex;align-items:center;justify-content:center;container-type:size}.board-wrap{width:min(100%,calc((97dvh - 42px)*var(--board-ratio,1.6)));aspect-ratio:var(--board-ratio,1.6);flex:none;max-height:none}
 .inventory-bar{min-height:0;padding:6px;display:flex;flex-direction:column;justify-content:space-between;align-items:stretch;gap:5px;border-left:2px ridge #b99a68;background:linear-gradient(#a87739,#704c29)}
 .inventory-group{flex:0 1 auto;min-height:0}.inventory{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;justify-items:center;max-width:none;width:100%}.slot{width:clamp(28px,calc((100dvh - 210px)/4),44px);max-width:44px;flex:none;aspect-ratio:1}.slot .sprite{padding:3px}.slot kbd{font-size:9px;top:2px;left:3px}
 .game-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;max-width:none;width:100%}.game-actions button{min-height:32px;padding:4px 2px;font-size:11px;line-height:1.2;font-family:Redone,"Microsoft YaHei",sans-serif}.game-actions #undo,.game-actions #wait,.game-actions #walkthrough-button,.game-actions #fast-toggle{grid-column:auto}.game-actions #levels-bottom{display:none}
 .under-board{min-height:0;max-height:24px;width:100%;gap:0;padding:0;background:none;overflow:hidden}.under-board p{font-size:10px;line-height:12px;min-width:0;flex-basis:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.under-board #cancel-tool{display:none}.touch-directions{display:none}
 #compact-navigation nav{max-width:none}#compact-navigation nav button{padding:6px;font-size:12px}#compact-navigation nav button span{display:none}#compact-save .desktop-tip{display:none!important}
 .result-panel{inset:15% 15%;padding:12px}.result-panel h2{font-size:20px}.result-panel p{font-size:11px}.result-panel button{font-size:11px;padding:5px 8px}dialog{max-height:92dvh;padding:14px}.dialog-heading{margin-bottom:12px}.level-list{grid-template-columns:repeat(3,minmax(0,1fr))}
 @supports(width:1cqw){.board-wrap{width:min(100cqw,calc(100cqh*var(--board-ratio,1.6)))}}
}
/* A selected tool is a reversible ghost, including its prospective light path. */
.tool-preview{position:absolute;z-index:7;pointer-events:none;opacity:.7}
.tool-preview .sprite{position:absolute;width:100%;height:130%;left:0;bottom:0;object-fit:contain;pointer-events:none}
.tool-preview .laser-right,.tool-preview .laser-left{width:120%;height:156%;left:-10%}
.tool-preview .laser-right{bottom:-3.1818%}.tool-preview .laser-left{bottom:-1.6429%}
.tool-preview .native-fan-frame{width:100%;height:109.375%;left:0;bottom:0;object-fit:fill}
.tool-preview>img[src*="Fans"]{width:var(--frame-width,100%);height:var(--frame-height,109.375%);left:var(--frame-left,0%);bottom:var(--frame-bottom,0%);object-fit:fill}
.tool-preview[data-valid=false]{opacity:.4;box-shadow:inset 0 0 0 2px #f29483;background:#ce533630}
.tool-preview[data-valid=false]:after{content:'×';position:absolute;right:2px;bottom:0;color:#ffb2a0;font:bold 18px/1 sans-serif;text-shadow:0 1px 2px #000}
.preview-beams{position:absolute;inset:0;width:100%;height:100%;z-index:6;pointer-events:none;overflow:hidden}
.preview-beams path{fill:none;stroke:#ffe18c;stroke-width:.06;stroke-dasharray:.15 .12;opacity:.65}
.player .character-face{position:absolute;width:100%;height:129.7%;left:0;bottom:0;z-index:1;pointer-events:none;animation:none}
.compact-menu-button{display:block;background:#34261e;border-radius:3px}
body{display:flow-root}
#levels-bottom{display:none}#restart{font-weight:700!important;border-color:#e0bb71!important}
#compact-account .game-switcher{display:flex}#compact-save .game-footer{display:flex}
#compact-save .desktop-tip{display:none!important}
/* Account updates occupy fixed rows; long sync messages cannot resize the menu. */
#compact-account{min-width:0}
#compact-account .game-switcher{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);gap:8px;min-width:0}
#compact-account .game-switcher a,#compact-account .game-switcher button{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#compact-account #account-status{grid-column:1/-1;display:block;min-width:0;height:36px;line-height:18px;overflow:hidden;overflow-wrap:anywhere}
#compact-save .game-footer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-width:0}
#compact-save .game-footer>span:first-child{min-width:0;height:36px;line-height:18px;align-items:flex-start}
#compact-save .status-dot{flex:none;margin-top:6px}
#compact-save #save-status{min-width:0;max-height:36px;overflow:hidden;overflow-wrap:anywhere}
/* Desktop: the map fills the available viewport, with the bag underneath. */
@media(min-width:1000px){
 .game-shell{width:calc(100% - 24px);max-width:1920px;height:calc(100dvh - 24px);min-height:360px;margin:12px auto;display:grid;grid-template-columns:minmax(0,1fr) 208px;grid-template-rows:auto auto minmax(0,1fr) auto;grid-template-areas:"frame brand" "frame heading" "frame notice" "frame menu";gap:12px}
 .game-frame{grid-area:frame;min-width:0;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) 88px;overflow:hidden}
 .brick-surround{padding:16px 8px 6px;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;container-type:size}
 .board-wrap{width:min(100%,calc((100dvh - 138px)*var(--board-ratio,1.6)));aspect-ratio:var(--board-ratio,1.6);flex:none;max-height:none}
 .masthead{grid-area:brand;margin:0;padding:12px;background:#211716e0}.brand{gap:8px}.brand-creature{width:45px;height:54px}.logo{font-size:36px}.brand-caption{font-size:13px;letter-spacing:1.5px;margin-top:5px}
 .level-heading{grid-area:heading;display:block;padding:14px;margin:0;min-width:0}.level-heading h1{display:block;line-height:1.3;font-size:23px}.level-number{display:block;border:0;font-size:36px;padding:0;margin:14px 0 8px}#level-title{overflow-wrap:anywhere}.level-heading .eyebrow{font-size:11px;letter-spacing:1px}
 .level-stats{margin-top:22px;gap:8px;flex-wrap:wrap}.level-stats>span{flex-basis:100%;gap:6px;margin-bottom:8px}.level-stats small{font-size:11px}.level-stats strong{font-size:24px}.level-stats button{margin:0;padding:8px 18px;font-size:18px;flex:1}
 .under-board{grid-area:notice;min-height:0;display:flex;flex-direction:column;align-items:stretch;justify-content:start;padding:14px;gap:12px}.under-board p{flex:0;line-height:1.8;font-size:13px}.under-board button{min-height:36px}
 .compact-menu-button{grid-area:menu;min-height:46px;font-size:15px}
 .inventory-bar{min-height:0;height:88px;display:flex;flex-direction:row;gap:14px;padding:12px 14px 8px;align-items:center}.inventory-group{flex:1;min-width:0}.inventory{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;max-width:760px}.slot{width:100%;height:auto;max-width:64px;aspect-ratio:1}.slot kbd{font-size:10px}
 .game-actions{display:grid;grid-template-columns:repeat(4,auto);gap:5px;width:auto;max-width:none;flex:none}.game-actions button{min-height:40px;min-width:52px;padding:8px;font-size:13px}.game-actions #restart,.game-actions #undo,.game-actions #wait,.game-actions #fast-toggle{grid-column:auto}.game-actions #restart{min-width:66px}.touch-directions{display:none}
 @supports(width:1cqw){.board-wrap{width:min(100cqw,calc(100cqh*var(--board-ratio,1.6)))}}
}
@media(max-width:999px) and (min-height:561px), (max-width:999px) and (orientation:portrait){
 .game-shell{width:calc(100% - 20px);margin:10px auto;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand menu" "heading heading" "frame frame" "notice notice" "directions directions";gap:8px}
 .masthead{grid-area:brand;margin:0}.brand-creature{width:40px;height:48px}.logo{font-size:34px}.brand-caption{font-size:11px;margin-top:4px}.compact-menu-button{grid-area:menu;min-width:68px;padding:8px}
 .level-heading{grid-area:heading;padding:8px}.level-heading h1{font-size:17px}.level-stats{gap:10px}.level-stats button{margin:0}.game-frame{grid-area:frame}.brick-surround{padding:12px 8px 6px}
 .inventory-bar{min-height:0;padding:10px 8px 8px;gap:8px;flex-direction:column}.inventory{max-width:none;gap:4px}.slot{width:100%;max-width:56px}.inventory-group{width:100%}
 .game-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));max-width:none;width:100%;gap:5px}.game-actions button{min-height:36px;padding:6px;font-size:12px}.game-actions #restart,.game-actions #undo,.game-actions #wait,.game-actions #fast-toggle{grid-column:auto}
 .under-board{grid-area:notice;padding:9px;min-height:0}.touch-directions{grid-area:directions;margin:0 auto}
}
@media(orientation:landscape) and (max-height:560px) and (max-width:999px){.game-actions #restart{grid-column:span 2;min-height:34px}.game-actions #wait,.game-actions #undo,.game-actions #fast-toggle{grid-column:auto}.game-actions #fast-toggle{grid-column:span 2}}

.level-card .number{flex-shrink:0}.level-card .level-name{min-width:0;overflow-wrap:anywhere}.level-card.completed{background:#e9dba8;border-color:#879751}.level-card.completed.current{border-color:#6b391f}.level-completed{display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;width:22px;height:22px;border-radius:50%;background:#53732b;color:#fff9d0;font:700 16px/1 "Segoe UI",sans-serif;border:1px solid #446327}

.player>img.sprite.native-character-crop{width:var(--frame-width,100%);height:var(--frame-height,129.6875%);left:var(--frame-left,0%);bottom:var(--frame-bottom,0%);object-fit:fill}.player .native-character-frame{object-fit:fill}
