/* ===========================================================================
   collection.css — the Collection page (#/collection, collection.js).

   Every card held as art in a grid (or a list), every set they come from as
   a tile with a meter, and one set's checklist: yours in full colour, the
   missing dimmed. The worth in gold, as everywhere; each set tinted with a hue
   of its own (--tint). Scoped to `.coll` and `.view-collection`.
   =========================================================================== */

.view-collection {
  height: calc(100vh - 52px - var(--pfbar-h, 0px));
  height: calc(100dvh - 52px - var(--pfbar-h, 0px));
  overflow-y: auto; overflow-x: hidden;
  background:
    radial-gradient(900px 340px at 18% -160px, color-mix(in srgb, var(--gold) 8%, transparent), transparent 70%),
    radial-gradient(760px 320px at 92% -120px, color-mix(in srgb, var(--accent) 7%, transparent), transparent 72%),
    var(--bg);
}
body.has-bottomnav .view-collection { padding-bottom: var(--bottomnav-h, 0px); scroll-padding-bottom: var(--bottomnav-h, 0px); }

.coll {
  --gut: clamp(16px, 4vw, 40px);
  display: flex; flex-direction: column; gap: 16px;
  max-width: 1360px; margin: 0 auto; padding: 22px var(--gut) 56px;
}
.coll-wait { min-height: 60vh; justify-content: center; }

