/* ============================================================
   SkinSignal / css / locker.css
   THE LOCKER, ONE COMPONENT (the fix pass, 2026-10-10). js/locker.js
   builds it; this draws it, wherever it stands: the collection page
   signed in and signed out, and the landing (compact). Moved here whole
   from css/achievements.css (the sets, the cards, the bands, the locker
   of the design pass), then the signed out showcase and the plate.
   ============================================================ */

/* The --r-* rarity tokens come from the page (css/achievements.css on the
   collection page); inside a rack every rarity colour is its --rc. */

/* ---------- Sections ---------- */
.cardset {
  padding: clamp(40px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--line);
}

.cardset__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.cardset__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-stretch: var(--display-header);
  font-weight: 600;
  font-size: clamp(19px, 2.2vw, 25px);
  letter-spacing: -0.01em;
  color: var(--text);
}

/* The rarity swatch. 3px of colour is enough to key the whole section. */
.cardset__swatch {
  width: 3px;
  height: 20px;
  background: var(--muted);
}
.cardset--legendary .cardset__swatch { background: var(--r-legendary); }
.cardset--epic      .cardset__swatch { background: var(--r-epic); }
.cardset--rare      .cardset__swatch { background: var(--r-rare); }
.cardset--common    .cardset__swatch { background: var(--r-common); }

.cardset__count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.cardset__count b { color: var(--text); font-weight: 500; }

/* ---------- Grid ----------
   ACROSS, NOT DOWN. As many 3:1 cards to a row as fit at a readable
   size: three on a desktop, two in a narrow window, one on a phone. A
   fixed two columns that fell to ONE below 860px stacked every set
   down the page in any window narrower than that. Every set, the ranks
   included, uses this one rule. */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}

/* ---------- A card ----------
   The art is 2172x724, so every tile holds a 3:1 box and the image fills
   it. aspect-ratio keeps the grid from reflowing as images arrive. */
.card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: #2c2c2c; transform: translateY(-2px); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card--legendary { border-color: rgba(212, 163, 83, 0.32); }
.card--epic      { border-color: rgba(124, 92, 214, 0.32); }
.card--rare      { border-color: rgba(61, 127, 255, 0.30); }
.card--common    { border-color: var(--line); }

/* Locked tiles lose their rarity border. Colour is a reward. */
.card--locked { border-color: var(--line) !important; }

.card__art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  background: #0b0b0b;
  overflow: hidden;
}

.card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Faded in once decoded, so a half painted 2MB PNG never flashes. */
  opacity: 0;
  transition: opacity 0.35s ease, filter 0.35s ease;
}
.card__img.is-loaded { opacity: 1; }

/* Locked art: drained and dimmed, still legible as artwork.

   HOVER REVEAL
   Hovering blooms a locked card back to full colour. It is a tease of
   the reward, so it is slower going in than coming out: the colour
   arrives over 0.5s and drains back in 0.3s.

   Purely visual. Only `filter` animates, which is composited and does
   not reflow, so nothing on the page moves. */
.card--locked .card__img {
  filter: grayscale(1) brightness(0.42) contrast(0.9);
  transition: opacity 0.35s ease, filter 0.3s ease;
}
.card--locked:hover .card__img,
.card--locked:focus-visible .card__img {
  filter: grayscale(0) brightness(1) contrast(1);
  transition: opacity 0.35s ease, filter 0.5s ease;
}

/* HIDDEN CARDS NEVER REVEAL.
   A masked tile has no <img> at all, so there is genuinely nothing to
   uncover: the art was never sent by the server and was never fetched.
   These rules are belt and braces, so that a future change to the
   markup cannot accidentally turn a hover into a spoiler. */
.card__masked,
.card:hover .card__masked,
.card--locked:hover .card__masked {
  filter: none;
  opacity: 1;
}

/* Masked art: nothing is loaded at all, so there is nothing to leak. */
.card__masked {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(
      -45deg,
      #0c0c0c 0 10px,
      #0f0f0f 10px 20px
    );
}
.card__masked span {
  font-family: var(--font-display);
  font-stretch: var(--display-hero);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 40px);
  letter-spacing: 0.08em;
  color: #2a2a2a;
}

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px 13px;
  border-top: 1px solid var(--line);
}

