/* Inventory (board #75, v2 for #88, v3 for Dodd's "make things bigger... it kind of looks like my task board").
   Markup: inventory.js. Needs pass.css loaded first: it shares the tokens, the rarity colours, the plinth the picked item
   stands on, the item art (pack, skin plate, coin, seal) and the buttons. A game inventory: big tabs along the top (a
   dark-red glowing number for new things), a bag of square slots, each filled with its rarity's light with the item
   standing in it, empty slots showing the room left, and the picked item large on its plinth beside them. */
.inv { --iv-w: 172px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* ---------- title, tabs, the Shop ---------- */
.inv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.inv-head h1 { margin: 0; font: 400 clamp(44px, 4.4cqi, 72px)/1 var(--bp-serif); letter-spacing: -.016em; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.inv-head p { margin: 8px 0 0; font: 400 16.5px/1.4 var(--bp-sans); color: var(--bp-ink2); }
.inv-head-right { display: flex; align-items: center; gap: 12px; }
.inv-tabs { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: var(--r-lg, 12px); background: rgba(8, 6, 7, .72); box-shadow: inset 0 0 0 1px var(--bp-line); }
.inv-tabs [role=tab] { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 24px; border: 0; border-radius: var(--r-md, 8px); background: none;
  color: var(--bp-ink2); font: 400 21px/1 var(--bp-serif); cursor: pointer; transition: color 150ms ease; }
.inv-tabs [aria-selected=true] { color: var(--bp-bone); }
.inv-tabs [role=tab]:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 2px; }
.inv-tabs .iris-count { animation: iv-count-in 420ms var(--bp-spring) both; }
@keyframes iv-count-in { from { opacity: 0; transform: scale(.6); } }
@media (hover: hover) and (pointer: fine) { .inv-tabs [role=tab]:hover { color: var(--bp-bone); } }
/* the lit plate slides to the open tab */
.inv-tabs-lit { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: var(--r-md, 8px); pointer-events: none;
  background: linear-gradient(180deg, rgba(236, 228, 216, .1), rgba(236, 228, 216, .04)); box-shadow: inset 0 0 0 1px var(--bp-line-hi), inset 0 -2px 0 var(--bp-gold);
  transition: transform 180ms var(--bp-spring), width 180ms var(--bp-spring); }
.inv-tabs-lit.is-instant { transition: none; }
.inv-head-right > .bp-btn { min-height: 62px; padding: 0 22px; font-size: 16px; }

/* ---------- body: the grid and the picked item ---------- */
.inv-body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(400px, 1fr); gap: 20px; align-items: stretch; min-height: 0; }
.inv-body.is-wide { grid-template-columns: minmax(0, 1fr); }
.inv-main { min-width: 0; padding: 24px; border-radius: 16px; background: var(--bp-grain) 0 0 / 160px, linear-gradient(180deg, rgba(14, 10, 11, .82), rgba(6, 4, 5, .9)); box-shadow: var(--bp-edge), var(--bp-shadow); min-height: 300px; }
.inv-detail { position: sticky; top: 0; align-self: start; display: grid; gap: 20px; padding: 40px 30px 28px; min-height: min(640px, calc(100vh - 230px)); align-content: start; border-radius: 16px;
  background: radial-gradient(90% 50% at 50% 0%, rgba(255, 238, 210, .06), transparent 70%), var(--bp-grain) 0 0 / 160px, linear-gradient(180deg, rgba(14, 10, 11, .84), rgba(6, 4, 5, .93)); box-shadow: var(--bp-edge), var(--bp-shadow); }
