/*
 * Homepage only (index.html). Shared chrome — nav, buttons, footer, cookie
 * notice — stays in landing.css, which the product pages load too.
 */

.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;
}

.home-page {
  --card-surface: #111115;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ------------------------------------------------------------------ hero */

.home-hero {
  position: relative;
  isolation: isolate;
  padding-top: 116px;
  overflow-x: clip;
}

.hero-glow {
  position: absolute;
  inset: 0 0 auto;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(560px 420px at 78% 42%, rgb(255 211 61 / 0.12), transparent 70%),
    radial-gradient(720px 520px at 8% 0%, rgb(68 82 216 / 0.24), transparent 70%);
}

.hero-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
}

.home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
  min-height: min(720px, calc(100svh - 200px));
}

/* The search leads the hero, right under the nav, so it is above the fold on
   every screen; the copy column starts at the top instead of centring on the
   binder. */
.home-hero-copy {
  align-self: start;
}

.home-hero-copy > * {
  animation: rise 0.8s var(--ease-out) both;
}
.home-hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.home-hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.home-hero-copy > :nth-child(4) { animation-delay: 0.18s; }
.home-hero-copy > :nth-child(5) { animation-delay: 0.24s; }
.home-hero-copy > :nth-child(6) { animation-delay: 0.3s; }

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 11px;
  border: 1px solid rgb(255 211 61 / 0.32);
  border-radius: 999px;
  background: rgb(255 211 61 / 0.07);
  color: #ffe58a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgb(255 211 61 / 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero-popular + .hero-pill {
  margin-top: 44px;
}

