
#market-dialog {
  width: min(1120px, calc(100% - 24px));
  overflow-y: auto;
  border-color: #687962;
  background: radial-gradient(ellipse at 16% 0%, #344b3e, transparent 68%), #111d21;
}
.item-art {
  --item-size: 33px;
  display: inline-block;
  flex: 0 0 var(--item-size);
  width: var(--item-size);
  height: var(--item-size);
  background: url('../sprites/item-icons.png') var(--item-x, 0%) var(--item-y, 0%) / 400% 400% no-repeat;
}
.item-art-shield { --item-x: 33.3333%; }
.item-art-staff { --item-x: 66.6667%; }
.item-art-rune { --item-x: 100%; }
.item-art-bow { --item-y: 33.3333%; }
.item-art-book { --item-x: 33.3333%; --item-y: 33.3333%; }
.item-art-orb { --item-x: 66.6667%; --item-y: 33.3333%; }
.item-art-armor { --item-x: 100%; --item-y: 33.3333%; }
.item-art-helmet { --item-y: 66.6667%; }
.item-art-gloves { --item-x: 33.3333%; --item-y: 66.6667%; }
.item-art-boots { --item-x: 66.6667%; --item-y: 66.6667%; }
.item-art-ring { --item-x: 100%; --item-y: 66.6667%; }
.item-art-earring { --item-y: 100%; }
.item-art-quiver { background: url('../sprites/item-quiver.png') center / contain no-repeat; }
.item-art-potion-small { --item-x: 33.3333%; --item-y: 100%; }
.item-art-potion-medium { --item-x: 66.6667%; --item-y: 100%; }
.item-art-scroll, .item-art-scroll-ultimate { --item-x: 100%; --item-y: 100%; }
.item-art-scroll-ultimate { filter: sepia(.45) saturate(1.6) drop-shadow(0 0 4px #ebbe6ea6); }
.shop-icon.item-art { --item-size: 31px; }

#shop-dialog {
  width: min(900px, calc(100% - 24px));
  overflow-y: auto;
  border-color: #8b805a;
  background: radial-gradient(ellipse at 0 0, #3a4b3b, transparent 68%), #161f22;
}
.shop-showroom { padding: clamp(12px, 2vw, 21px); }
.shop-showroom-header h2, .shop-showroom-header .shop-balance, .shop-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.shop-showroom-header h2 { gap: 6px; }
.shop-showroom-header h2 .hud-icon { --icon-size: 35px; }
.shop-showroom-header .shop-balance {
  flex-wrap: wrap;
  border: 1px solid #7d7152;
  border-radius: 7px;
  padding: 3px 7px;
  background: #252b24;
  color: #ffdeb0;
}
.shop-showroom-header .shop-balance strong { margin-left: 0; }
.shop-showroom-header .shop-balance .hud-icon, .shop-price .hud-icon { --icon-size: 18px; }
.shop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  padding-block: 8px;
  border-block: 1px solid #a78d624f;
}
.shop-categories .hud-top-btn, .shop-action-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.shop-categories .hud-icon, .shop-categories .item-art {
  --icon-size: 23px;
  --item-size: 23px;
}
.shop-categories .hud-top-btn:focus-visible { outline: 2px solid #e7c580; outline-offset: 2px; }
.shop-categories .hud-top-btn[aria-pressed="true"] {
  border-color: #c5a76b;
  background: #514532;
  color: #fff2ce;
}
.shop-showroom-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(225px, 1fr);
  align-items: start;
  gap: 10px;
}
.shop-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.shop-product {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 78px;
  min-width: 0;
  padding: 7px;
  border: 1px solid #5c7161;
  border-radius: 9px;
  background: linear-gradient(125deg, #2b3d34, #1b282a 84%);
  color: #f0eedc;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.shop-product[aria-pressed="true"], .shop-product:hover {
  border-color: #d3b779;
  background: linear-gradient(125deg, #454b34, #21332f 88%);
}
.shop-product:focus-visible, .shop-purchase:focus-visible { outline: 2px solid #e7c580; outline-offset: 2px; }
.shop-product-art {
  --shop-art-size: 37px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 47px;
  border: 1px solid #6f8270;
  border-radius: 8px;
  background: radial-gradient(ellipse at top, #4c6551, #1c2928 75%);
  overflow: hidden;
}
.shop-product-art > .item-art { --item-size: var(--shop-art-size); }
.shop-product-art > .rune-art {
  --rune-icon-size: var(--shop-art-size);
  width: 100%;
  height: 100%;
}
.shop-product-copy { display: grid; min-width: 0; gap: 4px; }
.shop-product-copy strong { font: 700 15px/1.15 Georgia, serif; overflow-wrap: anywhere; }
.shop-price {
  color: #ffe0a1;
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.shop-selection {
  min-width: 0;
  min-height: 163px;
  padding: 12px;
  border: 1px solid #84775a;
  border-radius: 9px;
  background: linear-gradient(143deg, #302f27, #1a2628 64%);
}
#shop-detail { display: grid; justify-items: start; gap: 7px; }
#shop-detail h3 { color: #ffe3ad; font: 700 18px/1.15 Georgia, serif; }
#shop-detail p { color: #d6e1d5; font-size: 12px; line-height: 1.35; }
#shop-detail .shop-rune-duration { color: #e8d5ff; font-weight: 700; }
#shop-detail .shop-product-art { --shop-art-size: 46px; width: 60px; height: 60px; }
#shop-detail .shop-owned strong { color: #fbd695; }
.shop-purchase {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 2px;
  border-color: #81a886;
  background: linear-gradient(140deg, #49785d, #2c5443);
}
.shop-purchase:disabled { opacity: .55; cursor: default; }
.shop-action-label .hud-icon { --icon-size: 17px; }
.shop-bulk { display: grid; gap: 5px; width: 100%; padding-top: 7px; border-top: 1px solid #84775a72; }
.shop-bulk label { color: #ded9c3; font-size: 11px; font-weight: 700; }
.shop-bulk-fields { display: grid; grid-template-columns: minmax(48px, .38fr) minmax(0, 1fr); gap: 5px; }
.shop-bulk input {
  min-width: 0; width: 100%; border-radius: 6px; padding: 5px 6px;
  border: 1px solid #6e806a; background: #132322; color: #fff2ce; font: inherit;
}
.shop-bulk-fields .hud-top-btn { display: grid; justify-items: center; gap: 2px; padding: 3px 6px; }
.shop-bulk-fields strong { color: #f9d891; font-size: 10px; }
.shop-bulk-fields button:disabled { opacity: .55; cursor: default; }
#shop-detail #shop-bulk-warning { color: #ff9aba; font-weight: 700; }
#shop-bulk-warning:empty { display: none; }
#shop-feedback:empty { display: none; }
@media (max-width: 630px) {
  .shop-showroom-layout { grid-template-columns: minmax(0, 1fr); }
  .shop-product { grid-template-columns: 38px minmax(0, 1fr); gap: 5px; }
  .shop-product .shop-product-art { --shop-art-size: 30px; width: 38px; height: 38px; }
  .shop-product-copy strong { font-size: 13px; }
}
.inventory-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.inventory-sections .hud-top-btn[aria-pressed="true"] {
  border-color: #c5a76b;
  color: #fff1c7;
  background: #3a3428;
}
.gear-pane {
  min-width: 0;
  padding: 11px;
  border: 1px solid #526257;
  border-radius: 10px;
  background: #111d1db8;
}
.gear-pane h3 {
  margin-bottom: 7px;
  color: #efdaa8;
  font: 600 17px/1.2 Georgia, serif;
}
.gear-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  min-width: 0;
  padding: 7px;
  border: 1px solid #394c43;
  border-radius: 7px;
  background: #172522;
  font-size: 12px;
}
.gear-row + .gear-row { margin-top: 5px; }
.gear-item-copy {
  display: grid;
  gap: 2px;
  flex: 1 1 145px;
  min-width: 0;
  line-height: 1.25;
}
.gear-item-copy > span, .gear-muted {
  color: #b9c9c0;
  font-size: 11px;
  line-height: 1.3;
}
.gear-pane > p { margin-bottom: 7px; }
.gear-rarity { color: #eef1ed; overflow-wrap: anywhere; }
.gear-rarity.uncommon { color: #9bea9f; }
.gear-rarity.rare { color: #91cafa; }
.gear-rarity.epic { color: #dfb2ff; }
.gear-rarity.legendary { color: #ffcb68; }
.gear-price {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 7px;
}
.gear-price label {
  display: grid;
  gap: 2px;
  color: #d0d9cc;
  font-size: 11px;
}
.gear-pane .hud-top-btn {
  padding: 5px 8px;
  min-height: 28px;
  font-size: 11px;
}
.gear-pane .hud-top-btn:disabled { opacity: .5; cursor: default; }
.gear-pending { margin-top: 7px; color: #f4d992; font-size: 12px; }
.gear-pending summary { cursor: pointer; }
.gear-pending > div { display: grid; gap: 6px; margin: 6px 0 0 12px; }
.gear-dodge-fx { color: #a6e7ea; z-index: 80; }
@media (max-width: 620px) {
  #inventory-dialog .shop-balance, #market-dialog .shop-balance { text-align: right; }
  .inventory-sections .hud-top-btn { flex: 1; padding-inline: 5px; font-size: 10px; }
}

.market-content { padding: clamp(12px, 2vw, 20px); }
#market-dialog .market-header h2 { display: flex; align-items: center; gap: 7px; color: #f4d4ae; }
.market-header img { object-fit: contain; image-rendering: pixelated; }
.market-wallet, .market-wallet > span, .market-amount, .market-claim, .market-history-detail {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.market-wallet { gap: 6px; }
.market-wallet > span {
  border: 1px solid #62735d;
  border-radius: 6px;
  padding: 2px 6px;
  background: #182528;
  color: #d8ebdf;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.market-wallet > span:first-child { color: #f6d591; }
.market-wallet > span:last-child { color: #a4e6ff; }
.market-wallet .hud-icon, .market-amount .hud-icon { --icon-size: 19px; }
.market-sections { padding-bottom: 9px; border-bottom: 1px solid #64705679; margin-bottom: 10px; }
.market-sections .hud-top-btn, .market-filter-actions .market-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.market-sections .hud-icon, .market-sections .item-art { --icon-size: 21px; --item-size: 21px; }
.market-sections .hud-top-btn[aria-pressed="true"] {
  border-color: #c2a474;
  color: #fff0cc;
  background: linear-gradient(120deg, #516047, #384735 76%);
}
.market-search-icon {
  position: relative;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
  margin: 0 4px 3px 0;
}
.market-search-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 2px;
  top: 8px;
  left: 8px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}
#market-feedback:empty { display: none; }
#market-feedback:not(:empty) { margin: 6px 0 10px; }
.market-board {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 2fr);
  align-items: start;
  gap: 12px;
}
.market-filters, .market-results {
  min-width: 0;
  padding: 12px;
  border: 1px solid #56685d;
  border-radius: 11px;
  background: #162426;
}
.market-filters { display: grid; gap: 11px; }
.market-filter-column { min-width: 0; }
.market-filter-toggle { display: none; }
.market-content h3 { font: 700 18px/1.2 Georgia, serif; color: #f1d8a6; }
.market-filters label, .market-results-header label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #d7e5da;
  font-size: 12px;
}
.market-filters fieldset { min-width: 0; padding: 0; border: 0; }
.market-filters legend { margin-bottom: 5px; color: #e3e8d3; font-size: 12px; font-weight: 750; }
.market-content :is(input[type="search"], input[type="number"], select) {
  min-width: 0;
  width: 100%;
  min-height: 35px;
  padding: 5px 7px;
  border: 1px solid #5d7468;
  border-radius: 6px;
  background: #101c20;
  color: #f4f5eb;
  font: inherit;
}
.market-content :is(input, select, button, summary):focus-visible {
  outline: 2px solid #edcd93;
  outline-offset: 2px;
}
.market-content input::placeholder { color: #b1c8bb; opacity: 1; }
.market-options { display: flex; flex-wrap: wrap; gap: 5px; }
.market-options label { display: block; position: relative; cursor: pointer; }
.market-options label input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.market-options label > span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 31px;
  padding: 3px 7px;
  border: 1px solid #557065;
  border-radius: 8px;
  color: #e1eae0;
  background: #1a2a2b;
}
.market-options label > .market-tier { color: var(--tier); }
.market-options .hud-icon { --icon-size: 16px; }
.market-options input:checked + span {
  border-color: #e5c785;
  background: #404c37;
  box-shadow: inset 0 0 0 1px #e5c7856a;
}
.market-options input:focus-visible + span { outline: 2px solid #edcd93; outline-offset: 2px; }
.market-range, .market-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.market-error { color: #ffbcb4; font-size: 11px; }
.market-error:empty { display: none; }
.market-primary, .market-card [data-gear-action="buy"]:enabled {
  border-color: #8cc49d;
  background: linear-gradient(145deg, #4a8768, #285441);
  color: #fff9e9;
}
.market-primary:hover, .market-card [data-gear-action="buy"]:enabled:hover {
  border-color: #e2c982;
  background: #426d55;
}
.market-results-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 10px; }
.market-results-header p { color: #bad1c7; font-size: 11px; margin-top: 2px; }
.market-page > h3 { margin-bottom: 8px; }
.market-cards { display: grid; gap: 7px; }
.market-card {
  gap: 10px;
  padding: 9px;
  border-color: #4d6258;
  background: linear-gradient(115deg, #263932, #19262a 76%);
}
.market-card.gear-row + .gear-row { margin-top: 0; }
.market-item {
  flex: 1 1 160px;
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.market-item-portrait {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--tier) 62%, #283c32);
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--tier) 31%, #28362a), #182626 81%);
}
.market-item-portrait .item-art { --item-size: 48px; }
.market-item-info { display: grid; gap: 4px; min-width: 0; }
.market-item-info strong { color: #ffecd1; font: 700 16px/1.1 Georgia, serif; overflow-wrap: anywhere; }
.market-item-info p { color: #c4dbcc; font-size: 11px; line-height: 1.3; }
.market-item-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: #d1e0d4; font-size: 10px; }
.market-item-tags .market-tier { color: var(--tier); border: 1px solid color-mix(in srgb, var(--tier) 45%, #253a32); border-radius: 4px; padding: 2px 4px; }
.market-tier, .market-item-portrait { --tier: #cfdfd2; }
.market-tier.uncommon, .market-item-portrait.uncommon { --tier: #a3e5a3; }
.market-tier.rare, .market-item-portrait.rare { --tier: #8ed0fa; }
.market-tier.epic, .market-item-portrait.epic { --tier: #e1adee; }
.market-tier.legendary, .market-item-portrait.legendary { --tier: #ffd480; }
.market-stars { color: #f9cf81; }
.market-checkout { display: grid; justify-items: end; gap: 4px; max-width: 100%; }
.market-checkout button:disabled { opacity: .65; cursor: default; }
.market-amount { gap: 4px; color: #ffdc90; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.market-amount-gems { color: #a4e6ff; }
.market-empty { padding: 14px; border: 1px dashed #587369; border-radius: 7px; color: #cbded1; font-size: 12px; }
.market-direct { margin-top: 12px; padding: 7px 9px; border: 1px solid #547063; border-radius: 7px; color: #e1dcb9; }
.market-direct summary { cursor: pointer; font-size: 12px; font-weight: 700; }
.market-direct[open] summary { margin-bottom: 7px; }
.market-content .gear-price input { width: 102px; }
.market-claims { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.market-history {
  display: grid;
  list-style: none;
  gap: 6px;
  margin: 0;
  padding: 0;
}
.market-history li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 11px;
  padding: 8px;
  border: 1px solid #4d4d49;
  border-radius: 7px;
  background: #172522;
}
.market-history li > div { display: grid; gap: 2px; min-width: 0; }
.market-history time { color: #bfcec4; font-size: 11px; }
@media (max-width: 730px) {
  .market-board { grid-template-columns: minmax(0, 1fr); }
  .market-filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    width: 100%;
  }
  .market-filter-toggle[aria-expanded="true"] + .market-filters { margin-top: 6px; }
  .market-filter-toggle[aria-expanded="false"] + .market-filters { display: none; }
  .market-filters h3 { display: none; }
}
@media (max-width: 510px) {
  .market-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #market-dialog .market-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .market-header > form { grid-area: 1 / 2; }
  .market-wallet { grid-area: 2 / 1 / auto / -1; }
  .market-card { gap: 6px; }
  .market-checkout { justify-items: start; }
  .market-filters, .market-results { padding: 9px; }
}

#inventory-dialog {
  width: min(1010px, calc(100% - 24px));
  overflow-y: auto;
  animation: none;
  border-color: #778363;
  background: radial-gradient(ellipse at top left, #2a4137, transparent 57%), #111c20;
}
#inventory-dialog .shop-content { padding: clamp(11px, 2vw, 22px); }
#inventory-dialog .shop-header h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: clamp(19px, 3vw, 27px);
}
.inventory-emblem {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid #7d8561;
  border-radius: 9px;
  background: #26342b;
  font: 18px/1 sans-serif;
}
#equipment-feedback:empty { display: none; }

.pack-layout {
  display: grid;
  grid-template: "hero bag" min-content "hero runes" 1fr / minmax(260px, .78fr) minmax(0, 1.22fr);
  align-content: start;
  align-items: start;
  gap: 11px;
}
.pack-hero, .pack-bag, .pack-runes, .gear-tooltip {
  min-width: 0;
  border: 1px solid #46584d;
  border-radius: 13px;
  background: #131f20;
  padding: 12px;
}
.pack-hero { grid-area: hero; }
.pack-bag { grid-area: bag; }
.pack-runes { grid-area: runes; }
.pack-layout h3 {
  color: #f0d8a6;
  font: 600 18px/1.2 Georgia, serif;
}
.pack-layout p, .pack-restriction {
  color: #bed1c7;
  font-size: 12px;
  line-height: 1.4;
}
.pack-portrait {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding-inline: 12px;
  min-height: 114px;
  border: 1px solid #536853;
  border-radius: 9px;
  background: radial-gradient(ellipse at 75% 78%, #648b5b63, transparent 55%), linear-gradient(125deg, #30453b, #202b32);
}
.pack-portrait h3 { font-size: 22px; }
.pack-portrait svg { width: min(42%, 136px); height: auto; flex: none; }
.pack-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 9px 0 12px;
}
.pack-hero-stats > div {
  min-width: 0;
  padding: 5px 7px;
  border-left: 2px solid #738965;
  background: #1f2e2b;
}
.pack-hero-stats dt { color: #bfcec3; font-size: 10px; }
.pack-hero-stats dd {
  margin: 2px 0 0;
  color: #f1d29a;
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.pack-slot-heading { margin-bottom: 5px; }
.pack-slots, .pack-grid {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pack-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pack-slot { min-width: 0; display: grid; align-content: end; gap: 3px; }
.pack-slot-label { color: #c8d8cd; font-size: 10px; overflow-wrap: anywhere; }
.pack-slot-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  min-height: 52px;
  color: #aebfb7;
  border: 1px dashed #52665a;
  border-radius: 7px;
  padding: 3px;
  text-align: center;
  font-size: 9px;
}
.pack-slot-empty .item-art { --item-size: 23px; filter: grayscale(.65); }
.pack-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.pack-filter { display: flex; align-items: center; gap: 5px; color: #c8d8cc; font-size: 11px; }
.pack-filter select {
  max-width: 125px;
  padding: 4px;
  color: #e9f0e9;
  border: 1px solid #577060;
  border-radius: 6px;
  background: #20332d;
}
.pack-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(76px, 100%), 1fr));
  max-height: min(360px, 42dvh);
  overflow: auto;
  padding: 3px;
  background: #10191c;
  border: 1px solid #3c4f48;
  border-radius: 8px;
}
.pack-empty { grid-column: 1 / -1; padding: 19px 9px; text-align: center; }
.pack-tile {
  --item-tier: #84988b;
  display: grid;
  align-content: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  min-height: 67px;
  padding: 4px;
  text-align: center;
  color: #f3f5ec;
  border: 1px solid var(--item-tier);
  border-radius: 7px;
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--item-tier) 23%, transparent), transparent 80%), #1c2a2b;
  cursor: pointer;
}
.pack-tile.uncommon { --item-tier: #80af7c; }
.pack-tile.rare { --item-tier: #6ca9d2; }
.pack-tile.epic { --item-tier: #be8cdc; }
.pack-tile.legendary { --item-tier: #e4ae59; }
.pack-tile:hover, .pack-tile[aria-describedby="gear-tooltip"] { background-color: #354440; }
.pack-tile:focus-visible { outline: 2px solid #f3d698; outline-offset: -2px; }
.pack-tile-icon { line-height: 0; }
.pack-tile-icon .item-art { --item-size: 31px; }
.pack-tile-name { color: #e3e9e0; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-tile-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1px 3px;
  font-size: 9px;
  color: #c3d7cd;
}
.pack-tile-meta span:last-child { color: #ffda8b; font-weight: 750; }
.pack-item-card { display: grid; gap: 4px; min-width: 0; }
.pack-item-card > .pack-tile { width: 100%; }
.pack-item-card > .hud-top-btn { min-height: 25px; padding: 3px 2px; font-size: 10px; }
.pack-rune-slot { margin: 10px 0; }
#inventory-rune-heading { margin-bottom: 6px; }
#inventory-runes { display: grid; gap: 6px; }
.pack-rune {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  border: 1px solid color-mix(in srgb, var(--rune-tone), transparent 65%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--rune-tone) 9%, #121d21);
  padding: 7px;
}
.pack-rune strong { color: var(--rune-tone); font-size: 12px; }
.pack-rune p { margin: 2px 0 0; font-size: 10px; line-height: 1.4; }
.pack-rune > button { padding: 5px; font-size: 10px; }
.rune-art {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, var(--rune-tone), transparent 70%);
}
.rune-art .item-art { --item-size: var(--rune-icon-size, 27px); filter: drop-shadow(0 0 4px var(--rune-tone)); }
#shop-bulk-warning { color: #f8acc9; }
.pack-bag > .hud-top-btn { margin-top: 9px; }
.pack-detail-heading { display: flex; gap: 8px; align-items: center; }
.pack-detail-heading strong { font-size: 15px; }
.pack-detail-heading p { color: #c4d3c9; font-size: 11px; }
.pack-detail-icon { line-height: 0; }
.pack-bonuses { display: grid; gap: 4px; margin: 7px 0; }
.pack-bonuses div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 4px 6px;
  background: #263a33;
  border-radius: 4px;
  font-size: 12px;
}
.pack-bonuses dd { margin: 0; color: #bceeb4; font-weight: 750; }
.gear-tooltip {
  position: fixed;
  z-index: 10;
  width: min(255px, calc(100vw - 22px));
  pointer-events: none;
  border-color: #9a9d73;
  background: #151f20;
  box-shadow: 0 8px 25px #000c;
}

@media (max-width: 660px) {
  #inventory-dialog { scroll-padding-top: 76px; }
  .pack-layout { grid-template: "hero" "bag" "runes" / minmax(0, 1fr); }
  .pack-portrait { min-height: 76px; }
  .pack-portrait svg { width: 96px; }
  .pack-grid { max-height: min(320px, 40dvh); }
  #inventory-dialog .shop-header {
    position: sticky;
    z-index: 2;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
    padding-top: 5px;
    border-radius: 6px;
    background: #23342e;
  }
  #inventory-dialog .shop-header > form { grid-area: 1 / 2; }
  #inventory-dialog .shop-balance { grid-area: 2 / 1 / auto / -1; text-align: left; }
}