.card__name {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card--locked .card__name { color: var(--muted); }

/* ---------- THE RARITY IS A SWATCH, NOT THE TEXT COLOUR ----------

   These four were the tag's colour, and two of them do not survive being
   read at 10px on the card surface:

     legendary  #d4a353   8.41   passes
     epic       #7c5cd6   4.00   FAILS 4.5
     rare       #3d7fff   5.21   passes
     common     #6b6b66   3.60   FAILS 4.5

   The palette itself is not the problem and is not being changed. Its
   sixteen other uses are all graphics, card borders and swatch fills,
   where the floor is 3:1 and all four clear it, and the muted values are
   the deliberate "editorial rather than a loot screen" decision at the
   top of this file. Lifting two tokens to fix a text problem would
   restyle every card border on two pages to repair something the word
   next to it already says.

   So the word goes to --muted, which reads at 6.98, and the colour moves
   to a swatch beside it, where 3:1 applies and all four pass. No
   information is lost: the rarity was always written out in full, and
   the colour was reinforcement. This is the same move the dashboard's
   rarity sections make in css/shell.css, so the two pages now agree.

   A pseudo element carries it, so no markup and no class changes. */
.card__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.card__tag::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--rarity-swatch, var(--r-common));
}

.card--legendary .card__tag { --rarity-swatch: var(--r-legendary); }
.card--epic      .card__tag { --rarity-swatch: var(--r-epic); }
.card--rare      .card__tag { --rarity-swatch: var(--r-rare); }
.card--common    .card__tag { --rarity-swatch: var(--r-common); }

/* A locked card keeps its swatch, since its rarity is still known and
   still written, and the word dims the way it always did. */
.card--locked    .card__tag { color: var(--faint); }

/* The live card, marked in the grid. Square accent tab, top right, so
   it reads at a glance without covering the art. */
.card__equipped {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  padding: 5px 9px 4px;
  background: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #050505;
}

.card--equipped { border-color: var(--accent) !important; }

/* ============================================================
   THE SETS AS BANDS (js/achievements.js band())

   Every rarity set, and the prestige ranks, is a native <details> that
   starts shut: the dashboard collection's banded plate, drawn at the
   size this page deserves. The plate is the product's panel material
   (css/surface-tokens.css, with the same values as fallbacks), the
   rarity is an edge down the left and a contained glow behind the name,
   the middle holds a strip of the set's own art, and a progress sliver
   along the bottom carries the one proportion (signed in only).

   The accents: legendary gold, epic violet, rare blue, common steel,
   and the ranks in the prestige blue. Steel is a band accent only; the
   tiles keep the muted grey the page's rarity rule set out above.
   ============================================================ */
.cardset--band {
  padding: 0;
  border-bottom: 0;
}
.cardset--band:first-child { padding-top: clamp(30px, 4vw, 48px); }
.cardset--band:last-child { padding-bottom: clamp(40px, 5vw, 64px); }

.cband { --band: #8d97a8; --band-soft: rgba(141, 151, 168, 0.4); margin-top: 14px; }
.cband[data-set="legendary"] { --band: var(--r-legendary); --band-soft: rgba(212, 163, 83, 0.45); }
.cband[data-set="epic"]      { --band: #9477f0;             --band-soft: rgba(148, 119, 240, 0.42); }
.cband[data-set="rare"]      { --band: var(--r-rare);      --band-soft: rgba(61, 127, 255, 0.42); }
.cband[data-set="common"]    { --band: #8d97a8;             --band-soft: rgba(141, 151, 168, 0.36); }
.cband[data-set="rank"]      { --band: #7db4ff;             --band-soft: rgba(125, 180, 255, 0.4); }

/* ---------- The plate ---------- */
.cband__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 22px);
  min-height: 112px;
  padding: 0 20px 0 30px;
  border: 1px solid var(--edge, rgba(255, 255, 255, 0.055));
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  list-style: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.006)),
    var(--surface-panel, #0e1016);
  box-shadow:
    inset 0 1px 0 var(--edge-top, rgba(255, 255, 255, 0.1)),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 14px 34px -16px rgba(0, 0, 0, 0.9);
}
.cband__bar::-webkit-details-marker { display: none; }

/* The rarity edge: 3px, full height, a tight bloom off it. */
.cband__bar::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--band);
  box-shadow: 0 0 14px 0 var(--band);
  pointer-events: none;
}