.inv-detail:empty { display: none; }
/* QA: no detail column (out of packs, nothing picked): the main plate spans the whole width under the header */
.inv-main:has(+ .inv-detail:empty), .inv-main:has(> .iv-out) { grid-column: 1 / -1; }
/* the picked item on its plinth: the item itself, large (iv-hero sets the art's scale; no card frame) */
.inv-detail .bp-plinth { min-height: 330px; padding-top: 18px; }
.inv-detail .bp-plinth::before { width: 290px; margin-left: -145px; border-radius: 145px 145px 12px 12px; }
.inv-detail .bp-plinth::after { width: 330px; margin-left: -165px; }
.inv-detail .bp-beam { width: 280px; margin-left: -140px; }
.iv-hero { --s: 2.6; display: grid; place-items: center; width: 250px; height: 270px; }
.iv-hero .rw-art:not(.rw-meeting) { width: 100%; height: 100%; }
.iv-hero.rk-pack { --s: 2.75; }
.iv-hero.rk-pack .rw-pk { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .7)) drop-shadow(0 0 30px color-mix(in oklab, var(--rc) 40%, transparent)); }
.iv-hero.rk-boost, .iv-hero.rk-meeting { --s: 2.7; }
.iv-hero.rk-finish { --s: 2.5; }
.inv-detail .bp-base { width: 220px; height: 24px; margin-top: 6px; }
.inv-detail .bp-info { max-width: none; gap: 9px; }
.inv-detail .bp-kind { font-size: 15.5px; }
.inv-detail .bp-info h2 { font-size: 40px; }
.inv-detail .bp-text { font-size: 16px; max-width: 52ch; }
.inv-detail .bp-where { font-size: 15px; }
.inv-detail .bp-act .bp-btn { width: 100%; min-height: 56px; font-size: 16px; }
.inv-detail .bp-done, .inv-detail .bp-need { font-size: 16px; }
.inv-detail.is-swap .bp-hold > .rw { animation: bp-swap 240ms var(--bp-out) both; }
.inv-detail.is-swap .bp-info { animation: bp-swap-t 220ms var(--bp-out) both; }
.inv.is-enter .inv-main, .inv.is-enter .inv-detail { animation: iv-in 360ms var(--bp-out) both; }
.inv.is-enter .inv-detail { animation-delay: 70ms; }
@keyframes iv-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- the bag: square slots, each filled with its rarity's light ---------- */
.iv-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--iv-w), 1fr)); gap: 14px; }
.iv-slot { --s: 1.34; position: relative; isolation: isolate; display: grid; grid-template-rows: minmax(0, 1fr) auto; aspect-ratio: 1 / 1.08; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  color: var(--bp-bone); font: inherit; text-align: center;
  background: radial-gradient(75% 65% at 50% 42%, color-mix(in oklab, var(--rc) calc(26% + var(--glow) * 60%), #120c0d), color-mix(in oklab, var(--rc) 10%, #0c090a) 78%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--rc) calc(30% + var(--glow) * 70%), transparent), inset 0 1px 0 rgba(255, 238, 214, .12), inset 0 -40px 50px -20px rgba(0, 0, 0, .55), 0 10px 22px rgba(0, 0, 0, .45), 0 0 var(--halo) -8px var(--rc);
  transition: transform 160ms var(--bp-out), box-shadow 160ms ease, filter 160ms ease; }
.iv-slot::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bp-dots); pointer-events: none; } /* the print halftone */
.iv-slot:focus-visible { outline: none; }
.iv-slot-glow { position: absolute; left: 50%; top: 40%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--rc) 45%, rgba(255, 240, 220, .2)), transparent); opacity: .55; filter: blur(4px); }
.iv-slot-art { position: relative; display: grid; place-items: center; min-height: 0; padding-top: 10px; transition: transform 200ms var(--bp-out); }
.iv-slot-art .rw-art:not(.rw-meeting) { width: 100%; height: 100%; } /* the seal keeps its own round size */
.iv-slot-foot { display: grid; gap: 2px; padding: 9px 10px 11px; background: linear-gradient(180deg, transparent, rgba(5, 3, 4, .78) 45%); }
.iv-slot-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 17px/1.15 var(--bp-serif); color: var(--bp-bone); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.iv-slot-kind { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px/1.2 var(--bp-sans); color: color-mix(in oklab, var(--rc) 80%, #fff); }
.iv-slot .rw-shine { position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; }
.iv-slot.is-picked { transform: translateY(-3px); }
.iv-slot.is-picked .iv-slot-art { transform: scale(1.07); }
.iv-slot.is-picked .iv-slot-glow { opacity: .85; }
@media (hover: hover) and (pointer: fine) { .iv-slot:not(.is-empty):hover { filter: brightness(1.1); } }
.iv-slot.is-later .iv-slot-art { opacity: .75; filter: saturate(.7); }
/* the room left in the bag: dim recessed slots */
.iv-slot.is-empty { cursor: default; background: rgba(5, 3, 4, .55); box-shadow: inset 0 0 0 1px rgba(236, 228, 216, .06), inset 0 6px 16px rgba(0, 0, 0, .6); }
.iv-slot.is-empty::before { opacity: .5; }
.iv-slot.is-empty::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; transform: rotate(45deg); box-shadow: inset 0 0 0 1px rgba(236, 228, 216, .1); }
.iv-count { position: absolute; top: 10px; left: 10px; z-index: 3; padding: 5px 9px; border-radius: 999px; background: rgba(0, 0, 0, .7); box-shadow: inset 0 0 0 1px var(--bp-line-hi);
  font: 600 14.5px/1 var(--bp-sans); color: var(--bp-bone); font-variant-numeric: tabular-nums; }
.iv-equipped { position: absolute; top: 10px; left: 10px; z-index: 3; padding: 5px 9px; border-radius: 999px; background: var(--bp-bone);
  color: #15100c; font: 600 12.5px/1 var(--bp-sans); white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
/* what you wear stands in light: a lit floor along the bottom (the edge stays rarity's) */
.iv-slot.is-equipped::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #fff3e2; box-shadow: 0 0 14px 2px rgba(255, 238, 214, .55); }
/* new since you last looked: a dark-red glowing tag and edge, for this visit */
.iv-new { position: absolute; top: 10px; right: 10px; z-index: 3; padding: 4px 8px 5px; border-radius: 999px; font: 600 12.5px/1 var(--bp-sans); color: #ffb4ab;
  text-shadow: 0 0 6px rgba(230, 40, 50, .95); background: rgba(80, 8, 14, .85); box-shadow: inset 0 0 0 1px rgba(214, 40, 50, .65), 0 0 12px color-mix(in oklab, var(--red) 50%, transparent); }
.iv-slot.is-new { box-shadow: inset 0 0 0 1px rgba(214, 40, 50, .6), inset 0 1px 0 rgba(255, 238, 214, .1), inset 0 -40px 50px -20px rgba(0, 0, 0, .55), 0 0 22px -4px color-mix(in oklab, var(--red) 70%, transparent), 0 10px 22px rgba(0, 0, 0, .45); }
.iv-slot.is-deny { animation: rw-deny 260ms ease-out; }
.iv-slot.is-claiming { animation: rw-claim 640ms var(--bp-out); }
.iv-slot.is-claiming .rw-shine { background: linear-gradient(105deg, transparent 30%, rgba(255, 236, 190, .55) 48%, transparent 66%) 0 0 / 300% 100% no-repeat; mix-blend-mode: screen; animation: rw-sweep 700ms 80ms var(--bp-in-out) both; }
:is(.rr-titan, .rr-mythic).iv-slot .rw-shine { background: linear-gradient(115deg, transparent 32%, rgba(229, 156, 169, .13) 41%, rgba(199, 164, 90, .17) 47%, rgba(110, 155, 129, .12) 53%, rgba(97, 143, 191, .13) 59%, rgba(152, 118, 199, .12) 65%, transparent 74%) 0 0 / 260% 100%;
  mix-blend-mode: screen; animation: rw-sheen 8s linear infinite; }
.iv-cursor { border-radius: 12px; }
/* packs waiting for VIP (Dodd: "greyed out, you can't get to them, so it's really tempting"): the pack is there but
   behind frosted glass, grey, with a lock; a thin gold edge keeps it worth wanting */
.iv-slot.is-locked { background: radial-gradient(75% 65% at 50% 42%, rgba(70, 64, 60, .55), rgba(12, 10, 10, .9) 78%);
  box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .32), inset 0 1px 0 rgba(255, 238, 214, .08), 0 10px 22px rgba(0, 0, 0, .45); }
.iv-slot.is-locked .iv-slot-art { filter: grayscale(.85) brightness(.7) blur(.6px); opacity: .8; }
.iv-slot.is-locked .iv-slot-glow { opacity: .15; }
.iv-slot.is-locked::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; /* the glass */
  background: linear-gradient(125deg, rgba(255, 250, 240, .1), rgba(255, 250, 240, .02) 40%, rgba(255, 250, 240, .07) 46%, transparent 52%), rgba(20, 16, 16, .18);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.iv-slot.is-locked .iv-slot-foot, .iv-slot.is-locked .iv-count { z-index: 2; position: relative; }
.iv-slot.is-locked .iv-count { position: absolute; }
.iv-slot.is-locked .iv-slot-kind { color: #f0d79a; }
.iv-lock { position: absolute; left: 50%; top: 40%; z-index: 3; display: grid; place-items: center; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(10, 8, 9, .82); box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .6), 0 0 22px rgba(240, 200, 112, .25), 0 6px 14px rgba(0, 0, 0, .6); color: #f6dc94; }
.iv-lock svg, .iv-vipcall-lock svg, .inv-detail .bp-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iv-slot.is-locked.is-picked .iv-lock { box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .9), 0 0 30px rgba(240, 200, 112, .45), 0 6px 14px rgba(0, 0, 0, .6); }
.iv-hero.is-locked .rw-pk { filter: grayscale(.8) brightness(.72) drop-shadow(0 18px 22px rgba(0, 0, 0, .7)); }
.iv-hero.is-locked { position: relative; }
.iv-hero.is-locked::after { content: ""; position: absolute; inset: 6% 18%; border-radius: 10px; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 250, 240, .12), transparent 40%, rgba(255, 250, 240, .08) 46%, transparent 54%); box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .35); }
.iv-vipcall { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 16px 18px; border-radius: 14px;
  background: radial-gradient(60% 140% at 0% 50%, rgba(240, 200, 112, .1), transparent 70%), rgba(12, 9, 9, .7); box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .3); }
