/* Showcase (board #168): the claim / unlock moment's charge and its living objects, the big inspect view (Shop and
   Locker), the 3D card back, the 3D book, a card style's six tiers, the scene gallery, and the Locker's favourites star
   and Badges. Markup: showcase.js, pass.js (the moment), inventory.js (stars, badges), shop.js. Only light, glow and
   motion on top of Codex's art; every word is live text. Reduced motion: nothing moves on its own. */
@property --o { syntax: "<number>"; inherits: true; initial-value: 0; }

.sc-inspect {
  --bp-bone: var(--bone, #ece4d8); --bp-ink2: var(--bone-2, #b9b0a5); --bp-ink3: var(--bone-3, #847b72); --bp-line: var(--line, rgba(236, 228, 216, .14));
  --bp-gold: var(--t-titan, #f0c870); --bp-gilt: linear-gradient(180deg, #f6dc94, #c99a45 62%, #a77b2c);
  --bp-out: var(--ease, cubic-bezier(.23, 1, .32, 1)); --bp-spring: cubic-bezier(.3, 1.3, .5, 1);
  --bp-serif: var(--serif, "Libre Caslon Text", "Times New Roman", Georgia, serif); --bp-sans: var(--sans, Inter, -apple-system, "Helvetica Neue", Arial, sans-serif);
  color: var(--bp-bone); font-family: var(--bp-sans);
}

/* ---------- the claim / unlock moment: the charge (pass.js sets --p 0..1 on .bp-claim) ---------- */
.bp-claim { --p: 0; }
.bp-claim .bpc-stage { min-height: 0; }
.bpc-meter { position: absolute; left: 50%; top: 50%; z-index: -1; width: 430px; height: 430px; margin: -215px 0 0 -215px; pointer-events: none; overflow: visible;
  transform: rotate(-90deg) scale(calc(.94 + var(--p) * .06)); opacity: 0; transition: opacity 260ms ease, transform 500ms var(--bp-out); }
.bpc-meter circle { fill: none; vector-effect: non-scaling-stroke; }
.bpc-meter-track { stroke: color-mix(in srgb, var(--fx-c) 16%, transparent); stroke-width: 2; }
.bpc-meter-fill { stroke: var(--fx-c); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p) * 100);
  filter: drop-shadow(0 0 6px var(--fx-c)) drop-shadow(0 0 16px color-mix(in srgb, var(--fx-c) 60%, transparent)); }
.bpc-moment.is-charging .bpc-meter { opacity: 1; }
.bp-claim.is-holding .bpc-meter-fill { stroke-width: 5; stroke: var(--fx-c2); }
/* on the turn the ring bursts outward and fades (the release) */
.bpc-moment.is-open .bpc-meter { opacity: 0; transform: rotate(-90deg) scale(1.5); transition: opacity 600ms ease, transform 700ms cubic-bezier(.1, .7, .3, 1); }
/* the halo and the back's rim follow the charge instead of a fixed clock (so holding speeds them up) */
.bp-claim .bpc-moment.is-charging .bpc-halo { animation: none; opacity: calc(.08 + var(--p) * .6); transform: scale(calc(.72 + var(--p) * .45)); }
.bp-claim .bpc-moment.is-charging .bp-flip-back { animation: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fx-c) calc(var(--p) * 100%), rgba(240, 200, 112, .3)), inset 0 0 0 6px rgba(10, 6, 7, .9),
    0 0 0 calc(var(--p) * 3px) color-mix(in srgb, var(--fx-c) 80%, transparent),
    0 0 calc(10px + var(--p) * (30px + var(--rank) * 18px)) calc(var(--p) * (2px + var(--rank) * 3px)) color-mix(in srgb, var(--fx-c) 70%, transparent); }
