@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/outfit-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/outfit-500-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/outfit-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/outfit-700-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/syne-600-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/syne-700-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Syne";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/syne-800-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/great-vibes-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/fredoka-700-latin.woff2") format("woff2");
}

:root {
  --bg: #17213f;
  --bg-mid: #202c4d;
  --bg-bottom: #3b4960;
  --panel: #414958;
  --panel-top: #586273;
  --panel-2: #344a82;
  --line: #080a0f;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.86);
  --primary: #f5df68;
  --gold: #f5df68;
  --head-top: #506da8;
  --head-bottom: #344a82;
  --status-top: #638356;
  --status-bottom: #47663d;
  --ink: #05070d;
  --chunk-shadow: 0 7px 0 rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.18);
  --font-body: Arial, Helvetica, sans-serif;
  --font-display: Arial, Helvetica, sans-serif;
  --font-logo: "Fredoka", Arial, Helvetica, sans-serif;
  --logo-shadow:
    3px 0 0 #000,
    -3px 0 0 #000,
    0 3px 0 #000,
    0 -3px 0 #000,
    2px 2px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000;
  --ink-shadow:
    2px 0 0 #000,
    -2px 0 0 #000,
    0 2px 0 #000,
    0 -2px 0 #000,
    2px 2px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000;
  --rarity-common: #6b7280;
  --rarity-uncommon: #4a9a5c;
  --rarity-rare: #3a78c0;
  --rarity-super: #9050d0;
  --rarity-legendary: #d4a017;
  --rarity-legendary-text: var(--gold);
  --rarity-mythic: #c83838;
  --btn-rarity-text: #fff;
  --ink-trim-stroke: 0.45px;
  --ink-trim-shadow:
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 1px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
  --rarity-common-top: #6b7280;
  --rarity-common-mid: #4b5563;
  --rarity-common-bottom: #374151;
  --rarity-uncommon-top: #4a9a5c;
  --rarity-uncommon-mid: #357a46;
  --rarity-uncommon-bottom: #245832;
  --rarity-rare-top: #3a78c0;
  --rarity-rare-mid: #285a98;
  --rarity-rare-bottom: #1a4070;
  --rarity-super-top: #9050d0;
  --rarity-super-mid: #6030a0;
  --rarity-super-bottom: #442070;
  --rarity-legendary-top: #d4a017;
  --rarity-legendary-mid: #a87808;
  --rarity-legendary-bottom: #7a5808;
  --rarity-mythic-top: #c83838;
  --rarity-mythic-mid: #982828;
  --rarity-mythic-bottom: #701818;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 85%, rgba(110, 128, 156, 0.35), transparent 40%),
    linear-gradient(145deg, #17213f 0%, #202c4d 48%, #3b4960 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

body:has(.site-drift) {
  background: transparent;
  background-attachment: scroll;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 80;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--gold);
  color: #111;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

/* ── Header ── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px;
  border-bottom: 4px solid #080a0f;
  background: linear-gradient(#506da8, #344a82);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.28);
}

.nav-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  text-decoration: none;
}

.nav-brand img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 2px solid #000;
}

.nav-brand-name {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: #fff;
  -webkit-text-stroke: var(--ink-trim-stroke) #000;
  paint-order: stroke fill;
  text-shadow: var(--ink-trim-shadow);
}

.nav-brand-name em {
  font-style: normal;
  color: var(--rarity-legendary-text);
  -webkit-text-stroke: var(--ink-trim-stroke) #000;
  paint-order: stroke fill;
  text-shadow: var(--ink-trim-shadow);
}

.hero-stat[data-color="Grey"] {
  --btn-frame-top: var(--rarity-common-top);
  --btn-frame-mid: var(--rarity-common-mid);
  --btn-frame-bottom: var(--rarity-common-bottom);
}

.hero-stat[data-color="Green"] {
  --btn-frame-top: var(--rarity-uncommon-top);
  --btn-frame-mid: var(--rarity-uncommon-mid);
  --btn-frame-bottom: var(--rarity-uncommon-bottom);
}

.hero-stat[data-color="Blue"] {
  --btn-frame-top: var(--rarity-rare-top);
  --btn-frame-mid: var(--rarity-rare-mid);
  --btn-frame-bottom: var(--rarity-rare-bottom);
}

.hero-stat[data-color="Purple"] {
  --btn-frame-top: var(--rarity-super-top);
  --btn-frame-mid: var(--rarity-super-mid);
  --btn-frame-bottom: var(--rarity-super-bottom);
}

.hero-stat[data-color="Yellow"] {
  --btn-frame-top: var(--rarity-legendary-top);
  --btn-frame-mid: var(--rarity-legendary-mid);
  --btn-frame-bottom: var(--rarity-legendary-bottom);
}

.hero-stat[data-color="Red"] {
  --btn-frame-top: var(--rarity-mythic-top);
  --btn-frame-mid: var(--rarity-mythic-mid);
  --btn-frame-bottom: var(--rarity-mythic-bottom);
}

.nav-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  margin: 0;
  padding: 0 14px;
  border: 3px solid #111;
  border-radius: 10px;
  background: var(--gold);
  box-shadow: 0 4px 0 #111;
  color: #111;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

/* ── Site-wide card drift ── */

.site-drift {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  contain: paint;
}

.site-drift-bg,
.site-drift-scrim {
  position: absolute;
  inset: 0;
}

.site-drift-bg {
  z-index: 0;
  background:
    radial-gradient(circle at 50% 85%, rgba(110, 128, 156, 0.28), transparent 42%),
    linear-gradient(145deg, #17213f 0%, #202c4d 48%, #3b4960 100%);
}

.site-drift .hero-lanes {
  z-index: 1;
}

.site-drift-scrim {
  z-index: 2;
  background:
    radial-gradient(circle at 50% 85%, rgba(110, 128, 156, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(23, 33, 63, 0.5) 0%, rgba(32, 44, 77, 0.56) 48%, rgba(59, 73, 96, 0.62) 100%);
}

.site-drift.is-paused .hero-lane-card,
.site-drift.is-paused .hero-lane-card * {
  animation-play-state: paused !important;
}

.hero,
section,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ── Hero ── */

.hero {
  isolation: isolate;
  min-height: min(92vh, 860px);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 48px 20px 64px;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 48% at 50% 46%, rgba(23, 33, 63, 0.82), rgba(32, 44, 77, 0.5) 52%, transparent 100%);
}

.hero-lanes {
  position: absolute;
  inset: -8% 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  pointer-events: none;
}

.hero-lane {
  --lane-drift-duration: 48s;
  position: relative;
  height: 18%;
  min-height: 78px;
}

.hero-lane-card {
  --drift-delay: 0s;
  --drift-rotate: 0deg;
  --hero-card-opacity: 0.6;
  position: absolute;
  top: 50%;
  left: 0;
  width: clamp(96px, 15vw, 124px);
  opacity: var(--hero-card-opacity);
  transform: translateY(-50%) rotate(var(--drift-rotate));
  animation: menu-card-drift var(--lane-drift-duration) linear infinite;
  animation-delay: var(--drift-delay);
}

.hero-lane--reverse .hero-lane-card {
  animation-name: menu-card-drift-reverse;
}

@keyframes menu-card-drift {
  from { transform: translate3d(calc(-22vw - 120px), -50%, 0) rotate(var(--drift-rotate)); }
  to { transform: translate3d(calc(100vw + 120px), -50%, 0) rotate(var(--drift-rotate)); }
}

@keyframes menu-card-drift-reverse {
  from { transform: translate3d(calc(100vw + 120px), -50%, 0) rotate(var(--drift-rotate)); }
  to { transform: translate3d(calc(-22vw - 120px), -50%, 0) rotate(var(--drift-rotate)); }
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(720px, 100%);
  padding: 28px 20px;
  text-align: center;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: 0 2px #000;
}

.hero-scroll-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  animation: hero-scroll-nudge 1.8s ease-in-out infinite;
}

@keyframes hero-scroll-nudge {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(3px, 3px); }
}

