/* SWV-044: contents determine height; safe-area limits only cap it. */
.hud038{--side-width:min(328px,34vw);--pack-top:calc(var(--hud-top) + 210px);--pack-reserve:10px}
.hud038.activityBusy{--pack-reserve:154px}
.hud038 #inventoryPanel.inventory28:not(.bankView){top:var(--pack-top)!important;bottom:auto!important;height:fit-content!important;max-height:calc(100dvh - var(--pack-top) - var(--hud-bottom) - var(--pack-reserve))!important;width:var(--side-width)!important;max-width:calc(100vw - var(--hud-left) - var(--hud-right))!important;padding:0!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Head{min-height:40px!important;padding:3px 7px!important;align-items:center}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Head h2{font:bold 17px/1.15 Georgia;margin:0!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Close{min-height:36px!important;min-width:40px!important;touch-action:manipulation}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Nav{padding:4px 6px!important;min-height:48px!important;gap:5px!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Content{flex:0 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;padding:6px!important;overflow:auto!important;overscroll-behavior:contain}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28BackpackLayout{display:block!important;min-height:0!important;height:auto!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Pack{min-height:0!important;height:auto!important;margin:0!important;padding:0!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28BagGrid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;margin:0!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Cell{height:auto!important;aspect-ratio:1;min-height:44px!important;min-width:0!important;padding:3px!important;border-color:#c4ae78!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Cell svg{width:94%!important;height:94%!important;max-width:94%!important;max-height:94%!important;filter:drop-shadow(0 2px 1px #0008)}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Cell strong{font:bold 12px system-ui!important;right:3px;bottom:2px;text-shadow:0 1px 2px #000}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Status{margin:0!important;padding:0!important;height:0!important;overflow:hidden!important;min-height:0!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Details[hidden]{display:none!important}
.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Details:not([hidden]){margin:6px 0 0!important;padding:7px!important}
.hud038 #inventoryRestore{width:52px!important;height:56px!important;min-height:48px!important;right:var(--hud-right)!important;bottom:calc(var(--hud-bottom) + 12px)!important;padding:5px 5px 12px!important;border-radius:12px!important;position:fixed!important}
.hud038 #inventoryRestore svg{width:32px!important;height:32px!important;flex:none}
.hud038 #inventoryRestore .packCount{position:absolute;bottom:2px;left:0;right:0;text-align:center;font:bold 10px/12px system-ui;background:#142c21;color:#fff3c8;border-radius:0 0 9px 9px}
@media(orientation:portrait){.hud038{--side-width:min(320px,62vw);--pack-top:calc(var(--hud-top) + 197px)}.hud038 #inventoryPanel.inventory28:not(.bankView) .i28EquipmentLayout{display:block!important}.hud038 #inventoryPanel.inventory28:not(.bankView) .i28EquipmentPreview{height:180px!important}.hud038.inventoryDockOpen #actionDock{max-width:calc(100vw - var(--hud-left) - var(--hud-right))!important;width:calc(100vw - var(--hud-left) - var(--hud-right))!important;grid-template-columns:minmax(0,1fr) 54px!important}.hud038.inventoryDockOpen #actionDock #interact{font-size:16px!important}.hud038.inventoryDockOpen #cancelWork{width:54px!important;min-width:54px!important}}
@media(orientation:landscape) and (max-height:550px){.hud038{--side-width:280px;--pack-top:calc(var(--hud-top) + 10px);--pack-reserve:10px}.hud038.inventoryDockOpen #navigationHUD{right:calc(var(--hud-right) + var(--side-width) + 10px)!important}.hud038.inventoryDockOpen #messageWindow{width:min(380px,calc(100vw - var(--side-width) - var(--navigation-width) - 50px))!important}.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Cell{min-height:44px!important}.hud038 #inventoryPanel.inventory28:not(.bankView) .i28Content{flex:0 1 auto!important}.hud038 #actionDock{width:min(420px,calc(100vw - var(--side-width) - 30px))!important}}
/* Time-sensitive fishing information stays with its action, above other docks. */
.hud038 #actionDock[data-fishing=true]{z-index:45!important}
.hud038 #actionDock[data-fishing=true] #activity{font-size:12px!important;padding:3px 10px 9px!important}
.hud038 #reelReadout{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:3px 0;color:#fff5ce;text-shadow:0 2px 1px #000}
.hud038 #reelReadout[hidden]{display:none!important}
.hud038 #reelState{font:700 14px/1.2 system-ui;text-align:left}
.hud038 #reelPercentage{font:800 32px/1 system-ui;font-variant-numeric:tabular-nums;color:#ffeb9b;min-width:2.8em;text-align:right}
.hud038 #actionDock[data-phase=fight] #chopProgress{height:18px!important;border:1px solid #f2d990;border-radius:6px;overflow:hidden;background:#061b15;accent-color:#c9ec68}
.hud038 #chopProgress::-webkit-progress-bar{background:#061b15}.hud038 #chopProgress::-webkit-progress-value{background:linear-gradient(90deg,#8bbf50,#e3ee96)}
.hud038 #actionDock #interact{touch-action:none!important;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.hud038 #actionDock[data-phase=bite] #interact{background:linear-gradient(#a17c26,#5b441b)!important;color:#fff9d5!important;font-size:20px!important}
.hud038 #actionDock[data-phase=bite] #activity{font-weight:800;font-size:17px!important;color:#fff1ad}
@media(orientation:portrait){.hud038 #actionDock[data-fishing=true]{width:calc(100vw - var(--hud-left) - var(--hud-right))!important;max-width:none!important}.hud038 #actionDock[data-fishing=true] #interact{font-size:17px!important}}
/* Owner steering: expanded dock grows upward from bottom-right safe corner. */
.hud038 #inventoryPanel.inventory28:not(.bankView){top:auto!important;bottom:calc(var(--hud-bottom) + 10px)!important;max-height:calc(100dvh - var(--hud-top) - var(--hud-bottom) - 218px)!important}
@media(orientation:portrait){.hud038 #inventoryPanel.inventory28:not(.bankView){max-height:calc(100dvh - var(--hud-top) - var(--hud-bottom) - 207px)!important}.hud038.inventoryDockOpen #actionDock[data-fishing=true]{width:calc(100vw - var(--side-width) - 30px)!important;max-width:calc(100vw - var(--side-width) - 30px)!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto!important}.hud038.inventoryDockOpen #actionDock #cancelWork{grid-column:1!important;grid-row:3!important;width:100%!important;min-height:44px!important;flex-direction:row!important;gap:5px;margin-top:5px}.hud038.inventoryDockOpen #actionDock #interact{font-size:14px!important;min-height:54px!important;white-space:normal}.hud038.inventoryDockOpen #reelReadout{display:block}.hud038.inventoryDockOpen #reelState{display:block;font-size:12px;text-align:center}.hud038.inventoryDockOpen #reelPercentage{display:block;text-align:center;font-size:30px;margin-top:4px}.hud038.inventoryDockOpen #actionDock[data-fishing=true] #activity{font-size:11px!important;padding:2px 6px 8px!important}}
@media(orientation:landscape) and (max-height:550px){.hud038 #inventoryPanel.inventory28:not(.bankView){max-height:calc(100dvh - var(--hud-top) - var(--hud-bottom) - 20px)!important}}
/* Owner refinement: smaller open footprint, still four readable touch columns. */
.hud038{--side-width:min(300px,30vw)}
@media(orientation:portrait){.hud038{--side-width:min(292px,max(204px,54vw))}}
@media(orientation:landscape) and (max-height:550px){.hud038{--side-width:260px}}
.hud038:not(.inventoryDockOpen) #actionDock[data-fishing=true]{width:min(480px,calc(100vw - 84px))!important;max-width:min(480px,calc(100vw - 84px))!important}
@media(orientation:landscape) and (max-height:550px){
 .hud038 #inventoryPanel.inventory28:not(.bankView) .i28Head{height:32px!important;min-height:32px!important;padding:1px 6px!important;box-sizing:border-box}
 .hud038 #inventoryPanel.inventory28:not(.bankView) .i28Close{height:28px!important;min-height:28px!important;padding:1px!important}
 .hud038 #inventoryPanel.inventory28:not(.bankView) .i28Nav{height:40px!important;min-height:40px!important;padding:2px 4px!important;box-sizing:border-box}
 .hud038 #inventoryPanel.inventory28:not(.bankView) .i28Nav button{min-height:34px!important;height:34px!important}
 .hud038 #inventoryPanel.inventory28:not(.bankView) .i28Content{padding:4px!important}
 .hud038 #inventoryPanel.inventory28:not(.bankView) .i28BagGrid{gap:3px!important}
 .hud038 #inventoryPanel.inventory28:not(.bankView) .i28Cell{height:44px!important;min-height:44px!important;aspect-ratio:auto!important}
}

.hud038 #inventoryRestore.i28ShortcutRow{
 display:flex;flex-direction:row;gap:4px;width:auto!important;height:auto!important;
 min-height:0!important;padding:0!important;background:none!important;border:0!important;
}
.hud038 #inventoryRestore .i28Shortcut{
 position:relative;display:grid;place-items:center;flex:0 0 46px;
 width:46px;height:50px;padding:4px;border-radius:9px;
}
.hud038 #inventoryRestore .i28Shortcut[data-tab="inventory"]{padding-bottom:13px}
.hud038 #inventoryRestore .i28Shortcut svg{width:30px!important;height:30px!important}