.bp-claim.is-holding .bpc-moment.is-charging .bp-flip-back { filter: brightness(1.25); }
/* every rarity trembles as it fills, harder the rarer (a Mortal barely) */
.bp-claim .bpc-moment.is-charging .bpc-card { --amp: calc(var(--p) * var(--p) * (.5 + var(--rank) * .55)); animation: bpc-rise 440ms var(--bp-out) both, sc-tremble 80ms 440ms linear infinite; }
.bp-claim.is-holding .bpc-moment.is-charging .bpc-card { --amp: calc(var(--p) * (1 + var(--rank) * .7)); }
@keyframes sc-tremble { 25% { translate: calc(var(--amp) * -1px) calc(var(--amp) * .5px); } 50% { translate: calc(var(--amp) * 1px) calc(var(--amp) * -.5px); } 75% { translate: calc(var(--amp) * -.5px) calc(var(--amp) * -1px); } }
.bp-claim.is-teased .bpc-moment.is-charging .bpc-flip-back { filter: brightness(1.4); }
.bpc-hold { position: absolute; left: 50%; bottom: -6px; display: grid; justify-items: center; gap: 2px; width: max-content; margin: 0; translate: -50% 100%; pointer-events: none; opacity: 0;
  font: 600 14.5px/1.2 var(--bp-sans); color: color-mix(in srgb, var(--fx-c) 55%, var(--bp-bone)); transition: opacity 300ms ease; }
