/* Forest Frontier v0.10.0-rc43 — combat atmosphere, audio controls, stable actions and unified item details. */

/* Location atmosphere is decorative only: it never changes layout. */
body.theme-ashen.screen-battle-active .battle-panel{position:relative;isolation:isolate}
body.theme-ashen.screen-battle-active .battle-panel::before,
body.theme-ashen.screen-battle-active .battle-panel::after{
  content:"";position:absolute;inset:0;z-index:-2;pointer-events:none;border-radius:inherit;overflow:hidden
}
body.theme-ashen.screen-battle-active .battle-panel::after{z-index:-1;opacity:.55;mix-blend-mode:screen}
body.theme-ashen[data-zone="ash_border"] .battle-panel::after,
body.theme-ashen[data-zone="hard"] .battle-panel::after{background:radial-gradient(circle at 82% 18%,rgba(255,111,55,.16) 0 1px,transparent 2px),radial-gradient(circle at 63% 42%,rgba(255,159,72,.12) 0 1px,transparent 2px);background-size:63px 71px,89px 77px;animation:ffAmbientDrift 14s linear infinite}
body.theme-ashen[data-zone="echo_pits"] .battle-panel::after,
body.theme-ashen[data-zone="zero_node"] .battle-panel::after,
body.theme-ashen[data-zone="ruins"] .battle-panel::after{background:radial-gradient(ellipse at 70% 32%,rgba(85,225,211,.10),transparent 43%);animation:ffAmbientPulse 7s ease-in-out infinite}

/* Portraits breathe very subtly. Hit reactions remain on the card, so animations do not fight. */
body.theme-ashen.screen-battle-active:not(.reward-flow-open) .combatant:not([data-death-animating="1"]) .figure{animation:ffPortraitIdle 5.6s ease-in-out infinite;will-change:transform,filter}
body.theme-ashen.screen-battle-active:not(.reward-flow-open) .combatant-enemy.enemy-power-intent .enemy-figure{animation:ffPortraitThreat 1.55s ease-in-out infinite}
@keyframes ffPortraitIdle{0%,100%{transform:translate3d(0,1px,0) scale(1)}50%{transform:translate3d(0,-1px,0) scale(1.008)}}
@keyframes ffPortraitThreat{0%,100%{transform:translate3d(0,1px,0) scale(1);filter:brightness(1)}50%{transform:translate3d(0,-2px,0) scale(1.025);filter:brightness(1.18) saturate(1.12)}}

/* Stable three-slot action geometry. The middle slot stays present while charging. */
body.theme-ashen .attack-action-group{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:var(--ff-action-gap,6px)!important;min-width:0!important}
body.theme-ashen .attack-action-group>button{width:100%!important;min-width:0!important;height:100%!important}
body.theme-ashen .crushing-action small{display:none!important}
body.theme-ashen .crushing-action:disabled{opacity:.42!important;filter:saturate(.62)!important}
body.theme-ashen .crushing-action[hidden],body.theme-ashen .response-action[hidden]{display:none!important}
body.theme-ashen .attack-action-group:has(.response-action:not([hidden])) .crushing-action{display:none!important}

/* Encounter choice is content-sized, not a stretched inactive battle. */
body.theme-ashen.screen-battle-active.battle-encounter-choice .battle-stage .combatant{height:clamp(150px,24dvh,218px)!important;min-height:150px!important}
body.theme-ashen.screen-battle-active.battle-encounter-choice .combat-mechanics-status,
body.theme-ashen.screen-battle-active.battle-encounter-choice #zoneProgress{display:none!important}
body.theme-ashen.screen-battle-active.battle-encounter-choice .battle-action-dock{position:relative!important;inset:auto!important;margin-top:8px!important}
body.theme-ashen.screen-battle-active.battle-encounter-choice .battle-main-action{margin-top:6px!important}

/* Boss reveal: full first encounter, short repeats. */

/* State transitions accent the existing card without adding rows. */

/* Unified item detail layout for every equipment slot and socket count. */

/* Sound setting is compact and independent from future music controls. */

@media(prefers-reduced-motion:reduce){
  body.theme-ashen.screen-battle-active .battle-panel::after,
  body.theme-ashen.screen-battle-active .figure,
  body.theme-ashen .combatant-enemy.enemy-power-intent .enemy-figure,
  .boss-reveal-vignette,.boss-reveal-card{animation:none!important}
}
