/* Forest Frontier v0.11.11 — stable mobile battle geometry.
 * Dynamic intents, poison labels and defense-result messages may change their
 * content, but they must never resize both combatant cards mid-action.
 */

@media (max-width: 767px) {
  body.theme-ashen.screen-battle-active .battle-stage .combatant {
    height: clamp(268px,39dvh,350px) !important;
    min-height: clamp(268px,39dvh,350px) !important;
    max-height: clamp(268px,39dvh,350px) !important;
    contain: layout paint;
  }

  body.theme-ashen.screen-battle-active .hero-card-header {
    grid-template-rows: minmax(18px,auto) 20px !important;
    align-content: start;
    min-height: 43px;
    max-height: 43px;
    overflow: hidden;
  }

  body.theme-ashen.screen-battle-active .hero-status-row,
  body.theme-ashen.screen-battle-active .hero-status-row[hidden] {
    display: inline-flex !important;
    min-height: 20px !important;
    max-height: 20px !important;
  }

  body.theme-ashen.screen-battle-active .hero-status-row[hidden] {
    visibility: hidden !important;
    pointer-events: none;
  }

  body.theme-ashen.screen-battle-active .enemy-card-header {
    min-height: 62px;
    max-height: 62px;
    overflow: hidden;
  }

  body.theme-ashen.screen-battle-active .enemy-intent-slot {
    min-height: 28px !important;
    max-height: 28px !important;
    overflow: hidden;
  }

  body.theme-ashen.screen-battle-active .enemy-intent-slot .enemy-intent {
    display: -webkit-box !important;
    min-height: 22px !important;
    max-height: 22px !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal !important;
    text-overflow: ellipsis;
  }

  body.theme-ashen.screen-battle-active .enemy-role,
  body.theme-ashen.screen-battle-active .enemy-role[hidden],
  body.theme-ashen.screen-battle-active .enemy-role.armor-redundant {
    display: block !important;
    min-height: 29px !important;
    max-height: 29px !important;
    margin-bottom: 7px !important;
  }

  body.theme-ashen.screen-battle-active .enemy-role[hidden],
  body.theme-ashen.screen-battle-active .enemy-role.armor-redundant {
    visibility: hidden !important;
    pointer-events: none;
  }

  body.theme-ashen.screen-battle-active #combatMechanicsStatus {
    overflow: hidden;
  }

  body.theme-ashen.screen-battle-active #combatMechanicsStatus .combat-guidance-slot,
  body.theme-ashen.screen-battle-active #combatEffectState {
    max-height: 34px !important;
    overflow: hidden !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 370px) {
  body.theme-ashen.screen-battle-active .battle-stage .combatant {
    height: 258px !important;
    min-height: 258px !important;
    max-height: 258px !important;
  }

  body.theme-ashen.screen-battle-active .enemy-card-header {
    min-height: 58px;
    max-height: 58px;
  }

  body.theme-ashen.screen-battle-active .enemy-intent-slot {
    min-height: 24px !important;
    max-height: 24px !important;
  }

  body.theme-ashen.screen-battle-active .enemy-intent-slot .enemy-intent {
    min-height: 19px !important;
    max-height: 19px !important;
    font-size: 7.5px !important;
  }

  body.theme-ashen.screen-battle-active .enemy-role,
  body.theme-ashen.screen-battle-active .enemy-role[hidden],
  body.theme-ashen.screen-battle-active .enemy-role.armor-redundant {
    min-height: 25px !important;
    max-height: 25px !important;
  }
}
