:root {
  --ink: #16112e;
  --ink-2: #241c46;
  --ink-3: #2f2559;
  --line: #43387a;
  --paper: #f4f0ff;
  --muted: #a99ed8;
  --gold: #ffd84a;
  --pop: #ff6bb5;
  --mint: #4be3c1;
  --pumpkin: #ff8a2a;
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M15 0C16 9.5 18.5 12.5 30 15 18.5 17.5 16 20.5 15 30 14 20.5 11.5 17.5 0 15 11.5 12.5 14 9.5 15 0Z'/%3E%3C/svg%3E");
  --holo: linear-gradient(135deg, #ff6bb5, #ffd84a 40%, #4be3c1 70%, #5aa8ff);
  --danger: #ff6b6b;

  --r-common: #b9b2d6;
  --r-uncommon: #4be3c1;
  --r-rare: #5aa8ff;
  --r-epic: #b57bff;
  --r-legendary: #ffd84a;
  --r-mythic: #ff6bb5;

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --radius-s: 8px;
  --radius-m: 14px;
  --top-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--paper); }
body { font: 16px/1.5 var(--body); min-height: 100vh; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- boot & logo ---------- */
#boot { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; background: var(--ink); transition: opacity .25s; }
#boot.gone { opacity: 0; pointer-events: none; }
/* The sparkle is the brand: a four-point "kira" star in the holo gradient used on shiny and mythic cards. */
.logo-mark {
  width: 30px; height: 30px; flex: none; display: inline-block; background: var(--holo);
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat;
}
.logo-mark.big { width: 80px; height: 80px; animation: twinkle 1.1s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(.85) rotate(45deg); opacity: .7; } }
.brand-name { font: 800 1.35rem/1 var(--display); letter-spacing: -0.04em; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; gap: 24px; padding: 0 20px;
  background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--paper); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a, .tabbar a {
  color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.nav a:hover { color: var(--paper); background: var(--ink-2); }
.nav a[aria-current='page'] { color: var(--ink); background: var(--gold); }
.nav .badge, .tabbar .badge { background: var(--pop); color: var(--ink); font-size: .72rem; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.me { display: flex; align-items: center; gap: 10px; }
.coins { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.coin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, var(--gold) 55%, #c9a21a); border: 1px solid #8a6d00; flex: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink-3); display: grid; place-items: center; font-weight: 800; overflow: hidden; border: 2px solid var(--line); flex: none; }
.avatar.premium { border-color: var(--pop); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--paper); font-weight: 700; }

.tabbar { display: none; }
@media (max-width: 900px) {
  .nav { display: none; }
  .brand-name { display: none; }
  .top { justify-content: space-between; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; overflow-x: auto;
    background: var(--ink-2); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    gap: 2px; justify-content: space-between;
  }
  .tabbar a { padding: 8px 10px; font-size: .85rem; }
  .tabbar a[aria-current='page'] { color: var(--ink); background: var(--gold); }
  main { padding-bottom: 90px !important; }
}

main { max-width: 1240px; margin: 0 auto; padding: 32px 20px 64px; outline: none; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  font-weight: 700; text-decoration: none; background: var(--ink-3); color: var(--paper); transition: transform .08s;
}
.btn:hover { background: var(--line); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--gold); color: var(--ink); }
.btn.primary:hover { background: #ffe57d; }
.btn.pink { background: var(--pop); color: var(--ink); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn.oauth { width: 100%; background: var(--paper); color: var(--ink); }
.btn.oauth.discord { background: #5865f2; color: #fff; }
.btn.oauth svg { width: 20px; height: 20px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: .92rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--ink-2); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
textarea { min-height: 96px; resize: vertical; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.error-text { color: var(--danger); font-weight: 700; min-height: 1.5em; }

.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; }
.page-head { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 60ch; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: transparent; cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--muted); }
.chip[aria-pressed='true'] { border-color: var(--gold); color: var(--gold); }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; } }

.card {
  --rc: var(--r-common);
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--paper);
  aspect-ratio: 5 / 7; border-radius: 12px; padding: 6px; background: var(--rc);
}
.card[data-rarity=uncommon] { --rc: var(--r-uncommon); }
.card[data-rarity=rare] { --rc: var(--r-rare); }
.card[data-rarity=epic] { --rc: var(--r-epic); }
.card[data-rarity=legendary] { --rc: var(--r-legendary); }
.card[data-rarity=mythic] { --rc: var(--r-mythic); background: linear-gradient(135deg, #ff6bb5, #ffd84a 35%, #4be3c1 65%, #5aa8ff); }
.card-in {
  flex: 1; display: flex; flex-direction: column; border-radius: 8px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 30%, color-mix(in srgb, var(--rc) 28%, var(--ink-2)), var(--ink) 75%);
}
.card-art { flex: 1; display: grid; place-items: center; padding: 8%; min-height: 0; }
.card-art img { max-height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.card-foot { padding: 6px 8px 8px; background: rgba(10, 6, 25, .55); }
.card-name { font: 700 .95rem/1.15 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.card .qty { position: absolute; top: 12px; right: 12px; background: var(--ink); color: var(--paper); font-weight: 800; font-size: .78rem; padding: 2px 7px; border-radius: 999px; border: 2px solid var(--rc); }
.card.locked { background: var(--ink-3); }
.card.locked .card-art img { filter: brightness(0) opacity(.45); }
.card.locked .card-name { color: var(--muted); }
a.card:hover { transform: translateY(-3px); transition: transform .12s; }
.rarity-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rc, var(--r-common)); margin-right: 5px; vertical-align: 1px; }
.rarity-label { --rc: var(--r-common); display: inline-flex; align-items: center; font-weight: 700; color: var(--rc); }
.rarity-label[data-rarity=uncommon] { --rc: var(--r-uncommon); }
.rarity-label[data-rarity=rare] { --rc: var(--r-rare); }
.rarity-label[data-rarity=epic] { --rc: var(--r-epic); }
.rarity-label[data-rarity=legendary] { --rc: var(--r-legendary); }
.rarity-label[data-rarity=mythic] { --rc: var(--r-mythic); }

/* ---------- booster stage ---------- */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .stage { grid-template-columns: 1fr; } }
.booster-zone { min-height: 560px; display: grid; place-items: center; position: relative; padding: 16px 0 24px; }
.stage-title { text-align: center; margin-bottom: 18px; }
.stage-title h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; }
.stage-title p { color: var(--muted); margin: 6px auto 0; max-width: 48ch; }
.event-chip { display: inline-block; background: var(--pumpkin); color: var(--ink); font-weight: 800; font-size: .8rem; padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }

