*{box-sizing:border-box} :root{color-scheme:dark;font-family:"Yu Gothic",Meiryo,sans-serif;color:#fff1cf;background:#221b2b} body{margin:0;background:radial-gradient(ellipse at 50% 0,#624354 0,#302436 52%,#211b2b 100%);min-height:100vh}button,summary{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,summary:focus-visible{outline:3px solid #ffeb84;outline-offset:4px}button:disabled{cursor:default;opacity:.38}button[hidden]{display:none}main{max-width:820px;margin:auto;padding:22px 30px calc(22px + env(safe-area-inset-bottom))}header{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 20px}h1{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:34px;font-weight:700;letter-spacing:.08em;margin:0}h1 span{color:#f2c86e;margin-left:.15em}.eyebrow{font-size:11px;letter-spacing:.25em;margin:0 0 6px;color:#d2b9b2}.setting{border:1px solid #a17e78;border-radius:50%;width:60px;height:60px;color:#fae6bd;background:#352731;font-size:12px;flex-shrink:0}.shop{position:relative;background:#31242d;border:1px solid #735345;box-shadow:0 18px 45px #0005;overflow:hidden}.shop:before{content:"";position:absolute;inset:0;background-image:linear-gradient(#281b3299,#261e2aa8),url('shop-background.webp');background-size:cover;background-position:center;opacity:.9;pointer-events:none}.shop-inner{position:relative;padding:24px 26px 0}.objective{text-align:center}.objective p{margin:0}#stage-title{font-size:12px;letter-spacing:.15em;color:#e5c282}h2{font-family:"Yu Mincho",serif;font-size:25px;margin:9px 0 7px;font-weight:600}#instruction{font-size:13px;color:#decdbf;min-height:1.5em;line-height:1.6}.scene{position:relative;max-width:540px;aspect-ratio:480/400;margin:0 auto;isolation:isolate}#board{width:100%;height:100%;display:block;overflow:visible}.pieces{position:absolute;inset:0}.piece{position:absolute;width:19.167%;height:23%;border:0;padding:0;background:transparent;transition:filter .1s;z-index:2;color:inherit;-webkit-tap-highlight-color:transparent}.piece svg{display:block;width:100%;height:100%;overflow:visible}.piece:hover{filter:brightness(1.15)}.piece:active{filter:brightness(1.3)}.piece:focus-visible{outline:2px dashed #ffe48b;outline-offset:-2px;border-radius:12px}.readout{display:flex;justify-content:space-between;gap:10px;color:#e1cdb8;font-size:13px;border-top:1px solid #91654f66;padding:13px 0}.action-row{display:flex;gap:12px}.flow{background:#f2ca70;color:#3d2529;font-weight:bold;flex:1;border:0;box-shadow:0 4px 0 #a66a3a;min-height:52px;border-radius:3px;font-size:19px}.flow span{font-size:27px;vertical-align:-2px}.flow:hover{background:#ffdc8b}.secondary{border:1px solid #ad8c6b;background:#31242d;color:#efdab5;min-height:52px;padding:0 20px;border-radius:3px}.feedback{min-height:94px;display:flex;align-items:center;justify-content:center;gap:14px;text-align:center;padding:16px 0}.feedback p{font-size:14px;line-height:1.6;margin:0}.feedback #next{border:1px solid #f2ca70;background:#f2ca70;color:#3d2529;min-height:44px;padding:8px 14px;white-space:nowrap;border-radius:3px}.feedback.success #status{color:#ffdf8c}nav{display:flex;margin:21px 0 13px;gap:0;border-bottom:1px solid #8c6b65}nav button{flex:1;color:#e4d0c2;border:0;background:transparent;min-height:56px;line-height:1.5;border-bottom:3px solid transparent;padding:6px 8px;font-size:13px}nav button[aria-current=true]{color:#ffdf8c;border-color:#f2ca70}nav .record{display:block;color:#baaaad;font-size:11px}nav button[aria-current=true] .record{color:#dcc385}.foot-controls{display:flex;justify-content:space-between;gap:5px}.foot-controls button{background:transparent;color:#d4bdaf;border:0;font-size:12px;min-height:44px;padding:4px 0}details{margin:12px 0 0;font-size:12px;color:#c9b4b0;line-height:1.8}summary{cursor:pointer;min-height:40px;padding:7px 0}details p{margin:10px 0}footer{font-family:serif;text-align:center;letter-spacing:.13em;color:#957c7b;font-size:12px;padding:22px 0 0}footer small{font-size:10px}.lit-glow{filter:drop-shadow(0 0 9px #ffd46c)}.spark{filter:drop-shadow(0 0 4px #fff1b2)}.lamp-light{transition:opacity .2s}@media(min-width:760px){main{padding-top:26px}.shop-inner{padding:25px 65px 0}.scene{max-width:480px}header{margin-bottom:18px}.feedback{min-height:82px}nav{margin-top:17px}}@media(max-width:500px){main{padding:15px 12px 22px}header{margin-bottom:16px}h1{font-size:28px}.setting{width:49px;height:49px;font-size:11px}.shop-inner{padding:20px 9px 0}h2{font-size:21px;margin-top:8px}#instruction{font-size:12px;min-height:3.2em;max-width:280px;margin:auto}.scene{margin-top:-8px}.secondary{padding:0 14px;font-size:13px}.flow{font-size:17px;min-height:49px}.readout{font-size:12px;padding:12px 3px}.feedback{min-height:92px;gap:8px;padding:14px 2px}.feedback p{font-size:12px}.feedback #next{font-size:12px;padding:8px 10px}nav{margin-top:15px}nav button{font-size:12px;padding:7px 2px}.foot-controls button{font-size:11px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}body.reduced *{transition:none!important}

@media(min-width:760px){main{padding-top:16px}header{margin-bottom:12px}h1{font-size:30px}.shop-inner{padding:18px 55px 0}.scene{max-width:380px}.feedback{min-height:66px}h2{font-size:23px}.objective #instruction{min-height:1.5em}nav{margin-top:12px}}

.setting{padding:0;white-space:nowrap}

@media(max-width:500px){.scene{max-width:345px}}
