/*
 * Forest Frontier v0.10.0-rc51 — Battle screen contract.
 * Structural consolidation only. This late-loaded screen layer owns the
 * active battle geometry, density modes, telegraphs and one-shot feedback.
 * Reward layout stays outside RC51 and will be consolidated in RC53.
 */

:root {
  --ff-battle-panel-available-height: 420px;
  --ff-battle-stage-budget: 250px;
}

.boss-combatant .figure {
  color: #b97c6e;
}

.combat-mechanics-status {
  display: grid;
  gap: 7px;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid #3b4440;
  border-radius: 9px;
  background: linear-gradient(180deg,#1c211f,#171a19);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.combat-mechanics-status[hidden] {
  display: none;
}

.combat-mechanics-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.crushing-charge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.combat-mechanics-line strong {
  color: #ddd1ad;
  font-size: 12px;
}

.combat-mechanics-line span {
  color: #aeb7b2;
  font-size: 11px;
  font-weight: 700;
}

.crushing-charge-row>span:first-child {
  color: #aeb7b2;
  font-size: 11px;
  font-weight: 700;
}

.crushing-charge-segments {
  display: grid;
  grid-template-columns: repeat(3,22px);
  gap: 4px;
  flex: 0 0 auto;
}

.crushing-charge-segments i {
  height: 7px;
  border: 1px solid #555d58;
  border-radius: 999px;
  background: #222725;
  box-shadow: inset 0 1px 3px #0008;
}

.crushing-charge-segments i.filled {
  border-color: #b58a42;
  background: linear-gradient(90deg,#ad6f2a,#e2ba62);
  box-shadow: 0 0 8px rgba(221,166,71,.28);
}

.heavy-sequence-state {
  padding: 6px 8px;
  border-left: 3px solid #b5483e;
  border-radius: 4px;
  background: #321817;
  color: #f2b5ab;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

#attackButton.crushing-ready {
  border-color: #d9a748;
  background: linear-gradient(180deg,#9c5c1e,#6f3817);
  box-shadow: 0 0 18px rgba(223,154,58,.22);
}

@media (max-width:520px) {
  .combat-mechanics-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width:520px) {
  .crushing-charge-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width:520px) {
  .crushing-charge-segments {
    align-self: stretch;
    grid-template-columns: repeat(3,1fr);
  }
}

@media (max-width:520px) {
  .combat-mechanics-status {
    padding: 9px 10px;
  }
}

@media (max-width:520px) {
  .battle-action-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:520px) {
  .battle-action-row.has-potion {
    grid-template-columns: 1fr;
  }
}

@media (max-width:520px) {
  .battle-action-row.has-potion #attackButton {
    width: 100%;
  }
}

@media (max-width:520px) {
  .battle-action-row.has-potion #defendButton {
    width: 100%;
  }
}

.combat-effect-state {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: #c6b98f;
  padding-top: 2px;
}

.combat-preview-state {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  padding-top: 2px;
  color: #d8cab0;
}

body.theme-ashen .battle-panel>.log-head {
  margin-bottom: 4px;
}

body.theme-ashen .battle-panel #battleTitle {
  margin-bottom: 0;
}

body.theme-ashen .battle-stage {
  margin-top: 4px;
  position: relative;
  align-items: stretch !important;
  gap: var(--ff-battle-stage-gap) !important;
  margin: var(--ff-section-gap) 0 !important;
  padding: max(3px,calc(var(--ff-section-gap) - 3px)) !important;
}

body.theme-ashen .combat-mechanics-status {
  grid-template-columns: minmax(0,1fr) !important;
  align-items: stretch !important;
  gap: max(4px,calc(var(--ff-section-gap) - 3px)) !important;
  margin: var(--ff-section-gap) 0 !important;
  padding: calc(var(--ff-card-padding) - 3px) var(--ff-card-padding) !important;
}

body.theme-ashen .combat-mechanics-line {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: center !important;
  justify-items: stretch !important;
  gap: 8px !important;
  min-width: 0 !important;
}

body.theme-ashen .combat-mechanics-line strong {
  font-size: 11px;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere;
}

body.theme-ashen .combat-mechanics-line span {
  font-size: 10px;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere;
  text-align: right !important;
}

body.theme-ashen .crushing-charge-row {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  align-items: center !important;
  justify-items: stretch !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding-top: 5px;
  border-top: 1px solid rgba(151,165,143,.14);
}

body.theme-ashen .crushing-charge-row>span:first-child {
  font-size: 9px;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere;
  text-align: right !important;
}

body.theme-ashen .crushing-charge-segments {
  width: 82px !important;
  justify-self: end !important;
}

body.theme-ashen .combat-effect-state {
  grid-column: 1/-1;
  font-size: 10px;
  padding-top: 3px;
  line-height: 1.35;
}

body.theme-ashen .combat-preview-state {
  grid-column: 1/-1;
  font-size: 10px;
  padding-top: 3px;
}

body.theme-ashen .heavy-sequence-state {
  grid-column: 1/-1;
  padding-top: 3px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  animation: none !important;
  text-align: center;
  transition: none !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 6px 9px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
  white-space: normal !important;
  text-overflow: clip !important;
  box-sizing: border-box !important;
}

body.theme-ashen .enemy-armor-wrap {
  display: grid;
  gap: 2px;
  margin-top: 3px;
  margin: 0 !important;
}

body.theme-ashen .enemy-armor-wrap[hidden] {
  display: none;
}

body.theme-ashen .enemy-armor-bar {
  height: 5px !important;
  border-color: rgba(222,232,232,.5) !important;
  background: rgba(255,255,255,.08) !important;
}

