/* The approved compact inventory: existing iron/gold art, no decorative texture. */
.side:has(.inv-tetris) { bottom: auto; }
.side > .wnd.inv-tetris { flex: none; }
.wnd.inv-tetris, .wnd.stash-tetris {
  padding: 10px 8px 8px; margin: 0; border: 8px solid transparent;
  border-image: url('/activity/assets/kit/d/panels/panel-l.png') 12 / 8px stretch;
  background: #15120f; box-shadow: 0 8px 24px #0009;
}
.inv-tetris .plaque, .stash-tetris .plaque { position: static; transform: none; min-width: 0; height: 25px; padding: 0 28px 7px 2px; border: 0; text-align: left; justify-content: flex-start; font-size: 15px; letter-spacing: .04em; margin-bottom: 7px; }
.inv-tetris .plaque::before, .inv-tetris .plaque::after, .stash-tetris .plaque::before, .stash-tetris .plaque::after { display: none; }
.inv-tetris .wnd-close, .stash-tetris .wnd-close { top: 8px; right: 8px; width: 22px; height: 22px; }
.inv-tetris .doll { width: 100%; height: auto; aspect-ratio: 360 / 272; margin: 0; }
/* The belt's potions: the HUD belt's charge (label and bar), live while the inventory is open. */
.inv-tetris .belt-slot .inv-potion-status { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0; background: #080604d8; color: var(--gold-hi); text-align: center; font: 9px/1 var(--f-ui); pointer-events: none; }
.inv-tetris .belt-slot .inv-potion-charge { position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: linear-gradient(90deg, var(--gold-hi) calc(var(--potion-charge, 1) * 100%), #24190e 0); pointer-events: none; }
.inv-tetris .belt-slot.recharging > .icon, .inv-tetris .belt-slot.used > .icon { filter: brightness(.45); }
.inv-tetris .belt-slot.recharging .inv-potion-status { color: #eee4d2; }
.inv-tetris .belt-slot.used .inv-potion-status { color: var(--parch-faint); }
.inv-tetris .doll-slot, .inv-tetris .belt-slot {
  border: 4px solid transparent; border-image: url('/activity/assets/kit/d/slots/slotf1.png') 4 / 4px stretch;
  background: color-mix(in srgb, var(--rc) 18%, #100d0a); padding: 0;
}
.inv-tetris .doll-slot::before, .inv-tetris .belt-slot::before { display: none; }
.inv-tetris .doll-slot.vacant, .inv-tetris .belt-slot.vacant { background: #100d0a; }
.inv-tetris .inv-belt { margin: 6px 0; gap: 8px; }
.inv-tetris .belt-slot { width: 38px; height: 34px; }
.inv-tetris .inv-tabs { gap: 4px; margin: 7px 0; }
.inv-tetris .tab, .stash-tetris .tab { height: 27px; padding: 0 4px; border-width: 0 6px; border-image-width: 0 6px; font-size: 12px; flex: 1; letter-spacing: 0; }
.inv-tetris .tab small { display: none; }
.tetris-bag.bag { margin: 0; padding: 1px; max-height: none; overflow: visible; border: 4px solid transparent; border-image: url('/activity/assets/kit/d/panels/panel-a.png') 8 / 4px stretch; background: #090705; box-shadow: none; }
.tetris-grid.bag-grid { position: relative; width: 100%; aspect-ratio: var(--cols) / var(--rows); grid-template-columns: repeat(var(--cols), minmax(0,1fr)); grid-template-rows: repeat(var(--rows), minmax(0,1fr)); grid-auto-rows: auto; gap: 0; background: #0e0c09; isolation: isolate; }
/* Every row gets a real cell border; there is no gradient-repeat height to drift. */
.tetris-cell { min-width: 0; min-height: 0; border-right: 1px solid #5d4d3355; border-bottom: 1px solid #5d4d3355; }
.tetris-item.slot { position: absolute; left: calc(var(--x) * 100% / var(--cols)); top: calc(var(--y) * 100% / var(--rows)); width: calc(var(--w) * 100% / var(--cols)); height: calc(var(--h) * 100% / var(--rows)); margin: 0; padding: 0; border: 1px solid color-mix(in srgb,var(--rc) 38%,#19130d); border-image: none; background: linear-gradient(135deg,#ffffff03,transparent 45%,#0005),color-mix(in srgb,var(--rc) 30%,#100d0a); box-shadow: inset 0 0 0 1px #060504,inset 0 0 20px #0009; }
.tetris-item.slot::before { display: none; }
.tetris-item[data-rarity=Basic] { background-color: #181510; background-image: none; }
.tetris-item[data-rarity=Common] { background-color: #292820; background-image: none; }
.tetris-item.slot.sel::after { inset: 0; border: 1px solid var(--gold-hi); box-shadow: none; }
.tetris-item .icon { max-width: calc(100% - 6px) !important; max-height: calc(100% - 6px) !important; object-fit: contain; }
.tetris-item .qty { left: auto; right: 3px; top: auto; bottom: 3px; font-size: 11px; }
.tetris-item .inventory-socket { width: 7px; height: 7px; }
.inv-tetris .doll-slot .inventory-socket { width: 10px; height: 10px; }
.inv-tetris .doll-slot .item-sockets { bottom: 4px; }
.inv-tetris .wnd-foot, .stash-tetris .wnd-foot { margin-top: 7px; padding: 4px 0 0; border: 0; min-height: 28px; gap: 6px; }
.inv-tetris .gold-line { font-size: 14px; }
.btn.arrange, .inv-tetris .inv-selection-actions .btn, .stash-tetris .wnd-foot .btn { height: 28px; min-width: 70px; border-width: 0 8px; border-image-width: 0 8px; padding: 0 4px; font-size: 12px; letter-spacing: 0; }
.btn.arrange { margin-left: auto; }
.btn.arrange img { width: 16px; height: 16px; }
.inv-selection-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0 0; }
.inv-selection-actions .btn.red, .inv-selection-actions .btn.gold { border-image-source: url('/activity/assets/kit/d/ui/btn.png'); border-image-slice: 0 8 fill; }
.inv-tetris .bag-pages { padding-top: 3px; }
/* Keep the footer and window scale steady when switching between one-page and multi-page tabs. */
.inv-tetris .bag-pages.single-page { visibility: hidden; pointer-events: none; }
.inv-tetris .socket-focus { margin-top: 6px; flex-wrap: wrap; }
.tetris-drop-preview { position: absolute; pointer-events: none; z-index: 5; }
.stash-tetris .stash-head { margin: 0 0 8px; font-size: 12px; }
.stash-tetris .tabs { margin-bottom: 8px; }
.stash-tetris .bag-pages { padding-top: 5px; }
.stash-tetris .wnd-foot { flex-wrap: wrap; }
.stash-tetris .wnd-foot .hint { max-width: 180px; }
.stash-tetris .wnd-back { position: static; margin-bottom: 4px; font-size: 12px; }
.overflow-list { display: grid; gap: 4px; max-height: 530px; overflow-y: auto; }
.overflow-row { display: flex; gap: 9px; align-items: center; padding: 5px 7px; border: 1px solid #4b3b25; background: #100d0a; text-align: left; }
.overflow-row .icon { flex: none; position: static; transform: none; }
.overflow-row span { flex: 1; color: var(--rc); font-size: 13px; }
.overflow-row small { color: var(--parch-dim); }

.side:has(.inv-tetris), .side:has(.stash-tetris) { z-index: 12; }
.side:has(.stash-tetris) { bottom: auto; }
.side > .wnd.stash-tetris { flex: none; }
.wnd.stash-tetris .stash-bag { flex: none; }

/* Selected-item actions and sockets sit over the bag without changing its frame or fit scale. */
.inv-tetris .tetris-bag { position: relative; }
.inv-tetris .inv-bag-overlays { position: absolute; left: 4px; right: 4px; bottom: 4px; z-index: 7; display: grid; gap: 4px; max-height: 50%; overflow-y: auto; background: #15120ff5; box-shadow: 0 -3px 9px #0009; }
.inv-tetris .inv-bag-overlays:empty { display: none; }
.inv-tetris .inv-bag-overlays .inv-selection-actions { padding: 5px 4px; }
.inv-tetris .inv-bag-overlays .socket-focus { margin: 0; padding: 5px 4px; }

/* Relic controls replace the footer's visible contents; the gold counter stays mounted for background refresh. */
.inv-tetris .native-relic-footer { position: relative; }
.inv-tetris .native-relic-footer > .gold-line,
.inv-tetris .native-relic-footer > .hint { visibility: hidden; }
.native-relic-filters { position: absolute; top: 0; bottom: 0; left: 0; right: 110px; z-index: 8; margin: 0; color: var(--parch); font-family: var(--f-ui); }
.native-relic-filters .nrf-bar { display: flex; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.native-relic-filters .btn { height: 26px; min-width: 61px; padding: 0 3px; border-width: 0 8px; border-image-width: 0 8px; border-image-source: url('/activity/assets/kit/d/ui/btn.png'); border-image-slice: 0 8 fill; font-size: 12px; letter-spacing: 0; }
.native-relic-filters .nrf-toggle { flex: none; }
.native-relic-filters .nrf-toggle small { display: inline-grid; place-items: center; min-width: 15px; color: var(--gold-hi); font: 11px var(--f-ui); }
.native-relic-filters .nrf-filter-on { color: var(--gold-hi); }
.native-relic-filters .nrf-sort { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--parch-faint); font: 11px var(--f-ui); }
.native-relic-filters .nrf-sort select { width: 78px; height: 24px; padding: 2px 3px; font: 12px var(--f-ui); }
.native-relic-filters .nrf-count { margin-left: auto; color: var(--parch-faint); white-space: nowrap; font: 11px var(--f-ui); font-variant-numeric: tabular-nums; }
.native-relic-filters .nrf-chips { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 7px; max-height: 120px; overflow-y: auto; }
.native-relic-filters .nrf-chip.tab { flex: 0 1 auto; height: 22px; padding: 0 3px; border-width: 0 6px; border-image-width: 0 6px; filter: none; font: 11px var(--f-ui); letter-spacing: 0; }
.native-relic-filters .nrf-chip.nrf-require { color: #bdce9e; }
.native-relic-filters .nrf-chip.nrf-avoid { color: #dcaa92; }
.native-relic-filters .nrf-chip span { margin-left: 4px; color: var(--parch-faint); }
.native-relic-filters .nrf-flyout { position: absolute; bottom: calc(100% + 6px); top: auto; right: -110px; left: 0; z-index: 30; max-height: min(560px, 65vh); overflow-y: auto; padding: 8px; border: 6px solid transparent; border-image: url('/activity/assets/kit/d/panels/panel-a.png') 8 / 6px stretch; background: #15120f; box-shadow: 0 -4px 16px #000c; }
.native-relic-filters .nrf-flyout[hidden] { display: none; }
.native-relic-filters .nrf-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--gold); font: 14px var(--f-ui); }
.native-relic-filters .nrf-close { width: 23px; height: 23px; padding: 0; border: 1px solid #4a3b28; background: #0d0b09; color: var(--parch-dim); font: 17px/1 var(--f-ui); }
.native-relic-filters .nrf-field { display: grid; grid-template-columns: 62px minmax(0,1fr); align-items: center; gap: 6px; margin: 6px 0; font: 12px var(--f-ui); }
.native-relic-filters .nrf-field:first-of-type > span { color: #bdce9e; }
.native-relic-filters .nrf-field:last-of-type > span { color: #dcaa92; }
.native-relic-filters .nrf-field select { width: 100%; min-width: 0; height: 27px; font: 12px var(--f-ui); }
.native-relic-filters .nrf-rule { margin-top: 9px; padding-top: 7px; border-top: 1px solid #4a3b2866; color: var(--parch-faint); font: 11px/1.35 var(--f-ui); }
.native-relic-filters .nrf-foot { display: flex; justify-content: space-between; gap: 7px; margin-top: 8px; }
.inv-tetris .tetris-item.native-relic-miss { opacity: .19; filter: grayscale(.7) brightness(.8); }
.inv-tetris .tetris-item.native-relic-match { border-color: var(--gold-hi); box-shadow: inset 0 0 0 1px #d6af5c70, inset 0 0 20px #0009, 0 0 5px #d6af5c22; }
@media(max-width:400px) {
  .native-relic-filters .nrf-bar { gap: 4px; }
  .native-relic-filters .nrf-count { font-size: 10px; }
  .native-relic-filters .nrf-sort { gap: 3px; }
  .native-relic-filters .nrf-sort select { width: 77px; }
}
