/* The bank ledger: cream paper, dark ink and restrained brass controls. */
#hud .bank-panel { width: 980px; height: min(710px, calc(100dvh - 48px)); max-width: calc(100vw - 36px); padding: 20px 22px 0; background: linear-gradient(110deg, #d5c5a7f5, #ede1c8f7 45%, #d4c2a0f5); }
#hud .bank-panel > header { padding-bottom: 12px; flex-shrink: 0; }
#hud .bank-panel > header h2 { font-size: 29px; }
#hud .bank-panel > header p { font-size: 9px; margin-bottom: 5px; }
#hud .bank-panel > header button { width: 34px; height: 34px; }
#hud .bank-panel > .panel-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; background: none; padding: 0; }
#hud .bank-panel > footer { display: none; }
#hud .bank-summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 12px; }
#hud .bank-summary > span:first-child { display: flex; align-items: center; gap: 8px; }
#hud .bank-summary .icon { width: 24px; height: 24px; }
#hud .bank-summary b { font-size: 15px; font-weight: 500; }
#hud .bank-summary small { font-size: 11px; }
#hud .bank-footer { display: flex; flex-shrink: 0; align-items: baseline; justify-content: space-between; gap: 6px 14px; padding: 8px 0 12px; }
#hud #bank-capacity { flex-shrink: 0; font-size: 10px; line-height: 1.5; color: #706047; font-variant-numeric: tabular-nums; }
#hud .bank-columns { display: grid; grid-template-columns: minmax(0, 1fr) 252px; gap: 20px; flex: 1; min-height: 0; }
#hud .bank-storage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#hud .bank-tools { display: flex; gap: 6px; }
#hud .bank-panel :is(input, select) { min-width: 0; border: 1px solid #8a704854; border-radius: 3px; background: #f6ecd673; color: #443420; padding: 8px; font: 12px Georgia, serif; }
#hud .bank-search { flex: 1; min-width: 100px; }
#hud .bank-search input { width: 100%; }
#hud #bank-sort { width: 114px; }
#hud #bank-filter { width: 135px; }
#hud .bank-tabs { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: thin; padding: 10px 0 6px; flex-shrink: 0; }
#hud .bank-panel button { transition: background-color .12s; }
#hud .bank-panel button:disabled { opacity: .45; cursor: default; }
#hud .bank-tabs button { flex-shrink: 0; padding: 9px 10px; font-size: 13px; background: #c0a87c24; border: 1px solid #9b7b4438; border-bottom-width: 2px; border-radius: 3px 3px 0 0; }
#hud .bank-tabs button small { margin-left: 8px; font-size: 10px; }
#hud .bank-panel button[aria-pressed='true'] { background: #f9ecc98f; border-color: #8e5a36; color: #7d3d2a; box-shadow: inset 0 -2px #8e5a36; }
#hud .bank-tab-editor { display: flex; align-items: center; gap: 4px; padding: 2px 0 9px; }
#hud .bank-tab-editor input { width: 110px; padding: 6px; font-size: 11px; }
#hud .bank-tab-editor button { padding: 6px; border: 1px solid #9b7b4438; font-size: 10px; white-space: nowrap; }
#hud .bank-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: 65px; align-content: start; gap: 5px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px; background: #927c5021; border: 3px double #93754554; border-radius: 3px; scrollbar-width: thin; scrollbar-color: #947447 #d7c5a1; }
#hud .bank-panel .bank-item { min-width: 0; position: relative; display: grid; place-items: center; height: 65px; padding: 6px; background: #f6e9c848; border: 1px solid #a6895538; border-radius: 3px; }
#hud .bank-panel .bank-item:hover { border-color: #88623b; background: #fff0c896; }
#hud .bank-panel .bank-item .icon { width: 43px; height: 43px; object-fit: contain; }
#hud .bank-item strong { position: absolute; top: 3px; right: 4px; padding: 0 2px; border-radius: 2px; background: #eedcbaab; color: #543d24; font: bold 11px Georgia, serif; }
#hud .bank-item small { position: absolute; bottom: 2px; font-size: 8px; letter-spacing: .4px; }
#hud .bank-panel .bank-item.equipped { border-color: #789065; box-shadow: inset 0 0 0 1px #789065; }
#hud .bank-panel .bank-empty-slot { background: #aa926920; }
#hud .bank-empty { grid-column: 1 / -1; text-align: center; padding: 45px 24px; }
#hud .bank-empty > .icon { width: 68px; height: 68px; opacity: .6; }
#hud .bank-empty h3 { font-size: 23px; font-weight: 400; margin: 16px 0 9px; }
#hud .bank-empty p { font-size: 14px; line-height: 1.6; max-width: 320px; margin: auto; }
#hud .bank-page-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; font-size: 11px; }
#hud .bank-page-controls > div { display: flex; gap: 10px; align-items: center; }
#hud .bank-page-controls button { border: 1px solid #95794d55; padding: 3px 9px; }
#hud .bank-satchel { min-height: 0; display: flex; flex-direction: column; padding-left: 16px; border-left: 3px double #947b4b55; }
#hud .bank-satchel-heading { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
#hud .bank-satchel-heading .icon { width: 23px; height: 23px; }
#hud .bank-satchel-heading h3 { margin: 0; font-size: 17px; font-weight: 400; }
#hud .bank-satchel-heading > span { font-size: 11px; margin-left: auto; }
#hud .bank-inventory { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 48px; align-content: start; gap: 4px; overflow-y: auto; min-height: 0; flex: 1; padding: 2px; scrollbar-width: thin; }
#hud .bank-inventory .bank-item { height: 48px; }
#hud .bank-inventory .bank-item .icon { width: 34px; height: 34px; }
#hud .bank-inventory .bank-item strong { font-size: 10px; }
#hud .bank-panel .bank-bulk { display: flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; padding: 9px 4px; margin-top: 7px; border: 1px solid #8d704b6e; background: #b4975e27; font-size: 12px; }
#hud .bank-bulk .icon { width: 19px; height: 19px; }
#hud #bank-equipment-note { font-size: 10px; text-align: center; padding: 6px 0 0; }
#hud .bank-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding-top: 12px; }
#hud .bank-bottom > span { font-size: 10px; }
#hud .bank-quantity { display: flex; align-items: center; gap: 4px; }
#hud .bank-quantity > span { font-size: 12px; margin-right: 7px; }
#hud .bank-quantity button { min-width: 32px; height: 30px; border: 1px solid #98774966; border-radius: 2px; font: 13px Georgia, serif; }
#hud #bank-custom-quantity { width: 85px; padding: 6px; }
#hud #bank-custom-quantity[hidden] { display: none; }
#hud #bank-feedback { min-height: 18px; margin: 0; font-size: 12px; line-height: 1.5; color: #455a34; }
#hud #bank-feedback.error { color: #8c3327; }
#hud .bank-panel :is(button, input, select):focus-visible { outline: 2px solid #805130; outline-offset: 1px; }
#hud .bank-context { position: fixed; z-index: 120; max-height: min(470px, 75dvh); overflow-y: auto; min-width: 185px; }
#hud .bank-context[hidden] { display: none; }
#hud .bank-tooltip { z-index: 130; pointer-events: none; }
@media (max-width: 850px) {
  #hud .bank-panel { padding: 14px 14px 0; }
  #hud .bank-columns { grid-template-columns: minmax(0, 1fr) 212px; gap: 12px; }
  #hud .bank-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 6px; }
  #hud .bank-tools { flex-wrap: wrap; }
  #hud .bank-search { flex-basis: 100%; }
  #hud .bank-tab-editor { flex-wrap: wrap; }
  #hud .bank-satchel { padding-left: 10px; }
  #hud .bank-summary > span:first-child small { display: none; }
}
@media (max-width: 600px) {
  #hud .bank-panel { height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); max-width: calc(100vw - 16px); padding: 10px 9px 0; }
  #hud .bank-panel > header { padding-bottom: 6px; }
  #hud .bank-panel > header h2 { font-size: 24px; }
  #hud .bank-panel > header p { font-size: 7px; }
  #hud .bank-summary { padding: 8px 0; }
  #hud .bank-summary b { font-size: 13px; }
  #hud .bank-columns { display: flex; flex-direction: column; overflow-y: auto; gap: 15px; }
  #hud .bank-storage { flex-shrink: 0; height: 330px; }
  #hud .bank-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #hud .bank-satchel { flex-shrink: 0; height: 350px; border-left: 0; border-top: 3px double #947b4b55; padding: 10px 0 0; }
  #hud .bank-inventory { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  #hud .bank-bottom > span { display: none; }
  #hud .bank-quantity > span { font-size: 11px; margin-right: 2px; }
  #hud .bank-footer { flex-direction: column; gap: 4px; padding-bottom: 9px; }
  #hud #bank-feedback { min-height: 33px; font-size: 11px; }
}