.home-hero h1 {
  margin-top: 22px;
  font-size: clamp(46px, 6.1vw, 88px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-mark {
  background: linear-gradient(100deg, #ffe066 0%, var(--yellow) 45%, #ffb703 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-lede {
  max-width: 34ch;
  margin-top: 22px;
  color: #c6c6cf;
  font-size: 19px;
  line-height: 1.55;
}

/* Search: the marketplace header SearchBox (solid/src/components/SearchBox.jsx,
   hero variant). market/src/search-box.css paints its pickers, menus and popup
   once the island mounts; these rules make the large hero field, and paint the
   static first-paint copy in index.html the same way before it does. */

.hero-search-host {
  display: contents;
}

.home-hero-copy .search-hero {
  /* market/src/styles.css tokens the shared search rules read */
  --g3: #1f202d;
  --g4: #25222c;
  --g5: #38363f;
  --muted: #9d9aa4;
  --tcg-corner: 5% / 3.571%;
  --topbar-flag: 32px;
  --art-left: 0.086;
  --art-top: 0.126;
  --art-width: 0.828;
  --art-height: 0.338;
  --card-ratio: 0.715909;
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 600px;
  margin: 0;
}

.suggest-hover {
  --tcg-corner: 5% / 3.571%;
}

.home-hero-copy .search-hero .search-pill {
  display: flex;
  align-items: center;
  height: 66px;
  padding: 6px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: rgb(22 22 27 / 0.92);
  box-shadow:
    0 24px 60px -24px rgb(0 0 0 / 0.9),
    inset 0 1px 0 rgb(255 255 255 / 0.06);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.home-hero-copy .search-hero .search-pill:hover {
  border-color: rgb(255 255 255 / 0.24);
}

.home-hero-copy .search-hero .search-pill:focus-within {
  border-color: var(--yellow);
  box-shadow:
    0 0 0 5px rgb(255 211 61 / 0.14),
    0 24px 60px -24px rgb(0 0 0 / 0.9);
}

.home-hero-copy .search-hero .search-lead {
  display: flex;
  align-items: center;
  flex: none;
  gap: 2px;
  height: 100%;
  padding: 0 10px 0 8px;
  border: 0;
  border-right: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.home-hero-copy .search-hero :is(.game-select, .lang-toggle, .print-lang-toggle) {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  align-self: center;
  height: 100%;
}

.home-hero-copy .search-hero :is(.game-select, .lang-toggle, .print-lang-toggle) > button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: 44px;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--yellow);
}

.home-hero-copy .search-hero :is(.game-select, .lang-toggle, .print-lang-toggle) > button:hover,
.home-hero-copy .search-hero :is(.game-select, .lang-toggle, .print-lang-toggle) > button[aria-expanded="true"] {
  background: rgb(255 255 255 / 0.07);
  box-shadow: none;
}

.home-hero-copy .search-hero .lang-toggle > button:hover img,
.home-hero-copy .search-hero .lang-toggle > button[aria-expanded="true"] img {
  box-shadow: none;
}

.home-hero-copy .search-hero .game-icon {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.home-hero-copy .search-hero .lang-toggle img {
  display: block;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.home-hero-copy .search-hero .lang-caret {
  display: block;
  flex: none;
  width: 9px;
  height: 6px;
}

.home-hero-copy .search-hero .search-pill input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.home-hero-copy .search-hero .search-pill input::placeholder {
  color: #7f7f8b;
}

.home-hero-copy .search-hero .search-pill input::-webkit-search-cancel-button {
  appearance: none;
}

.home-hero-copy .search-hero .print-lang-toggle {
  display: flex;
  margin-right: 6px;
  padding-left: 6px;
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.home-hero-copy .search-hero .search-lens {
  position: relative;
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
}

.home-hero-copy .search-hero .search-go-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.home-hero-copy .search-hero .search-lens-mark {
  position: absolute;
  left: 38.33%;
  top: 38.33%;
  width: 62%;
  height: 62%;
  overflow: hidden;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.home-hero-copy .search-hero .search-lens-mark :is(img, svg) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero-copy .search-hero .search-go {
  flex: none;
  height: 100%;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  font-size: 15px;
  font-weight: 800;
  transition:
    background 0.2s,
    transform 0.2s;
}

.home-hero-copy .search-hero .search-go:hover {
  background: #ffe17b;
}

.home-hero-copy .search-hero .search-go:active {
  transform: scale(0.97);
}

/* Menus and popup open under the hero field, over the sections below it. */
.home-hero:has(.search-hero :is(.suggest, .lang-menu)) {
  z-index: 20;
}

/* Menus and popup open under the hero field. */
.home-hero-copy .search-hero .lang-menu {
  top: calc(100% + 4px);
}

.home-hero-copy .search-hero .suggest {
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  /* The island scrolls the field up when the popup would pass the fold. */
  max-height: min(34rem, calc(100vh - 13rem));
  border-color: var(--line-strong);
  border-radius: 22px;
  box-shadow: 0 32px 80px -12px rgb(0 0 0 / 0.9);
  animation: pop 0.16s ease-out;
}

/* styles.css primitives the popup rows use, at their marketplace specificity. */
:where(.search-hero) .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:where(.search-hero) .art-cut {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: calc(var(--art-width) * var(--card-ratio) / var(--art-height));
  border-radius: 8px;
}

:where(.search-hero) .art-cut img,
:where(.search-hero) .suggest-art .art-cut img {
  position: absolute;
  width: calc(100% / var(--art-width));
  max-width: none;
  height: auto;
  aspect-ratio: auto;
  left: calc(-100% * var(--art-left) / var(--art-width));
  top: calc(-100% * var(--art-top) / var(--art-height));
  object-fit: fill;
}

:where(.search-hero) .set-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #bec0c2;
}

:where(.search-hero) .set-shortcut.is-on:has(.set-shortcut-code) {
  border-radius: 0.55rem;
  background: rgb(35 31 32);
  box-shadow:
    0 0 0 1px rgb(255 211 61 / 0.45),
    0 0 12px rgb(255 211 61 / 0.4);
}

:where(.search-hero) .set-shortcut.is-on .set-shortcut-sym {
  filter:
    drop-shadow(0 0 3px rgb(255 211 61 / 0.95))
    drop-shadow(0 0 8px rgb(255 211 61 / 0.7))
    drop-shadow(0 0 16px rgb(255 211 61 / 0.35));
}

:where(.search-hero) .set-shortcut-sym {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

:where(.search-hero) .set-shortcut-code {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.hero-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.hero-popular > span {
  margin-right: 4px;
  color: #8d8d99;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-popular a {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.04);
  color: #d4d4dc;
  font-size: 13px;
  font-weight: 600;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}

.hero-popular a[aria-busy="true"] {
  border-color: rgb(255 211 61 / 0.5);
  background: rgb(255 211 61 / 0.12);
  color: #fff;
  cursor: progress;
}

.hero-popular a:hover {
  border-color: rgb(255 211 61 / 0.5);
  background: rgb(255 211 61 / 0.08);
  color: #fff;
}

.hero-ctas {
  margin-top: 34px;
  gap: 12px;
}

/* Visual: a binder of real cards, with the scan in progress */

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 600px;
}

.binder {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  padding: 22px 22px 24px 28px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 28px;
  background: linear-gradient(180deg, rgb(32 32 40 / 0.94), rgb(17 17 22 / 0.97));
  box-shadow:
    0 50px 120px -30px rgb(0 0 0 / 0.95),
    inset 0 1px 0 rgb(255 255 255 / 0.08);
  rotate: -2deg;
  animation: binder-in 1s var(--ease-out) 0.1s both;
}

.binder::before {
  content: "";
  position: absolute;
  top: 24%;
  bottom: 24%;
  left: -10px;
  width: 20px;
  background: radial-gradient(circle, #08080a 4.5px, rgb(255 255 255 / 0.3) 5.5px, transparent 7px) center / 20px calc(100% / 3) repeat-y;
}

.binder-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.binder-head strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.binder-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.binder-count {
  flex: none;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: #111 !important;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: 0 !important;
}

.binder-progress {
  height: 6px;
  margin: 16px 0 18px;
  overflow: hidden;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.08);
}

.binder-progress span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), #ffb300);
  animation: fill 1.6s var(--ease-out) 0.5s both;
}

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

.binder-slot {
  position: relative;
  aspect-ratio: 63 / 88;
  border-radius: 7px;
  background: rgb(255 255 255 / 0.04);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}

.binder-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  animation: slot-in 0.6s var(--ease-out) both;
}

.binder-slot:nth-child(2) img { animation-delay: 0.35s; }
.binder-slot:nth-child(3) img { animation-delay: 0.42s; }
.binder-slot:nth-child(4) img { animation-delay: 0.49s; }
.binder-slot:nth-child(5) img { animation-delay: 0.56s; }
.binder-slot:nth-child(6) img { animation-delay: 0.63s; }
.binder-slot:nth-child(7) img { animation-delay: 0.7s; }
.binder-slot:nth-child(8) img { animation-delay: 0.77s; }
.binder-slot:nth-child(9) img { animation-delay: 0.84s; }

.binder-slot.is-scanning {
  overflow: hidden;
  box-shadow:
    0 0 0 2px var(--yellow),
    0 0 28px rgb(255 211 61 / 0.35);
}

/* A signed-in visitor's own first page (solid/src/landing/binder.js). Until
   it paints, a warm visit (html.binder-mine, set by landing-boot.js) holds the
   demo cards and count back; they still slot in after 3 s if it never does. */
.binder-mine .binder:not(.is-own) .binder-slot img,
.binder-mine .binder:not(.is-own) .binder-progress span {
  animation-delay: 3s;
}

.binder-mine .binder:not(.is-own) .binder-count {
  animation: binder-hold 0.3s 3s both;
}

a.binder-slot {
  color: inherit;
}

a.binder-slot img {
  transition: translate 0.2s var(--ease-out);
}

a.binder-slot:hover img {
  translate: 0 -3px;
}

a.binder-slot:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.binder-slot .scan-line {
  position: absolute;
  left: 6%;
  right: 6%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
  box-shadow: 0 0 14px var(--yellow);
  animation: scan 2.6s ease-in-out infinite;
}

.float-card {
  --r: 0deg;
  position: absolute;
  z-index: 1;
  width: 150px;
  border-radius: 9px;
  box-shadow: 0 30px 60px -16px rgb(0 0 0 / 0.85);
  animation: float 7s ease-in-out infinite;
}

.float-card-a {
  --r: -13deg;
  top: 5%;
  left: 0;
}

.float-card-b {
  --r: 11deg;
  z-index: 3;
  right: -1%;
  bottom: 5%;
  width: 138px;
  animation-delay: -2.5s;
}

.float-card-c {
  --r: 8deg;
  top: 4%;
  right: 6%;
  width: 112px;
  opacity: 0.85;
  animation-delay: -4.5s;
}

/* Where the hero has room beside the 420px binder (wide desktop, and the
   stacked tablet layout), Umbreon and Sylveon peek out from behind its edges
   instead of hiding under it: Umbreon tucks ~16px behind it, Sylveon ~40px.
   Umbreon sits a fifth of the way down, beside the headline rather than the
   search pill that now leads the copy column. */
@media (min-width: 1180px), (min-width: 721px) and (max-width: 900px) {
  .float-card-a {
    top: 20%;
    left: auto;
    right: calc(50% + min(50%, 210px) - 16px);
  }
  .float-card-c {
    right: auto;
    left: calc(50% + min(50%, 210px) - 40px);
  }
}

/* Off-screen hero: its endless float/scan/marquee loops stop compositing. */
.home-hero.is-offscreen .float-card,
.home-hero.is-offscreen .floating-chip,
.home-hero.is-offscreen .hero-marquee-track,
.home-hero.is-offscreen .scan-line,
.home-hero.is-offscreen .hero-pill-dot {
  animation-play-state: paused;
}

.floating-chip {
  --r: 0deg;
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 17px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 999px;
  background: rgb(28 28 34 / 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -10px #000;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}

.chip-identified {
  top: 22%;
  left: -3%;
}

.chip-added {
  bottom: 13%;
  left: 3%;
  animation-delay: -3s;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 4px rgb(61 220 132 / 0.2);
}

.chip-plus {
  color: var(--yellow);
}

/* Marquee */

.hero-marquee {
  margin-top: 72px;
  overflow: hidden;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.hero-marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.hero-marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  padding: 20px 0 20px 32px;
  color: #b4b4bf;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.hero-marquee-track span::after {
  content: "✦";
  color: var(--yellow);
  font-size: 12px;
}

/* -------------------------------------------------------------- sections */

.home-rail {
  padding-top: 104px;
}

.home-tools,
.home-sell,
.home-companions {
  padding-top: 128px;
}

.home-companions {
  padding-bottom: 128px;
}

.home-page .site-footer {
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.kicker {
  margin-bottom: 14px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-head h2 {
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.home-head-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
}

.pill-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.03);
  font-size: 14px;
  font-weight: 700;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}

.pill-link:hover {
  border-color: var(--yellow);
  background: rgb(255 211 61 / 0.06);
  color: var(--yellow);
}

/* Best sellers: the marketplace Carousel + CardTile (market/src/styles.css). */

.landing-rail {
  --bg: #08080a;
  --g3: #1f202d;
  --g4: #1b1a20;
  --g5: #38363f;
  --text: #fff;
  --muted: #9d9aa4;
  --tcg-corner: 5% / 3.571%;
  min-height: 25rem;
}

html:not(.js) .home-rail {
  display: none;
}

.landing-rail .carousel {
  position: relative;
}

.landing-rail .carousel-head {
  display: none;
}

/* The rail's arrow gutters use negative inline margins; keep them from
   widening the page (820px viewport scrolled sideways by 17px). */
.home-rail {
  overflow-x: clip;
}

/* Below-the-fold sections render when they come near the viewport instead
   of all at once while the visitor scrolls into them. */
.home-tools,
.home-sell,
.home-companions {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

.landing-rail .rail-wrap {
  --rail-art-pad: 1.9rem;
  --rail-hover-bleed: 1.25rem;
  --rail-gutter: 52px;
  --rail-gutter-gap: 0.4rem;
  --rail-tile: 13.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.landing-rail .rail-scroll {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: calc(-1 * var(--rail-hover-bleed));
  margin-inline: -0.75rem;
  padding-top: var(--rail-hover-bleed);
  padding-inline: 0.75rem;
}

.landing-rail .rail-scroll::-webkit-scrollbar,
.landing-rail .carousel-track::-webkit-scrollbar {
  display: none;
}

.landing-rail .carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--rail-tile);
  align-items: start;
  gap: 0.6rem;
  min-width: 0;
  margin-top: -1.2rem;
  padding-top: var(--rail-art-pad);
  padding-bottom: 1.5rem;
  overflow: visible;
  scroll-snap-type: x mandatory;
}

.landing-rail .rail-prev,
.landing-rail .rail-next {
  display: none;
  position: relative;
  z-index: 8;
  width: var(--rail-gutter);
  height: var(--rail-gutter);
  margin-top: calc(var(--rail-art-pad) + (var(--rail-tile) * 88 / 63) / 2 - 26px);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgb(20 20 24 / 0.8);
  backdrop-filter: blur(10px);
  color: #fff;
  transition:
    border-color 0.2s,
    opacity 0.2s;
}

.landing-rail .rail-prev:hover,
.landing-rail .rail-next:hover {
  border-color: var(--yellow);
}

.landing-rail .rail-prev:disabled,
.landing-rail .rail-next:disabled {
  opacity: 0;
  pointer-events: none;
}

.landing-rail .rail-prev svg,
.landing-rail .rail-next svg {
  width: 26px;
  height: 26px;
}

.landing-rail .tile {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--g4);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.05);
  color: inherit;
  scroll-snap-align: start;
  transition: background 0.2s;
}

.landing-rail .tile:hover {
  z-index: 4;
  background: #222128;
}

.landing-rail .tile-art {
  display: block;
  width: 100%;
  padding: 0.55rem;
  line-height: 0;
}

.landing-rail .tile-art img,
.landing-rail .tile-art .tile-ph {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 63 / 88;
  object-fit: contain;
}

.landing-rail .tile img {
  transform-origin: 50% 100%;
  transition:
    transform 0.14s ease-out,
    filter 0.14s ease-out;
}

.landing-rail .tile:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 14px 22px rgb(0 0 0 / 0.5));
}

.landing-rail .tile-ph {
  border-radius: var(--tcg-corner);
  background: var(--g3) url("/home/missing-card.webp") center / contain no-repeat;
}

.landing-rail .tile-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.2rem;
  padding: 0.5rem 0.7rem 0.85rem;
}

.landing-rail .tile-meta strong {
  overflow: hidden;
  font-size: 0.98rem;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.landing-rail .tile-id {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.landing-rail .price {
  color: var(--yellow);
  font-size: 1.12rem;
  font-weight: 800;
}

.landing-rail .oos {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.landing-rail .px-stack {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  white-space: nowrap;
  vertical-align: middle;
}

.landing-rail .px-local {
  color: var(--text);
  font-size: 0.62em;
  font-weight: 700;
}

.landing-rail .px-pkn {
  color: var(--yellow);
}

.landing-rail .px-local.is-solo {
  color: var(--yellow);
  font-size: 1em;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.landing-rail .px-pending {
  display: inline-block;
  min-width: 4.5rem;
  min-height: 1.15em;
}

.landing-rail .tile-skel {
  pointer-events: none;
}

.landing-rail .skel-line {
  display: block;
  width: 78%;
  height: 0.7rem;
  border-radius: 4px;
}

.landing-rail .skel-line-sm {
  width: 52%;
  height: 0.55rem;
}

.landing-rail .skel-inline {
  display: inline-block;
  vertical-align: middle;
}

.landing-rail .tile-skel .tile-ph,
.landing-rail .tile-skel .skel-line,
.landing-rail-skeleton > span {
  background: linear-gradient(90deg, var(--g3) 0%, var(--g5) 50%, var(--g3) 100%) 0 0 / 200% 100%;
  animation: skel-shimmer 1.2s ease-in-out infinite;
}

/* Static placeholder until the island paints the rail. */
.landing-rail-skeleton {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 13.5rem;
  gap: 0.6rem;
  overflow: hidden;
  padding-top: 0.7rem;
}

.landing-rail-skeleton > span {
  height: 24.5rem;
  border-radius: 18px;
}

@media (min-width: 720px) {
  .landing-rail .rail-wrap {
    grid-template-columns: var(--rail-gutter) minmax(0, 1fr) var(--rail-gutter);
    column-gap: var(--rail-gutter-gap);
    margin-inline: calc(-1 * (var(--rail-gutter) + var(--rail-gutter-gap)));
  }
  .landing-rail .rail-wrap > .rail-scroll {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-inline: 0;
    padding-inline: calc(var(--rail-gutter) + var(--rail-gutter-gap));
  }
  .landing-rail .rail-wrap > .rail-prev,
  .landing-rail .rail-wrap > .rail-next {
    display: grid;
    place-items: center;
  }
  .landing-rail .rail-wrap > .rail-prev { grid-column: 1; grid-row: 1; }
  .landing-rail .rail-wrap > .rail-next { grid-column: 3; grid-row: 1; }
}

/* Tools */

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

.home-tool,
.home-return,
.home-companion {
  position: relative;
  border-radius: 28px;
  transition:
    transform 0.4s var(--ease-out),
    border-color 0.3s,
    box-shadow 0.4s var(--ease-out);
}

.home-tool {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card-surface);
}

.home-tool:hover,
.home-companion:hover {
  transform: translateY(-6px);
  border-color: rgb(255 211 61 / 0.35);
  box-shadow: 0 34px 80px -34px rgb(255 211 61 / 0.28);
}

.home-tool-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 260px;
  overflow: hidden;
}

.tool-scan {
  background: radial-gradient(circle at 50% 62%, #3b47cc 0%, #1c205e 55%, #121232 100%);
}

.tool-collect {
  background: radial-gradient(circle at 50% 62%, #7b3e1f 0%, #2b1b14 58%, #17120f 100%);
}

.tool-market {
  background: radial-gradient(circle at 50% 62%, #1f6f58 0%, #12302a 58%, #0d1a17 100%);
}

.home-tool-art img {
  width: 132px;
  border-radius: 7px;
  box-shadow: 0 26px 50px -14px rgb(0 0 0 / 0.85);
  transition: transform 0.6s var(--ease-out);
}

.tool-scan img {
  transform: rotate(-4deg);
}

.home-tool:hover .tool-scan img {
  transform: rotate(0) scale(1.05);
}

.tool-bracket {
  position: absolute;
  width: 158px;
  aspect-ratio: 63 / 88;
  border: 2px solid rgb(255 211 61 / 0.85);
  border-radius: 12px;
  box-shadow: 0 0 30px rgb(255 211 61 / 0.25);
  animation: pulse-ring 2.8s ease-in-out infinite;
}

.tool-collect img {
  position: absolute;
  transform: translateX(-36px) rotate(-10deg);
}

.tool-collect img + img {
  transform: translateX(36px) rotate(8deg) translateY(8px);
}

.home-tool:hover .tool-collect img {
  transform: translateX(-52px) rotate(-14deg) translateY(-6px);
}

.home-tool:hover .tool-collect img + img {
  transform: translateX(52px) rotate(12deg) translateY(2px);
}

.tool-market img {
  transform: rotate(5deg);
}

.home-tool:hover .tool-market img {
  transform: rotate(0) scale(1.05);
}

.tool-chip {
  position: absolute;
  bottom: 18px;
  left: 18px;
  padding: 7px 13px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 999px;
  background: rgb(8 8 10 / 0.65);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
}

.home-tool-copy {
  padding: 26px 28px 30px;
}

.tool-step,
.return-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-step {
  color: var(--yellow);
}

.home-tool-copy h3 {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.home-tool-copy p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.tool-arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 50%;
  background: rgb(8 8 10 / 0.5);
  backdrop-filter: blur(8px);
  color: #fff;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}

.tool-arrow svg {
  width: 18px;
  height: 18px;
}

a:hover > .tool-arrow {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #111;
}

/* Sell */

.home-return-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.home-return {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 40px;
  overflow: hidden;
}

.home-return:hover {
  transform: translateY(-6px);
}

.return-credit {
  background:
    radial-gradient(circle at 88% 0%, rgb(255 248 200 / 0.9) 0%, transparent 42%),
    var(--yellow);
  color: #15120a;
}

.return-managed {
  border: 1px solid rgb(122 132 255 / 0.25);
  background:
    radial-gradient(circle at 88% 0%, rgb(85 99 255 / 0.4), transparent 50%),
    linear-gradient(160deg, #21255f, #11132f);
}

.return-managed .return-label {
  color: #b3baff;
}

.return-credit .return-label {
  opacity: 0.75;
}

.return-label {
  padding-right: 56px;
}

.home-return-number {
  margin-top: auto;
  padding-top: 36px;
  font-size: clamp(76px, 8vw, 116px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.home-return-number span {
  margin-left: 4px;
  font-size: 0.42em;
  letter-spacing: 0;
}

.home-return h3 {
  margin-top: 18px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.home-return h3 + p {
  max-width: 36ch;
  margin-top: 10px;
  font-size: 15px;
  opacity: 0.78;
}

.return-credit .tool-arrow {
  border-color: rgb(21 18 10 / 0.18);
  background: rgb(21 18 10 / 0.08);
  color: #15120a;
}

.return-credit:hover > .tool-arrow {
  border-color: #15120a;
  background: #15120a;
  color: var(--yellow);
}

.home-self-sell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 18px 20px 18px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card-surface);
}

.home-self-sell p {
  color: var(--muted);
  font-size: 15px;
}

.home-self-sell strong {
  color: var(--text);
}

/* Companions */

.home-companion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.home-companion {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 30px 84px 30px 30px;
  border: 1px solid var(--line);
  background: var(--card-surface);
}

.companion-poko {
  background:
    radial-gradient(circle at 0% 50%, rgb(255 211 61 / 0.1), transparent 55%),
    var(--card-surface);
}

.companion-mascot {
  width: 64px;
  height: auto;
  image-rendering: pixelated;
}

.companion-glyph {
  color: var(--yellow);
}

.companion-glyph svg {
  display: block;
  width: 52px;
  height: 52px;
}

.home-companion h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.home-companion p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.home-companion .tool-arrow {
  top: 50%;
  right: 26px;
  margin-top: -21px;
}

/* ---------------------------------------------------------------- motion */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    translate: 0 32px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 18px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes binder-in {
  from {
    opacity: 0;
    translate: 0 40px;
    rotate: 4deg;
  }
  to {
    opacity: 1;
    translate: 0 0;
    rotate: -2deg;
  }
}

@keyframes slot-in {
  from {
    opacity: 0;
    scale: 0.9;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes binder-hold {
  from {
    opacity: 0;
  }
}

@keyframes fill {
  from {
    width: 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--r));
  }
  50% {
    transform: translateY(-14px) rotate(calc(var(--r) + 2deg));
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgb(255 211 61 / 0.18);
  }
  50% {
    box-shadow: 0 0 0 7px rgb(255 211 61 / 0.06);
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    opacity: 0.55;
    scale: 1;
  }
  50% {
    opacity: 1;
    scale: 1.03;
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

@keyframes skel-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1050px) {
  .home-hero-inner {
    gap: 32px;
  }
  .home-tool-copy {
    padding: 22px 22px 26px;
  }
  .home-tool-copy h3 {
    font-size: 24px;
  }
  .home-tool-art {
    height: 220px;
  }
  .home-return {
    padding: 32px;
  }
  .home-companion {
    padding: 26px 76px 26px 26px;
  }
  .home-companion h2 {
    font-size: 24px;
  }
}

@media (max-width: 900px) {
  .home-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    min-height: 0;
  }
  .hero-visual {
    min-height: 520px;
  }
  .home-tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-tool {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    align-items: center;
  }
  .home-tool-art {
    height: 100%;
    min-height: 220px;
  }
}

@media (max-width: 720px) {
  .home-hero {
    padding-top: 96px;
  }
  .hero-popular + .hero-pill {
    margin-top: 32px;
  }
  .hero-pill {
    font-size: 11px;
  }
  .home-hero h1 {
    margin-top: 20px;
    font-size: clamp(44px, 12.5vw, 60px);
  }
  .home-lede {
    font-size: 17px;
  }
  .home-hero-copy .search-hero {
    margin-top: 0;
  }
  .home-hero-copy .search-hero .search-pill {
    height: 58px;
    padding: 5px;
  }
  .home-hero-copy .search-hero .search-lead {
    gap: 0;
    padding: 0 4px 0 2px;
  }
  .home-hero-copy .search-hero :is(.game-select, .lang-toggle, .print-lang-toggle) > button {
    gap: 3px;
    height: 40px;
    padding: 0 5px;
  }
  .home-hero-copy .search-hero .game-icon {
    width: 19px;
    height: 19px;
  }
  .home-hero-copy .search-hero .lang-toggle img {
    width: 22px;
    height: 22px;
  }
  .home-hero-copy .search-hero .search-lens {
    width: 28px;
    height: 28px;
  }
  .home-hero-copy .search-hero .print-lang-toggle {
    margin-right: 4px;
    padding-left: 2px;
  }
  .home-hero-copy .search-hero .search-pill input {
    padding: 0 8px;
    font-size: 16px;
  }
  /* Phones: the Search button keeps its name for screen readers and shows an
     arrow, so the field keeps room for the query. */
  .home-hero-copy .search-hero .search-go {
    position: relative;
    width: 46px;
    padding: 0;
    font-size: 0;
  }
  .home-hero-copy .search-hero .search-go::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .hero-ctas {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 26px;
  }
  .hero-visual {
    min-height: 450px;
    margin-top: 12px;
  }
  .binder {
    width: min(82%, 320px);
    padding: 16px 16px 18px 20px;
    border-radius: 22px;
  }
  .binder-grid {
    gap: 7px;
  }
  .binder-progress {
    margin: 12px 0 14px;
  }
  .float-card {
    width: 96px;
  }
  .float-card-b {
    width: 90px;
  }
  .float-card-c {
    display: none;
  }
  .floating-chip {
    padding: 8px 13px;
    font-size: 12px;
  }
  .chip-identified {
    left: 0;
  }
  .hero-marquee {
    margin-top: 40px;
  }
  .hero-marquee-track span {
    padding-block: 16px;
    font-size: 13px;
  }
  .home-rail {
    padding-top: 72px;
  }
  .home-tools,
  .home-sell,
  .home-companions {
    padding-top: 88px;
  }
  .home-companions {
    padding-bottom: 88px;
  }
  .home-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 26px;
  }
  .home-head-sub {
    font-size: 15px;
  }
  .landing-rail .rail-wrap {
    --rail-tile: 11.25rem;
  }
  .landing-rail-skeleton {
    grid-auto-columns: 11.25rem;
  }
  .landing-rail-skeleton > span {
    height: 21rem;
  }
  .landing-rail {
    min-height: 21.5rem;
  }
  .home-tool {
    display: flex;
    align-items: stretch;
  }
  .home-tool-art {
    height: 210px;
    min-height: 0;
  }
  .home-return-grid,
  .home-companion-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .home-return {
    min-height: 0;
    padding: 28px;
    border-radius: 24px;
  }
  .home-return-number {
    padding-top: 26px;
    font-size: 78px;
  }
  .home-return h3 {
    font-size: 26px;
  }
  .home-self-sell {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .home-companion {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 22px 70px 22px 22px;
    border-radius: 24px;
  }
  .companion-mascot {
    width: 48px;
  }
  .companion-glyph svg {
    width: 40px;
    height: 40px;
  }
  .home-companion h2 {
    font-size: 23px;
  }
  .home-companion .tool-arrow {
    right: 18px;
  }
  .home-page .site-footer {
    padding-top: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-copy > *,
  .binder,
  .binder-slot img,
  .float-card,
  .floating-chip,
  .hero-marquee-track,
  [data-reveal] {
    animation: none !important;
  }
}
