/* Стили игры, часть «inventory»: рюкзак и окно хранилища в духе BG3 (public/js/game/inv-window.js, inv-loot.js). Порядок подключения частей (index.html) важен: поздние правила перекрывают ранние. */
/* Рюкзак — справа, хранилище — левее него; мир за окнами виден (без затемнения), как в BG3 */
.inv-win, .loot-win { position: fixed; z-index: 38; top: 72px; animation: bg3In .15s ease-out; }
.inv-win { right: 24px; }
.loot-win { right: 640px; }
.inv-win.hidden, .loot-win.hidden { display: none; }
.inv-box, .loot-box { padding: 30px 18px 12px; font-family: var(--bg3-serif); color: var(--bg3-text); }
.inv-box { width: 596px; }
.loot-box { width: 318px; }
.inv-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.inv-head .chs-party { display: flex; gap: 4px; }
.inv-title { flex: 1; text-align: center; }
.inv-title .bg3-h { margin-bottom: 4px; }
.inv-title small { color: var(--bg3-muted); font-size: 13px; }
.inv-x { padding: 2px 8px; }
.inv-body { display: flex; gap: 14px; }

/* надето */
.inv-eq { width: 128px; flex: none; }
.inv-eq h5, .inv-main h5 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: var(--bg3-gold); }
.inv-eq h5 small { color: var(--bg3-muted); letter-spacing: 0; margin-left: 4px; }
.inv-slots { display: grid; grid-template-columns: repeat(2, 58px); gap: 6px; padding: 6px; border: 1px solid #2c2318; background: rgba(0,0,0,.25); }
.inv-help { margin: 8px 0 0; font-size: 12px; line-height: 1.35; color: var(--bg3-muted); }

/* ячейки */
.inv-main { flex: 1; min-width: 0; }
.inv-tools { display: flex; gap: 4px; margin-bottom: 8px; align-items: center; }
.inv-tools button { font-family: var(--bg3-serif); font-size: 12.5px; padding: 3px 8px; border-radius: 2px; background: #0d0b09; border: 1px solid #3c2f1d; color: var(--bg3-muted); }
.inv-tools button.on { color: var(--bg3-gold-hi); border-color: #8a6a3c; background: linear-gradient(180deg, #2a2116, #14100b); }
.inv-sort { margin-left: auto; font-family: var(--bg3-serif); font-size: 12.5px; background: #0d0b09; color: var(--bg3-text); border: 1px solid #3c2f1d; border-radius: 2px; padding: 2px 4px; }
.inv-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); overflow-x: hidden; gap: 4px; max-height: 360px; overflow-y: auto; padding: 6px; border: 1px solid #2c2318; background: rgba(0,0,0,.25); scrollbar-width: thin; }
.loot-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); max-height: 300px; }
.inv-cell { position: relative; aspect-ratio: 1; min-width: 0; display: grid; place-items: center; border: 1px solid #4a3a24; border-radius: 2px; overflow: hidden; cursor: pointer;
  background: #070605; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(236,220,176,.06), inset 0 0 10px rgba(0,0,0,.85); }
.inv-slots .inv-cell { width: 58px; }
.inv-cell .item-ic { width: 100%; height: 100%; pointer-events: none; }
.inv-cell .item-ic-txt { display: grid; place-items: center; font-size: 24px; }
.inv-cell:hover:not(.empty) { border-color: var(--bg3-gold-hi); box-shadow: 0 0 0 1px #000, 0 0 8px rgba(236,220,176,.35), inset 0 0 10px rgba(0,0,0,.85); }
.inv-cell.empty { cursor: default; border-color: #241d14; background: #080706; }
.inv-cell.quest { border-color: #8a6a3c; }
.inv-cell > b { position: absolute; right: 3px; bottom: 1px; font-family: var(--bg3-serif); font-weight: 400; font-size: 13px; color: #fff; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.inv-slots .inv-cell[data-from="worn"] { border-color: #8a6a3c; }
.inv-coin, .inv-sup { width: 62%; height: 62%; border-radius: 50%; }
.inv-coin { background: radial-gradient(circle at 38% 34%, #fff3c4, #e0b850 38%, #8a6420 78%, #4a3410); box-shadow: 0 0 0 1px #2a1c08, 4px 3px 0 -1px #c89a3a, 4px 3px 0 0 #2a1c08; }
.inv-sup { border-radius: 4px; background: linear-gradient(180deg, #a07a48, #6a4a26 60%, #3e2a14); box-shadow: inset 0 3px 0 rgba(255,230,180,.25), 0 0 0 1px #1a1008; }

/* вес и золото */
.inv-foot { display: flex; align-items: center; gap: 16px; margin-top: 8px; font-size: 13.5px; }
.inv-foot b { font-weight: 400; color: var(--bg3-gold-hi); }
.inv-load { flex: 1; min-width: 0; cursor: help; }
.inv-bar { position: relative; height: 6px; margin-bottom: 3px; background: #0a0806; border: 1px solid #2c2318; }
.inv-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #6e5634, #c8ab72); }
.inv-bar s { position: absolute; top: -3px; bottom: -3px; width: 1px; background: #ecdcb0; opacity: .6; }
.inv-load.enc1 .inv-bar i { background: linear-gradient(90deg, #8a5a20, #e0942e); }
.inv-load.enc2 .inv-bar i { background: linear-gradient(90deg, #8a2a1a, #ff5a3a); }
.inv-load em { font-style: normal; color: #e0942e; }
.inv-load.enc2 em { color: #ff6a4a; }
.inv-gold, .inv-val { white-space: nowrap; color: var(--bg3-muted); }
.inv-hint { margin-top: 8px; font-size: 12px; color: var(--bg3-muted); text-align: center; }
.loot-foot { display: flex; justify-content: center; margin-top: 10px; min-height: 32px; align-items: center; }
.loot-foot .primary { font-family: var(--bg3-serif); letter-spacing: .8px; color: #f6ead0; border-radius: 2px; border: 1px solid #b89a62; padding: 6px 22px;
  background: linear-gradient(180deg, #6a4c24, #3e2c14 55%, #2a1d0c); }
.loot-foot .primary:hover { border-color: var(--bg3-gold-hi); background: linear-gradient(180deg, #7e5c2e, #4c3618 55%, #33240f); }

/* меню вещи по ПКМ */
.inv-menu, .inv-menu.bg3-win { position: fixed; z-index: 60; min-width: 190px; padding: 22px 8px 8px; display: flex; flex-direction: column; gap: 2px; font-family: var(--bg3-serif); }
.inv-menu-h { padding: 2px 8px 6px; color: var(--bg3-gold-hi); border-bottom: 1px solid #2c2318; margin-bottom: 2px; }
.inv-menu button { text-align: left; background: none; border: none; color: var(--bg3-text); padding: 5px 8px; font-family: inherit; font-size: 13.5px; border-radius: 2px; }
.inv-menu button:hover { background: rgba(200,171,114,.14); color: var(--bg3-gold-hi); }

/* узкий экран: хранилище у левого края, рюкзак — у правого */
@media (max-width: 1000px) {
  .loot-win { right: auto; left: 16px; }
  .inv-win { right: 16px; }
}
