.rpg-combat-controls{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:7px 12px;background:#101b32;border-bottom:1px solid #7d8c9e66;flex:none}.rpg-combat-controls button{min-height:38px}.rpg-combat-controls #rpg-auto[aria-pressed=true]{border-color:#8fe0bb;color:#c7ffe5;background:#25463e}.rpg-moves[data-page=main]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;flex:none;max-height:190px;padding:10px 14px}.rpg-moves[data-page=skills],.rpg-moves[data-page=items],.rpg-moves[data-page=patient]{display:flex;flex-direction:column;align-items:stretch;gap:5px;max-height:min(42dvh,330px);overflow:auto;padding:12px 16px;background:#101c34}.rpg-list-action{text-align:left;display:block!important;width:100%}.rpg-action-note{grid-column:1/-1;color:#b7c4d7;font-size:10px;line-height:1.5}.rpg-inventory-label{font-size:12px;color:#d4c5a5;margin:5px 0}.rpg-inventory-gear{border-top:1px solid #8794ad55;padding:10px 0;font-size:12px;line-height:1.6}.rpg-inventory-gear summary{cursor:pointer;color:#e4d9bb;padding:5px}.rpg-inventory-gear p{margin:5px 0;padding:7px;background:#203049;border-radius:5px}.rpg-team-status span{position:relative;overflow:hidden}.rpg-team-status span:after{content:'';position:absolute;left:0;bottom:0;height:2px;width:var(--ready,0%);background:#a4e0c0}.rpg-battle-stage{min-height:170px}.rpg-round-label{max-width:70%}.rpg-combat-controls button:focus-visible,.rpg-moves button:focus-visible{outline:3px solid #e7d5a2;outline-offset:2px}
@media(max-width:600px){.rpg-combat-controls{padding:5px 8px;gap:6px}.rpg-combat-controls button{min-height:40px;padding:7px 12px;font-size:11px}.rpg-moves[data-page=main]{padding:8px;max-height:180px}.rpg-moves[data-page=skills],.rpg-moves[data-page=items],.rpg-moves[data-page=patient]{padding:8px;max-height:38dvh}.rpg-action-note{font-size:9px}.rpg-battle-footer{max-height:80px;overflow:auto}.rpg-team-status{font-size:9px}.rpg-turn-log{max-height:66px;overflow:auto}}
@media(max-height:580px){.rpg-battle-stage{min-height:110px}.rpg-action-note{display:none}.rpg-moves[data-page=main]{grid-template-columns:repeat(5,minmax(0,1fr));max-height:95px}.rpg-moves[data-page=skills],.rpg-moves[data-page=items],.rpg-moves[data-page=patient]{max-height:35dvh}.rpg-turn-log{max-height:38px}}
/* Keep the new controls in the existing landscape command column. */
@media(max-height:540px) and (min-width:600px){.rpg-battle{grid-template-rows:auto auto auto minmax(0,1fr) auto}.rpg-battle>.rpg-battle-stage{grid-column:1;grid-row:1/6}.rpg-battle>.rpg-combat-controls{grid-column:2;grid-row:1;padding:4px 6px}.rpg-battle>.rpg-boss-plan{grid-column:2;grid-row:2;margin:3px 6px;padding:5px 8px;max-height:64px;overflow:auto}.rpg-battle>.rpg-moves{grid-column:2;grid-row:3;max-height:34dvh}.rpg-battle>.rpg-turn-log{grid-column:2;grid-row:4}.rpg-battle>.rpg-battle-footer{grid-column:2;grid-row:5}}
@media(max-width:600px){.rpg-battle{overflow-y:auto}.rpg-battle-stage[data-enemies="3"]{min-height:170px!important}.rpg-battle>.rpg-combat-controls{position:sticky;top:0;z-index:12}.rpg-battle>.rpg-turn-log,.rpg-battle>.rpg-battle-footer{flex-shrink:0}}
/* Keep story text and command pages usable on short phone screens. */
.rpg-overlay button{touch-action:manipulation}.rpg-moves[data-page=skills],.rpg-moves[data-page=items],.rpg-moves[data-page=patient]{overscroll-behavior:contain;scrollbar-gutter:stable}.rpg-team-status span[data-status]{border-color:#d7c37e}.rpg-team-status span.at-hospital{color:#c9b8e1;opacity:.75}.rpg-battle-stage .rpg-team-status{max-width:calc(100% - 16px);flex-wrap:wrap}.rpg-battle-stage .rpg-team-status span{white-space:normal;line-height:1.4}.rpg-inventory-label{line-height:1.5}.rpg-moves button{white-space:normal;overflow-wrap:anywhere}
@media(max-width:600px){.rpg-overlay.is-battling .rpg-bottom{display:none}.rpg-battle .rpg-battle-stage{flex:1 0 200px;max-height:44dvh}.rpg-battle .rpg-moves[data-page=items],.rpg-battle .rpg-moves[data-page=skills],.rpg-battle .rpg-moves[data-page=patient]{max-height:36dvh;min-height:100px}.rpg-battle .rpg-moves[data-page=main]{max-height:none}.rpg-battle .rpg-turn-log{flex:0 0 auto;max-height:90px;white-space:pre-line}.rpg-battle .rpg-battle-footer{max-height:100px;min-height:44px}.rpg-team-status{gap:3px!important;bottom:8px!important}.rpg-team-status span{padding:3px 5px!important;font-size:9px}}
@media(max-height:540px) and (min-width:600px){.rpg-battle .rpg-battle-stage{min-height:0!important;max-height:none}.rpg-battle .rpg-moves[data-page=items],.rpg-battle .rpg-moves[data-page=skills],.rpg-battle .rpg-moves[data-page=patient]{min-height:70px;max-height:37dvh}.rpg-team-status{display:flex!important;flex-wrap:wrap}.rpg-battle .rpg-moves button{min-height:44px}}