.eyebrow {
  margin: 0 0 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 3px 0 #000;
}

.logo-title {
  margin: 0 0 14px;
  font-family: var(--font-logo);
  font-size: clamp(42px, 9vw, 72px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: #fff;
  -webkit-text-stroke: 3.5px #000;
  paint-order: stroke fill;
  text-shadow: var(--logo-shadow);
}

.logo-title .tcg {
  color: var(--rarity-legendary-text);
  -webkit-text-stroke: 3.5px #000;
  paint-order: stroke fill;
  text-shadow: var(--logo-shadow);
}

@supports (-webkit-touch-callout: none) {
  .logo-title,
  .logo-title .tcg {
    -webkit-text-stroke: 0 transparent;
    paint-order: normal;
  }
}

.hero-lead {
  margin: 0 auto 22px;
  max-width: 46ch;
  color: var(--text);
  font-size: clamp(16px, 2.2vw, 19px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  border: 3px solid #111;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 #111;
}

.btn-gold {
  background: var(--gold);
  color: #111;
}

.soon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0;
  padding: 0 18px;
  border: 3px solid #111;
  border-radius: 10px;
  background: var(--gold);
  box-shadow: 0 4px 0 #111;
  color: #111;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: default;
  user-select: none;
  pointer-events: none;
}

.soon-tile--hero {
  display: flex;
  width: min(560px, 100%);
  min-height: 58px;
  margin: 16px auto 0;
  padding: 14px 28px;
  border-width: 4px;
  border-radius: 12px;
  box-shadow: 0 6px 0 #111;
  font-size: clamp(16px, 2.4vw, 20px);
}

a.soon-tile {
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
}

a.soon-tile:hover,
a.soon-tile:focus-visible {
  filter: brightness(1.06);
}

.btn-ink {
  background: #111;
  color: var(--gold);
}

.btn-ink:hover,
.btn-ink:focus-visible {
  filter: brightness(1.12);
}

.btn-ink:disabled {
  cursor: wait;
  filter: none;
  opacity: 0.78;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-ghost {
  background: linear-gradient(#586273, #414958);
  color: #fff;
  text-shadow: 0 2px 0 #000;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(560px, 100%);
  margin: 0 auto;
}

.hero-stat {
  --btn-frame-top: var(--rarity-common-top);
  --btn-frame-mid: var(--rarity-common-mid);
  --btn-frame-bottom: var(--rarity-common-bottom);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 10px;
  border: 3px solid #000;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    var(--btn-frame-top) 0%,
    var(--btn-frame-mid) 46%,
    var(--btn-frame-bottom) 100%
  );
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: var(--btn-rarity-text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: var(--ink-trim-stroke) #000;
  paint-order: stroke fill;
  text-shadow: var(--ink-trim-shadow);
}

/* ── Shared layout ── */

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

section {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 32px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: 0;
  color: var(--gold);
  text-shadow: 0 2px #000;
}

.section-head p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
}

.section-head .pitch {
  max-width: 48ch;
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.section-head a {
  color: var(--gold);
}

#rip .wrap {
  text-align: center;
}

#media .wrap {
  text-align: center;
}

.media-show {
  max-width: 560px;
  margin: 0 auto;
}

.media-empty {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  text-shadow: 0 2px #000;
}

.media-slide {
  margin: 0;
}

.media-frame {
  display: block;
  width: 37.5%;
  margin-inline: auto;
  padding: 0;
  aspect-ratio: 1242 / 2688;
  border: 4px solid #080a0f;
  border-radius: 13px;
  background: #080a0f;
  box-shadow: var(--chunk-shadow);
  overflow: hidden;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.media-slide figcaption {
  margin-top: 16px;
}

.media-slide h3 {
  margin: 0 0 6px;
  min-height: 1.15em;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold);
  text-shadow: 0 2px #000;
}

.media-slide p {
  margin: 0 auto;
  max-width: 36em;
  min-height: 4.4em;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  text-shadow: 0 2px #000;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 10, 15, 0.92);
  cursor: zoom-out;
}

.media-lightbox.is-open {
  display: flex;
}

.media-lightbox img {
  display: block;
  height: 100vh;
  height: 100dvh;
  width: auto;
  max-width: 100vw;
  object-fit: contain;
}

.media-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.media-count {
  margin: 0;
  min-width: 4.5em;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 2px #000;
}

.media-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.media-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid #080a0f;
  border-radius: 99px;
  background: #586273;
  box-shadow: 0 2px 0 #080a0f;
  cursor: pointer;
}

