/* Hobby Showcase — a card show floor.
   Carpet underfoot, a vinyl booth banner overhead, aluminum-framed glass cases on felt,
   cards in toploaders, one-touches and slabs, prices on strips of tape in black marker. */

@font-face { font-family: "Bungee"; src: url("/static/fonts/Bungee-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Permanent Marker"; src: url("/static/fonts/PermanentMarker.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("/static/fonts/BebasNeue.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Oswald"; font-weight: 500; src: url("/static/fonts/Oswald-500.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Oswald"; font-weight: 700; src: url("/static/fonts/Oswald-700.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: dark;
  --carpet: #1b2130;
  --carpet-dot: #252d40;
  --ink: #eef1f6;
  --muted: #a3acbd;
  --line: #3a4356;
  --panel: #232a3a;
  --panel-2: #2b3346;
  --accent: #ff6a1a;
  --accent-ink: #1a0d05;
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #ff5c5c;
  --focus: #7cc4ff;
  --gold: #d9b45a;
  --frame-1: #d9dde3;
  --frame-2: #8a919c;
  --frame-3: #f5f7fa;
  --radius: 10px;
  --sign-font: "Bungee", "Impact", "Arial Black", sans-serif;
  --card-font: "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
  --tag-font: "Oswald", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--carpet);
  background-image:
    radial-gradient(circle at 20% 30%, var(--carpet-dot) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 70% 80%, #20283a 0 1px, transparent 1.5px),
    radial-gradient(ellipse at 50% -10%, #2d3854 0%, transparent 60%);
  background-size: 14px 14px, 9px 9px, 100% 100%;
  background-attachment: scroll, scroll, fixed;
  line-height: 1.45;
}
a { color: #9fd0ff; }
a:hover { color: #cfe7ff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }

/* ------------------------------------------------------------------ banner */

.banner {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  padding: 18px 16px 14px;
  background: linear-gradient(180deg, #b3141d 0%, #8f0f17 100%);
  border-bottom: 4px solid #5e0a10; box-shadow: 0 6px 18px rgb(0 0 0 / .45);
}
.banner::before, .banner::after {
  content: ""; position: absolute; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle, #222 0 3px, #c9ccd2 3.5px 5px);
}
.banner::before { left: 6px; }
.banner::after { right: 6px; }
.sign {
  font-family: var(--sign-font); font-size: clamp(1.4rem, 4vw, 2.3rem); letter-spacing: .02em;
  color: #fff; text-decoration: none; line-height: 1.05;
  text-shadow: 0 3px 0 #4a060b, 0 0 18px rgb(255 255 255 / .15);
}
.sign:hover { color: #fff; }
.banner nav { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; align-items: center; }
.banner nav a {
  color: #fff; text-decoration: none; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; background: rgb(0 0 0 / .18);
}
.banner nav a[aria-current="page"], .banner nav a:hover { background: rgb(0 0 0 / .38); }
.coin-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: #2a1a05; color: #ffd98a; font: 700 .9rem/1 var(--tag-font); letter-spacing: .03em;
  box-shadow: inset 0 0 0 1px #6b4a12;
}
.coin-chip::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #e0a826 55%, #9a6b0c);
}
.banner nav a.dev-chip { background: #c0182b; color: #fff; font: 700 .8rem/1 var(--tag-font); letter-spacing: .08em; padding: 7px 10px; }
.banner nav a.dev-chip:hover { background: #8f0f1f; }
.banner nav a.dev-chip[hidden] { display: none; }
.settings .dev-mode { margin-top: 28px; border-color: #c0182b; }

main { max-width: 1320px; margin: 0 auto; padding: 22px 16px 60px; }
footer.site { max-width: 1320px; margin: 0 auto; padding: 18px 16px 30px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.section-title { font-family: var(--sign-font); font-weight: 400; font-size: 1.25rem; margin: 40px 0 10px; }

/* ------------------------------------------------------------------ buttons and forms */

.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; font-size: .95rem;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
}
.btn:hover { background: #36405a; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: #ff8a4a; color: var(--accent-ink); }
.btn.primary:hover { background: #ff8240; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn[aria-pressed="true"] { background: var(--ink); color: #111; }
.btn:disabled { opacity: .5; cursor: default; }
.linkish { background: none; border: 0; color: #9fd0ff; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

label { display: block; font-size: .85rem; color: var(--muted); }
input[type="text"], input[type="search"], input[type="url"], input[type="number"], input[type="email"], input:not([type]), select, textarea {
  font: inherit; color: var(--ink); width: 100%; margin-top: 3px; padding: 7px 9px; border-radius: 7px;
  background: #151a26; border: 1px solid var(--line);
}
textarea { min-height: 70px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 1.05em; height: 1.05em; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: .92rem; margin-right: 14px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 14px; margin: 0 0 14px; }
legend { padding: 0 6px; color: var(--ink); font-weight: 600; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 12px; }
.grid-form .wide { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.form-actions .spacer { flex: 1; }
.memo-only, .card-only, .raw-only { display: contents; }
form[data-kind="card"] .memo-only, form[data-kind="memorabilia"] .card-only, form[data-graded="1"] .raw-only { display: none; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink); font-weight: 600; font-size: .92rem; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: #3b465f; position: relative; margin: 0; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(18px); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 100; max-width: min(90vw, 520px);
  background: #0e1220; border: 1px solid var(--line); color: var(--ink); padding: 10px 16px; border-radius: 10px;
  box-shadow: 0 8px 26px rgb(0 0 0 / .5);
}
.toast.error { border-color: var(--danger); }
.empty-note { color: var(--muted); padding: 20px; text-align: center; }

.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font: 600 .68rem/1.2 var(--tag-font); letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.tag.verified { background: #123d24; color: #a7f3c0; }
.tag.pending { background: #3d2e0b; color: #fde68a; }
.tag.rejected { background: #3d1111; color: #fecaca; }
.tag.public { background: #123d24; color: #a7f3c0; }
.tag.private { background: #33405a; color: #dbe3f0; }

/* ------------------------------------------------------------------ home */

.home-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 28px; }
.table-case > a { text-decoration: none; color: inherit; display: block; }
.table-case .case-frame { transition: transform .15s ease; }
.table-case > a:hover .case-frame { transform: translateY(-3px); }
.table-legs { height: 16px; margin: 0 6%; background: linear-gradient(180deg, #0b0d13, transparent); clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%); }
.plate { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; margin-top: 4px; }
.plate h2 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.plate .meta { color: var(--muted); font-size: .88rem; }
.kind-pill { font: 700 .7rem/1 var(--tag-font); letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: #3b465f; color: #dfe6f3; }
.kind-pill.electronic { background: #213a5f; color: #cfe4ff; }
.case-empty { color: var(--muted); text-align: center; padding: 50px 10px; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.pick { display: flex; flex-direction: column; gap: 6px; }
.pick .why { font-size: .8rem; color: var(--muted); }
.pick .name { font-size: .85rem; line-height: 1.25; }
.pick .btn { margin-top: auto; align-self: flex-start; }

/* the Hobby Box: a wooden box lined with velvet, six grails */
.hobby-box {
  position: relative; padding: 18px; border-radius: 12px;
  background:
    repeating-linear-gradient(92deg, rgb(255 255 255 / .03) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #6b3d1f, #4a2812 60%, #3a1f0d);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .15), inset 0 -3px 0 rgb(0 0 0 / .35), 0 16px 34px rgb(0 0 0 / .5);
}
.hobby-box .velvet {
  border-radius: 6px; padding: clamp(14px, 2.4vw, 26px);
  background: radial-gradient(ellipse at 50% 0%, #a3162c, #6e0d1d 70%), #6e0d1d;
  box-shadow: inset 0 8px 20px rgb(0 0 0 / .55);
}
.hobby-box .brass {
  display: block; width: fit-content; margin: 0 auto 14px; padding: 4px 16px; border-radius: 3px;
  background: linear-gradient(180deg, #f0d48a, #b8913d); color: #3a2a05;
  font: 700 .8rem/1.3 var(--tag-font); letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 1px 0 rgb(255 255 255 / .4) inset, 0 2px 4px rgb(0 0 0 / .4);
}
.box-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 2vw, 22px); align-items: end; }
@media (max-width: 760px) { .box-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.box-grid li { position: relative; }
.box-grid .slot-empty {
  aspect-ratio: 5 / 8; border-radius: 6px; border: 2px dashed rgb(255 255 255 / .18);
  display: grid; place-items: center; color: rgb(255 255 255 / .45); font-size: .78rem; text-align: center; padding: 8px;
}

/* ------------------------------------------------------------------ the display case */

.case-frame {
  --felt: #131316;
  position: relative; padding: 14px; border-radius: 14px;
  background: linear-gradient(180deg, var(--frame-3) 0%, var(--frame-1) 18%, var(--frame-2) 55%, var(--frame-1) 85%, var(--frame-3) 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .6), 0 2px 0 #5b616b, 0 18px 40px rgb(0 0 0 / .55);
}
.felt {
  position: relative; border-radius: 6px; padding: clamp(16px, 2.6vw, 30px); min-height: 180px;
  background-color: var(--felt);
  background-image: radial-gradient(ellipse at 50% 0%, rgb(255 255 255 / .12), transparent 55%),
                    radial-gradient(circle at 30% 40%, rgb(255 255 255 / .025) 0 1px, transparent 1.5px);
  background-size: 100% 100%, 5px 5px;
  box-shadow: inset 0 6px 18px rgb(0 0 0 / .65), inset 0 0 0 1px rgb(0 0 0 / .6);
}
.felt::before {
  content: ""; position: absolute; left: 3%; right: 3%; top: 0; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgb(255 250 235 / .85), transparent); filter: blur(1px);
}
.glass {
  position: absolute; inset: 14px; border-radius: 6px; pointer-events: none; z-index: 3;
  background:
    linear-gradient(115deg, rgb(255 255 255 / .10) 0%, rgb(255 255 255 / .02) 22%, transparent 23%, transparent 58%, rgb(255 255 255 / .06) 59%, transparent 70%),
    linear-gradient(180deg, rgb(170 210 255 / .05), transparent 40%);
}
.felt-black { --felt: #131316; } .felt-navy { --felt: #14203a; } .felt-burgundy { --felt: #3a1018; }
.felt-green { --felt: #0f2a1c; } .felt-grey { --felt: #2b2e34; }

.case-grid {
  list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr));
  gap: clamp(22px, 3vw, 36px) clamp(12px, 2vw, 24px); align-items: end;
}
.case-grid.mini { gap: 16px 8px; }
@media (max-width: 720px) { .case-grid:not(.mini) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .case-grid:not(.mini) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.slot { position: relative; min-width: 0; }
.slot.memo { grid-column: span 2; }
.slot > .open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; text-align: inherit; border-radius: 8px; }
.slot > .open:hover .holder { transform: translateY(-2px); }
.slot .tags { position: absolute; left: 4px; top: -10px; z-index: 6; }
.mini .tags, .box-grid .tags { display: none; }

body.arranging .slot { touch-action: none; cursor: grab; }
body.arranging .slot > .open { cursor: grab; pointer-events: none; }
body.arranging .slot:focus-visible { outline: 3px dashed var(--focus); outline-offset: 4px; }
body.arranging .holder { animation: jiggle .5s ease-in-out infinite alternate; }
body.arranging .slot:nth-child(2n) .holder { animation-delay: -.25s; }
@keyframes jiggle { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
@media (prefers-reduced-motion: reduce) { body.arranging .holder { animation: none; } .table-case .case-frame, .holder { transition: none; } }
.slot.placeholder .holder, .slot.placeholder .tape { opacity: .25; }
.drag-ghost { position: fixed; z-index: 50; pointer-events: none; margin: 0; list-style: none; filter: drop-shadow(0 18px 22px rgb(0 0 0 / .6)); }
.arrange-note { display: none; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #2b3a22; border: 1px solid #4f6b3c; color: #e3f5d6; }
body.arranging .arrange-note { display: block; }

/* ------------------------------------------------------------------ holders */

.holder { position: relative; transition: transform .15s ease; }
.card-face { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 5 / 7; overflow: hidden; border-radius: 3px; background: #ddd; }
.card-face > img { width: 100%; height: 100%; object-fit: cover; display: block; }

.toploader {
  padding: 6% 5.5% 7%; border-radius: 5px;
  background: linear-gradient(160deg, rgb(255 255 255 / .22), rgb(255 255 255 / .06) 40%, rgb(255 255 255 / .14));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35), 0 6px 12px rgb(0 0 0 / .5);
}
.toploader::before { content: ""; position: absolute; left: 22%; right: 22%; top: 1.5%; height: 3%; border-radius: 0 0 8px 8px; background: rgb(0 0 0 / .18); }

/* the one-touch: thick magnetic acrylic, for the cards that deserve it */
.onetouch {
  padding: 9%; border-radius: 9px;
  background: linear-gradient(150deg, rgb(255 255 255 / .34), rgb(255 255 255 / .08) 35%, rgb(255 255 255 / .04) 60%, rgb(255 255 255 / .2));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .55), inset 0 0 0 4px rgb(0 0 0 / .12), inset 0 0 18px rgb(255 255 255 / .12), 0 10px 18px rgb(0 0 0 / .6);
}
.onetouch::after { content: ""; position: absolute; inset: 5.5%; border-radius: 5px; box-shadow: 0 0 0 1px rgb(220 225 235 / .55); pointer-events: none; }

.slab {
  padding: 4% 6% 7%; border-radius: 6px;
  background: linear-gradient(160deg, rgb(255 255 255 / .30), rgb(255 255 255 / .10) 35%, rgb(255 255 255 / .18));
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / .45), inset 0 0 0 5px rgb(0 0 0 / .08), 0 8px 16px rgb(0 0 0 / .55);
}
.slab-label {
  container-type: inline-size; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4%;
  margin-bottom: 7%; padding: 5%; background: #f7f7f2; color: #111; border-radius: 2px;
  border-top: 3px solid var(--grader, #555); font-family: var(--tag-font); line-height: 1.1;
}
.slab-grader { font-weight: 700; font-size: 11cqi; color: var(--grader, #555); letter-spacing: .02em; }
.slab-text { font-size: 6.5cqi; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.slab-text em { display: block; font-style: normal; opacity: .65; letter-spacing: .04em; }
.slab-grade { font-weight: 700; font-size: 16cqi; }
.slab-window { padding: 4%; background: rgb(0 0 0 / .25); border-radius: 3px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
.g-psa { --grader: #c8102e; } .g-bgs { --grader: #5b6b7a; } .g-sgc { --grader: #1d1d1d; }
.g-cgc { --grader: #1f5fa8; } .g-tag { --grader: #2a8a5b; } .g-other { --grader: #6b5a2a; }

.memo { padding: 4%; border-radius: 8px; background: linear-gradient(180deg, #2c2f37, #1b1d23); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), 0 8px 16px rgb(0 0 0 / .5); }
.memo-face { container-type: inline-size; aspect-ratio: 7 / 5; overflow: hidden; border-radius: 5px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, #3a3f4b, #22252c 70%); color: #cfd5df; }
.memo-face > img { width: 100%; height: 100%; object-fit: contain; background: #111; }
.memo-face svg { width: 42%; height: auto; opacity: .85; }
.memo-plate { margin-top: 5%; padding: 3px 8px; border-radius: 3px; text-align: center; background: linear-gradient(180deg, #d9b45a, #a8853a); color: #2a1d05; font: 700 .72rem/1.25 var(--tag-font); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ the athlete card (placeholder) */

.ac {
  --sport: #1f5fa8; --sport-2: #0c2a52; --sport-ink: #fff;
  position: absolute; inset: 0; overflow: hidden;
  border: 4.5cqi solid #f6f3ea; border-radius: 2px;
  background: linear-gradient(165deg, var(--sport), var(--sport-2));
  font-family: var(--tag-font); color: var(--sport-ink);
}
.ac::before {   /* a little foil sheen */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgb(255 255 255 / .16) 45%, transparent 60%);
}
.ac-art { position: absolute; inset: 0; display: grid; place-items: end center; }
.ac-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.ac.has-photo .ac-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / .35) 0%, transparent 22%, transparent 55%, rgb(0 0 0 / .55) 100%);
}
.ac-sil { width: 86%; height: auto; fill: rgb(255 255 255 / .16); margin-bottom: 18%; }
.ac:not(.has-photo) .ac-art {
  background:
    repeating-linear-gradient(135deg, rgb(255 255 255 / .05) 0 5cqi, transparent 5cqi 10cqi),
    radial-gradient(circle at 50% 35%, rgb(255 255 255 / .18), transparent 55%);
}
.ac-top { position: absolute; z-index: 2; left: 5cqi; right: 26cqi; top: 4cqi; display: flex; flex-direction: column; line-height: 1.05; text-shadow: 0 1px 2px rgb(0 0 0 / .6); }
.ac-year { font-weight: 700; font-size: 8.5cqi; letter-spacing: .04em; }
.ac-set { font-weight: 500; font-size: 6.5cqi; opacity: .92; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ac-rc {
  position: absolute; z-index: 2; right: 4cqi; top: 4cqi; width: 19cqi; height: 21cqi; display: grid; place-items: center;
  background: linear-gradient(180deg, #ffe27a, #e0a826); color: #3a2400; font: 400 10cqi/1 var(--card-font);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 50% 100%, 0 68%);
}
.ac-badges { position: absolute; z-index: 2; left: 5cqi; top: 24cqi; display: flex; flex-wrap: wrap; gap: 2cqi; }
.ac-badge { font-size: 6cqi; font-weight: 700; letter-spacing: .05em; background: rgb(0 0 0 / .55); padding: 1cqi 2.5cqi; border-radius: 1.5cqi; }
.ac-plate {
  position: absolute; z-index: 2; left: -3cqi; right: -3cqi; bottom: 6cqi; padding: 3cqi 9cqi 3cqi 8cqi;
  background: linear-gradient(90deg, var(--sport-2), var(--sport));
  transform: skewY(-6deg); transform-origin: left bottom;
  box-shadow: 0 -1cqi 0 rgb(255 255 255 / .85), 0 2cqi 4cqi rgb(0 0 0 / .4);
  display: flex; flex-direction: column;
}
.ac-plate > * { transform: skewY(6deg); }
.ac-name { font: 400 15cqi/0.92 var(--card-font); letter-spacing: .02em; text-transform: uppercase; overflow-wrap: anywhere; }
.ac-team { font-size: 6.2cqi; font-weight: 500; opacity: .9; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-num {
  position: absolute; z-index: 3; right: 4cqi; bottom: 3cqi; min-width: 13cqi; height: 13cqi; padding: 0 2cqi; border-radius: 7cqi;
  display: grid; place-items: center; background: #f6f3ea; color: #111; font: 400 8cqi/1 var(--card-font);
}
.ac.sport-hockey { --sport: #1f5fa8; --sport-2: #0b2546; }
.ac.sport-basketball { --sport: #d35a1e; --sport-2: #5e1f06; }
.ac.sport-baseball { --sport: #b3202a; --sport-2: #450a0f; }
.ac.sport-football { --sport: #3d7a2e; --sport-2: #14330d; }
.ac.sport-soccer { --sport: #6a3fb0; --sport-2: #261150; }
.ac.sport-other { --sport: #5a6170; --sport-2: #23262e; }
.ac-back {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqi;
  border: 4.5cqi solid #f6f3ea; background: repeating-linear-gradient(45deg, #e9e3d3 0 3cqi, #ddd5c2 3cqi 6cqi);
  color: #3a3428; font-family: var(--tag-font); text-align: center; padding: 8cqi;
}
.ac-back span { font: 400 11cqi/1 var(--card-font); }
.ac-back small { font-size: 6cqi; }

/* ------------------------------------------------------------------ the tape sticker */

.tape {
  position: absolute; z-index: 5; left: 50%; bottom: -12px; transform: translateX(-50%) rotate(-3deg);
  min-width: 52%; max-width: 96%; padding: 3px 10px 2px; text-align: center; white-space: nowrap;
  font: 400 clamp(.85rem, 1.5vw, 1.1rem)/1.25 var(--marker); color: #141414; letter-spacing: .01em;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .55), transparent 40%),
    repeating-linear-gradient(90deg, rgb(0 0 0 / .015) 0 2px, transparent 2px 5px),
    #f4f1e6;
  clip-path: polygon(0 8%, 3% 0, 6% 10%, 9% 2%, 12% 8%, 88% 6%, 91% 0, 94% 10%, 97% 2%, 100% 8%,
                     100% 92%, 97% 100%, 94% 90%, 91% 98%, 88% 92%, 12% 94%, 9% 100%, 6% 90%, 3% 98%, 0 92%);
  box-shadow: 0 1px 2px rgb(0 0 0 / .35);
  pointer-events: none; opacity: .97;
}
.slot:nth-child(3n) .tape { transform: translateX(-50%) rotate(2deg); }
.slot:nth-child(4n+1) .tape { transform: translateX(-50%) rotate(-1deg); }
.mini .tape { font-size: .62rem; bottom: -8px; padding: 1px 6px; }
.box-grid .tape { font-size: .72rem; bottom: -9px; }
.tape-preview { position: relative; display: inline-block; transform: rotate(-3deg); left: auto; bottom: auto; margin: 10px 0 4px; min-width: 0; padding: 3px 18px 2px; }

/* ------------------------------------------------------------------ case bar */

.case-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.case-bar h1 { font-family: var(--sign-font); font-weight: 400; font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 0; }
.case-bar .meta { color: var(--muted); }
.case-bar .tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { display: inline-block; margin-bottom: 10px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
body.present .banner, body.present .case-bar, body.present footer.site, body.present .back, body.present .arrange-note, body.present .case-note { display: none; }
body.present main { max-width: none; padding: 2vh 2vw; }
.present-exit { display: none; position: fixed; right: 14px; top: 12px; z-index: 60; }
body.present .present-exit { display: inline-flex; }
.case-note { margin: 14px 2px 0; color: var(--muted); font-size: .85rem; }

/* ------------------------------------------------------------------ dialogs */

dialog { width: min(1000px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: #1a2030; color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / .6); }
dialog::backdrop { background: rgb(5 8 15 / .72); }
.dlg-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #1a2030; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 1.1rem; flex: 1; }
.dlg-close { font-size: 1.4rem; line-height: 1; padding: 2px 10px; }
.dlg-body { padding: 16px 18px 22px; }

.item-view { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 26px; }
@media (max-width: 760px) { .item-view { grid-template-columns: 1fr; } }
.item-stage { display: flex; flex-direction: column; gap: 12px; }
.item-stage .stage { position: relative; width: min(100%, 320px); margin: 0 auto 10px; }
.item-stage .stage .holder.memo { width: 100%; }
.zoomable { cursor: zoom-in; }
.flip-row { display: flex; gap: 6px; justify-content: center; }
.photo-tools { font-size: .85rem; display: grid; gap: 8px; }
.photo-tools .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.credit { font-size: .76rem; color: var(--muted); overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #33405a; }
.chip.rc { background: #ffd23f; color: #3a2a00; }
.chip.auto { background: #2f6fe0; }
.block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.block h3 { margin: 0 0 8px; font-size: .95rem; }
.sticker-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.review-box { padding: 10px 12px; border-radius: 8px; background: #2a2410; border: 1px solid #5c4a14; color: #fde68a; font-size: .88rem; }

.zoom { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgb(0 0 0 / .88); cursor: zoom-out; padding: 2vh 2vw; }
.zoom img { max-width: 96vw; max-height: 96vh; object-fit: contain; box-shadow: 0 20px 60px rgb(0 0 0 / .8); }

.add-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.add-search input[type="search"] { flex: 1 1 260px; margin: 0; font-size: 1.05rem; padding: 10px 12px; }
.result-group h3 { font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }
.results { display: grid; gap: 6px; }
.result { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--panel); border: 1px solid transparent; text-align: left; color: inherit; font: inherit; cursor: pointer; width: 100%; }
.result:hover, .result:focus-visible { border-color: var(--accent); }
.result .thumb { width: 48px; }
.result .sub { color: var(--muted); font-size: .82rem; }
.custom-cta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--panel); }
.custom-cta p { margin: 0; flex: 1 1 260px; color: var(--muted); font-size: .88rem; }

/* ------------------------------------------------------------------ settings and admin */

.settings { max-width: 820px; }
.settings h1, .admin h1 { font-family: var(--sign-font); font-weight: 400; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px 4px; }
.status-line { margin-left: 10px; color: var(--ok); }
.queue { display: grid; gap: 14px; }
.queue-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px; border-radius: 12px; background: var(--panel); }
.queue-item dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 6px 0; font-size: .88rem; }
.queue-item dt { color: var(--muted); }
.queue-item dd { margin: 0; }
.athlete-rows { display: grid; gap: 8px; }
.athlete-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--panel); }
.athlete-row img, .athlete-row .noimg { width: 56px; height: 70px; object-fit: cover; border-radius: 4px; background: #111; }
.athlete-row form { display: flex; gap: 6px; flex-wrap: wrap; }
.athlete-row input { width: 240px; margin: 0; }

/* ------------------------------------------------------------------ electronic cards (Series One) */

.ec { border-style: solid; border-color: #f6f3ea; }
.ec.par-silver { border-color: #c9ced6; background-color: #6f7783; }
.ec.par-silver::before { background: linear-gradient(120deg, transparent 20%, rgb(255 255 255 / .35) 40%, rgb(200 220 255 / .2) 50%, transparent 65%); }
.ec.par-gold { border-color: #d9b45a; }
.ec.par-gold::before { background: linear-gradient(120deg, transparent 20%, rgb(255 230 150 / .38) 42%, transparent 62%); }
.ec.par-red { border-color: #c1272d; }
.ec.par-red::before { background: linear-gradient(120deg, transparent 25%, rgb(255 160 160 / .3) 45%, transparent 62%); }
.ec.par-black { border-color: #0b0b0d; box-shadow: inset 0 0 0 1cqi #d9b45a; }
.ec.par-black::before { background: linear-gradient(120deg, transparent 25%, rgb(255 215 120 / .28) 45%, transparent 62%); }
.ec.par-black .ac-plate { background: linear-gradient(90deg, #000, #222); box-shadow: 0 -1cqi 0 #d9b45a, 0 2cqi 4cqi rgb(0 0 0 / .4); }
.ec.par-gold .ac-plate { box-shadow: 0 -1cqi 0 #f0d48a, 0 2cqi 4cqi rgb(0 0 0 / .4); }
.ec-logo {
  display: inline-grid; place-items: center; width: 12cqi; height: 12cqi; border-radius: 50%; margin-bottom: 1.5cqi;
  background: #ff6a1a; color: #1a0d05; font: 400 6.5cqi/1 var(--sign-font); box-shadow: 0 0 0 .8cqi #fff;
}
.ec .ac-top { flex-direction: column; align-items: flex-start; }
.ec.sub-legend .ac-art img { filter: sepia(.55) contrast(1.05); }
.ec.sub-legend { --sport: #6b5233; --sport-2: #2e2213; }
.ec.sub-insert { --sport: #2a1a5e; --sport-2: #0b0620; }
.ec.sub-insert .ac-art { background: repeating-conic-gradient(from 0deg at 50% 40%, rgb(255 210 80 / .22) 0 6deg, transparent 6deg 18deg); }
.ec-ribbon {
  position: absolute; z-index: 3; left: -10cqi; top: 33cqi; transform: rotate(-35deg); width: 60cqi; text-align: center;
  background: linear-gradient(90deg, #b8913d, #f0d48a, #b8913d); color: #2a1d05; font: 400 6.5cqi/1.5 var(--card-font); letter-spacing: .1em;
}
.ec-ribbon.star { background: linear-gradient(90deg, #ff6a1a, #ffd23f, #ff6a1a); }
.ec-serial {
  position: absolute; z-index: 3; left: 4cqi; bottom: 3cqi; padding: 1cqi 2.5cqi; border-radius: 2cqi;
  background: linear-gradient(180deg, #f0d48a, #b8913d); color: #2a1d05; font: 400 7.5cqi/1 var(--card-font); letter-spacing: .05em;
}
.ec.par-silver .ec-serial { background: linear-gradient(180deg, #f2f4f7, #9aa1ab); }
.ec.par-red .ec-serial { background: linear-gradient(180deg, #ff8a8a, #b01e24); color: #fff; }
/* a card pulled in developer mode: a stamp across the face, like a printer's proof */
.ec-dev {
  position: absolute; z-index: 6; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-18deg);
  padding: 1.5cqi 4cqi; border: .9cqi solid #c0182b; border-radius: 2cqi; background: rgb(255 255 255 / .82);
  color: #c0182b; font: 700 9cqi/1 var(--tag-font); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.chip.dev { background: #c0182b; color: #fff; }
.ec.par-black .ec-serial { background: #000; color: #f0d48a; box-shadow: 0 0 0 .6cqi #d9b45a; }
.ec-back {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3cqi;
  border: 4.5cqi solid #f6f3ea; color: #fff; text-align: center; font-family: var(--tag-font);
  background:
    radial-gradient(circle at 50% 45%, rgb(255 106 26 / .35), transparent 45%),
    repeating-linear-gradient(45deg, #1d2a4a 0 4cqi, #172340 4cqi 8cqi);
}
.ec-back span { display: grid; place-items: center; width: 34cqi; height: 34cqi; border-radius: 50%; background: #ff6a1a; color: #1a0d05; font: 400 16cqi/1 var(--sign-font); box-shadow: 0 0 0 2cqi #fff; }
.ec-back small { font-size: 6cqi; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }

/* Drawn art (cardart.js) fills the picture area of any card without a photo */
.ac-art.drawn { background: none; }
.ac-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ac-art.drawn::after {   /* printed-card grain */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 30%, transparent 40%, rgb(0 0 0 / .28) 100%);
}
.card-face.ref { position: relative; }
.ref-tag {
  position: absolute; left: 4%; top: 3%; padding: 1px 6px; border-radius: 3px; background: rgb(0 0 0 / .65); color: #fff;
  font: 600 .58rem/1.4 var(--tag-font); letter-spacing: .06em; text-transform: uppercase;
}

/* Showcase Stars inserts: gold starburst over the art */
.ec.sub-insert .ac-art::before {
  content: ""; position: absolute; inset: 0; z-index: 1; mix-blend-mode: screen; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 40%, rgb(255 210 80 / .28) 0 6deg, transparent 6deg 18deg);
}

/* ---- special cards: each its own design */
.ec-special {
  margin-top: 1.5cqi; padding: .8cqi 2.5cqi; border-radius: 1.2cqi; background: rgb(0 0 0 / .6); color: #fff;
  font: 400 6.4cqi/1.15 var(--card-font); letter-spacing: .12em; text-transform: uppercase;
}
.ec-special.foil { background: linear-gradient(100deg, #8a6a24, #f6e3a1 35%, #b8913d 55%, #fff1c2 75%, #8a6a24); color: #2a1d05; }

/* Photo Variation (short print): a darker, negative take on the card, the name in outline */
.ec.sub-sp { border-color: #121418; }
.ec.sub-sp .ac-plate { left: 3cqi; right: 18cqi; bottom: 4cqi; padding: 0; background: none; box-shadow: none; transform: none; }
.ec.sub-sp .ac-plate > * { transform: none; }
.ec.sub-sp .ac-name { color: transparent; -webkit-text-stroke: .45cqi #fff; font-size: 16cqi; text-shadow: 0 0 3cqi var(--sport); }
.ec.sub-sp .ac-team { color: var(--sport); filter: brightness(1.6); }
.ec.sub-sp .ac-num { background: var(--sport); color: #fff; }

/* Signature Series: an ivory card, the art in a window, a signature on a sticker strip */
.ec.sub-auto { border-color: #efe6cf; background: linear-gradient(180deg, #f7f0dc, #e8dcbc); }
.ec.sub-auto .ac-art { inset: 3cqi 3cqi 40cqi; border-radius: 1.5cqi; overflow: hidden; box-shadow: 0 0 0 .9cqi #b8913d; }
.ec.sub-auto::before { background: linear-gradient(120deg, transparent 30%, rgb(255 240 200 / .5) 45%, transparent 60%); }
.ec.sub-auto .ac-top { top: 5cqi; }
.ec.sub-auto .ac-plate { bottom: 27cqi; left: 3cqi; right: 3cqi; transform: none; padding: 1.5cqi 4cqi; box-shadow: none;
  background: linear-gradient(90deg, var(--sport-2), var(--sport)); }
.ec.sub-auto .ac-plate > * { transform: none; }
.ec.sub-auto .ac-name { font-size: 10cqi; }
.ec-sig {
  position: absolute; z-index: 2; left: 6cqi; right: 6cqi; bottom: 6cqi; height: 19cqi; border-radius: 1cqi;
  background: #fffdf6; box-shadow: inset 0 0 0 .5cqi #d8c99e; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: 4cqi;
}
.ec-sig .sig { font: 400 11cqi/1 var(--marker); color: #1b3fa0; transform: rotate(-6deg); white-space: nowrap; max-width: 92%; overflow: hidden; }
.ec-sig small { position: absolute; bottom: 1cqi; font: 500 3.6cqi/1 var(--tag-font); color: #8a7a55; letter-spacing: .05em; text-transform: uppercase; }
.ec.sub-auto .ec-serial { left: auto; right: 4cqi; bottom: auto; top: 27cqi; }
.ec.sub-auto .ac-num { bottom: 27.5cqi; right: 4cqi; }

/* Showcase Patch: carbon frame, a swatch of jersey in the team's colours */
.ec.sub-patch { border-color: #1b1d22; background: repeating-linear-gradient(45deg, #1b1d22 0 1.2cqi, #24272e 1.2cqi 2.4cqi); }
.ec.sub-patch .ac-art { inset: 0 0 30cqi; }
.ec-patch {
  position: absolute; z-index: 3; right: 5cqi; top: 48cqi; width: 38cqi; height: 29cqi; border-radius: 3cqi;
  padding: 1.6cqi; background: linear-gradient(145deg, #d9dde3, #7d848f); box-shadow: 0 1cqi 2cqi rgb(0 0 0 / .5);
}
.ec-patch i {
  display: block; width: 100%; height: 100%; border-radius: 2cqi;
  background:
    linear-gradient(180deg, transparent 38%, var(--team-accent) 38% 52%, var(--sport-2) 52% 62%, transparent 62%),
    repeating-linear-gradient(90deg, rgb(255 255 255 / .1) 0 .5cqi, transparent .5cqi 1.2cqi),
    repeating-linear-gradient(0deg, rgb(0 0 0 / .15) 0 .5cqi, transparent .5cqi 1.2cqi),
    var(--sport);
  box-shadow: inset 0 0 0 .6cqi rgb(255 255 255 / .25), inset 0 0 3cqi rgb(0 0 0 / .5);
  outline: .5cqi dashed rgb(255 255 255 / .5); outline-offset: -1.6cqi;
}
.ec.sub-patch .ec-serial { left: auto; right: 5cqi; bottom: auto; top: 80cqi; z-index: 3; }

/* The Grail 1/1: black and gold, holographic foil that moves */
.ec.sub-grail { border-color: #0b0b0d; box-shadow: inset 0 0 0 1.4cqi #d9b45a, inset 0 0 0 2.2cqi #0b0b0d, inset 0 0 0 2.8cqi #f0d48a; }
.ec.sub-grail .ac-plate { background: linear-gradient(90deg, #000, #1d1a12); box-shadow: 0 -1cqi 0 #d9b45a, 0 2cqi 4cqi rgb(0 0 0 / .5); }
.ec.sub-grail .ac-name { color: #f6e3a1; }
.ec.sub-grail .ec-serial { background: #000; color: #f0d48a; box-shadow: 0 0 0 .6cqi #d9b45a; font-size: 10cqi; }
.ec-holo {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; mix-blend-mode: color-dodge; opacity: .45;
  background: linear-gradient(115deg, transparent 20%, #ff5ea8 32%, #ffe45e 40%, #5effa1 48%, #5ec8ff 56%, #b45eff 64%, transparent 76%);
  background-size: 250% 250%; animation: holo 6s ease-in-out infinite alternate;
}
@keyframes holo { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@media (prefers-reduced-motion: reduce) { .ec-holo { animation: none; } }

/* HSG: Hobby Showcase Grading's premium slab */
.hsg {
  padding: 4% 6% 7%; border-radius: 8px;
  background: linear-gradient(160deg, rgb(255 255 255 / .34), rgb(255 255 255 / .1) 35%, rgb(255 255 255 / .2));
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / .5), inset 0 0 0 5px rgb(217 180 90 / .55), 0 10px 20px rgb(0 0 0 / .6);
}
.hsg-label {
  container-type: inline-size; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2% 4%;
  margin-bottom: 7%; padding: 5%; border-radius: 2px; background: linear-gradient(180deg, #17181c, #050506); color: #f0d48a;
  border-top: 3px solid #d9b45a; font-family: var(--tag-font); line-height: 1.1;
}
.hsg-mark { font: 400 12cqi/1 var(--sign-font); color: #ff6a1a; }
.hsg-text { font-size: 6cqi; color: #e8d9b0; overflow: hidden; }
.hsg-text b { color: #fff; font-weight: 700; }
.hsg-grade { display: flex; flex-direction: column; align-items: center; }
.hsg-grade b { font: 400 20cqi/0.9 var(--card-font); color: #fff; }
.hsg-grade small { font-size: 5.5cqi; letter-spacing: .06em; text-transform: uppercase; }
.hsg-subs, .hsg-cert { grid-column: 1 / -1; font-size: 5.5cqi; letter-spacing: .05em; color: #d9c690; }
.hsg-cert { opacity: .75; }
.hsg.pristine .hsg-label { background: linear-gradient(180deg, #f0d48a, #b8913d); color: #1a1205; }
.hsg.pristine .hsg-grade b, .hsg.pristine .hsg-text b, .hsg.pristine .hsg-text, .hsg.pristine .hsg-subs { color: #1a1205; }

/* ------------------------------------------------------------------ packs */

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.shop-item { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; padding: 16px; border-radius: 12px; background: var(--panel); }
.shop-item p { margin: 0; color: var(--muted); font-size: .85rem; }
.pack {
  --sport: #1f5fa8; --sport-2: #0b2546;
  position: relative; width: 150px; aspect-ratio: 5 / 8; border-radius: 6px; overflow: hidden;
  background:
    linear-gradient(115deg, transparent 30%, rgb(255 255 255 / .35) 45%, transparent 60%),
    linear-gradient(170deg, var(--sport), var(--sport-2));
  box-shadow: 0 14px 24px rgb(0 0 0 / .55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; text-align: center;
}
.pack::before, .pack::after {   /* crimped foil ends */
  content: ""; position: absolute; left: 0; right: 0; height: 12px;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / .55) 0 3px, rgb(0 0 0 / .25) 3px 6px);
}
.pack::before { top: 0; } .pack::after { bottom: 0; }
.pack .ec-logo { width: 46px; height: 46px; font-size: 20px; box-shadow: 0 0 0 3px #fff; }
.pack strong { font: 400 1.35rem/1 var(--card-font); letter-spacing: .04em; }
.pack small { font: 600 .7rem/1.2 var(--tag-font); letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.pack.sport-basketball { --sport: #d35a1e; --sport-2: #5e1f06; } .pack.sport-baseball { --sport: #b3202a; --sport-2: #450a0f; }
.pack.sport-football { --sport: #3d7a2e; --sport-2: #14330d; } .pack.sport-soccer { --sport: #6a3fb0; --sport-2: #261150; }
.rip-stage { display: grid; place-items: center; gap: 18px; min-height: 360px; }
.rip-stage .pack { width: 190px; cursor: pointer; transition: transform .25s ease; }
.rip-stage .pack:hover { transform: rotate(-2deg) scale(1.03); }
.rip-stage .pack.ripping { animation: rip .55s ease-in forwards; }
@keyframes rip { 50% { transform: rotate(4deg) scale(1.06); } 100% { transform: translateY(-40px) scale(.9); opacity: 0; } }
.pulls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 16px; width: 100%; }
@media (max-width: 760px) { .pulls { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pull { perspective: 900px; }
.pull .flipper { position: relative; transition: transform .6s cubic-bezier(.2, .7, .3, 1); transform-style: preserve-3d; cursor: pointer; }
.pull.shown .flipper { transform: rotateY(180deg); cursor: default; }
.pull .side { backface-visibility: hidden; }
.pull .side-front { position: absolute; inset: 0; transform: rotateY(180deg); }
.pull .caption { margin-top: 8px; font-size: .8rem; color: var(--muted); text-align: center; min-height: 2.4em; }
.pull.hit .caption { color: #ffd98a; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .pull .flipper, .rip-stage .pack { transition: none; animation: none !important; } }

/* ------------------------------------------------------------------ sets and grading pages */

.set-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.set-card { padding: 16px; border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.set-card h2 { margin: 0; font-size: 1.1rem; }
.meter { height: 10px; border-radius: 999px; background: #151a26; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffd23f); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.checklist li { position: relative; }
.checklist li.missing .card-face { filter: grayscale(1) brightness(.35); }
.checklist li .count { position: absolute; right: -6px; top: -6px; z-index: 5; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 .78rem/1 var(--tag-font); }
.checklist li .cap { margin-top: 5px; font-size: .75rem; color: var(--muted); }
.reward-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.rules table { border-collapse: collapse; margin: 8px 0 18px; min-width: min(100%, 420px); }
.rules th, .rules td { text-align: left; padding: 5px 10px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.rules th { color: var(--muted); font-weight: 600; }
.rules td.num, .rules th.num { font-variant-numeric: tabular-nums; text-align: right; }
.rules .formula { padding: 12px 16px; border-radius: 10px; background: var(--panel); }
.rules .formula ol { margin: 6px 0 0; padding-left: 20px; }
.e-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grade-cta { padding: 12px 14px; border-radius: 10px; background: #1d2433; border: 1px solid var(--line); }
.subgrades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.subgrades div { padding: 8px; border-radius: 8px; background: var(--panel); }
.subgrades b { display: block; font: 400 1.6rem/1 var(--card-font); }
.subgrades small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }

/* ------------------------------------------------------------------ signing in, account */

.auth-wrap { display: grid; place-items: start center; padding-top: 4vh; }
.auth-card { width: min(100%, 520px); padding: 22px 24px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.auth-card h1 { font-family: var(--sign-font); font-weight: 400; font-size: 1.6rem; margin: 0 0 10px; }
.auth-card h2 { font-size: 1.05rem; margin: 22px 0 4px; }
.auth-error { color: var(--danger); min-height: 1.2em; }
.session-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.session-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: #1d2433; }

/* ------------------------------------------------------------------ market and trades */

.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 700 .75rem/1 var(--tag-font); margin-left: 4px; }
.seller { position: absolute; left: 0; right: 0; bottom: -34px; text-align: center; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#market-grid { row-gap: 56px; }
.trade-list { display: grid; gap: 14px; }
.trade { padding: 14px; border-radius: 12px; background: var(--panel); display: grid; gap: 10px; }
.trade-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .trade-sides { grid-template-columns: 1fr; } }
.trade-side h3 { margin: 0 0 8px; font-size: .9rem; color: var(--muted); }
.trade-arrow { align-self: center; font-size: 1.6rem; color: var(--muted); }
.mini-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-row .pickable { width: 92px; position: relative; cursor: pointer; border: 2px solid transparent; border-radius: 8px; padding: 2px; background: none; color: inherit; }
.mini-row .pickable[aria-pressed="true"] { border-color: var(--accent); background: rgb(255 106 26 / .12); }
.mini-row .pickable small { display: block; font-size: .68rem; color: var(--muted); text-align: center; margin-top: 3px; line-height: 1.2; }
.mini-row .static { width: 92px; }
.builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .builder-grid { grid-template-columns: 1fr; } }
.builder-col { padding: 12px; border-radius: 12px; background: var(--panel); }
.builder-col h3 { margin: 0 0 8px; }
.builder-col .mini-row { max-height: 420px; overflow: auto; }

/* ------------------------------------------------------------------ all cards */

.set-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.set-tabs [aria-selected="true"] { background: var(--ink); color: #111; }
.filters .btn { border-radius: 999px; }
.special-row { margin-top: 8px; }
.special-row .section-title { margin-top: 26px; }
.checklist.big { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-width: 240px; }
.checklist li.gone .card-face { filter: grayscale(.8) brightness(.55); }
.checklist .cap b { color: var(--ink); }
.checklist.parallels { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

/* ------------------------------------------------------------------ verifying a card */

.verify-box .steps { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.code-chip {
  display: inline-block; padding: 2px 10px; border-radius: 6px; background: #f4f1e6; color: #141414;
  font: 700 1.05rem/1.4 ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace; letter-spacing: .08em;
}
.share-check { margin-top: 8px; font-size: .85rem; }
.verify-queue, .ref-queue { display: grid; gap: 14px; }
.verify-card { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: var(--radius); background: var(--panel); }
.verify-card img.proof { width: 100%; border-radius: 6px; cursor: zoom-in; background: #111; }
.verify-card .warn { color: var(--warn); }
@media (max-width: 640px) { .verify-card { grid-template-columns: 1fr; } }
.ref-card { display: grid; grid-template-columns: 120px 120px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px; border-radius: var(--radius); background: var(--panel); }
.ref-card img { width: 100%; border-radius: 4px; }
.ref-card .none { aspect-ratio: 5 / 7; display: grid; place-items: center; border-radius: 4px; background: #111; color: var(--muted); font-size: .75rem; text-align: center; padding: 6px; }
.tables-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.tables-row table { flex: 1 1 240px; max-width: 400px; }

/* ------------------------------------------------------------------ landing page */

.landing { display: grid; gap: 34px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; padding-top: 10px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.eyebrow { margin: 0 0 6px; color: var(--accent); font: 600 .8rem/1 var(--tag-font); letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { margin: 0 0 14px; font: 400 clamp(2rem, 5vw, 3.4rem)/1.02 var(--sign-font); }
.lede { font-size: 1.08rem; color: #d5dbe6; max-width: 56ch; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.cta .btn { padding: 10px 18px; font-size: 1rem; }
.hero-case .case-grid { gap: 26px 14px; }
.hero-case .slot:nth-child(2) .holder { transform: translateY(-4px); }
.two-cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.two-cases article { padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.two-cases h2 { margin: 0 0 4px; font: 400 1.2rem/1.2 var(--sign-font); }
.two-cases ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.how-steps { list-style: none; counter-reset: step; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.how-steps li { counter-increment: step; position: relative; padding: 16px 16px 16px 58px; border-radius: var(--radius); background: var(--panel); display: grid; gap: 4px; }
.how-steps li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 400 1rem/1 var(--sign-font); }
.how-steps span, .fair-grid span { color: var(--muted); font-size: .92rem; }
.fair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.fair-grid div { padding: 14px 16px; border-radius: var(--radius); background: var(--panel); display: grid; gap: 4px; }
