@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700;800;900&display=swap');
:root{--paper:#f8f6f0;--white:#fffefa;--ink:#293657;--muted:#8390a5;--purple:#7664ed;--purple-dark:#5c4bd0;--mint:#d9f4e5;--mint-strong:#72c99c;--yellow:#ffc95e;--yellow-soft:#fff0c9;--coral:#ff9179;--sky:#dff3ef;--line:#ece8df;--shadow:0 9px 0 #eae4d8,0 14px 26px #46536b12;--font:'Nunito',system-ui,sans-serif}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:var(--font);background:var(--paper);color:var(--ink);-webkit-tap-highlight-color:transparent}button,a{-webkit-tap-highlight-color:transparent;font:inherit}button{cursor:pointer}.app-shell{width:min(100%,1000px);margin:auto;padding:0 30px 34px}.topbar{height:75px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ece8e0}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--ink);font-size:15px;font-weight:1000;letter-spacing:.09em;line-height:1}.brand-icon{width:40px;height:40px;border-radius:14px;background:var(--yellow);display:grid;place-items:center;font-size:27px;color:#fff;box-shadow:0 4px 0 #e7aa46;transform:rotate(-4deg)}.brand small{display:block;font-size:8px;letter-spacing:.1em;color:#8f99a8;margin-top:5px;font-weight:900}.header-stats{display:flex;align-items:center;gap:9px}.stat-pill{height:35px;min-width:65px;padding:0 11px;border-radius:20px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:1000}.stat-pill span{font-size:17px}.star-pill{background:#fff0c7;color:#be842e}.coin-pill{background:#dff3ec;color:#52a981}.coin-pill span{font-size:10px;color:#73c699}.avatar-button{width:37px;height:37px;background:#efeaff;border:0;border-radius:50%;color:#7968e9;font-size:19px}.screen{animation:screen-in .24s ease-out}.hidden{display:none!important}.welcome-row{padding:23px 0 18px;display:flex;align-items:center;justify-content:space-between}.eyebrow{font-size:9px;font-weight:1000;letter-spacing:.12em;color:#9aa5b0}.welcome-row h1,.workshop-header h1{font-size:26px;line-height:1.13;letter-spacing:-.04em;margin:5px 0 3px;font-weight:1000}.welcome-row p{margin:0;color:#8692a5;font-size:12px;font-weight:700}.wave{color:var(--yellow);font-size:22px}.home-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(290px,.8fr);gap:17px;align-items:stretch}.room-card,.mission-card{background:var(--white);border:1px solid #eee9de;border-radius:19px;box-shadow:var(--shadow);overflow:hidden}.room-card{padding:13px 13px 0;display:flex;flex-direction:column}.room-topline{height:27px;display:flex;align-items:center;justify-content:space-between;padding:0 4px 8px}.location-chip,.weather-chip{font-size:8px;font-weight:1000;letter-spacing:.08em;color:#93a0aa}.location-chip i{display:inline-block;width:6px;height:6px;background:#73c999;border-radius:50%;margin-right:5px}.location-chip b{color:#7564df;margin-left:4px}.weather-chip{font-size:11px;letter-spacing:0;color:#edac43}.weather-chip span{font-size:8px;color:#a4aab3;margin-left:4px;font-weight:800}.room-art{display:block;width:100%;height:auto;border-radius:13px 13px 0 0;overflow:hidden;background:#c7eee8}.tap-hint{font-family:var(--font);font-size:9px;font-weight:1000;letter-spacing:.1em;fill:#fff8e7;opacity:0;transition:opacity .18s}.lamp-trigger{cursor:pointer;transform-box:fill-box;transform-origin:center;animation:lamp-bob 2.8s ease-in-out infinite}.lamp-trigger:hover .tap-hint,.lamp-trigger:focus .tap-hint{opacity:1}.lamp-trigger:focus{outline:none}.lamp-halo{animation:halo-pulse 2s ease-in-out infinite}.mascot-name{font:1000 10px var(--font);fill:#fff7dd;letter-spacing:.08em}.room-tap-button{width:100%;height:42px;background:#fffaf0;border:0;color:#7564df;display:flex;align-items:center;justify-content:center;gap:9px;font-size:10px;font-weight:1000}.room-tap-button>span:last-child{font-size:17px}.tap-spark{color:#ffb746;font-size:16px}.room-tap-button:active{background:#fff0c9}.mission-card{padding:18px 17px 14px;display:flex;flex-direction:column;position:relative}.mission-label{display:flex;align-items:center;gap:7px;color:#a2aabb;font-size:8px;font-weight:1000;letter-spacing:.1em}.mission-icon{width:22px;height:22px;display:grid;place-items:center;border-radius:7px;background:#f0edff;color:#7969e6;font-size:12px}.client-row{display:flex;gap:9px;align-items:center;margin:18px 0 12px}.client-avatar{width:35px;height:35px;border-radius:13px;background:#ffe1cc;display:grid;place-items:center;color:#d68167;font-size:15px;font-weight:1000}.client-row strong{font-size:11px;display:block;font-weight:1000}.client-row small{font-size:8px;display:block;color:#a4adba;margin-top:2px;font-weight:700}.mood{margin-left:auto;color:#ffb64c;font-size:24px}.mission-card h2{font-size:19px;font-weight:1000;line-height:1.15;letter-spacing:-.03em;margin:2px 0 7px}.mission-card>p{font-size:10px;line-height:1.55;color:#8c98aa;margin:0}.mission-reward{margin-top:auto;padding-top:17px}.mission-reward>span{font-size:8px;color:#a2adbb;font-weight:1000;letter-spacing:.1em}.mission-reward>div{display:flex;align-items:center;gap:5px;margin-top:6px}.mission-reward strong{font-size:12px;font-weight:1000;color:#586781}.reward-coin{font-size:10px;color:#61bd8c}.reward-star{font-size:14px;color:#f3b743}.reward-divider{height:17px;border-left:1px solid #eae6dd;margin:0 5px}.play-button{width:100%;height:46px;border:0;border-radius:14px;background:var(--purple);color:white;box-shadow:0 5px 0 var(--purple-dark);font-size:11px;font-weight:1000;display:flex;align-items:center;justify-content:center;gap:8px;margin-top:15px;transition:transform .12s,box-shadow .12s,background .12s}.play-button:hover{background:#8272f5;transform:translateY(-2px);box-shadow:0 7px 0 var(--purple-dark)}.play-button:active{transform:translateY(3px);box-shadow:0 2px 0 var(--purple-dark)}.play-icon{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#9386ff;font-size:10px}.button-arrow{margin-left:auto;font-size:17px;padding-right:14px}.play-button .play-icon{margin-left:auto}.tap-note{text-align:center;font-size:8px!important;color:#a4adba!important;margin-top:10px!important;font-weight:800}.bottom-nav{display:flex;justify-content:center;gap:13px;margin:25px auto 0}.nav-item{position:relative;min-width:134px;padding:8px 14px;border:1px solid transparent;border-radius:13px;background:transparent;color:#8c97a7;font-size:10px;font-weight:1000}.nav-item>span{font-size:16px;vertical-align:-1px;margin-right:7px}.nav-item.selected{background:#fff;border-color:#eee9df;color:#7564df;box-shadow:0 3px 0 #e9e4d9}.nav-dot{position:absolute;width:6px;height:6px;border-radius:50%;background:#ffb84d;top:6px;right:35px}.workshop-header{display:flex;align-items:center;gap:13px;padding:26px 0 20px}.back-button{width:39px;height:39px;border:0;background:#fff;border-radius:13px;color:#7462e9;box-shadow:0 3px 0 #ebe5db;font-size:21px}.workshop-header .eyebrow{margin:0}.workshop-header h1{margin:3px 0 0}.workshop-coins{margin-left:auto;padding:8px 12px;border-radius:20px;background:#e1f4eb;color:#5ab483;font-size:11px}.workshop-hero{height:245px;overflow:hidden;border-radius:21px;position:relative;background:linear-gradient(#d9f3ee 0 73%,#f4c67e 73%);border:1px solid #d8e6dc;box-shadow:var(--shadow)}.workshop-sun{position:absolute;right:13%;top:16px;color:#ffc85a;font-size:39px}.workshop-mascot{position:absolute;right:10%;top:55px;width:71px;height:71px;display:grid;place-items:center;border-radius:50% 50% 44% 44%;background:#8bd889;color:white;font-size:32px;border:4px solid #61bd80;box-shadow:0 6px 0 #60a879}.pegboard{position:absolute;top:22px;left:8%;width:59%;height:120px;border-radius:14px;background:#b88a69;border:10px solid #956c55;box-shadow:0 7px 0 #8a6653;color:#fff2d5;padding:9px 12px;font-size:8px;font-weight:1000;letter-spacing:.1em}.peg-tools{display:flex;align-items:center;justify-content:space-around;height:74px}.peg-tools b{font-size:25px;filter:drop-shadow(0 3px 0 #805c49)}.workbench{position:absolute;left:4%;right:4%;bottom:28px;height:54px;border-radius:7px;background:#bd7953;border-top:12px solid #e2a56b;box-shadow:0 8px 0 #8f5b47}.workbench i{position:absolute;top:0;bottom:-19px;width:11px;background:#956047}.workbench i:first-child{left:9%}.workbench i:nth-child(2){right:9%}.workbench strong{position:absolute;left:0;right:0;top:17px;text-align:center;color:#ffe6bc;font-size:8px;letter-spacing:.18em}.workshop-title-row{display:flex;justify-content:space-between;align-items:end;margin:28px 1px 13px}.workshop-title-row h2{margin:3px 0 0;font-size:20px}.tiny-star{font-weight:1000;color:#c18b30}.upgrade-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.upgrade-card{background:#fff;border:1px solid #eee9df;border-radius:16px;padding:14px;box-shadow:0 4px 0 #ebe5da;display:flex;flex-direction:column;align-items:flex-start}.upgrade-icon{width:41px;height:41px;border-radius:13px;display:grid;place-items:center;background:#f2efff;font-size:21px;margin-bottom:11px}.upgrade-card strong{font-size:11px}.upgrade-card p{font-size:9px;line-height:1.45;color:#929daf;margin:4px 0 12px;min-height:25px}.upgrade-card button{margin-top:auto;width:100%;border:0;border-radius:9px;background:#e2f4e9;color:#51a876;padding:9px 6px;font-weight:1000;font-size:10px}.upgrade-card button.owned{background:#f3f1eb;color:#98a1ae}.puzzle-screen{position:fixed;inset:0;z-index:20;background:#f7f5ef;overflow:auto;overscroll-behavior:contain;animation:screen-in .2s ease-out}.puzzle-topbar{height:68px;padding:0 max(17px,calc((100vw - 520px)/2));display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:11px;background:#fffefa;border-bottom:1px solid #eee9e0;position:sticky;top:0;z-index:2}.puzzle-close{width:36px;height:36px;border:0;border-radius:12px;background:#f2efff;color:#7463e7;font-size:25px;line-height:1}.puzzle-level{display:flex;flex-direction:column;gap:2px}.level-badge{font-size:8px;letter-spacing:.09em;font-weight:1000;color:#a3adba}.level-badge b{color:#7564e5}.puzzle-level strong{font-size:13px}.move-pill{padding:7px 10px;border-radius:20px;background:#f4f1ff;color:#7968e8;font-size:12px;font-weight:1000}.move-pill span{color:#58647e}.puzzle-content{width:min(100%,500px);margin:0 auto;padding:15px 16px 22px}.puzzle-instruction{display:flex;align-items:center;gap:11px;margin-bottom:17px}.instruction-illustration{width:44px;height:44px;flex:none;border-radius:15px;background:#fff0c9;display:grid;place-items:center;font-size:21px}.puzzle-instruction h1{font-size:19px;margin:0 0 3px;letter-spacing:-.04em}.puzzle-instruction p{font-size:10px;line-height:1.45;color:#929dae;margin:0;font-weight:700}.board-stage{width:100%;position:relative;padding:13px 5px 15px 40px;background:#e9f7f2;border:1px solid #d9eee4;border-radius:20px;box-shadow:0 5px 0 #d8e8de,0 10px 20px #70877512}.wire-grid{width:100%;aspect-ratio:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:5px;position:relative;z-index:1}.wire-tile{border:1px solid #d9e8df;border-radius:13px;background:#fffdf7;box-shadow:0 3px 0 #d7e6dc;display:grid;place-items:center;position:relative;padding:0;transition:transform .12s,background .18s,box-shadow .18s;touch-action:manipulation;overflow:hidden}.wire-tile:active{transform:scale(.94);box-shadow:0 1px 0 #d7e6dc}.wire-tile svg{width:78%;height:78%;overflow:visible;transition:transform .22s cubic-bezier(.2,.8,.2,1)}.pipe{fill:none;stroke:#d6ddd8;stroke-width:7;stroke-linecap:round;stroke-linejoin:round;transition:stroke .2s,filter .2s}.wire-tile.powered .pipe{stroke:#f1ac45;filter:drop-shadow(0 0 3px #ffd46a)}.wire-tile.powered{background:#fff8e6;border-color:#f3d99f}.wire-tile.end-source:before,.wire-tile.end-target:before{content:'';position:absolute;width:9px;height:9px;background:#88cfa3;border:2px solid #fff;border-radius:50%;z-index:1}.wire-tile.end-source:before{left:-2px;top:50%;transform:translateY(-50%)}.wire-tile.end-target:before{left:-2px;top:50%;transform:translateY(-50%)}.wire-tile.end-target.lit{background:#fff2c8;border-color:#ffc95e;box-shadow:0 0 0 3px #ffda7f88,0 3px 0 #e6c876}.wire-source,.wire-target{position:absolute;left:7px;width:29px;height:46px;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:#55ad7a}.wire-source{top:calc(13px + (100% - 28px)*.125 - 23px)}.wire-target{top:calc(13px + (100% - 28px)*.875 - 23px);transition:transform .3s}.source-spark{width:27px;height:27px;border-radius:9px;background:#83d2a2;color:#fff;display:grid;place-items:center;font-size:20px;box-shadow:0 3px 0 #64b784}.wire-source small,.wire-target small{font-size:6px;font-weight:1000;letter-spacing:.06em;color:#65a982}.target-bulb{font-size:27px;color:#b8c4bd;transform:rotate(180deg);transition:.3s}.wire-target.lit .target-bulb{color:#ffbb49;filter:drop-shadow(0 0 7px #ffce5e);transform:rotate(180deg) scale(1.18)}.wire-target.lit small{color:#d89d32}.puzzle-hint{margin:17px 0 13px;padding:10px 11px;border-radius:12px;background:#fff4d8;color:#9b8458;display:flex;align-items:center;gap:8px;font-size:9px;line-height:1.4;font-weight:800}.puzzle-hint>span:first-child{font-size:17px}.puzzle-hint button{margin-left:auto;width:23px;height:23px;border-radius:50%;border:0;background:#ffe7a6;color:#b8872f;font-size:12px;font-weight:1000;flex:none}.puzzle-footer{display:flex;align-items:center;justify-content:space-between;padding:3px 2px}.power-meter{display:flex;align-items:center;gap:9px}.power-icon{width:31px;height:31px;border-radius:11px;background:#f0edff;color:#7868e5;display:grid;place-items:center;font-size:18px}.power-meter small{display:block;font-size:7px;color:#a5adba;letter-spacing:.1em;font-weight:1000}.power-meter strong{display:block;font-size:10px;color:#8a95a6;margin-top:2px}.power-meter.connected .power-icon{background:#fff1c9;color:#edae45}.power-meter.connected strong{color:#5ca979}.reset-button{width:34px;height:34px;border:0;background:#fff;border-radius:12px;color:#8072dc;font-size:21px;box-shadow:0 3px 0 #eae5dc}.success-overlay{position:fixed;inset:0;z-index:30;background:#2a36568c;backdrop-filter:blur(5px);display:grid;place-items:center;padding:18px;animation:fade-in .2s}.success-card{width:min(100%,350px);border-radius:25px;background:#fffefa;box-shadow:0 13px 0 #e4ddcf,0 24px 70px #27345438;padding:25px 23px 22px;text-align:center;position:relative;overflow:hidden}.success-mascot{width:57px;height:57px;border-radius:20px;background:#ffedbf;display:grid;place-items:center;font-size:32px;color:#f1ad41;margin:0 auto 12px;transform:rotate(-5deg)}.success-card .eyebrow{color:#a0aaba}.success-card h2{font-size:23px;margin:5px 0}.success-card>p{font-size:10px;color:#919bad;margin:0}.earned-stars{display:flex;justify-content:center;gap:8px;margin:16px auto 9px}.earned-stars span{width:38px;height:38px;border-radius:13px;background:#f0eee8;color:#dedbd3;display:grid;place-items:center;font-size:22px;transform:scale(.8);transition:.35s}.earned-stars span.earned{background:#fff0c6;color:#f5b63f;transform:scale(1) rotate(-7deg);box-shadow:0 3px 0 #eed18a}.coin-earned{color:#69b985;font-weight:1000;font-size:11px}.coin-earned strong{margin:0 3px}.success-card .play-button{margin-top:17px}.confetti{position:absolute;color:#ffbf4e;font-size:25px}.confetti-a{left:28px;top:53px;transform:rotate(-14deg)}.confetti-b{right:28px;top:93px;color:#83d09e}.toast{position:fixed;z-index:40;left:50%;bottom:24px;transform:translate(-50%,16px);padding:10px 15px;border-radius:12px;background:#313b5b;color:#fff;font-size:10px;font-weight:900;box-shadow:0 6px 18px #29365722;opacity:0;pointer-events:none;transition:.2s;white-space:nowrap}.toast.show{opacity:1;transform:translate(-50%,0)}
@keyframes lamp-bob{0%,100%{transform:rotate(0)}50%{transform:rotate(2deg)}}@keyframes halo-pulse{0%,100%{opacity:.38}50%{opacity:.78}}@keyframes screen-in{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in{from{opacity:0}to{opacity:1}}
@media(max-width:760px){.app-shell{padding:0 16px 24px}.topbar{height:65px}.home-layout{grid-template-columns:1fr;gap:13px}.welcome-row{padding:19px 1px 15px}.welcome-row h1{font-size:23px}.room-card{padding:10px 10px 0}.room-art{border-radius:11px 11px 0 0}.mission-card{padding:15px 16px 13px}.client-row{margin:12px 0 8px}.mission-reward{padding-top:13px}.play-button{margin-top:11px}.tap-note{display:none}.bottom-nav{position:sticky;bottom:8px;z-index:5;width:max-content;padding:4px;background:#f8f6f0ed;backdrop-filter:blur(8px);border-radius:16px;margin-top:17px}.nav-item{min-width:125px}.upgrade-grid{grid-template-columns:1fr 1fr}.upgrade-card{padding:12px}.upgrade-card:last-child{grid-column:1/-1}.puzzle-topbar{height:60px;padding:0 14px}.puzzle-content{padding:13px 13px 22px}.puzzle-instruction{margin-bottom:13px}.puzzle-instruction h1{font-size:17px}.puzzle-instruction p{font-size:9px}.board-stage{padding:11px 5px 12px 36px;border-radius:17px}.wire-grid{gap:4px}.wire-tile{border-radius:11px}.wire-tile svg{width:78%;height:78%}.wire-source,.wire-target{left:4px;width:27px}.wire-source{top:calc(11px + (100% - 23px)*.125 - 22px)}.wire-target{top:calc(11px + (100% - 23px)*.875 - 22px)}.source-spark{width:24px;height:24px}.target-bulb{font-size:24px}.puzzle-hint{margin:15px 0 11px}.workshop-header{padding-top:19px}.workshop-hero{height:210px}}
@media(max-width:380px){.app-shell{padding-left:11px;padding-right:11px}.brand{font-size:13px}.header-stats{gap:5px}.stat-pill{min-width:55px;padding:0 8px}.room-topline{padding:0 2px}.weather-chip span{font-size:7px}.mission-card h2{font-size:17px}.puzzle-content{padding-left:10px;padding-right:10px}.board-stage{padding-left:31px;padding-right:4px}.wire-grid{gap:3px}.wire-tile{border-radius:9px}.puzzle-hint{font-size:8px}.source-spark{width:22px;height:22px}.wire-source,.wire-target{left:2px}}
.language-button{height:32px;min-width:38px;padding:0 9px;border:1px solid #e2ddf7;border-radius:17px;background:#fff;color:#6f60d8;font-size:10px;font-weight:1000;letter-spacing:.06em;box-shadow:0 2px 0 #e8e2db}.language-button:active{transform:translateY(1px);box-shadow:0 1px 0 #e8e2db}
.settings-button{font-size:17px}.settings-card{padding-top:25px}.settings-card>h2{margin:4px 0 18px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 0;border-top:1px solid #eee9df}.settings-row>div:first-child,.settings-row>label:first-child{flex:1;text-align:left}.settings-row strong,.settings-row small{display:block;text-align:left}.settings-row strong{font-size:12px}.settings-row small{margin-top:3px;color:#929dae;font-size:9px}.language-options{display:flex;padding:3px;border-radius:12px;background:#f0edff}.language-options button{min-width:42px;height:31px;border:0;border-radius:9px;background:transparent;color:#8a80c8;font-size:10px;font-weight:1000}.language-options button.selected{background:#fff;color:#6555db;box-shadow:0 2px 5px #4f42731c}.settings-switch{position:relative;flex:none;width:48px;height:28px}.settings-switch input{position:absolute;opacity:0;pointer-events:none}.settings-switch span{display:block;width:100%;height:100%;border-radius:16px;background:#ddd9d2;transition:.2s}.settings-switch span:after{content:'';position:absolute;left:4px;top:4px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 2px 5px #3e48552b;transition:.2s}.settings-switch input:checked+span{background:#7664ed}.settings-switch input:checked+span:after{transform:translateX(20px)}.settings-switch input:focus-visible+span{outline:3px solid #b9afff}.settings-note{margin:4px 0 0;color:#9aa4b2;font-size:9px;line-height:1.4}

.target-bulb{transform:none}.wire-target.lit .target-bulb{transform:scale(1.18)}.wire-tile.end-target.lit{background:#fff2c8;border-color:#ffc95e;box-shadow:0 0 0 3px #ffda7f88,0 3px 0 #e6c876}.wire-tile.hint-pulse{animation:hint-pop .4s ease-in-out 3}@keyframes hint-pop{50%{transform:scale(1.07);box-shadow:0 0 0 4px #c6baff,0 5px 0 #d7e6dc}}

/* Variable-size boards and independent colored circuits. */
.mechanic-controls{margin:12px 0 0;padding:11px;border:1px solid #e4deee;border-radius:13px;background:#faf8ff}
.branch-tip{display:flex;align-items:center;gap:10px}
.branch-tip>span{font:900 29px var(--font);color:var(--purple);width:34px;text-align:center}
.branch-tip strong{display:block;font-size:10px;color:#6e61a0}
.branch-tip small{display:block;font-size:8px;color:#9c95ae;margin-top:2px}
.switch-controls{display:flex;gap:7px}
.switch-controls button{min-height:43px;border:0;border-radius:10px;font-size:9px;font-weight:1000;padding:8px 9px}
.switch-toggle{flex:1;background:#eae5fa;color:#80729e}
.switch-toggle.on{background:#deefdb;color:#589569}
.switch-test{background:var(--purple);color:white;box-shadow:0 3px 0 var(--purple-dark)}
.switch-checks{display:flex;justify-content:space-between;gap:5px;font-size:7px;font-weight:900;color:#a49aae;margin:10px 0 0}
.switch-checks .verified{color:#58a774}
.repair-label{display:flex;justify-content:space-between;gap:6px;font-size:8px;font-weight:1000;color:#807399;margin-bottom:8px}
.repair-label span{font-size:7px;color:#aaa2b7;letter-spacing:0}
.repair-parts{display:flex;gap:5px}
.repair-parts button{flex:1;display:flex;gap:4px;align-items:center;justify-content:center;min-height:43px;border:1px solid #e2ddee;border-radius:10px;background:#fff;color:#8979a5;font-size:8px;font-weight:1000;padding:6px 4px}
.repair-parts button>span{font-size:21px;line-height:1;color:#7463cf}
.repair-parts button b{background:#f0ebfd;padding:2px 4px;border-radius:5px;font-size:9px}
.repair-parts button.selected{border-color:var(--purple);background:#efeaff;box-shadow:0 0 0 2px #dcd3ff}
.repair-parts button:disabled{opacity:.42;cursor:default}
.repair-parts .repair-supply{position:relative;flex:0 0 52px;width:52px;height:52px;min-height:52px;aspect-ratio:1;padding:0;border-radius:12px;touch-action:none;overflow:visible;background:#fffdf7;box-shadow:0 3px 0 #d7e6dc}.repair-supply svg{width:78%;height:78%;overflow:visible;pointer-events:none}.repair-supply .pipe{stroke:#b8b0c4}.repair-supply b{position:absolute;right:-6px;top:-7px;min-width:22px;padding:3px 5px!important;border-radius:10px!important;background:#7664ed!important;color:#fff;font-size:10px!important;z-index:3}.repair-parts .repair-remove{flex:1}.repair-supply.drag-source{opacity:.4;transform:scale(.94)}.wire-tile.repair-supply-ghost{border:2px solid #7664ed;background:#fffdf7}.repairable.drag-target{outline:4px solid #7664ed;outline-offset:-3px;background:#efe8ff;box-shadow:0 0 0 5px #dcd3ff88}
.wire-tile.broken{background:#f3e7e3;border:2px dashed #d99f99;box-shadow:0 3px 0 #e3c8c3}
.wire-tile.broken .pipe{opacity:.18;stroke-dasharray:15 22;stroke:#a47774}
.tile-damage-mark{display:none;pointer-events:none}
.broken .tile-damage-mark{display:grid;place-items:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:23px;height:23px;border-radius:8px;background:#efaaa0;color:#a45656;font-size:15px;font-weight:1000;border:2px solid #fff1e9}
.repairable:not(.broken) .tile-damage-mark{display:block;position:absolute;bottom:2px;right:3px;color:#65a77d;font-size:0}
.repairable:not(.broken) .tile-damage-mark:after{content:'✓';font-size:9px}
.tile-switch-mark{position:absolute;pointer-events:none;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:21px;height:21px;background:#f1edfc;border:2px solid #9c8cc8;border-radius:7px;color:#8773b5;font-size:14px;font-weight:1000}
.switch-on .tile-switch-mark{color:#589166;border-color:#75b37e;background:#e8f6da}
@media(max-width:380px){.mechanic-controls{padding:9px}.switch-controls button{font-size:8px;padding:7px}.repair-label{font-size:7px}.repair-label span{font-size:6px}.repair-parts button{font-size:7px}}
.board-stage{padding:13px 37px 15px}
.terminal-rail{position:absolute;top:13px;bottom:15px;left:4px;width:29px}
.terminal-rail.targets{left:auto;right:4px}
.wire-terminal{position:absolute;width:29px;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:3px}
.terminal-badge{width:27px;height:27px;display:grid;place-items:center;border-radius:9px;border:2px solid var(--wire-color);background:#fffdf7;color:var(--wire-color);font-size:13px;font-weight:1000;transition:background .2s,box-shadow .2s}
.wire-terminal.source .terminal-badge{background:var(--wire-color);color:white;box-shadow:0 3px 0 #00000016}
.wire-terminal small{font-size:5px;letter-spacing:.04em;color:#81998c;font-weight:1000}
.wire-terminal.connected .terminal-badge{box-shadow:0 0 0 3px color-mix(in srgb,var(--wire-color) 25%,transparent);background:color-mix(in srgb,var(--wire-color) 15%,#fffdf7)}
.wire-tile svg{width:100%;height:100%}
.wire-tile .pipe{stroke:var(--wire-color);opacity:.48;stroke-width:8}
.wire-tile.powered .pipe{stroke:var(--wire-color);opacity:1;filter:drop-shadow(0 0 2px var(--wire-color))}
.wire-tile.powered{background:color-mix(in srgb,var(--wire-color) 10%,#fffdf7);border-color:color-mix(in srgb,var(--wire-color) 35%,#d9e8df)}
.wire-tile.end-source:before,.wire-tile.end-target:before{background:var(--wire-color);width:8px;height:8px}
.wire-tile.end-target:before{left:auto;right:-2px}
.wire-tile.end-target.lit{background:#fff2c8;border-color:#ffc95e;box-shadow:0 0 0 3px #ffda7f88,0 3px 0 #e6c876}
.circuit-legend{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;margin:13px 0 0}
.circuit-chip{display:flex;align-items:center;gap:5px;padding:6px 8px;border:1px solid #e6e7df;border-radius:10px;background:#fffefa;color:#8794a4;font-size:8px;font-weight:900;transition:.2s}
.circuit-chip i{width:7px;height:7px;border-radius:50%;background:var(--wire-color)}
.circuit-chip b{color:#a8b3bc;font-size:11px}
.circuit-chip.connected{border-color:var(--wire-color);color:var(--ink)}
.circuit-chip.connected b{color:var(--wire-color)}
.switch-trigger{pointer-events:none}
.switch-tap-hint{opacity:0;font:1000 9px var(--font);fill:#7564df;letter-spacing:.04em}
.room-art.switch-job .lamp-trigger{animation:none;pointer-events:none;cursor:default}
.room-art.switch-job .lamp-halo{animation:none;opacity:.12}
.room-art.switch-job .switch-trigger{pointer-events:all;cursor:pointer;outline:none}
.room-art.switch-job .switch-halo{animation:halo-pulse 2s ease-in-out infinite}
.room-art.switch-job .switch-tap-hint{opacity:1}
.wire-grid[data-size="5"] .wire-tile,.wire-grid[data-size="6"] .wire-tile{border-radius:9px}
@media(max-width:760px){.board-stage{padding:11px 33px 12px}.terminal-rail{top:11px;bottom:12px;left:2px;width:27px}.terminal-rail.targets{right:2px}.wire-terminal{width:27px}.terminal-badge{width:24px;height:24px;border-radius:8px;font-size:12px}.circuit-chip{font-size:7px;padding:5px 6px}.wire-grid[data-size="6"]{gap:3px}.wire-grid[data-size="6"] .wire-tile{border-radius:7px}.room-tap-button{font-size:9px;gap:6px}}
@media(max-width:380px){.board-stage{padding-left:28px;padding-right:28px}.terminal-rail,.wire-terminal{width:24px}.terminal-badge{width:21px;height:21px;border-radius:7px;font-size:11px}.circuit-legend{gap:4px}.circuit-chip{padding:4px 5px;font-size:6px}.wire-grid[data-size="5"]{gap:3px}}

/* Workshop collection */
.shelf-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 22px;color:#8a8299}.shelf-intro p{font-size:14px;line-height:1.65;margin:0}.shelf-intro>span{text-align:center;white-space:nowrap;background:#eee8f8;border-radius:18px;padding:10px 16px;color:#85729e}.shelf-intro b{font-size:22px;color:#6e5895}.shelf-intro small{font-size:11px;font-weight:800}.tool-rack{position:relative;background:#f3dfbf;border:10px solid #d5aa7a;border-radius:24px 24px 14px 14px;box-shadow:0 8px 0 #ba8c60,0 14px 28px #b3957620;overflow:hidden}.rack-sign{text-align:center;padding:15px 8px;background:#e9c697;color:#8c603e;font-size:13px;font-weight:900;letter-spacing:2px;border-bottom:5px solid #d5aa7a}.tool-shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:8px 12px 0;background:repeating-linear-gradient(90deg,transparent 0,transparent 95px,#dec49e22 96px,#dec49e22 98px)}.tool-slot{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:18px 10px 26px;background:transparent;border:0;border-bottom:13px solid #d5aa7a;box-shadow:0 5px 0 #b78b61;cursor:pointer;color:#6d625e;font-family:inherit;transition:background .2s}.tool-slot:hover{background:#fff8ec66}.tool-slot:focus-visible{outline:3px solid #9375bd;outline-offset:-4px;border-radius:10px}.tool-art-frame{display:block;position:relative;width:min(100%,112px);aspect-ratio:1;border:2px solid transparent;border-radius:22px;background:#fff8e62b;transition:all .35s}.tool-illustration{display:block;width:100%;height:100%}.tool-slot.locked .tool-art-frame{border:2px dashed #aaa29a;background:#eee9df66}.tool-slot.locked .tool-illustration{filter:grayscale(1);opacity:.5}.tool-slot.owned .tool-art-frame{background:#fff8e8aa;box-shadow:0 4px 14px #b8885817}.tool-lock{position:absolute;right:-6px;bottom:-5px;width:24px;height:24px;display:grid;place-items:center;background:#ded8cb;border:3px solid #f3dfbf;border-radius:50%;font-weight:900;color:#9b928a;font-size:17px}.tool-slot.owned .tool-lock{background:#86bba2;color:white}.tool-slot>strong{font-size:13px;line-height:1.3;min-height:34px;max-width:125px;display:grid;place-items:center}.tool-price{font-size:12px;font-weight:900;border-radius:20px;background:#eee7db;color:#9a8c79;padding:5px 12px}.tool-price.affordable{background:#ffe7ab;color:#a77825}.tool-slot.owned .tool-price{background:#dbebd6;color:#6b916d}.rack-foot{height:13px;background:#d5aa7a}.shelf-caption{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:#9a8f91;margin:24px 0}.locked-sample{width:20px;height:20px;border:2px dashed #aaa29a;border-radius:6px;background:#eee9df}.just-bought .tool-art-frame{animation:tool-pop .8s ease}@keyframes tool-pop{0%{transform:scale(.8)}45%{transform:scale(1.12);box-shadow:0 0 0 12px #fce4a655}100%{transform:scale(1)}}
.tool-modal-open{overflow:hidden}.tool-overlay{position:fixed;inset:0;z-index:150;background:#49385366;backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:20px;overflow-y:auto}.tool-card{position:relative;width:100%;max-width:390px;max-height:calc(100dvh - 40px);overflow-y:auto;border:3px solid #fff;background:#fffaf1;border-radius:30px;padding:24px;text-align:center;box-shadow:0 22px 70px #49385333}.tool-close{position:absolute;right:13px;top:13px;border:0;width:38px;height:38px;border-radius:50%;background:#eee7f4;color:#8c749e;font-size:26px;cursor:pointer}.tool-preview{width:130px;height:130px;margin:0 auto 14px;border-radius:32px;background:color-mix(in srgb,var(--tool-color) 18%,#fffaf1);padding:10px}.tool-card h2{font-size:25px;color:#615373;margin:8px 0}.tool-status{font-size:12px;font-weight:800;color:#89a28b}.tool-description{font-size:14px;line-height:1.55;color:#9a8b9e;margin:14px 0}.tool-benefit{display:flex;align-items:center;gap:12px;background:#eee8f8;border-radius:18px;padding:16px;text-align:left;margin:18px 0}.tool-benefit>span{font-size:28px;color:#a18bc1}.tool-benefit small{display:block;font-size:10px;letter-spacing:1px;color:#a28fba;font-weight:900;margin-bottom:5px}.tool-benefit strong{display:block;font-size:14px;line-height:1.4;color:#7b659c}.tool-cost{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;color:#91829a}.tool-cost strong{display:block;color:#b48635;font-size:22px;margin-top:4px}.tool-cost small{font-size:12px}.tool-shortage{color:#c28670;font-size:12px;min-height:18px;margin:12px 0}.tool-card .play-button{width:100%;justify-content:center;margin:0}.tool-card .play-button:disabled{background:#ded7e2;box-shadow:0 4px 0 #c5bacd;cursor:default;color:#a699b1}.tool-save-note{display:block;color:#ada0b0;margin:15px 0 0;font-size:11px}.puzzle-perks{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}.puzzle-perks>span{font-size:11px;font-weight:800;background:#e9e4f4;color:#8d78a6;padding:6px 10px;border-radius:12px}.wire-tile.diagnosed{outline:3px solid #64c5db;outline-offset:-3px;box-shadow:0 0 0 2px #bdeaf1}.tool-overlay.hidden,.puzzle-perks.hidden{display:none}
@media(max-width:760px){.tool-shelf{grid-template-columns:repeat(3,minmax(0,1fr));padding:4px 6px 0}.tool-rack{border-width:7px;border-radius:20px 20px 12px 12px}.tool-slot{padding:16px 6px 20px;gap:7px;border-bottom-width:11px}.tool-slot>strong{font-size:12px;min-height:32px}.tool-art-frame{max-width:96px}.rack-sign{font-size:11px;letter-spacing:1.5px}.shelf-intro p{font-size:12px}.shelf-caption{font-size:10px}.tool-price{font-size:11px;padding:5px 10px}.tool-card{padding:22px}.tool-overlay{padding:14px}.tool-card{max-height:calc(100dvh - 28px)}}
@media(max-width:350px){.tool-shelf{grid-template-columns:repeat(2,minmax(0,1fr))}.shelf-intro{gap:8px}.shelf-intro>span{padding:8px}.tool-cost{flex-wrap:wrap}}

.tool-lock svg{width:14px;height:14px}.shelf-empty{display:none}.tool-preview{background-color:#f3eadc}@media(max-width:760px) and (min-width:351px){.shelf-empty{display:block;border-bottom:11px solid #d5aa7a;box-shadow:0 5px 0 #b78b61}}@media(prefers-reduced-motion:reduce){.just-bought .tool-art-frame{animation:none}}

/* Each order has its own illustrated room. */
.scene-device-label{font:900 10px var(--font);letter-spacing:.07em;fill:#8b7469;paint-order:stroke;stroke:#fff8e8;stroke-width:3px;stroke-linejoin:round}.active-device{cursor:pointer;outline:none}.active-device .scene-light{animation:scene-glow 2.5s ease-in-out infinite}.active-device:hover .scene-light,.active-device:focus .scene-light{opacity:.9;animation:none}.active-device:focus-visible .scene-device-label{fill:#7664ed;stroke-width:5px}.room-art[data-scene="switch"]{background:#f5dcc7}.room-art[data-scene="two-rooms"]{background:#e4daf0}.room-art[data-scene="desk-switch"]{background:#d6e6f1}.room-art[data-scene="burnt-wires"]{background:#f4e8ce}.location-chip{letter-spacing:.025em}.weather-chip{flex-shrink:0}.room-topline{gap:6px}.puzzle-screen[data-scene="switch"]{background:#faf1e9}.puzzle-screen[data-scene="two-rooms"]{background:#f5effa}.puzzle-screen[data-scene="desk-switch"]{background:#eff5fb}.puzzle-screen[data-scene="burnt-wires"]{background:#faf3e7}@keyframes scene-glow{0%,100%{opacity:.3}50%{opacity:.65}}@media(max-width:450px){.weather-chip span{font-size:7px}.location-chip{font-size:7px}.room-topline{padding-left:0;padding-right:0}}@media(prefers-reduced-motion:reduce){.active-device .scene-light{animation:none}}

/* Spent bonuses disappear without moving the puzzle board. */
.puzzle-perks{min-height:30px;align-content:flex-start}
.puzzle-perks>span{font-variant-numeric:tabular-nums}

/* Achievements share the workshop's collectible shelf and detail cards. */
.bottom-nav{width:min(100%,460px)}
.bottom-nav .nav-item{flex:1;min-width:0;position:relative}
.achievement-nav-dot{position:absolute;top:8px;right:18%;width:7px;height:7px;border-radius:50%;background:#f2ae56;box-shadow:0 0 0 2px #fff9ed}
.achievement-rack{background:#eee6f4;border-color:#c7b6d9;box-shadow:0 8px 0 #ac95c2,0 14px 28px #8b729820}
.achievement-rack .rack-sign{background:#dfd0ec;color:#8a70a4;border-color:#c7b6d9}
.achievement-rack .tool-shelf{background:repeating-linear-gradient(90deg,transparent 0,transparent 95px,#c9b6dd22 96px,#c9b6dd22 98px)}
.achievement-rack .tool-slot{border-color:#c7b6d9;box-shadow:0 5px 0 #ac95c2}
.achievement-rack .tool-lock{border-color:#eee6f4}
.achievement-rack .rack-foot{background:#c7b6d9}
.achievement-rack .tool-slot.owned .tool-art-frame{background:#fff8eb}
.achievement-rack .achievement-ready .tool-art-frame{box-shadow:0 0 0 3px #f9dca0,0 4px 18px #d6b98433}
.achievement-rack .achievement-ready .tool-price{background:#ffe6a8;color:#a27932}
.achievement-rack .tool-slot>strong{max-width:140px}
.achievement-progress{background:#f1eaf6;border-radius:16px;padding:14px;text-align:left}
.achievement-progress>div{display:flex;justify-content:space-between;gap:12px;margin-bottom:9px;font-size:12px;color:#917ea9}
.achievement-progress progress{display:block;width:100%;height:10px;border:0;border-radius:8px;overflow:hidden;background:#ded4eb;accent-color:#a18ac6}
.achievement-progress progress::-webkit-progress-bar{background:#ded4eb;border-radius:8px}
.achievement-progress progress::-webkit-progress-value{background:#a18ac6;border-radius:8px}
.achievement-progress progress::-moz-progress-bar{background:#a18ac6;border-radius:8px}
@media(max-width:760px) and (min-width:351px){.achievement-rack .shelf-empty{border-color:#c7b6d9;box-shadow:0 5px 0 #ac95c2}}
@media(max-width:380px){.bottom-nav .nav-item{font-size:9px;padding-left:8px;padding-right:8px}.achievement-rack .tool-slot>strong{font-size:11px}.achievement-rack .tool-price{font-size:10px;padding:5px 6px}}

/* Dust-covered wiring and the serial garland. */
.wire-tile.dusty{background:#e7ddc7;border-color:#d2c4a8;box-shadow:0 3px 0 #c7b798;outline-color:#bbad8b}
.tile-dust{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;background:radial-gradient(ellipse at 25% 35%,#f6edd9 0,transparent 60%),#e0d2b6;border-radius:inherit;color:#b2a080}
.tile-dust>span{font-size:28px;color:#b5a383;transform:rotate(-15deg)}
.tile-dust small{position:absolute;bottom:8%;font-size:7px;font-weight:900;letter-spacing:.08em;color:#a79576}
.tile-dust i{position:absolute;width:6px;height:6px;border-radius:50%;background:#c3b293;top:20%;left:18%}
.tile-dust i:nth-of-type(2){top:31%;left:78%;width:8px;height:8px}.tile-dust i:nth-of-type(3){top:72%;left:22%;width:4px;height:4px}
.tile-bulb{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:29px;height:32px;border-radius:10px;background:#fffdf5;border:2px solid #d4ccd2;pointer-events:none;display:flex;align-items:center;justify-content:center;z-index:2}
.wire-tile .tile-bulb svg{width:19px;height:24px;transform:none!important;fill:#d9d4d9;stroke:#a99daa;stroke-width:2;stroke-linecap:round;transition:fill .2s,stroke .2s}
.tile-bulb b{position:absolute;right:-8px;top:-8px;border-radius:50%;background:#d9cfdf;color:#887392;border:2px solid #fffdf5;min-width:17px;height:17px;display:grid;place-items:center;font-size:8px}
.wire-tile.bulb-lit .tile-bulb{background:#fff0ba;border-color:#eac565;box-shadow:0 0 14px #ffd76d99}
.wire-tile.bulb-lit .tile-bulb svg{fill:#ffd877;stroke:#c9a15f}
.wire-tile.bulb-lit .tile-bulb b{background:#f8d680;color:#967243}
.garland-label{font-size:9px;font-weight:900;letter-spacing:.08em;color:#a68c9b;margin-bottom:10px}
.garland-bulbs{display:flex;justify-content:center;gap:18px}.garland-bulbs>span{position:relative;display:flex;align-items:center;gap:6px;color:#b4a4b0;font-size:12px;font-weight:900}
.garland-bulbs i{font-style:normal;font-size:24px;filter:grayscale(1);opacity:.45;transition:filter .2s,opacity .2s}
.garland-bulbs .connected{color:#bf9854}.garland-bulbs .connected i{filter:drop-shadow(0 0 5px #f8d276);opacity:1}
#dustRemaining{margin-left:auto;white-space:nowrap;font-size:10px;color:#a39175}
.room-art[data-scene="pantry"]{background:#e5dfcc}.room-art[data-scene="garland"]{background:#f4dde9}
.puzzle-screen[data-scene="pantry"]{background:#f7f2e8}.puzzle-screen[data-scene="garland"]{background:#fcf0f5}
@media(max-width:380px){.tile-bulb{width:25px;height:28px}.wire-tile .tile-bulb svg{width:16px;height:20px}.tile-dust>span{font-size:23px}.tile-dust small{font-size:6px}.garland-bulbs{gap:14px}}

/* Dust can be cleared only along the live frontier of the circuit. */
.wire-tile.dusty:not(.dust-available) .tile-dust{background:radial-gradient(ellipse at 25% 35%,#e7ddc7 0,transparent 60%),#d3c5ac;color:#aa997d}
.wire-tile.dusty:not(.dust-available) .tile-dust small{color:#99876b}
.wire-tile.dust-available{border-color:#edbc59;box-shadow:inset 0 0 0 2px #f2c96e,0 3px 0 #d2b16c}
.wire-tile.dust-available .tile-dust{background:radial-gradient(ellipse at 25% 35%,#fff2ca 0,transparent 70%),#ead7ac}
.wire-tile.dust-available .tile-dust>span{color:#d0a246}
.wire-tile.dust-available .tile-dust small{color:#af8439}
.wire-tile.dust-available:focus-visible{outline:3px solid #e5b255;outline-offset:1px}

.config-error{margin:24px 0;padding:20px;border:2px dashed #dba690;border-radius:18px;background:#fff0e5;color:#a16f5b;line-height:1.6;font-size:14px}
.wire-grid[data-size="7"]{gap:3px}
.wire-grid[data-size="7"] .wire-tile{border-radius:6px}
.wire-grid[data-size="7"] .tile-dust small{font-size:6px}
@media(max-width:380px){.wire-grid[data-size="7"]{gap:2px}.wire-grid[data-size="7"] .tile-bulb{width:23px;height:26px}.wire-grid[data-size="7"] .tile-dust>span{font-size:20px}.wire-grid[data-size="7"] .tile-dust small{font-size:5px}}

/* Finite pieces and empty slots in the old wiring order. */
.swap-controls{display:flex;gap:8px}.swap-controls button{flex:1;min-height:40px;padding:8px;border:1px solid #dbd2c2;background:#fffaf0;border-radius:12px;color:#9e8a67;font-size:11px;font-weight:900}.swap-controls button.selected{background:#eee8d9;border-color:#bca777;box-shadow:inset 0 0 0 1px #bca777;color:#826c43}.swap-status{display:block;min-height:25px;margin-top:10px;font-size:10px;line-height:1.4;color:#a29783}
.wire-tile.empty-slot{background:#ede9de;border:2px dashed #d4cbbb;box-shadow:none}.empty-slot-mark{font-size:24px;color:#d1c6b1;font-weight:400;pointer-events:none}.wire-tile.swap-selected{outline:3px solid #b69b60;outline-offset:-2px;background:#fff1c9;box-shadow:0 0 0 2px #f5dfac}.tile-anchor-mark{position:absolute;right:3px;bottom:2px;font-size:12px;color:#a89673;pointer-events:none}.fixed-tile{border-color:#c6b28a}.room-art[data-scene="old-wiring"]{background:#e6dfcf}.puzzle-screen[data-scene="old-wiring"]{background:#f6f1e7}
.room-art[data-scene="showcase"]{background:#dbece4}.puzzle-screen[data-scene="showcase"]{background:#f2f7ee}

/* Fixed wiring sections for the socket order. */
.wire-tile.rotation-locked{border:2px solid #b8a88b;background:#eee9db;box-shadow:0 3px 0 #bdb099}
.tile-rotation-lock{position:absolute;right:2px;bottom:2px;width:16px;height:16px;border-radius:5px;background:#e5d8bc;color:#947f58;display:grid;place-items:center;pointer-events:none;z-index:3}
.wire-tile .tile-rotation-lock svg{width:12px;height:12px;transform:none!important}
.wire-tile.rotation-locked:active{transform:none}
.terminal-badge .socket-icon{width:22px;height:22px}.room-art[data-scene="socket"]{background:#f0e6d0}.puzzle-screen[data-scene="socket"]{background:#f7f3e9}

/* Two isolated, independently powered channels inside the crossing bridge. */
.bridge-channel{fill:none;stroke:color-mix(in srgb,var(--channel-color) 50%,#d1d8d4);stroke-width:7;stroke-linecap:round;stroke-linejoin:round;transition:stroke .2s,filter .2s}
.bridge-channel.channel-live{stroke:var(--channel-color);filter:drop-shadow(0 0 2px var(--channel-color))}
.bridge-insulation{fill:none;stroke:#fffdf7;stroke-width:15;stroke-linecap:round;stroke-linejoin:round}
.bridge-tile{border:2px solid #b5bfd0;background:#faf8f2}
.bridge-guide{display:flex;align-items:center;gap:13px}.bridge-example{width:48px;height:48px;flex-shrink:0;border-radius:12px;background:#fffdf7;border:2px solid #c4cad5;padding:5px}.bridge-example svg{width:100%;height:100%}.bridge-guide strong{display:block;font-size:11px;color:#87779f}.bridge-guide small{display:block;margin-top:5px;font-size:9px;color:#a398b1;line-height:1.45}.room-art[data-scene="kitchen-bridge"]{background:#e0edf0}.puzzle-screen[data-scene="kitchen-bridge"]{background:#f0f5f8}

/* Let the player enjoy the solved circuit before revealing the reward. */
.celebrating-solution .wire-tile{cursor:default}
.celebrating-solution .mechanic-controls,.celebrating-solution #hintButton,.celebrating-solution #resetPuzzle{pointer-events:none}
.wire-tile.solution-reached{background:#fff5d4;border-color:#ebc473}
.wire-tile.solution-spark{animation:solution-tile-glow .7s ease-out}
.energy-trace{fill:none;stroke:#fff7bd;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16 90;filter:drop-shadow(0 0 4px #ffe589);animation:energy-travel .7s linear forwards;pointer-events:none}
.solution-source .terminal-badge{animation:solution-source-glow 1.8s ease-out}
.completion-celebration{position:fixed;z-index:24;bottom:calc(22px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 28px);padding:13px 27px 15px;border-radius:24px;border:2px solid #fff5d3;background:#fffdf2f2;box-shadow:0 8px 30px #76634b26;backdrop-filter:blur(8px);text-align:center;pointer-events:none;animation:completion-ribbon-in .3s ease-out}
.completion-celebration>strong{display:block;font-size:12px;font-weight:900;color:#ae8a46;margin-bottom:7px}
.celebration-stars{display:flex;justify-content:center;gap:14px}
.celebration-stars>span{display:grid;place-items:center;width:43px;height:43px;border-radius:14px;background:#eeeae0;color:#d7d0c2;font-size:30px;transition:background .2s,color .2s}
.celebration-stars>span.earned{color:#f3b33c;background:#fff0bd;box-shadow:0 4px 0 #e8c873,0 0 18px #ffdd8266;animation:completion-star-pop .6s cubic-bezier(.2,.9,.3,1.2) both}
.celebration-stars>span:nth-child(2).earned{animation-name:completion-star-pop-middle}
@keyframes energy-travel{from{stroke-dashoffset:106;opacity:1}70%{opacity:1}to{stroke-dashoffset:-106;opacity:0}}
@keyframes solution-tile-glow{0%{box-shadow:0 0 0 2px #ffe397,0 0 22px #ffda75aa}100%{box-shadow:0 3px 0 #dac79a}}
@keyframes solution-source-glow{0%{box-shadow:0 0 0 5px #ffdb8180,0 0 25px #ffcf75}100%{box-shadow:0 3px 0 #d0b674}}
@keyframes completion-ribbon-in{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes completion-star-pop{0%{transform:scale(.55) rotate(-18deg)}50%{transform:scale(1.25) rotate(7deg)}100%{transform:scale(1) rotate(-5deg)}}
@keyframes completion-star-pop-middle{0%{transform:scale(.55) rotate(18deg)}50%{transform:scale(1.3) rotate(-7deg)}100%{transform:scale(1.07) rotate(5deg)}}
@media(prefers-reduced-motion:reduce){.wire-tile.solution-spark,.energy-trace,.solution-source .terminal-badge,.completion-celebration,.celebration-stars>span.earned{animation:none}}

/* A connected output always shines yellow, regardless of its circuit color. */
.wire-tile.end-target.lit .pipe{stroke:#f1ac45;filter:drop-shadow(0 0 4px #ffd46a)}
.wire-tile.end-target.lit:before{background:#ffc95e}

/* Repeatable interactive mechanic lessons. */
.task-info-card { max-height: 90dvh; overflow-y: auto; }
.lesson-visual { margin: 16px 0; padding: 12px; border-radius: 18px; background: #fff7e4; }
.lesson-visual svg { display: block; width: 100%; max-height: 170px; }
.lesson-visual p { min-height: 3em; line-height: 1.5; color: #655342; }

.lesson-board { position: relative; margin: 14px 25px; }
.lesson-grid { display: grid; grid-template-columns: repeat(var(--lesson-size), minmax(0, 1fr)); gap: 4px; }
.lesson-grid .wire-tile { width: 100%; height: auto; aspect-ratio: 1; min-width: 0; border-radius: 10px; }
.lesson-grid .wire-tile svg { width: 100%; height: 100%; max-height: none; }
.lesson-grid .lesson-focus { outline: 2px dashed #a998eb; outline-offset: -3px; }
.lesson-sources span, .lesson-targets span { position: absolute; transform: translateY(-50%); font-size: 23px; }
.lesson-sources span { left: -25px; }
.lesson-targets span { right: -25px; filter: grayscale(1); opacity: .45; }
.lesson-targets .connected { filter: none; opacity: 1; text-shadow: 0 0 10px #ffd16c; }
.lesson-controls button { min-height: 44px; }
.lesson-grid .tile-bulb { width: 20px; height: 24px; }
.lesson-grid .tile-dust small { display: none; }

@media (prefers-reduced-motion: reduce) { .lesson-visual * { animation: none; transition: none; } }

.lesson-visual .lesson-status { font-size: 13px; min-height: 0; margin-bottom: 0; }
.lesson-visual.lesson-reviewed .lesson-grid button,.lesson-visual.lesson-reviewed .lesson-controls button{pointer-events:none;cursor:default}

.task-info-card #taskInfoDescription, .task-info-card #taskInfoTip { display: none; }
.task-info-card .lesson-visual { margin-bottom: 8px; }

.task-info-card button:disabled { cursor: default; opacity: .4; filter: grayscale(.6); }

.order-difficulty { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 14px 0; align-items: center; }
.order-difficulty label, .training-progress { font-size: 12px; font-weight: 800; color: #7968be; }
.order-difficulty select { min-height: 44px; border: 1px solid #d9d0ef; border-radius: 10px; padding: 8px; font: inherit; background: #f6f1ff; color: #57468f; }
.order-difficulty small { grid-column: 1 / -1; color: #8692a5; font-size: 11px; }

.drag-enabled { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.wire-tile.drag-source { opacity: .35; outline: 3px solid #b69b60; }
.wire-tile.drag-target { outline: 3px solid #7664ed; outline-offset: -2px; background: #efe8ff; }
.tile-drag-ghost { position: fixed !important; z-index: 100; pointer-events: none; margin: 0; opacity: .95; transform: scale(1.06); box-shadow: 0 10px 24px #39304c55 !important; cursor: grabbing; }
.tile-drag-ghost svg { display: block; width: 100%; height: 100%; }
/* Purchases and consumable helpers */
.puzzle-content .puzzle-actions { grid-template-columns:44px 44px minmax(0,1fr) minmax(0,1fr); align-items:center; }
.reward-options { display:flex; gap:10px; margin:14px 0; }
.reward-options > button { flex:1; white-space:normal; }
.booster-item { border-top:1px solid #ddd6c6; padding:12px 0; }
.booster-item h3 { margin:6px 0; }
.booster-item p { line-height:1.5; }
#economyModal .tool-card { max-height:85dvh; overflow:auto; }
button:disabled { cursor:default; opacity:.5; }
.puzzle-actions .helper-icon { position:relative; width:44px; height:44px; min-height:44px; padding:9px; border-radius:50%; flex-shrink:0; }
.helper-icon svg { width:24px; height:24px; }
.helper-badge { position:absolute; width:7px; height:7px; right:3px; top:3px; border-radius:50%; background:#dca03e; box-shadow:0 0 0 2px #fff9ef; }
.wire-tile.auto-rotate-active{z-index:4;animation:auto-rotate-glow .6s ease-in-out infinite alternate;outline:3px solid #ffd15e;outline-offset:-2px}.wire-tile.time-route-preview{z-index:3;animation:time-route-flash 1.05s var(--route-delay,0ms) ease-in-out both;outline:3px solid #f6c94f;outline-offset:-3px}.wire-tile.time-route-preview .pipe,.wire-tile.time-route-preview .bridge-channel{stroke:#f2b73f;filter:drop-shadow(0 0 5px #ffd45d)}.wire-tile.time-route-preview.empty-slot{background:#fff0ae}.wire-tile.time-route-preview .empty-slot-mark{color:#d59a2e}
@keyframes auto-rotate-glow{to{box-shadow:0 0 0 5px #ffd76f99,0 7px 18px #e8aa3955;transform:scale(1.05)}}@keyframes time-route-flash{0%,100%{transform:scale(1)}25%,75%{background:#fff4bd;box-shadow:0 0 0 4px #ffd76099,0 0 18px #f2b84299;transform:scale(1.035)}}
.helper-coach{position:fixed;inset:0;z-index:155;background:#2a36565c;backdrop-filter:blur(2px);display:flex;align-items:flex-end;justify-content:center;padding:18px 18px calc(82px + env(safe-area-inset-bottom))}
.helper-coach.hidden{display:none}.helper-coach-card{width:min(100%,390px);padding:18px 20px 20px;border-radius:24px;background:#fffaf1;border:3px solid #fff;box-shadow:0 18px 60px #27345455;text-align:center}.helper-coach-topline{display:flex;align-items:center;justify-content:space-between;color:#a28fba;font-size:11px;font-weight:900}.helper-coach-topline button{border:0;background:transparent;color:#9b8ba4;font:800 12px var(--font);padding:5px}.helper-coach-icon{width:55px;height:55px;margin:3px auto 8px;border-radius:18px;background:#fff0c9;display:grid;place-items:center;font-size:28px;color:#8e7138}.helper-coach-card h2{font-size:21px;color:#615373;margin:5px 0}.helper-coach-card p{font-size:13px;line-height:1.5;color:#8f8296;margin:8px 0 16px}.helper-coach-card .play-button{width:100%;justify-content:center;margin:0}.helper-coach-target{animation:helper-coach-pulse 1s ease-in-out infinite;box-shadow:0 0 0 5px #ffd66f,0 0 0 10px #fff8d899!important}
@keyframes helper-coach-pulse{50%{transform:scale(1.1)}}
.wire-tile.repair-supply .pipe{stroke:#a99cba;stroke-width:8;opacity:1;filter:none}
.language-options button{min-width:58px}
.credits-card{text-align:left;max-height:85dvh;overflow-y:auto}.credits-card section{padding:12px 0;border-top:1px solid #eee9df}.credits-card h3{font-size:13px;margin:0 0 8px}.credits-card p{font-size:11px;line-height:1.6;margin:5px 0;overflow-wrap:anywhere}.credits-card a{color:#7664ed}.settings-note #openCredits{font-size:11px}
.music-volume-control{display:flex;align-items:center;gap:8px;flex:none;width:145px}.music-volume-control input{min-width:0;width:105px;accent-color:#7664ed}.music-volume-control output{font-size:10px;color:#6555db;min-width:30px}.settings-note{text-align:left}.settings-note a{color:#7664ed}
html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.app-shell{height:100dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
