:root{color-scheme:dark;--bg:#0b151f;--panel:#14232f;--line:#2c404c;--muted:#91a5b3;--text:#edf4f3;--yellow:#ffc86a;--mint:#86e5c5;--orange:#ec9a49}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 20% 0,#243c48 0,transparent 55%),var(--bg);font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--mint);outline-offset:4px}button:disabled{cursor:default}button{border:0}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.shell{max-width:1328px;margin:auto;padding:24px 48px 20px}.topbar{height:74px;display:flex;align-items:center;justify-content:space-between;gap:24px}.back{font-size:13px;color:#c5d3da;display:flex;gap:9px;align-items:center;transition:color .2s}.back:hover{color:var(--mint)}.brand{font-size:28px;font-weight:950;letter-spacing:4px;line-height:1;text-shadow:0 2px #000}.brand>span{color:var(--yellow)}.brand small{display:block;font-size:8px;letter-spacing:2.9px;color:var(--muted);margin-top:9px;text-align:center}.utilities{display:flex;gap:9px}.icon-button,.square-button{border:1px solid var(--line);background:#162733;border-radius:9px;min-width:40px;height:38px;padding:0 11px;display:flex;gap:7px;align-items:center;justify-content:center}.icon-button span{font-size:9px;letter-spacing:1px;color:var(--muted)}.icon-button:hover,.square-button:hover{background:#263d49}.game-card{border:1px solid #37505c;border-radius:17px;overflow:hidden;background:var(--panel);box-shadow:0 24px 70px #0005;margin-top:18px}.levelbar{display:flex;align-items:center;justify-content:space-between;padding:18px 26px;background:linear-gradient(90deg,#1e313d,#15252f)}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:750;color:var(--yellow)}h1{font-size:22px;line-height:1.2;margin:5px 0 0;font-weight:750;letter-spacing:-.5px}.stats{display:flex;align-items:center;gap:32px}.stats>div{display:flex;flex-direction:column;align-items:flex-end}.stats span{font-size:9px;letter-spacing:1.5px;color:var(--muted)}.stats strong{font-size:23px;font-variant-numeric:tabular-nums;font-weight:600;line-height:1.4}.stats .square-button{margin-left:4px}.stage{position:relative;aspect-ratio:1152/640;isolation:isolate;overflow:hidden;background:#0e1e2b}canvas{width:100%;height:100%;display:block;touch-action:none;outline:none!important}.toast{position:absolute;left:50%;bottom:22px;transform:translate(-50%,10px);background:#0b1a24ef;border:1px solid #a9d4cf66;color:#edf9ef;box-shadow:0 8px 25px #0005;border-radius:10px;padding:12px 19px;font-size:13px;max-width:78%;text-align:center;pointer-events:none;opacity:0;transition:opacity .18s,transform .18s;z-index:2}.toast.visible{opacity:1;transform:translate(-50%,0)}.context{position:absolute;padding:7px 12px;border-radius:7px;background:#15232be8;border:1px solid #ffc86a77;color:var(--yellow);font-size:12px;left:50%;top:14px;transform:translateX(-50%);pointer-events:none;white-space:nowrap}.context:empty{display:none}.overlay{position:absolute;inset:0;z-index:4}.menu{background:#112430;overflow:auto;display:flex;flex-direction:column;justify-content:space-between}.menu-art{position:absolute;top:0;bottom:0;right:0;width:55%;background:linear-gradient(90deg,#112430 0%,#11243033 24%,#11243022 100%),url('assets/title.png') center 48%/cover;opacity:.82;filter:saturate(.76)}.menu:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#10212ef2,transparent 60%);pointer-events:none}.menu-content{position:relative;z-index:1;padding:43px 44px 20px;max-width:640px}.menu-content h2{font-size:clamp(26px,3.7vw,49px);line-height:1.08;letter-spacing:-1.8px;margin:16px 0 17px;font-weight:850}.menu-content em{font-style:normal;color:var(--yellow)}.menu-content p{max-width:400px;color:#c5d4da;font-size:14px;line-height:1.7;margin:0 0 22px}.menu-actions{display:flex;align-items:center;gap:10px}.primary{display:flex;align-items:center;justify-content:space-between;gap:30px;background:var(--yellow);color:#2b261d;border:1px solid #ffdf9a;border-radius:9px;padding:13px 20px;font-weight:750;font-size:14px;box-shadow:0 6px 22px #eeb64719;transition:background .15s,transform .15s}.primary:hover{background:#ffdaa0;transform:translateY(-1px)}.primary>span{font-size:22px;line-height:1}.secondary{padding:11px 15px;background:#ffffff09;border:1px solid #ffffff24;border-radius:8px;font-size:12px;font-weight:600}.secondary:hover{background:#ffffff14}.mini-legend{display:flex;gap:17px;align-items:center;font-size:10px;color:#b6c4cc;margin-top:21px}.key,kbd{font:inherit;font-size:10px;font-style:normal;background:#233743;border:1px solid #53717e;border-bottom-width:2px;border-radius:4px;padding:2px 6px;margin-right:5px;color:#dfeaed}.level-selection{position:relative;z-index:1;padding:6px 32px 27px}.selection-heading{display:flex;justify-content:space-between;align-items:center;margin:0 3px 11px}.selection-heading>span{font-size:9px;font-weight:750;letter-spacing:1.5px;color:#b5c8cf}.selection-heading small{font-size:10px;color:#91aab4}.level-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.level-tile{background:#1c3340d9;border:1px solid #40596580;border-radius:8px;padding:10px 10px 8px;text-align:left;position:relative;min-height:73px;transition:background .2s,border-color .2s}.level-tile:hover{background:#2b4a57;border-color:var(--yellow)}.level-tile.locked{opacity:.48}.level-tile b{font-size:17px;color:var(--yellow);display:block;line-height:1.2}.level-tile span{font-size:9px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}.level-tile small{font-size:9px;color:var(--mint);display:block;margin-top:3px}.level-tile .lock{position:absolute;right:9px;top:7px;color:#91a5b3;font-size:11px}.workbench{padding:16px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:#172a36}.bench-label{font-size:8px;color:var(--muted);letter-spacing:1.5px;font-weight:750;display:block;margin-bottom:8px}.bits{display:flex;gap:7px}.bit{display:flex;align-items:center;gap:5px;position:relative;background:#203744;border:1px solid #3a5260;border-radius:7px;padding:5px 9px 5px 6px;height:38px;font-size:10px;color:#c7d6dc;transition:all .15s}.bit img{width:26px;height:26px;object-fit:contain}.bit kbd{font-size:8px;padding:0 3px;margin-right:0;color:#a3b7c2;background:#172834;border-color:#46616f}.bit.active{border-color:var(--yellow);background:#4f412e;color:#ffe0a8;box-shadow:0 0 0 1px #ffc86a22}.bit.unavailable{opacity:.3}.inventory{display:flex;gap:23px;align-items:center;padding-top:15px}.inventory>div{display:flex;gap:5px;align-items:center}.inventory img{width:32px;height:32px;object-fit:contain}.inventory strong{font-size:19px}.inventory span{font-size:11px;color:#90a9b6}.inventory .hammer-stat>span:first-child{color:var(--yellow);font-size:29px;margin-right:4px;line-height:1}.action-button{display:flex;align-items:center;gap:9px;border:1px solid #5d7d87;border-radius:8px;background:#29434e;padding:13px 17px;color:#e9f4f0;font-size:12px;font-weight:700;white-space:nowrap;margin-top:16px;transition:background .2s}.action-button:hover{background:#3a5861}.action-button kbd{background:#112731;color:var(--yellow);font-size:11px}.missionbar{border-top:1px solid #ffffff0c;padding:12px 23px;display:flex;align-items:center;gap:9px;font-size:11px;color:#c6d9df}.mission-dot{width:6px;height:6px;border-radius:50%;background:var(--mint);box-shadow:0 0 10px #86e5c566}.missionbar>span:nth-child(2){flex:1}.missionbar button{background:none;color:#9eb5c0;font-size:11px;padding:0 7px}.missionbar button:hover{color:var(--yellow)}.missionbar button span{margin-left:4px}.modal{display:flex;align-items:center;justify-content:center;background:#08141dc7;backdrop-filter:blur(6px);padding:20px}.dialog{width:470px;max-width:100%;border:1px solid #47606a;border-radius:16px;background:linear-gradient(150deg,#243c48,#142632);padding:34px;text-align:center;box-shadow:0 20px 60px #0007}.dialog h2{font-size:30px;line-height:1.15;letter-spacing:-.9px;margin:15px 0 10px}.dialog p{font-size:13px;color:#b1c6cd;margin:0 0 25px}.dialog>.primary{width:100%}.dialog-actions{display:flex;justify-content:center;gap:9px;margin-top:13px}.dialog-actions .secondary{flex:1}.result-stats{display:flex;justify-content:center;gap:32px;margin:22px 0 25px}.result-stats>div{display:flex;flex-direction:column}.result-stats span{font-size:8px;color:#a6bdc8;letter-spacing:1px}.result-stats strong{font-size:25px;font-weight:650;line-height:1.5;font-variant-numeric:tabular-nums}.win-hammers{font-size:35px;color:var(--yellow);letter-spacing:12px;line-height:1.2;margin:18px 0 8px}.win-hammers .empty{color:#526773}.touch-controls{display:none}.help-modal{position:fixed;inset:0;background:#06121bd9;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;z-index:20;padding:24px;overflow:auto}.help-dialog{max-width:610px;width:100%;background:#1c3441;border:1px solid #4c6672;border-radius:17px;padding:35px;position:relative;box-shadow:0 25px 80px #0008}.close{position:absolute;right:17px;top:12px;background:none;font-size:26px;color:#c6dae0}.help-dialog h2{margin:8px 0 17px;font-size:28px;letter-spacing:-.8px}.help-dialog>p{color:var(--yellow);font-size:14px}.help-rules{font-size:13px;color:#b9ced7;line-height:1.65}.help-rules p{margin:15px 0}.help-rules b{color:#eef5f2}.help-dialog>.primary{width:100%;margin-top:25px}.help-dialog>small{display:block;text-align:center;font-size:10px;color:#8fa9b6;margin-top:16px}footer{display:flex;justify-content:space-between;gap:35px;align-items:center;padding:20px 4px;font-size:10px;color:#7e99a7}footer p{max-width:700px;margin:0;line-height:1.7}footer b{color:#bfd0d8;font-weight:650}footer button{font-size:11px;white-space:nowrap;background:none;color:#bfd0d8}.stage:fullscreen{aspect-ratio:auto;height:100vh;display:flex;justify-content:center;background:#0e1e2b}.stage:fullscreen canvas{height:100%;width:auto;max-width:100%;object-fit:contain}.stage:fullscreen .menu-content{max-width:640px}.stage:fullscreen .level-selection{width:100%}
.shell:fullscreen{height:100vh;max-width:none;padding:8px 20px;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.shell:fullscreen .topbar{height:48px;flex-shrink:0}.shell:fullscreen .game-card{flex:1;min-height:0;display:flex;flex-direction:column;margin-top:4px}.shell:fullscreen .stage{flex:1;min-height:0;aspect-ratio:auto}.shell:fullscreen .stage canvas{object-fit:contain}.shell:fullscreen .levelbar,.shell:fullscreen .workbench,.shell:fullscreen .missionbar{flex-shrink:0}.shell:fullscreen footer{display:none}.shell:fullscreen .touch-controls{flex-shrink:0}.shell:fullscreen .menu-content{padding-top:30px}
@media(min-width:1700px){.shell{padding-top:30px;max-width:1460px}.menu-content{padding-top:60px}.menu-content h2{font-size:58px}}
@media(max-width:1100px){.shell{padding:12px 25px}.topbar{height:64px}.game-card{margin-top:12px}.menu-content{padding:25px 28px 10px}.menu-content h2{font-size:38px;margin:10px 0 12px}.menu-content p{font-size:12px;max-width:350px;margin-bottom:15px}.menu-content .eyebrow{font-size:8px}.mini-legend{margin-top:13px;gap:12px}.level-selection{padding:4px 22px 20px}.level-tile{min-height:65px;padding:9px 7px 7px}.level-tile span{font-size:8px}.workbench{padding:12px 17px;gap:10px}.bit span{display:none}.inventory{gap:15px}.stats{gap:22px}.action-button{padding:10px 12px}.levelbar{padding:14px 21px}.menu-art{width:51%}}
@media(max-width:760px){.shell{padding:5px 12px}.topbar{height:60px;gap:12px}.back{font-size:17px}.back span{display:none}.brand{font-size:23px;letter-spacing:3px}.brand small{font-size:6px;letter-spacing:2.4px}.utilities{gap:6px}.icon-button{height:33px;min-width:33px;padding:0 8px}.icon-button span{display:none}.game-card{border-radius:12px;margin-top:5px}.levelbar{padding:12px 15px}h1{font-size:16px;margin-top:3px}.eyebrow{font-size:8px;letter-spacing:1.3px}.stats{gap:12px}.stats strong{font-size:18px}.stats span{font-size:7px}.stats .square-button{height:32px;min-width:32px;padding:0 8px;margin-left:0}.stage{aspect-ratio:1152/730}.stage canvas{object-fit:contain}.menu-art{width:55%;opacity:.4}.menu-content{padding:20px 22px 10px;max-width:500px}.menu-content h2{font-size:clamp(25px,5vw,36px);letter-spacing:-1px;margin:10px 0}.menu-content h2 br:nth-child(2){display:none}.menu-content p{font-size:11px;line-height:1.6;max-width:75%;margin-bottom:13px}.primary{padding:10px 14px;font-size:12px;gap:20px}.mini-legend{display:none}.level-selection{padding:5px 16px 16px}.selection-heading small{display:none}.selection-heading{margin-bottom:7px}.selection-heading>span{font-size:8px;letter-spacing:1px}.level-grid{gap:5px}.level-tile{min-height:48px;padding:7px 7px 5px}.level-tile b{font-size:15px}.level-tile span{display:none}.level-tile small{font-size:8px}.level-tile .lock{right:5px;font-size:9px;top:6px}.workbench{padding:10px 12px;gap:8px}.bench-label{font-size:7px;margin-bottom:6px}.bits{gap:4px}.bit{height:32px;padding:3px 5px 3px 3px;gap:2px}.bit img{width:21px;height:21px}.bit kbd{font-size:7px;padding:0 2px}.inventory{gap:9px;padding-top:12px}.inventory img{width:24px;height:24px}.inventory>div{gap:2px}.inventory strong{font-size:15px}.inventory span{font-size:9px}.inventory .hammer-stat>span:first-child{font-size:22px;margin:0}.action-button{display:none}.missionbar{padding:10px 12px;font-size:9px;gap:7px;min-height:36px}.missionbar button{font-size:9px;padding:0 2px}.missionbar #restartButton span{display:none}.touch-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 6px 8px;touch-action:none;user-select:none}.dpad{display:grid;grid-template-columns:43px 43px 43px;grid-template-rows:38px 38px;gap:4px}.dpad button{border:1px solid #466372;background:#223a47;border-radius:9px;font-size:23px;color:#cce0e4;touch-action:none;user-select:none}.dpad button:active,.dpad button.pressed{background:#486677;color:var(--yellow)}.dpad button[data-direction=up]{grid-column:2}.dpad button[data-direction=left]{grid-row:2;grid-column:1}.dpad button[data-direction=down]{grid-row:2;grid-column:2}.dpad button[data-direction=right]{grid-row:2;grid-column:3}.touch-controls p{font-size:10px;color:#c3d2d9;line-height:1.6;margin:0}.touch-controls p span{font-size:8px;color:#8da4b0}.touch-controls>button{background:var(--yellow);color:#332c20;min-width:67px;height:67px;border-radius:50%;font-size:22px;font-weight:800;line-height:1.1;box-shadow:0 4px 0 #9c7440;touch-action:none}.touch-controls>button small{display:block;font-size:7px;letter-spacing:1px;font-weight:800;margin-top:3px}footer{padding:15px 3px;font-size:9px;gap:20px}footer p{max-width:430px}.dialog{padding:20px;width:390px;border-radius:12px}.dialog h2{font-size:25px;margin:10px 0}.dialog p{font-size:11px;margin-bottom:16px}.dialog .eyebrow{font-size:8px}.dialog-actions{margin-top:9px}.secondary{font-size:10px;padding:9px 11px}.win-hammers{font-size:25px;margin:8px 0;letter-spacing:9px}.result-stats{gap:25px;margin:14px 0}.result-stats strong{font-size:21px}.result-stats span{font-size:6px}.context{top:8px;font-size:9px;padding:5px 8px}.toast{bottom:10px;padding:8px 11px;font-size:10px;max-width:88%;width:max-content}.help-modal{padding:16px}.help-dialog{padding:26px;max-height:90vh;overflow:auto}.help-dialog h2{font-size:23px}.help-rules{font-size:11px}.help-dialog>p{font-size:12px}}
@media(max-width:480px){.stage{aspect-ratio:1152/870}.menu-content{padding:17px 19px 8px}.menu-content h2{font-size:28px}.menu-content p{max-width:90%;font-size:10px;margin-bottom:11px}.menu-art{opacity:.3}.menu-content .eyebrow{font-size:6px;letter-spacing:1.1px}.level-selection{padding:4px 13px 12px}.selection-heading{margin-bottom:5px}.selection-heading>span{font-size:6px}.level-tile{min-height:44px;padding:7px 5px}.level-tile b{font-size:13px}.level-tile .lock{font-size:7px;right:4px;top:5px}.inventory{gap:6px}.inventory img{width:20px;height:20px}.inventory .hammer-stat>span:first-child{font-size:21px}.inventory span{font-size:8px}.inventory strong{font-size:14px}.workbench{padding:9px 10px;gap:6px}.bit{padding:3px;height:29px}.bit img{width:20px;height:20px}.bit kbd{position:absolute;top:-4px;left:0;font-size:6px;line-height:1}.bits{gap:6px}.touch-controls p{font-size:8px}.touch-controls p span{font-size:7px}.dpad{grid-template-columns:36px 36px 36px;grid-template-rows:34px 34px}.touch-controls>button{min-width:60px;height:60px}.dialog{padding:17px}.dialog h2{font-size:22px}.result-stats{margin:9px 0 14px}.win-hammers{font-size:22px;margin:5px 0}.dialog-actions .secondary{font-size:9px}.missionbar{font-size:8px}.missionbar button{font-size:8px}}
@media(pointer:coarse) and (min-width:761px){.touch-controls{display:flex;align-items:center;justify-content:space-around;padding:16px}.dpad{display:flex;gap:7px}.dpad button{padding:8px 20px;border-radius:8px;background:#29424f;border:1px solid #45616d;font-size:24px;touch-action:none}.touch-controls p{font-size:12px;color:#91a5b3}.touch-controls>button{padding:13px 30px;background:var(--yellow);color:#251e17;border-radius:9px;font-size:18px}.touch-controls small{font-size:10px;margin-left:8px}}
@media(max-width:760px){.stage:has(#menu:not([hidden])){min-height:350px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Modern workshop art. One transparent 4×3 atlas is shared by the UI and canvas. */
:root{--bg:#0a1420;--panel:#142734;--line:#344d5e;--yellow:#ffd082;--mint:#99efcf}
body{background:radial-gradient(ellipse at 12% -10%,#30505c 0,transparent 58%),radial-gradient(ellipse at 100% 80%,#1c2b3c 0,transparent 55%),var(--bg)}
.item-art{--item-x:0%;--item-y:0%;position:relative;display:inline-block;flex-shrink:0;width:40px;height:40px;vertical-align:middle;isolation:isolate}
.item-art:before{content:"";position:absolute;inset:0;background-image:url('assets/items-modern-v2.png');background-size:400% 300%;background-repeat:no-repeat;background-position:var(--item-x) var(--item-y);opacity:0;filter:drop-shadow(0 3px 3px #04132055);transition:opacity .2s}
.item-art>img{display:block;width:100%;height:100%;object-fit:contain;transition:opacity .2s}
.modern-items .item-art:before{opacity:1}.modern-items .item-art>img,.modern-items .fallback-hammer{opacity:0}
.art-bit-slot{--item-x:0%;--item-y:0%}.art-bit-cross{--item-x:33.333333%;--item-y:0%}.art-bit-torx{--item-x:66.666667%;--item-y:0%}.art-bit-hex{--item-x:100%;--item-y:0%}
.art-bolt{--item-x:0%;--item-y:50%}.art-bolt[data-bit="1"]{--item-x:33.333333%}.art-bolt[data-bit="2"]{--item-x:66.666667%}.art-bolt[data-bit="3"]{--item-x:100%}
.art-water{--item-x:0%;--item-y:100%}.art-hammer{--item-x:33.333333%;--item-y:100%}.art-helmet{--item-x:66.666667%;--item-y:100%}.art-toolbox{--item-x:100%;--item-y:100%}
.fallback-hammer{position:absolute;width:9%;height:52%;background:#cc943b;left:46%;top:33%;border-radius:2px;transform:rotate(35deg)}.fallback-hammer:after{content:"";position:absolute;width:350%;height:35%;background:linear-gradient(#ffe8ac,#ddaa4d);border-radius:3px;left:-125%;top:-5%}
.brand{display:flex;align-items:center;gap:9px}.brand>div>span{color:var(--yellow)}.brand-emblem{width:42px;height:42px;filter:drop-shadow(0 3px 9px #ffc96a33)}
.game-card{border:1px solid #56717d88;border-radius:22px;box-shadow:0 30px 90px #0005,inset 0 1px #ffffff09}.levelbar{background:linear-gradient(110deg,#243d48,#182c38);padding-top:20px;padding-bottom:20px}.levelbar h1{letter-spacing:-.65px}.icon-button,.square-button{border-radius:12px;background:linear-gradient(145deg,#29434f,#192d3a);border-color:#49636e80;box-shadow:inset 0 1px #ffffff0a,0 3px 8px #06121c22}
.modern-hero .menu-art{width:100%;opacity:1;filter:saturate(.85);background-image:linear-gradient(90deg,#102431fb 0%,#102431f2 24%,#102431a6 45%,#1024310a 78%),linear-gradient(0deg,#10212e 0%,#10212e00 68%),url('assets/workshop-modern-v2.png');background-position:center;background-size:cover;background-repeat:no-repeat}
.menu-content h2{text-shadow:0 4px 24px #06111c66}.menu-content em{color:#ffd48c}.menu-content p{color:#c9d9dc}.menu-content .eyebrow{color:#a9e5d6}.primary{border-radius:13px;background:linear-gradient(145deg,#ffdea3,#f5c473);border-color:#ffe9bd;box-shadow:inset 0 1px #fff5,0 7px 25px #d9a24c20}.primary:hover{background:linear-gradient(145deg,#ffe7b9,#ffce81);box-shadow:0 9px 28px #d9a24c30}.secondary{border-radius:11px;background:#ffffff08}.level-selection{padding-bottom:25px}.level-grid{gap:10px}.level-tile{border-radius:13px;background:linear-gradient(145deg,#28424edc,#1b303df2);border-color:#54748277;box-shadow:inset 0 1px #ffffff0b,0 4px 10px #07141c22;min-height:79px;padding:11px 12px 10px}.level-tile b{color:#ffdb9b}.level-tile.locked{opacity:.45}.level-tile:hover{border-color:#c9ad7f;background:#2d4b58;transform:translateY(-2px)}.level-tile .level-awards{display:flex;gap:1px;margin-top:2px;overflow:visible;line-height:0;height:14px}.level-awards .item-art{width:15px;height:15px;display:inline-block;margin:0}.level-awards .empty{filter:grayscale(1);opacity:.19}
.workbench{background:linear-gradient(115deg,#203744,#172c39);padding:17px 23px 18px;gap:20px;border-top:1px solid #66828b33;box-shadow:inset 0 1px #bfd8d808}.bench-label{display:flex;align-items:center;gap:6px;font-size:8px;letter-spacing:1.6px;color:#a2bec8;margin-bottom:6px;height:18px}.bench-label .item-art{width:23px;height:23px;margin-left:-3px}.bits{gap:8px}.bit{--tool-color:#8ce7d0;display:flex;position:relative;align-items:center;gap:5px;height:58px;padding:4px 11px 4px 6px;border-radius:13px;border:1px solid #5e7a856e;background:linear-gradient(140deg,#314e5b,#203846);box-shadow:inset 0 1px #fff1,0 3px 6px #06131b33;font-size:10px;overflow:visible;transition:background .2s,border-color .2s,transform .2s,box-shadow .2s}
.bit[data-bit="1"]{--tool-color:#91cfff}.bit[data-bit="2"]{--tool-color:#ffc576}.bit[data-bit="3"]{--tool-color:#c9a3ff}.bit .item-art{display:block;width:43px;height:43px;z-index:1;margin-left:3px}.bit .item-art>img{width:100%;height:100%}.bit kbd{position:absolute;top:6px;left:6px;z-index:2;font-size:7px;line-height:1;padding:2px 3px;background:#102833b3;color:#c6dfe4;border-color:#7896a344;box-shadow:0 1px 2px #0b1a2866}.bit .bit-name{display:block;font-size:10px;color:#c4d9df;margin-left:1px;padding-right:2px}.bit.active{border-color:var(--tool-color);background:linear-gradient(140deg,#416069,#253f4b);box-shadow:inset 0 0 0 1px #ffffff0d,0 0 17px color-mix(in srgb,var(--tool-color) 10%,transparent)}.bit.active .bit-name{color:var(--tool-color)}.bit:hover{transform:translateY(-2px);border-color:var(--tool-color)}.bit.unavailable{opacity:.29;filter:saturate(.4)}
.bit-shape{position:absolute;width:12px;height:12px;right:7px;bottom:5px;z-index:2;background:#132a36;box-shadow:0 1px 3px #081622aa;border:1px solid color-mix(in srgb,var(--tool-color) 45%,transparent);border-radius:4px;color:var(--tool-color)}.bit-shape:before,.bit-shape:after{content:"";position:absolute}.shape-slot:before,.shape-cross:before{width:6px;height:1.5px;left:2px;top:4.2px;background:currentColor;border-radius:1px}.shape-cross:after{width:1.5px;height:6px;top:2px;left:4.2px;background:currentColor;border-radius:1px}.shape-torx:before{inset:2px;background:currentColor;clip-path:polygon(50% 0,65% 25%,92% 16%,83% 43%,100% 50%,78% 67%,90% 90%,63% 82%,50% 100%,36% 77%,10% 90%,17% 62%,0 50%,22% 36%,10% 10%,37% 19%)}.shape-hex:before{inset:2px;background:currentColor;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}.shape-hex:after{inset:3px;background:#132a36;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}
.inventory{gap:10px;padding-top:23px;align-items:stretch}.inventory .inventory-card{display:flex;gap:5px;align-items:center;min-height:54px;padding:3px 10px 3px 3px;border:1px solid #54728244;border-radius:13px;background:linear-gradient(135deg,#10293655,#12263399);box-shadow:inset 0 1px #ffffff06;transition:opacity .2s}.inventory .item-art{width:43px;height:43px;margin-right:0;line-height:normal}.inventory .item-art img{width:100%;height:100%}.inventory .inventory-count{display:flex;flex-direction:column;gap:0;line-height:1.15;font-size:10px;color:#9cb9c4;white-space:nowrap}.inventory-count small{font-size:6px;font-weight:750;letter-spacing:1px;color:#90acb7;margin-bottom:4px}.inventory .inventory-count>span{font-size:9px;color:#9bb4bf}.inventory .inventory-count strong{font-size:19px;font-weight:700;color:#ecf7f4}.inventory .hammer-stat>.item-art:first-child{width:43px;height:43px;font-size:0;margin:0;color:inherit;line-height:normal}.action-button{height:54px;margin-top:23px;padding:12px 16px;border-radius:13px;border-color:#6e929877;background:linear-gradient(145deg,#3d5f69,#294450);box-shadow:inset 0 1px #ffffff13,0 4px 10px #06131a33}.action-button kbd{border-radius:5px;background:#102a36;border-color:#799c9c44;color:#ffe0a7;padding:4px 6px}.missionbar{background:#132936;border-top-color:#66828b22;padding-top:13px;padding-bottom:13px}.toast{border-radius:13px;background:linear-gradient(120deg,#16303aef,#10232eeb);border-color:#a8d6c94d;box-shadow:0 8px 27px #03111b66}.context{border-radius:9px;border-color:#e8be7955;background:#18313de8;backdrop-filter:blur(8px)}
.dialog{border-radius:21px;background:radial-gradient(ellipse at 50% 0%,#36535e,#192f3d 75%);border-color:#7896a15e;box-shadow:inset 0 1px #fff1,0 24px 70px #0008}.win-hammers{display:flex;justify-content:center;gap:7px;letter-spacing:0;line-height:1;margin:17px 0 10px;min-height:62px}.win-hammers .item-art{width:65px;height:65px}.win-hammers .empty{filter:grayscale(1);opacity:.23}.win-hammers .item-art:before{filter:drop-shadow(0 5px 9px #ffc65b24)}.help-dialog{border-radius:21px;background:linear-gradient(145deg,#2b4652,#192f3d);border-color:#6e929d77}.touch-controls>button{background:linear-gradient(145deg,#ffdfa8,#f1bd69);box-shadow:inset 0 1px #ffffff5a,0 4px 0 #9c7440,0 7px 20px #0003}.dpad button{box-shadow:inset 0 1px #ffffff0d,0 3px 6px #0002}
@media(max-width:1100px){.bit .bit-name{display:none}.bit{padding:4px 9px 4px 5px;width:65px}.bit .item-art{width:43px;height:43px}.inventory .inventory-card{padding-right:9px}.inventory{gap:8px}.inventory .item-art,.inventory .hammer-stat>.item-art:first-child{width:40px;height:40px}.workbench{gap:15px}.action-button{padding:10px 13px}.level-tile{padding:10px 8px}.level-tile .level-awards{height:12px}.level-awards .item-art{width:13px;height:13px}}
@media(max-width:760px){.game-card{border-radius:16px}.brand{gap:4px}.brand-emblem{width:30px;height:30px}.brand small{letter-spacing:2.2px}.levelbar{padding-top:13px;padding-bottom:13px}.menu-art{opacity:.5}.modern-hero .menu-art{background-image:linear-gradient(90deg,#102431f0 0%,#102431d9 25%,#10243177 60%,#10243144 100%),linear-gradient(0deg,#10212e 0%,#10212e00 100%),url('assets/workshop-modern-v2.png')}.menu-content p{max-width:83%}.level-grid{gap:6px}.level-tile{min-height:53px;padding:7px 7px 6px;border-radius:10px}.level-tile .level-awards{display:flex;height:9px;gap:0;margin-top:0}.level-awards .item-art{width:11px;height:11px}.workbench{padding:11px 13px 13px;gap:13px}.bench-label{font-size:6px;letter-spacing:1.15px;height:14px;margin-bottom:5px}.bench-label .item-art{width:19px;height:19px}.bits{gap:6px}.bit{width:51px;height:46px;padding:3px 5px;border-radius:11px}.bit .item-art{width:36px;height:36px;margin-left:1px}.bit kbd{font-size:6px;top:4px;left:4px;padding:1px 2px}.bit-shape{right:4px;bottom:4px;width:11px;height:11px;transform:scale(.9)}.inventory{padding-top:19px;gap:6px}.inventory .inventory-card{min-height:44px;border-radius:11px;padding:3px 7px 3px 2px;gap:2px}.inventory .item-art,.inventory .hammer-stat>.item-art:first-child{width:34px;height:34px}.inventory .inventory-count strong{font-size:16px}.inventory-count small{font-size:5px;letter-spacing:.6px;margin-bottom:3px}.inventory .inventory-count>span{font-size:8px}.missionbar{padding-top:11px;padding-bottom:11px}.win-hammers{min-height:46px;margin:9px 0 5px;gap:3px}.win-hammers .item-art{width:48px;height:48px}.dialog{border-radius:16px}.toast{border-radius:10px}.touch-controls p{max-width:160px}}
@media(max-width:480px){.brand-emblem{width:27px;height:27px}.brand{font-size:21px;letter-spacing:2.5px}.brand small{font-size:5px;letter-spacing:2px}.menu-content{padding-top:19px}.menu-content p{max-width:95%}.menu-content h2{font-size:29px}.menu-content .eyebrow{font-size:6px}.menu-content .primary{padding:11px 15px}.level-selection{padding-bottom:15px}.stage:has(#menu:not([hidden])){min-height:365px}.level-tile{min-height:48px;padding:6px 5px}.level-tile .level-awards{height:8px}.level-awards .item-art{width:9px;height:9px}.level-grid{gap:5px}.workbench{padding:10px 10px 12px;gap:8px}.bits{gap:5px}.bit{width:41px;height:43px;border-radius:10px;padding:3px 3px 3px 2px}.bit .item-art{width:33px;height:33px;margin-left:0}.bit kbd{top:3px;left:3px;font-size:5px}.bit-shape{bottom:2px;right:1px;transform:scale(.8)}.bench-label{font-size:5px;letter-spacing:.8px;height:13px}.bench-label .item-art{width:17px;height:17px}.inventory{gap:4px;padding-top:18px}.inventory .inventory-card{padding:3px 4px 3px 1px;gap:0;min-height:42px;border-radius:9px}.inventory .item-art,.inventory .hammer-stat>.item-art:first-child{width:28px;height:28px}.inventory-count small{display:none}.inventory .inventory-count strong{font-size:14px}.inventory .inventory-count>span{font-size:6px}.inventory .inventory-count{font-size:7px}.levelbar h1{font-size:16px}.win-hammers .item-art{width:44px;height:44px}}
@media(max-width:380px){.workbench{padding-left:8px;padding-right:8px;gap:6px}.bits{gap:4px}.bit{width:36px;height:41px}.bit .item-art{width:29px;height:29px}.inventory .inventory-card{position:relative;width:33px;min-width:33px;min-height:41px;padding:2px 3px;justify-content:center}.inventory .item-art,.inventory .hammer-stat>.item-art:first-child{width:27px;height:27px;transform:translateY(-3px)}.inventory .inventory-count{position:absolute;right:1px;bottom:0;display:block;line-height:1}.inventory .inventory-count>span{font-size:0}.inventory .inventory-count strong{font-size:10px;line-height:1.2;background:#132c3ae8;border:1px solid #637f8c55;border-radius:4px;padding:0 3px;min-width:15px;text-align:center;display:inline-block}}
.shape-torx:before{clip-path:polygon(50% 0,60% 32%,93% 25%,70% 50%,93% 75%,60% 68%,50% 100%,40% 68%,7% 75%,30% 50%,7% 25%,40% 32%)}
.item-art:before{inset:-18%}

/* The expanded campaign keeps all fourteen choices accessible in a scrolling menu. */
.menu-content,.level-selection{flex-shrink:0}.level-tile{min-width:0}.menu .context{white-space:normal}
@media(max-width:760px){.stage:has(#menu:not([hidden])){min-height:490px}.level-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.context{max-width:94%;white-space:normal;width:max-content;text-align:center}}

.crossing-level{border-color:#d4ad695c;background:linear-gradient(135deg,#58472c55,#1c3340d9)}.crossing-level:not(.locked) small{color:var(--yellow)}
.brace-button:not([hidden]){display:flex;align-items:center;gap:10px;background:#152f3d;border:1px solid #649f9c80;border-radius:10px;padding:11px 14px;color:#c8ece2;touch-action:none;user-select:none;cursor:pointer;font:600 12px system-ui}
.brace-button kbd{background:#284b55;padding:5px 8px;border-radius:5px}.brace-button small{display:block;font-size:7px;letter-spacing:1px;margin-top:4px;color:#83acae}.brace-button.pressed{background:#2c625c;border-color:#9af4d6;box-shadow:0 0 18px #6ce9bd25}.level-tile.hazard-level{border-color:#d8a56c66;background:linear-gradient(135deg,#d69e6710,transparent)}.hazard-level small{color:#e6ba81}
@media(max-width:650px){.brace-button:not([hidden]){padding:10px;gap:6px}.brace-button small{font-size:6px}.workbench{flex-wrap:wrap}}
.workbench{flex-wrap:wrap}.brace-button:not([hidden]){flex-shrink:0;margin-top:18px}