body.theme-ashen .enemy-armor-bar .fill.armor {
  height: 100%;
  background: linear-gradient(90deg,#f2f4ef,#b9c9ca);
  box-shadow: 0 0 8px rgba(224,242,242,.45);
}

body.theme-ashen .enemy-armor-label {
  font-size: 8px;
  color: #cbd5d2;
  text-align: right;
  line-height: 1;
}

body.theme-ashen .combatant.poisoned {
  border-color: rgba(89,174,93,.62) !important;
  box-shadow: inset 0 0 22px rgba(45,128,55,.12),0 0 12px rgba(52,143,65,.12);
}

body.theme-ashen .combatant.poisoned::after {
  position: absolute;
  left: 7px;
  top: 7px;
  padding: 2px 5px;
  border: 1px solid rgba(96,198,103,.6);
  border-radius: 999px;
  background: rgba(15,53,22,.86);
  color: #8be693;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  z-index: 8;
  content: attr(data-poison-label) !important;
  white-space: nowrap;
}

body.theme-ashen .combatant.poison-tick {
  animation: poisonTickRc21 .55s ease-out both !important;
}

body.theme-ashen .damage-float.poison {
  color: #74e57d !important;
  text-shadow: 0 2px 8px #000,0 0 18px rgba(63,218,86,.85) !important;
}

@media (max-width:620px) {
  body.theme-ashen .combat-mechanics-status {
    grid-template-columns: minmax(0,1fr) auto;
  }
}

@media (max-width:620px) {
  body.theme-ashen .combat-mechanics-line {
    display: grid !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .crushing-charge-row {
    display: grid !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.poison-tick {
    animation: none !important;
  }
}

body.theme-ashen .combatant.heal-pulse {
  animation: rc25HealPulse .72s ease-out both !important;
}

body.theme-ashen .damage-float.heal {
  color: #86f2a0 !important;
  text-shadow: 0 2px 8px #000,0 0 18px rgba(68,226,112,.9) !important;
}

body.theme-ashen #enemyIntent.poison-intent {
  border-color: rgba(73,205,92,.76) !important;
  background: linear-gradient(90deg,rgba(20,87,31,.82),rgba(12,49,21,.88)) !important;
  color: #a9f2b0 !important;
  box-shadow: 0 0 16px rgba(47,190,70,.24) !important;
  animation: rc25PoisonTelegraph 1.25s ease-in-out infinite alternate;
}

body.theme-ashen .heavy-sequence-state.poison-telegraph {
  border-color: rgba(73,205,92,.76) !important;
  background: linear-gradient(90deg,rgba(20,87,31,.82),rgba(12,49,21,.88)) !important;
  color: #a9f2b0 !important;
  box-shadow: 0 0 16px rgba(47,190,70,.24) !important;
  animation: rc25PoisonTelegraph 1.25s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.heal-pulse {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen #enemyIntent.poison-intent {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .heavy-sequence-state.poison-telegraph {
    animation: none !important;
  }
}

@media (max-width:430px) {
  body.theme-ashen .combat-mechanics-line {
    grid-template-columns: minmax(0,1fr) auto !important;
  }
}

@media (max-width:430px) {
  body.theme-ashen .crushing-charge-row {
    grid-template-columns: minmax(0,1fr) auto !important;
  }
}

@media (max-width:430px) {
  body.theme-ashen .combat-mechanics-line strong {
    font-size: 9.5px !important;
  }
}

@media (max-width:430px) {
  body.theme-ashen .combat-mechanics-line span {
    font-size: 9.5px !important;
  }
}

@media (max-width:430px) {
  body.theme-ashen .crushing-charge-row>span:first-child {
    font-size: 9.5px !important;
  }
}

body.theme-ashen .combat-strike-fx {
  position: absolute;
  z-index: 18;
  left: var(--strike-x,50%);
  top: var(--strike-y,50%);
  width: var(--strike-length,80px);
  height: 5px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: rotate(var(--strike-angle,0deg)) scaleX(.06);
  background: linear-gradient(90deg,rgba(68,219,188,0),rgba(92,229,200,.5) 20%,#f4e7b4 72%,rgba(244,231,180,0));
  filter: drop-shadow(0 0 7px rgba(85,220,191,.7));
}

body.theme-ashen .combat-strike-fx::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid #f4e7b4;
  border-right: 2px solid #f4e7b4;
  transform: translateY(-50%) rotate(45deg);
}

body.theme-ashen .combat-strike-fx.incoming {
  background: linear-gradient(90deg,rgba(224,92,66,0),rgba(224,92,66,.55) 20%,#ffd0aa 72%,rgba(255,208,170,0));
  filter: drop-shadow(0 0 7px rgba(224,92,66,.72));
}

body.theme-ashen .combat-strike-fx.incoming::after {
  border-color: #ffd0aa;
}

body.theme-ashen .combat-strike-fx.impact-power {
  height: 7px;
  filter: drop-shadow(0 0 10px rgba(235,116,64,.82));
}

body.theme-ashen .combat-strike-fx.show {
  animation: rc31StrikeTravel .4s cubic-bezier(.16,.75,.25,1) both;
}

body.theme-ashen .combatant.attack-lunge-right {
  animation: rc31AttackLungeRight .38s ease-out both !important;
}

body.theme-ashen .combatant.attack-lunge-left {
  animation: rc31AttackLungeLeft .38s ease-out both !important;
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combat-strike-fx.show {
    animation: rc31StrikeReduced .18s ease-out both;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.attack-lunge-right {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.attack-lunge-left {
    animation: none !important;
  }
}

body.theme-ashen .enemy-lore {
  margin: 3px auto 7px;
  max-width: 210px;
  color: #92a19a;
  font-size: 9px;
  line-height: 1.3;
  text-align: center;
}

body.theme-ashen .enemy-info-card {
  width: min(560px,100%) !important;
  position: relative;
  display: grid;
  gap: 11px;
  padding: 20px;
  text-align: left;
}

body.theme-ashen .battle-stage .combatant {
  display: grid !important;
  grid-template-rows: auto minmax(84px,1fr) auto !important;
  align-content: stretch !important;
  min-width: 0 !important;
  overflow: hidden !important;
  min-height: var(--ff-battle-card-min) !important;
  padding: var(--ff-card-padding) !important;
}

body.theme-ashen .combatant-hero {
  grid-template-rows: auto minmax(var(--ff-battle-scene-min),1fr) auto !important;
}

body.theme-ashen .enemy-card-header {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(112,96,71,.34);
}

body.theme-ashen .enemy-card-header .combatant-name {
  display: -webkit-box;
  min-height: 2.2em;
  margin: 0 !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #eadfca;
  font-size: 16px !important;
  line-height: 1.1 !important;
  overflow-wrap: anywhere;
  text-align: center;
}

body.theme-ashen .enemy-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

body.theme-ashen .enemy-level {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(112,96,71,.55);
  border-radius: 999px;
  background: rgba(4,8,7,.72);
  color: #b9b7ad;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

body.theme-ashen .enemy-tier {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(112,96,71,.55);
  border-radius: 999px;
  background: rgba(4,8,7,.72);
  color: #b9b7ad;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

body.theme-ashen .enemy-boss .enemy-tier {
  border-color: rgba(183,93,64,.72);
  color: #e5aa92;
}

body.theme-ashen .enemy-rare .enemy-tier {
  border-color: rgba(69,142,178,.72);
  color: #94ccec;
}

body.theme-ashen .enemy-elite .enemy-tier {
  border-color: rgba(91,145,95,.72);
  color: #9fcaa2;
}

body.theme-ashen .enemy-info-button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid rgba(188,155,91,.72);
  border-radius: 50%;
  background: rgba(16,18,15,.88);
  color: #ddc48c;
  font-family: Georgia,serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

body.theme-ashen .enemy-info-button[hidden] {
  display: none !important;
}

body.theme-ashen .combat-scene {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  isolation: isolate;
}

body.theme-ashen .combat-scene::before {
  content: '';
  position: absolute;
  inset: 9% 4% 5%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(99,177,157,.07),transparent 68%);
  pointer-events: none;
}

body.theme-ashen .enemy-boss .enemy-combat-scene::before {
  background: radial-gradient(circle,rgba(181,78,50,.15),transparent 69%);
}

body.theme-ashen .combat-scene .figure {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  background-position: 50% 50% !important;
  background-size: contain !important;
  min-height: var(--ff-battle-scene-min) !important;
}

body.theme-ashen .hero-combat-scene .figure {
  max-height: calc(var(--ff-battle-card-min) * .47) !important;
}

body.theme-ashen .enemy-combat-scene .figure {
  max-height: calc(var(--ff-battle-card-min) * .47) !important;
}

body.theme-ashen .combat-feedback-layer {
  position: absolute !important;
  left: 50% !important;
  top: 52% !important;
  z-index: 30 !important;
  width: max-content !important;
  max-width: 92% !important;
  margin: 0 !important;
  transform: translate(-50%,-50%);
  pointer-events: none;
}

body.theme-ashen .combat-feedback-layer::before {
  bottom: calc(100% + 2px) !important;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-ashen .enemy-defeat-banner {
  left: 50% !important;
  top: 50% !important;
  z-index: 31 !important;
  width: calc(100% - 8px) !important;
}

body.theme-ashen .enemy-intent {
  position: relative;
  z-index: 8;
  margin: 7px 0 0 !important;
  padding: 6px 7px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  text-align: center;
}

body.theme-ashen .enemy-trait {
  position: relative;
  z-index: 5;
  display: block !important;
  min-width: 0;
  min-height: 0 !important;
  margin: 0 0 7px !important;
  padding: 7px 8px !important;
  overflow: hidden;
  border: 1px solid rgba(78,107,96,.42) !important;
  border-radius: 8px !important;
  background: rgba(5,13,11,.72) !important;
  color: #aebeb7 !important;
  font-size: 9px !important;
  font-weight: 750 !important;
  letter-spacing: .01em !important;
  line-height: 1.2 !important;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: none !important;
  white-space: nowrap;
}

body.theme-ashen .enemy-trait[hidden] {
  display: none !important;
}

body.theme-ashen .combat-state-stack {
  position: relative;
  z-index: 5;
  display: grid;
  align-self: end;
  gap: 5px;
  min-width: 0;
}

body.theme-ashen .combat-state-stack .combat-bar {
  margin: 0 !important;
}

body.theme-ashen .combat-state-stack .combat-hp {
  margin: 0 !important;
  text-align: center;
}

body.theme-ashen .developer-enemy-stats {
  margin: 0 !important;
  padding-top: 5px !important;
}

body.theme-ashen .combat-stats {
  margin: 0 !important;
  padding-top: 5px !important;
}

body.theme-ashen .enemy-info-card h2 {
  margin: 0;
  padding-right: 34px;
  color: #ead8a7;
  font-family: var(--font-display,Georgia,serif);
  font-size: 25px;
  line-height: 1.1;
}

body.theme-ashen .enemy-info-preview {
  display: grid;
  place-items: center;
  height: 132px;
  overflow: hidden;
  border: 1px solid rgba(83,111,101,.42);
  border-radius: 12px;
  background: radial-gradient(circle,rgba(92,174,151,.10),rgba(4,9,8,.82) 66%);
}

body.theme-ashen .enemy-info-preview .figure {
  width: 180px;
  height: 118px;
  margin: 0;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

body.theme-ashen .enemy-info-lore {
  margin: 0;
  color: #c0c3bc;
  font-size: 14px;
  line-height: 1.5;
}

body.theme-ashen .enemy-info-trait {
  padding: 9px 11px;
  border-left: 2px solid rgba(102,183,160,.58);
  background: rgba(8,24,20,.5);
  color: #a9c2b8;
  font-size: 12px;
  line-height: 1.4;
}

body.theme-ashen .enemy-info-trait[hidden] {
  display: none !important;
}

@media (max-width:620px) {
  body.theme-ashen .battle-stage {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .battle-stage .combatant {
    min-height: 274px !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .combatant-hero {
    grid-template-rows: auto minmax(125px,1fr) auto !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .enemy-card-header .combatant-name {
    font-size: 14px !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .enemy-level {
    padding: 2px 5px;
    font-size: 8px;
  }
}

@media (max-width:620px) {
  body.theme-ashen .enemy-tier {
    padding: 2px 5px;
    font-size: 8px;
  }
}

@media (max-width:620px) {
  body.theme-ashen .enemy-info-button {
    width: 22px;
    height: 22px;
    min-height: 22px;
    font-size: 12px;
  }
}

@media (max-width:620px) {
  body.theme-ashen .combat-scene .figure {
    min-height: 92px !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .enemy-trait {
    font-size: 8px !important;
    padding: 6px 5px !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .combat-feedback-layer {
    top: 51% !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .combat-feedback-layer.perfect {
    font-size: 34px !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .combat-feedback-layer.critical {
    font-size: 36px !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .combat-feedback-layer.crit {
    font-size: 36px !important;
  }
}

@media (max-width:620px) {
  body.theme-ashen .zone-progress:empty {
    display: none !important;
  }
}

@media (max-width:360px) {
}

@media (max-width:360px) {
  body.theme-ashen .battle-stage .combatant {
    min-height: 260px !important;
  }
}

@media (max-width:360px) {
  body.theme-ashen .enemy-card-header {
    gap: 4px;
    padding-bottom: 5px;
  }
}

@media (max-width:360px) {
  body.theme-ashen .enemy-card-header .combatant-name {
    font-size: 13px !important;
  }
}

@media (max-width:360px) {
  body.theme-ashen .enemy-meta-row {
    gap: 3px;
  }
}

@media (max-width:360px) {
  body.theme-ashen .enemy-level {
    font-size: 7.5px;
  }
}

@media (max-width:360px) {
  body.theme-ashen .enemy-tier {
    font-size: 7.5px;
  }
}

@media (max-width:360px) {
  body.theme-ashen .enemy-trait {
    font-size: 7.5px !important;
  }
}

body.theme-ashen .hero-combat-details-head {
  gap: var(--ff-section-gap) !important;
}

body.theme-ashen.screen-battle-active:not(.reward-flow-open) .battle-screen {
  padding-bottom: calc(var(--ff-battle-dock-rendered-height) + var(--ff-battle-dock-gap)) !important;
}

body.theme-ashen.screen-battle-active:not(.reward-flow-open) .battle-panel {
  min-height: 0 !important;
  padding: var(--ff-panel-padding) !important;
  position: relative;
  isolation: isolate;
}

body.theme-ashen .battle-panel .log-head {
  gap: var(--ff-section-gap) !important;
}

body.theme-ashen .battle-panel .log-head h2 {
  font-size: clamp(20px,var(--ff-heading-size),28px) !important;
  line-height: 1.04 !important;
  margin-bottom: 0 !important;
}

body.theme-ashen .battle-panel .section-label {
  margin-bottom: max(3px,calc(var(--ff-section-gap) - 4px)) !important;
}

body.theme-ashen .ruins-run-notice {
  margin: var(--ff-section-gap) 0 !important;
  padding: calc(var(--ff-card-padding) - 3px) var(--ff-card-padding) !important;
}

body.theme-ashen .tutorial-notice {
  margin: var(--ff-section-gap) 0 !important;
  padding: calc(var(--ff-card-padding) - 3px) var(--ff-card-padding) !important;
}

body.theme-ashen .battle-stage .combatant-enemy {
  grid-template-rows: auto auto minmax(var(--ff-battle-scene-min),1fr) auto auto !important;
}

body.theme-ashen .battle-action-dock {
  bottom: calc(var(--ff-bottom-nav-rendered-height) + var(--ff-battle-dock-gap)) !important;
  width: min(704px,calc(100% - (var(--ff-app-inline) * 2))) !important;
  padding: max(5px,calc(var(--ff-card-padding) - 4px)) !important;
  border-radius: var(--ff-panel-radius) !important;
}

body.theme-ashen .battle-action-row button {
  min-height: var(--ff-battle-action-height) !important;
  max-height: none !important;
}

body.theme-ashen .battle-action-dock .battle-meter-panel {
  margin-bottom: max(4px,calc(var(--ff-section-gap) - 3px)) !important;
  padding: max(4px,calc(var(--ff-card-padding) - 5px)) var(--ff-card-padding) 2px !important;
}

body.theme-ashen .battle-action-dock .attack-meter {
  height: clamp(16px,calc(var(--ff-battle-action-height) * .35),20px) !important;
}

body.theme-ashen .potion-action-row {
  margin-bottom: max(4px,calc(var(--ff-section-gap) - 3px)) !important;
}

body.theme-ashen .hero-combat-details {
  padding: var(--ff-card-padding) !important;
}

body.theme-ashen .hero-combat-details-grid {
  gap: max(4px,calc(var(--ff-card-gap) - 2px)) !important;
}

@media (max-width:479px) {
  html[data-ui-density="compact"] body.theme-ashen .enemy-card-header .combatant-name {
    font-size: 13px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .enemy-card-header .combatant-name {
    font-size: 12px !important;
    min-height: 2em !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="compact"] body.theme-ashen .enemy-level {
    min-height: 19px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="compact"] body.theme-ashen .enemy-tier {
    min-height: 19px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .enemy-level {
    min-height: 19px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .enemy-tier {
    min-height: 19px !important;
    padding: 2px 4px !important;
    font-size: 9px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="compact"] body.theme-ashen .enemy-trait {
    margin-bottom: 4px !important;
    padding: 4px 5px !important;
    font-size: 8.5px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .enemy-trait {
    margin-bottom: 4px !important;
    padding: 4px 5px !important;
    font-size: 8.5px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .enemy-info-button {
    width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .battle-panel .state {
    padding: 4px 6px !important;
    font-size: 9px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .zone-progress {
    margin: 3px 0 !important;
    font-size: 9px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .combat-mechanics-line {
    font-size: 9px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .crushing-charge-row {
    font-size: 9px !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .battle-action-dock .attack-meter-heading span {
    display: none !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen .battle-action-dock .attack-meter-labels {
    font-size: 8px !important;
    line-height: 1 !important;
  }
}

@media (max-width:479px) {
  html[data-ui-density="ultra"] body.theme-ashen #attackButton .battle-action-label {
    font-size: 14px !important;
  }
}

.battle-label-short {
  display: none;
}

body.theme-ashen.ruins-active #zoneProgress {
  display: none !important;
}

html[data-battle-fit="compact"] {
  --ff-battle-action-height: 50px;
}

html[data-battle-fit="compact"] body.theme-ashen .battle-action-dock {
  padding: 5px !important;
}

html[data-battle-fit="compact"] body.theme-ashen .battle-action-dock .battle-meter-panel {
  margin-bottom: 4px !important;
  padding: 4px 7px 2px !important;
}

html[data-battle-fit="compact"] body.theme-ashen .potion-action-row {
  margin-bottom: 4px !important;
}

html[data-battle-fit="compact"] body.theme-ashen .potion-action-row .ruins-heal-button {
  min-height: 34px !important;
  padding: 4px 8px !important;
}

html[data-battle-fit="compact"] body.theme-ashen .battle-action-row {
  gap: 5px !important;
}

html[data-battle-fit="compact"] body.theme-ashen .crushing-action>span:not(.battle-label-short) {
  display: none !important;
}

html[data-battle-fit="compact"] body.theme-ashen .battle-label-short {
  display: inline !important;
}

html[data-battle-fit="ultra"] {
  --ff-battle-action-height: 46px;
}

html[data-battle-fit="ultra"] body.theme-ashen .battle-action-dock {
  padding: 4px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .battle-action-dock .battle-meter-panel {
  margin-bottom: 3px !important;
  padding: 3px 6px 1px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .battle-action-dock .attack-meter-heading span {
  display: none !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .battle-action-dock .attack-meter-labels {
  margin-bottom: 2px !important;
  font-size: 7.5px !important;
  line-height: 1 !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .potion-action-row {
  margin-bottom: 3px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .potion-action-row .ruins-heal-button {
  min-height: 32px !important;
  padding: 3px 7px !important;
  font-size: 11px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .potion-action-row .ruins-heal-button small {
  font-size: 7.5px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .battle-action-row {
  gap: 4px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .battle-action-row button {
  padding: 5px 4px !important;
  font-size: 11px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .crushing-action>span:not(.battle-label-short) {
  display: none !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .battle-label-short {
  display: inline !important;
}

html[data-battle-fit="scroll"] {
  --ff-battle-action-height: 44px;
}

html[data-battle-fit="scroll"] body.theme-ashen .battle-action-dock {
  padding: 3px !important;
}

html[data-battle-fit="scroll"] body.theme-ashen .battle-action-dock .battle-meter-panel {
  margin-bottom: 2px !important;
  padding: 2px 5px 1px !important;
}

html[data-battle-fit="scroll"] body.theme-ashen .battle-action-dock .attack-meter-heading span {
  display: none !important;
}

html[data-battle-fit="scroll"] body.theme-ashen .potion-action-row .ruins-heal-button {
  min-height: 30px !important;
  padding: 2px 6px !important;
}

html[data-battle-fit="scroll"] body.theme-ashen .crushing-action>span:not(.battle-label-short) {
  display: none !important;
}

html[data-battle-fit="scroll"] body.theme-ashen .battle-label-short {
  display: inline !important;
}

html[data-battle-potion="present"][data-battle-fit="compact"] body.theme-ashen .battle-action-dock .attack-meter-heading {
  margin-bottom: 2px !important;
}

html[data-battle-potion="present"][data-battle-fit="ultra"] body.theme-ashen .battle-action-dock .attack-meter-heading {
  margin-bottom: 2px !important;
}

html[data-battle-potion="present"][data-battle-fit="scroll"] body.theme-ashen .battle-action-dock .attack-meter-heading {
  margin-bottom: 2px !important;
}

body.theme-ashen .enemy-combat-scene {
  display: grid !important;
  grid-template-rows: 28px minmax(0,1fr) !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  position: relative;
}

body.theme-ashen .enemy-intent-slot {
  position: relative;
  z-index: 12;
  grid-row: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  pointer-events: none;
}

body.theme-ashen .enemy-intent-slot .enemy-intent {
  position: relative !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 22px;
  margin: 0 !important;
  padding: 4px 6px !important;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  animation: none !important;
  font-size: 8.5px !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: none !important;
}

body.theme-ashen .enemy-intent-slot .enemy-intent.is-visible {
  opacity: 1;
  visibility: visible;
}

body.theme-ashen .enemy-combat-scene .enemy-figure {
  grid-row: 2;
  align-self: stretch !important;
  justify-self: stretch !important;
}

body.theme-ashen .heavy-sequence-state.is-visible {
  opacity: 1;
  visibility: visible;
}

html[data-battle-fit="compact"] body.theme-ashen .enemy-combat-scene {
  grid-template-rows: 24px minmax(0,1fr) !important;
}

html[data-battle-fit="compact"] body.theme-ashen .enemy-intent-slot {
  min-height: 24px;
}

html[data-battle-fit="compact"] body.theme-ashen .enemy-intent-slot .enemy-intent {
  min-height: 19px;
  padding: 3px 5px !important;
  font-size: 7.5px !important;
}

html[data-battle-fit="compact"] body.theme-ashen .heavy-sequence-state {
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 5px 8px !important;
  font-size: 11.5px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .enemy-combat-scene {
  grid-template-rows: 20px minmax(0,1fr) !important;
}

html[data-battle-fit="scroll"] body.theme-ashen .enemy-combat-scene {
  grid-template-rows: 20px minmax(0,1fr) !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .enemy-intent-slot {
  min-height: 20px;
}

html[data-battle-fit="scroll"] body.theme-ashen .enemy-intent-slot {
  min-height: 20px;
}

html[data-battle-fit="ultra"] body.theme-ashen .enemy-intent-slot .enemy-intent {
  min-height: 17px;
  padding: 2px 4px !important;
  font-size: 7px !important;
}

html[data-battle-fit="scroll"] body.theme-ashen .enemy-intent-slot .enemy-intent {
  min-height: 17px;
  padding: 2px 4px !important;
  font-size: 7px !important;
}

html[data-battle-fit="ultra"] body.theme-ashen .heavy-sequence-state {
  min-height: 27px !important;
  max-height: 27px !important;
  padding: 4px 7px !important;
  font-size: 10.5px !important;
}

html[data-battle-fit="scroll"] body.theme-ashen .heavy-sequence-state {
  min-height: 27px !important;
  max-height: 27px !important;
  padding: 4px 7px !important;
  font-size: 10.5px !important;
}

body.theme-ashen .enemy-berserk-badge[hidden] {
  display: none !important;
}

body.theme-ashen .enemy-berserk-badge {
  position: absolute;
  z-index: 22;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 14px);
  min-height: 22px;
  padding: 3px 9px;
  border: 1px solid rgba(255,111,67,.82);
  border-radius: 999px;
  background: linear-gradient(180deg,rgba(99,28,18,.94),rgba(45,12,9,.96));
  color: #ffe1c3;
  box-shadow: 0 0 0 2px rgba(255,77,39,.12),0 0 18px rgba(255,69,31,.28);
  font: 900 9px/1 system-ui,sans-serif;
  letter-spacing: .07em;
  white-space: nowrap;
  pointer-events: none;
}

body.theme-ashen .combatant-enemy.enemy-berserk {
  border-color: rgba(239,83,48,.92) !important;
  box-shadow: inset 0 0 42px rgba(118,29,17,.22),0 0 0 2px rgba(239,83,48,.16),0 0 22px rgba(219,55,31,.25) !important;
}

body.theme-ashen .combatant-enemy.enemy-berserk .enemy-figure {
  filter: brightness(1.08) saturate(1.28) drop-shadow(0 0 10px rgba(230,69,35,.28));
}

body.theme-ashen .combatant-enemy.enemy-berserk .enemy-trait {
  border-color: rgba(231,87,50,.48) !important;
  color: #f0b28f !important;
}

body.theme-ashen .combatant-enemy.enemy-berserk-enter {
  animation: ffBerserkEnter .68s cubic-bezier(.18,.78,.2,1) both !important;
}

body.theme-ashen .combatant.hit {
  animation: ffHitOnce .42s ease-out both !important;
}

body.theme-ashen .combatant.hit-strong {
  animation: ffHitStrongOnce .50s ease-out both !important;
}

body.theme-ashen .combatant.hit-perfect {
  animation: ffHitPerfectOnce .54s ease-out both !important;
}

body.theme-ashen .combatant.hit-critical {
  animation: ffHitCriticalOnce .58s ease-out both !important;
}

body.theme-ashen .combatant.hit-power {
  animation: ffHitPowerOnce .58s ease-out both !important;
}

@media (max-width:520px) {
  body.theme-ashen .crushing-action>span:not(.battle-label-short) {
    display: none !important;
  }
}

@media (max-width:520px) {
  body.theme-ashen .crushing-action>.battle-label-short {
    display: inline !important;
    white-space: nowrap;
  }
}

@media (max-width:380px) {
  body.theme-ashen .enemy-berserk-badge {
    bottom: 4px;
    min-height: 19px;
    padding: 2px 6px;
    font-size: 7.5px;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant-enemy.enemy-berserk-enter {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.hit {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.hit-strong {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.hit-perfect {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.hit-critical {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.hit-power {
    animation: none !important;
  }
}

body.theme-ashen.screen-battle-active .battle-panel::before {
  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 {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  z-index: -1;
  opacity: .55;
  mix-blend-mode: screen;
}

body.theme-ashen[data-zone="easy"] .battle-panel::before {
  background: radial-gradient(circle at 72% 28%,rgba(76,122,77,.16),transparent 36%),linear-gradient(180deg,rgba(12,30,22,.22),transparent 48%);
}

body.theme-ashen[data-zone="medium"] .battle-panel::before {
  background: radial-gradient(circle at 74% 24%,rgba(48,103,83,.18),transparent 35%),linear-gradient(180deg,rgba(5,24,20,.30),transparent 52%);
}

body.theme-ashen[data-zone="hard"] .battle-panel::before {
  background: radial-gradient(circle at 72% 25%,rgba(93,70,111,.16),transparent 34%),linear-gradient(180deg,rgba(22,17,31,.30),transparent 52%);
}

body.theme-ashen[data-zone="ash_border"] .battle-panel::before {
  background: radial-gradient(circle at 73% 25%,rgba(166,66,34,.18),transparent 36%),linear-gradient(180deg,rgba(46,20,13,.25),transparent 52%);
}

body.theme-ashen[data-zone="echo_pits"] .battle-panel::before {
  background: radial-gradient(circle at 72% 25%,rgba(39,127,126,.18),transparent 36%),linear-gradient(180deg,rgba(9,36,36,.28),transparent 52%);
}

body.theme-ashen[data-zone="zero_node"] .battle-panel::before {
  background: radial-gradient(circle at 72% 25%,rgba(47,157,177,.18),transparent 36%),linear-gradient(180deg,rgba(7,29,38,.30),transparent 52%);
}

body.theme-ashen[data-zone="ruins"] .battle-panel::before {
  background: radial-gradient(circle at 72% 25%,rgba(39,137,128,.16),transparent 36%),linear-gradient(180deg,rgba(9,30,29,.30),transparent 52%);
}

body.theme-ashen[data-zone="ash_border"] .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="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 {
  background: radial-gradient(ellipse at 70% 32%,rgba(85,225,211,.10),transparent 43%);
  animation: ffAmbientPulse 7s ease-in-out infinite;
}

body.theme-ashen[data-zone="zero_node"] .battle-panel::after {
  background: radial-gradient(ellipse at 70% 32%,rgba(85,225,211,.10),transparent 43%);
  animation: ffAmbientPulse 7s ease-in-out infinite;
}

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;
}

body.theme-ashen .battle-action-row {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) minmax(0,2fr) !important;
  align-items: stretch !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .battle-panel {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .battle-stage {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 8px !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .battle-stage .combatant {
  height: clamp(190px,52vw,232px) !important;
  min-height: 190px !important;
  max-height: 232px !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .combat-mechanics-status {
  display: none !important;
}

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 {
  margin-top: 8px !important;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 8px 0 0 !important;
  transform: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .battle-main-action {
  margin-top: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 6px 0 0 !important;
  box-sizing: border-box !important;
}

body.theme-ashen .combatant-enemy.state-armor-break {
  animation: ffArmorBreak .62s ease-out both !important;
}

body.theme-ashen .battle-stage.state-danger-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 74% 42%,rgba(255,68,35,.22),transparent 34%);
  animation: ffDangerFlash .42s ease-out both;
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .battle-panel::after {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .figure {
    animation: none !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant-enemy.enemy-power-intent .enemy-figure {
    animation: none !important;
  }
}

body.theme-ashen.screen-battle-active.battle-encounter-choice #screenBattle {
  overflow-x: hidden !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .battle-screen {
  overflow-x: hidden !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .combat-scene .figure {
  min-height: 64px !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .combatant-enemy .enemy-figure[data-art="boss"] {
  background-size: 122% auto !important;
  animation: none !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .combatant-enemy .enemy-figure[data-art="unknown"] {
  background-size: 122% auto !important;
  animation: none !important;
}

body.theme-ashen.screen-battle-active.battle-encounter-choice .combatant-hero .hero-figure {
  background-size: 104% auto !important;
  animation: none !important;
}

body.theme-ashen .zone-progress {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body.theme-ashen.screen-battle-active.battle-ending-active #zoneProgress {
  display: none !important;
}

body.theme-ashen.screen-battle-active #zoneProgress:empty {
  display: none !important;
}

body.theme-ashen.screen-battle-active .enemy-trait:not([hidden]) {
  min-height: 22px !important;
  max-height: 24px !important;
  padding: 4px 7px !important;
  font-size: 9.5px !important;
}

body.theme-ashen.screen-battle-active .enemy-trait[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.hit {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.hit-strong {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.hit-perfect {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.hit-critical {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.hit-power {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.defense-block {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.defense-parry {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.response-counter {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant.response-parry {
    animation: ffRc47ImpactFlash .34s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .damage-float.show {
    animation: ffRc47DamageFade .82s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .damage-float.visible {
    animation: ffRc47DamageFade .82s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.enemy-berserk-enter {
    animation: ffRc47StateFlash .42s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.state-armor-break {
    animation: ffRc47StateFlash .42s ease-out both !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.theme-ashen.screen-battle-active .battle-stage.state-danger-flash {
    animation: ffRc47StateFlash .42s ease-out both !important;
  }
}

body.theme-ashen.screen-battle-active .combat-strike-fx {
  z-index: 48;
  will-change: transform, opacity, filter;
}

body.theme-ashen.screen-battle-active .combat-strike-fx.show {
  display: block !important;
  visibility: visible !important;
  animation: ffRc48StrikeTravel .42s cubic-bezier(.16, .75, .25, 1) both !important;
}

body.theme-ashen.screen-battle-active .combat-strike-fx.outgoing {
  height: 6px;
  filter: drop-shadow(0 0 9px rgba(85, 220, 191, .92));
}

body.theme-ashen.screen-battle-active .combat-strike-fx.incoming {
  height: 6px;
  filter: drop-shadow(0 0 9px rgba(224, 92, 66, .94));
}

body.theme-ashen.screen-battle-active .combat-strike-fx.impact-power {
  height: 8px;
}

body.theme-ashen.screen-battle-active .combatant-enemy.hit {
  animation: ffRc48ImpactEnemy .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-enemy.hit-strong {
  animation: ffRc48ImpactEnemy .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-enemy.hit-perfect {
  animation: ffRc48ImpactEnemy .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-enemy.hit-critical {
  animation: ffRc48ImpactEnemy .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-enemy.hit-power {
  animation: ffRc48ImpactEnemy .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-enemy.response-counter {
  animation: ffRc48ImpactEnemy .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-enemy.response-parry {
  animation: ffRc48ImpactEnemy .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-hero.hit {
  animation: ffRc48ImpactHero .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-hero.hit-strong {
  animation: ffRc48ImpactHero .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-hero.hit-perfect {
  animation: ffRc48ImpactHero .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-hero.hit-critical {
  animation: ffRc48ImpactHero .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-hero.hit-power {
  animation: ffRc48ImpactHero .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant-hero.poison-tick {
  animation: ffRc48ImpactHero .34s cubic-bezier(.2, .8, .2, 1) both !important;
}

body.theme-ashen.screen-battle-active .combatant.attack-lunge-right {
  animation: ffRc48LungeRight .34s ease-out both !important;
}

body.theme-ashen.screen-battle-active .combatant.attack-lunge-left {
  animation: ffRc48LungeLeft .34s ease-out both !important;
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.hit {
    animation-name: ffRc48ImpactEnemyReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.hit-strong {
    animation-name: ffRc48ImpactEnemyReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.hit-perfect {
    animation-name: ffRc48ImpactEnemyReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.hit-critical {
    animation-name: ffRc48ImpactEnemyReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.hit-power {
    animation-name: ffRc48ImpactEnemyReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.response-counter {
    animation-name: ffRc48ImpactEnemyReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-enemy.response-parry {
    animation-name: ffRc48ImpactEnemyReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-hero.hit {
    animation-name: ffRc48ImpactHeroReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-hero.hit-strong {
    animation-name: ffRc48ImpactHeroReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-hero.hit-perfect {
    animation-name: ffRc48ImpactHeroReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-hero.hit-critical {
    animation-name: ffRc48ImpactHeroReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-hero.hit-power {
    animation-name: ffRc48ImpactHeroReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant-hero.poison-tick {
    animation-name: ffRc48ImpactHeroReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant.attack-lunge-right {
    animation-name: ffRc48LungeRightReduced !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen.screen-battle-active .combatant.attack-lunge-left {
    animation-name: ffRc48LungeLeftReduced !important;
  }
}

/* Referenced one-shot state keyframes. */
@keyframes ffAmbientDrift{from{background-position:0 20px,20px 0}to{background-position:0 -120px,20px -92px}}

@keyframes ffAmbientPulse{0%,100%{opacity:.28;transform:scale(1)}50%{opacity:.64;transform:scale(1.018)}}

@keyframes ffArmorBreak{0%,100%{filter:none}28%{filter:brightness(1.9) contrast(1.15);transform:scale(1.025)}45%{filter:brightness(.7);transform:scale(.99)}}

@keyframes ffBerserkEnter{
  0%{filter:brightness(1);transform:translateZ(0)}
  35%{filter:brightness(1.62) saturate(1.45);transform:translateZ(0) scale(1.018)}
  100%{filter:brightness(1);transform:translateZ(0) scale(1)}
}

@keyframes ffDangerFlash{from{opacity:0}40%{opacity:1}to{opacity:0}}

@keyframes ffHitCriticalOnce{0%,100%{transform:translate3d(0,0,0) scale(1)}30%{transform:translate3d(14px,0,0) scale(1.036);filter:brightness(2.05) saturate(1.25)}}

@keyframes ffHitOnce{0%,100%{transform:translate3d(0,0,0)}38%{transform:translate3d(7px,0,0);filter:brightness(1.45)}}

@keyframes ffHitPerfectOnce{0%,100%{transform:translate3d(0,0,0) scale(1)}32%{transform:translate3d(12px,0,0) scale(1.028);filter:brightness(1.9)}}

@keyframes ffHitPowerOnce{0%,100%{transform:translate3d(0,0,0)}32%{transform:translate3d(-10px,0,0);filter:brightness(1.85) saturate(1.2)}}

@keyframes ffHitStrongOnce{0%,100%{transform:translate3d(0,0,0) scale(1)}34%{transform:translate3d(10px,0,0) scale(1.02);filter:brightness(1.72)}}

@keyframes ffRc47DamageFade{
  0%{opacity:0;filter:brightness(1)}
  18%,72%{opacity:1;filter:brightness(1.18)}
  100%{opacity:0;filter:brightness(1)}
}

@keyframes ffRc47ImpactFlash{
  0%,100%{filter:brightness(1) saturate(1);opacity:1}
  38%{filter:brightness(1.72) saturate(1.18);opacity:.92}
}

@keyframes ffRc47StateFlash{
  0%,100%{filter:brightness(1) saturate(1)}
  42%{filter:brightness(1.42) saturate(1.25)}
}

@keyframes ffRc48ImpactEnemy {
  0%, 100% { transform: translate3d(0, 0, 0); }
  34% { transform: translate3d(8px, 0, 0); }
}

@keyframes ffRc48ImpactEnemyReduced {
  0%, 100% { transform: translate3d(0, 0, 0); }
  36% { transform: translate3d(4px, 0, 0); }
}

@keyframes ffRc48ImpactHero {
  0%, 100% { transform: translate3d(0, 0, 0); }
  34% { transform: translate3d(-8px, 0, 0); }
}

@keyframes ffRc48ImpactHeroReduced {
  0%, 100% { transform: translate3d(0, 0, 0); }
  36% { transform: translate3d(-4px, 0, 0); }
}

@keyframes ffRc48LungeLeft {
  0%, 100% { transform: translate3d(0, 0, 0); }
  42% { transform: translate3d(-5px, 0, 0); }
}

@keyframes ffRc48LungeLeftReduced {
  0%, 100% { transform: translate3d(0, 0, 0); }
  44% { transform: translate3d(-3px, 0, 0); }
}

@keyframes ffRc48LungeRight {
  0%, 100% { transform: translate3d(0, 0, 0); }
  42% { transform: translate3d(5px, 0, 0); }
}

@keyframes ffRc48LungeRightReduced {
  0%, 100% { transform: translate3d(0, 0, 0); }
  44% { transform: translate3d(3px, 0, 0); }
}

@keyframes ffRc48StrikeTravel {
  0% {
    opacity: 0;
    transform: rotate(var(--strike-angle, 0deg)) scaleX(.05);
  }
  15% { opacity: 1; }
  72% {
    opacity: 1;
    transform: rotate(var(--strike-angle, 0deg)) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--strike-angle, 0deg)) scaleX(1.04);
  }
}

@keyframes poisonTickRc21{0%{box-shadow:inset 0 0 0 rgba(64,220,86,0)}35%{border-color:#55d868;box-shadow:inset 0 0 42px rgba(48,198,70,.38),0 0 22px rgba(48,198,70,.32)}100%{box-shadow:inset 0 0 22px rgba(45,128,55,.12),0 0 12px rgba(52,143,65,.12)}}

@keyframes rc25HealPulse {
  0%{border-color:inherit;box-shadow:inset 0 0 0 rgba(68,226,112,0)}
  30%{border-color:#73df8c;box-shadow:inset 0 0 42px rgba(57,200,92,.32),0 0 20px rgba(57,200,92,.24)}
  100%{box-shadow:inset 0 0 0 rgba(68,226,112,0)}
}

@keyframes rc25PoisonTelegraph {from{filter:saturate(.9);transform:translateZ(0)}to{filter:saturate(1.25);box-shadow:0 0 22px rgba(47,190,70,.34)}}

@keyframes rc31AttackLungeLeft{0%,100%{transform:translate3d(0,0,0)}42%{transform:translate3d(-6px,0,0)}}

@keyframes rc31AttackLungeRight{0%,100%{transform:translate3d(0,0,0)}42%{transform:translate3d(6px,0,0)}}

@keyframes rc31StrikeReduced{0%{opacity:0;transform:rotate(var(--strike-angle,0deg)) scaleX(1)}50%{opacity:.8}100%{opacity:0;transform:rotate(var(--strike-angle,0deg)) scaleX(1)}}

@keyframes rc31StrikeTravel{
  0%{opacity:0;transform:rotate(var(--strike-angle,0deg)) scaleX(.04)}
  18%{opacity:1}
  72%{opacity:1;transform:rotate(var(--strike-angle,0deg)) scaleX(1)}
  100%{opacity:0;transform:rotate(var(--strike-angle,0deg)) scaleX(1.04)}
}


/* RC60: compact segmented armor feedback. */
body.theme-ashen .combat-armor-state {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

body.theme-ashen .combat-armor-state > strong {
  color: #e8c985;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: left;
}

body.theme-ashen .combat-armor-segments {
  display: flex;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

body.theme-ashen .combat-armor-segment {
  position: relative;
  flex: 1 1 0;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(218, 177, 99, .48);
  border-radius: 999px;
  background: rgba(20, 17, 13, .92);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .72);
}

body.theme-ashen .combat-armor-segment > b {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #756343, #d2aa62 70%, #f0d898);
  box-shadow: 0 0 8px rgba(224, 184, 104, .28);
  transition: width .24s ease, opacity .24s ease;
}

body.theme-ashen .combat-armor-segment.active {
  border-color: rgba(244, 207, 126, .92);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .72), 0 0 8px rgba(229, 184, 92, .22);
}

body.theme-ashen .combat-armor-segment.broken {
  border-color: rgba(93, 82, 65, .32);
  background: rgba(11, 11, 10, .72);
}

body.theme-ashen .combat-armor-segment.broken > b {
  width: 0 !important;
  opacity: 0;
}

/* RC61: keep the combat workspace stable while a fixed-strength action replaces the attack meter. */
body.theme-ashen .battle-meter-panel.meter-suspended {
  position: relative;
  display: block !important;
  pointer-events: none;
}

body.theme-ashen .battle-meter-panel.meter-suspended > * {
  visibility: hidden !important;
}

body.theme-ashen .battle-meter-panel.meter-suspended::after {
  content: attr(data-meter-title) "\A" attr(data-meter-detail);
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 8px 12px;
  color: #e7d4a2;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(13px, 3.2vw, 17px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: pre-line;
}


@media (max-width: 479px) {
  body.theme-ashen .battle-meter-panel.meter-suspended::after {
    padding: 5px 8px;
    font-size: 12px;
  }
}


/* RC62: stable battle guidance and segmented enemy armor. */
body.theme-ashen .combat-mechanics-status .combat-guidance-slot {
  grid-column: 1 / -1;
  box-sizing: border-box;
  display: grid !important;
  place-items: center;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  margin: 0 !important;
  padding: 5px 8px !important;
  overflow: hidden;
  border-radius: 7px;
  font-size: 9px !important;
  line-height: 1.18 !important;
  text-align: center;
  transition: opacity .16s ease, border-color .16s ease, background-color .16s ease;
}

body.theme-ashen .combat-mechanics-status .combat-guidance-slot[hidden] {
  display: grid !important;
  visibility: hidden !important;
  opacity: 0;
  pointer-events: none;
}

body.theme-ashen .enemy-armor-wrap {
  box-sizing: border-box;
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 24px;
  margin-top: 3px;
}

body.theme-ashen .enemy-armor-wrap[hidden] {
  display: none;
}

body.theme-ashen .enemy-armor-wrap[hidden][data-reserved="1"] {
  display: grid !important;
  visibility: hidden !important;
  pointer-events: none;
}

body.theme-ashen .enemy-armor-segments {
  display: flex;
  gap: 4px;
  width: 100%;
  min-width: 0;
  height: 9px;
}

body.theme-ashen .enemy-armor-segment {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(218,177,99,.55);
  border-radius: 999px;
  background: rgba(17,15,12,.92);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.72);
}

body.theme-ashen .enemy-armor-segment > b {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg,#756343,#d2aa62 70%,#f0d898);
  box-shadow: 0 0 8px rgba(224,184,104,.3);
  transition: width .24s ease, opacity .24s ease;
}

body.theme-ashen .enemy-armor-segment.active {
  border-color: rgba(246,211,136,.96);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.72),0 0 8px rgba(229,184,92,.28);
}

body.theme-ashen .enemy-armor-segment.broken {
  border-color: rgba(93,82,65,.34);
  background: rgba(10,10,9,.72);
}

body.theme-ashen .enemy-armor-segment.broken > b {
  width: 0 !important;
  opacity: 0;
}

body.theme-ashen .enemy-armor-label {
  min-width: 0;
  color: #e2c789;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 479px) {
  body.theme-ashen .combat-mechanics-status .combat-guidance-slot {
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 4px 6px !important;
    font-size: 8px !important;
    line-height: 1.12 !important;
  }
  body.theme-ashen .enemy-armor-wrap {
    gap: 3px;
    min-height: 22px;
    margin-top: 2px;
  }
  body.theme-ashen .enemy-armor-segments,
  body.theme-ashen .enemy-armor-segment {
    height: 8px;
  }
  body.theme-ashen .enemy-armor-segments {
    gap: 3px;
  }
  body.theme-ashen .enemy-armor-label {
    font-size: 7.5px;
    line-height: 1.1;
  }
}

html[data-battle-fit="ultra"] body.theme-ashen .combat-mechanics-status .combat-guidance-slot {
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  padding: 3px 5px !important;
  font-size: 7.5px !important;
}

/* RC64: battle screen hierarchy, compact commands and stable enemy zones. */
body.theme-ashen.screen-battle-active:not(.reward-flow-open) .battle-panel #battleTitle {
  display: none !important;
}

body.theme-ashen.screen-battle-active:not(.reward-flow-open) .battle-panel > .log-head {
  min-height: 30px;
  margin-bottom: 2px !important;
  align-items: center;
}

body.theme-ashen.screen-battle-active:not(.reward-flow-open) .battle-panel > .log-head .section-label {
  margin: 0 !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
}

body.theme-ashen .combat-event-channel {
  display: block !important;
  min-height: 0 !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.theme-ashen .combat-event-channel[hidden] {
  display: none !important;
}

body.theme-ashen .combat-event-channel .combat-mechanics-legacy,
body.theme-ashen .combat-event-channel .combat-effect-state,
body.theme-ashen .combat-event-channel .combat-preview-state {
  display: none !important;
}

body.theme-ashen .combat-event-channel .combat-guidance-slot {
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  overflow: hidden;
  border: 1px solid rgba(123,151,139,.28);
  border-radius: 7px;
  background: rgba(12,22,19,.82);
  color: #b9c8c0;
  font-size: 9px !important;
  font-weight: 800;
  line-height: 1.18 !important;
  text-align: center;
  white-space: normal !important;
}

body.theme-ashen .combat-event-channel .combat-guidance-slot[hidden] {
  display: none !important;
}

body.theme-ashen .combat-quick-row {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  margin: 0 2px 4px;
  padding: 0 3px;
}

body.theme-ashen .combat-quick-row[hidden] {
  display: none !important;
}

body.theme-ashen .combat-quick-row .crushing-charge-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
}

body.theme-ashen .combat-quick-row .crushing-charge-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  color: #c7c2ae;
  font-size: 9px !important;
  font-weight: 800;
  line-height: 1 !important;
  text-align: right !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-ashen .combat-quick-row .crushing-charge-segments {
  display: grid !important;
  grid-template-columns: repeat(3,18px) !important;
  gap: 4px !important;
  width: auto !important;
}

body.theme-ashen .combat-quick-row .crushing-charge-segments i {
  height: 6px !important;
}

body.theme-ashen .combat-quick-row .potion-action-row {
  margin: 0 !important;
}

body.theme-ashen .combat-quick-row .ruins-heal-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 48px;
  min-width: 48px;
  min-height: 26px !important;
  max-height: 28px !important;
  padding: 2px 7px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

body.theme-ashen .combat-quick-row .ruins-heal-button b {
  font-size: 10px;
  font-weight: 900;
}

body.theme-ashen .battle-action-dock .battle-meter-panel {
  margin-bottom: 4px !important;
}

body.theme-ashen .battle-stage .combatant {
  min-height: clamp(284px,40dvh,390px) !important;
}

body.theme-ashen .battle-stage .combatant-hero {
  grid-template-rows: auto minmax(118px,1fr) auto !important;
}

body.theme-ashen .battle-stage .combatant-enemy {
  grid-template-rows: auto minmax(112px,1fr) auto auto !important;
}

body.theme-ashen .enemy-card-header {
  gap: 4px !important;
  padding-bottom: 5px !important;
}

body.theme-ashen .enemy-combat-scene {
  min-height: 112px;
}

body.theme-ashen .enemy-role.armor-redundant {
  display: none !important;
}

body.theme-ashen .enemy-state-stack {
  gap: 4px !important;
}

body.theme-ashen .enemy-armor-wrap {
  display: grid !important;
  gap: 3px !important;
  min-height: 24px !important;
  margin: 1px 0 0 !important;
}

body.theme-ashen .enemy-armor-wrap[hidden] {
  display: none !important;
}

body.theme-ashen .enemy-armor-wrap[hidden][data-reserved="1"] {
  display: grid !important;
  visibility: hidden !important;
  pointer-events: none;
}

body.theme-ashen .enemy-armor-segments {
  display: flex !important;
  gap: 5px !important;
  height: 15px !important;
}

body.theme-ashen .enemy-armor-segment {
  position: relative;
  display: grid;
  place-items: center;
  height: 15px !important;
  overflow: hidden;
  border: 1px solid rgba(193,159,91,.55) !important;
  border-radius: 4px !important;
  background: rgba(16,15,12,.9) !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.68) !important;
}

body.theme-ashen .enemy-armor-segment > b {
  z-index: 0;
  border-radius: 2px !important;
  opacity: .78;
}

body.theme-ashen .enemy-armor-segment > span {
  position: relative;
  z-index: 1;
  color: #f1e3bd;
  font-size: 7.5px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px #000;
}

body.theme-ashen .enemy-armor-segment.broken > span {
  color: #706b5f;
}

body.theme-ashen .enemy-armor-label {
  min-height: 9px;
  overflow: hidden;
  color: #d7b96f !important;
  font-size: 7.5px !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

body.theme-ashen .enemy-combat-scene .combat-feedback-layer {
  top: 48% !important;
  z-index: 26 !important;
}

body.theme-ashen .enemy-combat-scene .combat-feedback-layer::before {
  max-width: 120px !important;
  font-size: .38em !important;
  white-space: nowrap !important;
}

body.theme-ashen .combatant-hero.defense-passive .combat-feedback-layer::before {
  display: none !important;
}

@media (max-width: 479px) {
  body.theme-ashen .combat-quick-row {
    min-height: 23px;
    margin-bottom: 3px;
  }
  body.theme-ashen .combat-quick-row .crushing-charge-row > span:first-child {
    max-width: 108px;
    font-size: 8px !important;
  }
  body.theme-ashen .combat-quick-row .crushing-charge-segments {
    grid-template-columns: repeat(3,16px) !important;
    gap: 3px !important;
  }
  body.theme-ashen .combat-quick-row .ruins-heal-button {
    width: 44px;
    min-width: 44px;
    min-height: 24px !important;
    padding: 2px 5px !important;
  }
  body.theme-ashen .battle-stage .combatant {
    min-height: clamp(268px,39dvh,350px) !important;
  }
  body.theme-ashen .battle-stage .combatant-enemy {
    grid-template-rows: auto minmax(100px,1fr) auto auto !important;
  }
  body.theme-ashen .enemy-armor-segments,
  body.theme-ashen .enemy-armor-segment {
    height: 14px !important;
  }
  body.theme-ashen .enemy-armor-segment > span {
    font-size: 7px;
  }
  body.theme-ashen .enemy-armor-label {
    font-size: 7px !important;
  }
}

@media (max-width: 370px) {
  body.theme-ashen .combat-quick-row .crushing-charge-row > span:first-child {
    display: none;
  }
  body.theme-ashen .battle-stage .combatant {
    min-height: 258px !important;
  }
}

/* RC66: integrated attack-meter header, unambiguous armor telegraph and single passive-block label. */
body.theme-ashen .battle-action-dock .attack-meter-heading {
  display: grid !important;
  grid-template-columns: auto minmax(0,1fr) !important;
  align-items: center !important;
  gap: 3px 8px !important;
  min-height: 28px;
  margin-bottom: 4px !important;
}

body.theme-ashen .battle-action-dock .attack-meter-heading > strong {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  white-space: nowrap;
}

body.theme-ashen .battle-action-dock .attack-meter-heading > .combat-quick-row {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: end;
  gap: 8px;
  min-width: 0;
  min-height: 24px;
  margin: 0 !important;
  padding: 0 !important;
}

body.theme-ashen .battle-action-dock .attack-meter-heading > .combat-quick-row[hidden] {
  display: none !important;
}

body.theme-ashen .battle-action-dock .attack-meter-heading > #attackMeterHint {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  margin: 0;
  text-align: right;
  line-height: 1.15;
}

body.theme-ashen .battle-action-dock .attack-meter-heading > #attackMeterHint[hidden] {
  display: none !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .crushing-charge-row {
  display: inline-grid !important;
  grid-template-columns: auto auto !important;
  align-items: center !important;
  justify-content: end !important;
  gap: 5px !important;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .crushing-charge-row > span:first-child {
  display: inline-block !important;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  color: #d5b45f;
  font-size: 12px !important;
  line-height: 1 !important;
  text-align: center !important;
  text-overflow: clip !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .crushing-charge-segments {
  display: grid !important;
  grid-template-columns: repeat(3,17px) !important;
  gap: 3px !important;
  width: auto !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .crushing-charge-segments i {
  height: 6px !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .potion-action-row {
  margin: 0 !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .ruins-heal-button {
  width: 46px;
  min-width: 46px;
  min-height: 24px !important;
  max-height: 24px !important;
  padding: 2px 6px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.theme-ashen .combatant-hero.defense-passive::after {
  display: none !important;
  content: none !important;
}

body.theme-ashen .enemy-armor-label {
  min-height: 17px !important;
  overflow: visible !important;
  font-size: 7.5px !important;
  line-height: 1.1 !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

body.theme-ashen .enemy-defeat-banner {
  padding-block: 10px !important;
  letter-spacing: .1em !important;
  box-shadow: 0 0 24px rgba(202,164,86,.18),0 10px 28px rgba(0,0,0,.72) !important;
}

body.theme-ashen .enemy-defeat-banner.rare,
body.theme-ashen .enemy-defeat-banner.boss {
  box-shadow: 0 0 30px rgba(202,164,86,.3),0 12px 32px rgba(0,0,0,.78) !important;
}

@media (max-width: 390px) {
  body.theme-ashen .battle-action-dock .attack-meter-heading {
    gap: 2px 5px !important;
  }
  body.theme-ashen .battle-action-dock .attack-meter-heading > strong {
    font-size: 10px !important;
  }
  body.theme-ashen .battle-action-dock .attack-meter-heading > .combat-quick-row {
    gap: 5px;
  }
  body.theme-ashen .attack-meter-heading .combat-quick-row .crushing-charge-segments {
    grid-template-columns: repeat(3,14px) !important;
    gap: 2px !important;
  }
  body.theme-ashen .attack-meter-heading .combat-quick-row .ruins-heal-button {
    width: 42px;
    min-width: 42px;
    padding-inline: 4px !important;
  }
  body.theme-ashen .enemy-armor-label {
    font-size: 7px !important;
  }
}


/* RC67: reliable potion hit target and attack-meter geometry independent of crushing readiness. */
body.theme-ashen .battle-action-dock .battle-meter-panel {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.theme-ashen .battle-action-dock .attack-meter {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 18px !important;
  flex: 0 0 18px !important;
}

body.theme-ashen .battle-action-dock .attack-meter-heading {
  min-height: 32px !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row,
body.theme-ashen .attack-meter-heading .combat-quick-row .potion-action-row,
body.theme-ashen .attack-meter-heading .combat-quick-row .ruins-heal-button {
  position: relative;
  z-index: 4;
  pointer-events: auto !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .ruins-heal-button {
  width: 56px !important;
  min-width: 56px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .ruins-heal-button > span {
  font-size: 14px !important;
}

body.theme-ashen .attack-meter-heading .combat-quick-row .ruins-heal-button b {
  font-size: 11px !important;
}

@media (max-width: 390px) {
  body.theme-ashen .attack-meter-heading .combat-quick-row .ruins-heal-button {
    width: 52px !important;
    min-width: 52px !important;
    min-height: 29px !important;
    max-height: 29px !important;
    padding-inline: 6px !important;
  }
}

/* RC68: cleaner enemy hierarchy, stronger armor telegraph and explicit action states. */
body.theme-ashen .enemy-tier {
  display: none !important;
}

body.theme-ashen .battle-action-dock .attack-meter-heading > .combat-quick-row {
  gap: 14px !important;
}

body.theme-ashen .enemy-intent.armor-crushing-intent {
  border-color: rgba(225,154,76,.92) !important;
  background: linear-gradient(90deg,rgba(92,31,17,.9),rgba(132,55,24,.92),rgba(92,31,17,.9)) !important;
  color: #ffe0a0 !important;
  box-shadow: 0 0 0 1px rgba(255,207,112,.16),0 0 18px rgba(218,91,40,.24) !important;
  letter-spacing: .09em !important;
}

body.theme-ashen .combatant-enemy.enemy-armor-crushing-intent {
  border-color: rgba(221,116,54,.94) !important;
  box-shadow: inset 0 0 0 1px rgba(255,193,101,.12),0 0 18px rgba(187,57,29,.22) !important;
}

body.theme-ashen .combatant-enemy.enemy-armor-crushing-intent .enemy-armor-segment:not(.broken) {
  animation: armorDangerPulse 1.05s ease-in-out infinite;
}

@keyframes armorDangerPulse {
  0%,100% { filter: brightness(1); box-shadow: inset 0 0 0 1px rgba(255,205,108,.08); }
  50% { filter: brightness(1.18); box-shadow: inset 0 0 0 1px rgba(255,218,137,.28),0 0 8px rgba(223,122,50,.2); }
}

body.theme-ashen .crushing-action.resource-empty {
  opacity: .62 !important;
  filter: saturate(.55) !important;
  border-style: dashed !important;
}

body.theme-ashen .crushing-action.resource-empty .battle-action-icon,
body.theme-ashen .crushing-action.resource-empty span {
  color: rgba(224,214,187,.72) !important;
}

body.theme-ashen .crushing-action.resource-ready {
  opacity: 1 !important;
  filter: none !important;
  border-style: solid !important;
  box-shadow: inset 0 0 0 1px rgba(255,231,157,.18),0 0 16px rgba(190,135,47,.18) !important;
}

body.theme-ashen .crushing-action.action-busy,
body.theme-ashen .battle-action-row button.action-processing {
  opacity: .72 !important;
  filter: grayscale(.18) !important;
}

@media (max-width: 390px) {
  body.theme-ashen .battle-action-dock .attack-meter-heading > .combat-quick-row {
    gap: 11px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen .combatant-enemy.enemy-armor-crushing-intent .enemy-armor-segment:not(.broken) {
    animation: none !important;
  }
}

/* RC69: poison status in document flow and explicit armor countdown. */
body.theme-ashen .combatant.poisoned::after {
  display: none !important;
  content: none !important;
}

body.theme-ashen .hero-card-header {
  position: relative;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
}

body.theme-ashen .hero-card-header .combatant-name {
  margin: 0 !important;
}

body.theme-ashen .hero-status-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 20px;
  padding: 3px 8px;
  overflow: hidden;
  border: 1px solid rgba(96,198,103,.62);
  border-radius: 999px;
  background: rgba(15,53,22,.86);
  color: #8be693;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-ashen .hero-status-row[hidden] {
  display: none !important;
}

body.theme-ashen .enemy-armor-label {
  display: grid;
  place-items: center;
  min-height: 20px !important;
  padding: 3px 5px;
  border: 1px solid rgba(213,161,76,.32);
  border-radius: 6px;
  background: rgba(55,31,16,.46);
  color: #f0cf82 !important;
  font-size: 8.5px !important;
  font-weight: 900 !important;
  letter-spacing: .035em;
  line-height: 1.1 !important;
  text-align: center;
  text-transform: uppercase;
  white-space: normal !important;
}

body.theme-ashen .enemy-armor-wrap[data-countdown="2"] .enemy-armor-label {
  border-color: rgba(225,132,60,.58);
  background: rgba(82,35,17,.62);
  color: #ffd08a !important;
}

body.theme-ashen .enemy-armor-wrap[data-countdown="1"] .enemy-armor-label {
  border-color: rgba(245,91,64,.86);
  background: rgba(103,28,18,.78);
  color: #ffd1bb !important;
  box-shadow: 0 0 12px rgba(225,67,42,.26);
  animation: armorCountdownCritical .82s ease-in-out infinite;
}

@keyframes armorCountdownCritical {
  0%,100% { filter: brightness(1); }
  50% { filter: brightness(1.22); }
}

@media (max-width: 390px) {
  body.theme-ashen .hero-card-header {
    gap: 4px;
  }
  body.theme-ashen .hero-status-row {
    min-height: 18px;
    padding: 2px 6px;
    font-size: 8px;
  }
  body.theme-ashen .enemy-armor-label {
    min-height: 19px !important;
    padding: 3px 4px;
    font-size: 7.5px !important;
    letter-spacing: .02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen .enemy-armor-wrap[data-countdown="1"] .enemy-armor-label {
    animation: none !important;
  }
}
