.battle-arena{position:relative;min-height:470px;overflow:hidden;background:radial-gradient(circle,#fff7cf,#f7d8a2);border:3px solid #24123d;border-radius:18px;padding:15px}.fighter{position:absolute;left:10%;width:80%;text-align:center;z-index:2}.fighter img{height:150px;width:100%;object-fit:contain;filter:drop-shadow(0 8px 3px #24123d55)}.fighter b,.fighter strong{display:block;font-size:20px;background:#fffaf0;border:2px solid #24123d;border-radius:8px}.enemy-fighter{top:-220px;animation:slideEnemy .9s ease-out forwards}.self-fighter{bottom:-220px;animation:slideSelf .9s ease-out forwards}.vs-mark{position:absolute;top:46%;left:0;right:0;text-align:center;font-size:56px;font-weight:1000;color:#f06aa8;text-shadow:3px 3px #24123d;z-index:3;animation:vsPop .8s ease-out}.attacking{animation:attack .5s ease-in-out}.shaking{animation:shake .55s ease-in-out}.attack-fx{position:absolute;left:50%;top:43%;transform:translate(-50%,-50%) scale(.3);opacity:0;z-index:5;background:#f06aa8;color:#fff;border:4px solid #24123d;padding:13px 20px;clip-path:polygon(0 25%,20% 20%,12% 0,35% 12%,50% 0,60% 13%,86% 5%,82% 27%,100% 40%,82% 55%,92% 78%,66% 73%,55% 100%,42% 78%,15% 90%,20% 65%,0 60%);font-size:28px;font-weight:1000}.attack-fx.show{opacity:1;transform:translate(-50%,-50%) scale(1);transition:.25s}.battle-text,.battle-log-list{text-align:center;font-weight:900;margin:10px 0}.battle-log-list div,.battle-log{padding:8px;border-bottom:1px solid #c8aa59}@keyframes slideEnemy{to{top:15px}}@keyframes slideSelf{to{bottom:15px}}@keyframes vsPop{0%{transform:scale(0) rotate(-12deg)}80%{transform:scale(1.2) rotate(4deg)}100%{transform:scale(1)}}@keyframes attack{50%{transform:translateX(55px) scale(1.08)}}@keyframes shake{20%,60%{transform:translateX(-12px) rotate(-3deg)}40%,80%{transform:translateX(12px) rotate(3deg)}}.result-burst{text-align:center;font-size:64px;font-weight:1000;animation:vsPop .8s ease-out}.result-burst.win{color:#e3a900}.result-burst.lose{color:#43206b}

.battle-stats{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:5px 0}.battle-stats span{font-size:11px;background:#fffaf0;border:1px solid #c8aa59;border-radius:4px;padding:3px}.core-img{display:block;max-width:90%;max-height:260px;margin:12px auto;object-fit:contain}

.attack-up{animation:attackUp .5s ease-in-out}.attack-down{animation:attackDown .5s ease-in-out}.hp-hit{animation:hpHit .5s ease-in-out;color:#d71920;background:#ffd5d5!important}.battle-stats span{display:block}.battle-stats span:after{content:'';display:block;height:5px;margin-top:2px;background:linear-gradient(90deg,#f06aa8 60%,#eadfc5 60%);border-radius:5px}@keyframes attackUp{50%{transform:translateY(-35px) scale(1.08)}}@keyframes attackDown{50%{transform:translateY(35px) scale(1.08)}}@keyframes hpHit{50%{transform:scale(1.2)}}

/* 仕様書のスマホ向けバトルレイアウト：4ステータスを1列で表示 */
.battle-arena .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;width:100%;font-size:11px}.battle-arena .stat{padding:4px 2px;min-width:0}.battle-arena .stat b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.battle-arena .bar{height:5px}.battle-arena{min-height:520px;grid-template-rows:1fr 58px 1fr}.battle-arena .fighter img{height:115px}@media(max-width:420px){.battle-arena{min-height:470px;padding:8px}.battle-arena .fighter img{height:95px}.battle-arena .stats{font-size:9px}.battle-arena .vs-mark{font-size:42px}}

/* updated battle layout */
.battle-arena{min-height:680px;display:grid;grid-template-rows:1fr 90px 1fr;gap:8px;align-items:center;padding:14px 10px}.battle-arena .fighter{position:relative;left:auto;top:auto;bottom:auto;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.battle-arena .enemy-fighter{grid-row:1;animation:slideEnemy .9s ease-out forwards}.battle-arena .self-fighter{grid-row:3;animation:slideSelf .9s ease-out forwards}.battle-arena .fighter img{height:145px}.battle-arena .vs-mark{position:relative;grid-row:2;grid-column:1;top:auto;align-self:center}.battle-text{min-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}.battle-log-list{max-height:120px;overflow:auto}.battle-stats{width:min(100%,320px)}

/* 最終仕様：スマホ1画面に収める */
.battle-arena{min-height:390px!important;grid-template-rows:minmax(130px,1fr) 42px minmax(130px,1fr)!important;gap:2px!important;padding:6px!important}.battle-arena .fighter img{height:72px!important}.battle-arena .fighter h2{font-size:16px;margin:2px}.battle-arena .stats,.battle-inline-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:2px!important;width:100%!important;font-size:9px}.battle-arena .stat{padding:2px!important}.battle-arena .bar{height:4px}.battle-arena .vs-mark{font-size:38px}.battle-log-list{max-height:72px!important;margin:3px 0!important}.battle-log-list div{padding:3px!important;font-size:11px}

/* 旧レイアウトと現行レイアウトの中間サイズ */
.battle-arena{min-height:500px!important;grid-template-rows:minmax(170px,1fr) 54px minmax(170px,1fr)!important;gap:5px!important;padding:10px!important}.battle-arena .fighter img{height:105px!important}.battle-arena .fighter h2{font-size:18px;margin:4px}.battle-arena .stats,.battle-inline-stats{font-size:10px;gap:3px!important}.battle-arena .stat{padding:3px!important}.battle-arena .bar{height:5px}.battle-arena .vs-mark{font-size:48px}.battle-log-list{max-height:100px!important}

/* メイン画面は見出しだけを名前として表示し、カード内の重複名を隠す */
#app>.monster-card>.name{display:none}
.qr{display:grid!important;place-items:center!important;min-height:220px!important;padding:12px!important;background:#fff!important;border:3px solid #125b3c!important;border-radius:12px!important}.qr img,.qr canvas{display:block!important;width:190px!important;height:190px!important}

/* バトル画面の正本レイアウト。過去の .battle-arena 系は使用しない。 */
.battle-stage{position:relative;height:min(72vh,590px);min-height:490px;overflow:hidden;display:grid;grid-template-rows:minmax(0,1fr) 58px minmax(0,1fr);gap:4px;padding:10px;background:radial-gradient(circle at center,#fffbdc,#f7dc79);border:4px solid #18734b;border-radius:18px}
.battle-fighter{position:relative;z-index:2;min-height:0;display:grid;grid-template-rows:minmax(90px,1fr) auto auto;align-items:center;text-align:center}
.battle-enemy{grid-row:1;animation:battleEnterEnemy .8s ease-out both}.battle-self{grid-row:3;animation:battleEnterSelf .8s ease-out both}
.battle-fighter.battle-ready{animation:none;opacity:1;transform:none}
.battle-fighter img{display:block;width:100%;height:100%;min-height:90px;max-height:145px;object-fit:contain;filter:drop-shadow(0 7px 4px #173b2b55)}
.battle-fighter h2{margin:0 0 3px;font-size:17px;line-height:1.1;color:#173b2b}
.battle-vs{grid-row:2;z-index:3;align-self:center;text-align:center;font-size:48px;line-height:1;font-weight:1000;color:#f0b900;text-shadow:2px 2px 0 #173b2b;animation:vsPop .7s ease-out}
.battle-stat-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;width:100%}
.battle-stat{min-width:0;padding:3px 2px;background:#fffdf2;border:2px solid #d0ae32;border-radius:7px;font-size:10px;line-height:1.1}
.battle-stat-name{display:block;white-space:nowrap;font-weight:800}.battle-stat strong{display:block;font-size:15px;color:#173b2b}.battle-stat .bar{height:5px;margin-top:2px}.battle-stat .fill{transition:width .65s ease}
.battle-progress{height:24px;margin:6px 0 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:center;font-size:13px;line-height:24px;font-weight:900;color:#173b2b}
.battle-damage{position:absolute;left:50%;z-index:8;opacity:0;transform:translate(-50%,-50%) scale(.2);padding:15px 22px;background:#ef4f4f;color:#fff;border:4px solid #173b2b;clip-path:polygon(0 28%,18% 22%,10% 0,35% 13%,50% 0,62% 13%,88% 5%,82% 29%,100% 42%,83% 57%,92% 82%,66% 73%,53% 100%,40% 78%,13% 91%,20% 65%,0 59%);font-size:25px;font-weight:1000;pointer-events:none}.battle-damage.hit-enemy{top:24%}.battle-damage.hit-self{top:76%}.battle-damage.show{opacity:1;transform:translate(-50%,-50%) scale(1);transition:.2s}
.battle-charge-up{animation:battleChargeUp .65s ease-in-out!important}.battle-charge-down{animation:battleChargeDown .65s ease-in-out!important}.battle-shake{animation:battleShake .6s ease-in-out!important}.battle-hp-hit{animation:battleHpHit .65s ease;color:#d81818!important;background:#ffe0d6!important}
.battle-result{min-height:520px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;cursor:pointer;background:radial-gradient(circle,#fffbdc,#f7dc79);border:4px solid #18734b;border-radius:18px;padding:18px}.battle-result-title{font-size:68px;line-height:1;font-weight:1000}.battle-result.is-win .battle-result-title{color:#d99f00}.battle-result.is-lose .battle-result-title{color:#633889}.battle-result-core{display:block;width:min(78%,300px);max-height:280px;aspect-ratio:1;object-fit:cover;margin:15px auto;border:4px solid #f0b900;border-radius:14px}.battle-result-note{font-size:20px;font-weight:900}.battle-result-guide{margin-top:18px;font-size:12px}
@keyframes battleEnterEnemy{from{transform:translateY(-115%);opacity:0}to{transform:none;opacity:1}}@keyframes battleEnterSelf{from{transform:translateY(115%);opacity:0}to{transform:none;opacity:1}}@keyframes battleChargeUp{50%{transform:translateY(-22px) scale(1.04)}}@keyframes battleChargeDown{50%{transform:translateY(22px) scale(1.04)}}@keyframes battleShake{20%,60%{transform:translateX(-10px) rotate(-2deg)}40%,80%{transform:translateX(10px) rotate(2deg)}}@keyframes battleHpHit{50%{transform:scale(1.12)}}
.qr img,.qr canvas{display:block!important;width:220px!important;height:220px!important;max-width:100%;aspect-ratio:1/1;object-fit:contain}
@media(max-width:420px),(max-height:760px){.battle-stage{height:calc(100dvh - 84px);min-height:440px;max-height:560px;padding:7px;grid-template-rows:minmax(0,1fr) 46px minmax(0,1fr)}.battle-fighter img{min-height:75px;max-height:118px}.battle-vs{font-size:42px}.battle-stat{font-size:9px;padding:2px 1px}.battle-stat strong{font-size:13px}.battle-progress{margin-top:3px;font-size:12px}.battle-result{min-height:440px}}
.battle-code-display{display:flex;justify-content:center;align-items:center;width:100%;margin:12px auto 20px;text-align:center;font-size:clamp(52px,16vw,88px);font-weight:1000;line-height:1;letter-spacing:.12em;color:#174f35;font-variant-numeric:tabular-nums;text-shadow:0 3px 0 #f2cf42;white-space:nowrap}
.captured-core-list{margin-top:20px;padding-top:16px;border-top:2px solid #d7b62c}.captured-core{padding:14px 0;border-bottom:1px solid #d7b62c}.captured-core .core-img{display:block;max-width:100%;margin:0 auto 10px}.captured-core p{text-align:center;margin:0}
#mainMonsterToggle .monster-img{display:block;width:min(100%,320px);height:auto;aspect-ratio:1;margin:0 auto;object-fit:contain;cursor:pointer}#mainMonsterToggle .monster-img.showing-core{object-fit:cover;background:transparent}
.btn:disabled,.save-disabled{background:#9a9a9a!important;color:#f5f5f5!important;border-color:#777!important;cursor:not-allowed;opacity:.8}
.history-result{font-size:1.3em;font-weight:1000;text-shadow:0 1px 0 #fff}.history-win{color:#d92626}.history-lose{color:#1769d1}.history-draw{color:#555}
.monster-feeling{text-align:center;margin:0 0 12px;padding:8px;border-radius:10px;background:#e8f6ce;color:#174f35;font-weight:800}
.verification-code{display:flex;justify-content:center;gap:10px;margin:18px auto}.verification-code input{width:58px;height:72px;border:3px solid #d7b62c;border-radius:12px;background:#fff;text-align:center;font-size:40px;font-weight:900;color:#174f35;outline:none}.verification-code input:focus{border-color:#2f9a5f;box-shadow:0 0 0 4px #75d69b55}@media(max-width:380px){.battle-code-display{font-size:clamp(44px,15vw,64px)}.verification-code{gap:5px}.verification-code input{width:48px;height:64px;font-size:35px}}
.code-monster{text-align:center}.code-monster img{display:block;width:190px;height:190px;object-fit:contain;margin:0 auto}.code-monster h2{margin:4px 0 8px;font-size:28px}.code-monster p{margin:0 0 6px}
.runner-wrap{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:0 -20px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.runner-page{background:#000}.runner-page .page{max-width:none;padding:0}.runner-page .card{width:100%;min-height:100vh;border:0;border-radius:0;padding:0;box-shadow:none}.runner-page #app{width:100%;margin:0}.runner-page .runner-wrap{margin:0}
#runnerCanvas{display:block;width:100%;height:auto;aspect-ratio:7/10;border:4px solid #173b2b;border-radius:0;box-shadow:inset 0 0 0 3px #f4cf67;touch-action:none}
.runner-hint{font-size:12px;text-align:center;color:#174f35;font-weight:800}
.key-count{margin:-2px 0 2px;text-align:center;font-size:18px;font-weight:900;color:#8a5a00}
.runner-pad{display:flex;justify-content:center;gap:18px;margin:2px 0 8px}
.runner-pad button{width:76px;height:58px;border:3px solid #24123d;border-radius:18px;background:#f4cf67;color:#24123d;font-size:28px;font-weight:1000;touch-action:none;user-select:none;-webkit-user-select:none}
.runner-pad button:active{transform:translateY(3px);background:#f06aa8;color:#fff}
/* 画面サイズに関係なく、下4分の1を操作エリアにする */
.runner-wrap{min-height:100dvh;position:relative;gap:0;overflow:hidden}
#runnerCanvas{height:75dvh;min-height:0;aspect-ratio:auto;object-fit:fill}
.runner-pad .npc-status{width:100%;height:6dvh;min-height:34px;display:flex;align-items:center;justify-content:space-evenly;padding:0 8px;overflow:hidden}.npc-status img{width:18%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 0 #24123d55);transition:filter .25s}.npc-status img.locked{filter:brightness(0)}
.runner-pad{position:absolute;z-index:12;left:0;right:0;bottom:0;height:25dvh;margin:0;padding:clamp(8px,3vh,32px) clamp(12px,5vw,48px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:rgba(255,250,240,.96);border-top:3px solid #24123d;box-shadow:0 -6px 18px #10051e33}.runner-move{display:flex;align-items:center;justify-content:center;gap:clamp(10px,5vw,42px)}
.runner-pad button{width:clamp(68px,22vw,118px);height:clamp(58px,10vh,92px);font-size:clamp(25px,7vw,42px)}
.runner-debug{display:flex;align-items:center;justify-content:center;gap:6px}.runner-pad .runner-reset{width:auto;height:auto;min-height:0;padding:5px 12px;border-radius:10px;background:#fff;color:#5b3d18;font-size:12px;line-height:1.2}
.runner-debug-options{display:none;align-items:center;justify-content:center;gap:6px}.runner-debug-options.open{display:flex}
.collected-gallery{position:absolute;z-index:30;inset:0;display:grid;place-items:center;padding:18px;background:#160d20aa}.collected-gallery section{width:min(92%,720px);max-height:80%;overflow:auto;padding:18px;border:4px solid #24123d;border-radius:22px;background:#fffaf0;color:#24123d;text-align:center;font-size:20px}.collected-gallery-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0}.collected-gallery figure{margin:0;padding:6px;border:2px solid #24123d;border-radius:10px;background:#fff}.collected-gallery img{display:block;width:100%;aspect-ratio:1;object-fit:contain}.collected-gallery figcaption{font-size:12px;font-weight:900}.collected-gallery small{font-size:12px}
.quiz-bubble{position:absolute;z-index:25;left:50%;top:45%;transform:translate(-50%,-50%);width:min(92%,620px);max-height:92%;overflow:auto;padding:24px 16px;border:5px solid #24123d;border-radius:26px;background:#fffaf0;color:#24123d;text-align:center}.quiz-bubble h2{font-size:clamp(20px,5vw,32px)}.quiz-choices{display:grid;gap:10px}.quiz-choices button{padding:12px;border:3px solid #24123d;border-radius:12px;background:#fff;font:inherit;font-weight:900}.quiz-close{position:absolute;right:10px;top:8px;width:40px;height:40px;border-radius:50%;background:#f06aa8;color:#fff;font-size:28px}.quiz-verdict{display:block;padding:4px 0 12px;font-size:clamp(54px,15vw,104px);font-weight:900;line-height:1}.quiz-correct{color:#e40000}.quiz-wrong{color:#087eea}.quiz-answer-image{display:block;width:min(100%,520px);height:min(52dvh,520px);object-fit:contain;margin:auto;border:3px solid #24123d;border-radius:16px;cursor:pointer;background:#e7e7e7}.quiz-image-error{padding:28px;background:#e7e7e7;border:3px solid #24123d;border-radius:16px;color:#c00;font-weight:900}
.rules-bubble{position:absolute;z-index:60;inset:4dvh 4vw 27dvh;display:flex;flex-direction:column;padding:24px 18px;border:5px solid #24123d;border-radius:26px;background:#fffaf0;color:#24123d;box-shadow:0 8px 0 #24123d}.rules-bubble h2{margin:0 42px 14px 0;font-size:clamp(22px,6vw,34px)}.rules-bubble pre{flex:1;min-height:0;margin:0;overflow-y:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:700 clamp(16px,4vw,22px)/1.6 system-ui,"Noto Sans JP",sans-serif}.rules-close{position:absolute;right:12px;top:10px;width:40px;height:40px;border-radius:50%;background:#f06aa8;color:#fff;font-size:28px}
.runner-page .rules-bubble,.runner-page .rules-bubble pre{touch-action:pan-y!important;-webkit-overflow-scrolling:touch}
.debug-bubble{position:absolute;z-index:60;left:50%;top:42%;transform:translate(-50%,-50%);width:min(88%,500px);padding:28px 18px 22px;border:5px solid #24123d;border-radius:26px;background:#fffaf0;color:#24123d;box-shadow:0 8px 0 #24123d;text-align:center}.debug-bubble h2{margin:0 42px 18px 0;font-size:clamp(26px,7vw,38px)}.debug-action{display:block;width:100%;margin:12px 0;padding:17px 12px;border:4px solid #24123d;border-radius:16px;background:#f4cf67;color:#24123d;font:900 clamp(20px,5vw,28px) system-ui,"Noto Sans JP",sans-serif}.debug-close{position:absolute;right:12px;top:10px;width:40px;height:40px;border-radius:50%;background:#f06aa8;color:#fff;font-size:28px}
.key-count{position:absolute;z-index:13;left:0;right:0;bottom:25dvh;text-align:center;padding:6px 0;background:rgba(255,250,240,.96);font-size:clamp(15px,4vw,24px);font-weight:900}
.slot-bubble{position:absolute;z-index:20;left:50%;top:42%;transform:translate(-50%,-50%);width:min(92%,620px);padding:24px 14px;background:#fffaf0;border:5px solid #24123d;border-radius:28px;box-shadow:0 8px 0 #24123d;color:#24123d;text-align:center;font-size:24px}.slot-bubble:after{content:'';position:absolute;bottom:-28px;left:48%;border:14px solid transparent;border-top-color:#24123d}.slot-reels{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:18px}.slot-reel{min-height:84px;padding:8px 4px;border:3px solid #d7b62c;border-radius:12px;background:#fff;color:#24123d;font:inherit;font-size:clamp(16px,4vw,24px);font-weight:900;cursor:pointer}.slot-reel:not(.stopped){animation:slotShake .12s linear infinite alternate}.slot-reel.stopped{background:#f4cf67}@keyframes slotShake{to{transform:translateY(3px)}}
.slot-result{display:block;width:min(100%,520px);max-height:280px;object-fit:cover;margin:16px auto 0;border:3px solid #24123d;border-radius:14px}
.tried-combo{min-height:1.4em;margin:10px 0;color:#d11b1b;font-size:clamp(16px,4vw,22px);font-weight:900}
.slot-close{position:absolute;right:10px;top:8px;width:42px;height:42px;border:3px solid #24123d;border-radius:50%;background:#f06aa8;color:#fff;font-size:30px;font-weight:900;line-height:1}.slot-bubble:has(.slot-result) .slot-close{display:none}.key-get{margin:10px 0 0;color:#b57900;font-weight:900}
.story-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:20px}.story-choices>div{display:contents}.story-choices .slot-reel{min-height:72px;font-size:clamp(13px,3.5vw,21px)}.story-decide{display:block;margin:26px auto 4px;padding:15px 42px;border:4px solid #24123d;border-radius:16px;background:#f4cf67;color:#24123d;font:inherit;font-size:clamp(20px,5vw,30px);font-weight:900;box-shadow:0 5px 0 #24123d;cursor:pointer}.story-decide:active{transform:translateY(4px);box-shadow:0 1px 0 #24123d}
.story-choices .slot-reel:not(.stopped){color:transparent;text-shadow:none}
.story-choices .slot-reel{transition:min-height .16s ease,background .16s ease}.story-choices .slot-reel[data-reel-open="1"]{min-height:112px;background:#fff3bd}.reel-menu{display:none}.story-choices .slot-reel:not(.stopped){color:transparent;text-shadow:none}
.story-choices .slot-reel.reel-active{min-height:112px;background:#fff3bd;color:#24123d}
.story-choices .slot-reel{touch-action:pan-y;overflow:hidden}.reel-menu{display:none!important}
.story-choices .slot-reel{animation:none!important;position:relative;isolation:isolate;background:linear-gradient(to bottom,#fffaf0 0%,#fffaf0 18%,#fff 32%,#fff 68%,#fffaf0 82%,#fffaf0 100%);overflow:hidden}.story-choices .slot-reel.reel-active{min-height:150px;border-width:4px;background:linear-gradient(to bottom,#fffaf0 0%,rgba(255,250,240,.35) 24%,#fff 38%,#fff 62%,rgba(255,250,240,.35) 76%,#fffaf0 100%);color:#24123d}.story-choices .slot-reel.reel-active:before,.story-choices .slot-reel.reel-active:after{content:'';position:absolute;left:0;right:0;height:34%;z-index:2;pointer-events:none}.story-choices .slot-reel.reel-active:before{top:0;background:linear-gradient(#fffaf0,rgba(255,250,240,0))}.story-choices .slot-reel.reel-active:after{bottom:0;background:linear-gradient(rgba(255,250,240,0),#fffaf0)}
.story-choices .slot-reel{min-height:150px!important}
.story-choices .reel-track{height:114px;display:flex;flex-direction:column;justify-content:flex-start;will-change:transform}.story-choices .reel-track>div{height:38px;line-height:38px;flex:0 0 38px;white-space:nowrap}.story-choices .reel-active{overflow:hidden;touch-action:none}
.story-choices .reel-track>div{opacity:1!important}.story-choices .reel-active{background:#fff!important}
.clean-reel{height:108px!important;padding:0!important;overflow:hidden!important;touch-action:none!important;background:linear-gradient(to bottom,#f4cf67 0%,#fff4c9 24%,#fff 50%,#fff4c9 76%,#f4cf67 100%)!important;border:3px solid #d7b62c!important;border-radius:12px!important;animation:none!important}.clean-reel-track{display:flex;flex-direction:column;height:108px;will-change:transform}.clean-reel-track>div{height:36px;line-height:36px;flex:0 0 36px;opacity:1!important;color:#24123d}.story-choices .clean-reel{color:#24123d!important}
.story-select-wrap{position:relative;min-width:0}.select-trigger{width:100%;min-height:84px!important;background:#fff!important;border:3px solid #d7b62c!important}.story-select{position:absolute;top:0;left:0;width:100%;height:84px;opacity:0;cursor:pointer}.story-select.open{opacity:1;z-index:5;top:0;height:220px;background:#fffaf0;color:#24123d;font:inherit;font-weight:900;font-size:clamp(15px,3.5vw,22px);border:3px solid #d7b62c;border-radius:12px}
.simple-story-fixed,.simple-story-select{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:84px;border:3px solid #d7b62c;border-radius:12px;background:#f4cf67;color:#24123d;font:inherit;font-size:clamp(15px,3.5vw,22px);font-weight:900;text-align:center;white-space:normal;overflow-wrap:anywhere}.simple-story-fixed{display:flex;align-items:center;justify-content:center;padding:8px}.simple-story-select{appearance:auto;padding:8px 10px;background:#fffaf0;cursor:pointer}
.simple-story-select{font-family:inherit!important;font-size:inherit!important;font-weight:inherit!important;line-height:1.2;width:100%!important;max-width:100%!important;overflow:hidden}
.slot-bubble{top:50%;max-height:calc(100% - 24px);overflow-y:auto}.slot-bubble:has(.slot-result) .story-decide{display:none}.slot-result{max-width:100%;max-height:45vh;object-fit:contain;margin:16px auto 0;display:block}
.story-choices{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}.simple-story-fixed,.simple-story-select{height:84px!important;min-height:84px!important;max-height:84px!important;font-size:clamp(13px,3vw,18px)!important}.simple-story-select{appearance:none!important;-webkit-appearance:none!important;background-image:none!important;padding-right:8px!important}
#runnerCanvas{object-fit:cover!important;object-position:center bottom!important}
#runnerCanvas,.runner-wrap{touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.runner-page,.runner-page *{touch-action:none!important;-webkit-touch-callout:none!important;-webkit-user-select:none!important;user-select:none!important;-webkit-tap-highlight-color:transparent}
.story-choices .simple-story-fixed{display:flex!important;width:100%!important;height:84px!important;min-height:84px!important;max-height:84px!important;border:3px solid #d7b62c!important;border-radius:12px!important;background:#f4cf67!important;color:#24123d!important;align-items:center;justify-content:center}
.story-choices>.simple-story-fixed{display:flex!important;visibility:visible!important;opacity:1!important;outline:0 solid transparent}
.slot-bubble:has(.slot-result) .simple-story-select{pointer-events:none;user-select:none;opacity:.7}.slot-bubble:has(.slot-result) .simple-story-fixed{pointer-events:none}
.birth-confetti{position:absolute;inset:0;z-index:30;pointer-events:none;overflow:hidden}.birth-confetti i{position:absolute;top:-24px;left:calc(var(--i)*2.3%);color:hsl(calc(var(--i)*47),90%,55%);font-style:normal;font-size:clamp(14px,3vw,28px);animation:confettiFall 1.8s linear infinite;animation-delay:calc(var(--i)*-.04s);transform:rotate(calc(var(--i)*31deg))}@keyframes confettiFall{to{top:105%;transform:translateX(35px) rotate(500deg)}}
.birth-confetti i:nth-child(3n){left:8%;animation-delay:-.7s}.birth-confetti i:nth-child(3n+1){left:47%;animation-delay:-1.1s}.birth-confetti i:nth-child(3n+2){left:82%;animation-delay:-.3s}
.birth-message{position:absolute;z-index:31;left:50%;top:auto;bottom:26dvh;transform:translate(-50%,-8px);padding:10px 18px;background:#fffaf0;border:4px solid #24123d;border-radius:18px;box-shadow:0 5px 0 #24123d;color:#24123d;font-size:clamp(16px,4vw,26px);font-weight:900;white-space:nowrap;pointer-events:none;max-width:94%;overflow:hidden;text-overflow:ellipsis}
.game-clear{position:absolute;z-index:70;inset:0;display:grid;place-content:center;gap:16px;background:rgba(26,8,54,.88);color:#fff;text-align:center;cursor:pointer}.game-clear strong{font-size:clamp(52px,15vw,110px);line-height:1;color:#f4cf67;text-shadow:5px 5px 0 #f06aa8,-3px -3px 0 #24123d;animation:wordPop .28s ease-out}.game-clear small{font-size:18px;font-weight:900}
.word-get-bubble{position:absolute;left:50%;top:18%;z-index:50;transform:translateX(-50%);padding:16px 24px;border:4px solid #24123d;border-radius:22px;background:#fffaf0;color:#24123d;font-size:clamp(18px,5vw,28px);font-weight:900;text-align:center;white-space:nowrap;box-shadow:0 6px 0 #24123d;animation:wordPop .18s ease-out}.word-get-bubble:after{content:'';position:absolute;left:50%;bottom:-18px;width:28px;height:28px;background:#fffaf0;border-right:4px solid #24123d;border-bottom:4px solid #24123d;transform:translateX(-50%) rotate(45deg)}@keyframes wordPop{from{opacity:0;transform:translateX(-50%) scale(.8)}to{opacity:1;transform:translateX(-50%) scale(1)}}
.cat-npc-bubble{position:absolute;z-index:55;transform:translate(-50%,-100%);width:min(72vw,360px);padding:18px 54px 18px 20px;border:5px solid #24123d;border-radius:26px;background:#fffaf0;box-shadow:0 7px 0 #24123d;font-size:clamp(16px,4.5vw,23px);font-weight:900;line-height:1.45}.cat-npc-bubble:after{content:'';position:absolute;left:50%;bottom:-21px;width:34px;height:34px;background:#fffaf0;border-right:5px solid #24123d;border-bottom:5px solid #24123d;transform:translateX(-50%) rotate(45deg)}.cat-npc-close{position:absolute;z-index:1;right:9px;top:8px;width:34px;height:34px;border-radius:50%;background:#f06aa8;color:#fff;font-size:24px}.cat-npc-message{min-height:0}

.runner-page,.runner-page *{-webkit-user-drag:none;user-select:none;-webkit-touch-callout:none}
.topdown-wrap #topdownCanvas{display:block;width:100%;height:75dvh;touch-action:none;object-fit:cover}.topdown-wrap .runner-move{display:grid;grid-template-columns:repeat(3,76px);grid-template-rows:58px 58px;gap:5px;justify-content:center}.topdown-wrap [data-move="up"]{grid-column:2}.topdown-wrap [data-move="left"]{grid-column:1;grid-row:2}.topdown-wrap [data-move="down"]{grid-column:2;grid-row:2}.topdown-wrap [data-move="right"]{grid-column:3;grid-row:2}.topdown-bubble{position:absolute;z-index:80;left:50%;top:18%;transform:translateX(-50%);background:#fffaf0;border:4px solid #24123d;border-radius:22px;padding:18px 28px;font-weight:900;font-size:20px}
.topdown-wrap #topdownCanvas{height:100dvh}.topdown-wrap .runner-pad{height:25dvh;background:transparent;border:0;box-shadow:none;pointer-events:none}.topdown-wrap .runner-pad .npc-status{display:none}.topdown-wrap .runner-pad button{pointer-events:auto;background:rgba(244,207,103,.9)}
.topdown-joy{width:132px;height:132px;border:5px solid #24123d;border-radius:50%;background:rgba(255,250,240,.5);position:relative;pointer-events:auto;touch-action:none}.topdown-joy i{position:absolute;left:50%;top:50%;width:62px;height:62px;border:4px solid #24123d;border-radius:50%;background:#f4cf67;transform:translate(-50%,-50%);box-shadow:0 4px 0 #24123d;pointer-events:none}
.topdown-joy{width:180px;height:180px;border-color:#fff;background:rgba(36,18,61,.55);box-shadow:0 0 0 5px rgba(36,18,61,.7),0 8px 20px #10051e88}.topdown-joy:before,.topdown-joy:after{content:'';position:absolute;left:50%;top:50%;background:#fff8;transform:translate(-50%,-50%)}.topdown-joy:before{width:4px;height:82%}.topdown-joy:after{width:82%;height:4px}.topdown-joy i{width:78px;height:78px;border-color:#fff;background:radial-gradient(circle at 35% 28%,#fff6 0 9%,#f06aa8 10% 35%,#6d42c7 70%);box-shadow:0 5px 0 #24123d}
.topdown-wrap>.topdown-joy{display:none;position:absolute;z-index:30;transform:translate(-50%,-50%);pointer-events:none}.topdown-wrap>.topdown-joy.active{display:block}.topdown-wrap>.topdown-joy i{pointer-events:none}
.topdown-dpad{display:grid;grid-template-columns:repeat(3,84px);grid-template-rows:repeat(2,72px);gap:8px;pointer-events:auto}.topdown-dpad button{width:84px!important;height:72px!important;background:rgba(244,207,103,.94)!important}.topdown-dpad [data-dir="up"]{grid-column:2;grid-row:1}.topdown-dpad [data-dir="left"]{grid-column:1;grid-row:2}.topdown-dpad [data-dir="down"]{grid-column:2;grid-row:2}.topdown-dpad [data-dir="right"]{grid-column:3;grid-row:2}
.runner-pad .npc-status{display:none!important}
.character-npc{position:absolute;z-index:18;object-fit:contain;pointer-events:auto;touch-action:manipulation;filter:drop-shadow(0 4px 0 rgba(36,18,61,.45))}.character-npc-bubble{position:absolute;z-index:60;transform:translate(-50%,-100%);width:min(82vw,420px);padding:18px 50px 18px 18px;border:4px solid #24123d;border-radius:20px;background:#fffaf0;box-shadow:0 7px 0 #24123d;font-weight:900}.character-npc-choices{display:grid;gap:10px}.character-npc-choices button{border:2px solid #24123d;border-radius:12px;background:#f4cf67;padding:12px;font-weight:900}.character-npc-close{position:absolute;right:8px;top:8px;width:34px;height:34px;border:2px solid #24123d;border-radius:50%;background:#f06aa8;color:#fff;font-size:22px}
.character-npc-name{white-space:pre-line;font-size:1.2em;margin:0 0 12px;padding-bottom:8px;border-bottom:2px solid #c8aa59}.character-npc-choices{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.character-npc-choices button{min-height:58px}.character-npc-choices button:disabled{opacity:.35;cursor:not-allowed}
