@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Manrope:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#171a18;--ink:#e7e5da;--muted:#91968c;--gold:#c6a770;--line:#ffffff16}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 45%,#30362c55,transparent 65%),var(--bg);color:var(--ink);font-family:Manrope,Arial,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,[role=button]:focus-visible{outline:2px solid #e6c68b;outline-offset:5px}header{height:91px;max-width:1440px;margin:auto;padding:0 5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:14px;text-decoration:none;color:var(--ink);font-size:12px;font-weight:700;letter-spacing:2px}.emblem{font-size:31px;color:var(--gold);font-weight:400}.edition,.stage,.small-label,.eyebrow,footer,.board-top{font-size:10px;letter-spacing:2px}.edition{color:var(--muted)}.stage{border-left:1px solid var(--line);padding-left:30px;color:var(--muted)}.stage b{margin-left:10px;color:var(--gold);font-size:16px}main{max-width:1400px;margin:auto;padding:0 5%}.intro{text-align:center;padding:47px 0 34px}.eyebrow{color:var(--gold);display:flex;align-items:center;justify-content:center;gap:10px}.eyebrow span{width:5px;height:5px;background:var(--gold);border-radius:50%}h1{font:500 clamp(38px,4.1vw,60px)/1.04 'Cormorant Garamond',Georgia,serif;margin:21px 0 17px;letter-spacing:-1.5px}h1 em{color:var(--gold);font-weight:400}.intro>p{font-size:12px;line-height:1.9;color:var(--muted)}.workspace{display:grid;grid-template-columns:1fr minmax(340px,510px) 1fr;align-items:center;gap:55px}.instructions{max-width:235px}.small-label{color:var(--muted);font-size:9px;line-height:2}.instructions h2{font:400 33px/1.1 'Cormorant Garamond',Georgia,serif;margin:15px 0 25px}ol{padding:0;list-style:none;counter-reset:steps}li{counter-increment:steps;position:relative;padding:0 0 18px 29px;font-size:11px;color:#afb3aa;line-height:1.8}li:before{content:'0' counter(steps);position:absolute;left:0;top:1px;color:var(--gold);font-size:9px}.tip{display:flex;gap:13px;border-top:1px solid var(--line);padding-top:15px;color:var(--gold)}.tip p{margin:0;color:var(--muted);font-size:10px;line-height:1.8}.difficulty{display:flex;gap:12px;align-items:center;font-size:10px;color:var(--gold);margin-top:30px}.difficulty span{font-size:8px;letter-spacing:1px;color:var(--muted)}.game{background:#222620;border:1px solid #777d5d50;padding:15px 17px 0;box-shadow:0 22px 60px #0004;border-radius:7px}.board-top{display:flex;justify-content:space-between;color:#999c8f;font-size:8px;margin:0 0 13px}.board{position:relative;border:7px solid #272720;border-radius:4px;background:repeating-linear-gradient(2deg,transparent 0 7px,#00000012 8px,#ffffff03 9px,transparent 11px),linear-gradient(100deg,#393729,#4c4632 45%,#373629);box-shadow:inset 0 0 50px #0009}svg{display:block;width:100%;height:auto}.plate{filter:drop-shadow(0 6px 3px #0008)}.screw{cursor:pointer}.screw:hover .head{filter:brightness(1.25)}.screw[aria-disabled=true]{cursor:not-allowed}.screw.hint .head{stroke:#fff0a1;stroke-width:5;filter:drop-shadow(0 0 8px #ffe2a1)}.tray-area{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:17px 5px 4px}.tray{display:flex;gap:10px}.slot{height:37px;width:37px;border:1px dashed #656a5660;border-radius:50%;background:#181c17;display:grid;place-items:center}.mini-screw{width:25px;height:25px;border:3px solid #ffffff40;border-radius:50%;background:var(--screw-color);box-shadow:0 3px 5px #0008;display:grid;place-items:center;color:#191c17;font-size:22px;line-height:1}.tray-area>span:last-child{font-size:10px;color:var(--muted)}#status{text-align:center;min-height:29px;font-size:10px;color:#b9bcae;line-height:1.5;margin:10px 0}.controls{border-top:1px solid var(--line);display:flex;justify-content:space-around}.controls button{background:none;border:0;color:#c6c9bd;padding:15px 5px;font-size:16px}.controls button span{font-size:10px;margin-left:5px}.controls button:hover{color:var(--gold)}.controls button:disabled{opacity:.3;cursor:default}.evidence{text-align:center;color:var(--muted)}.seal{width:52px;height:65px;border:1px solid #c6a77055;border-radius:50%;display:grid;place-items:center;margin:0 auto 30px;font:italic 30px Georgia;color:var(--gold);transform:rotate(-8deg)}.evidence>p{font:italic 25px/1.45 'Cormorant Garamond',Georgia,serif;color:#b9b9a9}.rule{height:1px;width:40px;background:#c6a77055;margin:25px auto}footer{display:flex;justify-content:space-between;color:#737b6e;border-top:1px solid var(--line);padding:24px 0;margin-top:43px;font-size:8px}.success{position:absolute;inset:0;background:#20251ded;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:20px}.success[hidden]{display:none}.success>span{font-size:45px;color:var(--gold)}.success h2{font:38px Georgia;margin:15px 0}.success p{font-size:12px;color:var(--muted)}.primary{background:var(--gold);border:0;border-radius:3px;padding:14px 20px;margin-top:15px;color:#24271d;font-size:12px}dialog{padding:20px;border:0;background:transparent;max-width:620px;width:95%;max-height:95dvh;color:#433323;overflow:auto}dialog::backdrop{background:#0a100de8;backdrop-filter:blur(7px)}.paper{background:radial-gradient(ellipse at 10% 35%,#8c5d2935,transparent 40%),radial-gradient(ellipse at 100% 90%,#80501f55,transparent 60%),repeating-linear-gradient(7deg,#0000 0 3px,#80501f05 4px),#d5bb87;padding:50px 45px 30px;clip-path:polygon(1% 1%,12% 0,23% 1%,40% 0,62% 1%,83% 0,99% 2%,98% 20%,100% 35%,99% 57%,100% 78%,98% 99%,77% 98%,61% 100%,44% 98%,28% 100%,1% 98%,2% 79%,0 62%,1% 40%,0 22%);box-shadow:inset 0 0 70px #633b2580;transform:rotate(-1deg)}.paper-label{font:9px Manrope,Arial;letter-spacing:3px;opacity:.65}.paper h2{font:italic 36px 'Cormorant Garamond',Georgia,serif}.paper #note-text{white-space:pre-wrap;font:20px/1.55 'Cormorant Garamond',Georgia,serif}.paper #note-signature{text-align:right;font:italic 20px Georgia;margin-top:30px}.paper-mark{display:block;text-align:center;margin-top:25px;font-size:25px}.close{position:absolute;top:23px;right:30px;background:none;border:0;color:#433323;z-index:2;font-size:28px}.plate{animation:appear .4s ease}.screw{transition:opacity .2s}@keyframes appear{from{opacity:0}to{opacity:1}}@media(max-width:1100px){.workspace{gap:25px;grid-template-columns:1fr minmax(340px,480px)}.evidence{display:none}.instructions{max-width:230px;justify-self:center}.edition{display:none}}@media(max-width:650px){header{height:70px}.brand{font-size:9px;letter-spacing:1px}.stage{padding-left:15px}.intro{padding:30px 0 20px}.intro>p{font-size:11px}.workspace{display:flex;flex-direction:column;gap:24px}.game{width:100%;max-width:480px;order:0;padding:12px 10px 0}.instructions{order:1;max-width:480px;width:100%}.instructions h2{font-size:27px;margin:10px 0}.instructions h2 br{display:none}ol{display:grid;gap:10px;grid-template-columns:repeat(3,1fr)}li{font-size:10px;padding:20px 0 0}li:before{top:0}.difficulty{margin-top:15px}.tray-area .small-label{font-size:7px;letter-spacing:1px}footer{font-size:7px;gap:20px;margin-top:25px;line-height:1.7}.paper{padding:40px 25px 25px}.paper #note-text{font-size:19px}.desktop{display:none}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Animate only the part that changes, never the entire board on each move. */
.plate{animation:none}.board{overflow:hidden}.screw{transform-box:fill-box;transform-origin:center;outline:none}.screw:focus-visible .head{stroke:#ffe2a1;stroke-width:4}.waiting .plate{filter:drop-shadow(0 4px 4px #0009)}[data-plate]{transform-box:view-box;transform-origin:240px 220px}.mini-screw{animation:tray-in .24s ease-out}.success{animation:reveal .55s ease both}dialog[open]{animation:reveal .45s ease both}.controls button:disabled{cursor:default;opacity:.3}@keyframes tray-in{from{transform:scale(.65);opacity:0}to{transform:scale(1);opacity:1}}@keyframes reveal{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}@media(max-width:650px){.controls button span{font-size:9px;margin-left:3px}.controls button{font-size:14px}}
/* Physical transforms come from the simulation, not a falling keyframe. */
.plate{transform-box:view-box;transform-origin:0 0;transition:none!important}.socket{cursor:default}.socket.available{cursor:pointer}.socket.available>circle:first-child{stroke:#e8c67d;stroke-width:3;filter:drop-shadow(0 0 5px #e7c27366)}.socket.available:hover>circle:first-child,.socket:focus-visible>circle:first-child{stroke:#fff3c4;stroke-width:4}.socket.hint>circle:first-child{stroke:#fff5a1;stroke-width:5;filter:drop-shadow(0 0 8px #ffdc77)}.socket:focus-visible{outline:none}.tray .slot{padding:0;flex-shrink:0}.tray .slot.selected{border:2px solid #e8c67d;box-shadow:0 0 12px #e8c67d33}.tray .slot:disabled{cursor:default}.tray .slot:not(:disabled):hover{background:#3d4231}.screw[aria-disabled=true]{pointer-events:none}.instructions li{padding-bottom:14px}.screw.hint .head{stroke:#fff0a1;stroke-width:5}

.screw.selected .head{stroke:#ffe5a0;stroke-width:4;filter:drop-shadow(0 0 7px #f5c969)}

#puzzle-sound{border:1px solid #9e9a7455;border-radius:3px;background:transparent;color:#c9c9b5;padding:5px 8px;font:inherit;letter-spacing:.03em;cursor:pointer}#puzzle-sound:hover,#puzzle-sound:focus-visible{border-color:#e8c67d;color:#e8c67d}.board-top{gap:8px;align-items:center}
