/* Compact, scrollable battle ranks and the party's eight persistent positions. */
.game-focus .formation-battle .compact-card{min-height:0;padding:5px 3px;gap:2px;justify-content:flex-start}.game-focus .formation-battle .compact-card .portrait{width:56px;max-width:100%;height:56px;aspect-ratio:1;margin:0 auto 3px}.game-focus .formation-battle .compact-card>b{min-height:0;display:block;font-size:.65rem;line-height:1.15;margin:0}.game-focus .formation-battle .compact-card>small{font-size:.56rem;line-height:1.2}.game-focus .formation-battle .compact-card .target-odds>small{font-size:.51rem;line-height:1.2}.game-focus .formation-battle .compact-card .combat-status:empty{display:none}.game-focus .formation-battle .companion-card .portrait{width:36px;height:36px}.game-focus .formation-battle .compact-card .bar{margin:3px 0 2px}.game-focus .formation-battle .combat-empty{min-height:94px}
.party-formation{margin-bottom:20px}.formation-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.formation-label{color:var(--muted);font-size:.76rem;margin:16px 0 6px}.formation-slot{min-width:0;min-height:76px;padding:7px 3px;border:1px solid #70634370;border-radius:12px;background:linear-gradient(150deg,#30352a,#101816);display:flex;align-items:center;flex-direction:column;justify-content:center;gap:5px}.formation-slot .portrait{width:52px;height:62px;flex:none}.formation-slot b,.formation-slot small{font-size:.67rem;overflow-wrap:anywhere}.formation-slot.empty{border-style:dashed;opacity:.7}.formation-slot.empty>span{font-size:1.4rem}.formation-slot.chosen{border-color:#d7b96b;box-shadow:0 0 14px #c59a392c}.formation-slot:disabled{opacity:.8}.combat-positions{margin:12px 0}.combat-positions>small{display:block;margin:8px 0}.combat-positions .formation-slot{min-height:44px}
.formation-battle{padding:14px 10px;overflow:hidden}.combat-row-label{font-size:.62rem;letter-spacing:.09em;text-transform:uppercase;color:#adbea9;margin:7px 4px 3px}.combat-row-scroll{overflow-x:auto;overscroll-behavior-x:contain;padding:5px 3px 10px;scrollbar-width:thin;scrollbar-color:#b69658 #14201b}.combat-row{display:grid;grid-template-columns:repeat(var(--row-slots),minmax(72px,1fr));gap:6px;min-width:calc(var(--row-slots) * 78px - 6px)}.combat-slot{min-width:0;display:flex;flex-direction:column;gap:6px}.compact-card{padding:5px 3px 7px;border-radius:35% 35% 12px 12px;min-width:0;width:100%;position:relative;background:linear-gradient(145deg,#394035e8,#111a18);border:1px solid #b2a7835c;box-shadow:0 4px 6px #0006;display:flex;flex-direction:column;align-items:center;gap:3px}.compact-card .portrait{width:100%;height:auto;aspect-ratio:4/5;max-width:110px;border-radius:35% 35% 7px 7px;border-width:1px;flex:none}.compact-card>b{font-size:.66rem;line-height:1.1;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-card>small{font-size:.59rem;white-space:nowrap}.compact-card .bar{width:100%;height:5px;margin:2px 0}.combat-empty{display:grid;place-items:center;min-height:80px;border:1px dashed #807b532b;border-radius:24px;color:#887e4d50}.companion-card{border-color:#7e9f73}.companion-card .portrait{max-width:55px;aspect-ratio:1}.companion-card>b{font-size:.62rem}.combat-status{gap:2px;justify-content:center;max-width:100%}.compact-card .status-chip,.compact-card .ward-chip,.compact-card .charge-chip{font-size:.52rem;padding:2px 3px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}.target-odds{font-size:.65rem;line-height:1.3;background:#0c1716e8;color:#eadba7;border-radius:5px;padding:3px 1px;width:100%}.target-odds>small{display:block;font-size:.51rem;color:#b6c8b0}.battle-frontier{display:flex;align-items:center;gap:12px;justify-content:center;color:#ab9768;margin:2px 0}.battle-frontier:before,.battle-frontier:after{content:'';height:1px;flex:1;background:linear-gradient(90deg,transparent,#a5916155,transparent)}.formation-battle .initiative{overflow-x:auto;flex-wrap:nowrap;white-space:nowrap;font-size:.65rem}.battle-actions>.action-tab{margin:8px 0 0;min-height:40px}.item-affixes{display:flex;flex-direction:column;gap:5px;margin:12px 0;color:#8bbdff}.item-affixes small{color:#8c9fa9}.talent-groups{display:grid;gap:15px}.talent-groups h3{font-size:1rem}.skill-rank-value{color:#c8b67c;display:block;font-size:.73rem;margin-top:6px}
.state-hidden .portrait{opacity:.48;filter:saturate(.35);animation:shadow-breathe 2s ease-in-out infinite}.state-slow .portrait{box-shadow:inset 0 0 18px #8ac9ff77}.state-stun:after,.state-confused:after{content:'✧';position:absolute;top:5px;right:6px;font-size:1.4rem;color:#f0cf6f;animation:control-orbit 2.2s linear infinite;pointer-events:none}.state-confused:after{content:'?';color:#ce90ef}.state-regen{box-shadow:0 0 13px #69cb9155}.state-opening,.state-marked{outline:1px solid #e5b75b77;outline-offset:2px}.state-armorbreak{border-color:#cf8e61}.state-evasive .portrait{animation:evasive-shift 2s ease-in-out infinite}.state-rage{box-shadow:0 0 15px #dc673f60}.state-steadfast{border-color:#dfd2a6}
@keyframes shadow-breathe{50%{opacity:.72}}@keyframes control-orbit{50%{transform:translateX(-20px) rotate(180deg)}100%{transform:rotate(360deg)}}@keyframes evasive-shift{50%{transform:translateX(2px);filter:drop-shadow(-4px 0 3px #a8c8a655)}}
@media(min-width:720px){.formation-battle{padding:20px}.compact-card>b{font-size:.8rem}.compact-card>small{font-size:.7rem}.combat-row{grid-template-columns:repeat(var(--row-slots),minmax(90px,1fr));min-width:calc(var(--row-slots)*96px - 6px)}.compact-card .status-chip{font-size:.65rem}.target-odds{font-size:.8rem}}
@media(prefers-reduced-motion:reduce){.state-hidden .portrait,.state-stun:after,.state-confused:after,.state-evasive .portrait{animation:none!important}}.reduce-motion .state-hidden .portrait,.reduce-motion .state-stun:after,.reduce-motion .state-confused:after,.reduce-motion .state-evasive .portrait{animation:none!important}