.media-dot.is-active {
  background: var(--gold);
}

/* ── Feature grid ── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 18px;
  border: 3px solid #080a0f;
  border-radius: 13px;
  background: linear-gradient(#586273, #414958);
  box-shadow: var(--chunk-shadow);
  text-align: center;
}

.feature-card img {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.feature-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16px;
  text-shadow: 0 2px #000;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.feature-mini-pack {
  width: 78px;
  margin: 0 auto 12px;
  pointer-events: none;
}

.feature-mini-pack .builder-pack-visual {
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}

.feature-mini-pack .builder-pack-peel {
  border-width: 3px;
  border-radius: 7px 7px 0 0;
}

.feature-mini-pack .builder-pack-stack {
  height: 8px;
}

.feature-mini-pack .builder-pack-stack span:nth-child(1) { top: 6px; }
.feature-mini-pack .builder-pack-stack span:nth-child(2) { top: 5px; }
.feature-mini-pack .builder-pack-stack span:nth-child(3) { top: 4px; }
.feature-mini-pack .builder-pack-stack span:nth-child(4) { top: 3px; }
.feature-mini-pack .builder-pack-stack span:nth-child(5) { top: 2px; }

.feature-mini-pack .builder-pack-crimp {
  height: 5px;
}

.feature-mini-pack .builder-pack-sleeve {
  border-width: 3px;
  border-radius: 0 0 7px 7px;
}

.feature-card .feature-mini-pack img {
  width: min(74%, 42px);
  height: auto;
  max-height: 40%;
  margin: 0;
  filter: none;
}

/* ── Sets / cards ── */

.set-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px 16px;
}

.set-tile {
  flex: 0 0 196px;
  width: 196px;
  max-width: 100%;
  text-align: center;
}

.set-tile .mobile-card {
  width: 100%;
}

.set-tile .mobile-card-flippable.mobile-card--slabbed {
  aspect-ratio: 5 / 7.75;
}

.set-tile .mobile-card--slab-table .mobile-card-slab-label--table .mobile-card-slab-label-brand {
  padding: 4px 6px;
  font-size: 8px;
}

.set-tile .mobile-card--slab-table .mobile-card-slab-label--table .mobile-card-slab-label-table-body {
  padding: 4px 6px 5px;
}

.set-tile .mobile-card--slab-table .mobile-card-slab-label--table .mobile-card-slab-label-table-grade {
  font-size: 13px;
}

.set-tile p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  line-height: 1.4;
}

