.battle-live-log{position:absolute;left:24px;top:158px;max-width:420px;z-index:3;list-style:none;margin:0;padding:12px 14px;border-left:2px solid #cdb97e77;background:linear-gradient(90deg,#082832bf,#08283200);color:#d9e6e1;pointer-events:none;font-size:13px;line-height:1.8}.battle-live-log small{color:#c2ac73;margin-right:6px}.battle-result-dialog{max-width:600px}.battle-result-rewards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:24px 0}.battle-result-rewards span{border:1px solid #b79e6c77;padding:18px 10px;text-align:center;border-radius:5px;background:#e6d5ae33}.battle-result-rewards b{display:block;font:700 25px/1.5 "KaiTi",serif;color:#8a6734}.battlefield.battle-impact .enemy-art{animation:battle-first-impact .28s ease-out}.ally.is-down{opacity:.45}.inventory-wallet{padding:10px 0;border-bottom:1px solid #baa37a55}.inventory-items{list-style:none;margin:15px 0;padding:0}.inventory-items li{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 0;border-bottom:1px solid #baa37a44}.inventory-items small{display:block;line-height:1.6;margin-top:5px}.inventory-items strong{color:#906d3b;font-size:22px}@keyframes battle-first-impact{20%{transform:translateX(8px);filter:brightness(1.6)}60%{transform:translateX(-4px)}100%{transform:translateX(0)}}@media(max-width:760px){.battle-live-log{top:400px;left:13px;right:13px;max-width:none;font-size:12px;line-height:1.55;padding:7px 10px}.battle-result-rewards{gap:7px}.battle-result-rewards span{padding:12px 5px;font-size:13px}.battlefield{min-height:690px!important}}
.battle-command{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,330px);gap:14px;border-top:1px solid #b69f7244;padding:14px 7px 1px;color:#5b4932}.battle-skill-description small{font-size:14px;color:#887043}.battle-skill-description p{font-size:14px;line-height:1.7;margin:6px 0}.battle-passive{display:inline-block;font-size:13px;color:#64775a;border-left:2px solid #7f9a6d;padding-left:8px}.battle-target-picker label{display:block;font-size:14px;margin-bottom:7px}.battle-target-picker select{width:100%;min-height:44px;border:1px solid #b59b70;border-radius:5px;background:#f5efe2;color:#594630;padding:8px;font:14px/1.5 inherit}.battle-skill-reference{grid-column:1/-1;font-size:14px}.battle-skill-reference summary{min-height:44px;display:flex;align-items:center;color:#84612e;cursor:pointer}.battle-skill-reference summary:before{content:'◇';margin-right:8px}.battle-skill-reference ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;list-style:none;padding:0;margin:7px 0}.battle-skill-reference li{border:1px solid #baa57966;padding:12px;background:#fff6e94d;border-radius:4px}.battle-skill-reference p{line-height:1.7;margin:5px 0 0}.battle-status-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}.battle-status-chip{font-size:12px!important;padding:2px 5px!important;border:1px solid #9b956566!important;border-radius:3px;background:#dbd7bd33}.enemy-meta .battle-status-chips{width:100%;justify-content:flex-end}@media(max-width:760px){.battle-command{grid-template-columns:1fr;padding:12px 0 0}.battle-skill-reference ul{grid-template-columns:1fr}.enemy-meta .battle-status-chips{justify-content:flex-start}}
.battle-enemy-roster{position:relative;z-index:4;display:flex;flex-wrap:wrap;gap:8px;margin:0 22px}.battle-enemy-roster[hidden],.boss-intent[hidden]{display:none}.battle-enemy-roster button{min-height:44px;flex:1 1 160px;padding:8px 12px;border:1px solid #ccba8e66;border-radius:4px;background:#0a2739c9;color:#e4e5d1;text-align:left}.battle-enemy-roster button[aria-pressed="true"]{border-color:#e3c078;box-shadow:inset 0 0 0 1px #e3c07866}.battle-enemy-roster button:disabled{opacity:.45}.battle-enemy-roster b,.battle-enemy-roster span,.battle-enemy-roster small{display:block;font-size:13px;line-height:1.7}.battle-enemy-roster small{color:#e2b788}.boss-intent{position:absolute;right:22px;top:210px;max-width:265px;z-index:3;padding:12px 14px;border:1px solid #dbac7266;border-left:3px solid #b9654d;border-radius:4px;background:#142734dc;color:#ecdfbc;font-size:14px}.boss-intent span{display:block;font-size:12px;color:#cea782;letter-spacing:.12em}.boss-intent b{display:block;margin:5px 0}.boss-intent p{font-size:13px;line-height:1.7;margin:0}@media(max-width:760px){.battle-enemy-roster{margin:0 13px;gap:6px}.battle-enemy-roster button{flex-basis:120px;padding:6px 8px}.boss-intent{top:272px;left:13px;right:13px;max-width:none;padding:8px 11px}.boss-intent p{font-size:12px}.battle-enemy-roster b,.battle-enemy-roster span,.battle-enemy-roster small{font-size:12px}}

/* Keep combat facts visible when the skill panel is scrolled into view. */
.battle-status{flex-wrap:wrap}
.battle-critical{position:sticky;top:6px;z-index:12;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;padding:12px 16px;border:1px solid #bda981;border-radius:5px;background:var(--paper);box-shadow:0 5px 18px #071e3866}
.battle-critical span{min-width:0;border-left:2px solid #a48b5655;padding-left:8px}
.battle-critical small{display:block;font-size:12px;color:#8b7656}
.battle-critical b{display:block;font-size:14px;line-height:1.6;font-weight:500;color:#58482f;overflow-wrap:anywhere}
.battle-critical-intent{grid-column:1/-1;border-top:1px solid #b39a713b;padding-top:6px;border-left-color:#b5483a!important}
@media(max-width:760px){.battle-status{gap:8px;padding:10px 12px}.battle-critical{top:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:8px 12px}.battle-critical small{font-size:12px}.battle-heading strong{font-size:18px}}

/* Small screens use content flow so logs and boss warnings never cover allies. */
@media(max-width:760px){
  .battlefield{min-height:0!important;justify-content:flex-start;gap:10px;padding-bottom:12px}
  .battlefield .enemy-info{order:0}
  .battle-enemy-roster{order:1}
  .battlefield .enemy-art{order:2;position:relative;top:auto;left:50%;width:min(310px,90%);height:210px;flex:none;margin:0;transform:translateX(-50%)}
  .boss-intent{order:3;position:relative;top:auto;left:auto;right:auto;max-width:none;margin:0 13px}
  .battlefield .formation-chip{order:4;position:relative;top:auto;right:auto;align-self:flex-start;margin:0 13px;max-width:calc(100% - 26px)}
  .battlefield .ally-row{order:5;padding-top:0;padding-bottom:0}
  .battle-live-log{order:6;position:relative;top:auto;left:auto;right:auto;max-width:none;margin:0 13px;font-size:13px;line-height:1.7;background:#0b2d3de0}
  .battle-realm-sign{display:none}
  .ally-text{min-width:0}
}
