:root{color-scheme:light;--ink:#233d35;--muted:#50695d;--green:#19734f;--line:#dce6db;--paper:#f8f6ee;font-family:"Hiragino Maru Gothic ProN","Yu Gothic UI",Meiryo,system-ui,sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}
body{margin:0;min-width:280px;background:radial-gradient(ellipse at 50% 8%,#fffefa 0%,transparent 66%)}
button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation}
button:focus-visible,canvas:focus-visible{outline:3px solid #1759aa;outline-offset:3px}
[hidden]{display:none!important}
#startup,.load-message{margin:12px auto;text-align:center;font-weight:800;color:var(--muted)}
body:has(noscript .load-message) #startup{display:none}
.wrap{width:min(1050px,calc(100% - 48px));margin:auto}
.top{border-bottom:1px solid #e9e5d6;background:#fffdf6}
.top-inner{height:64px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.brand{font-weight:900;letter-spacing:.04em;font-size:17px;display:flex;align-items:center;gap:9px}
.brand span{display:grid;place-items:center;background:#e0efdf;color:var(--green);border-radius:10px;width:33px;height:33px;font-size:22px}
.score{font-size:13px;font-weight:850;background:#fff0c1;border:1px solid #f7e2a2;border-radius:32px;padding:6px 12px;white-space:nowrap}
.score span:first-child{color:#96620b;font-size:15px}
main{padding-bottom:36px}
.intro{position:relative;text-align:center;padding:28px 12px 22px}
h1{margin:0;font-size:clamp(26px,5vw,50px);font-weight:950;line-height:1.25;letter-spacing:.035em}
h1 em{color:var(--green);font-style:normal}
.intro p{margin:12px 0 0;font-weight:750;font-size:clamp(13px,2vw,17px);color:var(--muted)}
.spark{position:absolute;font-size:30px;line-height:1;color:#b9691e;pointer-events:none}
.spark.left{left:7%;top:40%;color:#488768}.spark.right{right:7%;top:30%}
nav{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px;max-width:660px;margin:0 auto 20px}
nav button{border:1px solid #dfe7da;border-radius:13px;background:#fffef9;font-size:17px;font-weight:850;height:43px;position:relative;box-shadow:0 2px 0 #e8ebdf}
nav button:hover{background:#edf6ea}
nav button[data-done="true"]::after{content:"✓";position:absolute;font-size:10px;top:2px;right:4px;color:#24754b}
nav button[aria-current="step"]{background:var(--green);border-color:var(--green);color:white;box-shadow:0 3px 0 #125e40}
nav button[aria-current="step"]::after{color:#fff0a8}
.game{background:#fffefa;border:1px solid #e9e7dc;border-radius:26px;padding:16px 18px 13px;box-shadow:0 8px 30px #48452910}
.stage-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 1px 12px}
.stage-name{display:flex;align-items:center;gap:10px;min-width:0}
#stage-icon{display:grid;place-items:center;background:#e6f2e4;border-radius:13px;min-width:45px;height:45px;font:25px "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
#stage-number{font-size:10px;color:var(--green);font-weight:900;margin:0 0 1px;letter-spacing:.1em}
h2{font-size:clamp(15px,2.4vw,22px);line-height:1.2;margin:0;overflow-wrap:anywhere}
.counter{display:flex;align-items:center;gap:8px;white-space:nowrap}
#dots{display:flex;gap:4px}
#dots span{display:block;width:9px;height:9px;border-radius:50%;background:#dbe9db}
#dots .found{background:var(--green)}
#counter{font-size:15px;color:var(--green)}
.panels{display:grid;grid-template-columns:1fr 1fr;gap:12px}
figure{margin:0;position:relative;min-width:0}
figcaption{position:absolute;left:9px;top:9px;z-index:1;pointer-events:none;background:#fffef4eb;border-radius:25px;padding:4px 9px 4px 4px;display:flex;align-items:center;gap:5px;font-size:11px;font-weight:850;color:#29463b}
figcaption span{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#dcefe5}
figure+figure figcaption span{background:#ffe7bb}
canvas{display:block;width:100%;height:auto;aspect-ratio:20/13;border-radius:16px;cursor:crosshair;touch-action:manipulation;background:#d2eddb}
.game-foot{display:flex;min-height:53px;padding-top:9px;align-items:center;gap:10px}
.game-foot button{min-height:43px;border:1px solid #e9d89d;background:#fff1c3;border-radius:12px;padding:7px 12px;font-size:13px;font-weight:850;white-space:nowrap}
.game-foot button:disabled{opacity:.58;cursor:default}
#message{margin:0;flex:1;text-align:center;font-size:clamp(12px,2vw,15px);font-weight:800}
#next{background:var(--green);border-color:var(--green);color:white}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:700px){.wrap{width:calc(100% - 26px)}.spark{display:none}.top-inner{height:51px}.intro{padding:19px 0 15px}.intro p{margin-top:8px}.game{padding:11px 9px 9px;border-radius:18px}.panels{gap:8px}}
@media(max-width:560px) and (orientation:portrait){
  .top-inner{height:43px}.brand span{width:27px;height:27px}
  .intro{padding:12px 0 10px}.intro p{margin-top:5px;font-size:12px}
  .panels{grid-template-columns:1fr}.game{max-width:470px;margin:auto}
  nav{max-width:470px;gap:4px;margin-bottom:10px}nav button{font-size:14px;border-radius:9px;height:40px}
  .stage-head{margin-bottom:7px}#stage-icon{min-width:37px;height:37px;font-size:21px}
  #dots span{width:7px;height:7px}canvas{border-radius:12px;aspect-ratio:auto}
  figcaption{left:6px;top:6px}.game-foot{flex-wrap:wrap}.game-foot #next{margin-left:auto}
}
@media(max-width:350px){#dots{display:none}.game-foot{gap:6px}.game-foot button{padding:6px 7px}}