.set-hint {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Game card chrome */

.mobile-card {
  --card-ink: #fff;
  --card-ink-stroke: 0.45px;
  --card-text-shadow:
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 1px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
  --frame-top: #6b7280;
  --frame-mid: #4b5563;
  --frame-bottom: #374151;
  --title-top: #2d333b;
  --title-bottom: #141820;
  --art-top: #4b5563;
  --art-bottom: #2d333b;
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  padding: 4px;
  border: 3px solid #000;
  border-radius: 12px;
  background: linear-gradient(145deg, #4a4a4a 0%, #1a1a1a 38%, #050505 72%, #1f1f1f 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
  font-family: "Outfit", "Segoe UI", sans-serif;
}

.mobile-card:not([data-color]) {
  --frame-accent: #707070;
  --frame-top: #484848;
  --frame-mid: #353535;
  --frame-bottom: #222222;
  --title-top: #444444;
  --title-bottom: #141414;
  --art-top: #525252;
  --art-bottom: #2e2e2e;
}

.mobile-card[data-color="Grey"],
.mobile-card[data-color="Black"] {
  --frame-accent: #5c636d;
  --frame-top: #6b7280;
  --frame-mid: #4b5563;
  --frame-bottom: #374151;
  --title-top: #2d333b;
  --title-bottom: #141820;
  --art-top: #4b5563;
  --art-bottom: #2d333b;
}

.mobile-card[data-color="Grey"] .mobile-card-title,
.mobile-card[data-color="Black"] .mobile-card-title {
  background: linear-gradient(180deg, var(--frame-top, #6b7280), var(--frame-mid, #4b5563));
}

.mobile-card[data-color="Green"] {
  --frame-accent: #3d8f52;
  --frame-top: #4a9a5c;
  --frame-mid: #357a46;
  --frame-bottom: #245832;
  --title-top: #1e4a2c;
  --title-bottom: #0f2414;
  --art-top: #3a7048;
  --art-bottom: #234830;
}

.mobile-card[data-color="Blue"] {
  --frame-accent: #2f6eb8;
  --frame-top: #3a78c0;
  --frame-mid: #285a98;
  --frame-bottom: #1a4070;
  --title-top: #1a3558;
  --title-bottom: #0c1e38;
  --art-top: #2a5088;
  --art-bottom: #1a3868;
}

.mobile-card[data-color="Purple"] {
  --frame-accent: #8848c8;
  --frame-top: #9050d0;
  --frame-mid: #6030a0;
  --frame-bottom: #442070;
  --title-top: #382060;
  --title-bottom: #201040;
  --art-top: #5030a0;
  --art-bottom: #382070;
}

.mobile-card[data-color="Yellow"] {
  --frame-accent: #c9940a;
  --frame-top: #d4a017;
  --frame-mid: #a87808;
  --frame-bottom: #7a5808;
  --title-top: #6b4f0a;
  --title-bottom: #3d2d06;
  --art-top: #b88810;
  --art-bottom: #806008;
}

.mobile-card[data-color="Red"] {
  --frame-accent: #b83030;
  --frame-top: #c83838;
  --frame-mid: #982828;
  --frame-bottom: #701818;
  --title-top: #5a1414;
  --title-bottom: #300808;
  --art-top: #a03030;
  --art-bottom: #701818;
}

.mobile-card[data-color="Glass"],
.mobile-card[data-color="Onyx"] {
  --frame-accent: rgba(255, 255, 255, 0.42);
  --frame-top: rgba(255, 255, 255, 0.24);
  --frame-mid: rgba(255, 255, 255, 0.12);
  --frame-bottom: rgba(255, 255, 255, 0.06);
  --title-top: rgba(255, 255, 255, 0.2);
  --title-bottom: rgba(255, 255, 255, 0.08);
  --art-top: rgba(255, 255, 255, 0.18);
  --art-bottom: rgba(255, 255, 255, 0.08);
  --glass-slab-tint-top: rgba(255, 255, 255, 0.16);
  --glass-slab-tint-bottom: rgba(180, 220, 255, 0.1);
  --glass-rim: rgba(140, 210, 255, 0.58);
  --glass-art-tint-top: rgba(255, 255, 255, 0.14);
  --glass-art-tint-bottom: rgba(196, 228, 255, 0.08);
}

.mobile-card--type-blackhex {
  --card-ink: #f4f7fc;
  --card-ink-stroke: 0px;
  --card-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.mobile-card--type-pearlescent,
.mobile-card--type-nightneon {
  --card-ink-stroke: 0px;
  --card-text-shadow: none;
}

.mobile-card--type-marbleswirl {
  --card-ink: #222;
  --card-ink-stroke: 0px;
  --card-text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mobile-card-frame {
  position: relative;
  display: grid;
  grid-template-rows: 0.72fr minmax(0, 2.28fr) 1fr;
  gap: 5px;
  height: 100%;
  padding: 7px;
  overflow: hidden;
  border: 2px solid #000;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--frame-top) 0%, var(--frame-mid) 18%, var(--frame-bottom) 100%);
}

.mobile-card-shine {
  display: none;
}

.mobile-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 2px solid #000;
  background: linear-gradient(180deg, var(--title-top), var(--title-bottom));
  font-family: "Syne", "Outfit", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  overflow: hidden;
}

.mobile-card-title span {
  display: block;
  min-width: 0;
  max-width: 100%;
  line-height: 1.1;
  white-space: nowrap;
}

.mobile-card-art {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 0;
  padding: 0 1px;
}

.mobile-card-art-window {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  max-height: 100%;
  padding: 5px;
  border-radius: 4px;
  border: 2px solid #000;
  background: linear-gradient(180deg, var(--art-top) 0%, var(--art-bottom) 100%);
  overflow: hidden;
}

.mobile-card-art-window img {
  width: min(68%, 96px);
  height: auto;
  max-height: 92%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.mobile-card--compact .mobile-card-frame {
  padding: 5px;
  gap: 4px;
  grid-template-rows: 0.68fr minmax(0, 2.35fr) 1fr;
}

.mobile-card--compact .mobile-card-title {
  min-height: 16px;
  font-size: 11px;
  padding: 2px 5px;
}

.mobile-card--compact .mobile-card-meta {
  min-height: 24px;
}

.mobile-card--compact .mobile-card-set,
.mobile-card--compact .mobile-card-slot {
  font-size: 10px;
  letter-spacing: 0.04em;
}

.mobile-card--compact .mobile-card-art-window {
  padding: 4px;
}

.mobile-card--compact .mobile-card-art-window img {
  width: min(66%, 64px);
  max-height: 90%;
}

.mobile-card-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 28px;
  padding: 2px 4px 0;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  overflow: hidden;
}

.mobile-card-set,
.mobile-card-slot {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
}

.mobile-card-set {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-card-slot {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.mobile-card-title,
.mobile-card-title span,
.mobile-card-meta,
.mobile-card-set,
.mobile-card-slot {
  color: var(--card-ink);
  -webkit-text-stroke: var(--card-ink-stroke) #000;
  paint-order: stroke fill;
  text-shadow: var(--card-text-shadow);
}

@keyframes mobile-card-flat-flip {
  0%,
  100% { transform: scaleX(1); }
  50% { transform: scaleX(0.02); }
}

.mobile-card-flippable {
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  perspective: none;
  -webkit-perspective: none;
  transform-style: flat;
  -webkit-transform-style: flat;
}

.mobile-card-flippable:focus-visible {
  box-shadow: 0 0 0 2px rgba(245, 223, 104, 0.85);
}

.mobile-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform: none;
  transform-style: flat;
  -webkit-transform-style: flat;
}

.mobile-card-flippable .mobile-card-inner.is-mobile-flat-flip-anim {
  animation: mobile-card-flat-flip 260ms ease !important;
}

.mobile-card-flippable .mobile-card-inner,
.mobile-card-flippable .mobile-card-face,
.mobile-card-flippable .mobile-card-bezel,
.mobile-card-flippable .mobile-card-frame {
  width: 100%;
  height: 100%;
}

.mobile-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: none;
  transform-style: flat;
  -webkit-transform-style: flat;
}

.mobile-card-front,
.mobile-card-back {
  transform: none !important;
  -webkit-backface-visibility: visible !important;
  backface-visibility: visible !important;
  background: #000;
}

.mobile-card-flippable .mobile-card-front {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 2;
}

.mobile-card-flippable .mobile-card-back {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 1;
}

.mobile-card-flippable.is-flipped .mobile-card-front {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 1;
}

.mobile-card-flippable.is-flipped .mobile-card-back {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 2;
}

.mobile-card:has(> .mobile-card-bezel),
.mobile-card:has(> .mobile-card-inner) {
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  overflow: hidden;
}

.mobile-card-bezel {
  position: relative;
  height: 100%;
  padding: 4px;
  border: 3px solid #000;
  border-radius: 12px;
  background: linear-gradient(145deg, #4a4a4a 0%, #1a1a1a 38%, #050505 72%, #1f1f1f 100%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
  box-sizing: border-box;
  overflow: hidden;
}

.mobile-card-bezel .mobile-card-frame {
  height: 100%;
}

.mobile-card-bezel--back {
  display: flex;
}

.mobile-card-back-details {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.card-back-panel {
  --back-ink: #f4f7fb;
  --back-ink-muted: #c5d0de;
  --back-ink-value: #ffffff;
  --back-divider: rgba(255, 255, 255, 0.16);
  --back-emphasis: #f4f7fb;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px 10px 10px;
  border: 3px solid #000;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--frame-accent, #707070) 30%, transparent), transparent 58%),
    linear-gradient(180deg, var(--frame-top, #484848) 0%, var(--frame-mid, #353535) 46%, var(--frame-bottom, #222222) 100%);
  color: var(--back-ink);
  box-sizing: border-box;
}

.card-back-panel[data-back-tone="light"] {
  --back-ink: #111827;
  --back-ink-muted: #374151;
  --back-ink-value: #111827;
  --back-divider: rgba(0, 0, 0, 0.12);
  --back-emphasis: #111827;
}

.card-back-head {
  flex-shrink: 0;
  padding-bottom: 10px;
  text-align: center;
  border-bottom: 1px solid var(--back-divider);
}

.card-back-name {
  margin: 8px 0 0;
  color: var(--back-ink);
  font-family: "Syne", Arial, sans-serif;
  font-size: clamp(13px, 4.2vw, 16px);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.card-back-subtitle {
  margin: 5px 0 0;
  color: var(--back-ink-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.card-back-panel .card-back-name,
.card-back-panel .card-back-subtitle,
.card-back-panel .card-back-stat dt,
.card-back-panel .card-back-stat dd {
  color: #fff;
  -webkit-text-stroke: 0.4px #000;
  paint-order: stroke fill;
  text-shadow:
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 1px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
}

.card-back-stats {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-evenly;
  min-height: 0;
  margin: 0;
  padding: 6px 2px 2px;
}

.card-back-stat {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  column-gap: 10px;
  padding: 6px 4px;
}

.card-back-stat + .card-back-stat {
  border-top: 1px solid var(--back-divider);
}

.card-back-stat dt,
.card-back-stat dd {
  min-width: 0;
}

.card-back-stat dt {
  color: var(--back-ink-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-back-stat dd {
  margin: 0;
  color: var(--back-ink-value);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-back-stat--emphasis dd {
  color: var(--back-emphasis);
}

.card-back-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-back-chip--hot {
  background: rgba(239, 68, 68, 0.28);
}

.card-back-chip--quiet {
  background: rgba(156, 163, 175, 0.28);
}

.card-back-chip--cold {
  background: rgba(96, 165, 250, 0.28);
}

.mobile-card--compact .card-back-panel {
  padding: 8px 8px 8px;
}

.mobile-card--compact .card-back-stat {
  padding: 5px 2px;
  column-gap: 8px;
}

.mobile-card--compact .card-back-stat dt {
  font-size: 8px;
  letter-spacing: 0.04em;
}

.mobile-card--compact .card-back-stat dd,
.mobile-card--compact .card-back-chip {
  font-size: 10px;
}

.mobile-card-stamp-slot {
  position: absolute;
  z-index: 6;
  width: 36%;
  max-width: 36%;
  pointer-events: none;
}

.mobile-card-bezel > .mobile-card-stamp-slot {
  z-index: 7;
}

.mobile-card-stamp-slot--top-right {
  top: 3%;
  right: 3%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.mobile-card-stamp-slot--top-left {
  top: 3%;
  left: 3%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.mobile-card-stamp-slot--bottom-right {
  right: 4%;
  bottom: calc(16% - 8px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.mobile-card-stamp-slot--bottom-left {
  left: 3%;
  bottom: calc(16% - 8px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.mobile-card-stamp {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.mobile-card-stamp--auto {
  width: 108%;
}

.mobile-card-stamp-slot--top-right .mobile-card-stamp--auto {
  transform: rotate(10deg);
  transform-origin: 100% 0%;
}

.mobile-card-stamp-slot--top-left .mobile-card-stamp--auto {
  transform: rotate(-10deg);
  transform-origin: 0% 0%;
}

.mobile-card-stamp-slot--bottom-right .mobile-card-stamp--auto {
  transform: rotate(-10deg);
  transform-origin: 100% 100%;
}

.mobile-card-stamp-slot--bottom-left .mobile-card-stamp--auto {
  transform: rotate(10deg);
  transform-origin: 0% 100%;
}

.mobile-card-stamp--wax {
  width: 78%;
}

.mobile-card-stamp--limited,
.mobile-card-stamp--one-of-one {
  width: 84%;
}

.mobile-card-stamp--one-of-one {
  width: 92%;
}

.mobile-card--full-art[data-color="Glass"] .mobile-card-bezel--full-art,
.mobile-card--full-art[data-color="Onyx"] .mobile-card-bezel--full-art {
  padding: 4px;
  border: 3px solid #000;
  border-radius: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--glass-slab-tint-top) 0%, var(--glass-slab-tint-bottom) 100%);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px var(--glass-rim),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.mobile-card-flippable.mobile-card--full-art[data-color="Glass"] .mobile-card-front,
.mobile-card-flippable.mobile-card--full-art[data-color="Onyx"] .mobile-card-front {
  background: transparent;
}

.mobile-card--full-art[data-color="Glass"] .mobile-card-full-art,
.mobile-card--full-art[data-color="Onyx"] .mobile-card-full-art {
  isolation: auto;
  -webkit-backdrop-filter: blur(8px) saturate(1.3);
  backdrop-filter: blur(8px) saturate(1.3);
}

.mobile-card--full-art[data-color="Glass"] .mobile-card-full-art::before,
.mobile-card--full-art[data-color="Onyx"] .mobile-card-full-art::before {
  opacity: 0.22;
}

.mobile-card--full-art .mobile-card-bezel--full-art {
  height: 100%;
  box-sizing: border-box;
}

.mobile-card-frame--full-art {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  grid-template-rows: 1fr;
  gap: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.mobile-card-full-art {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.92);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--glass-art-tint-top) 0%, var(--glass-art-tint-bottom) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -8px 20px rgba(255, 255, 255, 0.06),
    0 8px 16px rgba(0, 0, 0, 0.14);
  isolation: isolate;
}

.mobile-card-full-art::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.06) 28%,
    transparent 52%,
    rgba(255, 255, 255, 0.08) 100%
  );
  pointer-events: none;
}

.mobile-card-full-art img,
.mobile-card-full-art-icon {
  position: relative;
  z-index: 2;
  width: min(76%, 132px);
  height: auto;
  max-height: 76%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.22));
}

.mobile-card--compact.mobile-card--full-art .mobile-card-full-art img,
.mobile-card--compact .mobile-card-full-art-icon {
  width: min(66%, 72px);
  max-height: 70%;
}

/* ── Town ── */

#town .wrap,
#market .wrap {
  text-align: center;
}

.town-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.town-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px;
  border: 3px solid #080a0f;
  border-radius: 13px;
  background: linear-gradient(#586273, #414958);
  box-shadow: var(--chunk-shadow);
  text-align: center;
}

.town-card img {
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}

.town-card > div {
  width: 100%;
  text-align: center;
}

.town-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 17px;
  text-shadow: 0 2px #000;
}

.town-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.town-card a {
  color: var(--gold);
  font-weight: 700;
}

/* ── Card builder ── */

.builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  width: 100%;
}

.builder-col {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.builder-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 6px;
}

.builder-stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.builder-card-slot {
  position: relative;
  width: min(240px, 100%);
  aspect-ratio: 5 / 7;
  flex-shrink: 0;
}

.builder-card-slot .mobile-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  min-height: 0;
  overflow: hidden;
}

.builder-card-slot .mobile-card-bezel,
.builder-card-slot .mobile-card-frame,
.builder-card-slot .mobile-card-frame--full-art {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.builder-group {
  padding: 16px;
  border: 3px solid #080a0f;
  border-radius: 13px;
  background: linear-gradient(#586273, #414958);
  box-shadow: var(--chunk-shadow);
  text-align: center;
}

.builder-group h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold);
  text-align: center;
  text-shadow: 0 2px #000;
}

.builder-group h3 + p {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px #000;
}

.builder-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.builder-group--wide .builder-picks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.builder-group--stamps .builder-picks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.builder-pick {
  --btn-frame-top: var(--rarity-common-top);
  --btn-frame-mid: var(--rarity-common-mid);
  --btn-frame-bottom: var(--rarity-common-bottom);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 8px;
  border: 3px solid #000;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    var(--btn-frame-top) 0%,
    var(--btn-frame-mid) 46%,
    var(--btn-frame-bottom) 100%
  );
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: var(--btn-rarity-text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  -webkit-text-stroke: var(--ink-trim-stroke) #000;
  paint-order: stroke fill;
  text-shadow: var(--ink-trim-shadow);
  transition: filter 180ms ease, transform 120ms ease;
}

.builder-pick[data-color="Grey"] {
  --btn-frame-top: var(--rarity-common-top);
  --btn-frame-mid: var(--rarity-common-mid);
  --btn-frame-bottom: var(--rarity-common-bottom);
}

.builder-pick[data-color="Green"] {
  --btn-frame-top: var(--rarity-uncommon-top);
  --btn-frame-mid: var(--rarity-uncommon-mid);
  --btn-frame-bottom: var(--rarity-uncommon-bottom);
}

.builder-pick[data-color="Blue"] {
  --btn-frame-top: var(--rarity-rare-top);
  --btn-frame-mid: var(--rarity-rare-mid);
  --btn-frame-bottom: var(--rarity-rare-bottom);
}

.builder-pick[data-color="Purple"] {
  --btn-frame-top: var(--rarity-super-top);
  --btn-frame-mid: var(--rarity-super-mid);
  --btn-frame-bottom: var(--rarity-super-bottom);
}

.builder-pick[data-color="Yellow"] {
  --btn-frame-top: var(--rarity-legendary-top);
  --btn-frame-mid: var(--rarity-legendary-mid);
  --btn-frame-bottom: var(--rarity-legendary-bottom);
}

.builder-pick[data-color="Red"] {
  --btn-frame-top: var(--rarity-mythic-top);
  --btn-frame-mid: var(--rarity-mythic-mid);
  --btn-frame-bottom: var(--rarity-mythic-bottom);
}

.builder-pick:hover:not(:disabled),
.builder-pick:focus-visible:not(:disabled) {
  filter: brightness(1.1);
  outline: none;
}

.builder-pick:active:not(:disabled) {
  filter: brightness(0.94);
  transform: translateY(1px);
}

.builder-pick.is-active {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  filter: brightness(1.14);
}

.builder-pick:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.builder-group.is-locked .builder-picks {
  opacity: 0.55;
}

/* ── Chase leftover ── */

.chase-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.panel {
  padding: 20px;
  border: 4px solid #080a0f;
  border-radius: 13px;
  background: linear-gradient(#586273, #414958);
  box-shadow: var(--chunk-shadow);
  overflow: hidden;
}

.panel h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--gold);
  text-shadow: 0 2px #000;
}

.rarity-row {
  display: grid;
  gap: 8px;
}

.rarity-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid #000;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-shadow: var(--ink-shadow);
}

.rarity-chip span {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}

.stamp-list,
.finish-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 6px 10px;
  border: 2px solid #080a0f;
  border-radius: 8px;
  background: rgba(22, 28, 42, 0.48);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 2px #000;
}

#download .wrap {
  text-align: center;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  max-width: 820px;
  margin: 0 auto;
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 22px;
  border: 4px solid #080a0f;
  border-radius: 13px;
  background: linear-gradient(#586273, #414958);
  box-shadow: var(--chunk-shadow);
  text-align: center;
}

.mode-card--classic {
  background: linear-gradient(
    180deg,
    var(--rarity-uncommon-top) 0%,
    var(--rarity-uncommon-mid) 46%,
    var(--rarity-uncommon-bottom) 100%
  );
}

.mode-card--challenge {
  background: linear-gradient(
    180deg,
    var(--rarity-mythic-top) 0%,
    var(--rarity-mythic-mid) 46%,
    var(--rarity-mythic-bottom) 100%
  );
}

.mode-card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text);
  text-shadow: 0 2px #000;
}

.mode-points {
  list-style: none;
  width: 100%;
  max-width: 280px;
  margin: 0;
  padding: 0;
  text-align: left;
}

.mode-points li {
  position: relative;
  margin: 0;
  padding: 6px 0 6px 16px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px #000;
}

.mode-points li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border: 1px solid #080a0f;
  border-radius: 1px;
  background: var(--gold);
}

.mode-vs {
  align-self: center;
  margin: 0;
  font-family: var(--font-logo);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  -webkit-text-stroke: 3px #000;
  paint-order: stroke fill;
  text-shadow: var(--ink-shadow);
  text-transform: lowercase;
}

.mode-cta {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* ── App Store ── */

#download .wrap {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
}

.store-tile {
  position: relative;
  padding: 32px 28px 28px;
  overflow: hidden;
  border: 3px solid #000;
  border-radius: 13px;
  background: linear-gradient(
    180deg,
    var(--rarity-legendary-top) 0%,
    var(--rarity-legendary-mid) 46%,
    var(--rarity-legendary-bottom) 100%
  );
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: var(--btn-rarity-text);
  text-align: center;
  -webkit-text-stroke: var(--ink-trim-stroke) #000;
  paint-order: stroke fill;
  text-shadow: var(--ink-trim-shadow);
}

.store-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.store-tile h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.1;
  color: var(--btn-rarity-text);
  -webkit-text-stroke: var(--ink-trim-stroke) #000;
  paint-order: stroke fill;
  text-shadow: var(--ink-trim-shadow);
}

.store-tile p {
  margin: 0 auto;
  max-width: 36em;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--btn-rarity-text);
}

.store-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  text-decoration: none;
}

.store-promo:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 6px;
  border-radius: 14px;
}

.store-phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  max-width: 520px;
}