.iv-vipcall-lock { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #f6dc94; box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .5); background: rgba(28, 19, 6, .6); }
.iv-vipcall > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.iv-vipcall b { font: 400 21px/1.2 var(--bp-serif); color: var(--bp-bone); }
.iv-vipcall span:not(.iv-vipcall-lock) { font: 400 15.5px/1.45 var(--bp-sans); color: var(--bp-ink2); }
.iv-vipcall .bp-btn { flex: none; min-height: 48px; }
@container (max-width: 620px) { .iv-vipcall { flex-wrap: wrap; } .iv-vipcall .bp-btn { width: 100%; } }

/* cosmetics filter chips */
.iv-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.iv-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(236, 228, 216, .05);
  box-shadow: inset 0 0 0 1px var(--bp-line); color: var(--bp-ink2); font: 500 16px/1 var(--bp-sans); cursor: pointer; transition: background-color 150ms ease, color 150ms ease, transform 120ms var(--bp-out); }
.iv-chip em { font-style: normal; font-weight: 600; font-size: 14px; color: var(--bp-ink3); font-variant-numeric: tabular-nums; }
.iv-chip[aria-pressed=true] { background: rgba(236, 228, 216, .12); color: var(--bp-bone); box-shadow: inset 0 0 0 1px var(--bp-line-hi); }
.iv-chip[aria-pressed=true] em { color: var(--bp-gold); }
.iv-chip:active { transform: scale(.97); }
.iv-chip:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .iv-chip:hover { color: var(--bp-bone); } }

