/* Forest Frontier v0.10.0-rc26 — compact combat/shop pass */
body.theme-ashen .legacy-auto-controls{display:none!important}
body.theme-ashen .battle-stage{margin-top:4px}
body.theme-ashen .combat-mechanics-status{grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:7px 9px;margin:5px 0;gap:5px}
body.theme-ashen .combat-mechanics-line{display:grid;gap:2px;align-items:center}
body.theme-ashen .combat-mechanics-line strong{font-size:11px}
body.theme-ashen .combat-mechanics-line span{font-size:10px}
body.theme-ashen .crushing-charge-row{display:grid;justify-items:end;gap:3px}
body.theme-ashen .crushing-charge-row>span:first-child{font-size:9px;max-width:120px;text-align:right;line-height:1.1}
body.theme-ashen .crushing-charge-segments{width:76px}
body.theme-ashen .combat-effect-state,body.theme-ashen .combat-preview-state,body.theme-ashen .heavy-sequence-state{grid-column:1/-1;font-size:10px;padding-top:3px}
body.theme-ashen .enemy-armor-wrap{display:grid;gap:2px;margin-top:3px}
body.theme-ashen .combatant.poisoned::after{content:'☠ ЯД';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}
body.theme-ashen .final-reward-intro{margin:5px 0 10px;color:#aab0aa;font-size:12px}
body.theme-ashen .final-reward-option{min-height:0;padding:0;overflow:hidden}
body.theme-ashen .final-reward-select{display:grid;width:100%;min-height:132px;align-content:start;gap:5px;padding:12px;border:0;background:transparent;color:inherit;text-align:left}
body.theme-ashen .final-reward-select strong{font-size:16px;color:#ecd8ff}
body.theme-ashen .final-reward-select span{font-size:10px;color:#a99ab4;text-transform:uppercase;letter-spacing:.08em}
body.theme-ashen .final-reward-select em{font-style:normal;color:#dcb6ff;font-weight:800}
body.theme-ashen .final-reward-select b{margin-top:7px;padding:8px;border:1px solid rgba(213,166,255,.62);border-radius:8px;background:rgba(122,70,157,.32);text-align:center;color:#fff}
body.theme-ashen .final-reward-option details{border-top:1px solid rgba(188,130,255,.25);padding:0 12px 10px;color:#bdb2c4;font-size:11px}
body.theme-ashen .final-reward-option summary{padding:8px 0;cursor:pointer;color:#d3c1dd;font-weight:800}
body.theme-ashen .final-reward-option details p{margin:5px 0 0;line-height:1.35}
@media(max-width:620px){body.theme-ashen .combat-mechanics-line{display:grid!important;gap:1px!important}body.theme-ashen .crushing-charge-row{display:grid!important;align-items:end!important;gap:2px!important}body.theme-ashen .final-reward-grid{gap:7px}}

/* RC25: trial style selection and explicit trial result */

/* v0.10.0-rc26: critical progression, Patrol and Ruins forge fixes */
/* Forest Frontier v0.10.0-rc26 — viewport-safe dialogs, readable poison and compact Patrol */

/* Long dialogs share one viewport-safe composition. */
body.theme-ashen .boss-choice-card,
body.theme-ashen .item-detail-card,
body.theme-ashen .battle-result-card,
body.theme-ashen .reward-result-card {
  width:min(94vw,620px)!important;
  max-width:620px!important;
  max-height:min(88dvh,860px)!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  align-content:stretch!important;
  padding:16px!important;
}

/* Final chapter reward: one readable column inside the scrolling center. */
body.theme-ashen .final-reward-note {font-size:11px;line-height:1.35}

/* Potion and poison feedback. */
body.theme-ashen .combatant.poisoned::after {content:attr(data-poison-label)!important;white-space:nowrap}
body.theme-ashen #enemyIntent.poison-intent,
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;
}
body.theme-ashen .combat-effect-state {line-height:1.35}

/* Compact Patrol. */

@media(max-width:620px) {
  body.theme-ashen .boss-choice-card,
  body.theme-ashen .item-detail-card,
  body.theme-ashen .battle-result-card,
  body.theme-ashen .reward-result-card {
    width:100%!important;
    max-width:none!important;
    max-height:calc(100dvh - env(safe-area-inset-top) - 12px)!important;
    border-radius:18px 18px 8px 8px!important;
    padding:13px!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  body.theme-ashen .combatant.heal-pulse,
  body.theme-ashen #enemyIntent.poison-intent,
  body.theme-ashen .heavy-sequence-state.poison-telegraph {animation:none!important}
}

/* Forest Frontier v0.10.0-rc26 — final compact Patrol and server-state feedback */

/* RC26: one-offer Shop and readable two-row combat mechanics. */
body.theme-ashen .combat-mechanics-status{
  grid-template-columns:minmax(0,1fr)!important;
  align-items:stretch!important;
  gap:6px!important;
}
body.theme-ashen .combat-mechanics-line,
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;
}
body.theme-ashen .combat-mechanics-line strong,
body.theme-ashen .combat-mechanics-line span,
body.theme-ashen .crushing-charge-row>span:first-child{
  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,
body.theme-ashen .crushing-charge-row>span:first-child{text-align:right!important}
body.theme-ashen .crushing-charge-row{padding-top:5px;border-top:1px solid rgba(151,165,143,.14)}
@media(max-width:430px){
  body.theme-ashen .combat-mechanics-line,
  body.theme-ashen .crushing-charge-row{grid-template-columns:minmax(0,1fr) auto!important}
  body.theme-ashen .combat-mechanics-line strong,
  body.theme-ashen .combat-mechanics-line span,
  body.theme-ashen .crushing-charge-row>span:first-child{font-size:9.5px!important}
}

/* v0.10.0-rc28 — единая витрина и руна дня */


/* RC28: compact Trial list and pre-attempt briefing */
.trial-briefing-last{display:grid;gap:4px;padding:9px 11px;border-radius:10px;border:1px solid rgba(208,102,77,.42);background:rgba(100,38,30,.22)}
.trial-briefing-last.success{border-color:rgba(109,190,108,.42);background:rgba(37,91,44,.2)}
.hero-trials-collapse-body>.hero-trials-rule,.hero-trials-collapse-body>.hero-trial-last-result{display:none!important}

/* RC29: canonical item surfaces. Inventory keeps the compact square tile;
   reward, selection and shop cards share one horizontal component. */
.item-surface-card{display:grid;grid-template-columns:68px minmax(0,1fr) minmax(108px,auto);align-items:center;gap:12px;min-width:0;padding:12px;border:1px solid rgba(118,176,151,.34);border-radius:15px;background:linear-gradient(145deg,rgba(8,22,19,.96),rgba(12,16,14,.98));box-shadow:inset 0 1px rgba(255,255,255,.035),0 8px 20px rgba(0,0,0,.18);overflow:hidden}
.item-surface-card.common{border-color:rgba(176,176,166,.28)}.item-surface-card.uncommon{border-color:rgba(91,190,121,.5)}.item-surface-card.rare{border-color:rgba(66,175,225,.62)}.item-surface-card.epic{border-color:rgba(195,102,228,.68)}
.item-surface-icon{display:grid;place-items:center;width:68px;height:68px;min-width:0;border-radius:12px;background:rgba(0,0,0,.2);overflow:hidden}.item-surface-icon .item-icon{width:100%;height:100%}
.item-surface-copy{display:grid;gap:4px;min-width:0}.item-surface-eyebrow{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d6b96f;font-size:10px;font-weight:900;letter-spacing:.13em;text-transform:uppercase}
.item-surface-name{margin:0;min-width:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;color:#ece4d4;font-family:var(--font-display,serif);font-size:20px;line-height:1.08}.item-surface-name.uncommon{color:#8fd3a2}.item-surface-name.rare{color:#72c4ea}.item-surface-name.epic{color:#d783ef}
.item-surface-meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted,#aeb8b4);font-size:12px}.item-surface-stats{display:flex;flex-wrap:wrap;gap:3px 10px;min-width:0}.item-surface-stat{display:inline-flex;align-items:baseline;gap:4px;min-width:0;font-size:12px;line-height:1.3}.item-surface-stat b{color:#c7c7bd}.item-surface-stat strong{color:#eee3cb}.item-surface-stat em{font-style:normal;font-size:11px;font-weight:800}.item-surface-stat .compare-up{color:#72dc91}.item-surface-stat .compare-down{color:#df8278}.item-surface-stat .compare-even{color:#aeb8b4}
.item-surface-copy .item-socket-summary{margin-top:2px}.item-surface-side{display:grid;align-content:center;justify-items:stretch;gap:7px;min-width:108px}.item-surface-side .compact-button{width:100%;min-height:44px;padding-inline:12px}.item-surface-price{display:grid;gap:1px;text-align:right}.item-surface-price strong{color:#e6c876;font-size:17px;line-height:1.1}.item-surface-price small{color:#d77e74;font-size:10px}
.item-surface-card.reward,.item-surface-card.selection{grid-template-columns:76px minmax(0,1fr) auto;padding:13px}.item-surface-card.reward .item-surface-icon{width:76px;height:76px}.item-surface-card.reward .item-surface-side{min-width:92px}.item-surface-detail{align-self:center}.rune-surface-icon{font-size:31px;color:#e8ddc0;border:1px solid rgba(213,184,111,.26)}
/* The trial list contains only compact cards. Conditions and outcome remain modal-only. */
.hero-trial-card .hero-trials-rule,.hero-trial-card .hero-trial-last-result,.hero-trials-panel>.hero-trials-rule,.hero-trials-panel>.hero-trial-last-result{display:none!important}
@media(max-width:430px){.item-surface-card{grid-template-columns:58px minmax(0,1fr) 102px;gap:9px;padding:10px}.item-surface-icon{width:58px;height:58px}.item-surface-name{font-size:17px}.item-surface-meta,.item-surface-stat{font-size:11px}.item-surface-side{min-width:102px}.item-surface-price strong{font-size:15px}.item-surface-card.reward,.item-surface-card.selection{grid-template-columns:64px minmax(0,1fr);align-items:start}.item-surface-card.reward .item-surface-icon{width:64px;height:64px}.item-surface-card.reward .item-surface-side{grid-column:1/-1;display:flex;justify-content:flex-end;min-width:0}.item-surface-card.reward .item-surface-side .compact-button{width:auto;min-width:112px}}
@media(max-width:370px){.item-surface-price{text-align:left}}

/* RC30: three fixed daily rune offers and purchase feedback. */

/* RC31: centered quest reward, one-step item comparison and directional combat travel. */

body.theme-ashen .battle-stage{position:relative}
@media(prefers-reduced-motion:reduce){
  body.theme-ashen .combatant.attack-lunge-right,
  body.theme-ashen .combatant.attack-lunge-left{animation:none!important}
  @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)}}
}
