/* A bottomless inventory is a full workspace with symmetric transfer actions. */
body.bottomlessOpen{overflow:hidden}
.bottomlessOverlay{z-index:2400;background:#080b0cce;backdrop-filter:blur(7px)}
.bottomlessOverlay .modalCard{width:min(1160px,calc(100vw - 40px));height:min(850px,calc(100dvh - 40px));max-height:none;display:flex;flex-direction:column;padding:0;overflow:hidden;background:radial-gradient(ellipse at 80% 0,#71647721,transparent 60%),linear-gradient(135deg,#212729,#11191b);border:1px solid #c8a77280;border-radius:12px;box-shadow:0 28px 90px #000b,inset 0 1px 0 #e8d4ab22}
.bottomlessOverlay .modalHead{flex:none;padding:14px 20px;min-height:68px;background:linear-gradient(#9a7f4422,transparent);border-bottom:1px solid #c8a77236;display:flex;align-items:center;justify-content:space-between;gap:16px}
.bottomlessOverlay .modalHead h3{font:600 28px/1.2 var(--font-display,Georgia,serif);margin:0;color:var(--ui-text,#f2e5cc);overflow-wrap:anywhere}.bottomlessOverlay .modalHead button{min-width:44px;min-height:44px}
.storageSummary{display:flex;align-items:center;gap:14px;padding:12px 20px;border-bottom:1px solid #c8a7722b;flex:none;color:var(--ui-text,#f2e5cc)}
.storageSummary>div{flex:1;min-width:0}.storageSummary b{font:600 14px/1.4 var(--font-ui,system-ui)}.storageTotals{display:block;font:400 12px/1.5 var(--font-ui,system-ui);color:var(--ui-muted,#bfb196);margin-top:3px}.storageSummary [data-edit-container]{min-height:44px}
.storageInfinity{font:42px/1 var(--font-display,Georgia);color:#ddc49a;text-shadow:0 0 24px #b092db32}
.storageSplit{min-height:0;flex:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:16px}
.storageSplit>section{min-width:0;min-height:0;display:flex;flex-direction:column;border:1px solid #c8a7723a;border-radius:9px;background:#0d1516c9;transition:border-color 120ms,box-shadow 120ms;overflow:hidden}
.storageSplit header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;flex:none;background:linear-gradient(#9a7f4414,transparent);border-bottom:1px solid #c8a7722b}
.storageSplit h4{font:600 21px/1.25 var(--font-display,Georgia);margin:0;color:var(--ui-text,#f2e5cc)}.storageSplit header span{font:500 12px/1.4 var(--font-ui,system-ui);color:var(--ui-muted,#bfb196)}
.storageMainScroll,.storageContentScroll{overflow:auto;overscroll-behavior:contain;min-height:0;flex:1;scrollbar-width:thin;scrollbar-color:#746348 #10191a}
.storageMainGridHost{padding:14px 10px;display:block;min-width:0}
.storageMainGridHost>.bagGrid{margin-inline:auto}
.bottomlessOverlay .bagGrid{flex:none;max-width:none;touch-action:pan-y;border-color:#a68b5d;border-radius:8px;background:linear-gradient(#162022,#101618),url('/textures/leather.svg');box-shadow:0 0 0 3px #0b1213,0 0 0 4px #c8a77224}
.bottomlessOverlay .cell{border:1px solid #a38d6526;border-radius:4px;background:linear-gradient(#26302a66,#0e1718);box-shadow:inset 0 2px 5px #0004}
.bottomlessOverlay .placed{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px;border-radius:5px;overflow:hidden;touch-action:pan-y;box-shadow:inset 0 1px 0 #ecd09e20,0 3px 8px #0006;border:1px solid color-mix(in srgb,var(--rarity,#c8a772) 65%,#38433c);background:radial-gradient(ellipse at 50% 0,var(--rarity-wash,#c8a77220),transparent),linear-gradient(#344036,#151e1d)}
.bottomlessOverlay .placed .iconWrap{width:min(86%,100px);height:auto;aspect-ratio:1;max-height:75%;overflow:hidden;flex:none}.bottomlessOverlay .placed .itemTileName{font:600 12px/1.25 var(--font-ui,system-ui);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-height:30px;overflow-wrap:anywhere;word-break:normal;color:var(--look-ink,var(--ui-text,#f2e5cc))}
.bottomlessOverlay .placed[data-art-only=true] .itemTileName{display:none}.bottomlessOverlay .placed[data-art-only=true] .iconWrap{width:min(90%,90px);max-height:92%}
.storageSearch,.storageMainSelect{flex:none;display:block;margin:10px 12px 0;width:calc(100% - 24px);min-height:44px;font:400 14px/1.3 var(--font-ui,system-ui);padding:9px 12px}
.storageList{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:10px;padding:12px;align-content:start}.storageEntry{display:flex;flex-direction:column;min-width:0}
.storageItem{padding:13px 10px;display:flex;flex-direction:column;align-items:center;gap:9px;min-height:160px;width:100%;text-align:center;touch-action:pan-y;border:1px solid color-mix(in srgb,var(--rarity,#c8a772) 55%,#3d463c);border-radius:8px 8px 0 0;color:var(--look-ink,#f2e5cc);background:radial-gradient(ellipse at 50% 0,var(--rarity-wash,#c8a77220),transparent),linear-gradient(#2e3630,#151e1c);box-shadow:inset 0 1px 0 #d1bc9226,0 3px 9px #0004}
.storageItem .iconWrap{display:block;width:74px;height:74px;overflow:hidden;filter:drop-shadow(0 4px 3px #0005)}.storageItem .iconWrap>:is(.itemArt,svg,img),.bottomlessOverlay .placed .iconWrap>:is(.itemArt,svg,img){width:100%;height:100%;object-fit:contain}
.storageItem b{font:600 13px/1.3 var(--font-ui,system-ui);overflow-wrap:anywhere}.storageItem small{font:400 12px/1.4 var(--font-ui,system-ui);color:var(--look-muted,#bfb196)}
.storageTake{font:600 12px/1.3 var(--font-ui,system-ui);min-height:44px;border-radius:0 0 7px 7px;width:100%}.storageItem.active,.bottomlessOverlay .placed.active{outline:2px solid #f2d695;outline-offset:-2px}
.storageEmpty{grid-column:1/-1;text-align:center;padding:35px 25px;color:var(--ui-muted,#bfb196)}.storageEmpty>span{display:block;font:64px/1 var(--font-display,Georgia);color:#c4b1dd;text-shadow:0 0 30px #a179d62f}.storageEmpty h4{font-size:23px;margin:12px 0}.storageEmpty p{font:400 14px/1.6 var(--font-ui,system-ui);max-width:290px;margin:10px auto}
.storageSelection{padding:12px 16px;border-top:1px solid #c8a77236;flex:none;min-height:70px;display:flex;align-items:start;justify-content:space-between;gap:20px;background:#171f20;color:var(--ui-muted,#bfb196);font:400 13px/1.5 var(--font-ui,system-ui);max-height:35dvh;overflow:auto}
.storageSelection>div:first-child{min-width:0;flex:1}.storageSelection b{font:600 16px/1.3 var(--font-display,Georgia);color:var(--ui-text,#f2e5cc)}.storageSelectionLocation{display:block;font:400 11px/1.4 var(--font-ui,system-ui);margin-top:3px;color:var(--ui-muted,#bfb196)}
.storageRules{margin:6px 0 0}.storageRules summary{cursor:pointer;color:#d6c5a4;font:500 12px/1.5 var(--font-ui,system-ui);padding:4px 0}.storageRules p{margin:8px 0 0;max-width:750px;font:400 14px/1.6 var(--font-ui,system-ui);white-space:pre-wrap;overflow-wrap:anywhere}
.storageSelection button{min-height:44px;white-space:nowrap;font-size:12px}.storageSelection .actions{flex:none;display:flex;gap:8px}
.storageDropReady{border-color:#e3c894!important;box-shadow:inset 0 0 30px #c8a77220,0 0 0 2px #c8a77260!important}.storageDropDenied{border-color:#d8947e!important;box-shadow:inset 0 0 25px #aa56452d!important}
.storageBadge{position:absolute;bottom:4px;right:6px;font:700 18px/1 var(--font-display,Georgia);color:#e9ca8d;text-shadow:0 1px 3px #000;pointer-events:none}
.storageSwitcher{display:none}.storageDragDock{position:fixed;z-index:5000;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr 1fr;gap:8px;pointer-events:auto}.storageDragDock b{padding:17px;text-align:center;background:linear-gradient(#9a8051,#4f402d);border:1px solid #dfc291;border-radius:8px;color:#fff0cf;font:600 14px var(--font-ui,system-ui);box-shadow:0 6px 22px #0009}
.bottomlessOverlay :is(button,summary):focus-visible{outline:2px solid #f3d89d;outline-offset:3px}
@media(max-width:759px){.bottomlessOverlay{padding:0}.bottomlessOverlay .modalCard{width:100%;height:100dvh;max-height:100dvh;border-radius:0;padding-bottom:env(safe-area-inset-bottom)}.bottomlessOverlay .modalHead{padding:12px 14px;min-height:64px}.bottomlessOverlay .modalHead h3{font-size:24px}.storageSummary{padding:10px 14px;gap:10px;flex-wrap:wrap}.storageInfinity{font-size:34px}.storageSummary b{font-size:13px}.storageTotals{font-size:11px}.storageSummary [data-edit-container]{font-size:12px;padding:6px 9px}.storageSwitcher{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:10px 12px 0}.storageSwitcher button{min-height:44px;font-size:14px}.storageSwitcher button[aria-selected=true]{background:linear-gradient(#7d6b48,#4b4030);color:#fff0ce;border-color:#d4b582}.storageSwitcher button[aria-selected=false]{background:#192222;color:#bfb196;border-color:#c8a77240}.storageSplit{display:block;min-height:0;padding:10px 12px}.storageSplit>section{height:100%}.bottomlessOverlay[data-storage-view=inside] .storageMain,.bottomlessOverlay[data-storage-view=main] .storageInside{display:none}.storageList{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.storageItem{min-height:152px;padding:11px 8px}.storageItem .iconWrap{width:66px;height:66px}.storageItem b{font-size:13px}.storageSelection{padding:10px 12px;gap:9px;flex-wrap:wrap;min-height:70px;max-height:35dvh}.storageSelection>div:first-child{flex-basis:100%}.storageSelection .actions{display:flex;width:100%}.storageSelection .actions button{flex:1}.storageSearch,.storageMainSelect{font-size:16px}.storageRules summary{min-height:36px}}
@media(hover:hover) and (pointer:fine){.storageItem:hover{filter:brightness(1.1);border-color:#dec491}}
@media(prefers-reduced-motion:reduce){.storageSplit>section{transition:none}}
.bottomlessOverlay .modalCard {
  background:linear-gradient(145deg,color-mix(in srgb,var(--ui-panel,#1b2022) 86%,transparent),color-mix(in srgb,var(--ui-bg,#111416) 94%,transparent)),var(--ui-material,url('/art/slate-leather-v1.webp')) center/cover;
  border-color:color-mix(in srgb,var(--ui-gold,#c8a772) 58%,transparent);
}
.storageSplit>section {background:color-mix(in srgb,var(--ui-bg,#111416) 88%,transparent)}
.storageSwitcher button {box-shadow:none}
.storageSelection {background:color-mix(in srgb,var(--ui-panel,#1b2022) 90%,transparent)}
.storageSelectionLocation {overflow-wrap:anywhere}
.bottomlessOverlay .modalHead .panelTitle {display:none}
@media(max-width:759px){.bottomlessOverlay .bagGrid,.bottomlessOverlay .placed{touch-action:pan-x pan-y}}
.storageEntry[hidden],.storageEmpty[hidden]{display:none!important}
.bottomlessOverlay .storageContentScroll,.bottomlessOverlay .storageMainScroll{scrollbar-gutter:stable}
.bottomlessOverlay .storageEntry{contain:layout style}
.bottomlessOverlay .dropPreview{z-index:3}
.bottomlessOverlay .storageSearch{min-height:44px}
.bottomlessOverlay .storageStackTarget{outline:2px solid #b8d4a2;outline-offset:1px;box-shadow:inset 0 0 20px #b8d4a21a,0 0 0 5px #b8d4a218}
.storageHistory{display:flex;gap:5px;align-items:center}
.bottomlessOverlay .storageHistory>button{width:44px;min-width:44px;min-height:44px;padding:5px;font:400 24px/1 system-ui;background:#252b22;color:var(--ui-gold);border-color:#c8a77240;box-shadow:none}
.bottomlessOverlay .storageHistory>button:disabled{opacity:.3;cursor:default}
@media(max-width:760px){.bottomlessOverlay .storageSummary{flex-wrap:wrap}.bottomlessOverlay .storageHistory{margin-left:auto}}
.storageSummary>.storageHistory{flex:0 0 auto}
.storageList[data-windowed=true]{display:block}
.storageList[data-windowed=true]>.inventoryWindowCanvas{position:relative;width:100%;min-height:0}
.storageList[data-windowed=true] .storageEntry{margin:0;box-sizing:border-box}
.storageList[data-windowed=true] .storageItem{flex:1;min-height:0;overflow:hidden;justify-content:center}
.storageList[data-windowed=true] .storageItem b{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;max-height:3.9em}
.storageList[data-windowed=true] .storageTake{flex:none}
@media(max-width:759px){
  .bottomlessOverlay .storageSummary{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:8px 10px}
  .bottomlessOverlay .storageSummary>.storageInfinity{grid-column:1;grid-row:1;text-align:center}
  .bottomlessOverlay .storageSummary>div:not(.storageHistory){grid-column:2/-1;grid-row:1;min-width:0}
  .bottomlessOverlay .storageSummary>[data-edit-container]{grid-column:1/3;grid-row:2;justify-self:start}
  .bottomlessOverlay .storageSummary>.storageHistory{grid-column:3;grid-row:2;margin:0;justify-self:end}
}