/* empty states say what to do next */
.iv-empty { display: grid; justify-items: start; gap: 10px; max-width: 460px; padding: 28px 8px; }
.iv-empty h2 { margin: 0; font: 400 32px/1.15 var(--bp-serif); }
.iv-empty p { margin: 0; font: 400 16px/1.5 var(--bp-sans); color: var(--bp-ink2); }
.iv-empty .bp-btn { margin-top: 6px; }
.iv-empty.is-small { padding: 12px 4px; }

/* ---------- out of packs: a gold dial counting down to midnight ---------- */
.iv-out { display: grid; justify-items: center; align-content: center; gap: 14px; min-height: 380px; padding: 36px 12px 28px; text-align: center;
  background: radial-gradient(260px 200px at 50% 38%, rgba(240, 200, 112, .07), transparent 70%); }
.iv-out-text { max-width: 44ch; margin: 0; font: 400 15.5px/1.5 var(--bp-sans); color: var(--bp-ink2); }
.iv-next { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.iv-next.is-big { position: relative; display: grid; place-items: center; width: 220px; height: 220px; margin: 0; }
.iv-next.is-big > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.iv-dial { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); filter: drop-shadow(0 0 10px rgba(240, 200, 112, .25)); }
.iv-dial circle { fill: none; stroke-width: 3; }
.iv-dial .t { stroke: rgba(236, 228, 216, .1); }
.iv-dial .b { stroke: #e9c877; stroke-linecap: round; transition: stroke-dashoffset 1s var(--bp-out); }
.iv-next-k, .iv-next-s { margin: 0; font: 500 13.5px/1.3 var(--bp-sans); color: var(--bp-ink2); }
.iv-next-s { color: var(--bp-ink3); }
.iv-next b { display: block; font: 400 24px/1.1 var(--bp-serif); color: var(--bp-gold); font-variant-numeric: lining-nums tabular-nums; }
.iv-next.is-big b { margin: 4px 0; font-size: 44px; text-shadow: 0 0 20px rgba(240, 200, 112, .35); }
.iv-next:not(.is-big) > div { display: flex; align-items: baseline; gap: 8px; }
.iv-next:not(.is-big) b { font-size: 20px; }
.inv.is-enter .iv-dial .b { animation: iv-dial 1.1s .2s var(--bp-out) both; }
@keyframes iv-dial { from { stroke-dashoffset: 276.46; } }

/* ---------- cards: the collection by rarity ---------- */
.iv-collection { display: grid; gap: 20px; }
.iv-total { display: flex; align-items: center; gap: 16px; }
.iv-total > b { font: 400 76px/1 var(--bp-serif); letter-spacing: -.015em; font-variant-numeric: lining-nums tabular-nums; }
.iv-total span { display: flex; align-items: center; gap: 10px; font: 400 22px/1.25 var(--bp-serif); }
.iv-total small { display: block; margin-top: 4px; font: 400 16px/1.3 var(--bp-sans); color: var(--bp-ink2); }
.iv-total .bp-btn { margin-left: auto; }
.iv-tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.iv-tier { position: relative; display: grid; gap: 6px; padding: 20px 18px 20px; border-radius: 12px; overflow: hidden; min-height: 170px; align-content: end;
  background: radial-gradient(110% 80% at 50% 115%, color-mix(in oklab, var(--rc) calc(14% + var(--glow) * 100%), transparent), transparent 72%), var(--bp-dots), linear-gradient(180deg, #1c1719, #0c0a0b);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--rc) calc(20% + var(--glow) * 60%), transparent), inset 0 1px 0 rgba(255, 238, 214, .07); }
.iv-tier::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--rc); box-shadow: 0 0 12px var(--rc); }
.iv-tier-name { font: 500 16px/1.2 var(--bp-sans); color: var(--rc); }
.iv-tier b { font: 400 58px/1 var(--bp-serif); font-variant-numeric: lining-nums tabular-nums; }
.iv-tier small { font: 400 14.5px/1.3 var(--bp-sans); color: var(--bp-ink2); }
.iv-tier-bar { display: block; height: 4px; margin-top: 8px; border-radius: 4px; background: rgba(236, 228, 216, .08); overflow: hidden; }
.iv-tier-bar i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--w)); background: var(--rc); }
.iv-tier.is-zero b { color: var(--bp-ink3); }
.inv.is-enter .iv-tier-bar i { animation: bp-fill .8s .15s var(--bp-out) both; }
.iv-rarest h2 { margin: 0 0 14px; font: 400 28px/1.2 var(--bp-serif); }
.iv-cards { display: flex; gap: 18px; overflow-x: auto; padding: 4px 4px 10px; scrollbar-width: thin; }
.iv-card { flex: none; width: 190px; padding: 0; border: 0; background: none; border-radius: 6px; cursor: pointer; transition: transform 160ms var(--bp-out); }
.iv-card .tc { width: 100%; }
.iv-card:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) { .iv-card:hover { transform: translateY(-4px); } }