.cband__bar:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 20px 44px -16px rgba(0, 0, 0, 0.95);
}
.cband__bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* A contained glow behind the name, the same width on every band: it is
   the rarity's colour, not a measurement of anything. */
.cband__wash {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 420px;
  max-width: 70%;
  pointer-events: none;
  opacity: 0.6;
  background: radial-gradient(260px 140px at 6% 50%, var(--band-soft), transparent 72%);
}

/* ---------- The name ---------- */
.cband__id {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  width: clamp(176px, 20vw, 260px);
}

.cband__name {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: var(--display-hero);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--text);
}
.cband[data-set="legendary"] .cband__name { text-shadow: 0 0 26px rgba(212, 163, 83, 0.45); }

.cband__line {
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}

/* ---------- The count ----------
   The border carries the colour; the figures stay in the text colours,
   which is what keeps epic and common legible at 13px. */
.cband__count {
  position: relative;
  flex: none;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--band);
  box-shadow: 0 0 18px -6px var(--band);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}
.cband__count b { font-weight: 500; color: var(--text); }

/* ---------- The strip ----------
   The set's own art, earned first, then the rest unlit. It dissolves at
   both ends, so nothing is cropped against the count or the control. */
.cband__peek {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  height: 62px;
  gap: 10px;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 70%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 70%, transparent 100%);
}

.cband__t {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 3 / 1;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.cband__t picture { display: block; width: 100%; height: 100%; }
.cband__t img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cband__t img.is-loaded { opacity: 1; }
/* Never a torn image icon: an image with no src yet, or one whose file
   failed (the loader removes it), leaves the plate. */
.cband__t img:not([src]) { visibility: hidden; }

/* The rarity edge again, at the size a strip tile can carry. */
.cband__t::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  z-index: 2;
  background: var(--band);
}
.cband__t::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(4, 6, 10, 0.5));
}

/* A card not yet earned: the same card, unlit. */
.cband__t--lock img { filter: grayscale(0.6) brightness(0.42); }
.cband__t--lock::after { background: linear-gradient(180deg, rgba(8, 11, 18, 0.3), rgba(8, 11, 18, 0.6)); }

/* An open band has the real grid under it, so the strip is spent. */
.cband[open] .cband__peek { opacity: 0; }

/* ---------- The control ----------
   It states the action, not the state: SHOW while shut, HIDE while
   open, the mark pointing the way the band will move. Both words are in
   the markup and CSS picks one, so <details> holds the only state. */
.cband__tog {
  position: relative;
  flex: none;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(6, 7, 10, 0.7);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.cband:not([open]) .cband__tog-on,
.cband[open] .cband__tog-off { display: none; }
.cband:not([open]) .cband__tog svg { transform: rotate(180deg); }
.cband__bar:hover .cband__tog { color: var(--text); border-color: rgba(255, 255, 255, 0.55); }

/* ---------- The sliver ----------
   The one proportion on the band: how much of this set the reader has.
   The badge beside it carries the same fact in figures. */
.cband__prog {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.cband__prog-f {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  background: var(--band);
  box-shadow: 0 0 10px -1px var(--band);
}

/* A shut band lets its name settle back; the open one is the focus. */
.cband:not([open]) .cband__name { color: #e6e3dc; }

/* ---------- The open set ---------- */
.cband__body { padding: 22px 0 18px; }

/* ---------- Motion (only when asked for) ----------
   The plate lifts on hover, the band's content opens rather than
   snapping where the browser can animate a <details>, and the grid's
   cards rise in a short cascade (capped at 12 steps) the moment it
   opens. Under reduced motion none of it runs: the band simply opens. */
@media (prefers-reduced-motion: no-preference) {
  .cband__bar { transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease; }
  .cband__bar:hover { transform: translateY(-2px); }
  .cband__peek { transition: opacity 260ms ease; }
  .cband__tog { transition: color 180ms ease, border-color 180ms ease; }
  .cband__tog svg { transition: transform 260ms ease; }

  .cband { interpolate-size: allow-keywords; }
  .cband::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 440ms cubic-bezier(0.2, 0.8, 0.2, 1), content-visibility 440ms allow-discrete;
  }
  .cband[open]::details-content { block-size: auto; }

  .cband[open] .card { animation: cbandRise 520ms cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--ci, 0) * 34ms); }
}

