.panel-drag-handle{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.inventory-receipt{position:fixed;inset:auto auto max(88px,calc(env(safe-area-inset-bottom,0px) + 76px)) 50%;transform:translateX(-50%);z-index:10000;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:max-content;max-width:min(440px,calc(100vw - 32px));margin:0;padding:11px 16px;border:1px solid var(--escape-accent,#d3b879);border-radius:8px;background:var(--escape-surface,#22312d);color:var(--escape-ink,#fff5de);box-shadow:0 5px 24px #0004;font:500 15px/1.45 var(--escape-ui-font,system-ui,sans-serif);text-align:left;overflow-wrap:anywhere;pointer-events:none}
.inventory-receipt::backdrop{background:transparent;pointer-events:none}
.inventory-receipt-mark{flex:none;display:grid;place-items:center;width:24px;height:24px;border:1px solid currentColor;border-radius:50%;color:var(--escape-accent,#d3b879);font-size:15px;line-height:1}
@media(max-width:480px){.inventory-receipt{font-size:14px;padding:10px 12px;max-width:calc(100vw - 24px)}}
.panel-dragging .panel-drag-handle{cursor:grabbing}
.panel-drag-handle:focus-visible{outline:2px solid #ecd39c;outline-offset:-3px}
.inventory-window-bar{position:absolute;top:0;left:0;right:0;height:27px;display:flex;align-items:center;justify-content:space-between;padding:0 5px 0 12px;border-bottom:1px solid #dbbf8838;color:#dbcaa8;font:11px/1.2 Georgia,serif}
.inventory-window-bar::before,.bag-top::before{content:'⠿';font:18px/1 system-ui;opacity:.75;margin-right:8px;pointer-events:none}
.inventory-window-bar>span{flex:1}
#game .inventory-window-bar button{position:static;background:transparent;border:0;min-height:26px;width:32px;margin:0;padding:0;color:inherit;font:22px/1 system-ui;border-radius:3px}
#game .inventory-window-bar button:hover{background:#ffffff17}
#game .inventory:has(.inventory-window-bar){padding-top:29px!important}
#game .inventory:has(.inventory-window-bar) .slots{align-self:stretch}
#game .inventory[data-panel-moved=true]{animation:none}
.bag-top{gap:10px}.bag-top #bag-label{flex:1}.bag-top #selected-status{max-width:45%;line-height:1.4}
#bag-close{flex:none;font:24px/1 Georgia,serif;min-width:36px;min-height:36px;padding:0;border:0;background:transparent}
#cancel-selection{font-size:12px;min-height:34px}
:is(#game,#game-main).inventory-received [data-inventory-toggle],:is(#game,#game-main).inventory-received .inventory,:is(#game,#game-main).inventory-received #bag-shell{outline:2px solid #eed185;outline-offset:3px;box-shadow:0 0 15px #edca6d80,0 0 34px #e6c46b38}
:is(#game,#game-main) .inventory-new-item{outline:1px solid #f0d38f;outline-offset:1px;box-shadow:inset 0 0 18px #e6c46b30}
@media(prefers-reduced-motion:no-preference){:is(#game,#game-main).inventory-received [data-inventory-toggle]{animation:inventory-arrival 1.8s ease-in-out 3}@keyframes inventory-arrival{50%{box-shadow:0 0 22px #f6cf66a0;outline-color:#fff0b9}}}
body.reduce-motion :is(#game,#game-main).inventory-received [data-inventory-toggle]{animation:none}
@media(max-width:650px){.bag-top #selected-status{display:none}.inventory-window-bar{height:27px}#game .inventory:has(.inventory-window-bar) .item{grid-template-rows:48px minmax(0,1fr)}#game .inventory:has(.inventory-window-bar) .inventory-art{max-height:48px;height:48px}}

#game[data-hud=modern] .inventory{background-image:linear-gradient(#211d19aa,#211d19aa),var(--inventory-skin)!important;background-size:100% 100%;background-color:#241f1a;border-color:#c7aa75}
#game[data-hud=modern] .inventory-window-bar{background:#241b12ad;color:#f1dfba}
.inventory-dialog-close{position:absolute;top:8px;right:10px;width:40px;height:40px;padding:0!important;font-size:25px!important;z-index:3}

#game .inventory:has(.inventory-window-bar){animation:none}

/* Keep the movable header above the slots in both existing HUDs. */
#game[data-hud=modern] .inventory:has(.inventory-window-bar){padding-top:31px!important;background-image:linear-gradient(#211d19aa,#211d19aa),var(--inventory-skin)!important;background-size:100% 100%;animation:none}
@media(max-height:520px) and (orientation:landscape){#game[data-hud=modern] .inventory:has(.inventory-window-bar) .item{grid-template-rows:36px minmax(0,1fr)}#game[data-hud=modern] .inventory:has(.inventory-window-bar) .inventory-art{height:36px;max-height:36px}}