/* A booster: a foil pouch with crimped seals, the series' colours, a print pattern and its headline characters. */
.pack {
  --c1: #3a2f7a; --c2: #ff6bb5; --w: 270px;
  position: relative; width: var(--w); aspect-ratio: 0.64; padding: 0; border: 0; background: none; color: #fff;
  display: flex; flex-direction: column; cursor: pointer; font: inherit; text-align: left;
  filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .5));
  transition: transform .18s ease;
}
button.pack:not([disabled]):hover { transform: translateY(-6px) rotate(-1.5deg); }
.pack[disabled] { cursor: default; filter: grayscale(.85) brightness(.7) drop-shadow(0 20px 30px rgba(0,0,0,.4)); }
.pack-seal {
  height: 7%; flex: none; position: relative;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 2px, rgba(0,0,0,.12) 2px 5px),
    linear-gradient(180deg, color-mix(in srgb, var(--c1) 70%, #000), var(--c1));
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 10px 51% repeat-x, linear-gradient(#000 0 0) bottom / 100% 50% no-repeat;
          mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 10px 51% repeat-x, linear-gradient(#000 0 0) bottom / 100% 50% no-repeat;
}
.pack-seal.bottom { transform: scaleY(-1); }
.pack-seal.top::after { /* tear line */
  content: ''; position: absolute; left: 6%; right: 6%; bottom: 20%; border-top: 2px dashed rgba(255,255,255,.55);
}
.pack-body {
  flex: 1; position: relative; overflow: hidden; border-radius: 3px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 85%, #fff) 0%, var(--c1) 38%, color-mix(in srgb, var(--c1) 70%, #000) 100%);
}
.pack-pattern { position: absolute; inset: 0; opacity: .32; }
.pack[data-pattern=rays] .pack-pattern { background: repeating-conic-gradient(from 0deg at 50% 62%, var(--c2) 0 7deg, transparent 7deg 15deg); }
.pack[data-pattern=stripes] .pack-pattern { background: repeating-linear-gradient(125deg, var(--c2) 0 12px, transparent 12px 30px); }
.pack[data-pattern=dots] .pack-pattern { background: radial-gradient(var(--c2) 23%, transparent 25%) 0 0 / 18px 18px; }
.pack[data-pattern=checker] .pack-pattern { background: conic-gradient(var(--c2) 25%, transparent 0 50%, var(--c2) 0 75%, transparent 0) 0 0 / 30px 30px; opacity: .45; }
.pack[data-pattern=diamonds] .pack-pattern { background: linear-gradient(135deg, var(--c2) 25%, transparent 25%) -14px 0 / 28px 28px, linear-gradient(225deg, var(--c2) 25%, transparent 25%) -14px 0 / 28px 28px, linear-gradient(315deg, var(--c2) 25%, transparent 25%) 0 0 / 28px 28px, linear-gradient(45deg, var(--c2) 25%, transparent 25%) 0 0 / 28px 28px; opacity: .22; }
.pack[data-pattern=waves] .pack-pattern { background: repeating-radial-gradient(circle at 50% 120%, transparent 0 14px, var(--c2) 14px 20px); opacity: .28; }
.pack[data-pattern=sparkles] .pack-pattern { background: radial-gradient(circle, #fff 1.5px, transparent 2.5px) 0 0 / 22px 22px, radial-gradient(circle, var(--c2) 2.5px, transparent 3.5px) 11px 11px / 22px 22px; opacity: .5; }
.pack[data-pattern=bats] .pack-pattern {
  opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='56'%3E%3Cpath d='M32 22c-2-5-7-6-10-4 1-3 0-5-2-6 0 3-3 5-8 4 4 2 6 6 5 10 3-2 7-2 9 1 2-2 4-3 6-2 2-1 4 0 6 2 2-3 6-3 9-1-1-4 1-8 5-10-5 1-8-1-8-4-2 1-3 3-2 6-3-2-8-1-10 4z' fill='%23ff7a1a' fill-opacity='.8'/%3E%3C/svg%3E") 0 0 / 64px 56px,
    radial-gradient(circle at 78% 18%, #ffe8a3 0 9%, transparent 9.5%);
}
.pack-holo { /* moving foil sheen */
  position: absolute; inset: -40%; pointer-events: none; mix-blend-mode: overlay; opacity: .55;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.75) 47%, rgba(255,255,255,0) 56%);
  transform: translateX(-30%); transition: transform .7s ease;
}
button.pack:not([disabled]):hover .pack-holo { transform: translateX(30%); }
.pack-brand { position: absolute; top: 5%; left: 7%; display: flex; align-items: center; gap: 5px; font: 800 calc(var(--w) * .052) / 1 var(--display); letter-spacing: -0.03em; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.pack-brand .logo-mark { width: 1.1em; height: 1.1em; }
.pack-count { position: absolute; top: 5%; right: 7%; font-weight: 800; font-size: calc(var(--w) * .045); background: rgba(0,0,0,.35); padding: 2px 8px; border-radius: 999px; }
.pack-art { position: absolute; left: 0; right: 0; top: 13%; height: 58%; }
.pack-art img { position: absolute; bottom: 0; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,.45)); }
.pack-art img:nth-child(1) { left: 50%; width: 74%; height: 100%; transform: translateX(-50%); z-index: 2; }
.pack-art img:nth-child(2) { left: -6%; width: 50%; height: 66%; z-index: 1; transform: rotate(-8deg); }
.pack-art img:nth-child(3) { right: -6%; width: 50%; height: 66%; z-index: 1; transform: rotate(8deg); }
/* Anime portraits are rectangular: shown as tilted cards rather than cut-outs. */
.pack[data-art=portrait] .pack-art img { object-fit: cover; border-radius: 6px; border: 3px solid #fff; background: #fff; }
.pack[data-art=portrait] .pack-art img:nth-child(1) { width: 52%; height: 92%; bottom: 2%; }
.pack[data-art=portrait] .pack-art img:nth-child(2) { width: 38%; height: 64%; left: 3%; bottom: 8%; }
.pack[data-art=portrait] .pack-art img:nth-child(3) { width: 38%; height: 64%; right: 3%; bottom: 8%; }
.pack-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14% 7% 7%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--c1) 55%, #000) 45%);
}
.pack-title { font: 800 calc(var(--w) * .105) / .95 var(--display); letter-spacing: -0.03em; text-wrap: balance; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.pack-sub { margin-top: 6px; font-weight: 700; font-size: calc(var(--w) * .046); color: var(--c2); filter: brightness(1.3); }
.pack.mix .pack-body { background: linear-gradient(135deg, #ff6bb5, #8f5cff 35%, #3a7bff 65%, #4be3c1); }

/* opening: the top seal tears off, the pouch drops away */
.pack.tearing .pack-seal.top { animation: tear .4s cubic-bezier(.5, -0.5, .7, 1) forwards; transform-origin: right center; }
.pack.tearing .pack-body, .pack.tearing .pack-seal.bottom { animation: drop .5s .3s ease-in forwards; }
@keyframes tear { to { transform: translate(40px, -70px) rotate(24deg); opacity: 0; } }
@keyframes drop { to { transform: translateY(80px) scale(.9); opacity: 0; } }

.reveal { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; width: 100%; perspective: 1200px; }
.flip { width: clamp(118px, 17vw, 170px); aspect-ratio: 5 / 7; border: 0; padding: 0; background: none; cursor: pointer; position: relative; animation: deal .4s backwards; color: inherit; text-align: left; }
@keyframes deal { from { transform: translateY(-80px) scale(.6); opacity: 0; } }
.flip-inner { position: absolute; inset: 0; transition: transform .55s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; }
.flip.open .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; }
.flip-back {
  border-radius: 12px; border: 3px solid #fff; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #2b2160, #16112e 70%);
}
.flip-back .logo-mark { width: 54px; height: 54px; }
.flip-front { transform: rotateY(180deg); }
.flip-front .card { height: 100%; }
.flip.open[data-rarity=legendary] .card, .flip.open[data-rarity=mythic] .card, .flip.open[data-rarity=epic] .card, .flip.open.shiny .card { box-shadow: 0 0 34px -4px var(--rc); }
.new-flag {
  position: absolute; top: -10px; left: -8px; z-index: 2; background: var(--pop); color: var(--ink); font: 800 .8rem var(--display);
  padding: 3px 9px; border-radius: 10px; transform: rotate(-8deg); opacity: 0; transition: opacity .2s .4s;
}
.flip.open .new-flag { opacity: 1; }
.reveal-actions { width: 100%; display: flex; justify-content: center; gap: 12px; margin-top: 20px; }

.side { display: grid; gap: 16px; }
.charges { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 8px 0 12px; }
.charge { height: 10px; border-radius: 99px; background: var(--ink-3); }
.charge.full { background: var(--holo); }
.countdown { font: 800 2rem var(--display); font-variant-numeric: tabular-nums; }
.odds { width: 100%; border-collapse: collapse; font-size: .9rem; }
.odds td { padding: 4px 0; }
.odds td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* pack shelf */
.shelf { margin-top: 40px; }
.shelf h2 { display: flex; align-items: baseline; gap: 10px; }
.shelf h2 small { font: 400 .95rem var(--body); color: var(--muted); }
.shelf-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; margin-bottom: 32px; }
.shelf-row .pack { --w: 100%; width: 100%; }
.shelf-row .pack .pack-title { font-size: clamp(.95rem, 1.6vw, 1.15rem); }
.shelf-row .pack .pack-sub, .shelf-row .pack .pack-count { font-size: .72rem; }
.shelf-row .pack .pack-brand { font-size: .7rem; }
.shelf-row a.pack { text-decoration: none; }
.shelf-row a.pack[aria-current='true'] { outline: 3px solid var(--gold); outline-offset: 6px; border-radius: 6px; }
@media (max-width: 520px) { .shelf-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- albums ---------- */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.album {
  display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius-m);
  background: var(--ink-2); border: 1px solid var(--line); text-decoration: none; color: var(--paper);
}
.album:hover { border-color: var(--gold); }
.album img { width: 88px; height: 88px; object-fit: contain; }
.album h3 { margin: 0 0 4px; }
.progress { height: 8px; border-radius: 99px; background: var(--ink-3); overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.toolbar input[type=search] { max-width: 280px; }

/* ---------- card page ---------- */
.fiche { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
@media (max-width: 800px) { .fiche { grid-template-columns: 1fr; } .fiche > .card { max-width: 300px; margin: 0 auto; } }
.fiche .card { width: 100%; }
.fiche .card-name { font-size: 1.2rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 16px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; }
.types { display: flex; gap: 6px; }
.type { padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--ink); background: var(--muted); }
.stat-row { display: grid; grid-template-columns: 90px 40px 1fr; gap: 10px; align-items: center; font-size: .9rem; margin-bottom: 6px; }
.stat-row .bar { height: 8px; background: var(--ink-3); border-radius: 99px; overflow: hidden; }
.stat-row .bar span { display: block; height: 100%; background: var(--mint); }
.locked-note { padding: 20px; border: 2px dashed var(--line); border-radius: var(--radius-m); color: var(--muted); }
.quote { font-size: 1.1rem; max-width: 60ch; padding-left: 16px; border-left: 4px solid var(--gold); }

/* ---------- lists / tables ---------- */
.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; padding: 12px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-m); }
.item .thumb { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius-s); background: var(--ink-3); }
.item h3 { margin: 0; font-size: 1rem; }
@media (max-width: 600px) { .item { grid-template-columns: 56px 1fr; } .item .thumb { width: 56px; height: 56px; } .item > :last-child { grid-column: 1 / -1; } }
.status { font-weight: 700; font-size: .85rem; padding: 2px 10px; border-radius: 999px; }
.status.pending { background: var(--ink-3); color: var(--gold); }
.status.approved { background: color-mix(in srgb, var(--mint) 20%, transparent); color: var(--mint); }
.status.rejected { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.price { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; }
.market-card { display: grid; gap: 8px; }

/* ---------- auth ---------- */
.auth { max-width: 420px; margin: 24px auto; }
.auth .logo-mark { width: 44px; height: 44px; margin-bottom: 12px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 20px 0; font-size: .9rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pw-meter { height: 6px; border-radius: 99px; background: var(--ink-3); overflow: hidden; }
.pw-meter span { display: block; height: 100%; transition: width .2s, background .2s; }

/* ---------- create ---------- */
.create { display: grid; grid-template-columns: 1fr 260px; gap: 32px; align-items: start; }
@media (max-width: 800px) { .create { grid-template-columns: 1fr; } }
.drop {
  display: grid; place-items: center; text-align: center; padding: 24px; min-height: 140px; border: 2px dashed var(--line); border-radius: var(--radius-m);
  cursor: pointer; color: var(--muted);
}
.drop.over, .drop:hover { border-color: var(--gold); color: var(--paper); }
.preview-card { position: sticky; top: calc(var(--top-h) + 20px); }

/* ---------- premium ---------- */
.premium-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
@media (max-width: 800px) { .premium-hero { grid-template-columns: 1fr; } }
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.compare td:nth-child(3), .compare th:nth-child(3) { color: var(--pop); font-weight: 800; }
.premium-tag { display: inline-block; background: var(--pop); color: var(--ink); font-weight: 800; font-size: .75rem; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }

/* ---------- leaderboard ---------- */
.board li { display: grid; grid-template-columns: 36px 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.board { list-style: none; padding: 0; margin: 0; counter-reset: rank; }
.board li::before { counter-increment: rank; content: counter(rank); font: 800 1.2rem var(--display); color: var(--muted); text-align: center; }
.board li:nth-child(1)::before { color: var(--gold); }

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(8, 4, 20, .72); display: grid; place-items: center; padding: 16px; }
.modal { width: min(480px, 100%); max-height: 90vh; overflow: auto; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; }
.modal.wide { width: min(760px, 100%); }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
@media (max-width: 900px) { #toasts { bottom: 90px; } }
.toast { background: var(--paper); color: var(--ink); padding: 12px 16px; border-radius: var(--radius-s); font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.error { background: var(--danger); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h2 { color: var(--paper); }
.pager { display: flex; justify-content: center; margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* fixes after review */
.toolbar select, .row select { width: auto; }
.card-art img { width: 100%; height: 100%; }
.btn .price { gap: 4px; }
[hidden] { display: none !important; }

/* ---------- card variants ---------- */
.card.portrait .card-art { padding: 0; }
.card.portrait .card-art img { object-fit: cover; object-position: top center; filter: none; }
.card.shiny .card-in::after, .card[data-rarity=mythic] .card-in::after { /* holo foil */
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 8px; mix-blend-mode: color-dodge; opacity: .35;
  background: linear-gradient(125deg, transparent 20%, #ff6bb5 35%, #ffd84a 45%, #4be3c1 55%, #5aa8ff 65%, transparent 80%) 0 0 / 250% 250%;
  animation: foil 6s linear infinite;
}
.card-in { position: relative; }
@keyframes foil { to { background-position: 250% 250%; } }
.shiny-mark { position: absolute; top: 12px; left: 12px; width: 22px; height: 22px; z-index: 2; filter: drop-shadow(0 0 4px rgba(255,255,255,.8)); }
.card.locked .shiny-mark, .card.locked .card-in::after { display: none; }
.card.locked.portrait .card-art img { filter: brightness(0) opacity(.35); }
.cat-head { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 14px; }
.cat-head h2 { margin: 0; }
.cat-head span { color: var(--muted); }
.album .swatch { width: 88px; height: 88px; border-radius: 12px; overflow: hidden; position: relative; background: linear-gradient(150deg, var(--c1), color-mix(in srgb, var(--c1) 60%, #000)); }
.album .swatch img { width: 100%; height: 100%; object-fit: contain; }
.album .swatch.portrait img { object-fit: cover; object-position: top; }
.related { display: flex; gap: 10px; flex-wrap: wrap; }
.related .card { width: 96px; }
.related .card-name { font-size: .72rem; }
.card-in, .card-foot { min-width: 0; }
.flip-front .card { width: 100%; height: 100%; }
.card-art img[src*="pogo_assets"] { max-width: 78%; max-height: 78%; margin: auto; }
.pack-sub { color: rgba(255,255,255,.75); filter: none; }
.card.portrait .card-in::after { opacity: .18; }