@keyframes cbandRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cband__bar, .cband__peek, .cband__tog, .cband__tog svg, .cband__t img { transition: none !important; }
  .cband[open] .card { animation: none !important; }
}

/* ---------- Narrow screens ----------
   The strip drops under the name, then the line under the name goes;
   the name, the count and the control always hold. */
@media (max-width: 760px) {
  .cband__bar { min-height: 92px; padding: 14px 14px 14px 20px; flex-wrap: wrap; row-gap: 12px; }
  .cband__id { width: auto; flex: 1 1 100%; }
  .cband__peek { order: 3; flex: 1 1 100%; height: 48px; }
  .cband__tog { margin-left: auto; }
}
@media (max-width: 460px) {
  .cband__line { display: none; }
  .cband__tog { padding: 8px 12px; }
}

/* ============================================================
   THE LOCKER (the design pass)
   The signed in collection is the dashboard's locker at full length:
   every rarity is a rack (tools/make-locker.py's rack picture as a
   9-slice, its name on the header tab, the groove under it lit in the
   rarity's colour), every card sits in a bay (the bay picture as a
   9-slice, the card whole in its 3:1 opening). The rarities wear the
   locker's finish colours (legendary emerald, epic doppler, rare
   sapphire, common damascus steel, rank case hardened); gold stays
   prestige's.
   Three bays: EARNED (lit, its rim in the rarity colour), SEALED (earned,
   its pack still sealed: the pack stands in the bay, the art unseen,
   and a press goes to the locker to open it), LOCKED (dark). A hover or
   focus peek says what earns the card, in the catalogue's own words.
   Only transform and opacity move; reduced motion stills them.
   ============================================================ */
.cband[data-set="legendary"] { --rc: 22, 150, 105;   --band: rgb(30, 178, 124); --band-soft: rgba(22, 150, 105, 0.42); }
.cband[data-set="epic"]      { --rc: 146, 100, 238;  --band: rgb(146, 100, 238); --band-soft: rgba(146, 100, 238, 0.4); }
.cband[data-set="rare"]      { --rc: 70, 130, 255;   --band: rgb(70, 130, 255);  --band-soft: rgba(70, 130, 255, 0.4); }
.cband[data-set="common"]    { --rc: 196, 204, 216;  --band: rgb(170, 178, 192); --band-soft: rgba(196, 204, 216, 0.3); }
.cband[data-set="rank"]      { --rc: 122, 150, 190;  --band: rgb(132, 162, 206); --band-soft: rgba(122, 150, 190, 0.38); }
.cband[data-set="legendary"] .cband__name { text-shadow: 0 0 26px rgba(22, 150, 105, 0.5); }

/* The rack's pack on the plate, standing in its rarity's light. */
.cband__pack { position: relative; flex: none; display: block; width: 52px; aspect-ratio: 320 / 515; }
.cband__rays { position: absolute; left: 50%; top: 50%; width: 170px; max-width: none; height: auto; transform: translate(-50%, -50%); opacity: 0.5; mix-blend-mode: screen; pointer-events: none; transition: opacity 0.35s ease; }
.cband__packimg { position: relative; display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.75)); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.cband__bar:hover .cband__packimg { transform: translateY(-3px) rotate(-3deg); }
.cband__bar:hover .cband__rays { opacity: 0.75; }