.store-phones img {
  width: 32%;
  max-width: 148px;
  border: 3px solid #000;
  border-radius: 18px;
  box-shadow: 0 8px 0 #000;
  object-fit: cover;
  aspect-ratio: 9 / 19.5;
  background: #111;
}

.store-phones img:nth-child(1),
.store-phones img:nth-child(3) {
  width: 26%;
  max-width: 118px;
  transform: translateY(14px);
}

.store-phones img:nth-child(1) {
  margin-right: -18px;
  z-index: 1;
}

.store-phones img:nth-child(2) {
  position: relative;
  z-index: 2;
}

.store-phones img:nth-child(3) {
  margin-left: -18px;
  z-index: 1;
}

.store-badge {
  display: block;
  width: 168px;
  height: auto;
  margin-top: 22px;
}

/* ── Footer ── */

.site-footer {
  margin-top: auto;
  padding: 28px 20px 36px;
  border-top: 4px solid #080a0f;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  text-align: center;
}

.site-footer strong {
  color: var(--text);
}

.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.site-footer-copy {
  margin: 0;
}

.site-footer-links a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 800;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
  text-decoration: underline;
}

.page-hero {
  padding: 48px 18px 28px;
  text-align: center;
}

.page-hero .logo-title {
  font-size: clamp(36px, 8vw, 58px);
}