.bpc-hold span { font-weight: 400; font-size: 13.5px; color: var(--bp-ink3); }
.bpc-moment.is-charging .bpc-hold { opacity: 1; transition-delay: 520ms; }
.bp-claim.is-holding .bpc-hold b { color: #fff; }
/* the motes pulled in while it charges */
.bpc-fx .fx-mote { left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--fx-c); box-shadow: 0 0 6px 1px var(--fx-c); }
.bpc-fx .fx-mote.hot { background: #fff; box-shadow: 0 0 5px 1px var(--fx-c2), 0 0 12px 3px var(--fx-c); }
/* where it is now, and the link there */
.bpc-where { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin: 2px 0 0; font: 400 15px/1.4 var(--bp-sans); color: var(--bp-ink2); }
.bpc-where > i { width: 6px; height: 6px; flex: none; transform: rotate(45deg); background: var(--rc); box-shadow: 0 0 8px var(--rc); }
.bpc-where b { font-weight: 600; color: var(--bp-bone); }
.bpc-where .bpc-link { min-height: 36px; }
/* the living object in the moment (showcase.js claimObj): the size of the reward card it replaces */
.bpc-obj { position: relative; display: grid; place-items: center; width: 244px; height: 328px; }
.bpc-flip > .bpc-obj { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.bpc-moment.is-charging .bpc-obj { visibility: hidden; }
.bpc-moment.is-open .bpc-obj { visibility: visible; transition: visibility 0s 300ms; }
.bpc-obj .sc-cardturn { --cw: 226px; }
.bpc-obj .sc-bookturn { --sbw: 218px; }
.bpc-obj .sc-tiers.is-fan { --tw: 118px; }
.bpc-moment.has-obj .bpc-floor { width: 360px; }
.bpc-card.is-worn { animation: sc-worn 700ms var(--bp-out); }
@keyframes sc-worn { 30% { filter: brightness(1.5) drop-shadow(0 0 28px var(--fx-c)); scale: 1.04; } }
/* the Shop's moment says what it cost under the words (shop.js text) and keeps its own kicker */
.bp-claim.is-shop .bpc-kicker { color: color-mix(in srgb, var(--fx-c) 40%, #f6dfa6); }
@media (max-height: 820px) and (min-width: 621px) {
  .bpc-obj { width: 204px; height: 274px; } .bpc-obj .sc-cardturn { --cw: 186px; } .bpc-obj .sc-bookturn { --sbw: 184px; } .bpc-obj .sc-tiers.is-fan { --tw: 100px; }
  .bpc-meter { width: 360px; height: 360px; margin: -180px 0 0 -180px; } }
@media (max-width: 620px) {
  .bpc-obj { width: 200px; height: 270px; } .bpc-obj .sc-cardturn { --cw: 180px; } .bpc-obj .sc-bookturn { --sbw: 150px; } .bpc-obj .sc-tiers.is-fan { --tw: 70px; }
  .bpc-meter { width: 330px; height: 330px; margin: -165px 0 0 -165px; } }

/* ---------- the 3D card back (showcase.js backHTML): --ry / --rx from the drag and the idle sway ---------- */
.sc-turn { --ry: 0deg; --rx: 0deg; position: relative; touch-action: none; cursor: grab; outline: none; -webkit-user-select: none; user-select: none; }
.sc-turn.is-drag { cursor: grabbing; }
.sc-turn:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 8px; border-radius: 12px; }
.sc-cardturn { width: var(--cw, 250px); aspect-ratio: 2 / 3; perspective: 1400px; }
.sc-card3d { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); will-change: transform; }
.sc-face { position: absolute; inset: 0; overflow: hidden; border-radius: 6.25% / 4.17%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 0 0 1px rgba(236, 228, 216, .1), 0 24px 50px rgba(0, 0, 0, .55), 0 0 calc(30px + var(--halo, 0px) * 2) -4px color-mix(in srgb, var(--rc) 55%, transparent); }
.sc-face.is-front { transform: translateZ(1.6px); }
.sc-face.is-rear { transform: rotateY(180deg) translateZ(1.6px); border-radius: 3.6% / 2.4%; }
.sc-face img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sc-face .card-down { position: absolute; inset: 0; }
.sc-edge { position: absolute; top: 4%; bottom: 4%; width: 3.2px; background: linear-gradient(180deg, #3a2f28, #1a1412 40%, #3a2f28); }
.sc-edge.is-l { left: -1.6px; transform: rotateY(90deg); } .sc-edge.is-r { right: -1.6px; transform: rotateY(90deg); }
/* the moving glint: across the face as it turns (strength = the back's own foil) */
.sc-glint { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: calc(.25 + var(--cb-foil, .3) * 1.4);
  background: linear-gradient(110deg, transparent 38%, rgba(255, 242, 222, .38) 47%, rgba(210, 232, 255, .26) 53%, transparent 62%) 0 0 / 320% 100% no-repeat;
  background-position: calc(var(--gl, .5) * 200% - 50%) 0; }

/* ---------- the 3D book (showcase.js bookHTML): opens on the spine (--o 0..1), turns like the card ---------- */
.sc-bookturn { --sbw: 260px; --sbh: calc(var(--sbw) * 1.334); --sbd: calc(var(--sbw) * .22); width: var(--sbw); height: var(--sbh); perspective: 1800px; }
.sb-obj { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) translateX(calc(var(--sbw) * .5 * var(--o))); transition: --o 1300ms cubic-bezier(.45, 0, .2, 1); }
.sc-bookturn.is-open { --o: 1; }
.sb-face { position: absolute; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.sb-map, .sb-stamp { display: block; width: 100%; height: 100%; pointer-events: none; }
.sb-map { object-fit: cover; }
.sb-back { inset: 0; transform: translateZ(calc(var(--sbd) * -.5)) rotateY(180deg); border-radius: 4px 10px 10px 4px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.sb-spine { left: 0; top: 0; width: var(--sbd); height: var(--sbh); transform-origin: left center; transform: translateZ(calc(var(--sbd) * -.5)) rotateY(-90deg); overflow: hidden; border-radius: 6px; }
.sb-edge { background: linear-gradient(90deg, var(--leather), color-mix(in srgb, var(--leather) 70%, #fff 8%), var(--leather)); }
.sb-edge.is-top { left: 0; top: 0; width: var(--sbw); height: var(--sbd); transform-origin: center top; transform: translateZ(calc(var(--sbd) * -.5)) rotateX(90deg); }
.sb-edge.is-bottom { left: 0; top: var(--sbh); width: var(--sbw); height: var(--sbd); transform-origin: center top; transform: translateZ(calc(var(--sbd) * .5)) rotateX(-90deg); }
.sb-edge.is-fore { left: var(--sbw); top: 0; width: var(--sbd); height: var(--sbh); transform-origin: left center; transform: translateZ(calc(var(--sbd) * .5)) rotateY(90deg); }
/* the inside: the book's own velvet colour with Codex's gold stamps (maps-v1 inner stamps) */
.sb-page, .sb-in { background: radial-gradient(80% 60% at 50% 40%, color-mix(in srgb, var(--sheen) 22%, var(--velvet)), var(--velvet) 60%, color-mix(in srgb, var(--velvet) 70%, #000)); }
.sb-page { inset: 0; transform: translateZ(calc(var(--sbd) * .5 - 1px)); border-radius: 2px 8px 8px 2px; box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--leather) 85%, #000), inset 0 0 40px rgba(0, 0, 0, .55); }
.sb-cover { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: left center; transform: translateZ(calc(var(--sbd) * .5)) rotateY(calc(var(--o) * -168deg)); }
.sb-out { inset: 0; transform: translateZ(.6px); border-radius: 4px 10px 10px 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 0 calc(24px + var(--halo, 0px) * 2) -6px color-mix(in srgb, var(--rc) 45%, transparent); }
.sb-in { inset: 0; transform: rotateY(180deg) translateZ(.6px); border-radius: 10px 4px 4px 10px; box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--leather) 85%, #000), inset 0 0 40px rgba(0, 0, 0, .55); }
.sb-stamp { object-fit: contain; opacity: .9; padding: 10%; box-sizing: border-box; }
.sb-out .sc-glint { --cb-foil: .18; }
.sc-flat { display: block; width: min(100%, 520px); height: auto; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); }

/* ---------- a card style's six tiers (showcase.js styleHTML) ---------- */
.sc-tiers { --tw: 150px; position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 12px; }
.sc-tier { position: relative; margin: 0; display: grid; justify-items: center; gap: 8px; transition: transform 380ms var(--bp-spring), opacity 260ms ease; }
.sc-tier-btn { display: block; width: var(--tw); aspect-ratio: 2 / 3; padding: 0; border: 0; border-radius: 3.6% / 2.4%; background: none; cursor: zoom-in;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .55), 0 0 calc(18px + var(--halo, 0px)) -4px color-mix(in srgb, var(--rc) 55%, transparent); transition: box-shadow 200ms ease; }
.sc-tier-btn img { display: block; width: 100%; height: 100%; border-radius: inherit; pointer-events: none; }
.sc-tier-btn:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 4px; }
.sc-tier figcaption { font: 600 14px/1.2 var(--bp-sans); color: var(--rc); text-shadow: 0 0 12px color-mix(in srgb, var(--rc) 40%, transparent); }
@media (hover: hover) and (pointer: fine) { .sc-tiers:not(.is-fan) .sc-tier:hover { transform: translateY(-10px); } }
.sc-tiers.has-big .sc-tier:not(.is-big) { opacity: .32; }
.sc-tier.is-big { z-index: 2; transform: translateY(-4%) scale(1.6); } .sc-tier.is-big .sc-tier-btn { cursor: zoom-out; }
/* in the moment: the six stacked, then fanned out in an arc (showcase.js live adds is-out) */
.sc-tiers.is-fan { position: absolute; left: 50%; top: 50%; width: 0; height: 0; display: block; }
.sc-tiers.is-fan .sc-tier { position: absolute; left: calc(var(--tw) * -.5); top: calc(var(--tw) * -.75); transform: rotate(calc(var(--k) * 1.5deg)); transition: transform 900ms cubic-bezier(.2, 1.15, .3, 1); transition-delay: calc(var(--i) * 60ms); }
.sc-tiers.is-fan .sc-tier figcaption { opacity: 0; transition: opacity 400ms ease calc(500ms + var(--i) * 60ms); }
.sc-tiers.is-fan.is-out .sc-tier { transform: translate(calc(var(--k) * var(--tw) * .62), calc(var(--k) * var(--k) * 7px)) rotate(calc(var(--k) * 7deg)); }
.sc-tiers.is-fan.is-out .sc-tier figcaption { opacity: 1; }
.sc-tiers.is-fan .sc-tier-btn { cursor: default; pointer-events: none; }

/* ---------- a scene set: the five as a gallery (showcase.js sceneHTML) ---------- */
.sc-gallery { position: relative; width: 100%; }
.sc-g-track { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 14px; outline: none; cursor: grab; }
.sc-g-track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.sc-g-track::-webkit-scrollbar { display: none; }
.sc-g-track:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 4px; }
.sc-g-slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: center; }
.sc-g-slide img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; pointer-events: none; }
.sc-g-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: end; gap: 12px; padding: 40px 18px 14px; border-radius: 0 0 14px 14px;
  background: linear-gradient(transparent, rgba(4, 2, 3, .82)); }
.sc-g-slide figcaption b { font: 400 22px/1.2 var(--bp-serif); color: #fff; }
.sc-g-slide figcaption span { font: 500 14px/1.2 var(--bp-sans); color: var(--bp-ink2); font-variant-numeric: tabular-nums; }
.sc-g-btn { position: absolute; top: calc(50% - 22px); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(8, 6, 7, .72); color: var(--bp-bone); box-shadow: inset 0 0 0 1px rgba(236, 228, 216, .25), 0 6px 18px rgba(0, 0, 0, .5); }
.sc-g-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sc-g-btn.is-prev { left: 10px; } .sc-g-btn.is-next { right: 10px; }
.sc-g-btn:disabled { opacity: .3; cursor: default; }
.sc-g-btn:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 2px; }
.sc-g-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.sc-g-dots i { width: 8px; height: 8px; transform: rotate(45deg); background: rgba(236, 228, 216, .22); transition: background 200ms ease, box-shadow 200ms ease; }
.sc-g-dots i.is-on { background: var(--rc); box-shadow: 0 0 9px var(--rc); }

/* ---------- the inspect view (showcase.js open): the big tab over the Shop and the Locker ---------- */
.sc-inspect { position: fixed; inset: 0; z-index: 62; display: grid; place-items: center; padding: 24px; }
.sc-veil { position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--rc) 14%, rgba(6, 3, 4, .72)), rgba(3, 1, 2, .9));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity 240ms ease; }
.sc-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); width: min(1180px, 100%); height: min(760px, calc(100vh - 48px)); overflow: hidden; border-radius: 22px;
  background: radial-gradient(90% 80% at 30% 40%, color-mix(in srgb, var(--rc) 10%, #120b0d), #070506 70%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 35%, rgba(236, 228, 216, .12)), 0 40px 120px rgba(0, 0, 0, .7), 0 0 80px -20px color-mix(in srgb, var(--rc) 40%, transparent);
  opacity: 0; transform: translateY(18px) scale(.97); transition: opacity 260ms ease, transform 420ms var(--bp-out); }
.sc-inspect.is-in .sc-veil { opacity: 1; } .sc-inspect.is-in .sc-panel { opacity: 1; transform: none; }
.sc-inspect.is-out .sc-veil, .sc-inspect.is-out .sc-panel { opacity: 0; transition-duration: 200ms; }
.sc-close { position: absolute; right: 14px; top: 14px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(8, 6, 7, .6); color: var(--bp-bone); box-shadow: inset 0 0 0 1px rgba(236, 228, 216, .2); }
.sc-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sc-close:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .sc-close:hover { background: rgba(236, 228, 216, .12); } }
.sc-view { position: relative; display: grid; place-items: center; min-height: 0; padding: 40px; isolation: isolate; }
.sc-light { position: absolute; left: 50%; top: 46%; z-index: -1; width: 72%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 34%, transparent), transparent); animation: sc-breathe 5s ease-in-out infinite; }
@keyframes sc-breathe { 50% { opacity: .65; transform: translate(-50%, -50%) scale(1.06); } }
.sc-floor { position: absolute; left: 50%; bottom: 9%; width: 52%; height: 30px; margin-left: -26%; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); }
.sc-inspect.is-scene .sc-floor, .sc-inspect.is-style .sc-floor { display: none; }
.sc-view .sc-cardturn { --cw: min(330px, 26vw, calc((100vh - 220px) / 1.5)); }
.sc-view .sc-bookturn { --sbw: min(280px, 20vw, calc((100vh - 260px) / 1.334)); }
.sc-view .sc-tiers { --tw: min(108px, calc((58vw - 120px) / 6)); }
.sc-view .sc-gallery { max-width: 100%; }
.sc-plain { display: grid; place-items: center; }
.sc-plain .rw-art { --s: 3.1; }
.sc-plain .rw-pack img, .sc-plain .sh-hoard-art { width: min(300px, 22vw); height: auto; animation: sc-float 5s ease-in-out infinite; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .6)) drop-shadow(0 0 40px color-mix(in srgb, var(--rc) 35%, transparent)); }
@keyframes sc-float { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
.sc-info { display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 0; padding: 56px 44px 40px 8px; overflow-y: auto; }
.sc-info .bp-kind { font-size: 15px; }
.sc-info h2 { margin: 0; font: 400 clamp(32px, 3.2vw, 46px)/1.08 var(--bp-serif); color: #fff; text-wrap: balance; text-shadow: 0 0 40px color-mix(in srgb, var(--rc) 25%, transparent); }
.sc-text { margin: 0; max-width: 46ch; font: 400 16px/1.55 var(--bp-sans); color: var(--bp-ink2); text-wrap: pretty; }
.sc-hint { display: flex; align-items: center; gap: 8px; margin: 0; font: 500 14px/1.3 var(--bp-sans); color: var(--bp-ink3); }
.sc-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sc-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sc-acts .bp-btn { min-height: 50px; padding: 0 22px; font-size: 16px; }
.sc-acts .sh-price { min-height: 50px; padding: 0 20px; font-size: 16px; }
.sc-note { margin: 0; min-height: 1.4em; font: 400 15px/1.45 var(--bp-sans); color: var(--bp-ink2); }
.sc-note b { color: var(--bp-bone); }
@media (max-width: 860px) {
  .sc-inspect { padding: 0; }
  .sc-panel { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 54vh) auto; height: 100%; border-radius: 0; overflow-y: auto; }
  .sc-view { padding: 56px 16px 20px; }
  .sc-view .sc-cardturn { --cw: min(240px, 52vw, calc(54vh / 1.6)); }
  .sc-view .sc-bookturn { --sbw: min(190px, 40vw, calc(46vh / 1.5)); }
  .sc-view .sc-tiers { --tw: min(96px, 27vw); flex-wrap: wrap; row-gap: 14px; max-width: 360px; }
  .sc-tier.is-big { transform: scale(1.35); }
  .sc-plain .rw-pack img, .sc-plain .sh-hoard-art { width: min(220px, 52vw); }
  .sc-info { justify-content: flex-start; padding: 4px 16px 28px; }
  .sc-info h2 { font-size: 32px; }
  .sc-acts .bp-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-light, .sc-plain .rw-pack img, .sc-plain .sh-hoard-art { animation: none; }
  .sb-obj, .sc-tier, .sc-tiers.is-fan .sc-tier, .sc-panel, .sc-veil, .bpc-meter { transition: none !important; }
  .bp-claim .bpc-moment.is-charging .bpc-card, .bpc-card.is-worn { animation: none; }
}

/* ---------- the Locker: the star on every slot, and Badges (inventory.js) ---------- */
.iv-slot .iv-fav { position: absolute; left: 6px; top: 6px; z-index: 4; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(8, 6, 7, .55); color: rgba(236, 228, 216, .55); opacity: 0; transition: opacity 160ms ease, color 160ms ease, transform 160ms var(--bp-spring); }
.iv-slot .iv-fav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.iv-slot .iv-fav.is-on { opacity: 1; color: #f3cf74; }
.iv-slot .iv-fav.is-on svg { fill: currentColor; filter: drop-shadow(0 0 6px rgba(243, 207, 116, .6)); }
.iv-slot:is(:hover, :focus-visible, .is-picked) .iv-fav, .iv-slot .iv-fav:focus-visible { opacity: 1; }
@media (hover: none) { .iv-slot .iv-fav { opacity: .8; } }
.iv-slot .iv-fav:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 1px; }
.iv-slot .iv-fav:active { transform: scale(.86); }
.iv-slot .iv-star { display: none; } /* the old corner star: the button above says it now */
.iv-inspect { display: inline-flex; align-items: center; gap: 8px; }
.iv-inspect svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.iv-hero.is-inspectable { cursor: zoom-in; }
/* the Favourites tab sits on the right of the category tabs */
.iv-cats [data-iv-tab="favs"] { margin-left: auto; }
/* Badges */
.inv .iv-grid.iv-badges { display: grid; align-content: start; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.iv-badge { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 16px 14px 14px; border-radius: 14px; text-align: left;
  border: 0; font: inherit; color: inherit; cursor: pointer; background: linear-gradient(180deg, rgba(20, 13, 15, .82), rgba(8, 5, 6, .82));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 28%, rgba(236, 228, 216, .1)); transition: box-shadow 160ms ease, transform 160ms var(--bp-spring); }
.iv-badge.is-picked { box-shadow: inset 0 0 0 2px var(--rc), 0 0 24px -6px var(--rc); }
.iv-badge:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .iv-badge:hover { transform: translateY(-2px); } }
.iv-badge-pic { position: relative; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 30%, transparent), transparent); }
.iv-badge-pic img { display: block; max-width: 56px; max-height: 60px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.iv-badge-pic svg { width: 30px; height: 30px; fill: none; stroke: var(--rc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--rc) 60%, transparent)); }
.iv-badge-txt { display: grid; gap: 3px; min-width: 0; }
.iv-badge-txt b { font: 400 18px/1.2 var(--bp-serif); color: var(--bp-bone); }
.iv-badge-txt small { font: 400 14px/1.35 var(--bp-sans); color: var(--bp-ink2); }
.iv-badge-bar { position: relative; height: 6px; margin-top: 4px; border-radius: 99px; background: rgba(236, 228, 216, .1); overflow: hidden; }
.iv-badge-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--bp) * 100%); border-radius: inherit; background: var(--rc); box-shadow: 0 0 8px var(--rc); }
.iv-badge-txt em { font: 600 13px/1.2 var(--bp-sans); font-style: normal; color: var(--rc); font-variant-numeric: tabular-nums; }
.iv-badge.is-locked .iv-badge-pic { filter: grayscale(1) brightness(.55); }
.iv-badge.is-locked .iv-badge-txt b { color: var(--bp-ink2); }
.iv-badge.is-earned::after { content: ""; position: absolute; right: 12px; top: 12px; width: 8px; height: 8px; transform: rotate(45deg); background: var(--rc); box-shadow: 0 0 10px var(--rc); }
.iv-badge-detail .iv-hero.rk-badge { display: grid; place-items: center; width: 200px; aspect-ratio: 1; }
.iv-badge-detail .iv-hero.rk-badge img { width: 150px; height: auto; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .7)) drop-shadow(0 0 30px color-mix(in srgb, var(--rc) 40%, transparent)); }
.iv-badge-detail .iv-hero.rk-badge svg { width: 96px; height: 96px; fill: none; stroke: var(--rc); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--rc) 60%, transparent)); }
.iv-badge-detail .iv-hero.is-locked { filter: grayscale(1) brightness(.6); }
@media (max-width: 620px) { .inv .iv-grid.iv-badges { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .iv-badge, .iv-slot .iv-fav { transition: none; } }

/* ---------- the Shop: a tile opens the inspect view (shop.js .sh-open covers the tile; the band's buttons stay on top) ---------- */
.sh-item .sh-open { position: absolute; inset: 0; z-index: 1; padding: 0; border: 0; border-radius: inherit; background: none; cursor: zoom-in; }
.sh-item .sh-open:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: -3px; }
.sh-item .sh-band { position: relative; z-index: 2; pointer-events: none; }
.sh-item .sh-band :is(button, a) { pointer-events: auto; }
.rw-hours.is-hoard { display: grid; place-items: center; }
.rw-hours.is-hoard .sh-hoard-art { display: block; width: 86%; height: auto; max-height: none; object-fit: contain; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .65)); }
.sc-plain .rw-hours.is-hoard .sh-hoard-art { width: min(340px, 26vw); animation: sc-float 5s ease-in-out infinite; }
@media (max-width: 860px) { .sc-plain .rw-hours.is-hoard .sh-hoard-art { width: min(240px, 56vw); } }
.sc-acts .sh-testtag { margin-right: 4px; }

