/* Arcananectum inventory (src/inventory/*.js). Same palette as ui.css: ink #1E222A, gold #A68236, paper #e8dcc0. No flashing, no external resources. */
.inv-root { --ink: #1E222A; --ink2: #262b35; --gold: #A68236; --gold2: #d8b45c; --paper: #e8dcc0; --cell: 46px; position: fixed; inset: 0; pointer-events: none; z-index: 40;
  font: 13px/1.4 "Segoe UI", system-ui, sans-serif; color: var(--paper); }
.inv-root button { font: inherit; color: inherit; cursor: pointer; }
.inv-root button:focus-visible { outline: 2px solid var(--gold2); outline-offset: 1px; }
.inv-sheet, .inv-win, .inv-tip, .inv-toasts { pointer-events: auto; }
.inv-sheet[hidden], .inv-tip[hidden] { display: none; }
.inv-sheet { position: absolute; left: 18px; top: 56px; width: 410px; max-height: calc(100vh - 80px); overflow: auto; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(40,44,54,.96), rgba(30,34,42,.97)); border: 1px solid var(--gold);
  box-shadow: 0 8px 40px rgba(0,0,0,.6), inset 0 0 0 3px #1E222A, inset 0 0 0 4px rgba(166,130,54,.35); }
.inv-sheet-h, .inv-win-h { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid rgba(166,130,54,.4); cursor: default; }
.inv-win-h { cursor: grab; padding: 5px 8px; }
.inv-title { flex: 1; font: 700 17px Georgia, serif; letter-spacing: .06em; color: var(--gold2); }
.inv-x { margin-left: auto; width: 24px; height: 24px; line-height: 1; background: transparent; border: 1px solid #4a5160; border-radius: 2px; }
.inv-x:hover { border-color: var(--gold2); }
.inv-sheet-b { display: grid; grid-template-columns: 178px 1fr; gap: 12px; padding: 12px; }
.inv-doll { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 8px 4px; background: radial-gradient(ellipse at 50% 30%, rgba(166,130,54,.10), transparent 70%); }
.inv-row { display: flex; gap: 5px; align-items: center; justify-content: center; flex-wrap: wrap; }
.inv-rl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #98a0ad; width: 100%; text-align: center; }
.inv-slot { position: relative; width: 50px; height: 50px; display: grid; place-items: center; padding: 0; background: rgba(12,14,20,.55); border: 1px solid rgba(166,130,54,.45); border-radius: 3px; }
.inv-slot.s-main, .inv-slot.s-off { width: 56px; height: 56px; }
.inv-slot:hover { border-color: var(--gold2); background: rgba(166,130,54,.14); }
.inv-slot.full { background: rgba(166,130,54,.12); }
.inv-slot.sel, .inv-item.sel { box-shadow: 0 0 0 2px var(--gold2); }
.inv-slot-l { font-size: 10px; text-align: center; color: #7f8794; line-height: 1.1; padding: 2px; }
.inv-slot img, .inv-item img { image-rendering: auto; pointer-events: none; }
.inv-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.inv-carry-h { font: 600 13px Georgia, serif; margin-bottom: 4px; }
.inv-bar { position: relative; height: 10px; background: #12151b; border: 1px solid rgba(166,130,54,.5); border-radius: 2px; overflow: hidden; }
.inv-bar-f { height: 100%; transition: width .25s linear; }
.inv-bar-m { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(232,220,192,.6); }
.inv-warn { margin-top: 6px; padding: 4px 8px; border-left: 3px solid #b8a24a; background: rgba(184,162,74,.10); font-style: italic; }
.inv-warn.heavy { border-color: #c0762f; } .inv-warn.overloaded { border-color: #b04a3a; background: rgba(176,74,58,.14); }
.inv-stats { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 6px 0 0; font-size: 12px; }
.inv-stats dt { color: #98a0ad; } .inv-stats dd { margin: 0; }
.inv-hint { color: #8b93a0; font-style: italic; font-size: 12px; }
.inv-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 28px; }
.inv-sel { width: 100%; font: 700 13px Georgia, serif; color: var(--gold2); }
.inv-btn { padding: 3px 9px; background: rgba(166,130,54,.10); border: 1px solid rgba(166,130,54,.5); border-radius: 2px; }
.inv-btn:hover { background: rgba(166,130,54,.24); border-color: var(--gold2); }
.inv-btn.danger { border-color: #7a4038; color: #e0a8a0; }
.inv-split { width: 44px; background: #12151b; color: var(--paper); border: 1px solid #4a5160; padding: 2px 4px; }
.inv-ground-h, .inv-ovf-h { font: 700 12px Georgia, serif; letter-spacing: .08em; color: var(--gold2); text-transform: uppercase; margin-bottom: 3px; }
.inv-ground-l { display: flex; flex-direction: column; gap: 3px; max-height: 150px; overflow: auto; }
.inv-grow { display: flex; align-items: center; gap: 8px; padding: 2px 6px; text-align: left; background: rgba(12,14,20,.4); border: 1px solid rgba(166,130,54,.25); border-radius: 2px; }
.inv-grow:hover { border-color: var(--gold2); }
.inv-grow-n { flex: 1; } .inv-grow-d { color: #98a0ad; font-size: 11px; }
.inv-foot { padding: 6px 12px 10px; border-top: 1px solid rgba(166,130,54,.25); }
.inv-layer { position: absolute; inset: 0; pointer-events: none; }
.inv-layer .inv-win { position: absolute; }
.inv-win { background: linear-gradient(180deg, rgba(40,44,54,.97), rgba(30,34,42,.98)); border: 1px solid var(--gold); box-shadow: 0 6px 26px rgba(0,0,0,.55); max-width: 96vw; }
.inv-win-t { font: 700 13px Georgia, serif; color: var(--gold2); }
.inv-win-w { font-size: 11px; color: #98a0ad; margin-left: auto; }
.inv-win-f { padding: 3px 8px 6px; font-size: 11px; color: #98a0ad; font-style: italic; }
.inv-gwin { padding-bottom: 8px; } .inv-gwin .inv-btn { margin: 6px 8px 0; }
.inv-grid { display: grid; gap: 3px; padding: 8px; justify-content: start; }
.inv-loose { padding: 2px 0; grid-template-columns: repeat(4, var(--cell)); }
.inv-cell { position: relative; width: auto; min-width: var(--cell); height: var(--cell); display: grid; padding: 0; background: rgba(12,14,20,.55); border: 1px solid rgba(166,130,54,.28); border-radius: 2px; }
button.inv-cell:hover { border-color: var(--gold2); background: rgba(166,130,54,.12); }
.inv-cell.has { background: rgba(166,130,54,.08); }
.drop-ok { outline: 2px solid #6f9a63; outline-offset: -2px; background: rgba(111,154,99,.18) !important; }
.inv-item { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 0; background: transparent; border: 0; touch-action: none; }
.inv-item.bag { background: rgba(166,130,54,.10); }
.inv-item.wet img { filter: saturate(.7) brightness(.85); }
.lifted { opacity: .35; }
.inv-n { position: absolute; right: 2px; bottom: 0; font: 700 11px/1 Georgia, serif; color: #fff6dc; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.inv-fill { position: absolute; left: 2px; top: 1px; font: 10px/1 "Segoe UI", sans-serif; color: var(--gold2); }
.inv-ghost { position: fixed; z-index: 90; width: 44px; height: 44px; margin: -22px 0 0 -22px; pointer-events: none; opacity: .85; }
.inv-ghost img { width: 44px; height: 44px; }
.inv-tip { position: fixed; z-index: 95; max-width: 280px; padding: 7px 10px; background: rgba(20,23,30,.97); border: 1px solid var(--gold); box-shadow: 0 4px 18px rgba(0,0,0,.6); pointer-events: none; }
.inv-tip-h { font: 700 14px Georgia, serif; color: var(--gold2); margin-bottom: 2px; }
.inv-tip-l { font-size: 12px; color: #d4cab0; }
.inv-toasts { position: absolute; bottom: 14%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 5px; align-items: center; pointer-events: none; }
.inv-toast { padding: 6px 14px; background: rgba(30,34,42,.93); border-left: 3px solid var(--gold); font-family: Georgia, serif; font-style: italic; transition: opacity .6s; }
.inv-toast.soon { border-left-color: #b8736a; } .inv-toast.out { opacity: 0; }
@media (max-width: 760px) {
  .inv-root { --cell: 44px; }
  .inv-sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 72vh; }
  .inv-sheet-b { grid-template-columns: 1fr; }
  .inv-win { max-height: 60vh; overflow: auto; }
}
@media (prefers-reduced-motion: reduce) { .inv-bar-f, .inv-toast { transition: none; } }
