/* The demo uses the shipped game artwork; its question panel stays opaque and readable. */
:root{--demo-dark:#20433b;--demo-gold:#dd9c21;--demo-silver:#7c96a8}
button:focus-visible,a:focus-visible{outline:3px solid #1a6ea3;outline-offset:4px}
.board{padding:18px 14px 24px;background:#fffef9;border-color:#d6dfc8;box-shadow:0 12px 35px #34462a18;overflow:hidden}
.board[data-mode="play"]{padding:12px 0 0;border-color:#657b4f}
.board[data-mode="play"]>.stagehead,.board[data-mode="play"]>.waza{padding:0 14px}
.board[data-mode="play"]>.waza{margin-bottom:0}
.board[data-mode="play"] .quit{color:#67795b}
.stagehead{font-size:15px}.hero .lead{max-width:620px;margin-left:auto;margin-right:auto}
.battle-scene{position:relative;height:172px;background:#476b42 var(--scene) center 52%/cover;overflow:hidden;isolation:isolate}
.battle-scene:after{content:"";position:absolute;inset:0;background:linear-gradient(#11251520,transparent 35%,#0c2b233b);z-index:-1}
.battle-hud{position:absolute;top:12px;left:12px;right:12px;display:flex;align-items:center;gap:12px;color:#fff;font-size:12px;font-weight:900;text-shadow:0 1px 4px #000}
.enemy-status{padding:4px 12px;background:#17372bd9;border:1px solid #c2d4a875;border-radius:99px}
.enemy-hp{height:8px;width:100px;background:#0c241aa8;border:1px solid #dfe7c1;border-radius:99px;overflow:hidden}
.enemy-hp span{display:block;height:100%;background:linear-gradient(90deg,#8db649,#d2e873);transition:width .14s}
.enemy{position:absolute;width:160px;height:140px;object-fit:contain;bottom:0;left:50%;transform:translateX(-50%);filter:drop-shadow(0 8px 8px #152e3275)}
.enemy.hit{animation:enemy-hit .28s ease-out}
.battle-caption{position:absolute;bottom:10px;left:12px;color:#fff;font-size:11px;font-weight:900;background:#17372be3;padding:2px 9px;border-radius:99px}
.maru{top:55%;font-size:76px;color:#fff8bc;text-shadow:0 0 15px #ffbd45,0 2px 5px #875921;z-index:3}
.question-panel{background:linear-gradient(#fffef6,#f4f4e4);border-top:3px solid #c5ab73;padding:12px 16px 20px}
.meta{display:flex;justify-content:space-between;max-width:370px;margin:0 auto;color:#486854;font-size:12px;font-weight:700}
.qtext{font-size:clamp(2rem,8vw,3rem);line-height:1.4;margin-top:6px;letter-spacing:.01em;overflow-wrap:anywhere}
.answersteps{margin:0 auto 10px;min-height:58px;gap:20px}
.pcell{font-size:30px;line-height:1.35;min-height:44px;min-width:3ch;border-radius:7px 7px 0 0;background:#eaf0dd80;border-bottom-color:#829872}
.plabel{line-height:1.4;color:#5a6b5f}.plabel.on{color:#28633e}
.pad{grid-template-columns:repeat(3,minmax(68px,90px));gap:7px;max-width:286px;margin:auto}
.key{width:100%;height:52px;border:1px solid #aebd9c;border-radius:12px;background:linear-gradient(#fff,#edf0dc);box-shadow:0 4px 0 #9aad84;font-size:24px;color:#244230}
.key:active{box-shadow:0 1px 0 #9aad84;transform:translateY(3px)}
.key.hint{background:#fff3ac;box-shadow:0 4px 0 #c59739,0 0 0 3px #ebbb4e inset}
.key:last-child{font-size:14px}
.play-help{font-size:11px;color:#65715d;margin:12px 0 0;line-height:1.4}
.result{max-width:610px;margin:0 auto;user-select:text}
.result-kicker{font-size:12px;letter-spacing:.12em;color:#627454;font-weight:900;margin-top:8px}
#result-title:focus{outline:none}
.medalbox{max-width:none;text-align:center;margin:8px 0 14px;border:1px solid #e7d39c;background:radial-gradient(ellipse at 50% 0,#fff6c9,#f8f1df);padding:20px 18px;border-radius:18px}
.medalbox[data-medal="silver"]{border-color:#c5d3dd;background:radial-gradient(ellipse at 50% 0,#f8fcff,#eaf0f3)}
.medalbox[data-medal="record"]{border-color:#cdddb9;background:radial-gradient(ellipse at 50% 0,#f6fbe9,#edf2df)}
.medal-icon{font-size:48px;line-height:1.2}.medal-label{font-weight:900;color:#655123;font-size:21px;margin-top:4px}
.medalbox[data-medal="silver"] .medal-label{color:#466073}.medalbox[data-medal="record"] .medal-label{color:#436039}
.score-time{font-size:clamp(34px,8vw,46px);font-weight:900;line-height:1.35;letter-spacing:-.04em;color:#243e32;font-variant-numeric:tabular-nums}.score-time small{font-size:16px;letter-spacing:0;margin-left:4px}
.score-label{font-size:11px;font-weight:700;color:#62745e}.score-detail{font-size:12px;line-height:1.8;color:#5b6656}
.result-goal{display:inline-block;font-size:17px;font-weight:900;color:#254b37;margin-top:12px;padding:4px 14px;border-radius:99px;background:#ffffffb3}
.time-scale{padding:6px 8px 0;margin:0 auto 14px}
.scale-direction{font-size:11px;color:#64715f;text-align:left;margin-bottom:10px}
.scale-track{height:17px;position:relative;background:#e2e8d8;border-radius:99px;margin:26px 0 45px}
.scale-zone{position:absolute;top:0;left:0;height:100%;border-radius:99px 0 0 99px;background:#ebce75}
.scale-zone.silver{background:#bacbd1}
.scale-line{position:absolute;top:-4px;height:25px;width:2px;background:#9a741b}
.scale-line.silver{background:#697f90}
.scale-pin{position:absolute;top:-23px;transform:translateX(-50%);font-size:11px;line-height:1.4;white-space:nowrap;font-weight:900;color:#244532}
.scale-pin:after{content:"▼";display:block;font-size:13px;line-height:15px}
.scale-pin.best{top:23px;color:#7b6556;font-weight:700}.scale-pin.best:after{content:none}.scale-pin.best:before{content:"◆";display:block;line-height:12px;font-size:12px}
.scale-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 20px;font-size:12px;color:#576753;font-weight:700;line-height:1.6}
.scale-legend b{color:#315140}.judge-note{font-size:12px;color:#5d6d58;line-height:1.9;margin:10px 0 16px;text-align:left;padding:10px 12px;background:#f3f5ec;border-radius:9px}
.comparison{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.comparison>div{border:1px solid #dce5d2;background:#fff;border-radius:12px;padding:10px 8px}
.comparison small{display:block;font-size:11px;color:#6b7763}.comparison strong{display:block;font-size:15px;color:#2c5d43}.comparison .slower{color:#7a5b39}
.first-record{color:#506b43;font-size:13px;padding:10px;background:#f2f7e9;border-radius:10px}
.records{margin:18px 0 8px;border:1px solid #d5e0c8;border-radius:14px;overflow:hidden;text-align:left;background:#fff}
.records h2{font-size:16px;color:#244d37;padding:13px 15px 0;line-height:1.5}
.record-subtitle{font-size:11px;color:#65755f;padding:5px 15px 10px;line-height:1.7}
.record-list{list-style:none;padding:0 10px 8px}
.record-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:8px;border-top:1px solid #e7eddf;padding:9px 8px;font-size:13px;line-height:1.6}
.record-row.current{background:#edf6e2;border:1px solid #b3cca0;border-radius:8px;color:#284f35}
.record-rank{font-weight:900;color:#416039}.record-when{font-size:11px;color:#6d7a62}.record-score{text-align:right;font-weight:900;font-variant-numeric:tabular-nums}
.record-score small{display:block;font-size:10px;font-weight:500;color:#64705b}
.records-note{font-size:11px;line-height:1.9;color:#64705a;margin-top:8px;text-align:left}
.storage-warning{font-size:12px;line-height:1.8;color:#795425;background:#fff4db;border-radius:8px;padding:9px 12px;margin-top:8px;text-align:left}
.choices{max-width:390px;margin-top:18px;gap:10px}.choices .retry{width:100%;padding:14px 20px;font-size:17px;line-height:1.6;margin-bottom:5px}
.choices .btn-sub{font-size:13px;padding:10px 16px}.choices .go-main-game{font-size:13px;margin-top:4px;font-weight:700;text-decoration:underline;text-underline-offset:4px;color:#2e6b48}
@keyframes enemy-hit{30%{transform:translateX(-45%) rotate(5deg);filter:drop-shadow(0 0 10px #ffe778) brightness(1.5)}70%{transform:translateX(-55%) rotate(-3deg)}}
@media(max-width:480px){.wrap{padding-left:12px;padding-right:12px}.hero{padding-top:16px}.hero .lead{font-size:13px}.board[data-mode="play"] .stagehead{font-size:13px}.waza{font-size:11px}.battle-scene{height:143px}.enemy{width:138px;height:120px}.battle-hud{top:8px;font-size:10px}.battle-caption{font-size:10px}.question-panel{padding:10px 12px 15px}.pad{grid-template-columns:repeat(3,minmax(68px,92px));max-width:290px}.key{height:50px}.qtext{font-size:34px}.answersteps{min-height:53px;margin-bottom:9px}.medalbox{padding:16px 10px}.comparison strong{font-size:13px}.records h2{font-size:15px}.result-goal{font-size:15px}.scale-legend{gap:5px 12px}.course{min-height:100px}.board{padding:15px 10px 22px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.enemy.hit,.maru.pop,.wrong{animation:none}.enemy-hp span{transition:none}}
