/* Polish Pass: readable script, cropped busts and a single landscape game surface. */
.dialogue-box{left:4%;right:4%;bottom:3%;min-height:155px;padding:16px 24px 34px;border-radius:3px;background:#fffaf5fa;border-color:#dec6b2;box-shadow:0 8px 28px #15192c33}
.dialogue-box p{font-size:26px;line-height:1.55;color:#252c38;min-height:80px;margin:12px 18px 6px 0;letter-spacing:.015em}.speaker-row>span{font-size:18px;border-radius:2px}.speaker-row small{font-size:12px}.dialogue-box #advance{font-size:16px;bottom:8px;padding:8px 14px}.chapter-header>span{font-size:14px}.chapter-header button{font-size:12px;min-height:38px}
.portraits{inset:9% 9% 31%;align-items:stretch;gap:5%}.portraits figure,.portraits #gamuFigure{width:47%;height:100%;overflow:hidden;opacity:.52;filter:brightness(.6) saturate(.7);transition:transform .2s,filter .2s,opacity .2s}.portraits img{position:absolute;left:0;top:0;width:100%;height:auto;object-fit:contain;object-position:50% 0;transform:scale(1.6);transform-origin:50% 0;animation:portrait-crossfade .22s ease-out;filter:drop-shadow(0 4px 4px #17233344)}.portraits figure.speaking{opacity:1;filter:none;transform:translateY(-5px) scale(1.045);z-index:2}.portraits #gamuFigure img{transform:scale(1.6)}
.comic-reaction{position:absolute;right:10%;top:8%;font-style:normal;font-size:40px;font-weight:900;color:#ffce71;text-shadow:2px 2px #132239;pointer-events:none;z-index:4}.comic-reaction[data-effect=pop]{animation:word-pop .3s ease-out}.comic-reaction[data-effect=bounce]{animation:reaction-bounce .35s ease-out}.comic-reaction[data-effect=tilt]{animation:reaction-tilt .35s ease-out}.portraits figure[data-tone=serious]{filter:brightness(.94)}
.word-big{font-size:1.2em;font-weight:900}.word-small{font-size:.8em}.word-shake{display:inline-block;animation:word-shake .18s 2}.word-pop{display:inline-block;font-weight:900;animation:word-pop .28s ease-out}.word-color{color:#b73369}.word-pause{letter-spacing:.04em}
@keyframes portrait-crossfade{from{opacity:.4}to{opacity:1}}@keyframes word-shake{50%{transform:translateX(2px)}}@keyframes word-pop{0%{transform:scale(.88)}65%{transform:scale(1.08)}100%{transform:scale(1)}}@keyframes reaction-bounce{50%{transform:translateY(-8px)}}@keyframes reaction-tilt{50%{transform:rotate(9deg)}}
.battle-dialogue{height:98px;bottom:72px;max-width:790px;padding:7px 12px;gap:12px}.battle-dialogue p{font-size:21px;line-height:1.42;margin:3px 0}.battle-dialogue b{font-size:16px}.battle-avatar{width:82px;height:82px;overflow:hidden;position:relative;flex-shrink:0}.battle-dialogue .battle-avatar img{width:100%;height:auto;top:0;transform:scale(1.8);transform-origin:50% 0}.battle-avatar .comic-reaction{font-size:21px;right:0;top:0}.battle-dialogue button{min-height:44px;min-width:44px}
.machine[data-scene=playing] .screen>.powerbar{display:block;left:14px;bottom:38px;max-width:44%}.powerbar #upgrades{display:none}.powerbar #weapon{display:block;color:#d0f1fb;font-size:12px;font-weight:800}.game-actions #upgradeAction,.touch-buttons #touchUpgrade{display:none!important}.touch-buttons{grid-template-columns:1fr 1fr}.touch-buttons #touchSpecial{grid-column:1 / -1}.machine[data-scene=dialogue] .view-tools{top:53px}
#rotateHint{display:none;pointer-events:none;position:fixed;z-index:60;bottom:0;left:0;right:0;text-align:center;padding:6px;background:#0b172be0;color:#ffe9f3;font-size:11px}.rotated-play #rotateHint{display:block}.rotated-play .machine{--view-h:100dvw}
#debugPanel{position:fixed;right:10px;top:76px;max-width:400px;background:#0e1b2df5;color:#fff;padding:12px;z-index:70;font:12px monospace;border:1px solid #9ddbdf}#debugPanel[hidden]{display:none}#debugMetrics{line-height:1.5}#debugPanel select{max-width:130px;background:#fff;color:#182332;font-size:12px}
@media(pointer:coarse),(max-width:900px){.battle-dialogue{left:110px;right:184px;bottom:27px;height:78px;padding:5px 7px;gap:7px}.battle-dialogue p{font-size:16px;line-height:1.35}.battle-dialogue b{font-size:12px}.battle-avatar{width:61px;height:66px}.machine[data-scene=playing] .screen>.special-bar{left:110px;bottom:7px;width:calc(100% - 295px)}.machine[data-scene=playing] .screen>.powerbar{display:none}.dialogue-box{min-height:116px;padding:9px 15px 25px;bottom:2%;left:3%;right:3%}.dialogue-box p{font-size:18px;line-height:1.5;min-height:52px;margin:5px 0}.speaker-row>span{font-size:14px;padding:3px 12px}.dialogue-box #advance{font-size:13px;padding:4px 12px}.chapter-header{top:8px}.chapter-header>span{font-size:11px}.chapter-header button{font-size:10px;min-height:32px}.portraits{inset:13% 12% 32%}.portraits img{transform:scale(1.4)}.portraits #gamuFigure img{transform:scale(1.4)}.comic-reaction{font-size:28px}.touch-controls>span{display:none}.title-copy p{font-size:14px}}
@media(max-height:410px) and (orientation:landscape){.dialogue-box p{font-size:17px;line-height:1.45}.dialogue-box{min-height:109px}.battle-dialogue{height:74px}.chapter-header button{min-height:30px}}
.reduce-effects .word-shake,.reduce-effects .word-pop,.reduce-effects .comic-reaction,.reduce-effects .portraits img{animation:none!important}.reduce-effects .portraits figure{transition:none!important}
@media(prefers-reduced-motion:reduce){.word-shake,.word-pop,.comic-reaction,.portraits img{animation:none!important}.portraits figure{transition:none}}
.immersive .machine[data-scene] .screen{aspect-ratio:16/9;min-height:0!important;width:min(100%,calc(var(--view-h)*16/9));height:auto}.immersive .machine[data-scene] #game{height:100%;width:100%;aspect-ratio:16/9}
.portraits figure,.portraits #gamuFigure{opacity:.94;filter:brightness(.62) saturate(.7)}.portraits figure.speaking{opacity:1;filter:none}.portraits figure.speaking[data-effect=pop]{animation:word-pop .3s ease-out}.portraits figure.speaking[data-effect=bounce]{animation:reaction-bounce .3s ease-out}.portraits figure.speaking[data-effect=tilt]{animation:reaction-tilt .3s ease-out}.special-active .battle-dialogue,.special-active .powerbar,.special-active .special-bar,.special-active .game-actions,.special-active .touch-controls{visibility:hidden}.special-active .view-tools{opacity:.3}