/* ---------- narrower ---------- */
@container (max-width: 1060px) {
  .inv-body { grid-template-columns: minmax(0, 1fr); }
  .inv-detail { position: static; min-height: 0; grid-template-columns: 270px minmax(0, 1fr); align-items: center; padding: 26px 26px 24px; }
  .inv-detail .bp-plinth { min-height: 280px; }
  .iv-hero { width: 210px; height: 230px; --s: 2.2; }
  .iv-hero.rk-pack { --s: 2.35; }
  .inv-detail .bp-act .bp-btn { width: auto; min-width: 200px; }
  .iv-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 620px) {
  .inv { --iv-w: 120px; gap: 14px; }
  .inv-head h1 { font-size: 42px; }
  .iv-slot { --s: 1.05; }
  .iv-slot-name { font-size: 16px; }
  .iv-hero { width: 120px; height: 150px; --s: 1.35; }
  .iv-hero.rk-pack { --s: 1.45; }
  .inv-detail .bp-info h2 { font-size: 24px; }
  .inv-detail .bp-text { font-size: 15px; }
  .inv-detail .bp-act .bp-btn { min-height: 48px; }
  .iv-tier { min-height: 0; }
  .iv-tier b { font-size: 44px; }
  .inv-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .inv-head-right { flex-wrap: wrap; }
  .inv-tabs { flex: 1; }
  .inv-tabs [role=tab] { flex: 1; justify-content: center; min-height: 46px; padding: 0 8px; font-size: 17px; }
  .inv-head-right > .bp-btn { min-height: 46px; }
  .inv-main { padding: 14px; }
  .iv-out { min-height: 0; padding: 24px 8px 16px; }
  .iv-grid { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* slots size themselves */
  .inv-detail { grid-template-columns: 124px minmax(0, 1fr); gap: 14px; padding: 18px 14px 14px; }
  .inv-detail .bp-plinth { min-height: 0; }
  /* the hero has its own size (above) */
  .inv-detail .bp-plinth::before { width: 128px; margin-left: -64px; }
  .inv-detail .bp-plinth::after { width: 132px; margin-left: -66px; }
  .inv-detail .bp-base { width: 112px; height: 16px; }
  .inv-detail .bp-info h2 { font-size: 21px; }
  .inv-detail .bp-act .bp-btn { width: 100%; min-width: 0; }
  .iv-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iv-total { flex-wrap: wrap; }
  .iv-total > b { font-size: 48px; }
  .iv-total .bp-btn { margin-left: 0; width: 100%; }
  .iv-card { width: 128px; }
}
@media (prefers-reduced-motion: reduce) {
  .inv-tabs-lit { transition: none; }
  .inv.is-enter .inv-main, .inv.is-enter .inv-detail, .inv.is-enter .iv-tier-bar i, .inv.is-enter .iv-dial .b, .inv-tabs .iris-count, .inv-detail.is-swap .bp-hold > .rw, .inv-detail.is-swap .bp-info { animation: none; }
  .iv-card { transition: none; }
}

/* ---------- the Locker: every theme and skin, filters, the favourite star ---------- */
.iv-lockhead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; }
.iv-lockhead p { margin: 0; font: 400 20px/1.2 var(--bp-serif); color: var(--bp-ink2); }
.iv-lockhead p b { font-weight: 400; color: var(--bp-bone); }
.iv-lockhead span { font: 400 15px/1.4 var(--bp-sans); color: var(--bp-ink3); }
.iv-filters.is-rarity { margin-top: -10px; }
.iv-filters.is-rarity .iv-chip { min-height: 36px; font-size: 14.5px; }
.iv-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.iv-chip[aria-pressed=true] svg { fill: #f6dc94; stroke: #f6dc94; }
.iv-star { position: absolute; right: 10px; bottom: 54px; z-index: 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(10, 8, 9, .78);
  box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .55), 0 0 12px rgba(240, 200, 112, .3); color: #f6dc94; }
.iv-star svg { width: 15px; height: 15px; fill: currentColor; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.iv-acts2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.iv-favbtn { min-height: 56px; }
.iv-favbtn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.iv-favbtn.is-on { color: #f6dc94; box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .7); }
.iv-favbtn.is-on svg { fill: #f6dc94; }
.iv-hero.is-locked .rw-art { filter: grayscale(.8) brightness(.72); }
@container (max-width: 620px) { .iv-acts2 { grid-template-columns: minmax(0, 1fr); } .iv-lockhead span { display: none; } }

/* Settings > Look's last tile: the way to the whole collection (app.js paintLook) */
.th-tile.th-manage { display: grid; place-items: center; min-height: 100%; padding: 18px; border: 0; border-radius: 12px; cursor: pointer; text-align: center; color: var(--bone, #ece4d8);
  background: radial-gradient(70% 60% at 50% 30%, rgba(240, 200, 112, .1), transparent 70%), rgba(10, 8, 9, .6); box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .4); }
.th-manage-in { display: grid; gap: 6px; }
.th-manage-in b { font: 400 19px/1.2 var(--serif, Georgia, serif); color: #f6dc94; }
.th-manage-in span { font: 400 14px/1.4 var(--sans, Inter, sans-serif); color: var(--bone-2, #b9b0a5); }
.th-tile.th-manage:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .th-tile.th-manage:hover { box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .8), 0 0 24px rgba(240, 200, 112, .18); } }

/* ---------- card backs (board #109, card-backs.js): the card itself, tilted, standing in its rarity's light ----------
   Used by the Locker, the battle pass's reward cards and the Shop (pass.js art() hands backs to CardBacks.art). Codex's
   backs have their rounded corners baked in as alpha, so the shadow follows the card. The stock back is the desk's own
   face-down card (pack3d.css .card-down), drawn at this size. */
.iv-filters.is-kind { margin-bottom: 12px; }
.rw-back.has-art::before { content: ""; position: absolute; left: 50%; top: 50%; width: 86%; height: 76%; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--rc) 32%, transparent), transparent); }
.rw-back.has-art .cb-card { position: relative; z-index: 1; display: block; height: calc(80px * var(--s)); aspect-ratio: 2 / 3; container-type: inline-size; transform: rotate(-4deg);
  filter: drop-shadow(0 calc(5px * var(--s)) calc(7px * var(--s)) rgba(0, 0, 0, .62)); transition: transform 200ms var(--bp-out); }
.rw-back.has-art .cb-card img { display: block; width: 100%; height: 100%; }
.rw-back.has-art .card-down { box-shadow: none; }
.iv-hero.rk-back { --s: 2.85; }
.iv-hero.rk-back .cb-card { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .7)) drop-shadow(0 0 30px color-mix(in oklab, var(--rc) 38%, transparent)); }
.iv-hero.is-locked .cb-card { filter: grayscale(.8) brightness(.72) drop-shadow(0 18px 22px rgba(0, 0, 0, .7)); }
@container (max-width: 1060px) { .iv-hero.rk-back { --s: 2.4; } }
@container (max-width: 620px) { .iv-hero.rk-back { --s: 1.5; } }