.page-hero h1 {
  margin: 0;
  font-size: 25px;
  text-shadow: 0 2px 0 #000;
}

.policy-wrap {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
}

.policy-panel {
  background: linear-gradient(#586273, #414958);
  border: 4px solid #080a0f;
  border-radius: 13px;
  box-shadow: var(--chunk-shadow);
  overflow: hidden;
}

.policy-head {
  padding: 18px 22px;
  background: linear-gradient(#506da8, #344a82);
  border-bottom: 4px solid #080a0f;
}

.policy-head .subtitle {
  margin-top: 5px;
  font-size: 13px;
  font-weight: bold;
  opacity: 0.9;
}

.policy-content {
  padding: 24px;
}

.policy-status {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  margin-bottom: 23px;
  background: linear-gradient(#638356, #47663d);
  border: 3px solid #090b0f;
  border-radius: 10px;
}

.policy-icon {
  flex: 0 0 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #111;
  border: 3px solid #111;
  border-radius: 8px;
  transform: rotate(-6deg);
  font-size: 22px;
  font-weight: 900;
}

.policy-status strong {
  display: block;
  font-size: 17px;
  text-shadow: 0 2px #000;
}

.policy-status small {
  display: block;
  margin-top: 3px;
}

.policy-section .btn {
  margin-top: 9px;
}

.policy-status p {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  text-shadow: none;
}

.policy-section {
  background: rgba(22, 28, 42, 0.48);
  border: 2px solid rgba(5, 8, 14, 0.8);
  border-radius: 9px;
  padding: 17px 18px;
  margin-top: 13px;
}

.policy-section h2 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--gold);
  text-shadow: 0 2px #000;
}

.policy-section p,
.policy-section li {
  margin: 7px 0;
  line-height: 1.55;
  font-size: 14px;
  color: #fff;
}

.policy-section ul {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.65;
}

.policy-section a {
  color: var(--gold);
  font-weight: bold;
}

.policy-meta {
  text-align: center;
  padding: 20px 12px 2px;
  font-size: 12px;
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-lane-card { animation: none !important; transform: translateY(-50%) rotate(var(--drift-rotate)); }
  .hero-scroll-arrow { animation: none !important; }
  .mobile-card-flippable .mobile-card-inner.is-mobile-flat-flip-anim { animation: none !important; }
}

@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .town-grid { grid-template-columns: 1fr 1fr; }
  .chase-grid,
  .mode-grid { grid-template-columns: 1fr; }
  .mode-vs { display: none; }
  .builder {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .builder-stage { order: -1; }
  .builder-col {
    width: 100%;
    max-width: 640px;
  }
}

@media (max-width: 520px) {
  .site-nav { padding: 10px 12px; gap: 10px; }
  .nav-brand-name { font-size: 15px; }
  .nav-soon { min-height: 34px; padding: 0 10px; font-size: 11px; }
  .store-tile { padding: 24px 16px 22px; }
  .store-phones img:nth-child(1),
  .store-phones img:nth-child(3) {
    display: none;
  }
  .store-phones img:nth-child(2) {
    width: min(180px, 58%);
    max-width: 180px;
  }
  .builder-picks,
  .builder-group--wide .builder-picks,
  .builder-group--stamps .builder-picks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hero-stats { grid-template-columns: 1fr; }
  .feature-grid,
  .town-grid { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
  .hero-scroll {
    position: static;
    transform: none;
    margin-top: 18px;
  }
}

/* Insert faces: one plate, no title chip, no art-window box, names that fit. */
.mobile-card--type-blackhex .mobile-card-frame,
.mobile-card--type-pearlescent .mobile-card-frame,
.mobile-card--type-nightneon .mobile-card-frame,
.mobile-card--type-blackhex.mobile-card--compact .mobile-card-frame,
.mobile-card--type-pearlescent.mobile-card--compact .mobile-card-frame,
.mobile-card--type-nightneon.mobile-card--compact .mobile-card-frame {
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 0 !important;
  border: none !important;
  background: none !important;
  overflow: hidden;
}

.mobile-card--type-blackhex .mobile-card-art,
.mobile-card--type-pearlescent .mobile-card-art,
.mobile-card--type-nightneon .mobile-card-art {
  min-height: 0;
  height: 100%;
  padding: 0 !important;
  overflow: visible;
}

.mobile-card--type-blackhex .mobile-card-art-window,
.mobile-card--type-blackhex .mobile-card-art-window.image-wrap,
.mobile-card--type-pearlescent .mobile-card-art-window,
.mobile-card--type-pearlescent .mobile-card-art-window.image-wrap,
.mobile-card--type-nightneon .mobile-card-art-window,
.mobile-card--type-nightneon .mobile-card-art-window.image-wrap {
  width: 100%;
  height: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
  outline: none !important;
  overflow: visible !important;
}

.mobile-card--type-blackhex .mobile-card-title,
.mobile-card--type-blackhex .mobile-card-title span,
.mobile-card--type-blackhex[data-color] .mobile-card-title,
.mobile-card--type-blackhex[data-color="Grey"] .mobile-card-title,
.mobile-card--type-blackhex[data-color="Black"] .mobile-card-title,
.mobile-card--type-pearlescent .mobile-card-title,
.mobile-card--type-pearlescent .mobile-card-title span,
.mobile-card--type-pearlescent[data-color] .mobile-card-title,
.mobile-card--type-pearlescent[data-color="Grey"] .mobile-card-title,
.mobile-card--type-nightneon .mobile-card-title,
.mobile-card--type-nightneon .mobile-card-title span,
.mobile-card--type-nightneon[data-color] .mobile-card-title,
.mobile-card--type-nightneon[data-color="Grey"] .mobile-card-title {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

.mobile-card--type-blackhex .mobile-card-title,
.mobile-card--type-blackhex .mobile-card-title span,
.mobile-card--type-pearlescent .mobile-card-title,
.mobile-card--type-pearlescent .mobile-card-title span {
  overflow: visible !important;
}

.mobile-card--type-nightneon .mobile-card-title,
.mobile-card--type-nightneon .mobile-card-title span,
.mobile-card--type-nightneon.mobile-card--compact .mobile-card-title,
.mobile-card--type-nightneon.mobile-card--compact .mobile-card-title span {
  overflow: hidden !important;
  max-width: 100%;
}

.mobile-card--type-blackhex .mobile-card-title,
.mobile-card--type-blackhex .mobile-card-title span {
  -webkit-text-stroke: 0 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65) !important;
}

.mobile-card--type-blackhex.mobile-card--compact .mobile-card-title,
.mobile-card--type-blackhex.mobile-card--compact .mobile-card-title span,
.mobile-card--type-nightneon.mobile-card--compact .mobile-card-title,
.mobile-card--type-nightneon.mobile-card--compact .mobile-card-title span {
  letter-spacing: 0 !important;
  max-width: 100%;
  overflow: hidden;
}

.mobile-card--type-blackhex .mobile-card-meta,
.mobile-card--type-pearlescent .mobile-card-meta,
.mobile-card--type-nightneon .mobile-card-meta {
  display: none !important;
}

.mobile-card {
  container-type: inline-size;
  container-name: tcg-card;
}

.mobile-card--compact .mobile-card-title {
  font-size: clamp(6.5px, 8.4cqi, 11px);
}
