/* A stable arena and command window share the available viewport. */
.battle-view .game-header{height:52px;min-height:52px;padding:6px 24px}
.battle-view .game-header nav button{padding:5px 0}
.battle-view .game-footer{display:none}
.game-main.battle-layout{height:calc(var(--battle-viewport,100dvh) - 52px);min-height:580px;max-width:1440px;padding:10px 24px;display:grid;grid-template-rows:34px minmax(180px,1fr) 238px 24px;gap:8px}
.battle-layout.battle-ended{grid-template-rows:34px minmax(350px,1fr) 24px}
.battle-layout .battle-heading{margin:0;min-width:0}
.battle-layout .battle-heading .eyebrow{display:none}
.battle-layout .battle-heading h1{font-size:20px}
.battle-layout .opponent-name{font-size:15px}.battle-layout .opponent-name .member-avatar{width:28px;height:28px}
.battle-layout .battle-arena{height:auto!important;min-height:0;margin:0}
.battle-layout .health-panel{top:12px;padding:8px 12px}
.battle-layout .health-name{font-size:17px}.battle-layout .health-track{margin:5px 0 3px}
.battle-layout .health-bottom{font-size:12px}
.battle-layout .battle-message{bottom:10px;padding:6px 14px;font-size:16px;line-height:1.4;margin:0}
.battle-layout .combatant{height:52%;bottom:14%}
.battle-layout .battle-bottom{position:relative;margin:0;gap:10px;align-items:center;min-height:0}
.battle-layout .battle-bottom .text-button{padding:0 8px;min-height:24px;font-size:12px}
.battle-layout .battle-log summary{min-height:24px;font-size:13px}
.battle-layout .battle-log[open] ol{position:absolute;bottom:25px;left:0;right:0;max-height:200px;background:#fffef9;border:1px solid #bcb3cb;z-index:20;margin:0;box-shadow:0 6px 24px #24203325}
.battle-layout .battle-controls{display:flex;flex-direction:column;gap:0;min-height:0;padding:10px 14px;background:#fffefa;border:1px solid #c4bdcf;border-radius:9px;box-shadow:0 3px 0 #ddd7e4;overflow:hidden}
.command-window .battle-toolbar{padding:0 0 8px;gap:10px;min-height:38px;flex:none}
.command-title{font-size:16px;white-space:nowrap}.command-back{min-height:32px;padding:4px 12px;background:#eeebf3;color:#50436d;border-radius:4px;font-weight:800;font-size:14px}
.command-window .timer{margin-left:auto;gap:5px;font-size:12px}.command-window .timer strong{font-size:23px;min-width:27px}.command-window .timer small{font-size:11px}
.command-window .mega-toggle{min-height:32px;padding:4px 10px;font-size:13px;white-space:nowrap}
.command-content{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;flex:1;min-height:0}
.command-window[data-menu=actions] .command-content{grid-template-columns:1fr}
.command-choices{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.command-choice{position:relative;background:#f4f0e7;color:#352e46;border:1px solid #cec5d8;border-left:6px solid #a36b75;border-radius:5px;font-size:26px;font-weight:900;letter-spacing:.06em}
.command-choice::before{content:'';position:absolute;left:20px;top:50%;transform:translateY(-50%);border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:9px solid #a36b75}
.command-choice:hover,.command-choice:focus-visible{background:#eee6f5}.command-choice.party-choice{border-left-color:#658b7b}.command-choice.party-choice::before{border-left-color:#658b7b}.command-choice small{display:block;font-size:14px;font-weight:700;letter-spacing:.08em}
.command-window .move-grid{gap:7px;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
.command-window .move-slot{min-height:0}
.command-window .move-button{height:100%;min-height:0;padding:7px 30px 6px 10px;display:flex;flex-direction:column;justify-content:center;transform:none!important}
.command-window .move-title{font-size:17px;line-height:1.3;flex-wrap:wrap;gap:4px;padding:0}
.command-window .move-title .type-badge{font-size:10px;padding:1px 3px;margin:0}.command-window .type-badge img{width:14px;height:14px}
.command-window .move-meta{font-size:12px;gap:6px;flex-wrap:wrap;margin-top:4px}.command-window .move-meta b{font-size:12px}
.command-window .move-matchup{font-size:12px;line-height:1.3;margin-top:3px}
.command-info{position:absolute;right:5px;top:6px;width:26px;height:26px;border:1px solid #bfb7cb;border-radius:50%;font:800 15px Georgia,serif;background:#fff;color:#625078;z-index:1}.command-info:hover,.command-info:focus-visible{background:#eee6f5}
.command-preview{border-left:1px solid #ddd6e3;padding-left:16px;min-height:0;overflow:auto;scrollbar-width:thin}
.preview-title{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.preview-title>strong{font-size:18px;line-height:1.4}.preview-title .type-badge{font-size:11px}
.preview-matchup,.preview-caption{font-size:12px;color:#66587b;margin:4px 0 6px}.preview-description{font-size:15px;line-height:1.65}
.preview-meta{font-size:12px;color:#686577;margin-bottom:5px}
.command-window .battle-party{padding:0;border:0;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:6px;min-height:0}
.switch-slot{position:relative;min-height:0}.command-window .switch-button{height:100%;min-height:0;padding:4px 38px 4px 8px;font-size:15px;border:1px solid #d5cddb;line-height:1.3}.command-window .switch-button small{font-size:12px}.command-window .switch-portrait{height:42px;width:48px}.switch-slot .command-info{top:50%;transform:translateY(-50%)}
.preview-moves{display:grid;grid-template-columns:1fr 1fr;gap:5px 12px}.preview-moves>div{display:grid;grid-template-columns:1fr auto;gap:1px 4px;font-size:12px;border-bottom:1px solid #e8e2ec;padding:3px 0}.preview-moves b{font-size:13px;grid-column:1/-1}.preview-moves .type-badge{font-size:10px;padding:0;border:0;background:none}.preview-moves>div>span:last-child{text-align:right;font-size:11px;color:#625078}
.preview-defense{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:6px;font-size:11px}.preview-defense>span{display:flex;align-items:center;gap:3px}.preview-defense .type-badge{padding:0;font-size:10px;border:0;background:none}
.game-embedded .battle-view .game-header{height:28px;min-height:28px;padding:0}.game-embedded .battle-layout{height:calc(var(--battle-viewport,100dvh) - 28px);padding:4px 0 8px;min-height:540px}
@media(max-width:700px){
 .battle-view .game-header{height:48px;min-height:48px;padding:5px 12px}.battle-view .game-header nav{gap:10px}.battle-view .game-brand{font-size:13px}.battle-view .game-brand img{width:30px;height:30px}
 .game-main.battle-layout{height:calc(var(--battle-viewport,100dvh) - 48px);min-height:552px;padding:6px 10px;grid-template-rows:28px minmax(170px,1fr) 310px 22px;gap:6px}
 .battle-layout.battle-ended{grid-template-rows:28px minmax(350px,1fr) 22px}.battle-layout .battle-heading>div:first-child{display:none}.battle-layout .opponent-name{font-size:13px}.battle-layout .battle-turn{font-size:18px}
 .battle-layout .health-panel{width:45%;top:8px;padding:6px 7px}.battle-layout .health-panel.player{left:8px}.battle-layout .health-panel.cpu{right:8px}.battle-layout .health-name{font-size:13px}.battle-layout .health-track{height:5px}.battle-layout .health-bottom{font-size:11px}.battle-layout .health-types .type-badge{font-size:9px}.battle-layout .health-types img{width:11px;height:11px}
 .battle-layout .battle-message{font-size:13px;bottom:6px;padding:4px 9px;max-width:96%}.battle-layout .combatant{height:47%;bottom:16%}
 .battle-layout .battle-controls{padding:7px 9px}.command-window .battle-toolbar{min-height:34px;padding-bottom:5px;gap:6px}.command-title{font-size:14px}.command-back{font-size:12px;padding:4px 8px;min-height:28px}.command-window .timer small{display:none}.command-window .timer strong{font-size:20px}.command-window .mega-toggle{font-size:11px;padding:3px 5px;min-height:28px}
 .command-content{grid-template-columns:1fr;grid-template-rows:132px minmax(0,1fr);gap:7px}.command-window[data-menu=actions] .command-content{grid-template-rows:1fr}.command-choice{font-size:23px}.command-choice::before{left:12px;font-size:10px}.command-choices{gap:10px}
 .command-window[data-menu=party] .command-content{grid-template-rows:104px minmax(0,1fr)}
 .command-window .move-grid{gap:5px}.command-window .move-button{padding:4px 27px 4px 7px}.command-window .move-title{font-size:15px;gap:3px;flex-wrap:nowrap}.command-window .move-title .type-badge{font-size:0;border:0;padding:0}.command-window .move-title .type-badge img{width:14px;height:14px}.command-window .move-meta{font-size:10px;gap:4px;margin-top:3px}.command-window .move-meta b{font-size:10px}.command-window .move-matchup{font-size:11px;margin-top:2px}.command-info{right:3px;top:4px;width:24px;height:24px}
 .command-window .move-meta>span:nth-child(2){display:none}.preview-meta{font-size:10px;margin-bottom:3px}
 .command-preview{border-left:0;border-top:1px solid #ddd6e3;padding:6px 0 0}.preview-title>strong{font-size:15px}.preview-title .type-badge{font-size:10px}.preview-description{font-size:13px;line-height:1.5}.preview-matchup,.preview-caption{font-size:10px;margin:2px 0 3px}.preview-moves{gap:2px 8px}.preview-moves>div{padding:1px 0;display:flex;flex-wrap:wrap;align-items:center;gap:2px}.preview-moves b{font-size:11px;width:100%}.preview-moves .type-badge{font-size:9px}.preview-moves>div>span:last-child{font-size:10px;margin-left:auto}.preview-defense{font-size:10px;margin-top:4px}.preview-defense .type-badge{font-size:9px}
 .command-window .battle-party{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr;gap:5px}.command-window .switch-button{display:flex;flex-direction:column;justify-content:center;gap:2px;padding:3px 5px 25px;font-size:12px;text-align:center;line-height:1.3}.command-window .switch-button>span{width:100%;flex:none}.command-window .switch-button small{font-size:10px}.command-window .switch-portrait{width:43px;height:43px}.switch-slot .command-info{top:auto;bottom:3px;right:calc(50% - 12px);transform:none}
 .command-window .switch-portrait{width:34px;height:34px}
 .game-embedded .battle-layout{height:calc(var(--battle-viewport,100dvh) - 28px);min-height:552px;padding:4px 0 6px}
}