/* ---------- card styles (cards.js FAMILIES): three of the style's frames fanned, mortal and oracle behind, titan in front ---------- */
.rw-back.rw-fam.has-art { display: grid; place-items: center; }
.rw-back.rw-fam.has-art .fam-card { grid-area: 1 / 1; height: calc(72px * var(--s)); }
.rw-back.rw-fam.has-art .fam-card img { border-radius: 3.6% / 2.4%; }
.rw-back.rw-fam.has-art .fam-0 { transform: translateX(-34%) rotate(-13deg); filter: brightness(.62) drop-shadow(0 calc(4px * var(--s)) calc(6px * var(--s)) rgba(0, 0, 0, .6)); }
.rw-back.rw-fam.has-art .fam-1 { transform: translateX(34%) rotate(11deg); filter: brightness(.72) drop-shadow(0 calc(4px * var(--s)) calc(6px * var(--s)) rgba(0, 0, 0, .6)); }
.rw-back.rw-fam.has-art .fam-2 { transform: rotate(-1deg); z-index: 2; }
.iv-hero.rk-back .rw-back.rw-fam .fam-0, .iv-hero.rk-back .rw-back.rw-fam .fam-1 { filter: brightness(.66) drop-shadow(0 14px 18px rgba(0, 0, 0, .7)); }

