/* Forest Frontier v0.9.23 — item identity, denser mobile flow and wide-screen workspace. */

/* Shared detailed family artwork. Rarity belongs to the outer slot, not to a nested frame. */
body.theme-ashen .item-icon.item-art-premium {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
body.theme-ashen .item-icon.item-art-premium::before,
body.theme-ashen .item-icon.item-art-premium::after { display: none; }
body.theme-ashen .item-icon.item-art-premium img {
  object-fit: contain;
  filter: saturate(.72) contrast(1.08) brightness(1.05) drop-shadow(0 6px 7px rgba(0,0,0,.72));
}
body.theme-ashen .inventory-icon-cell .inventory-cell-icon,
body.theme-ashen .inventory-icon-cell .inventory-cell-icon > .item-icon {
  width: 88%;
  height: 88%;
}
body.theme-ashen .inventory-icon-cell .item-art-premium img { transform: scale(1.08); }
body.theme-ashen .inventory-detail-portrait .item-art-premium {
  width: 100%;
  height: 100%;
}
body.theme-ashen .inventory-detail-portrait .item-art-premium img { transform: scale(1.04); }

/* Upgrade state is supporting information; the item remains the focal point. */
body.theme-ashen .inventory-compare-badge {
  top: 5px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-width: 1px;
  font-size: 12px;
  background: rgba(2,7,5,.76);
  box-shadow: none;
}
body.theme-ashen .inventory-compare-badge.upgrade {
  color: #8fe2a3;
  border-color: rgba(103,227,133,.42);
  box-shadow: 0 0 8px rgba(73,210,110,.12);
}
body.theme-ashen .inventory-compare-badge.downgrade {
  color: #a96d63;
  border-color: rgba(181,93,80,.25);
  opacity: .58;
}
body.theme-ashen .inventory-level-badge {
  background: rgba(2,7,5,.78);
  border-color: rgba(219,207,172,.16);
}
body.theme-ashen .inventory-icon-cell {
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--slot-color),.14), transparent 55%),
    linear-gradient(155deg, rgba(var(--slot-fill),.78), rgba(3,8,6,.98) 72%);
}

/* Compact mobile inventory controls: more of the first screen belongs to loot. */
@media (max-width: 759px) {
  body.theme-ashen.screen-inventory-active .inventory-screen-panel { padding: 8px 9px 10px; }
  body.theme-ashen.screen-inventory-active .inventory-title-row {
    margin-bottom: 5px;
    align-items: center;
  }
  body.theme-ashen.screen-inventory-active .inventory-title-row .section-label { display: none; }
  body.theme-ashen.screen-inventory-active .inventory-title-row h2 { font-size: 24px; line-height: 1; }
  body.theme-ashen.screen-inventory-active .inventory-mode-tabs { gap: 4px; margin-bottom: 5px; }
  body.theme-ashen.screen-inventory-active .inventory-mode-tab {
    min-height: 34px;
    padding: 5px 4px;
    border-radius: 9px;
    font-size: 11px;
  }
  body.theme-ashen.screen-inventory-active .inventory-equipment-panel { gap: 7px; }
  body.theme-ashen.screen-inventory-active .inventory-category-toolbar {
    grid-template-columns: minmax(0,1fr) 96px;
    gap: 5px;
  }
  body.theme-ashen.screen-inventory-active .inventory-category-scroll { padding: 3px; gap: 2px; }
  body.theme-ashen.screen-inventory-active .inventory-category-button {
    flex-basis: 41px;
    min-height: 36px;
    padding: 2px;
  }
  body.theme-ashen.screen-inventory-active .inventory-category-button > span { font-size: 15px; }
  body.theme-ashen.screen-inventory-active .inventory-category-button small { font-size: 6px; }
  body.theme-ashen.screen-inventory-active .inventory-sort-compact { padding: 3px; }
  body.theme-ashen.screen-inventory-active .inventory-sort-compact select {
    min-height: 36px;
    padding: 5px 19px 5px 5px;
    font-size: 8px;
  }
  body.theme-ashen.screen-inventory-active .inventory-list-pane { gap: 5px; }
  body.theme-ashen.screen-inventory-active .inventory-section-heading { padding-inline: 2px; }
  body.theme-ashen.screen-inventory-active .inventory-icon-grid { gap: 6px !important; }
  body.theme-ashen.screen-inventory-active .inventory-icon-cell { border-radius: 10px; }

  body.theme-ashen .inventory-inline-detail {
    left: 5px;
    right: 5px;
    max-height: min(76dvh, 640px);
  }
  body.theme-ashen .inventory-detail-main { gap: 11px; }
  body.theme-ashen .inventory-detail-status {
    padding: 5px 7px;
    font-size: 10px;
  }
  body.theme-ashen .inventory-detail-actions { gap: 6px; }
  body.theme-ashen .inventory-detail-actions button { min-height: 43px; font-size: 12px; }
}

/* Larger inventory art and fewer columns on desktop: less spreadsheet, more collection. */
@media (min-width: 760px) {
  body.theme-ashen .inventory-icon-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
  body.theme-ashen .inventory-icon-cell { border-radius: 11px; }
  body.theme-ashen .inventory-detail-portrait { min-height: 150px; }
  body.theme-ashen .inventory-detail-portrait .item-icon { width: 112px; height: 130px; }
}
@media (min-width: 1020px) {
  body.theme-ashen .inventory-icon-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}

/* Hero: smooth scale instead of a hard 760px height jump. */

/* Wide screens use a true desktop shell. */
@media (min-width: 1180px) {
  body.theme-ashen.screen-hero-active,
  body.theme-ashen.screen-inventory-active { padding-bottom: 24px; }
  body.theme-ashen.screen-hero-active .app,
  body.theme-ashen.screen-inventory-active .app {
    width: min(1220px, calc(100% - 126px));
    margin-left: 104px;
    margin-right: auto;
    padding-bottom: 24px;
  }
  body.theme-ashen.screen-hero-active .bottom-nav,
  body.theme-ashen.screen-inventory-active .bottom-nav {
    left: 18px;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 70px;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 8px 5px;
    transform: translateY(-50%);
    border: 1px solid rgba(91,82,63,.7);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0,0,0,.48), inset 0 1px rgba(183,154,98,.04);
  }
  body.theme-ashen.screen-hero-active .nav-button,
  body.theme-ashen.screen-inventory-active .nav-button {
    min-height: 58px;
    padding: 5px 2px;
    border-radius: 9px;
    font-size: 8px;
  }
  body.theme-ashen.screen-hero-active .nav-button .nav-glyph,
  body.theme-ashen.screen-inventory-active .nav-button .nav-glyph { font-size: 20px; line-height: 23px; }
  body.theme-ashen.screen-hero-active .nav-button.active,
  body.theme-ashen.screen-inventory-active .nav-button.active { background: rgba(43,67,57,.36); }
  body.theme-ashen.screen-hero-active .nav-button.active::before,
  body.theme-ashen.screen-inventory-active .nav-button.active::before {
    top: 20%;
    bottom: 20%;
    left: -5px;
    right: auto;
    width: 2px;
    height: auto;
  }
  body.theme-ashen .hero-combat-detail-row { min-height: 38px; padding: 8px 10px; }
  body.theme-ashen .hero-combat-detail-row span { font-size: 10px; }
  body.theme-ashen .hero-combat-detail-row strong { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen .inventory-icon-cell .item-art-premium img { transform: none; }
}
