/* Forest Frontier v0.9.21 — ARPG equipment paper-doll and inventory item card. */

/* Shared paper-doll ------------------------------------------------------ */
body.theme-ashen .hero-equipment-board,
body.theme-ashen .inventory-equipment-board {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(157,126,70,.45);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 47%,rgba(40,94,78,.18),transparent 36%),
    radial-gradient(circle at 50% 48%,rgba(143,104,44,.08),transparent 58%),
    linear-gradient(180deg,rgba(4,12,10,.98),rgba(2,7,6,.995));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.018),
    inset 0 0 64px rgba(0,0,0,.55),
    0 10px 28px rgba(0,0,0,.28);
}
body.theme-ashen .inventory-equipment-board { height: 360px; }
body.theme-ashen .hero-equipment-board::before,
body.theme-ashen .inventory-equipment-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg,transparent 0 47%,rgba(77,131,111,.035) 48% 49%,transparent 50% 100%),
    linear-gradient(60deg,transparent 0 47%,rgba(77,131,111,.03) 48% 49%,transparent 50% 100%);
  background-size: 88px 88px;
  opacity: .55;
  pointer-events: none;
}

/* Equipment slots ------------------------------------------------------- */

/* Deliberate layout. Shield is upper-right; armor is lower-left. */

/* Inventory structure --------------------------------------------------- */
body.theme-ashen.screen-inventory-active .inventory-screen-panel {
  padding: 10px;
  border-color: rgba(151,117,59,.45);
  background:
    radial-gradient(circle at 50% 16%,rgba(44,98,82,.11),transparent 34%),
    linear-gradient(180deg,rgba(5,13,11,.98),rgba(2,7,6,.995));
}
body.theme-ashen .inventory-equipment-panel { display: grid; gap: 10px; }
body.theme-ashen .inventory-equipped-section {
  display: grid;
  gap: 6px;
}
body.theme-ashen .inventory-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
  color: #d9bf7a;
  text-transform: uppercase;
}
body.theme-ashen .inventory-section-heading > span { font-size: 11px; font-weight: 900; letter-spacing: .12em; }
body.theme-ashen .inventory-section-heading > small { color: #778d84; font-size: 8px; text-transform: none; }
body.theme-ashen .inventory-items-heading { margin-top: 1px; }
body.theme-ashen .inventory-category-toolbar {
  display: flex;
  align-items: stretch;
  gap: 5px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid rgba(151,117,59,.35);
  border-radius: 12px;
  background: rgba(3,9,7,.88);
  scrollbar-width: none;
}
body.theme-ashen .inventory-category-toolbar::-webkit-scrollbar { display: none; }
body.theme-ashen .inventory-category-button {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9a9d92;
}
body.theme-ashen .inventory-category-button > span { color: #c2ad76; font-size: 17px; line-height: 1; }
body.theme-ashen .inventory-category-button small { font-size: 7px; white-space: nowrap; }
body.theme-ashen .inventory-category-button.active {
  background: linear-gradient(180deg,rgba(16,75,64,.72),rgba(7,37,31,.74));
  color: #e5fff8;
  box-shadow: inset 0 0 0 1px rgba(61,211,180,.55),0 0 12px rgba(42,185,155,.12);
}
body.theme-ashen .inventory-category-button.active > span { color: #6fe0c7; }
body.theme-ashen .inventory-sort-compact {
  flex: 0 0 142px;
  display: grid;
  align-content: center;
  gap: 2px;
  margin-left: auto;
  padding-left: 9px;
  border-left: 1px solid rgba(151,117,59,.24);
}
body.theme-ashen .inventory-sort-compact > span { color: #8e8777; font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
body.theme-ashen .inventory-sort-compact select {
  width: 100%;
  min-height: 28px;
  padding: 3px 24px 3px 6px;
  border: 0;
  background: #050b09;
  color: #d5c9aa;
  font-size: 10px;
}

/* Inventory grid: rarity is the whole slot, not a thin line. */
body.theme-ashen .inventory-icon-grid {
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 7px !important;
}
body.theme-ashen .inventory-icon-cell {
  --slot-color: 151,145,125;
  --slot-fill: 24,27,24;
  aspect-ratio: 1/1;
  min-height: 72px;
  padding: 6px;
  border: 1px solid rgba(var(--slot-color),.82);
  border-radius: 10px;
  clip-path: polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px),0 8px);
  background:
    radial-gradient(circle at 50% 42%,rgba(var(--slot-color),.26),transparent 60%),
    linear-gradient(150deg,rgba(var(--slot-fill),.97),rgba(2,6,5,.995));
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.55),inset 0 0 18px rgba(var(--slot-color),.11),0 0 9px rgba(var(--slot-color),.09);
}
body.theme-ashen .inventory-icon-cell.uncommon { --slot-color: 94,207,91; --slot-fill: 12,39,18; }
body.theme-ashen .inventory-icon-cell.rare { --slot-color: 69,171,235; --slot-fill: 7,31,48; }
body.theme-ashen .inventory-icon-cell.epic { --slot-color: 205,105,238; --slot-fill: 39,14,51; }
body.theme-ashen .inventory-icon-cell.legendary { --slot-color: 232,165,65; --slot-fill: 52,29,9; }
body.theme-ashen .inventory-icon-cell.mythic { --slot-color: 102,224,207; --slot-fill: 10,43,42; }
body.theme-ashen .inventory-icon-cell.active-item {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.09),inset 0 0 23px rgba(var(--slot-color),.21),0 0 0 2px rgba(var(--slot-color),.75),0 0 18px rgba(var(--slot-color),.26);
}
body.theme-ashen .inventory-icon-cell .item-icon {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.theme-ashen .inventory-icon-cell .item-icon::before,
body.theme-ashen .inventory-icon-cell .item-icon::after { display: none; }
body.theme-ashen .inventory-cell-icon,
body.theme-ashen .inventory-cell-icon > .item-icon { width: 58px; height: 58px; }
body.theme-ashen .inventory-cell-icon img { filter: drop-shadow(0 5px 6px rgba(0,0,0,.62)); }

/* Inline item card ------------------------------------------------------ */
body.theme-ashen .inventory-inline-detail:empty { display: none; }
body.theme-ashen .inventory-inline-detail { min-width: 0; }
body.theme-ashen .inventory-inline-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px;
  border: 1px dashed rgba(151,117,59,.34);
  border-radius: 13px;
  color: #75877f;
  text-align: center;
}
body.theme-ashen .inventory-inline-empty > span { color: #6bd2bd; font-size: 24px; }
body.theme-ashen .inventory-inline-empty strong { color: #d8c89e; }
body.theme-ashen .inventory-inline-empty small { font-size: 10px; }
body.theme-ashen .inventory-detail-card {
  --detail-color: 151,145,125;
  --detail-fill: 24,27,24;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--detail-color),.68);
  border-radius: 14px;
  background:
    radial-gradient(circle at 16% 22%,rgba(var(--detail-color),.13),transparent 34%),
    linear-gradient(180deg,rgba(5,13,11,.98),rgba(2,7,6,.995));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018),0 12px 28px rgba(0,0,0,.32);
}
body.theme-ashen .inventory-detail-card.uncommon { --detail-color: 94,207,91; --detail-fill: 12,39,18; }
body.theme-ashen .inventory-detail-card.rare { --detail-color: 69,171,235; --detail-fill: 7,31,48; }
body.theme-ashen .inventory-detail-card.epic { --detail-color: 205,105,238; --detail-fill: 39,14,51; }
body.theme-ashen .inventory-detail-card.legendary { --detail-color: 232,165,65; --detail-fill: 52,29,9; }
body.theme-ashen .inventory-detail-card.mythic { --detail-color: 102,224,207; --detail-fill: 10,43,42; }
body.theme-ashen .inventory-detail-main {
  display: grid;
  grid-template-columns: 128px minmax(0,1fr) minmax(155px,.78fr);
  gap: 12px;
  padding: 12px;
}
body.theme-ashen .inventory-detail-portrait {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px solid rgba(var(--detail-color),.9);
  border-radius: 12px;
  clip-path: polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px);
  background:
    radial-gradient(circle at 50% 45%,rgba(var(--detail-color),.28),transparent 60%),
    linear-gradient(150deg,rgba(var(--detail-fill),.98),rgba(2,5,5,.995));
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.62),inset 0 0 28px rgba(var(--detail-color),.16),0 0 14px rgba(var(--detail-color),.14);
}
body.theme-ashen .inventory-detail-portrait .item-icon {
  width: 105px;
  height: 132px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.theme-ashen .inventory-detail-portrait .item-icon::before,
body.theme-ashen .inventory-detail-portrait .item-icon::after { display: none; }
body.theme-ashen .inventory-detail-portrait img { filter: drop-shadow(0 9px 10px rgba(0,0,0,.68)); }
body.theme-ashen .inventory-detail-rarity-gem {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 13px;
  height: 13px;
  translate: -50% 0;
  rotate: 45deg;
  border: 1px solid rgb(var(--detail-color));
  background: rgb(var(--detail-fill));
  box-shadow: inset 0 0 0 2px #020505,0 0 10px rgba(var(--detail-color),.6);
}
body.theme-ashen .inventory-detail-copy { min-width: 0; }
body.theme-ashen .inventory-detail-rarity {
  color: rgb(var(--detail-color));
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
body.theme-ashen .inventory-detail-copy h3 {
  margin: 3px 0 2px;
  color: rgb(var(--detail-color));
  font-family: Georgia,serif;
  font-size: 22px;
  line-height: 1.05;
}
body.theme-ashen .inventory-detail-copy > p { margin: 0 0 8px; color: #918d80; font-size: 10px; }
body.theme-ashen .inventory-detail-status {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(var(--detail-color),.28);
  border-radius: 6px;
  background: rgba(var(--detail-color),.07);
  color: #c4bfae;
  font-size: 9px;
  font-weight: 800;
}
body.theme-ashen .inventory-detail-status.better { color: #72df8e; }
body.theme-ashen .inventory-detail-status.worse { color: #d58a78; }
body.theme-ashen .inventory-detail-stats {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 5px;
}
body.theme-ashen .inventory-detail-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  padding: 5px 6px;
  border-bottom: 1px solid rgba(151,117,59,.2);
}
body.theme-ashen .inventory-detail-stat span { color: #9d998b; font-size: 9px; }
body.theme-ashen .inventory-detail-stat strong { color: #eee1c4; font-family: Georgia,serif; font-size: 14px; white-space: nowrap; }
body.theme-ashen .inventory-detail-passive {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding: 7px;
  border: 1px solid rgba(var(--detail-color),.24);
  border-radius: 8px;
  background: rgba(var(--detail-color),.05);
}
body.theme-ashen .inventory-detail-passive strong { color: #e5d6b4; font-size: 10px; }
body.theme-ashen .inventory-detail-passive small { color: #7f8c85; font-size: 8px; }
body.theme-ashen .inventory-detail-runes {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-left: 11px;
  border-left: 1px solid rgba(151,117,59,.23);
}
body.theme-ashen .inventory-detail-subtitle { color: #c7ad70; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
body.theme-ashen .inventory-detail-rune {
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  gap: 7px;
  align-items: center;
}
body.theme-ashen .inventory-detail-rune-glyph {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  rotate: 45deg;
  background: rgba(4,10,8,.82);
  font-size: 17px;
}
body.theme-ashen .inventory-detail-rune-glyph::first-letter { rotate: -45deg; }
body.theme-ashen .inventory-detail-rune > span:last-child { display: grid; gap: 1px; min-width: 0; }
body.theme-ashen .inventory-detail-rune strong { color: #d9d0bc; font-size: 9px; }
body.theme-ashen .inventory-detail-rune small { color: #88958e; font-size: 8px; line-height: 1.25; }
body.theme-ashen .inventory-detail-rune.empty { color: #657069; }
body.theme-ashen .inventory-detail-rune.attack { color: #d66b5f; }
body.theme-ashen .inventory-detail-rune.defense { color: #63a7d8; }
body.theme-ashen .inventory-detail-rune.vitality { color: #65c184; }
body.theme-ashen .inventory-detail-rune.special { color: #bd79dc; }
body.theme-ashen .inventory-detail-no-runes { color: #6f7c75; font-size: 9px; }
body.theme-ashen .inventory-detail-footer {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-top: 1px solid rgba(151,117,59,.26);
  background: rgba(0,0,0,.18);
  color: #9d9788;
  font-size: 9px;
}
body.theme-ashen .inventory-detail-footer > span strong { color: #d8b96f; }
body.theme-ashen .inventory-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
body.theme-ashen .inventory-detail-actions button {
  flex: 0 1 155px;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 10px;
}

/* Inventory paper-doll is intentionally smaller than the hero page. */

@media (min-width: 700px) {
  body.theme-ashen .inventory-icon-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
}

@media (max-width: 520px) {
  body.theme-ashen .inventory-equipment-board { height: 325px; }

  body.theme-ashen .inventory-detail-main {
    grid-template-columns: 96px minmax(0,1fr);
    gap: 9px;
    padding: 9px;
  }
  body.theme-ashen .inventory-detail-portrait { min-height: 135px; }
  body.theme-ashen .inventory-detail-portrait .item-icon { width: 82px; height: 110px; }
  body.theme-ashen .inventory-detail-copy h3 { font-size: 18px; }
  body.theme-ashen .inventory-detail-stats { grid-template-columns: 1fr; gap: 2px; }
  body.theme-ashen .inventory-detail-runes {
    grid-column: 1/-1;
    grid-template-columns: repeat(2,minmax(0,1fr));
    padding: 9px 0 0;
    border-top: 1px solid rgba(151,117,59,.23);
    border-left: 0;
  }
  body.theme-ashen .inventory-detail-subtitle { grid-column: 1/-1; }
  body.theme-ashen .inventory-detail-footer { grid-template-columns: 1fr; gap: 7px; }
  body.theme-ashen .inventory-detail-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.theme-ashen .inventory-detail-actions button { width: 100%; min-width: 0; }
}

@media (max-width: 380px) {
  body.theme-ashen.screen-inventory-active .inventory-screen-panel { padding: 7px; }
  body.theme-ashen .inventory-equipment-board { height: 306px; }
  body.theme-ashen .inventory-category-button { flex-basis: 43px; }
  body.theme-ashen .inventory-sort-compact { flex-basis: 122px; }
  body.theme-ashen .inventory-icon-grid { gap: 5px !important; }
  body.theme-ashen .inventory-icon-cell { min-height: 64px; padding: 4px; }
  body.theme-ashen .inventory-cell-icon,
  body.theme-ashen .inventory-cell-icon > .item-icon { width: 52px; height: 52px; }
}
