:root{color-scheme:dark;--ui:url('../assets/repainted-dekino/ui.png');font-family:Georgia,'Times New Roman',serif;color:#fff5d3;background-color:#102635;background-image:url('../assets/site/page-texture.webp');background-size:cover;background-attachment:fixed}
*{box-sizing:border-box}body{margin:0;min-width:280px}button,input{font:inherit}button,a,summary,input{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.45;cursor:wait}[hidden]{display:none!important}a{color:#ffdb83}a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #ffe597;outline-offset:4px}main{max-width:1100px;margin:auto;padding:24px}h1,h2,p{margin-top:0}.page-heading{display:flex;align-items:center;gap:24px;margin-bottom:22px}.page-heading img{max-width:270px;width:100%;height:auto}.page-heading h1{font-size:clamp(22px,3vw,35px);margin-bottom:6px}.page-heading p{margin:0}#game-wrap{position:relative;width:min(100%,960px);aspect-ratio:5/3;margin:auto;overflow:hidden;background-image:url('../assets/repainted-dekino/title.png');background-size:100% 100%}canvas{display:block;width:100%;height:100%;touch-action:none}.hud,.scene-text,.scene-menu{position:absolute;inset:0;pointer-events:none}.hud{font-family:system-ui,sans-serif;font-size:clamp(10px,2.7vw,23px);font-weight:700;text-shadow:0 1px 2px #000}.crystal-count{position:absolute;left:20%;top:5%}.lives-count{position:absolute;right:8%;top:5%}.theme-label{position:absolute;left:2.5%;top:4%;max-width:17%;font-size:.62em}.power-count{position:absolute;left:2.5%;top:14%;font-size:.65em}.overlay{position:absolute;left:14%;right:14%;top:20%;padding:clamp(14px,3vw,32px);text-align:center;pointer-events:auto;font-size:clamp(12px,2vw,18px)}.overlay h2{font-size:clamp(19px,4vw,34px);margin-bottom:12px}.eyebrow{font-size:.75em;letter-spacing:.12em;color:#ffdda0;margin-bottom:10px}.raster-panel{background-image:var(--ui);background-size:400% 400%;background-position:33.333333% 0;background-repeat:no-repeat}.paint-button{border:0;border-radius:0;color:#fff5d3;background-color:transparent;background-image:var(--ui);background-size:400% 400%;background-position:66.666667% 0;background-repeat:no-repeat;min-height:48px;padding:10px 25px;text-shadow:0 1px 2px #000;font-weight:700}.paint-button:hover{filter:brightness(1.15)}.paint-button:active{transform:translateY(1px)}.game-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;margin:18px 0}.help,.edition-links{max-width:960px;margin:14px auto;font-size:17px;line-height:1.6}.edition-links{display:flex;flex-wrap:wrap;gap:20px;justify-content:center}.scene-menu{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;padding:10% 15%;font-size:clamp(12px,2vw,19px)}.scene-menu button{pointer-events:auto;min-width:40%;max-width:100%}.scene-menu h2,.scene-menu p{margin:0;text-shadow:0 1px 3px #000}.scene-menu h2{font-size:clamp(18px,4vw,36px)}.scene-menu.title-menu{justify-content:flex-end;padding-bottom:8%}.scene-menu.title-menu .paint-button{font-size:clamp(15px,3vw,26px);min-width:46%;background-position:100% 0}.scene-text{font-size:clamp(11px,2.5vw,22px);line-height:1.3;text-shadow:0 1px 2px #000}.caption{white-space:pre-line;position:absolute;left:19%;right:10%;top:17%;padding:2% 4%;background-image:var(--ui);background-size:400% 400%;background-position:33.333333% 100%;text-align:center}.caption.demo-caption{left:4%;right:44%;top:5%;font-size:.75em}.caption.home-caption{left:29%;right:30%;top:24%}.caption.reply-caption{left:66%;right:12%;top:31%}.credits-caption{left:18%;right:18%;top:4%;font-size:.9em}.credits-caption p{margin-bottom:6px}.exit-fullscreen{position:absolute;right:10px;bottom:10px;z-index:10;font-size:14px;min-height:36px}#game-wrap:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;display:flex;align-items:center;justify-content:center;background-color:#102635}#game-wrap:fullscreen canvas{width:min(100vw,166.666667vh);height:min(60vw,100vh)}#controller-settings{max-width:960px;margin:20px auto;padding:26px 38px;line-height:1.5}#controller-settings summary{cursor:pointer;font-weight:700;font-size:20px;margin-bottom:12px}.binding-grid{display:flex;flex-wrap:wrap;gap:10px}.binding-grid button{flex:1 1 170px;text-align:left}.binding-grid span{display:block;font-size:.8em;font-weight:400}#controller-deadzone{max-width:240px;width:100%;margin-left:12px}#mapping-status{margin-top:10px}#diagnostics{font:12px monospace;overflow:auto;max-height:360px}.sr-only{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
@media(max-width:600px){main{padding:12px}.page-heading{gap:10px}.page-heading img{width:140px}.page-heading p{font-size:12px}.game-controls{gap:6px}.game-controls .paint-button{padding:10px 14px;font-size:14px}.help{font-size:14px}.overlay{left:8%;right:8%;top:14%;padding:14px}.overlay .paint-button{min-height:36px;padding:6px 15px}.overlay p{margin-bottom:9px}.scene-menu{padding:5% 10%;gap:4px}.scene-menu .paint-button{min-height:32px;padding:5px 15px}#controller-settings{padding:20px 24px}.edition-links{font-size:14px;gap:12px}.hud{font-size:12px}}

#game-wrap:fullscreen .hud,#game-wrap:fullscreen .scene-text,#game-wrap:fullscreen .scene-menu{inset:auto;left:50%;top:50%;width:min(100vw,166.666667vh);height:min(60vw,100vh);transform:translate(-50%,-50%)}

.raster-panel{background-size:400.63897763578274% 464.44444444444446%;background-position:33.36875664187035% 2.33739837398374%}

.paint-button{background-size:400.63897763578274% 491.7647058823529%;background-position:66.63124335812965% 5.905905905905906%}

.scene-menu.title-menu .paint-button{background-size:399.3630573248408% 433.9100346020761%;background-position:100.0% 2.5906735751295336%}

.caption{background-size:400.63897763578274% 471.42857142857144%;background-position:33.36875664187035% 95.54655870445345%}

.overlay.raster-panel{padding:clamp(22px,4vw,44px) clamp(24px,5vw,48px)}.paint-button{padding:12px 30px;min-height:52px}.scene-menu.title-menu .paint-button{min-height:56px}.caption{padding:4% 7%;color:#282337;text-shadow:none}.scene-menu.title-menu{padding-bottom:4%}@media(max-width:600px){.overlay.raster-panel{padding:15px 20px;left:6%;right:6%;top:10%;font-size:11px}.overlay h2{margin-bottom:6px}.overlay .paint-button{min-height:38px;padding:7px 18px;font-size:12px}.overlay p{margin-bottom:5px}.scene-menu.title-menu .paint-button{min-height:36px}.caption{padding:3% 6%;font-size:11px}}

.binding-grid{justify-content:flex-start;align-items:flex-start}.binding-grid button{flex:0 1 220px;max-width:240px;min-height:70px;text-align:center;padding:14px 30px}.binding-grid button span{font-size:.75em;line-height:1.3;margin-top:3px}#controller-settings{scroll-margin-top:18px;padding:50px 70px 48px}#controller-settings summary{margin-bottom:20px}@media(max-width:600px){#controller-settings{padding:36px 32px}.binding-grid button{flex:0 1 220px;max-width:240px;min-height:68px;font-size:15px}}

.raster-panel{background-size:416.611295681% 667.021276596%;background-position:33.892969570% 7.692307692%}

.paint-button{background-size:466.171003717% 1694.594594595%;background-position:65.685279188% 12.203389831%}

.scene-menu.title-menu .paint-button{background-size:412.500000000% 1109.734513274%;background-position:99.368421053% 10.955302366%}

.raster-panel{background-size:538.197424893% 928.888888889%;background-position:35.455435847% 10.008936550%}

#controller-settings{background-size:627.000000000% 1150.458715596%;background-position:35.863377609% 10.742358079%;padding:36px 42px}@media(max-width:600px){#controller-settings{padding:25px 24px}}

.credits-caption{left:8%;right:8%;top:4%;padding:5% 8% 10%;font-size:clamp(11px,1.9vw,18px);line-height:1.25}@media(max-width:600px){.credits-caption{left:5%;right:5%;padding:5% 7% 11%;font-size:11px;line-height:1.2}}

/* Native input semantics, measured ImageGen artwork. No drawn track or thumb. */
select{appearance:none;-webkit-appearance:none;font:inherit;color:#fff5d3;touch-action:manipulation;cursor:pointer;max-width:100%;min-height:48px;margin:8px 8px 8px 0;padding:12px 26px;border:0;border-radius:0;background-color:transparent;background-image:var(--ui);background-repeat:no-repeat;background-size:466.171003717% 1694.594594595%;background-position:65.685279188% 12.203389831%;text-shadow:0 1px 2px #000}
select:focus-visible{outline:3px solid #ffe597;outline-offset:4px}
#controller-deadzone{appearance:none;-webkit-appearance:none;height:34px;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;vertical-align:middle;cursor:pointer}
#controller-deadzone::-webkit-slider-runnable-track{height:16px;border:0;border-radius:0;box-shadow:none;background-color:transparent;background-image:var(--ui);background-repeat:no-repeat;background-size:614.705882353% 1959.375000000%;background-position:9.904761905% 87.731092437%}
#controller-deadzone::-moz-range-track{height:16px;border:0;border-radius:0;box-shadow:none;background-color:transparent;background-image:var(--ui);background-repeat:no-repeat;background-size:614.705882353% 1959.375000000%;background-position:9.904761905% 87.731092437%}
#controller-deadzone::-moz-range-progress{background:transparent;border:0}
#controller-deadzone::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:33px;height:34px;margin-top:-9px;border:0;border-radius:0;box-shadow:none;background-color:transparent;background-image:var(--ui);background-repeat:no-repeat;background-size:495.652173913% 473.207547170%;background-position:65.234765235% 65.722952477%}
#controller-deadzone::-moz-range-thumb{width:33px;height:34px;border:0;border-radius:0;box-shadow:none;background-color:transparent;background-image:var(--ui);background-repeat:no-repeat;background-size:495.652173913% 473.207547170%;background-position:65.234765235% 65.722952477%}

/* Original Game Over layout; surfaces are generated bitmap crops. */
#stage-tester{z-index:20;left:12%;right:12%;top:7%;max-height:88%;overflow:auto;padding:26px 38px;font-size:clamp(11px,1.8vw,17px)}#stage-tester h2{font-size:clamp(20px,3.3vw,30px);margin-bottom:8px}#stage-tester p{margin-bottom:8px}#stage-test-select{display:block;width:100%;margin:5px 0 8px;padding:10px 26px}.stage-test-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}.stage-test-actions .paint-button{flex:1 1 42%;min-height:43px;padding:8px 16px;font-size:inherit}.scene-menu:not(.title-menu):not(.gameover-menu) .paint-button{min-height:44px;padding:8px 30px}@media(max-width:600px){#stage-tester{left:4%;right:4%;top:4%;max-height:93%;padding:15px 25px;font-size:11px}#stage-tester h2{font-size:20px}#stage-test-select{min-height:34px;padding:6px 20px;font-size:11px}.stage-test-actions .paint-button{min-height:32px;padding:5px 12px;font-size:11px}.scene-menu:not(.title-menu):not(.gameover-menu) .paint-button{min-height:30px;padding:5px 15px}}
.scene-menu.gameover-menu{display:block;padding:0}
.gameover-menu .gameover-score{position:absolute;left:27.2375%;top:34.3646%;width:44.4875%;height:23.4896%;text-align:center;white-space:normal;line-height:1.05;font-family:system-ui,sans-serif;font-size:clamp(11px,2.5vw,25px);color:#fff5cc;text-shadow:0 1px 3px #000}
.gameover-score span,.gameover-score strong{display:block}
.gameover-score strong{font-size:clamp(26px,7vw,78px);font-weight:800;line-height:1.1}
.gameover-menu .paint-button{position:absolute;min-width:0;min-height:0;height:15.25%;padding:1% 2%;font-size:clamp(12px,2.6vw,26px);line-height:1.1;background-repeat:no-repeat}
.gameover-menu .gameover-main{left:3.3125%;top:57.4375%;width:27.7%}
.gameover-menu .gameover-exit{left:68.7875%;top:57.4375%;width:27.7%}
.gameover-menu .gameover-retry{left:29.64375%;top:81%;width:40.4375%;font-size:clamp(15px,3.5vw,36px)}
.completion-menu .gameover-score{left:27.104125%;top:33.949375%;width:44.49425%;height:23.490833%;color:#38264a;text-shadow:none;display:flex;align-items:center;justify-content:center}.completion-menu .gameover-main{left:36.168%;top:57.440208%;width:27.704%;height:15.250625%}.completion-menu .gameover-exit{left:36.168%;top:81.00375%;width:27.704%;height:15.250625%}
.completion-menu .completion-choice-caption{position:absolute;left:31%;width:38%;height:9%;margin:0;text-align:center;white-space:nowrap;font-family:system-ui,'Noto Sans JP',sans-serif;font-size:clamp(12px,3.6vw,34px);font-weight:800;line-height:1.1;color:#251c35;text-shadow:0 1px 1px #fff6d0;pointer-events:none}.completion-menu .completion-main-caption{top:54%}.completion-menu .completion-exit-caption{top:77.5%}
@media(max-width:600px){.scene-menu.gameover-menu{padding:0}.gameover-menu .paint-button{min-height:0;padding:1% 2%;font-size:clamp(12px,2.6vw,26px)}.gameover-menu .gameover-retry{font-size:clamp(15px,3.5vw,36px)}}

/* Ending review uses existing ImageGen panels and button crops. */
.scene-text{overflow:hidden}.native-credit-panel,.native-the-end{position:absolute;margin:0;padding:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;white-space:nowrap;text-align:center;line-height:1.12;font-family:system-ui,'Noto Sans JP',sans-serif;font-weight:800;color:#25234a;text-shadow:none;pointer-events:none}.native-ending-line{display:block;margin:0;line-height:1.12}.native-credit-panel .native-ending-line:last-child{margin-bottom:0}.native-the-end{color:#ffdc63;line-height:1.05}.native-the-end .native-ending-line:last-child{font-size:.56em;margin-top:.1em}
.ending-review-controls{max-width:960px;margin:18px auto;padding:26px 38px;line-height:1.45}.ending-review-controls h2{font-size:24px;margin-bottom:8px}.ending-review-controls p{margin-bottom:8px}.ending-review-controls .game-controls{margin:8px 0}.scene-menu:not(.title-menu):not(.gameover-menu){gap:4px}.scene-menu:not(.title-menu):not(.gameover-menu) .paint-button{min-height:38px;padding:6px 24px}@media(max-width:600px){.ending-review-controls{padding:20px 24px;font-size:13px}.ending-review-controls .paint-button{min-height:36px;padding:7px 17px;font-size:13px}.scene-menu:not(.title-menu):not(.gameover-menu) .paint-button{min-height:28px;padding:4px 14px}}