/* ---------- Profile: the earned badges count beside the numbers (profile.js), opens Locker > Badges ---------- */
.pf-badges { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin-top: 6px; padding: 0 14px 0 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(240, 200, 112, .08); color: var(--bone-2, #b9b0a5); font: 500 14px/1 var(--sans, Inter, sans-serif); box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .3); }
.pf-badges b { font-weight: 700; color: #f6dfa6; }
.pf-badges svg { width: 17px; height: 17px; fill: none; stroke: #f0c870; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pf-badges:focus-visible { outline: 2px solid var(--focus, #f3d3a3); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .pf-badges:hover { background: rgba(240, 200, 112, .16); color: var(--bone, #ece4d8); } }
.iv-acts2 { display: flex; flex-wrap: wrap; gap: 10px; }
.iv-acts2 .iv-inspect svg, .iv-acts2 .iv-favbtn svg { width: 17px; height: 17px; }

/* round 1 fixes: the rear of the 3D card is one of your own cards; a style's six tiers in a 3 x 2 grid sized by the view;
   a scene set gets the wider view */
.sc-face.is-rear .sc-rearcard { position: absolute; inset: 0; }
.sc-rearcard > .tc { width: 100%; height: 100%; animation: none; }
.sc-rearcard .tc-shine, .sc-rearcard .tc-holo { animation: none !important; }
.sc-view { container-type: inline-size; }
.sc-view .sc-tiers:not(.is-fan) { --tw: min(150px, calc((100cqw - 104px) / 3)); display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 18px 16px; }
.sc-tier-btn { height: calc(var(--tw) * 1.5); aspect-ratio: auto; }
.sc-tier-btn img { object-fit: contain; }
.sc-inspect.is-scene .sc-panel { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
@media (max-width: 860px) {
  .sc-inspect.is-scene .sc-panel { grid-template-columns: 1fr; }
  .sc-view .sc-tiers:not(.is-fan) { --tw: min(100px, calc((100cqw - 56px) / 3)); gap: 12px 10px; }
}
/* the Locker's tabs (#168): Favourites is a star at the right end; the Shop button moved to the head line */
.inv.is-locker .iv-cats [data-iv-tab="favs"] { padding-left: 18px; padding-right: 18px; }
.inv.is-locker .iv-lockhead .iv-shopbtn { margin-left: auto; align-self: center; min-height: 44px; padding: 0 16px; }
.inv.is-locker .inv-main > .iv-shopbtn { float: right; min-height: 44px; }
.inv.is-locker .iv-lockhead { align-items: center; }
.inv.is-locker .iv-lockhead p { order: 1; } .inv.is-locker .iv-lockhead .iv-shopbtn { order: 2; } .inv.is-locker .iv-lockhead span { order: 3; flex-basis: 100%; }
.inv.is-locker .iv-cats [data-iv-tab="favs"] .iv-cat-ic { display: block; }
@media (max-width: 620px) { .sc-tiers.is-fan .sc-tier figcaption { display: none; } }

/* #214 the Shop's pack purchase: the real 3D pack (pack-gl.js) turning slowly in its print, lit in the pack type's colour */
.bpc-obj.rk-packgl { display: block; }
.bpc-glpack { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.bpc-glpack .rw-art { width: 78%; }
.bpc-glpack > .pack-gl { position: absolute; inset: -12% -25%; width: 150%; height: 124%; pointer-events: none; animation: glIn .35s ease-out both;
  filter: drop-shadow(0 0 26px color-mix(in srgb, var(--fx-c) 70%, transparent)) drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); }
.bpc-glpack.gl-on > .rw-art { visibility: hidden; transition: visibility 0s linear .36s; }
.bpc-glpack { --s: 3.5; --rc: var(--fx-c); }
@media (max-height: 820px) and (min-width: 621px) { .bpc-glpack { --s: 2.9; } }
@media (max-width: 620px) { .bpc-glpack { --s: 2.85; } }
