@font-face{font-family:Workshop Pixel;src:url(./pixel.woff2) format("woff2");font-display:swap}
:root{color-scheme:light;--ink:#342520;--muted:#6f5749;--paper:#fff7e9;--line:#d8b76f;--gold:#efbc60;--teal:#2c514a;--teal-light:#d8ead6;--wood:#432b2c;--shadow:#573829;--corner:12px;font-family:ui-rounded,"Avenir Next",Avenir,system-ui,sans-serif;line-height:1.5}
*{box-sizing:border-box}
body{margin:0;min-height:100svh;color:var(--ink);background:radial-gradient(ellipse at 35% 10%,#fff7e7 0%,#f8ead2 58%,#eee0c4 100%);background-attachment:fixed}
button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}
button:focus-visible{outline:3px solid #532e76;outline-offset:4px}
button:disabled{cursor:default}
[hidden]{display:none!important}
.layout{width:min(1112px,calc(100% - 64px));margin:auto;padding:45px 0 44px}
.site-header,.brand,.case-meta,.casebook-header,.action-row{display:flex;align-items:center}
.site-header{justify-content:space-between;gap:20px;margin-bottom:26px}
.brand{gap:13px;min-width:0}
h1,h2,p{margin:0}
h1{font:700 clamp(1.65rem,3.6vw,2.45rem)/.94 "Workshop Pixel",ui-monospace,monospace;letter-spacing:-.035em}
h1 span{color:#744338}
.brand-mark{width:48px;height:48px;background:#453031;border-radius:10px;border:2px solid #3b2328;box-shadow:0 3px 0 #b69167,inset 0 2px #805549;flex:none;display:grid;place-items:center}
.brand-mark span{width:4px;height:4px;transform:translate(-13px,-12px);box-shadow:12px 0 #ffe097,16px 0 #ffe097,20px 0 #ffe097,8px 4px #ffe097,12px 4px #ffe097,16px 4px #533336,20px 4px #ffe097,24px 4px #ea9049,28px 4px #ea9049,8px 8px #ffe097,12px 8px #ffe097,16px 8px #ffe097,20px 8px #ffe097,24px 8px #ea9049,0 12px #e9ad65,4px 12px #f8c87b,8px 12px #ffe097,12px 12px #ffe097,16px 12px #67a69b,20px 12px #ffe097,4px 16px #ffe097,8px 16px #ffe097,12px 16px #ffe097,16px 16px #ffe097,20px 16px #ffe097,8px 20px #e5a159,12px 20px #e5a159,16px 20px #e5a159,20px 20px #e5a159}
.sound-button{min-height:42px;white-space:nowrap;display:flex;align-items:center;gap:8px;border:1px solid #c4a779;border-radius:9px;padding:7px 13px;background:#fff7e8;font-size:.875rem;font-weight:700;color:#694b3b}
.sound-button:hover,.sound-button[aria-pressed="true"]{background:#e5edda;color:#30554c}
.sound-icon{position:relative;display:inline-block;width:15px;height:12px;flex:none;background:currentColor;clip-path:polygon(0 25%,30% 25%,60% 0,60% 100%,30% 75%,0 75%,0 25%,78% 20%,100% 35%,100% 65%,78% 80%,78% 20%)}
.sound-button[aria-pressed="false"] .sound-icon{clip-path:polygon(0 25%,30% 25%,60% 0,60% 100%,30% 75%,0 75%)}
.workshop{display:grid;grid-template-columns:minmax(0,1.72fr) minmax(300px,1fr);gap:18px;align-items:stretch}
.scene{position:relative;align-self:start;aspect-ratio:2/1;overflow:hidden;border:4px solid #4b3030;border-radius:var(--corner);isolation:isolate;background:#573b42 url("./workbench.webp") center center/cover no-repeat;box-shadow:0 5px 0 #bd9b70,inset 0 0 0 2px #835141}
.scene::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(23,16,29,.35),transparent 27%,transparent 87%,rgba(38,20,15,.25));box-shadow:inset 0 0 0 2px #b085563d;pointer-events:none}
#duckCanvas{position:absolute;inset:0;width:100%;height:100%;display:block;image-rendering:pixelated}
.scene-plaque{position:absolute;top:12px;left:12px;z-index:1;padding:5px 9px;color:#fff0cd;background:#332333e8;border:1px solid #a67a58;border-radius:4px;font-size:.875rem;font-weight:700;letter-spacing:.015em}
.scene-plaque span{display:inline-block;width:7px;height:7px;background:#ffd88c;margin-right:5px;transform:rotate(45deg)}
.scene-corner{position:absolute;z-index:1;bottom:6px;width:11px;height:11px;border-bottom:2px solid #f7ca77a0;pointer-events:none}
.corner-left{left:6px;border-left:2px solid #f7ca77a0}.corner-right{right:6px;border-right:2px solid #f7ca77a0}
.repair-panel{display:flex;flex-direction:column;min-width:0;min-height:100%;border:2px solid #cba55f;box-shadow:0 4px 0 #d6b579;border-radius:var(--corner);padding:20px;background:var(--paper)}
.case-meta{justify-content:space-between;gap:8px;color:var(--muted);font-size:.875rem;font-weight:700}
[data-step-label]{background:#f1e0bc;border:1px solid #dec595;padding:3px 8px;border-radius:5px}
.case-content{margin:13px 0 14px;flex:1}
.case-content h2{font:700 clamp(1.4rem,2.2vw,1.95rem)/1.1 "Workshop Pixel",ui-monospace,monospace;margin-bottom:7px;letter-spacing:-.025em}
.case-content p{color:#5f493a;font-size:1rem;line-height:1.45}
.feedback:not(:empty){margin-top:10px;font-size:.92rem;line-height:1.4;color:#51372c;padding:7px 10px;background:#f4e7cb;border-left:3px solid #d2a85f;border-radius:3px}
.feedback[data-tone="success"]{background:#e3edd8;border-color:#6ea386;color:#25463c}
.choices:not([hidden]){margin-top:10px;display:grid;grid-template-columns:1fr;gap:6px}
.choices .repair-choice{display:flex;align-items:center;gap:9px;width:100%;min-height:43px;text-align:left;border-radius:6px;border:1px solid #d5b77d;background:#fff9ed;padding:6px 10px;font-size:.875rem;font-weight:850}
.choices .repair-choice:hover{background:#f7e8c6}
.choices .repair-choice[data-part]::before{content:"";width:14px;height:14px;flex:none;background:#ad7444}
.choices .repair-choice[data-part="gear"]::before{clip-path:polygon(25% 0,42% 0,42% 18%,58% 18%,58% 0,75% 0,75% 25%,100% 25%,100% 42%,80% 42%,80% 58%,100% 58%,100% 75%,75% 75%,75% 100%,58% 100%,58% 80%,42% 80%,42% 100%,25% 100%,25% 75%,0 75%,0 58%,18% 58%,18% 42%,0 42%,0 25%,25% 25%)}
.choices .repair-choice[data-part="spring"]::before{clip-path:polygon(0 85%,40% 85%,40% 70%,10% 70%,10% 49%,65% 49%,65% 35%,30% 35%,30% 18%,75% 18%,75% 0,100% 0,100% 30%,55% 30%,90% 36%,90% 65%,35% 65%,65% 74%,65% 100%,0 100%)}
.choices .repair-choice[data-part="wheel"]::before{border:3px solid #8b533c;border-radius:50%;background:#eed5a3}
.action-row{gap:9px;align-items:stretch;margin-top:auto}
.primary,.secondary{flex:1;min-height:46px;padding:9px 11px;border-radius:7px;font-weight:850;font-size:1rem}
.primary{color:#fffbeb;background:var(--teal);border:1px solid #1d3b38;box-shadow:0 3px 0 #193934}
.primary:hover{background:#38665a}.primary:active{transform:translateY(2px);box-shadow:0 1px 0 #193934}
.primary:disabled{color:#5f5440;background:#eadbb9;border-color:#c7ae77;box-shadow:0 2px 0 #d7bd86}
.secondary{background:#fae5b4;border:1px solid #be965a;box-shadow:0 3px 0 #ddbd7e}
.secondary:hover{background:#ffecc5}
.casebook{margin-top:27px}
.casebook-header{justify-content:space-between;gap:12px;margin-bottom:9px}
.casebook h2{font:700 1.48rem/1 "Workshop Pixel",ui-monospace,monospace;color:#583d35}
.after-hours{margin-top:23px;padding:16px 19px;background:#e7efdb;border:1px solid #87a68c;border-radius:var(--corner);color:#25443b;box-shadow:0 3px 0 #bbcca9}
.after-hours h2{font:700 1.35rem/1.1 "Workshop Pixel",ui-monospace,monospace}
.after-hours p{margin-top:5px}
[data-progress]{color:#654a41;font-size:.875rem;font-weight:750;white-space:nowrap}
.case-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.case-card{position:relative;min-width:0;min-height:65px;border:1px solid #d1ad69;border-radius:8px;background:#fff5e0;display:flex;align-items:center;text-align:left;gap:11px;padding:9px 10px;box-shadow:0 2px 0 #dbbf8b}
.case-card:hover{background:#fff9ed}
.case-card[aria-current="true"],.case-card[aria-pressed="true"],.case-card[data-active="true"]{background:#faf0cf;border:2px solid #866242;padding:8px 9px;box-shadow:0 2px 0 #c19c56}
.case-card[data-complete="true"],.case-card[data-completed="true"]{background:#eaf0dc;border-color:#779d88}
.case-names{display:flex;flex-direction:column;min-width:0}
.case-name{font-size:.925rem;line-height:1.2;font-weight:850}
.case-caption{color:var(--muted);font-size:.875rem;line-height:1.25;margin-top:4px}
.part-icon{width:34px;height:34px;flex:none;display:grid;place-items:center;color:#966045;background:#eedab3;border:1px solid #c6a06b;border-radius:6px}
.part-icon::before{content:"";width:18px;height:18px;background:currentColor}
.icon-gear::before{clip-path:polygon(25% 0,42% 0,42% 18%,58% 18%,58% 0,75% 0,75% 25%,100% 25%,100% 42%,80% 42%,80% 58%,100% 58%,100% 75%,75% 75%,75% 100%,58% 100%,58% 80%,42% 80%,42% 100%,25% 100%,25% 75%,0 75%,0 58%,18% 58%,18% 42%,0 42%,0 25%,25% 25%)}
.icon-spring::before{clip-path:polygon(0 85%,40% 85%,40% 70%,10% 70%,10% 49%,65% 49%,65% 35%,30% 35%,30% 18%,75% 18%,75% 0,100% 0,100% 30%,55% 30%,90% 36%,90% 65%,35% 65%,65% 74%,65% 100%,0 100%)}
.icon-wheel::before{border:4px solid currentColor;background:#efd3a2;border-radius:50%}
@media(min-width:900px){.repair-panel{min-height:318px}}
@media(max-width:899px){.layout{width:min(540px,calc(100% - 30px));padding:24px 0 27px}.site-header{margin-bottom:17px}.workshop{grid-template-columns:1fr;gap:13px}.repair-panel{min-height:0;padding:14px 15px}.casebook{margin-top:21px}.case-list{gap:6px}.case-card{align-items:flex-start;gap:6px;flex-direction:column;padding:8px 7px}.case-card[aria-current="true"],.case-card[aria-pressed="true"],.case-card[data-active="true"]{padding:7px 6px}.case-caption{font-size:.875rem}.case-name{font-size:.875rem}.part-icon{width:27px;height:27px}.part-icon::before{width:14px;height:14px}.scene-plaque{top:8px;left:8px}}
@media(max-width:380px){.layout{width:calc(100% - 24px)}.brand{gap:8px}.brand-mark{width:41px;height:41px}.site-header{gap:8px}h1{font-size:1.42rem}.sound-button{padding-inline:8px}.case-caption{font-size:.82rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:0.01ms!important;scroll-behavior:auto!important}}
