.inventory-layout {
  display: grid;
  gap: 18px;
}
.wardrobe {
  padding: 22px;
  background:
    radial-gradient(ellipse at 23% 70%, #72519020, transparent 55%), #151723;
}
.wardrobe-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.wardrobe-heading .class-tag {
  display: inline-flex;
}
.inventory-tools > .text-button {
  width: auto;
  margin-left: auto;
}
.bag-detail-toggle {
  display: none;
}
.wardrobe-heading h2 {
  font:
    26px Lora,
    serif;
  margin: 7px 0;
}
.wardrobe-heading p:not(.eyebrow) {
  font-size: 12px;
  color: #aaa6b8;
}
.wardrobe-body {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.4fr) 140px;
  align-items: center;
  gap: 28px;
}
.paper-doll {
  height: 240px;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.paper-doll > .cat-art {
  width: 230px;
  height: 230px;
  filter: drop-shadow(0 10px 15px #0007);
}
.paper-aura {
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 42px;
  bottom: 6px;
  border: 1px solid var(--hero-color);
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--hero-color), transparent 70%);
  opacity: 0.25;
  box-shadow: 0 0 50px var(--hero-color);
}
.wardrobe .equipment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}
.wardrobe .equipment-slot {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 69px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--rarity) 45%, transparent);
  border-left: 3px solid var(--rarity);
  background: #0c101a99;
  text-align: left;
  color: #e9e2ed;
  cursor: pointer;
}
.wardrobe .equipment-slot > div {
  min-width: 0;
}
.equipment-slot strong {
  display: block;
  font-size: 12px;
  white-space: normal;
  line-height: 1.5;
}
.equipment-slot span:not(.item-art):not(.empty-equipment) {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a5a0b3;
}
.equipment-slot small {
  display: block;
  font-size: 10px;
  color: var(--rarity);
  margin-top: 3px;
}
.equipment-slot.empty {
  opacity: 0.6;
}
.empty-equipment {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #766785;
}
.wardrobe-stats {
  display: grid;
  gap: 16px;
}
.wardrobe-stats > div {
  display: grid;
  grid-template-columns: 23px 1fr;
  column-gap: 7px;
  align-items: center;
}
.wardrobe-stats .icon {
  width: 17px;
  height: 17px;
  color: #bca4ce;
}
.wardrobe-stats strong {
  font-size: 17px;
  color: #f0e6d7;
}
.wardrobe-stats span {
  grid-column: 2;
  font-size: 10px;
  color: #9f98ad;
}
.item-art {
  display: block;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: url("./assets/inventory-items.png") var(--item-x) var(--item-y) /
    400% 600% no-repeat;
  image-rendering: pixelated;
}
.inventory-tools {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.bag-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 18px;
}
.bag-catalog {
  padding: 18px;
  min-width: 0;
}
.bag-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 145px 140px;
  gap: 10px;
  align-items: end;
}
.bag-toolbar label {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #a8a1b4;
  min-width: 0;
}
.bag-toolbar input,
.bag-toolbar select {
  display: block;
  width: 100%;
  margin-top: 5px;
  min-height: 38px;
  border: 1px solid #8b719b55;
  background: #0d111d;
  color: #dcd4e6;
  padding: 8px;
  border-radius: 5px;
  font:
    12px "DM Sans",
    sans-serif;
}
.bag-search {
  position: relative;
}
.bag-search > .icon {
  position: absolute;
  width: 16px;
  left: 10px;
  bottom: 11px;
}
.bag-search input {
  padding-left: 33px;
}
.bag-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 17px 0 14px;
}
.bag-categories button {
  padding: 8px 10px;
  border: 1px solid #70538355;
  border-radius: 5px;
  background: #11131e;
  color: #aaa0b7;
  font:
    11px "DM Sans",
    sans-serif;
}
.bag-categories button.active {
  border-color: #b79ad3;
  color: #e6d7f2;
  background: #8d62b326;
}
.bag-results {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
  color: #a9a1b5;
  font-size: 11px;
}
.bag-results small {
  color: #796f88;
  font-size: 10px;
}
.bag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 9px;
}
.bag-grid .item-card {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
}
.item-card > button {
  display: flex;
  position: relative;
  width: 100%;
  height: 145px;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid color-mix(in srgb, var(--rarity) 40%, transparent);
  border-radius: 7px;
  background:
    radial-gradient(
      ellipse at 50% 20%,
      color-mix(in srgb, var(--rarity) 12%, transparent),
      transparent 72%
    ),
    #11151f;
  color: #dcd4e3;
  text-align: center;
}
.item-card > button:hover,
.item-card > button.selected {
  border-color: var(--rarity);
  box-shadow: inset 0 0 16px color-mix(in srgb, var(--rarity) 10%, transparent);
}
.item-card .item-art {
  width: 62px;
  height: 62px;
}
.item-card strong {
  font-size: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-card small {
  font-size: 9px;
  color: var(--rarity);
  margin-top: auto;
}
.item-enhance,
.item-quantity {
  position: absolute;
  right: 6px;
  top: 6px;
  padding: 2px 4px;
  border-radius: 3px;
  background: #090c17e8;
  color: #ebd098;
  font-size: 10px;
}
.item-quantity {
  top: 52px;
  color: #fff;
}
.item-protected {
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 10px;
  color: #e4cb83;
}
.bag-pagination {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #afa6be;
}
.bag-pagination button {
  font-size: 11px;
  padding: 8px 11px;
}
.bag-detail {
  position: sticky;
  top: 0;
  padding: 20px;
  min-width: 0;
  max-height: calc(100dvh - 180px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.bag-detail-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.bag-detail-heading > .item-art {
  width: 110px;
  height: 110px;
  filter: drop-shadow(
    0 5px 14px color-mix(in srgb, var(--rarity) 20%, transparent)
  );
}
.bag-detail-heading .rarity {
  color: var(--rarity);
  font-size: 10px;
  letter-spacing: 0.05em;
}
.bag-detail h2 {
  color: #f0e3d3;
  font:
    20px/1.4 Lora,
    serif;
  margin: 0;
}
.bag-detail h2 b {
  color: #e8c584;
  font-family: "DM Sans", sans-serif;
}
.bag-tier {
  display: block;
  text-align: center;
  font-size: 10px;
  color: #9e91ae;
  margin: 10px 0 17px;
}
.bag-item-stats {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-block: 1px solid #bca4cf22;
}
.bag-item-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #a89db8;
}
.bag-item-stats strong {
  color: #e7dfe9;
  font-weight: 500;
}
.bag-detail .item-comparison {
  padding: 12px 0;
  font-size: 11px;
}
.bag-detail .item-comparison p {
  margin-bottom: 6px;
  color: #aaa0b6;
}
.bag-detail .item-comparison span {
  display: block;
  margin: 4px 0;
}
.bag-item-actions {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}
.bag-item-actions button {
  font-size: 12px;
}
.bag-item-actions .text-button {
  justify-content: center;
  font-size: 11px;
}
.bag-item-description {
  margin: 17px 0;
  color: #b7adbf;
  font-size: 12px;
  line-height: 1.8;
}
.stack-summary {
  margin: 15px 0;
  font-size: 11px;
  color: #b5a8c2;
}
.stack-summary strong {
  font-size: 20px;
  color: #e7deeb;
}
.stack-summary span {
  display: block;
  margin-top: 7px;
}
.bag-detail > .full-width {
  margin: 7px 0;
  font-size: 12px;
}
.forge-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #b7a0ce33;
}
.forge-box h3 {
  margin: 10px 0;
  font-size: 15px;
  color: #e4cb94;
}
.forge-box > p:not(.eyebrow) {
  font-size: 11px;
  line-height: 1.7;
  color: #a99cb8;
}
.forge-cost {
  display: grid;
  gap: 8px;
  padding: 13px 0;
  color: #b5cdaa;
  font-size: 11px;
}
.forge-cost .missing {
  color: #df9d9d;
}
.forge-box button {
  margin-top: 6px;
  font-size: 12px;
}
.bag-detail-empty {
  text-align: center;
  color: #9c8eac;
  padding-block: 30px;
}
.bag-detail-empty > .icon {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
}
.bag-detail-empty p {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.7;
}
@media (max-width: 1050px) {
  .wardrobe-body {
    grid-template-columns: 180px 1fr;
    gap: 20px;
  }
  .paper-doll {
    height: 220px;
  }
  .paper-doll > .cat-art {
    width: 200px;
    height: 200px;
  }
  .wardrobe-stats {
    grid-column: 1/-1;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    border-top: 1px solid #bca4cf22;
    padding-top: 17px;
  }
  .bag-body {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 12px;
  }
  .bag-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .bag-search {
    grid-column: 1/-1;
  }
}
@media (max-width: 760px) {
  .wardrobe {
    padding: 15px;
  }
  .wardrobe-heading {
    align-items: start;
  }
  .wardrobe-heading h2 {
    font-size: 23px;
  }
  .wardrobe-heading .class-tag {
    font-size: 9px;
    padding: 7px;
    white-space: normal;
    text-align: right;
    max-width: 110px;
  }
  .wardrobe-body {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
  }
  .paper-doll {
    height: 185px;
    width: 110px;
  }
  .paper-doll > .cat-art {
    width: 140px;
    height: 145px;
  }
  .wardrobe .equipment-grid {
    width: 100%;
    gap: 7px;
  }
  .wardrobe .equipment-slot {
    min-height: 59px;
    padding: 6px;
    gap: 5px;
  }
  .wardrobe .equipment-slot .item-art {
    width: 34px;
    height: 34px;
  }
  .equipment-slot strong {
    font-size: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .wardrobe-stats {
    width: 100%;
    display: grid;
  }
  .inventory-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  .inventory-tools button {
    font-size: 10px;
    padding: 9px 7px;
  }
  .inventory-tools .text-button {
    grid-column: 1/-1;
    justify-content: center;
    width: 100%;
    margin-left: 0;
  }
  .bag-body {
    display: flex;
    flex-direction: column;
  }
  .bag-detail {
    order: -1;
    position: static;
    width: 100%;
    padding: 15px;
    max-height: none;
    overflow: visible;
  }
  .bag-detail-toggle {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: #c7b8d8;
    text-align: left;
    gap: 12px;
    font:
      12px "DM Sans",
      sans-serif;
  }
  .bag-detail-toggle span {
    color: #a88ec1;
  }
  .bag-detail:not(.is-open) .bag-detail-content {
    display: none;
  }
  .bag-detail.is-open .bag-detail-content {
    padding-top: 18px;
  }
  .bag-detail-heading {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 5px 12px;
    text-align: left;
    align-items: center;
  }
  .bag-detail-heading > .item-art {
    width: 62px;
    height: 62px;
    grid-row: 1/3;
  }
  .bag-detail h2 {
    font-size: 17px;
  }
  .bag-detail-heading .rarity {
    align-self: end;
  }
  .bag-tier {
    text-align: left;
  }
  .bag-item-stats {
    grid-template-columns: 1fr 1fr;
    gap: 9px 13px;
  }
  .bag-item-stats > div {
    font-size: 10px;
  }
  .bag-item-actions {
    grid-template-columns: 1fr 1fr;
  }
  .bag-item-actions .text-button {
    grid-column: 1/-1;
  }
  .bag-catalog {
    width: 100%;
    padding: 12px;
  }
  .bag-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
  }
  .item-card > button {
    height: 133px;
    padding: 8px 4px;
  }
  .item-card .item-art {
    width: 56px;
    height: 56px;
  }
  .bag-categories {
    gap: 5px;
  }
  .bag-categories button {
    font-size: 10px;
    padding: 8px;
  }
  .bag-pagination {
    font-size: 10px;
  }
  .bag-pagination button {
    padding: 8px;
    font-size: 10px;
  }
}
@media (max-width: 380px) {
  .wardrobe-body {
    grid-template-columns: 85px minmax(0, 1fr);
    gap: 8px;
  }
  .paper-doll {
    width: 85px;
  }
  .paper-doll > .cat-art {
    width: 115px;
    height: 125px;
  }
  .wardrobe .equipment-slot .item-art {
    width: 28px;
    height: 28px;
  }
  .equipment-slot small {
    font-size: 9px;
  }
}
