/* The viewport height depends only on the breakpoint, never on combat state. */
.combat-v9 .battlefield{height:600px}
.battle-viewport{position:absolute;inset:55px 0 45px;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#7dacc5 #f4faff80;touch-action:pan-y;overscroll-behavior:contain}
.battle-viewport:focus-visible{outline:2px solid #2377ab;outline-offset:-3px}
.battle-plane{position:relative;isolation:isolate;min-height:100%}
.home-encounter,.peer-encounter{position:relative;width:100%;min-width:0;overflow:visible}
.companions-layer{position:relative;width:100%}
.combat-v9 .battle-plane .battle-unit{width:110px;height:140px;left:var(--x);top:var(--slot-y);transform:translate(-50%,-50%);pointer-events:auto}
.combat-v9 .battle-plane .battle-unit .unit-art{top:32px;bottom:auto;height:104px}
.combat-v9 .battle-plane .battle-unit .unit-art>.sprite{max-height:104px;max-width:110px;object-fit:contain;filter:none;transform:none}
.combat-v9 .battle-plane .unit-name{font-size:12px;min-width:0;max-width:120px;padding:3px 5px;line-height:1.1}
.battle-plane .unit-name small{display:none}.battle-plane .unit-health{top:26px;height:5px}.battle-plane .unit-ground{bottom:0}
.battle-plane .unit-intent{font-size:10px;bottom:-5px}
.battle-plane .battle-summon{left:var(--x);top:var(--slot-y);transform:translate(-50%,-50%);width:44px;height:55px}
.battle-plane .battle-summon .unit-art{top:0;height:55px;bottom:auto}
.peer-presence{position:absolute;bottom:0;left:24%;transform:translateX(-50%);font-size:11px;white-space:nowrap;border-radius:6px;background:#f5fbffed;color:#345873;padding:2px 6px;pointer-events:none}
.battle-plane .floating-number{font-size:20px}.battle-plane .floating-number.skill-name{font-size:12px;white-space:normal;max-width:130px}
.combat-v9 .local-list{display:grid;gap:8px;max-height:550px;overflow-y:auto}
.peer-summary{display:flex;width:100%;align-items:center;text-align:left;gap:12px;border:1px solid #c5dced;border-radius:10px;background:#edf7ff;padding:8px 12px;min-height:64px;color:#234e70;font-size:13px}
.peer-summary>.sprite{width:44px;height:52px;object-fit:contain}.peer-summary>span{min-width:0}.peer-summary strong,.peer-summary small{display:block;overflow-wrap:anywhere}.peer-summary small{font-size:12px;line-height:1.5}.peer-summary:disabled{opacity:1}.peer-summary.targeted-ally{box-shadow:inset 0 0 0 2px #359cdb}
.populated .battle-state{inset:auto 0 0;height:auto;max-height:150px;padding:10px;pointer-events:none}.populated .battle-state .btn{pointer-events:auto}
.combat-v9 .battlefield[data-compact=true] .battle-unit{width:86px;height:110px}
.combat-v9 .battlefield[data-compact=true] .battle-unit .unit-art{top:28px;height:78px}
.combat-v9 .battlefield[data-compact=true] .battle-unit .unit-art>.sprite{max-height:78px;max-width:86px}
.combat-v9 .battlefield[data-compact=true] .unit-name{font-size:11px;max-width:105px}
.battlefield[data-compact=true] .unit-health{top:23px}.battlefield[data-compact=true] .peer-presence{font-size:10px}
@media(max-width:850px){.combat-v9 .battlefield{height:520px}}
