/* Battle HUD refinement. The arena grid and its formation geometry stay fixed. */
#battle-root .spell-panel-battle .party-ally:not(.model-inspected) .unit-health{display:none;}
#battle-root .spell-panel-battle .monster-unit:not(.targeted) .battle-enemy-number{display:none;}
#battle-root .spell-panel-battle .enemy-card:not(.targeted) .enemy-number{visibility:hidden;}

/* One player color follows each model and each target. Shared targets stack rings. */
#battle-root .spell-panel-battle .hero-unit .selection-floor,
#battle-root .spell-panel-battle .party-ally .selection-floor{
  opacity:1;border:2px solid var(--member-color,#3d8177);background:transparent;
  box-shadow:0 0 0 1px #fff9d0,0 2px 4px #223a3933;
}
#battle-root .spell-panel-battle .battle-unit.fallen .selection-floor{opacity:0;}
#battle-root .spell-panel-battle .monster-unit .target-ring,
#battle-root .spell-panel-battle .monster-unit.selected .target-ring{
  top:calc(var(--actor-height) - 7px);left:0;right:0;height:17px;
  opacity:1;border:0;background:transparent;box-shadow:none;
}
#battle-root .spell-panel-battle .monster-unit .target-layer{
  position:absolute;top:calc(var(--ring-index) * 2px);left:calc(4% + var(--ring-index) * 7%);
  right:calc(4% + var(--ring-index) * 7%);height:calc(15px - var(--ring-index) * 2px);
  border:2px solid var(--ring-color);border-radius:50%;background:transparent;
  box-shadow:0 0 0 1px #fff9d099,0 2px 3px #213d3c33;
}

/* The journal grows over the console edge without resizing the battle field. */
#battle-root .spell-panel-battle #battle-actions{overflow:visible;gap:6px;}
#battle-root .spell-panel-battle .battle-buttons{height:65px;min-height:65px;}
#battle-root .spell-panel-battle .battle-console .battle-action{height:65px;min-height:65px;}
#battle-root .spell-panel-battle .battle-log,
#battle-root .spell-panel-battle .battle-log.log-expanded{
  height:27px;min-height:27px;max-height:27px;overflow:visible;
}
#battle-root .spell-panel-battle .battle-log-content{
  position:absolute;z-index:24;top:auto;bottom:calc(100% - 1px);
  left:-10px;right:-10px;height:clamp(130px,21dvh,190px);
  min-height:0;max-height:clamp(130px,21dvh,190px);
  margin:0;padding:9px 11px 10px;overflow-y:auto;overscroll-behavior:contain;
  border:1px solid #cbd5bc;border-bottom:0;border-radius:16px 16px 0 0;
  background:#fcfbef;box-shadow:0 -7px 18px #29432722;
  font-size:10px;line-height:1.5;
}
#battle-root .spell-panel-battle .battle-log-content[hidden]{display:none;}
@media(max-height:650px){
  #battle-root .spell-panel-battle .battle-log-content{
    height:clamp(112px,19dvh,150px);max-height:clamp(112px,19dvh,150px);
  }
}
