:root{font-family:"Noto Sans JP",-apple-system,BlinkMacSystemFont,sans-serif;color:#2a2328;background:#fff;font-size:14px;color-scheme:light}*{box-sizing:border-box}body{margin:0}button,input,summary{font:inherit}button{min-height:44px;border:0;border-radius:8px;padding:10px 12px;background:#f3f4f6;color:#2a2328;font-weight:650;touch-action:manipulation}button:disabled{opacity:.42}button:focus-visible,summary:focus-visible{outline:3px solid #bc6388;outline-offset:3px}.primary{background:#9e4269;color:white}main{max-width:480px;margin:auto;padding:4px 12px calc(16px + env(safe-area-inset-bottom))}.partner{display:flex;align-items:center;gap:10px;min-height:64px;margin:0 0 6px}.partner>img{object-fit:contain;flex:none;border-radius:10px;background:#f6f3f4}.partner strong{font-size:12px}.partner p{margin:3px 0;font-size:13px;line-height:1.45}.cover{display:block;width:min(48vw,180px);height:auto;border-radius:12px;margin:6px auto 10px}#home h1{text-align:center;font-size:21px;margin:8px 0}#home>p{text-align:center;margin:8px 0;line-height:1.65}#cast-picker{justify-content:center}#continue{display:block;width:100%;margin:8px 0}.levels{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}.levels button{padding:8px 2px;min-height:64px;font-size:16px}.levels small{display:block;font-size:11px;letter-spacing:1px;color:#9e4269;margin-top:2px}.help{font-size:13px;margin-top:12px;line-height:1.7}.help summary{padding:12px 0;min-height:44px}.help p{margin:8px 0}.motion{display:flex;align-items:center;gap:6px;min-height:44px;font-size:12px}.motion input{width:18px;height:18px;accent-color:#9e4269}.hud{display:flex;align-items:center;justify-content:space-between;font-size:12px;min-height:32px;gap:6px}.meter{height:4px;background:#f0ebee;border-radius:4px;overflow:hidden;margin:0 0 10px}.meter i{display:block;height:100%;width:0;background:#c3648d;transition:width .25s}.board-shell{width:min(100%,max(220px,calc(100svh - 370px)));margin-inline:auto;padding:10px;background:var(--scene-pattern,none),var(--scene-shell,#e8ded7);border-radius:18px;box-shadow:inset 0 2px 3px #9d776b25,0 3px 0 #ccbdb3}#board{position:relative;aspect-ratio:1;touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden;background:var(--scene-base,#d6c4ba);border-radius:10px}#tiles{position:absolute;inset:0;display:grid;grid-template-columns:repeat(var(--size),1fr);grid-template-rows:repeat(var(--size),1fr)}.tile{position:relative;margin:1px;border-radius:6px;background:#fffaf1;box-shadow:inset 0 -3px 0 #ddcfc2;transition:background .18s,box-shadow .18s}.tile.wall{background:var(--scene-wall,#bba79a);box-shadow:inset 0 3px 0 var(--scene-wall-light,#d8c7bb),inset 0 -4px 0 var(--scene-wall-dark,#a59083)}.tile.painted{background:var(--scene-paint,#f2a5c3);box-shadow:inset 0 2px 0 var(--scene-paint-light,#ffd8e6),inset 0 -3px 0 var(--scene-paint-dark,#d17a9e)}.tile.new{animation:bloom .3s ease-out}.tile.hint-cell:after{content:"";position:absolute;inset:35%;border-radius:50%;background:#8a3b62;box-shadow:0 0 0 3px #fff9}#ball{position:absolute;left:0;top:0;width:calc(100% / var(--size));height:calc(100% / var(--size));display:grid;place-items:center;pointer-events:none;z-index:2;will-change:transform;transition:transform .2s cubic-bezier(.25,.7,.3,1)}#ball span{width:67%;height:67%;border-radius:50%;background:radial-gradient(circle at 32% 25%,#ffeef5 0,var(--scene-paint,#ef92b7) 24%,var(--scene-paint-dark,#c35085) 60%,var(--scene-ball-dark,#9a315e) 100%);box-shadow:0 5px 5px #71314f35,inset 0 1px 2px #fff8;border:2px solid #fff9}#guide{position:absolute;left:26%;top:2%;font-size:40px;color:#90395f;pointer-events:none;animation:nudge 1.2s ease-in-out infinite;z-index:3}#instruction{text-align:center;min-height:20px;font-size:12px;margin:12px 0 8px;color:#6e626a}.tools{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.directions{margin:10px auto 0;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px}.directions button{width:52px;min-height:44px;font-size:20px;padding:4px}.directions>div{display:flex;gap:6px}#target{text-align:center;font-size:11px;color:#6e626a;margin:8px 0 0}#saveNote{font-size:12px;line-height:1.5;background:#fff4e9;padding:10px;border-radius:8px}dialog{border:0;border-radius:12px;width:calc(100% - 32px);max-width:380px;padding:24px;text-align:center;color:#2a2328;max-height:85dvh;overflow:auto}dialog::backdrop{background:#2a232870}dialog h2{font-size:22px;margin:0 0 12px}dialog p{line-height:1.65;margin:8px 0;white-space:pre-line}dialog button{display:block;width:100%;margin-top:10px}.rating{font-size:30px;letter-spacing:5px;color:#ad6c30}.clear-board #ball span{box-shadow:0 0 20px #fff,inset 0 1px 2px #fff8}.reduced *, .reduced *:before,.reduced *:after{animation:none!important;transition:none!important}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}@keyframes bloom{50%{filter:brightness(1.15)}}@keyframes nudge{50%{transform:translateX(10px)}}[hidden]{display:none!important}

/* Scene art stays inside the existing board; white floors remain unpainted. */
.levels .scene-level{grid-column:span 2;min-height:82px;padding:8px 6px}
.level-name{display:block;font-size:12px;line-height:1.5;margin:3px 0;overflow-wrap:anywhere}
.tile.wall[data-motif]::after{content:attr(data-motif);position:absolute;inset:0;display:grid;place-items:center;font-size:clamp(12px,4vw,21px);line-height:1;opacity:.85;pointer-events:none}
#play[data-scene="christmas-tree"]{--scene-shell:#e3f2ef;--scene-base:#c7dfd9;--scene-wall:#3b7663;--scene-wall-light:#629b80;--scene-wall-dark:#285846;--scene-paint:#91caaa;--scene-paint-light:#d9f6df;--scene-paint-dark:#488969;--scene-ball-dark:#275e46;--scene-pattern:radial-gradient(circle at 3px 3px,#fff 2px,transparent 3px) 0 0/16px 16px}
#play[data-scene="christmas-candy"]{--scene-shell:#f9e4e3;--scene-base:#e5c7c6;--scene-wall:#c96671;--scene-wall-light:#f4b7be;--scene-wall-dark:#a64455;--scene-paint:#e9949b;--scene-paint-light:#ffe3e1;--scene-paint-dark:#bc5265;--scene-ball-dark:#84394a;--scene-pattern:repeating-linear-gradient(45deg,#fff9 0 5px,transparent 5px 12px)}
#play[data-scene="christmas-gifts"]{--scene-shell:#efe3c5;--scene-base:#d5c394;--scene-wall:#8b5068;--scene-wall-light:#b97c8c;--scene-wall-dark:#65384c;--scene-paint:#e5bf63;--scene-paint-light:#fff0bd;--scene-paint-dark:#af8438;--scene-ball-dark:#795723;--scene-pattern:repeating-linear-gradient(90deg,transparent 0 20px,#fff7 20px 23px,transparent 23px 32px)}
#play[data-scene="aquarium"]{--scene-shell:#d7f1f4;--scene-base:#a7d3dd;--scene-wall:#468ca3;--scene-wall-light:#82bdcb;--scene-wall-dark:#2f677e;--scene-paint:#79c9da;--scene-paint-light:#d2f6ff;--scene-paint-dark:#4297b3;--scene-ball-dark:#28677d;--scene-pattern:radial-gradient(circle at 7px 7px,transparent 3px,#fff9 4px,transparent 5px) 0 0/24px 24px}
#play[data-scene="observatory"]{--scene-shell:#404969;--scene-base:#53577d;--scene-wall:#7775a6;--scene-wall-light:#a7a2cb;--scene-wall-dark:#54517f;--scene-paint:#b3a3e2;--scene-paint-light:#ede5ff;--scene-paint-dark:#8170b3;--scene-ball-dark:#55447e;--scene-pattern:radial-gradient(circle at 3px 5px,#ffedb5 1px,transparent 2px) 0 0/21px 23px}
#play[data-scene="lavender"]{--scene-shell:#e8e0f2;--scene-base:#cbbfd9;--scene-wall:#849374;--scene-wall-light:#b4c0a3;--scene-wall-dark:#5c6c50;--scene-paint:#bc9ed4;--scene-paint-light:#f0dfff;--scene-paint-dark:#9271b1;--scene-ball-dark:#644b7e;--scene-pattern:repeating-linear-gradient(0deg,#fff4 0 3px,transparent 3px 12px)}
#play[data-scene="citrus"]{--scene-shell:#f5ebcd;--scene-base:#d5d4a6;--scene-wall:#77916b;--scene-wall-light:#adc39b;--scene-wall-dark:#506a46;--scene-paint:#efbf72;--scene-paint-light:#ffedc7;--scene-paint-dark:#c88b43;--scene-ball-dark:#8e5929;--scene-pattern:repeating-linear-gradient(90deg,#fff6 0 2px,transparent 2px 22px)}
#play[data-scene="canal"]{--scene-shell:#344d60;--scene-base:#49758a;--scene-wall:#7c5361;--scene-wall-light:#b67f86;--scene-wall-dark:#593c48;--scene-paint:#edab89;--scene-paint-light:#ffe1b8;--scene-paint-dark:#bc705d;--scene-ball-dark:#7c473f;--scene-pattern:repeating-linear-gradient(0deg,transparent 0 8px,#8ac0d233 8px 10px)}