/* ---------- The rack ---------- */
.ccl-rack {
  --k: 0.22;
  position: relative;
  padding: calc(111px * var(--k) + 16px) calc(86px * var(--k) + 14px) calc(94px * var(--k) + 14px);
  border: 1px solid transparent;
  border-image-source: image-set(url('/assets/locker/locker-rack.webp') 1x, url('/assets/locker/locker-rack@2x.webp') 2x);
  border-image-slice: 18.72% 4.29% 15.85% 30% fill;
  border-image-width: calc(111px * var(--k)) calc(91px * var(--k)) calc(94px * var(--k)) calc(636px * var(--k));
  border-image-repeat: stretch;
}
/* Its name on the header's measured tab. */
.ccl-rack::before {
  content: attr(data-rack);
  position: absolute;
  left: calc(169px * var(--k));
  top: calc(26px * var(--k));
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(447px * var(--k));
  height: calc(57px * var(--k));
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgb(var(--rc));
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.9);
  pointer-events: none;
}
/* The groove under the header bar, lit in the rarity's colour. */
.ccl-rack::after {
  content: "";
  position: absolute;
  left: calc(86px * var(--k));
  right: calc(91px * var(--k));
  top: calc(97px * var(--k));
  height: 2px;
  border-radius: 1px;
  background: rgb(var(--rc));
  box-shadow: 0 0 5px rgba(var(--rc), 0.95), 0 0 14px rgba(var(--rc), 0.5);
  pointer-events: none;
}
.ccl-rack .cardgrid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px 12px; }
/* Never on the art: the Equipped tag rides the bay's top edge. */
.ccl-rack .card__equipped { top: -8px; right: 12px; border-radius: 3px; }

/* ---------- A bay ---------- */
.ccl-rack .card {
  overflow: visible;
  background: none;
  border: 0;
  color: inherit;
  text-decoration: none;
}
.ccl-rack .card:hover { transform: translateY(-2px); }
.ccl-rack .card:hover,
.ccl-rack .card:focus-visible { z-index: 2; }
.ccl-rack .card__bay {
  --kb: 0.1;
  position: relative;
  display: block;
  border-style: solid;
  border-color: transparent;
  border-width: calc(50px * var(--kb)) calc(74px * var(--kb)) calc(53px * var(--kb)) calc(73px * var(--kb));
  border-image-source: image-set(url('/assets/locker/locker-bay.webp') 1x, url('/assets/locker/locker-bay@2x.webp') 2x);
  border-image-slice: 13.37% 3.53% 14.17% 3.49% fill;
  border-image-width: 1;
  border-image-repeat: stretch;
}
.ccl-rack .card__art { background: #06080c; }
.ccl-rack .card__img { object-fit: contain; }
/* Earned: the glass edge and its rim in the rarity colour, brighter on hover. */
.ccl-rack .card--earned .card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.07) 42%, rgba(255, 255, 255, 0) 52%);
  box-shadow: inset 0 0 0 1px rgba(var(--rc), 0.6), inset 0 1px 0 rgba(220, 232, 255, 0.35);
  pointer-events: none;
}
.ccl-rack .card--earned .card__bay::after {
  content: "";
  position: absolute;
  inset: -1px;
  box-shadow: 0 0 0 1.5px rgb(var(--rc)), 0 0 16px rgba(var(--rc), 0.7);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.ccl-rack .card--earned:hover .card__bay::after,
.ccl-rack .card--earned:focus-visible .card__bay::after { opacity: 1; }
/* Sealed: the pack stands in the bay in its rarity's light; the art unseen. */
.card__pack {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(60% 120% at 50% 60%, rgba(var(--rc, 196, 204, 216), 0.28), rgba(6, 8, 12, 0) 70%);
}
.card__packimg { display: block; height: 96%; width: auto; transform: rotate(-6deg); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.8)); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card--sealed:hover .card__packimg,
.card--sealed:focus-visible .card__packimg { transform: rotate(-2deg) translateY(-4px); }
.card__seal {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 3px 7px;
  border: 1px solid rgba(var(--rc, 196, 204, 216), 0.6);
  border-radius: 4px;
  background: rgba(5, 8, 13, 0.82);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(var(--rc, 196, 204, 216));
}
.ccl-rack .card--sealed .card__art { overflow: hidden; }
.card--sealed:focus-visible { outline: 2px solid rgba(118, 166, 255, 0.85); outline-offset: 2px; }
/* The name plate under the bay. */
.ccl-rack .card__meta { padding: 8px 4px 0; border-top: 0; }
.ccl-rack .card--legendary .card__tag,
.ccl-rack .card--epic .card__tag,
.ccl-rack .card--rare .card__tag,
.ccl-rack .card--common .card__tag,
.ccl-rack .card--rank .card__tag { --rarity-swatch: rgb(var(--rc)); }