/* ---- the head: what it is, and four figures */
.coll-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.coll-kicker {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.coll-title { min-width: 0; }
.coll-title h1 { margin: 2px 0 0; font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.coll-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.coll-stat {
  min-width: 96px; padding: 9px 14px 10px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 1px solid var(--line-soft, var(--line));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.coll-stat dt { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.coll-stat dd { margin: 3px 0 0; font-size: 19px; font-weight: 780; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.coll-stat.is-value dd { color: var(--gold-text); }

/* ---- Cards · Sets */
.coll-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.coll-tabs::-webkit-scrollbar { display: none; }
.coll-tab {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px 11px; white-space: nowrap;
  color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 650;
  -webkit-tap-highlight-color: transparent;
}
.coll-tab:hover { color: var(--ink); }
.coll-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.coll-tab[aria-current="page"] { color: var(--ink); }
.coll-tab[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2.5px; border-radius: 2px 2px 0 0;
  background: var(--accent-text);
  box-shadow: 0 -2px 10px color-mix(in srgb, var(--accent) 45%, transparent);
}
.coll-count {
  min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ink-2); background: var(--bg-3);
}
.coll-tab[aria-current="page"] .coll-count { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 16%, transparent); }

/* ---- the tools: filter, game, sort, grid or list */
.coll-body { display: flex; flex-direction: column; gap: 12px; }
.coll-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.coll-search { flex: 1 1 220px; max-width: 420px; height: 36px; border-radius: 10px; }
.coll-select { width: auto; flex: none; height: 36px; max-width: 220px; border-radius: 10px; }
.coll-seg { align-self: center; }
.coll-seg .seg-opt { height: 28px; padding: 0 11px; }
.coll-note { margin: 0; min-height: 18px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.coll-note.is-error { color: var(--danger); }
.coll-more { align-self: center; margin-top: 8px; }
.coll-more[hidden] { display: none; }
.coll-none { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 16px; text-align: center; color: var(--ink-2); }
.coll-none p { margin: 0; }

/* ---- the grid of cards */
.coll-results { display: flex; flex-direction: column; }
.coll-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 18px 14px;
}
.coll-item { min-width: 0; }
.coll-card {
  display: flex; flex-direction: column; gap: 7px; width: 100%; min-width: 0; padding: 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
.coll-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.coll-art {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: var(--card-ratio, .714); border-radius: 8px;
  background: var(--bg-3);
  box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(255, 255, 255, .05);
  transition: transform var(--t-1) var(--ease-out), box-shadow var(--t-2) var(--ease-out);
}
.coll-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.coll-noart {
  display: grid; place-items: center; height: 100%; padding: 10px; text-align: center;
  font-size: 12px; font-weight: 650; color: var(--ink-3);
}
@media (hover: hover) and (pointer: fine) {
  .coll-card:hover .coll-art { transform: translateY(-3px); box-shadow: 0 14px 26px -8px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08); }
}
:root[data-motion="off"] .coll-art { transition: none; }
.coll-card:active .coll-art { transform: scale(.98); }
/* how many copies: a dark pill on the art */
.coll-qty {
  position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff;
  background: rgba(8, 10, 16, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 2px 6px rgba(0, 0, 0, .35);
}
.coll-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 0 2px; }
.coll-name { font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-sub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 2px; }
.coll-price { font-size: 13.5px; font-weight: 760; color: var(--gold-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.coll-each, .coll-ask { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.coll-ask { font-size: 12.5px; font-weight: 650; }

/* ---- a set's checklist: yours ticked, the rest dimmed */
.coll-have {
  position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font-size: 12px; font-weight: 900; color: #fff;
  background: linear-gradient(150deg, #34d399, #0f9f6e);
  box-shadow: 0 0 0 2px rgba(8, 10, 16, .55), 0 3px 8px rgba(0, 0, 0, .35);
}
.coll-miss {
  position: absolute; left: 50%; bottom: 8px; translate: -50% 0; padding: 2px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2);
  background: rgba(8, 10, 16, .72); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}
.coll-card.is-missing .coll-art { background: color-mix(in srgb, var(--bg-3) 70%, var(--bg)); box-shadow: inset 0 0 0 1px var(--line); }
.coll-card.is-missing .coll-art img { filter: grayscale(1) brightness(.75); opacity: .42; transition: opacity var(--t-2) var(--ease-out), filter var(--t-2) var(--ease-out); }
.coll-card.is-missing .coll-name { color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .coll-card.is-missing:hover .coll-art img { filter: none; opacity: .9; }
}
/* How missing cards look, picked on the checklist (collection.js MISS_STYLES), as a binder's
   are in Binder settings. Stamped is the look above. */
.coll-ghost { display: none; }
[data-missing="grey"] .coll-card.is-missing .coll-art img { filter: grayscale(1); opacity: 1; }
[data-missing="dim"] .coll-card.is-missing .coll-art img { filter: none; opacity: .32; }
[data-missing="grey"] .coll-miss,
[data-missing="dim"] .coll-miss,
[data-missing="hidden"] .coll-miss { display: none; }
/* full colour, a small red badge at the top, and a red ring round the card */
[data-missing="badge"] .coll-card.is-missing .coll-art img { filter: none; opacity: 1; }
[data-missing="badge"] .coll-card.is-missing .coll-art { box-shadow: var(--shadow-card), 0 0 0 2px color-mix(in srgb, var(--danger) 80%, transparent); }
[data-missing="badge"] .coll-miss {
  left: 6px; top: 6px; bottom: auto; translate: none; padding: 2px 7px; border-radius: 5px;
  font-size: 9.5px; letter-spacing: .08em; color: #fff;
  background: color-mix(in srgb, var(--danger) 88%, #000); box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
/* an empty spot that keeps its place: a dashed outline and the card's number */
[data-missing="hidden"] .coll-card.is-missing .coll-art { background: transparent; box-shadow: none; }
[data-missing="hidden"] .coll-card.is-missing .coll-art img { visibility: hidden; }
[data-missing="hidden"] .coll-card.is-missing .coll-ghost {
  position: absolute; inset: 0; display: grid; place-items: center;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 22%, transparent); border-radius: inherit;
  font-size: 13px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
@media (hover: hover) and (pointer: fine) {
  [data-missing="hidden"] .coll-card.is-missing:hover .coll-ghost { border-color: color-mix(in srgb, var(--ink) 45%, transparent); color: var(--ink-2); }
}

/* ---- the list */
.coll-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.coll-row {
  display: flex; flex-direction: column; gap: 4px; padding: 8px 12px 8px 8px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line-soft, var(--line));
}
.coll-row-main {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 8px;
}
.coll-row-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.coll-thumb { display: block; width: 44px; aspect-ratio: var(--card-ratio, .714); overflow: hidden; border-radius: 4px; background: var(--bg-3); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.coll-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.coll-thumb .coll-noart { font-size: 0; }
.coll-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.coll-row-text .coll-name { font-size: 14px; }
.coll-row-qty {
  min-width: 34px; padding: 2px 8px; border-radius: 999px; text-align: center;
  font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ink-2); background: var(--bg-3);
}
.coll-row-val { display: flex; flex-direction: column; align-items: flex-end; min-width: 76px; }
.coll-where { display: flex; flex-wrap: wrap; gap: 4px 6px; padding-left: 56px; }
.coll-where:empty { display: none; }
.coll-bchip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 220px; padding: 2px 9px 2px 6px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--bg-3); border: 1px solid transparent;
}
.coll-bchip i { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--cover); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.coll-bchip:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.coll-bchip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- every set: a tile each, tinted, with its meter */
.coll-sets {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
}
.coll-set {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-start; gap: 14px; min-height: 132px; padding: 14px 16px 14px;
  border-radius: 16px; color: var(--ink); text-decoration: none;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tint) 18%, transparent), transparent 62%),
    color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint) 18%, var(--line-soft, var(--line)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform var(--t-1) var(--ease-out), border-color var(--t-2) var(--ease-out), box-shadow var(--t-2) var(--ease-out);
}
.coll-set::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--tint); opacity: .85;
}
@media (hover: hover) and (pointer: fine) {
  .coll-set:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tint) 45%, var(--line)); box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--tint) 70%, #000); }
}
:root[data-motion="off"] .coll-set { transition: none; }
/* The set's card stands at the tile's middle, however tall its words make it. */
.coll-set > .set-art { align-self: center; }
.coll-set:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.coll-set-body { flex: 1; align-self: stretch; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.coll-set-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coll-set-code {
  max-width: 60%; padding: 2px 8px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 750; letter-spacing: .04em; color: color-mix(in srgb, var(--tint) 70%, var(--ink));
  background: color-mix(in srgb, var(--tint) 14%, transparent);
}
.coll-set-date { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.coll-set-name {
  font-size: 15.5px; font-weight: 720; letter-spacing: -.01em; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.coll-set-game { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-set-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.coll-set-have { display: inline-flex; align-items: baseline; gap: 8px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.coll-set-have b { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.coll-set-have b.is-done, .coll-check-nums em.is-done { color: #34d399; }
:root[data-theme="light"] .coll-set-have b.is-done, :root[data-theme="light"] .coll-check-nums em.is-done { color: #0f8a5f; }

/* the meter: how much of the set is yours (gold when it is all of it) */
.coll-meter {
  position: relative; display: block; height: 6px; margin-top: 6px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
}
.coll-meter i {
  position: absolute; inset: 0 auto 0 0; border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tint, var(--accent)) 70%, #fff 0%), var(--tint, var(--accent)));
  box-shadow: 0 0 10px color-mix(in srgb, var(--tint, var(--accent)) 55%, transparent);
}
.coll-set.is-done .coll-meter i, .coll-check-head.is-done .coll-meter i {
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 70%, #fff), var(--gold));
  box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 60%, transparent);
}

/* ---- one set: its head, then its checklist */
.coll-back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px;
  font-size: 13px; font-weight: 650; color: var(--ink-2); text-decoration: none;
}
.coll-back span { font-size: 18px; line-height: 1; }
.coll-back:hover { color: var(--ink); background: var(--bg-3); }
.coll-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.coll-check-wait { min-height: 40vh; display: grid; place-items: center; }
.coll-check-body { display: flex; flex-direction: column; gap: 12px; }
.coll-check-head {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr) auto; align-items: center; gap: 14px 24px;
  padding: 18px 20px; border-radius: 18px;
  background:
    radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--tint) 20%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint) 22%, var(--line-soft, var(--line)));
}
.coll-check-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.coll-check-name { min-width: 0; }
.coll-check-title h2 { margin: 3px 0 0; font-size: clamp(19px, 2.4vw, 24px); font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.coll-check-progress { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.coll-check-nums { display: flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; }
.coll-check-nums b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.coll-check-nums span { font-size: 13px; color: var(--ink-2); }
.coll-check-nums em { margin-left: auto; font-style: normal; font-size: 14px; font-weight: 800; color: var(--ink); }
.coll-check-progress .coll-meter { height: 8px; }
.coll-check-stats { display: flex; gap: 18px; margin: 0; }
.coll-check-stats dt { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.coll-check-stats dd { margin: 2px 0 0; font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.coll-check-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- nothing at all yet */
.coll-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 520px; margin: 7vh auto 0; padding: 0 16px;
  text-align: center;
}
.coll-empty h2 { margin: 6px 0 0; font-size: 22px; font-weight: 800; }
.coll-empty p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.coll-empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.coll-empty-art { position: relative; width: 120px; height: 104px; }
.coll-empty-art i {
  position: absolute; top: 10px; left: 50%; width: 58px; height: 81px; margin-left: -29px; border-radius: 7px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 34%, var(--bg-3)), var(--bg-3));
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.coll-empty-art i:nth-child(1) { rotate: -14deg; translate: -26px 6px; opacity: .6; }
.coll-empty-art i:nth-child(2) { rotate: 12deg; translate: 26px 6px; opacity: .75; }
.coll-empty-art i:nth-child(3) {
  background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 55%, var(--bg-3)), color-mix(in srgb, var(--gold) 18%, var(--bg-3)));
}

/* ---- phones */
@media (max-width: 760px) {
  .coll { gap: 14px; padding-top: 16px; }
  .coll-head { align-items: stretch; }
  /* the worth gets the room it needs; the three counts share the rest */
  .coll-stats { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .coll-tab { padding: 10px 11px 11px; }
  .coll-stat { min-width: 0; padding: 8px 10px 9px; border-radius: 12px; }
  .coll-stat dd { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; }
  .coll-search { flex-basis: 100%; max-width: none; }
  .coll-select { flex: 1 1 0; max-width: none; min-width: 0; }
  .coll-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .coll-sets { grid-template-columns: minmax(0, 1fr); }
  .coll-check-head { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .coll-check-stats { justify-content: space-between; }
  .coll-row-main { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .coll-row-qty { display: none; }
  .coll-thumb { width: 40px; }
  .coll-where { padding-left: 52px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .coll-check-head { grid-template-columns: minmax(0, 1fr) minmax(200px, 1fr); }
}

/* ---- a card's copies by grade: "2× NM", "PSA 10" (a slab in gold) */
.coll-grades { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; min-width: 0; }
.coll-grade {
  padding: 1px 6px; border-radius: 5px; white-space: nowrap;
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  color: var(--ink-2); background: var(--bg-3);
}
.coll-grade.is-slab {
  color: var(--gold-text);
  background: color-mix(in srgb, var(--gold) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent);
}
.coll-grade.is-more { padding-left: 2px; color: var(--ink-3); background: none; }
.coll-row-text .coll-grades { margin-top: 4px; }

/* ---- Want All Missing: a heart, filled pink once they all are */
.coll-want .ico { color: #f472b6; }
.coll-want.is-on {
  color: var(--ink);
  background: color-mix(in srgb, #f472b6 12%, var(--bg-2));
  border-color: color-mix(in srgb, #f472b6 45%, var(--line));
}

/* ---- sealed and shelves: square art (photos and boxes), product shots on white */
.coll-grid.is-goods { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.coll-art.is-good { aspect-ratio: 1; }
.coll-art.is-good .coll-noart {
  padding: 14px; font-size: 13px; line-height: 1.3; color: var(--ink-2);
  background:
    radial-gradient(120% 90% at 28% 0%, color-mix(in srgb, var(--tint) 32%, transparent), transparent 68%),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .18)), var(--bg-3);
}
.coll-art.is-product { background: #fff; }
.coll-art.is-product img { object-fit: contain; padding: 8%; }
.coll-tag {
  position: absolute; right: 6px; top: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 750; color: #fff;
  background: color-mix(in srgb, #10b981 85%, #000); box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
@media (max-width: 760px) {
  .coll-grid.is-goods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Home's Collections section: the sets closest to complete (home.js) */
.home-coll-sets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* ---- a set's picture (setArt): its pack or box on a light card, or one of its cards, leaning a little.
   Shared by the set tiles here, on Home, and on the Sets page (sets-page.js). */
.set-art {
  /* flex, not grid: a percentage height in an auto grid row is the picture's own, which overflowed the box */
  position: relative; flex: none; display: flex; align-items: center; justify-content: center; overflow: visible;
  width: 58px; height: 80px;
}
.set-art.is-lg { width: 92px; height: 126px; }
.set-art img { display: block; max-width: 100%; max-height: 100%; }
/* a pack or box: the product alone (its photo's white cut away, setArt), with a shadow under it */
.set-art.is-sealed img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 3px;
  /* the photo's last pixel or two at the edge are often near-white */
  clip-path: inset(1.5% round 3px);
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, .55));
  transition: opacity var(--t-2) var(--ease-out), scale var(--t-2) var(--ease-out);
}
.set-art.is-sealed img.is-cutting { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  :is(.coll-set, .stile):hover .set-art.is-sealed img { scale: 1.06; }
}
.set-art.is-card img {
  width: 100%; height: auto; aspect-ratio: var(--card-ratio, .714); object-fit: cover; border-radius: 4px;
  box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08);
  rotate: -4deg; transition: rotate var(--t-2) var(--ease-out), scale var(--t-2) var(--ease-out);
}
.set-art.is-lg.is-card img { border-radius: 6px; }
@media (hover: hover) and (pointer: fine) {
  :is(.coll-set, .stile):hover .set-art.is-card img { rotate: 0deg; scale: 1.06; }
}
:root[data-motion="off"] .set-art.is-card img { transition: none; }
.set-art.is-empty {
  border-radius: 10px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tint, var(--accent)) 38%, var(--bg-3)), var(--bg-3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.set-art-code {
  max-width: 100%; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--mono, inherit); font-size: 12px; font-weight: 750; color: var(--ink);
}
.set-art.is-lg .set-art-code { font-size: 16px; }

/* the Sets page's tile: the picture beside its words (sets-page.js) */
.stile-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.stile-text { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
@media (max-width: 760px) {
  .set-art.is-lg { width: 74px; height: 102px; }
}

/* ---- where a card is: its binder (with that binder's colour), or loose in a portfolio */
.coll-place {
  display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 2px;
  font-size: 11px; font-weight: 600; color: var(--ink-2);
}
.coll-place > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-place i { flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--cover, var(--accent)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.coll-place.is-loose { color: var(--gold-text); }
.coll-place-ico { flex: none; display: inline-grid; place-items: center; line-height: 0; }
.coll-bchip.is-loose { color: var(--gold-text); background: color-mix(in srgb, var(--gold) 12%, var(--bg-3)); border-style: dashed; border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.coll-bchip.is-loose:hover { color: var(--gold-text); border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
/* Phones: All · In Binder · Loose Cards on a row of its own, so Sort keeps its width. */
@media (max-width: 640px) {
  .coll-held { order: 9; flex: 1 1 100%; }
  .coll-held .seg-opt { flex: 1 1 0; }
}
