:root{color-scheme:light;font:16px/1.65 system-ui,-apple-system,sans-serif;color:#334b43;background:#f1f2ec;--green:#3c7063;--amber:#a77c39}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button,select{min-height:44px;border:1px solid #b3c4b6;border-radius:12px;background:#f9faf4;color:#36564b;padding:8px 14px}button{cursor:pointer;touch-action:manipulation}button:hover{background:#e7eee1}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ba9250;outline-offset:3px}a{color:#3f6e62}header,main,footer{max-width:1040px;margin:auto;padding:18px 24px}header{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.brand{font-weight:800;letter-spacing:.12em;text-decoration:none;margin-inline-end:auto;font-size:15px}header select{max-width:150px}.intro{display:flex;gap:20px;align-items:center;justify-content:space-between;margin:10px 0 22px}h1{font-family:Georgia,system-ui,serif;font-size:clamp(24px,4vw,36px);line-height:1.2;margin:6px 0}.intro>a{font-size:14px;white-space:nowrap}.eyebrow{font-size:12px;letter-spacing:.1em;color:#78846b;margin:0}.game{overflow:hidden;border:1px solid #becbbd;border-radius:24px;background:#e8ecdf;box-shadow:0 14px 45px #4c62400b}.toolbar,.tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.toolbar{padding:12px 16px;background:#eef1e6}.toolbar label{margin-inline-end:auto}.toolbar select{width:66px;padding:4px}.chapter{display:flex;align-items:center;gap:16px;padding:10px 20px;background:#f5f3e5}.chapter span{font-size:13px;letter-spacing:.1em;color:#947749}.chapter h2{font-size:19px;margin:0;font-weight:650}.board{position:relative;background:#e0e9dd}canvas{width:100%;height:auto;display:block;touch-action:none;outline-offset:-4px!important}#curtain{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#263d3a65;backdrop-filter:blur(7px);z-index:10;padding:18px}#curtain[hidden]{display:none}.card{max-width:440px;background:#faf8ebf5;padding:24px;border:1px solid #fff9e5;border-radius:22px;text-align:center;box-shadow:0 20px 50px #243e3f22}.card h2{font:600 26px/1.3 Georgia,system-ui;margin:12px 0}.card p{font-size:14px}.card button{background:#3e7264;color:#fff8df;padding:10px 26px;border-color:#3e7264}.context{margin:10px 16px;font-size:14px;min-height:24px}.pads{display:flex;gap:12px;padding:0 16px}.pad{width:76px;height:60px;background:#d5e1d2;border-radius:18px;font-size:28px;touch-action:none;user-select:none}.pad.jump{margin-inline-start:auto;background:#e6cea0}.pad.active{background:#a9c6b1}.interact{display:block;width:calc(100% - 32px);margin:10px 16px;background:#466e61;color:#fff8df;min-height:48px}.state-line{margin:8px 16px;font-size:14px;min-height:26px}.tools{padding:8px 16px}.tools button{font-size:14px}#hint-line,#warning{margin:4px 16px 16px;font-size:14px}#hint-line{color:#7d6032}.guide{padding:22px 4px;font-size:14px}.guide h2{font-size:20px}footer{display:flex;gap:20px;flex-wrap:wrap;font-size:13px;border-top:1px solid #d4ddcf;padding-bottom:30px}dialog{color:#334d43;background:#faf8ee;border:1px solid #b5c6b7;border-radius:20px;max-width:min(440px,94vw);max-height:88svh;overflow:auto;padding:22px}dialog::backdrop{background:#253d3c78;backdrop-filter:blur(5px)}dialog label{display:flex;gap:20px;align-items:center;justify-content:space-between;min-height:48px}input[type=checkbox]{width:22px;height:22px;accent-color:#4e7a65}input[type=range]{max-width:170px;min-height:44px;accent-color:#4e7a65}.toy{max-width:780px;margin:auto}.toy .board{height:300px;overflow:hidden;background:radial-gradient(ellipse at 50% 35%,#f3edda,#d6dfca)}#art{position:absolute;inset:-10px 0 -10px;text-align:center}#art svg{height:100%;max-width:100%;filter:drop-shadow(0 10px 10px #395b3c15)}.mechanisms{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;background:#e2e9dc}.object{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;flex-direction:column;min-height:94px;background:linear-gradient(#fffdf1,#eeeede);border-color:#aeba9e;box-shadow:0 4px 0 #b5c2ac;font-size:14px}.object svg{width:38px;height:38px;color:#64806a;flex-shrink:0}.object[data-lit=true]{background:linear-gradient(#f8efd1,#e6d4a2);border-color:#b99a57}.object.selected{outline:3px solid #b48d48}.object small{font-size:12px;color:#627458}.object.main-object{background:linear-gradient(#df9677,#be7059);color:#fff7df;border-color:#a65e47;box-shadow:0 4px 0 #8f5c49}.object.main-object svg{color:#fff1d2}.object input{width:100%;max-width:170px}.object.range-object{padding:8px}.object .slot-note{font-size:11px}.changed-pulse{animation:change .3s ease-out}@keyframes change{50%{filter:brightness(1.12)}}body[data-motion=off] *{animation:none!important;transition:none!important}@media(max-width:600px){header,main,footer{padding:12px}.intro{gap:8px;margin:6px 0 16px}.intro>a{font-size:12px}.game{border-radius:18px}.toolbar{gap:7px;padding:10px}.toolbar button{padding:8px 10px;font-size:14px}.chapter{gap:10px;padding:10px 12px}.chapter h2{font-size:16px}.card{padding:18px}.card h2{font-size:22px}.card p{font-size:13px}.toy .board{height:235px}.mechanisms{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:12px}.object{min-height:90px;flex-direction:row;gap:7px;padding:8px;font-size:13px}.object.range-object{flex-direction:column}.object svg{width:32px;height:32px}.object small{position:absolute;inset-inline-end:8px;top:4px}.object .slot-note{display:none}.pads{padding:0 12px;gap:12px}.pad{height:58px;width:72px}.interact{margin:10px 12px;width:calc(100% - 24px)}.tools{padding:8px 12px}.tools button{padding:8px 10px}.guide .tools{padding:0}.context,.state-line{margin-inline:12px}}@media(max-height:600px){#curtain{position:fixed;z-index:40}.platform .board{max-height:70svh;overflow:hidden}.platform canvas{height:70svh;width:auto;max-width:100%;margin:auto;object-fit:contain}.toy .board{height:210px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}
