:root{--plum:#58233f;--rose:#a95872;--cream:#fff9f1;--line:#d8af9c}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--cream);color:var(--plum);font:17px/1.4 Georgia,serif}.shape-game{max-width:1040px;margin:auto;padding:12px 16px 22px}.game-header{text-align:center}.top-controls{display:flex;justify-content:space-between;align-items:center}.back{text-decoration:none;display:inline-flex;align-items:center;min-height:44px;padding:6px 12px;color:var(--plum)}button{font:inherit;color:var(--plum);cursor:pointer;border:1px solid var(--line);border-radius:22px;background:#fff1e5;padding:9px 18px;min-height:44px}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #8550ad;outline-offset:4px}h1{font-size:clamp(28px,4vw,46px);line-height:1.1;margin:2px 0 6px}.game-header p{font-size:clamp(15px,2vw,21px);margin:0 0 10px}.scene{position:relative;max-width:820px;width:100%;aspect-ratio:3/2;margin:0 auto;overflow:hidden;border-radius:22px}.scene-art{display:block;width:100%;height:100%;object-fit:contain}.sockets{position:absolute;left:65%;top:33%;width:25%;height:37%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:7px}.socket{border:0;background:transparent;padding:3px;border-radius:12px;min-width:44px;min-height:44px;box-shadow:none}.socket svg{display:block;width:100%;height:100%;filter:drop-shadow(0 -1px 1px #44291080)}.socket.filled svg{filter:drop-shadow(0 0 8px #ffdb6f)}.earned-jewel{position:absolute;left:25%;top:72%;width:11%;aspect-ratio:1;min-width:48px;min-height:48px;border:0;background:none;padding:0;touch-action:none;cursor:grab;filter:drop-shadow(0 0 9px #ffe299);animation:jewel-ready 1.4s ease-in-out infinite alternate}.earned-jewel svg,.jewel-ghost svg{width:100%;height:100%;display:block}.earned-jewel.held{outline:3px dashed #fff2a9}.jewel-ghost{position:fixed;z-index:20;width:74px;height:74px;transform:translate(-50%,-50%);pointer-events:none;background:none;border:0;padding:0;filter:drop-shadow(0 4px 4px #57382370)}.clue-card{max-width:820px;margin:4px auto 0;border:2px solid #d7ae9d;border-radius:25px;padding:15px 20px;background:linear-gradient(135deg,#fffaf1,#fff3e3)}.clue-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.clue-heading h2{font-size:clamp(21px,2.7vw,30px);margin:0;line-height:1.15}.clue-heading button{font-size:16px;white-space:nowrap;padding:7px 14px}#question{font-size:clamp(23px,3vw,34px);font-weight:600;text-align:center;line-height:1.2;margin:12px auto 16px;max-width:690px}.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:580px;margin:auto}.shape-choice{height:106px;border:2px solid #cba37b;border-radius:22px;background:radial-gradient(ellipse,#fffdf6,#ffefd5);box-shadow:0 3px 0 #e7cdb0;padding:10px;transition:transform .12s}.shape-choice:hover{transform:translateY(-2px)}.shape-choice svg{display:block;width:100%;height:100%}#instruction{text-align:center;margin:14px 0 10px;font-size:17px;min-height:24px}.primary{display:block;margin:16px auto;background:var(--rose);color:#fff9f1;border-color:var(--rose);padding:12px 25px;font-size:21px}.progress-box{max-width:380px;margin:14px auto 0;border:1px solid #dfb99e;border-radius:22px;background:#fff8ed;padding:8px 15px;text-align:center}#jewel-progress{display:flex;justify-content:center;gap:16px}.progress-jewel{width:36px;height:36px;opacity:.35}.progress-jewel.earned{opacity:1}.progress-jewel svg{width:100%;height:100%}#progress{font-size:16px;margin:5px 0 0}footer{text-align:center;padding:8px 4px 0}#status{font-size:17px;min-height:24px;margin:8px auto;max-width:780px}#drag-help{font-size:15px;margin:8px 0}#restart{min-height:44px;padding:8px 24px}.reveal{position:absolute;inset:0;background:var(--cream);animation:room-reveal .8s ease}.reveal img{width:100%;height:100%;object-fit:cover}.reveal-label{position:absolute;bottom:4%;left:9%;right:9%;padding:10px;background:#fff7e3ed;border-radius:18px;text-align:center;font-size:clamp(22px,3vw,34px)}.scene.unlocked .sockets{filter:drop-shadow(0 0 13px #ffd751)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@keyframes jewel-ready{from{filter:drop-shadow(0 0 4px #ffdf6a)}to{filter:drop-shadow(0 0 12px #ffdf6a)}}@keyframes room-reveal{from{opacity:0}to{opacity:1}}
@media(min-width:850px) and (orientation:landscape){.scene{max-width:650px}.shape-game{padding-top:8px}.top-controls{margin-bottom:-18px}.clue-card{padding:12px 20px}.shape-choice{height:88px}.progress-box{margin-top:10px}#question{margin:8px auto 12px}}
@media(max-width:550px){.shape-game{padding:8px 10px 16px}h1{font-size:28px;margin:7px 0}.top-controls button,.back{font-size:14px;padding:7px 12px}.game-header p{font-size:15px;max-width:350px;margin:0 auto 8px}.scene{border-radius:13px}.sockets{left:64%;width:28%;top:32%;height:39%;gap:2px}.socket{padding:1px}.earned-jewel{left:24%;top:71%;width:13%}.clue-card{padding:12px 12px;border-radius:22px}.clue-heading{gap:6px}.clue-heading h2{font-size:21px}.clue-heading button{font-size:14px;padding:6px 10px}#question{font-size:25px;margin:12px 0 14px}.choices{gap:8px}.shape-choice{height:90px;padding:12px;border-radius:18px}#instruction{font-size:15px;margin:12px 0 8px}.progress-box{max-width:280px;padding:7px 10px;margin-top:10px}.progress-jewel{width:29px;height:29px}#jewel-progress{gap:13px}#progress{font-size:14px}#status{font-size:15px;margin:6px 0}#drag-help{font-size:13px}.primary{font-size:19px}}
@media(prefers-reduced-motion:reduce){.earned-jewel,.reveal{animation:none}.shape-choice{transition:none}}
.earned-jewel{top:66%}@media(max-width:550px){.earned-jewel{top:65%}}

#skip-intro{display:block;margin:12px auto}