/* ---------- The peek: what earns it ----------
   Over the bay's top edge, never moving anything (absolute, opacity and
   transform only). Under a fine pointer on hover, and on keyboard focus. */
.card__peek {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% - 6px);
  z-index: 3;
  display: block;
  padding: 9px 11px 10px;
  border: 1px solid rgba(var(--rc, 196, 204, 216), 0.45);
  border-radius: 6px;
  background: #0b1018;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.95);
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.4;
  color: #c9d0dc;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.card__peek b {
  display: block;
  margin-bottom: 3px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(var(--rc, 196, 204, 216));
}
.card:focus-visible .card__peek { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__peek { opacity: 1; transform: none; transition-delay: 0.12s; }
}

/* ---------- The pack shelf: one pack per rack, its real count ---------- */
.ccl-shelf { margin: 26px 0 6px; max-width: 880px; }
.ccl-shelf[hidden] { display: none; }
.ccl-shelf__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 16px 14px 14px;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, #0e131b, #080b10);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 40px -22px rgba(0, 0, 0, 0.95);
}
.ccl-shelf__slot--legendary { --rc: 22, 150, 105; }
.ccl-shelf__slot--epic      { --rc: 146, 100, 238; }
.ccl-shelf__slot--rare      { --rc: 70, 130, 255; }
.ccl-shelf__slot--common    { --rc: 196, 204, 216; }
.ccl-shelf__slot--rank      { --rc: 122, 150, 190; }
.ccl-shelf__a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px 2px 2px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
}
.ccl-shelf__a:focus-visible { outline: 2px solid rgba(118, 166, 255, 0.85); outline-offset: 2px; }
.ccl-shelf__art { position: relative; display: block; width: clamp(40px, 6vw, 64px); aspect-ratio: 320 / 515; margin-bottom: 6px; }
.ccl-shelf__rays { position: absolute; left: 50%; top: 50%; width: 330%; max-width: none; height: auto; transform: translate(-50%, -50%); opacity: 0.5; mix-blend-mode: screen; pointer-events: none; transition: opacity 0.3s ease; }
.ccl-shelf__pack { position: relative; display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.8)); transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ccl-shelf__a:hover .ccl-shelf__pack, .ccl-shelf__a:focus-visible .ccl-shelf__pack { transform: translateY(-4px) rotate(-3deg); }
.ccl-shelf__a:hover .ccl-shelf__rays, .ccl-shelf__a:focus-visible .ccl-shelf__rays { opacity: 0.8; }
.ccl-shelf__name { font-size: 9.5px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: rgb(var(--rc)); }
.ccl-shelf__count { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.ccl-shelf__count b { font-weight: 500; color: var(--text); }
.ccl-shelf__bar { position: relative; display: block; width: 76%; height: 3px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.06); }
.ccl-shelf__bar i { position: absolute; inset: 0; display: block; background: rgb(var(--rc)); box-shadow: 0 0 8px rgba(var(--rc), 0.9); transform-origin: left center; }
@media (max-width: 640px) {
  .ccl-shelf__row { gap: 2px; padding: 14px 6px 12px; }
  .ccl-shelf__name { font-size: 8px; letter-spacing: 0.12em; }
  .ccl-shelf__count { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .ccl-shelf__pack, .ccl-shelf__rays { transition: none; }
  .ccl-shelf__a:hover .ccl-shelf__pack, .ccl-shelf__a:focus-visible .ccl-shelf__pack { transform: none; }
}

@media (max-width: 640px) {
  .ccl-rack { --k: 0.16; padding-left: calc(86px * var(--k) + 10px); padding-right: calc(86px * var(--k) + 10px); }
  .ccl-rack::before { font-size: 8px; }
  .cband__pack { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cband__packimg, .card__packimg, .card__peek, .cband__rays { transition: none; }
  .cband__bar:hover .cband__packimg { transform: none; }
  .card--sealed:hover .card__packimg, .card--sealed:focus-visible .card__packimg { transform: rotate(-6deg); }
}

/* ============================================================
   THE STILL RACK, THE SHOWCASE AND THE PLATE (the fix pass)
   A signed out reader, and the landing, get the same locker: the band
   does not fold (.cband--still, a plain bar), a few real cards stand
   lit in their bays (.card--show: the earned bay's light, it says
   nothing about who holds it) and the rest are sealed (.card--shut,
   the rarity's pack in the bay). The plate is the dashboard's lock
   plate (css/convert.css .ulk), asking for a sign in.
   ============================================================ */
.cband--still { margin-top: 14px; }
.cband--still .cband__bar { cursor: default; }
.cband--still .cband__bar:hover { transform: none; }
.cband--still .cband__count { margin-left: auto; }
.cband--still .cband__body { padding: 18px 0 8px; }
.card--shut { cursor: default; }
.card--shut:hover { transform: none; }
.ccl-rack .card--show .card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.07) 42%, rgba(255, 255, 255, 0) 52%);
  box-shadow: inset 0 0 0 1px rgba(var(--rc), 0.6), inset 0 1px 0 rgba(220, 232, 255, 0.35);
  pointer-events: none;
}
.ccl-rack .card--shut .card__name { color: #9aa2b1; font-size: 13px; }

.ccl-plate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  max-width: 880px;
  margin: 16px 0 0;
  padding: 12px 14px 12px 12px;
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, rgba(255, 255, 255, 0) 1px 3px), linear-gradient(180deg, #16191f, #0d0f13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -1px 0 rgba(0, 0, 0, 0.6), 0 12px 24px -18px #000;
}
.ccl-plate__lock {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b2f37, #111317 70%);
  box-shadow: inset 0 0 0 1px rgba(228, 174, 57, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.6);
  color: #e4ae39;
}
.ccl-plate__line { margin: 0; font-size: 13.5px; line-height: 1.4; color: #b8bfcb; }
.ccl-plate__line b { display: block; font-weight: 600; font-size: 14.5px; color: #f1f3f6; }
.ccl-plate__cta { white-space: nowrap; }
@media (max-width: 768px) {
  .ccl-plate { grid-template-columns: auto minmax(0, 1fr); }
  .ccl-plate__cta { grid-column: 1 / -1; justify-content: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}
/* A still rack is one row on a wide screen: its cards on show, then the
   sealed bay that counts the rest of the set. */
.cband--still .ccl-rack .cardgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cband--still .ccl-rack .cardgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cband--still .ccl-rack .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; } }

/* ---------- The compact rack (the landing) ----------
   The rack alone, its name on its tab; the shelf above carries each set's
   pack, name and total. Its rarity colour from its own data-set. */
.ccl-rack[data-set="legendary"] { --rc: 22, 150, 105; }
.ccl-rack[data-set="epic"]      { --rc: 146, 100, 238; }
.ccl-rack[data-set="rare"]      { --rc: 70, 130, 255; }
.ccl-rack[data-set="common"]    { --rc: 196, 204, 216; }
.ccl-rack[data-set="rank"]      { --rc: 122, 150, 190; }
.ccl-rack--compact { --k: 0.15; padding: calc(111px * var(--k) + 12px) calc(86px * var(--k) + 8px) calc(94px * var(--k) + 10px); }
.ccl-rack--compact::before { font-size: 8px; letter-spacing: 0.18em; }
.ccl-rack--compact .cardgrid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.ccl-rack--compact .card__meta { padding-top: 6px; }
.ccl-rack--compact .card__name { font-size: 12.5px; }
