/* Inventory page (views/inventory.js): the character sheet's panels and slot grids (views/sheet.css), plus a
   sticky search bar. */

body[data-view="inventory"] .masthead,
body[data-view="inventory"] .savelist,
body[data-view="inventory"] .site-footer { display: none; }
body:not([data-view="inventory"]) .invv { display: none; }
.invv [hidden] { display: none !important; }

/* Search: stays at the top while the page scrolls. Leaves room on the left for the menu button when narrow. */
.invv__bar {
  position: sticky; top: calc(0.9em + env(safe-area-inset-top, 0px)); z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em 1em;
  padding: 0.6em 0.8em; background: var(--sh-head); border: 1px solid var(--sh-frame);
  box-shadow: 0 0.6em 1.4em rgba(0, 0, 0, 0.45);
}
@media (max-width: 70em) { .invv__bar { margin-left: 3em; } }
.invv__q {
  flex: 1 1 16em; min-width: 0; font: inherit; font-size: 1.05em; color: var(--card-text);
  padding: 0.4em 0.6em; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(170, 175, 210, 0.35);
}
.invv__q:focus-visible { outline: none; border-color: var(--tone-special); box-shadow: 0 0 0 1px rgba(255, 179, 107, 0.45); }
.invv__q::placeholder { color: var(--card-dim); }
/* What the search found: one line per item, the total and where it lies */
.invv__sum { margin: 0; flex: 1 1 100%; display: grid; gap: 0.15em; font-variant-numeric: tabular-nums; }
.invv__sum:empty { display: none; }
.invv__sum b { font-weight: 500; }
.invv__sum .dim { color: var(--card-muted); }

/* Containers */
.invv__box { scroll-margin-top: 6em; }
.invv__box .invs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20em), max-content)); gap: 0.8em 2em; }
.invv__empty { margin: 0; }
.slot--dim { opacity: 0.18; }

