/* Forest Frontier v0.9.43 — hero crop, touch target audit and readable item comparison. */
body.theme-ashen{
  --ui-touch-target:44px;
  --ui-action-height:44px;
  --ui-compact-height:40px;
}

/* Hero: use a physically cropped source image instead of scaling the old canvas. */

/* Canonical action controls. Large actions remain readable without filling whole cards. */
body.theme-ashen :is(.primary,.secondary,.danger,.equip-button,.menu-button,.button-link),
body.theme-ashen :is(.inventory-detail-actions,.reward-actions,.boss-reward-actions,.sale-confirm-actions,.quest-reward-actions,.ruins-floor-actions,.ruins-event-actions) button{
  min-height:var(--ui-action-height);
  padding-block:9px;
  line-height:1.2;
}
body.theme-ashen .inventory-detail-actions button{
  min-width:0;
  white-space:normal;
}

/* Touch devices follow the common 44 px minimum target; mouse layouts stay denser. */
@media (pointer:coarse){
  body.theme-ashen button,
  body.theme-ashen [role="button"],
  body.theme-ashen .button-link{
    min-height:var(--ui-touch-target);
  }
}

/* Item comparison: the previous 8–11 px typography was unreadable on large high-density phones. */
body.theme-ashen .inventory-compare-heading span{
  font-size:10px;
  line-height:1.25;
}
body.theme-ashen .inventory-compare-heading strong{
  font-size:12px;
  line-height:1.25;
}
body.theme-ashen .inventory-compare-option{
  gap:5px;
  padding:8px 9px;
}
body.theme-ashen .inventory-compare-option > header strong{
  font-size:12px;
  line-height:1.25;
}
body.theme-ashen .inventory-compare-option > header small{
  font-size:10px;
  line-height:1.3;
}
body.theme-ashen .inventory-compare-option > header em{
  font-size:9px;
  line-height:1.15;
}
body.theme-ashen .inventory-compare-metric{
  grid-template-columns:minmax(98px,1fr) auto 42px;
  gap:7px;
  min-height:32px;
  padding-top:5px;
  font-size:11.5px;
  line-height:1.3;
}
body.theme-ashen .inventory-compare-style,
body.theme-ashen .inventory-compare-no-change{
  font-size:10.5px;
  line-height:1.35;
}

@media (max-width:767px){
  body.theme-ashen .inventory-detail-main{
    grid-template-columns:76px minmax(0,1fr);
  }
  body.theme-ashen .inventory-equip-comparison{
    gap:8px;
  }
  body.theme-ashen .inventory-compare-options{
    gap:8px;
  }
  body.theme-ashen .inventory-compare-metric{
    grid-template-columns:minmax(96px,1fr) auto 40px;
  }
}

@media (max-width:479px){
  body.theme-ashen .inventory-category-button small{
    font-size:10.5px;
  }
  body.theme-ashen .inventory-compare-metric{
    grid-template-columns:minmax(86px,1fr) auto 36px;
    gap:5px;
    font-size:11px;
  }
  body.theme-ashen .inventory-compare-option > header{
    gap:5px;
  }
}

@media (max-width:359px){
  body.theme-ashen .inventory-compare-metric{
    grid-template-columns:minmax(78px,1fr) auto 34px;
    font-size:10.5px;
  }
}

@media (min-width:768px){
  body.theme-ashen .inventory-compare-metric{
    font-size:12px;
  }
}


/* Forest Frontier v0.9.46 — inherited v0.9.44 showcase action hierarchy: price above action. */

/* Forest Frontier v0.9.46 — canonical action-control sizing for all primary sections. */
body.theme-ashen{
  --ui-button-compact-height:40px;
  --ui-button-standard-height:46px;
  --ui-button-prominent-height:50px;
  --ui-button-compound-height:56px;
  --ui-button-radius:10px;
  --ui-button-font-size:13px;
  --ui-button-font-size-compact:11.5px;
}

/*
 * Button sizes are role-based, not device-model-based:
 * compact utility/filter control = 40 px;
 * regular section action = 46 px;
 * prominent action = 50 px;
 * action with a second line = 56 px.
 */

/* Segment navigation is one stable height across Path, Inventory, Shop and Hero. */

/* Filters and small inline controls stay compact, but use a predictable tier. */
body.theme-ashen .rune-vault-tabs{grid-auto-rows:var(--ui-button-compact-height)}
body.theme-ashen .rune-vault-tab{padding-inline:4px}

/* Compact action buttons are still actions, not tiny chips. */

/* Prominent one-line calls to action. */

/* Two-line actions get one shared height so neighbouring buttons never jump. */
body.theme-ashen .inventory-detail-actions > button{
  display:grid;
  place-content:center;
  align-items:center;
  gap:2px;
}
body.theme-ashen .inventory-detail-actions > button > span,
body.theme-ashen .inventory-detail-actions > button > small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
body.theme-ashen .inventory-detail-actions > button > small{
  font-size:9.5px;
  line-height:1.12;
}

/* Shop controls use the same regular-action tier in both showcase and list views. */

/* Battle is a separate high-attention tier, but no longer changes height by viewport. */
body.theme-ashen .battle-action-row button,
body.theme-ashen .battle-main-action{
  box-sizing:border-box;
  height:var(--ui-button-compound-height)!important;
  min-height:var(--ui-button-compound-height)!important;
  max-height:var(--ui-button-compound-height)!important;
  padding-block:7px!important;
  overflow:hidden;
}
body.theme-ashen .auto-battle-button{
  height:var(--ui-button-standard-height);
  min-height:var(--ui-button-standard-height);
  max-height:var(--ui-button-standard-height);
  padding-block:0;
}

/* Icon-only dismiss controls retain a square 44 px target. */

/* Touch screens must never expose a target below 44 px. */
@media (pointer:coarse){
  body.theme-ashen .rune-vault-tabs{grid-auto-rows:44px}
  body.theme-ashen .client-refresh-button{width:auto;min-width:44px}
}

/* Narrow phones keep the same control heights; only typography and padding tighten. */
@media (max-width:479px){
  body.theme-ashen .inventory-detail-actions > button{
    padding-inline:7px!important;
    font-size:11.5px;
  }
}

/* Tablets and desktop keep identical heights; only horizontal breathing room grows. */
/* Forest Frontier v0.9.47 — unified main-section surface and Path tab casing. */
body.theme-ashen {
  --ui-main-section-border: rgba(87, 81, 66, .68);
  --ui-main-section-background:
    linear-gradient(180deg, rgba(25, 27, 24, .95), rgba(12, 15, 14, .96) 58%, rgba(8, 11, 11, .97));
}

/* Main navigation sections share the calm neutral surface used by Path.
   Battle and Ruins intentionally keep their scene-specific backgrounds. */
body.theme-ashen.screen-map-active #screenMap > .screen-panel,
body.theme-ashen.screen-inventory-active #screenInventory > .screen-panel,
body.theme-ashen.screen-hero-active #screenHero > .screen-panel {
  border-color: var(--ui-main-section-border);
  background: var(--ui-main-section-background);
}

/* Path labels follow the same sentence-case convention as the other sections. */
body.theme-ashen .path-tab-button {
  text-transform: none;
  letter-spacing: 0;
}

/* v0.9.48: telemetry-only item detail release; game visuals unchanged. */

/* v0.9.49 account security and reward claims */.password-change-card{max-width:460px}
