:root{color-scheme:light;--ink:#372e24;--cream:#fffaf0;--edge:#d5b98d;--accent:#305e49;--tint:#e9f0d9}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:linear-gradient(145deg,#f5ecd9,#f1f2df);font:16px/1.43 Arial,sans-serif}body[data-game=theater]{--accent:#7a3a38;--tint:#fae3d6;background:linear-gradient(135deg,#f5dfcc,#f4e9df)}body[data-game=scarf]{--accent:#6e3d51;--tint:#f3e2e3;background:linear-gradient(135deg,#e0f0e9,#f4e5d9)}
main{max-width:790px;margin:auto;padding:clamp(8px,2vw,18px)}[hidden]{display:none!important}h1,h2,p{margin:0}
h1,h2,#round{font-family:Georgia,serif}h1{font-size:clamp(1.45rem,4vw,2.1rem);color:var(--accent);line-height:1.12}h2{font-size:clamp(1.1rem,3vw,1.4rem);line-height:1.27;max-width:38em;margin:10px 0 6px}.hero,.table{background:var(--cream);border:1px solid var(--edge);border-radius:17px}
.hero{display:flex;align-items:center;gap:13px;padding:8px 12px 8px 8px}.hero img{width:clamp(60px,13vw,90px);height:auto;border-radius:12px}.hero p{margin-top:4px;font-size:.94rem}
button,footer a{font:600 .94rem/1.2 Arial,sans-serif;color:var(--ink)}button{cursor:pointer;border:1px solid var(--edge);background:#fffcf5;border-radius:10px;padding:8px 14px;min-height:44px}button:enabled:hover{background:var(--tint)}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:2px}button:disabled{opacity:.65;cursor:default}button.primary{background:var(--accent);color:white;border-color:var(--accent)}button.primary:enabled:hover{filter:brightness(.88);background:var(--accent)}
.tools,.answers,.support,.ending,footer{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.tools{justify-content:flex-end;margin:5px 0}.table{padding:clamp(12px,3vw,23px);box-shadow:0 5px 18px #62492512}.progress{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--accent)}#beads{display:inline-flex;gap:4px}#beads i{width:11px;height:11px;border:1px solid var(--accent);border-radius:50%}#beads i.ready{background:var(--accent)}#beads i.here{outline:1px solid var(--accent);outline-offset:1px}
#hear{font-size:.88rem;background:var(--tint);margin-bottom:8px}.answers,.support,.ending{justify-content:center}#status{margin:10px 0 4px;color:var(--accent);font-weight:700;text-align:center}.board-note{text-align:center;margin:6px 0;font-size:.92rem}footer{justify-content:space-between;margin:8px 0}footer a{color:var(--accent)}
#canopy{width:min(100%,335px);margin:1px auto 0;padding:9px;display:grid;grid-template-columns:repeat(3,1fr);gap:5px;border:2px solid #697b46;border-radius:20px;background:linear-gradient(150deg,#c4deaf,#f0d29b);box-shadow:inset 0 0 20px #728e4825}
.branch{position:relative;display:grid;place-items:center;aspect-ratio:1.38;border-radius:12px;border:1px solid #8eab6c;background:linear-gradient(155deg,#f7f6c9,#c7de9e)}.branch::before{content:"";width:35%;height:53%;border-radius:85% 0 85% 0;background:linear-gradient(130deg,#89ab53 47%,#648442 48% 51%,#81a24b 52%);transform:rotate(16deg)}.branch.start{outline:2px dashed #5a703e;outline-offset:-4px}.branch.found{background:#ffde70}.branch.found::before{background:#b87813}.visitor{position:absolute;width:70%;height:89%;object-fit:cover;border:2px solid white;border-radius:44%;box-shadow:0 2px 6px #62442070}.branch.found .visitor{width:56%;height:75%;left:4%}.branch.found::before{position:absolute;right:5%;z-index:1}
.arrows{margin:6px auto 9px;display:flex;justify-content:center;gap:5px}.arrows button{font:700 1.45rem/1 Arial;padding:6px 12px;min-width:45px;color:#244f37}
.stage{background:radial-gradient(ellipse at top,#fff1cb,#cf8b6b);border-radius:16px;margin:4px auto 8px;padding:7px;max-width:420px;display:grid;place-items:center;border:1px solid #d9a78d}.portrait{position:relative;aspect-ratio:1;width:min(75%,240px);overflow:hidden;border-radius:12px;background:#eea477}.portrait img{position:absolute;width:100%;height:100%;inset:0}.portrait.play #pose{animation:gesture 1.65s ease-in-out 3 both}.portrait #pose{opacity:1}
@keyframes gesture{0%,14%{opacity:0}39%,76%{opacity:1}100%{opacity:1}}
@media(prefers-reduced-motion:reduce){.portrait.play #pose{animation:none}}
.gesture-choices,.swatches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px auto 0;max-width:510px}.gesture-choices button,.swatches button{min-width:0;padding:8px 4px}.gesture-choices img{display:block;height:auto;width:100%;max-width:110px;aspect-ratio:1;border-radius:8px;margin:0 auto 5px}.picked{outline:3px solid var(--accent);outline-offset:-3px}
.workbench{background:repeating-linear-gradient(2deg,#f0d5ac 0 21px,#e9c99d 22px 24px,#f0d5ac 25px 43px);padding:38px 11px;border-radius:14px;border:1px solid #d6b78f;margin:6px auto}.scarf-band{display:flex;align-items:stretch;height:clamp(52px,12vw,86px);position:relative;margin:0 4px;filter:drop-shadow(0 4px 2px #62452f44)}.scarf-band::before,.scarf-band::after{content:'';position:absolute;top:8%;bottom:8%;width:5px;background:repeating-linear-gradient(to bottom,#895b51 0 3px,transparent 3px 6px)}.scarf-band::before{left:-5px}.scarf-band::after{right:-5px}.patch{position:relative;display:grid;place-items:center;min-width:0;flex:1;border-top:3px solid #65403969;border-bottom:3px solid #65403969;box-shadow:inset -1px 0 #62474644}
.stripe{background:repeating-linear-gradient(45deg,#286f6b 0 6px,#84c6b7 6px 10px)}.dot{background-color:#893d57;background-image:radial-gradient(#ffced8 21%,transparent 24%);background-size:13px 13px}.diamond{background-color:#e1b555;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='%23875419' d='M7 1 12 7 7 13 2 7Z'/%3E%3C/svg%3E");background-size:13px 13px}
.patch.gap{border:1px dashed #89705b;background:#fff1d9;color:#69513c;font:bold 1.22rem Georgia,serif}.patch.current{background:#fff9ef;outline:3px solid #4c4a3d;outline-offset:-3px}.swatches i{display:block;height:32px;width:80%;margin:0 auto 5px;border-radius:6px}.swatches button{line-height:1.15}
@media(max-width:420px){main{padding:6px}.hero{gap:7px}.hero p{font-size:.83rem}.table{padding:11px}.gesture-choices,.swatches{gap:4px}button{padding:7px 10px}.support button{font-size:.83rem}.arrows button{padding:6px 11px}}

#fitting{position:relative;isolation:isolate;width:min(100%,245px);margin:0 auto 12px;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px #613f2738}
#fitting img{display:block;width:100%;height:auto}
.neck-wrap,.scarf-tail{position:absolute;display:flex;overflow:hidden;border:1px solid #6a483a;box-shadow:0 2px 3px #5935266e}
.neck-wrap{left:39.6%;top:61.6%;width:21.7%;height:7.3%;border-radius:29% 32% 42% 39%;transform:rotate(-2deg)}
.scarf-tail{flex-direction:column;left:51%;top:66%;width:8.1%;height:22%;border-radius:12% 14% 18% 17%;transform:rotate(-9deg);transform-origin:top}
.neck-wrap i,.scarf-tail i{flex:1;min-width:0;min-height:0}.neck-wrap .dot,.neck-wrap .diamond,.scarf-tail .dot,.scarf-tail .diamond{background-size:6px 6px}
.workbench:has(#fitting:not([hidden])){padding:10px 11px}.workbench:has(#fitting:not([hidden])) .scarf-band{height:30px}
