/* Battle uses available CSS pixels; formation keeps its own scalable layout. */
.skill-numbers{margin-top:8px;color:#bdd1dd;font-size:12px;line-height:1.6}
.skill-numbers summary{cursor:pointer;padding:7px 0;color:#d4bd86;min-height:28px}
.skill-numbers p{margin:4px 0!important;font-size:12px!important}
.character-skills .skill-summary{color:#eef4f7;font-size:14px;line-height:1.6}
.skill-detail .skill-numbers{display:none}
.boss-more{position:relative;margin:6px auto 0;width:92%;font-size:11px;text-align:left;pointer-events:auto}
.boss-more summary{cursor:pointer;color:#c7d9e3;padding:5px}
.boss-more[open]{background:#07131cf5;border:1px solid #5e7f92;padding:8px;z-index:25}
.boss-more .boss-combat-meta,.boss-more .boss-effect-tray{width:100%!important;display:flex!important}
.boss-more p{margin:5px;font-size:12px;line-height:1.5}
body.battle-mode .fighter-label{pointer-events:none}
@media (orientation:landscape) and (max-width:1200px), (orientation:landscape) and (max-height:700px){
 body.battle-mode{--hud-height:clamp(82px,calc(var(--battle-height)*.23),128px);--ui-font:clamp(10px,calc(var(--battle-height)*.029),14px);--rail:clamp(38px,5vw,62px);--skill-size:clamp(40px,calc(var(--battle-height)*.125),64px);--gap:clamp(4px,1vw,10px)}
 body.battle-mode .app{width:var(--battle-width);height:var(--battle-height);transform:none;font-size:var(--ui-font)}
 body.battle-mode #battleScreen,body.battle-mode .arena{width:100%;height:100%}
 body.battle-mode .arena{grid-template-columns:var(--rail) minmax(0,1fr) minmax(0,39%)}
 body.battle-mode header .actions{left:calc(var(--rail) + 8px);top:6px;gap:4px;max-width:48%}
 body.battle-mode header .btn{font-size:clamp(9px,calc(var(--battle-height)*.026),12px);padding:6px 8px;min-height:28px}
 body.battle-mode .raid-hud{width:clamp(160px,24vw,260px);top:6px;right:8px;padding:3px 8px}
 body.battle-mode .raid-score{font-size:clamp(20px,calc(var(--battle-height)*.065),32px)}
 body.battle-mode .raid-rank{font-size:22px}
 body.battle-mode .raid-hud-label,body.battle-mode .raid-best,body.battle-mode .raid-next,body.battle-mode .raid-next-text{display:none}
 body.battle-mode .raid-turn{font-size:10px;margin-top:0}
 body.battle-mode .turn-order{left:4px;top:46px;bottom:calc(var(--hud-height) + 12px);width:calc(var(--rail) - 8px);height:auto;padding:2px;gap:4px;overflow:hidden}
 body.battle-mode .order-chip,body.battle-mode .order-chip.now{width:100%;min-width:0;height:clamp(30px,calc(var(--battle-height)*.1),52px);flex:1 1 0;min-height:0;max-height:52px;padding:23px 1px 1px;transform:none}
 body.battle-mode .order-chip:before,body.battle-mode .order-chip.now:before{inset:2px 2px 14px;line-height:1}
 body.battle-mode .order-chip.now:after{right:1px;top:5px;font-size:6px}
 body.battle-mode .order-chip:before{font-size:15px}.battle-mode .order-chip b{font-size:8px}
 body.battle-mode .active-fighter{inset:48px 0 calc(var(--hud-height) + 14px) 0}
 body.battle-mode .fighter-label{display:none}
 body.battle-mode .party-grid{position:fixed;left:calc(var(--rail) + 8px);right:8px;bottom:6px;width:auto;height:var(--hud-height);gap:var(--gap);grid-template-columns:repeat(4,minmax(0,1fr))}
 body.battle-mode .unit{height:100%;padding:6px;overflow:hidden}
 body.battle-mode .unit-portrait{left:6px;top:5px;width:22px;height:28px}
 body.battle-mode .unit-head{padding-left:28px;min-height:28px}
 body.battle-mode .unit h3{font-size:var(--ui-font);margin:0 0 2px}
 body.battle-mode .unit-head .role{font-size:9px}
 body.battle-mode .unit-hp{grid-template-columns:22px minmax(12px,1fr) auto;gap:3px;font-size:10px}
 body.battle-mode .unit-hp b{grid-column:auto;font-size:10px}
 body.battle-mode .unit-resources{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-top:4px}
 body.battle-mode .sp-readout,body.battle-mode .energy-readout{grid-template-columns:auto auto;justify-content:space-between;gap:3px;font-size:10px}
 body.battle-mode .sp-pips,body.battle-mode .energy-track{display:none}
 body.battle-mode .unit-resources span{white-space:nowrap}
 body.battle-mode .sp-readout>b,body.battle-mode .energy-readout>b{font-size:10px}
 body.battle-mode .unit-hp .bar,body.battle-mode .energy-track,body.battle-mode .sp-pips i{height:5px}
 body.battle-mode .stack-readout{grid-column:1/-1;padding:1px 3px;margin:0;font-size:9px;grid-template-columns:auto 1fr auto}
 body.battle-mode .stack-readout b,body.battle-mode .stack-readout strong{font-size:9px}
 body.battle-mode .unit-effect-tray{display:none}
 body.battle-mode .unit-state{top:0;left:auto;right:2px;max-width:60%;pointer-events:none}
 body.battle-mode .unit-state span{font-size:8px;padding:1px 3px}
 body.battle-mode .skill-panel{right:10px;bottom:calc(var(--hud-height) + 14px);width:auto;height:calc(var(--skill-size) + 10px);gap:8px;align-items:center}
 body.battle-mode .skill,body.battle-mode .skill.ult{width:var(--skill-size);height:var(--skill-size);flex-basis:var(--skill-size);min-width:0;margin:0}
 body.battle-mode .passive-button{width:32px;height:32px;flex-basis:32px}
 body.battle-mode .skill-detail{left:calc(var(--rail) + 8px);top:48px;width:clamp(170px,30vw,300px);max-height:calc(var(--battle-height) - var(--hud-height) - 75px);padding:10px;overflow:auto}
 body.battle-mode .skill-detail strong{font-size:14px}.battle-mode .skill-detail span,.battle-mode .skill-detail p{font-size:11px;line-height:1.45}
 body.battle-mode .shared-gauge{left:calc(var(--rail) + 8px);top:auto;bottom:calc(var(--hud-height) + 14px);width:max-content;max-width:42%;max-height:40px;padding:5px 8px;font-size:10px}
 body.battle-mode .boss-card{right:8px;top:62px;width:clamp(190px,30vw,350px);max-height:none;padding:6px 8px;overflow:visible;background:#07121dbd}
 body.battle-mode .boss-head h2{font-size:13px}
 body.battle-mode .boss-card .badges,body.battle-mode .boss-card>.barline,body.battle-mode .boss-card>.boss-effect-tray{display:none}
 body.battle-mode .boss-card .intent{position:static;max-width:none;margin:3px 0;padding:4px 6px;font-size:10px;text-align:left;line-height:1.35}
 body.battle-mode .boss-card .raid-hp-line,body.battle-mode .boss-card .raid-layer-sub{width:100%;margin:3px 0;font-size:9px}
 body.battle-mode .boss-more{width:100%;margin:2px 0 0;font-size:10px}
 body.battle-mode .boss-more[open]{position:absolute;top:100%;left:0;width:100%;max-height:calc(var(--battle-height) - var(--hud-height) - 180px);overflow:auto}
 body.battle-mode #deckInfoBtn{top:7px;right:calc(26vw + 12px);padding:5px 8px;font-size:9px}
 body.battle-mode .boss-figure{top:37%;bottom:calc(var(--hud-height) + var(--skill-size) + 24px);left:8%;right:0;height:auto}
 body.battle-mode .boss-image,body.battle-mode .boss-surface{height:100%;max-width:100%;object-fit:contain}
 body.battle-mode .character-modal{width:min(760px,calc(100% - 20px));max-height:calc(100% - 12px);font-size:13px}
 body.battle-mode .character-modal .character-skills{padding:8px 10px;gap:8px}
 body.battle-mode .character-modal header{min-height:0;padding:8px 12px}
 body.battle-mode .character-modal header h2{font-size:20px}
 body.battle-mode .character-modal footer{padding:6px 10px}
 body.battle-mode .boss-more[open]{position:fixed!important;left:calc(var(--rail) + 8px)!important;right:calc(39% + 10px)!important;top:48px!important;width:auto!important;max-height:calc(var(--battle-height) - var(--hud-height) - 64px)!important;overflow:auto;z-index:50}
}