/* ---------- books (binder-gl.js BinderGL.books()): Codex's render of the book, standing in its rarity's light ----------
   The beauty renders sit on a dark ground; a soft round mask lets the book float in the tile. Previews wear a tag. */
.rw-book.has-art { display: grid; place-items: center; overflow: hidden; }
.rw-book.has-art img { display: block; width: 118%; height: auto; max-width: none; object-fit: contain;
  -webkit-mask: radial-gradient(58% 62% at 50% 50%, #000 62%, transparent 100%); mask: radial-gradient(58% 62% at 50% 50%, #000 62%, transparent 100%);
  filter: drop-shadow(0 calc(4px * var(--s, 1)) calc(8px * var(--s, 1)) rgba(0, 0, 0, .6)); transition: transform 200ms var(--bp-out); }
.iv-hero.rk-book { width: min(100%, 420px); height: 290px; }
.iv-hero.rk-book .rw-book img { width: 100%; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .7)) drop-shadow(0 0 34px color-mix(in oklab, var(--rc) 30%, transparent)); }
@container (max-width: 620px) { .iv-hero.rk-book { height: 200px; } }
.iv-preview { position: absolute; right: 10px; top: 10px; z-index: 3; padding: 3px 8px; border-radius: 99px; font: 600 12.5px/1.3 var(--bp-sans); letter-spacing: .06em; text-transform: uppercase;
  color: #f6dc94; background: rgba(10, 8, 9, .78); box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .5); }

/* ---------- Random (board #222, random.js): the first tile of each Locker category, rarity-less, with the dice ---------- */
.rr-random { --rc: #b7aec6; --glow: .1; --halo: 0px; }
.rw-random { display: grid; place-items: center; color: color-mix(in oklab, var(--bone, #ece4d8) 88%, transparent); }
.rw-random .rnd-dice { width: calc(46px * var(--s, 1)); height: calc(46px * var(--s, 1)); filter: drop-shadow(0 calc(4px * var(--s, 1)) calc(7px * var(--s, 1)) rgba(0, 0, 0, .6)); transition: transform 300ms var(--bp-out, ease-out); }
.iv-hero.rk-random { --s: 3.2; }
.iv-hero.rk-random .rnd-dice { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .7)) drop-shadow(0 0 26px rgba(183, 174, 198, .35)); }
@media (hover: hover) and (pointer: fine) { .iv-slot:hover .rnd-dice { transform: rotate(-10deg) scale(1.08); } }
.th-random .rnd-dice { width: 34px; height: 34px; margin: 0 auto 4px; color: #f6dc94; }
.th-random.is-on, .th-random[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px rgba(246, 220, 148, .75), 0 0 24px rgba(240, 200, 112, .16); cursor: default; }
