:root {
  --bg: #0b0a10;
  --panel: rgba(19, 18, 26, 0.9);
  --panel-solid: #15141c;
  --raise: rgba(255, 255, 255, 0.035);
  --raise-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #eeebf3;
  --ink-2: #c9c5d3;
  --muted: #8f8b9c;
  --accent: #7c8cff;
  --accent-ink: #dfe3ff;
  --gold: #f0b257;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(124, 140, 255, 0.35); }

/* the key art behind everything, dimmed like the team board */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(126, 70, 190, 0.28), transparent 60%),
    linear-gradient(180deg, rgba(11, 10, 16, 0.55) 0%, rgba(11, 10, 16, 0.86) 45%, var(--bg) 100%),
    url("assets/keyart-bg.webp") center top / cover no-repeat;
  will-change: transform; /* its own layer: scrolling never repaints it */
}

/* top bar */
.topbar {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { height: 58px; width: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55)); }
.brand-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(10, 9, 14, 0.72);
  white-space: nowrap;
}
.top-links { display: flex; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(18, 17, 24, 0.86);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: rgba(32, 30, 42, 0.85); border-color: rgba(255, 255, 255, 0.22); }
.btn.primary { background: var(--accent-ink); color: #15172b; border-color: transparent; }
.btn.primary:hover { background: #fff; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.shell { max-width: 1240px; margin: 0 auto; padding: 0 24px 40px; }

/* hero */
.hero { padding: 64px 0 30px; }
.hero h1, .hero .lede { max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 12px rgba(240, 178, 87, 0.7); }
.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.lede { margin: 16px 0 0; font-size: 17px; color: var(--ink-2); max-width: 600px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stat {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(16, 15, 22, 0.82);
  border: 1px solid var(--line);
}
.stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 500; }

/* codes */
.codes {
  margin: 0 0 26px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);

  box-shadow: var(--shadow);
  scroll-margin-top: 16px;
}
.codes[hidden] { display: none; }
.codes-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.codes-head .eyebrow { margin-bottom: 8px; }
.codes-head h2 { margin: 0; font-size: 26px; letter-spacing: -0.02em; font-weight: 800; }
.codes-how { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 620px; }
.codes-updated { font-size: 12px; font-weight: 600; color: #8fe0a8; padding: 6px 10px; border-radius: 999px; background: rgba(80, 200, 120, 0.1); border: 1px solid rgba(110, 220, 140, 0.25); white-space: nowrap; }
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.code {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "code code" "reward copy";
  align-items: center;
  gap: 8px 12px;
  padding: 14px 14px 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(240, 178, 87, 0.28);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(240, 178, 87, 0.14), transparent 55%),
    rgba(255, 255, 255, 0.03);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.code:hover { transform: translateY(-2px); border-color: rgba(240, 178, 87, 0.6); }
.code:focus-visible, .star-code:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.code-text { grid-area: code; font-size: 19px; font-weight: 800; letter-spacing: 0.06em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-reward { grid-area: reward; font-size: 13px; font-weight: 700; color: var(--gold); }
.code-copy {
  grid-area: copy;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(10, 9, 14, 0.5);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.code-copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.code-copy .done { display: none; }
.code.copied .code-copy { color: #8fe0a8; border-color: rgba(110, 220, 140, 0.45); }
.code.copied .code-copy .lbl { display: none; }
.code.copied .code-copy .done { display: inline; }
.star { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.star[hidden] { display: none; }
.star-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.star-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.star-head p { margin: 0; font-size: 13px; color: var(--muted); }
.star-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.star-code {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.star-code:hover { background: var(--raise-2); color: var(--ink); border-color: var(--line-2); }
.star-code.copied { color: #8fe0a8; border-color: rgba(110, 220, 140, 0.45); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 16px;
  border-radius: 12px;
  background: #f1f0f6;
  color: #15141c;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  transition: opacity 0.18s, transform 0.18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* header page links (Rolls / Codes) */
.pages { display: flex; padding: 3px; gap: 2px; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(14, 13, 19, 0.86); }
.page-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.page-link:hover { background: var(--raise-2); color: var(--ink); }
.page-link[aria-current="page"] { background: rgba(124, 140, 255, 0.16); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(124, 140, 255, 0.5); }
.page-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.page-link:focus-visible, .group:focus-visible, .promo:focus-visible, .jump:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* hero row: stats + the card pointing at the codes page */
.hero-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 26px; }
.hero-row .stats { margin-top: 0; }
.promo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(240, 178, 87, 0.4);
  background: radial-gradient(130% 160% at 0% 0%, rgba(240, 178, 87, 0.2), transparent 60%), rgba(16, 15, 22, 0.88);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}
.promo[hidden] { display: none; }
.promo:hover { transform: translateY(-2px); border-color: rgba(240, 178, 87, 0.75); }
.promo-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(240, 178, 87, 0.16); color: var(--gold); flex: none; }
.promo-ico svg, .promo-go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.promo-text { display: grid; }
.promo-text b { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.promo-text span { font-size: 12px; color: var(--gold); font-weight: 600; }
.promo-go { color: var(--ink-2); display: grid; }

/* main categories, then their sub-categories */
.browse { scroll-margin-top: 14px; }
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.group {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(16, 15, 22, 0.86);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.group:hover { background: rgba(26, 25, 34, 0.92); border-color: var(--line-2); transform: translateY(-1px); }
.group[aria-pressed="true"] { border-color: rgba(124, 140, 255, 0.6); background: linear-gradient(180deg, rgba(124, 140, 255, 0.16), rgba(124, 140, 255, 0.06)), rgba(16, 15, 22, 0.92); box-shadow: inset 0 -2px 0 rgba(124, 140, 255, 0.85); }
.group-ico { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--raise-2); color: var(--ink-2); }
.group[aria-pressed="true"] .group-ico { background: rgba(124, 140, 255, 0.2); color: var(--accent-ink); }
.group-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.group-text { display: grid; min-width: 0; }
.group-text b { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.group-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(12, 11, 17, 0.9);
}

/* floating way back up to the categories */
.jump {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(22, 21, 30, 0.96);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.jump.show { opacity: 1; transform: none; pointer-events: auto; }
.jump svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* codes page */
.hero-small { padding-bottom: 22px; }
.codes-note { margin: -8px 0 14px; color: var(--muted); font-size: 13px; }
.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tab:hover { background: var(--raise-2); color: var(--ink); }
.tab[aria-selected="true"] {
  color: var(--accent-ink);
  background: rgba(124, 140, 255, 0.14);
  border-color: rgba(124, 140, 255, 0.55);
  box-shadow: inset 0 -2px 0 rgba(124, 140, 255, 0.9);
}
.tab .count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--raise-2);
  padding: 2px 7px;
  border-radius: 999px;
}
.tab[aria-selected="true"] .count { color: var(--accent-ink); background: rgba(124, 140, 255, 0.22); }
.tab:focus-visible, .chip:focus-visible, .card:focus-visible, .seg button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the category panel */
.panel {
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);

  box-shadow: var(--shadow);
}
.panel-head { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: flex-end; }
.panel-title h2 { margin: 0; font-size: 26px; letter-spacing: -0.02em; font-weight: 800; }
.panel-title p { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 560px; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 12px;
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(8, 8, 12, 0.5);
}
.search:focus-within { border-color: rgba(124, 140, 255, 0.7); }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }
kbd {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 1px 6px;
}
.seg { display: flex; padding: 3px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(8, 8, 12, 0.5); }
.seg[hidden] { display: none; }
.seg button {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.seg button[aria-checked="true"] { background: var(--raise-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.select { position: relative; }
.select select {
  appearance: none;
  height: 40px;
  padding: 0 34px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(8, 8, 12, 0.5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.select select option { background: var(--panel-solid); }
.select::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

/* rarity odds bar */
.odds { margin: 22px 0 0; }
.odds-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--raise); gap: 2px; }
.odds-bar i { display: block; min-width: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--raise);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.chip:hover { background: var(--raise-2); }
.chip .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chip .pct { color: var(--muted); font-weight: 600; }
.chip[aria-pressed="true"] { border-color: var(--line-2); background: var(--raise-2); color: var(--ink); }
.chips.filtering .chip[aria-pressed="false"] { opacity: 0.45; }

/* item grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  --tone: #9a9a9a;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: transform 0.18s ease, border-color 0.18s, background 0.18s, box-shadow 0.18s;
  content-visibility: auto;
  contain-intrinsic-size: auto 250px;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tone) 55%, transparent); background: rgba(255, 255, 255, 0.045); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
.art {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 70% at 50% 42%, color-mix(in srgb, var(--tone) 30%, transparent), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.12));
  border-bottom: 1px solid var(--line);
}
.art img { width: 82%; height: 82%; object-fit: contain; transition: transform 0.25s ease; }
.card:hover .art img { transform: scale(1.04); }
.art .ph { width: 44%; height: 44%; border-radius: 50%; background: var(--raise-2); }
.swatch-art { aspect-ratio: 1.6; }
.swatch-dot { width: 46%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.meta { padding: 11px 12px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.name { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; vertical-align: middle; }
.badge::before { content: ""; display: inline-block; vertical-align: 1px; margin-right: 6px; width: 7px; height: 7px; border-radius: 2px; background: var(--tone); box-shadow: 0 0 10px color-mix(in srgb, var(--tone) 70%, transparent); }
.pct { flex: none; font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .badge { min-width: 0; }
.sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.flag {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(10, 9, 14, 0.78);
  border: 1px solid var(--line-2);
  color: var(--gold);
}
.flag.off { color: var(--muted); }

/* text cards (styles, heights, ranks…) */
.tcard { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 132px; align-content: start; }
.tcard .top { display: flex; align-items: center; gap: 10px; }
.tcard .mark { width: 34px; height: 34px; border-radius: 10px; flex: none; background: color-mix(in srgb, var(--tone) 22%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 50%, transparent); display: grid; place-items: center; }
.tcard .mark i { width: 12px; height: 12px; border-radius: 3px; background: var(--tone); }
.tcard .name { font-size: 15px; -webkit-line-clamp: 1; }
.tcard .detail { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }

/* chroma / gradient tiers */
.card.chroma { border-color: transparent; background: linear-gradient(var(--panel-solid), var(--panel-solid)) padding-box, var(--grad) border-box; }
.card.chroma .badge { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card.chroma .badge::before { background: var(--grad); }
@media (prefers-reduced-motion: no-preference) {
  .card.chroma { background-size: 100% 100%, 300% 300%; }
  .card.chroma:hover { animation: shimmer 3s linear infinite; }
}
@keyframes shimmer { to { background-position: 0 0, 300% 0; } }

.empty { text-align: center; color: var(--muted); padding: 40px 0 20px; margin: 0; }

/* group labels in the tab bar */
.tab-label { flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 0 4px 0 2px; }
.select[hidden], .chips[hidden] { display: none; }

/* secret items, empty slots */
.mystery {
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 800;
  color: color-mix(in srgb, var(--tone) 80%, white);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tone) 28%, transparent), rgba(0, 0, 0, 0.25));
  border: 1px dashed color-mix(in srgb, var(--tone) 60%, transparent);
}
.modal-art .mystery { width: 46%; font-size: 72px; }
.empty-slot { background: transparent !important; border: 2px dashed var(--line-2); }

/* hair colour shades */
.shades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; width: 62%; }
.shades i { aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 6px 14px rgba(0, 0, 0, 0.35); }
.modal-art .shades { width: 70%; gap: 10px; }
.swatch-dot.none { background: transparent !important; border: 2px dashed var(--line-2); box-shadow: none; }
.grid.swatches { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* long name lists (surnames) */
.grid.names { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.namecard { padding: 11px 12px; gap: 2px; }
.namecard .name { font-size: 14px; -webkit-line-clamp: 1; }

.tcard-head { min-width: 0; display: grid; gap: 2px; }

/* modal extras */
.facts div.wide { grid-column: 1 / -1; }
.facts dd { overflow-wrap: anywhere; }
.flag.inline { position: static; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.modal-shown { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.modal-shown:empty { display: none; }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[hidden] { display: none; }

/* footer */
.foot { max-width: 1240px; margin: 0 auto; padding: 8px 24px 48px; color: var(--ink-2); font-size: 13px; }
.foot p { margin: 4px 0; }
.muted { color: var(--muted); }

/* item modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-veil { position: absolute; inset: 0; background: rgba(5, 4, 8, 0.8); }
.modal-card {
  --tone: #9a9a9a;
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  border-radius: 18px;
  background: var(--panel-solid);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(10, 9, 14, 0.7); cursor: pointer; display: grid; place-items: center; }
.modal-x svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; fill: none; }
.modal-art { min-height: 300px; display: grid; place-items: center; background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--tone) 34%, transparent), transparent 75%), rgba(255, 255, 255, 0.02); border-right: 1px solid var(--line); }
.modal-art img { width: 86%; height: auto; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.5)); }
.modal-art .swatch-dot { width: 52%; }
.modal-body { padding: 26px 26px 24px; display: grid; gap: 12px; align-content: start; }
.modal-cat { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.modal-body h3 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; padding-right: 30px; }
.modal-rarity { display: flex; align-items: center; gap: 10px; }
.modal-rarity .badge { font-size: 12px; }
.facts { margin: 6px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts div { padding: 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.facts dd small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.modal-note { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.modal-note:empty { display: none; }
.modal-card.chroma .badge { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.modal-card.chroma .badge::before { background: var(--grad); }

@media (max-width: 760px) {
  .topbar { padding: 14px 16px 0; }
  .brand img { height: 42px; }
  .brand-tag { display: none; }
  .top-links .btn span { display: none; }
  .top-links .btn { padding: 0 12px; }
  .shell { padding: 0 16px 32px; }
  .hero { padding: 38px 0 24px; }
  .lede { font-size: 15px; }
  .panel { padding: 16px; border-radius: 14px; }
  .groups { grid-template-columns: 1fr 1fr; gap: 8px; }
  .group { padding: 10px; gap: 10px; }
  .group-ico { width: 32px; height: 32px; border-radius: 9px; }
  .group-text b { font-size: 13.5px; }
  .group-text span { font-size: 11px; white-space: normal; }
  .groups .group:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .subs .tab { height: 34px; padding: 0 11px; font-size: 13px; }
  .page-link { padding: 0 10px; }
  .page-link span { display: none; }
  .promo { flex: 1 1 100%; }
  .jump { right: 12px; bottom: 12px; }
  .codes { padding: 16px; border-radius: 14px; }
  .code-grid { grid-template-columns: 1fr 1fr; }
  .code { padding: 12px; gap: 8px 8px; }
  .code-copy .lbl, .code-copy .done { display: none !important; }
  .code-copy { padding: 0 9px; }
  .code-text { font-size: 13.5px; letter-spacing: 0; }
  .tools { width: 100%; }
  .search { flex: 1 1 100%; min-width: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .grid.cards { grid-template-columns: 1fr; }
  .modal-card { grid-template-columns: 1fr; }
  .modal-art { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .modal-art img { width: 56%; }
  .foot { padding: 8px 16px 40px; }
}
