*{box-sizing:border-box} :root{--ink:#173d36;--paper:#faf7ed;--dark:#173d36;--gold:#ffdb81}body{margin:0;color:var(--ink);background:var(--paper);font:1.05rem/1.45 system-ui,sans-serif}header,main{width:min(42rem,calc(100% - 2rem));margin:auto}header,.top,.support,#win{display:flex;align-items:center;justify-content:space-between;gap:.6rem}header{padding:.7rem 0;border-bottom:1px solid #bdcab9}.brand{font-weight:700}.brand span{color:#8d661d}button,select,summary{font:inherit;cursor:pointer}button,select{min-height:44px;padding:.4rem .85rem;background:transparent;color:inherit;border:1px solid #94a99a;border-radius:.5rem}main{padding:clamp(1.25rem,4vw,2.6rem) 0 2rem}.title{margin-bottom:1.25rem}h1{font:700 clamp(2.3rem,7vw,3.9rem)/1.05 Georgia,serif;letter-spacing:-.025em}h1,h2,p{margin:0}.title p{margin-top:.45rem}h2{font-size:1.15rem}.machine{background:var(--dark);color:#fffdf4;border-radius:1rem;padding:clamp(1rem,4vw,1.8rem);box-shadow:0 4px #0e2b25}.top select{color:var(--ink);background:#f9f6e9}ol{padding:0;list-style:none;margin:.65rem 0 1rem}li{background:#f6f2df;color:var(--ink);padding:.45rem .7rem;border-radius:.35rem;margin:.25rem 0}li.flag{outline:3px solid var(--gold)}li small{display:inline-block;font-weight:bold;margin-right:.6rem}.door{position:relative;padding:1.25rem .65rem;background:#0d2d28;border:2px solid #67887b;border-radius:.75rem;margin:.55rem 0 1rem;box-shadow:inset 0 4px 8px #051e19}.bolt{position:absolute;width:5px;height:5px;background:#9aafa1;border-radius:50%}.one,.two{top:6px}.three,.four{bottom:6px}.one,.three{left:7px}.two,.four{right:7px}
#slots,#tray{display:flex;gap:clamp(.2rem,1.3vw,.55rem);align-items:center;justify-content:center}#slots button{min-width:0;flex:1;max-width:5rem;min-height:4.4rem;padding:.2rem;border:1px dashed #b7c6ae;background:#244c42;color:#fffdf1}.glyph,.slotlabel{display:block}.glyph{font:700 clamp(1.35rem,4vw,2.2rem)/1.2 system-ui}.slotlabel{font-size:.82rem}#slots .filled{border:1px solid #adbdab;background:#e3eddc;color:var(--ink)}#slots button:disabled{opacity:1;cursor:default}#tray{justify-content:flex-start;flex-wrap:wrap;margin:.55rem 0 .15rem}#tray button{min-width:3.5rem;background:#faf5df;color:#193f35;padding:.35rem}.selected{outline:3px solid var(--gold);outline-offset:2px}#slots .selected{border-style:solid}.open .door{border-color:var(--gold);background:#30583d}.gold{background:var(--gold);border:0;color:#203629;font-weight:750}.support{padding:.85rem 0;color:#456253}.support span{font-size:.9rem}summary{padding:.5rem 0;font-weight:650}#hintText,details p{max-width:58ch}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #da8333;outline-offset:3px}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}[hidden]{display:none!important}.project main,.project header{width:min(65rem,calc(100% - 2rem))}.project .machine{font-size:1.45rem}.project #slots button{max-width:7rem}.project .glyph{font-size:2.35rem}
@media(max-width:400px){header,main{width:calc(100% - 1rem)}.machine{padding:.7rem}.door{padding-inline:.3rem}#slots{gap:.21rem}#tray button{min-width:2.75rem}}
body{background-color:#f7f4e9;background-image:radial-gradient(#34544820 .8px,transparent .9px);background-size:14px 14px}
.controls{display:flex;gap:.45rem}.controls button{background:#fbfaf1;font-size:.89rem}
.machine{position:relative;background:linear-gradient(125deg,#245449,#12372f 78%);border:1px solid #0b302a;box-shadow:inset 0 0 0 3px #547568,inset 0 0 0 5px #274e40,0 6px 0 #102e27,0 12px 20px #244c3225}
.top h2{font-family:Georgia,serif;font-size:1.5rem}.top select{border-color:#a8b5a4;font-weight:650}
#clues{background:#f8f3df;border-radius:4px;border-left:5px solid #c8ab63;padding:.15rem .75rem;box-shadow:0 3px 0 #07281d55}
#clues li{background:transparent;margin:0;border-radius:0;padding:.44rem .15rem;line-height:1.4}#clues li+li{border-top:1px solid #c9c7ae}
#clues .flag{background:#ffecb2;outline:0}#clues .flag small{color:#754311;text-decoration:underline;text-underline-offset:.2em}
.door{padding:1rem .8rem 1.1rem;background:linear-gradient(160deg,#668276,#3d6054 52%,#486b5d);border:2px solid #8d9e88;box-shadow:inset 0 0 0 3px #36584b,inset 0 0 0 5px #769080,0 3px 5px #0a251e}
.bolt{width:7px;height:7px;border-radius:50%;background:linear-gradient(145deg,#bdc5a7 42%,#516356 43% 55%,#a8b696 57%);box-shadow:0 1px 1px #294437}
.lockwork{height:2rem;margin:0 auto .65rem;display:flex;align-items:center;justify-content:center;gap:.5rem}
.dial{width:2rem;height:2rem;border-radius:50%;border:2px solid #ded6b2;box-shadow:0 1px 0 2px #284239,inset 0 0 0 3px #344f42;background:repeating-conic-gradient(from 0deg,#f5e4ac 0 4deg,#455e4d 4deg 30deg);display:grid;place-items:center}
.dial::before{content:"";width:50%;height:50%;border:1px solid #c3b88c;border-radius:50%;background:linear-gradient(90deg,#c2ad72 41%,#5c512f 42% 55%,#dbc784 56%)}
.latch-track{width:2.4rem;height:.68rem;background:#16382c;border-radius:3px;box-shadow:inset 0 2px 3px #0b241e;overflow:hidden}
.latch{display:block;width:100%;height:100%;background:linear-gradient(#f1de9a,#ac9158);border:1px solid #8b7546;border-radius:3px}
#slots{padding:.46rem;border-radius:.55rem;background:#1b382f;box-shadow:inset 0 2px 4px #0c211b}
#slots .filled,#tray button{background:linear-gradient(#fffbed,#e5e1c9);color:#1e4036;border:1px solid #bdbba5;border-bottom:4px solid #a5ab8d;box-shadow:0 2px 2px #142b24}
#slots button:not(.filled){background:#294d40;border-color:#9eae94;color:#d7e2d1}
#tray button{border-radius:.55rem;padding:.4rem .65rem}#tray small{font-size:.85rem}
#slots button.selected,#tray button.selected{outline:3px solid #ffe08b;outline-offset:1px}
.open .door{border-color:#eed08d;background:linear-gradient(145deg,#81977b,#436958);box-shadow:inset 0 0 0 3px #58745c,0 3px 7px #09231a}
.open .dial{transform:rotate(95deg)}.open .latch{transform:translateX(-78%)}#win h2{font:700 1.5rem Georgia,serif}
@media(prefers-reduced-motion:no-preference){
 .dial{transition:transform .42s cubic-bezier(.2,.75,.35,1)}.latch{transition:transform .25s .18s ease-out}
 .controls button:hover,#tray button:hover{filter:brightness(1.04)}
}
@media(max-width:430px){.brand{max-width:9rem;font-size:.88rem}.controls{gap:.25rem}.controls button{padding:.35rem .5rem}.door{padding-inline:.5rem}#slots{padding:.3rem;gap:.2rem}#tray button{padding:.25rem .4rem}}

.playmode{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.playmode button{border:0;text-decoration:underline;text-underline-offset:.18em;padding:.2rem .4rem}.support{flex-wrap:wrap}

.audio-setting{display:inline-grid;justify-items:center;align-content:center;gap:2px;flex-shrink:0}.audio-setting #audio-state{font:700 .78rem/1.2 system-ui;white-space:nowrap}.audio-setting #sound{white-space:nowrap;min-height:32px;padding:3px 9px;font-size:.85rem;line-height:1.2}.audio-setting{padding-block:4px}
