/* Monster Vault website. Built into site/site.css by scripts/build-site.ts. */

@font-face { font-family: 'Big Shoulders Display'; font-weight: 800; font-style: normal; font-display: swap; src: url('/fonts/big-shoulders-display-800.woff2') format('woff2'); }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; font-style: normal; font-display: swap; src: url('/fonts/big-shoulders-display-900.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/figtree-400.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/figtree-500.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/figtree-600.woff2') format('woff2'); }

:root {
  --night: #07110f;
  --stone: #0f1d1a;
  --stone-2: #172925;
  --line: rgba(236, 230, 214, 0.12);
  --bone: #ece6d6;
  --mist: #9fb1ab;
  --gold: #f6c445;
  --brass: #b8913f;
  --display: 'Big Shoulders Display', 'Oswald', 'Arial Narrow', sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --common: #b7c0ca;
  --uncommon: #3fdc8a;
  --rare: #4ea3ff;
  --epic: #b56bff;
  --legendary: #ffc23d;
  --unique: #ff4f74;
  --ultra: #41f0ff;
  --mythical: #ffffff;
  --rainbow: conic-gradient(from var(--a, 0deg), #ff4f74, #ffc23d, #f6f05a, #3fdc8a, #41f0ff, #4ea3ff, #b56bff, #ff4f74);
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
@property --a { syntax: '<angle>'; inherits: true; initial-value: 0deg; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font: 400 18px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--gold); color: #1d1503; font-weight: 600; }
.skip:focus { top: 16px; }

h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 0.92; margin: 0; letter-spacing: 0.005em; text-transform: uppercase; }
h2 { font-size: clamp(44px, 6vw, 72px); max-width: 14ch; }
h3 { font-size: 30px; line-height: 1; }
p { margin: 0; }
.lede { font-size: 21px; line-height: 1.5; color: var(--bone); max-width: 34em; }
section { padding-block: clamp(72px, 10vw, 128px); }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { max-width: 36em; color: var(--mist); }
.text-link { color: var(--bone); font-weight: 600; text-underline-offset: 5px; text-decoration-color: var(--brass); text-decoration-thickness: 2px; }
.text-link:hover { text-decoration-color: var(--gold); }
.more { margin-top: 28px; }

/* ---------- Header ---------- */
.top { position: relative; z-index: 5; }
.top.over { position: absolute; inset: 0 0 auto; }
.top .wrap { display: flex; align-items: center; gap: 24px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span { font: 900 26px/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.nav { display: flex; gap: 28px; font-weight: 500; font-size: 16px; }
.nav a { text-decoration: none; color: var(--mist); padding-block: 6px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--bone); }
.nav a[aria-current='page'] { box-shadow: 0 2px 0 var(--gold); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(236, 230, 214, 0.08); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 22px; height: 22px; }
.menu nav { position: absolute; right: 0; top: 52px; min-width: 220px; display: grid; padding: 8px; border-radius: 16px; background: var(--stone-2); box-shadow: 0 0 0 1px var(--line), 0 24px 60px -20px #000; }
.menu nav a { padding: 12px 14px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.menu nav a:hover, .menu nav a[aria-current='page'] { background: rgba(236, 230, 214, 0.07); }
@media (max-width: 820px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* ---------- Cards, drawn like the game's ---------- */
.card {
  container-type: inline-size;
  position: relative; width: 100%; aspect-ratio: 848 / 1264;
  border-radius: 7% / 4.7%; padding: 1.7%;
  background: var(--tier, var(--brass));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 18px 40px -14px rgba(0, 0, 0, 0.9), 0 0 26px -8px var(--tier, transparent);
  color: #fff;
}
.card.t-mythical { background: var(--rainbow); }
.card .face { position: relative; height: 100%; border-radius: 5.4cqw; overflow: hidden; background: #000; }
.card .face img { width: 100%; height: 100%; object-fit: cover; }
.card .stats::before {
  content: ''; position: absolute; inset: 52% 0 0; z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 25%, transparent);
}
.card .cost, .card .atk, .card .hp {
  position: absolute; z-index: 2; display: grid; place-items: center;
  font: 900 13cqw/1 var(--display);
  width: 22%; aspect-ratio: 1; border-radius: 50%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.card .cost { top: 4%; left: 5%; background: #2f7df0; border-radius: 30%; transform: rotate(45deg); box-shadow: inset 0 0 0 0.6cqw rgba(255, 255, 255, 0.35); }
.card .cost b { transform: rotate(-45deg); }
.card .atk { bottom: 3%; left: 4%; background: radial-gradient(circle at 35% 30%, #ffb648, #e0761b); box-shadow: inset 0 0 0 0.8cqw rgba(255, 255, 255, 0.4); }
.card .hp { bottom: 3%; right: 4%; background: radial-gradient(circle at 35% 30%, #ff6a7a, #c9233a); box-shadow: inset 0 0 0 0.8cqw rgba(255, 255, 255, 0.4); }
.card .plate { position: absolute; z-index: 2; left: 7%; right: 7%; bottom: 17%; text-align: center; }
.card .plate b { display: block; font: 900 11.8cqw/0.95 var(--display); text-transform: uppercase; }
.card .plate span { display: block; margin-top: 2cqw; font-size: 6.2cqw; font-weight: 600; color: var(--tier); letter-spacing: 0.02em; }
.card.t-mythical .plate span { color: #fff; }
.card .stamp {
  position: absolute; z-index: 4; top: 4.5%; right: 5%;
  padding: 1.5cqw 3.5cqw 1cqw; border-radius: 999px;
  background: rgba(0, 0, 0, 0.6); box-shadow: inset 0 0 0 0.8cqw rgba(255, 255, 255, 0.7);
  font: 900 10cqw/1 var(--display);
}

/* ---------- Home: hero ---------- */
.hero { position: relative; padding: 140px 0 96px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: url('/img/scenes/vault.webp') right 12% top 30% / min(720px, 70vw) auto no-repeat;
  opacity: 0.32;
  -webkit-mask-image: radial-gradient(60% 70% at 72% 48%, #000 30%, transparent 75%);
          mask-image: radial-gradient(60% 70% at 72% 48%, #000 30%, transparent 75%);
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(38% 46% at 70% 52%, rgba(246, 196, 69, 0.28), transparent 70%);
}
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 32px;
  grid-template-areas: 'title pack' 'copy pack';
}
.hero h1 { grid-area: title; align-self: end; font-size: clamp(64px, 9vw, 132px); line-height: 0.86; }
.hero h1 span { display: block; white-space: nowrap; }
.hero-copy { grid-area: copy; position: relative; z-index: 1; }
.hero .lede { margin-top: 28px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 36px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px 14px 18px; border-radius: 14px;
  background: var(--gold); color: #1d1503;
  font-weight: 600; font-size: 17px; line-height: 1.2;
  box-shadow: 0 10px 34px -12px rgba(246, 196, 69, 0.7);
}
.store svg { width: 22px; height: 22px; flex: none; }
.store small { display: block; font-size: 13px; font-weight: 500; opacity: 0.75; }
.promise { margin-top: 22px; font-size: 15px; color: var(--mist); }

.pack { grid-area: pack; align-self: center; position: relative; height: 470px; margin: 0; }
.stage { position: absolute; left: var(--cx, 55%); top: 50%; width: 0; height: 0; transform: scale(var(--s, 1)); }
.slot {
  --w: 176px;
  position: absolute; width: var(--w);
  left: calc(var(--w) / -2); top: calc(var(--w) * -0.745);
  transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--k, 1));
  animation: fan 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
  animation-delay: calc(0.35s + var(--i) * 0.07s);
}
@keyframes fan {
  from { transform: translate(0, 70px) rotate(0deg) scale(0.92); opacity: 0; }
  30% { opacity: 1; }
}
.slot:nth-child(1) { --i: 0; --x: -222px; --y: 44px; --r: -21deg; }
.slot:nth-child(2) { --i: 1; --x: -114px; --y: 8px; --r: -10deg; }
.slot:nth-child(3) { --i: 2; --x: 114px; --y: 8px; --r: 10deg; }
.slot:nth-child(4) { --i: 3; --x: 222px; --y: 44px; --r: 21deg; }
.slot:nth-child(5) { --i: 4; --x: 0px; --y: -14px; --r: 0deg; --k: 1.16; z-index: 2; }
.flip { position: relative; width: 100%; aspect-ratio: 848 / 1264; transform-style: preserve-3d; animation: flip 0.75s cubic-bezier(0.3, 0.7, 0.2, 1) 1.55s both; }
@keyframes flip { from { transform: rotateY(180deg); } to { transform: rotateY(0deg); } }
.flip > * { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .back { transform: rotateY(180deg); border-radius: 12px; padding: 3px; background: linear-gradient(160deg, #ffe08a, #a87a22); }
.flip .back img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.foil {
  animation: rim 2.4s linear 2.3s 1 both;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 26px 60px -16px rgba(0, 0, 0, 0.95), 0 0 48px -4px rgba(180, 160, 255, 0.55);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease-out;
}
@keyframes rim { to { --a: 360deg; } }
.foil .face::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 46%, transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 79, 116, 0.35) 0 6%, rgba(255, 194, 61, 0.3) 6% 12%, rgba(63, 220, 138, 0.3) 12% 18%, rgba(65, 240, 255, 0.35) 18% 24%, rgba(181, 107, 255, 0.35) 24% 30%);
  background-size: 260% 260%, 220% 220%;
  background-position: var(--sx, 120%) 0, var(--sx, 120%) 0;
  mix-blend-mode: color-dodge; opacity: 0.55;
  animation: sheen 1.6s ease-in-out 2.25s 1 backwards;
}
@keyframes sheen { from { background-position: 120% 0, 120% 0; } to { background-position: -20% 0, -20% 0; } }
.flare {
  position: absolute; left: var(--cx, 55%); top: 50%; width: 520px; height: 520px; margin: -280px 0 0 -260px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 236, 170, 0.75), rgba(246, 196, 69, 0.18) 38%, transparent 66%);
  opacity: 0; animation: flare 1.4s ease-out 2.05s both;
}
@keyframes flare { 0% { opacity: 0; transform: scale(0.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.25); } }
.pack figcaption { position: absolute; left: 0; right: 0; bottom: -6px; text-align: center; font-size: 15px; color: var(--mist); }
.pack figcaption b { color: var(--bone); font-weight: 600; }
@media (min-width: 981px) and (max-width: 1240px) { .pack { --s: 0.8; } }
@media (max-width: 980px) {
  .hero { padding-top: 112px; }
  .hero .wrap { grid-template-columns: 1fr; grid-template-areas: 'title' 'pack' 'copy'; }
  .hero::before { background-position: center 22%; -webkit-mask-image: radial-gradient(70% 30% at 50% 36%, #000 30%, transparent 75%); mask-image: radial-gradient(70% 30% at 50% 36%, #000 30%, transparent 75%); }
  .hero::after { background: radial-gradient(60% 22% at 50% 38%, rgba(246, 196, 69, 0.26), transparent 70%); }
  .pack { --cx: 50%; height: 440px; margin: 8px 0 24px; }
  .hero .lede { margin-top: 0; }
}
@media (max-width: 560px) {
  .pack { height: 310px; --s: 0.6; }
  .pack figcaption { bottom: -18px; }
}
@media (prefers-reduced-motion: reduce) {
  .slot, .flip, .foil, .foil .face::after, .flare { animation: none; }
  .foil .face::after { background-position: 40% 0, 40% 0; }
}

/* ---------- Home: rarities ---------- */
.rarity { background: linear-gradient(var(--night), var(--stone) 18%, var(--stone) 82%, var(--night)); }
.rarity .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.rarity .section-head { margin: 0; position: sticky; top: 40px; }
.ladder { width: 100%; border-collapse: collapse; font-size: 16px; }
.ladder th { text-align: left; font-weight: 500; font-size: 14px; color: var(--mist); padding: 0 0 14px; }
.ladder th:last-child, .ladder td:last-child { text-align: right; }
.ladder td { padding: 15px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.ladder .tier { display: flex; align-items: center; gap: 14px; font: 900 26px/1 var(--display); text-transform: uppercase; width: 200px; }
.gem { display: inline-block; width: 14px; height: 20px; border-radius: 3px; background: var(--t); box-shadow: 0 0 14px -2px var(--t); flex: none; }
.myth .gem, .gem.myth { background: var(--rainbow); box-shadow: 0 0 16px rgba(255, 255, 255, 0.4); }
.ladder .bar { display: flex; align-items: center; gap: 14px; }
.ladder .bar i { display: block; height: 6px; border-radius: 3px; background: var(--t); width: max(3px, calc(var(--p) * 1%)); max-width: 60%; flex: none; }
.ladder tr.myth .bar i { background: var(--rainbow); }
.ladder .bar span { white-space: nowrap; }
.ladder .foils { font-weight: 600; white-space: nowrap; }
.none { color: rgba(159, 177, 171, 0.5); font-weight: 400; }
.note { margin-top: 22px; font-size: 15px; color: var(--mist); }
@media (max-width: 900px) {
  .rarity .wrap { grid-template-columns: 1fr; }
  .rarity .section-head { position: static; }
}
@media (max-width: 560px) {
  .ladder .tier { width: auto; font-size: 22px; }
  .ladder .bar i { display: none; }
  .ladder th:nth-child(2), .ladder td:nth-child(2) { padding-left: 10px; }
  .ladder { font-size: 15px; }
}

/* ---------- Home: tribes ---------- */
.tribes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.tribe .card { --tier: var(--brass); }
.tribe h3 { margin-top: 18px; font-size: 28px; }
.tribe p { margin-top: 8px; font-size: 16px; color: var(--mist); }
.tribe .power { margin-top: 10px; font-size: 14px; color: var(--bone); }
.tribe .power b { color: var(--gold); font-weight: 600; }
@media (max-width: 1080px) { .tribes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; } }
@media (max-width: 560px) {
  .tribes { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); gap: 14px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .tribes::-webkit-scrollbar { display: none; }
  .tribe { flex: 0 0 68%; scroll-snap-align: start; }
}

/* ---------- Home: battles ---------- */
.battles { background: radial-gradient(50% 60% at 20% 50%, rgba(255, 120, 40, 0.12), transparent 70%); }
.battles .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(36px, 7vw, 100px); align-items: center; }
.phone {
  justify-self: center; width: min(340px, 100%);
  padding: 10px; border-radius: 46px; background: #0a0d10;
  box-shadow: 0 0 0 1.5px #2a3236, 0 40px 90px -30px rgba(0, 0, 0, 0.95), 0 0 120px -30px rgba(255, 120, 40, 0.45);
}
.phone img { border-radius: 36px; width: 100%; height: auto; }
.facts { display: grid; gap: 22px; margin-top: 32px; padding: 0; list-style: none; max-width: 34em; }
.facts li { padding-left: 22px; position: relative; color: var(--mist); }
.facts li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--gold); }
.facts b { color: var(--bone); font-weight: 600; }
.ranks { margin-top: 44px; }
.ranks h3 { font-size: 24px; }
.ranks ol { display: flex; align-items: flex-end; gap: 6px; list-style: none; padding: 0; margin: 16px 0 0; }
.ranks li { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(36px + var(--n) * 11px); padding: 10px 8px 8px; border-radius: 8px 8px 3px 3px; background: linear-gradient(to top, var(--stone-2), rgba(23, 41, 37, 0.35)); border-top: 3px solid var(--c); }
.ranks li b { font: 900 18px/1 var(--display); text-transform: uppercase; }
.ranks li span { margin-top: 4px; font-size: 13px; color: var(--mist); }
@media (max-width: 900px) {
  .battles .wrap { grid-template-columns: 1fr; }
  .phone { order: 2; width: min(300px, 80%); }
}
@media (max-width: 560px) {
  .ranks ol { flex-wrap: wrap; }
  .ranks li { flex: 1 1 30%; min-height: 0; }
}

/* ---------- Arenas ---------- */
.arenas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 18px; list-style: none; margin: 0; padding: 0; }
.arena img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 62%; border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.arena h3 { margin-top: 16px; font-size: 26px; }
.arena p { margin-top: 6px; font-size: 16px; color: var(--mist); }
.arena .tip { margin-top: 8px; font-size: 15px; color: var(--bone); }
@media (max-width: 980px) { .arenas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Home: market and fair play ---------- */
.pair-section { padding-top: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); border-top: 1px solid var(--line); padding-top: clamp(48px, 6vw, 72px); }
.pair h2 { font-size: clamp(38px, 4.4vw, 54px); }
.pair p { margin-top: 18px; color: var(--mist); max-width: 30em; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }

/* ---------- Questions ---------- */
.faq .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-weight: 600; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 900 28px/0.8 var(--display); color: var(--gold); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--mist); max-width: 34em; }
@media (max-width: 900px) { .faq .wrap { grid-template-columns: 1fr; } }

/* ---------- Inner pages ---------- */
.page-head { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); isolation: isolate; overflow: hidden; }
.page-head::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(40% 80% at 85% 20%, rgba(246, 196, 69, 0.14), transparent 70%); }
.page-head h1 { font-size: clamp(60px, 9vw, 120px); line-height: 0.86; }
.page-head .lede { margin-top: 24px; color: var(--mist); }
.page-head .meta { margin-top: 16px; font-size: 15px; color: var(--mist); }
.page-body { padding-top: 0; }

/* Long-form text: support, privacy, terms */
.prose { max-width: 42em; font-size: 18px; }
.prose > * + * { margin-top: 18px; }
.prose .lead { font-size: 21px; line-height: 1.5; }
.prose .meta { color: var(--mist); font-size: 15px; }
.prose h2 { font-size: clamp(34px, 4vw, 44px); max-width: none; margin-top: 56px; }
.prose h3 { font: 600 20px/1.3 var(--body); text-transform: none; margin-top: 32px; }
.prose h2 + h3 { margin-top: 24px; }
.prose p, .prose li { color: #cfd6cf; }
.prose strong { color: var(--bone); font-weight: 600; }
.prose a { color: var(--bone); text-decoration-color: var(--brass); text-underline-offset: 3px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose .contact { border-radius: 16px; padding: 22px 24px; background: var(--stone-2); box-shadow: inset 0 0 0 1px var(--line); }
.prose .contact .meta { margin-top: 8px; }

/* Data tables */
.data { width: 100%; border-collapse: collapse; font-size: 16px; }
.data th, .data td { text-align: left; padding: 14px 16px 14px 0; border-top: 1px solid var(--line); vertical-align: top; }
.data thead th { border-top: 0; padding-top: 0; font-weight: 500; font-size: 14px; color: var(--mist); }
.data td { color: #cfd6cf; }
.data td:first-child, .data th[scope='row'] { color: var(--bone); font-weight: 600; white-space: nowrap; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.data .name { display: inline-flex; align-items: center; gap: 12px; font: 900 22px/1 var(--display); text-transform: uppercase; }
.table-scroll { overflow-x: auto; }
@media (max-width: 640px) { .data { font-size: 15px; } .data th, .data td { padding-right: 12px; } }

/* How to play */
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.toc { position: sticky; top: 24px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: none; }
.toc a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--mist); font-weight: 500; font-size: 16px; }
.toc a:hover { color: var(--bone); background: rgba(236, 230, 214, 0.06); }
.chapter { padding-block: 0 72px; scroll-margin-top: 24px; }
.chapter + .chapter { padding-top: 56px; border-top: 1px solid var(--line); }
.chapter > h2 { font-size: clamp(40px, 5vw, 56px); max-width: none; }
.chapter > p, .chapter > ul { margin-top: 18px; max-width: 40em; color: #cfd6cf; }
.chapter > ul { padding-left: 22px; }
.chapter > ul li + li { margin-top: 10px; }
.chapter > .data, .chapter > .table-scroll { margin-top: 28px; }
.chapter b { color: var(--bone); font-weight: 600; }
.chapter .arenas { margin-top: 32px; grid-template-columns: 1fr; gap: 28px; }
.chapter .arena { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 40em; }
.chapter .arena img { aspect-ratio: 3 / 4; border-radius: 10px; }
.chapter .arena h3 { margin-top: 2px; }
.chapter .arena p { font-size: 17px; color: #cfd6cf; }
.chapter .arena .tip { color: var(--mist); font-size: 16px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--c); margin-right: 10px; vertical-align: 0; }
@media (max-width: 900px) {
  .guide { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { padding: 8px 12px; background: rgba(236, 230, 214, 0.06); font-size: 15px; }
  .chapter .arena { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
}

/* ---------- Cards page ---------- */
.controls {
  position: sticky; top: 0; z-index: 4;
  padding: 14px 0; margin-bottom: 28px;
  background: rgba(7, 17, 15, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.controls .wrap { display: grid; gap: 12px; }
.control-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.search { flex: 1 1 260px; position: relative; }
.search input {
  width: 100%; padding: 12px 16px 12px 44px; border-radius: 12px; border: 0;
  background: var(--stone-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px;
}
.search input::placeholder { color: var(--mist); }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--mist); pointer-events: none; }
.sort { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--mist); }
.sort select { padding: 11px 14px; border-radius: 12px; border: 0; background: var(--stone-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; color: var(--bone); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(236, 230, 214, 0.06); color: var(--mist); font-size: 15px; font-weight: 500;
}
.chips button:hover { color: var(--bone); }
.chips button[aria-pressed='true'] { background: var(--bone); color: var(--night); }
.chips .gem { width: 9px; height: 13px; border-radius: 2px; box-shadow: none; }
.count { font-size: 15px; color: var(--mist); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 22px 16px; }
.grid li[hidden] { display: none; }
.card-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; transition: transform 0.15s ease-out; }
.card-btn:hover { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .card-btn { transition: none; } .card-btn:hover { transform: none; } }
.empty { padding: 48px 0; color: var(--mist); }
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .sort { width: 100%; justify-content: space-between; }
  .sort select { flex: 1; }
}

/* Card details */
.detail { width: min(880px, 100vw - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 24px; background: var(--stone); color: var(--bone); box-shadow: 0 0 0 1px var(--line), 0 40px 120px -20px #000; overflow: auto; }
.detail::backdrop { background: rgba(3, 7, 6, 0.78); backdrop-filter: blur(4px); }
.detail-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; padding: 36px; position: relative; }
.detail .d-card .card { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 70px -20px #000, 0 0 60px -10px var(--tier, transparent); }
.detail .d-kind { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--mist); font-size: 15px; }
.detail h2 { margin-top: 10px; font-size: clamp(44px, 6vw, 64px); max-width: none; }
.d-stats { display: flex; gap: 10px; margin: 24px 0 0; }
.d-stats div { flex: 1; padding: 12px 14px; border-radius: 12px; background: var(--stone-2); }
.d-stats dt { font-size: 13px; color: var(--mist); }
.d-stats dd { margin: 2px 0 0; font: 900 32px/1 var(--display); }
.d-text { margin-top: 24px; font-size: 19px; }
.d-text:empty { display: none; }
.d-flavor { margin: 20px 0 0; padding-left: 16px; border-left: 3px solid var(--brass); color: var(--mist); font-style: italic; }
.d-move, .d-foil { margin-top: 16px; font-size: 15px; color: var(--mist); }
.d-move b, .d-foil b { color: var(--bone); font-weight: 600; }
.d-foil:empty { display: none; }
.d-nav { display: flex; gap: 10px; margin-top: 28px; }
.d-nav button, .d-close {
  border: 0; cursor: pointer; border-radius: 12px; padding: 11px 16px; font-weight: 600; font-size: 15px;
  background: rgba(236, 230, 214, 0.08); color: var(--bone);
}
.d-nav button:hover, .d-close:hover { background: rgba(236, 230, 214, 0.14); }
.d-close { position: absolute; z-index: 2; top: 16px; right: 16px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
.d-close svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .detail-inner { grid-template-columns: 1fr; padding: 24px 20px; gap: 24px; }
  .detail .d-card { width: min(260px, 70%); margin-inline: auto; }
}

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding-block: 40px 56px; font-size: 15px; color: var(--mist); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
footer .brand img { width: 32px; height: 32px; border-radius: 8px; }
footer .brand span { font-size: 22px; color: var(--bone); }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--bone); }
@media (max-width: 760px) { footer .brand { margin-right: 0; } footer .wrap { flex-direction: column; align-items: flex-start; } }

/* ---------- Not found ---------- */
.lost { min-height: 60vh; display: grid; align-content: center; }
.lost .lede { margin-top: 24px; color: var(--mist); }
.lost .cta-row a { text-decoration: none; }
.button { display: inline-flex; align-items: center; padding: 14px 22px; border-radius: 14px; background: var(--gold); color: #1d1503; font-weight: 600; text-decoration: none; }
.lost h1 { font-size: clamp(60px, 9vw, 120px); line-height: 0.86; }
.chapter > ul.arenas { padding-left: 0; }
.chapter > ul.arenas li + li { margin-top: 0; }

/* ---------- Press ---------- */
.page-head .cta-row { margin-top: 28px; }
.press h2 { font-size: clamp(36px, 4.4vw, 52px); max-width: none; }
.press-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.press-split .facts { margin-top: 24px; }
.facts-list { margin: 24px 0 0; display: grid; }
.facts-list div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts-list div:last-child { border-bottom: 1px solid var(--line); }
.facts-list dt { color: var(--mist); font-size: 15px; }
.facts-list dd { margin: 0; color: var(--bone); overflow-wrap: anywhere; }
.facts-list a { color: var(--bone); text-decoration-color: var(--brass); text-underline-offset: 3px; }
.press-h { margin-top: clamp(64px, 8vw, 96px); }
.press-h3 { font: 600 18px/1.3 var(--body); text-transform: none; margin: 28px 0 14px; color: var(--mist); }
.press-sub { margin-top: 12px; color: var(--mist); }
.copy-grid { display: grid; gap: 16px; margin-top: 24px; max-width: 52em; }
.copy-block { padding: 20px 22px; border-radius: 16px; background: var(--stone-2); box-shadow: inset 0 0 0 1px var(--line); }
.copy-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.copy-head h3 { font: 600 16px/1.3 var(--body); text-transform: none; color: var(--mist); }
.copy-block p { margin-top: 10px; color: var(--bone); }
.copy-btn { border: 0; cursor: pointer; border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 14px; background: rgba(236, 230, 214, 0.08); color: var(--bone); }
.copy-btn:hover { background: rgba(236, 230, 214, 0.14); }
.tiles { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 16px; }
.tiles a { display: block; text-decoration: none; color: var(--mist); font-size: 15px; }
.tiles a:hover { color: var(--bone); }
.tiles img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.tiles span { display: block; margin-top: 10px; }
.tiles.shots { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tiles.cards-art { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.tiles.arenas-art { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.tiles.arenas-art img { aspect-ratio: 3 / 4; object-fit: cover; }
.tiles.logos { grid-template-columns: 2fr 2fr 1fr; align-items: start; }
.tiles.logos a { padding: 0; }
.tiles.logos img { box-shadow: none; border-radius: 0; }
.tiles.logos .on-dark, .tiles.logos .on-light { border-radius: 14px; overflow: hidden; }
.tiles.logos .on-dark img, .tiles.logos .on-light img { padding: 28px 24px; box-sizing: border-box; }
.tiles.logos .on-dark img { background: #07110f; box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; }
.tiles.logos .on-light img { background: #f4f1e8; border-radius: 14px; }
.tiles.logos .icon img { width: 96px; padding: 0; border-radius: 22px; background: none; box-shadow: none; }
.press-contact { margin-top: clamp(64px, 8vw, 96px); padding-top: 48px; border-top: 1px solid var(--line); }
.press-contact p { margin-top: 16px; color: var(--mist); max-width: 36em; }
@media (max-width: 1080px) {
  .tiles.shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles.cards-art, .tiles.arenas-art { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .press-split { grid-template-columns: 1fr; }
  .tiles.logos { grid-template-columns: 1fr; }
  .facts-list div { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tiles.shots, .tiles.cards-art, .tiles.arenas-art { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles.shots.ipad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
