/* ============================================================================
   GACHAPON — style.css

   A capsule vending machine at night. Candy reds, electric blues and a warm
   gold, all sitting on deep navy, lit from behind by two soft lamps. Everything
   that holds content is a rounded plastic shell: a real radius, a top-edge
   highlight, a soft shadow underneath. Nothing has a coloured left rail — a bar
   down the side of a card is a document convention and this is a toy shop.

   Type:  FREDOKA   — the rounded display face. Headlines, numbers, tags.
          FIGTREE   — the body face. Everything you actually read.
   Both are vendored as variable woff2 in public/vendor/ and nothing is fetched
   from Google at runtime.

   Motion: capsules rattle, the lamps breathe, the fuse pops. Every one of those
   is inside the prefers-reduced-motion block at the bottom, which turns them all
   off and leaves the page identical in every other respect.
   ========================================================================= */

@font-face {
  font-family: "Fredoka";
  src: url("vendor/fredoka-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("vendor/figtree-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* the night */
  --ink: #080b23;
  --ink-2: #0c1030;
  --shell: #151b47;
  --shell-2: #1b2258;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);

  /* the candy */
  --red: #e42f45;
  --red-2: #ff5f70;
  --blue: #2f6bff;
  --blue-2: #5b8dff;
  --gold: #ffc93f;
  --gold-2: #ffe89a;
  --aqua: #4fdcfa;
  --pink: #fb6fd6;
  --lime: #b2fb55;
  --cream: #fdf3dd;

  /* the ink on top */
  --text: #f0f2ff;
  --muted: #9fa8d8;
  --dim: #737ead;

  --r-xl: 30px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;

  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .85);
  --lift: inset 0 2px 0 rgba(255, 255, 255, .16), inset 0 -2px 0 rgba(0, 0, 0, .28);

  --wrap: 1120px;
  --pad: 28px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.62 Figtree, "Segoe UI", system-ui, sans-serif;
  letter-spacing: .002em;
  overflow-x: hidden;
}

.display { font-family: Fredoka, Figtree, system-ui, sans-serif; font-weight: 600; letter-spacing: -.01em; }

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

/* One cell of a sample SHEET, cropped by background-position. It is how a grid
   of twelve shows twelve different capsules while the art host is still down —
   sixteen real sealed capsules and twenty-four real toys live in two PNGs, and
   main.js picks a cell from the id. */
.tile {
  display: block; width: 100%; height: 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

/* ------------------------------------------------------ the night-market glow
   Two lamps and a fine dot grid, fixed behind everything, never hit-testable. */
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow i { position: absolute; display: block; }
.glow-a, .glow-b { border-radius: 50%; filter: blur(90px); opacity: .5; }
.glow-a {
  width: 62vw; height: 62vw; max-width: 780px; max-height: 780px;
  left: -14vw; top: -18vw;
  background: radial-gradient(circle, var(--red) 0%, rgba(228, 47, 69, 0) 68%);
  animation: breathe 11s ease-in-out infinite;
}
.glow-b {
  width: 58vw; height: 58vw; max-width: 720px; max-height: 720px;
  right: -16vw; top: 12vw;
  background: radial-gradient(circle, var(--blue) 0%, rgba(47, 107, 255, 0) 68%);
  animation: breathe 13s ease-in-out infinite reverse;
}
.glow-grid {
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .085) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
}
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .42; } 50% { transform: scale(1.12); opacity: .6; } }

main, .top, .foot { position: relative; z-index: 1; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 30;
  background: var(--gold); color: #1a1400; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* ============================================================== the top bar
   One slim line. Nothing may push the hero sentence down the page. */
.top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  max-width: var(--wrap); margin: 0 auto; padding: 14px var(--pad) 6px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; font-size: 20px; letter-spacing: .04em;
}
.wordmark .display { font-weight: 700; }
.wm-dot {
  width: 17px; height: 17px; border-radius: 50%;
  background: linear-gradient(180deg, var(--red) 0 50%, var(--cream) 50% 100%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 0 16px rgba(228, 47, 69, .8);
}
.topnav { display: flex; gap: 18px; margin-left: auto; }
.topnav a {
  text-decoration: none; color: var(--muted); font-size: 12.5px; font-weight: 700;
  letter-spacing: .1em; padding: 4px 0; border-bottom: 2px solid transparent;
}
.topnav a:hover { color: var(--text); border-bottom-color: var(--gold); }
.toppills { display: flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--muted);
  text-decoration: none;
}
.pill-go b { color: var(--gold); font-family: Fredoka, sans-serif; font-size: 13px; }
.pill-go:hover { border-color: var(--gold); color: var(--text); }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.led.on { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.led.blink { background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: blink 1.8s ease-in-out infinite; }
.led.hot { background: var(--red-2); box-shadow: 0 0 10px var(--red-2); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ================================================================= the hero */
.hero {
  max-width: var(--wrap); margin: 0 auto; padding: 10px var(--pad) 48px;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 40px; align-items: start;
}
.hero-copy { min-width: 0; }

.hero-h1 {
  margin: 6px 0 18px;
  font-size: clamp(38px, 6.4vw, 78px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -.022em;
  text-wrap: balance;
  color: #fff;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .28), 0 0 46px rgba(255, 201, 63, .18);
}
.hero-sub {
  margin: 0 0 26px; max-width: 34em;
  font-size: clamp(16.5px, 1.55vw, 19.5px); line-height: 1.55; color: var(--muted);
}
.hero-sub b { color: var(--gold-2); font-weight: 700; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 0; }

/* ------------------------------------------------------------- the capsules */
.hero-art { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 6px; }
.caps {
  display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2.5vw, 22px);
  width: 100%;
}
.cap {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: inherit; color: inherit; min-width: 0;
}
.cap-art {
  position: relative; display: block;
  width: clamp(118px, 21vw, 196px); aspect-ratio: 1;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--shell-2), var(--shell));
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow), var(--lift);
  overflow: hidden;
  animation: rattle 2.6s ease-in-out infinite;
}
#capB .cap-art { animation-delay: .55s; animation-duration: 3.1s; }
.cap-art img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated;
  transition: opacity .18s ease, transform .3s cubic-bezier(.2, 1.6, .5, 1);
}
.cap-open { opacity: 0; transform: scale(.72); }
.cap.is-open .cap-art { animation: pop .42s cubic-bezier(.2, 1.6, .4, 1); }
.cap.is-open .cap-sealed { opacity: 0; transform: scale(1.25); }
.cap.is-open .cap-open { opacity: 1; transform: scale(1); }
.cap.is-open .cap-tag { background: var(--gold); color: #221800; border-color: transparent; }
.cap-tag {
  font-family: Fredoka, sans-serif; font-weight: 600; font-size: 11.5px; letter-spacing: .14em;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--muted);
  transition: background .2s, color .2s;
}
.cap:focus-visible .cap-art, .cap:hover .cap-art { border-color: var(--gold); }
.cap-plus { font-size: clamp(22px, 3vw, 36px); color: var(--dim); font-weight: 700; }
.hero-art-say { margin: 0; font-size: 14px; color: var(--dim); text-align: center; }

.strip { margin: 8px 0 0; width: 100%; max-width: 520px; }
.strip img {
  width: 100%; height: auto; image-rendering: pixelated;
  border-radius: var(--r-md); border: 1px solid var(--line);
  background: rgba(0, 0, 0, .3);
}
.strip figcaption { margin-top: 9px; font-size: 12.5px; color: var(--dim); text-align: center; }

@keyframes rattle {
  0%, 62%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  66% { transform: translate3d(-2px, 0, 0) rotate(-1.4deg); }
  70% { transform: translate3d(2px, 0, 0) rotate(1.4deg); }
  74% { transform: translate3d(-2px, 0, 0) rotate(-1deg); }
  78% { transform: translate3d(1px, 0, 0) rotate(.7deg); }
  82% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
@keyframes pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.1) rotate(-2deg); }
  70% { transform: scale(.97) rotate(1deg); }
  100% { transform: scale(1); }
}

/* ============================================================ the two panels
   The mint panel and the fuse panel are the same plastic shell. */
.mint, .fusebox {
  background: linear-gradient(180deg, var(--shell-2), var(--shell));
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow), var(--lift);
  padding: 22px 22px 18px;
}
.mint { max-width: 520px; }

.k {
  margin: 0; font-family: Fredoka, sans-serif; font-weight: 600;
  font-size: 11.5px; letter-spacing: .18em; color: var(--gold);
}
.k-lead { margin-bottom: 10px; }

.mint-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mint-count { margin: 0; font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.mint-count b { font-size: 24px; color: var(--text); margin-right: 6px; }
.mint-bar {
  height: 9px; border-radius: 999px; margin: 12px 0 14px;
  background: rgba(0, 0, 0, .42); overflow: hidden; border: 1px solid var(--line);
}
.mint-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 999px; transition: width .5s ease;
}

.mint-split { display: flex; gap: 10px; margin: 0 0 14px; }
.split {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 9px 13px;
}
.split b { font-size: 21px; line-height: 1.2; }
.split span { font-size: 10.5px; letter-spacing: .14em; color: var(--dim); font-weight: 700; }
.split-sealed b { color: var(--aqua); }
.split-open b { color: var(--gold); }

.mint-state, .fuse-state {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 14px; padding: 12px 14px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 15px; line-height: 1.45; color: var(--text);
}
.mint-state .dot, .fuse-state .dot {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px;
  background: var(--blue-2); box-shadow: 0 0 9px var(--blue-2);
}
.mint-state.ok, .fuse-state.ok { border-color: rgba(178, 251, 85, .4); }
.mint-state.ok .dot, .fuse-state.ok .dot { background: var(--lime); box-shadow: 0 0 9px var(--lime); }
.mint-state.warn, .fuse-state.warn { border-color: rgba(255, 201, 63, .45); }
.mint-state.warn .dot, .fuse-state.warn .dot { background: var(--gold); box-shadow: 0 0 9px var(--gold); }
.mint-state.bad, .fuse-state.bad { border-color: rgba(228, 47, 69, .5); }
.mint-state.bad .dot, .fuse-state.bad .dot { background: var(--red-2); box-shadow: 0 0 9px var(--red-2); }
.mint-state.wait .dot, .fuse-state.wait .dot { background: var(--muted); box-shadow: none; animation: blink 1.2s ease-in-out infinite; }
.mint-state b, .fuse-state b { color: var(--gold-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: Fredoka, sans-serif; font-weight: 600; font-size: 15px; letter-spacing: .07em;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; color: #fff;
  transition: transform .12s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-main {
  width: 100%;
  background: linear-gradient(180deg, var(--red-2), var(--red));
  box-shadow: 0 10px 22px -10px rgba(228, 47, 69, .9), var(--lift);
  font-size: 17px; padding: 16px 22px;
}
.btn-main:hover { filter: brightness(1.08); }
.btn-fuse { background: linear-gradient(180deg, var(--blue-2), var(--blue)); box-shadow: 0 10px 22px -10px rgba(47, 107, 255, .9), var(--lift); }
.btn-main.is-dead, .btn:disabled {
  background: rgba(255, 255, 255, .07); color: var(--dim);
  box-shadow: none; cursor: not-allowed; filter: none;
}
.btn-main.is-wait { background: linear-gradient(180deg, #4b5490, #363e72); }
.btn-ghost {
  background: rgba(255, 255, 255, .05); border-color: var(--line-2); color: var(--text);
  font-size: 13px; padding: 11px 18px;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-small { font-size: 11.5px; padding: 8px 14px; }

.mint-msg, .fuse-msg {
  margin: 13px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--dim); min-height: 1.4em;
}
.mint-msg.ok, .fuse-msg.ok { color: var(--lime); }
.mint-msg.err, .fuse-msg.err { color: var(--red-2); }
.mint-tx { margin: 8px 0 0; font-size: 12px; letter-spacing: .06em; color: var(--dim); }
.mint-tx a { color: var(--aqua); }
.mint-foot, .fuse-foot {
  margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--line);
  font-size: 10.5px; letter-spacing: .12em; font-weight: 700; color: var(--dim);
}
.unknown { color: var(--dim); font-family: Figtree, sans-serif; }

/* ================================================================== the bands */
.band { padding: 54px 0; }
.band-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.band-how { background: linear-gradient(180deg, rgba(47, 107, 255, .07), transparent 70%); }
.band-fuse { background: linear-gradient(180deg, rgba(255, 201, 63, .06), transparent 70%); }
.band-answers { background: linear-gradient(180deg, rgba(228, 47, 69, .06), transparent 70%); }

.h2 {
  margin: 0 0 16px; font-size: clamp(27px, 3.6vw, 42px); line-height: 1.1;
  font-weight: 700; letter-spacing: -.018em; text-wrap: balance;
}
.h3 { margin: 40px 0 14px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 21px; }
.band-say { margin: 0 0 22px; max-width: 62ch; color: var(--muted); font-size: 16.5px; }
.band-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------ how it works */
.steps {
  list-style: none; margin: 0 0 22px; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}
.step {
  background: linear-gradient(180deg, var(--shell-2), var(--shell));
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow), var(--lift);
  padding: 22px 22px 20px; min-width: 0;
}
.step-n {
  margin: 0 0 12px; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 700; color: #241800;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 6px 14px -6px rgba(255, 201, 63, .9);
}
.step-h { margin: 0 0 8px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 20px; line-height: 1.2; }
.step-p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.how-kicker {
  margin: 0; padding: 18px 22px; border-radius: var(--r-lg);
  background: rgba(178, 251, 85, .07); border: 1px solid rgba(178, 251, 85, .28);
  font-size: 16.5px; color: var(--text);
}
.how-kicker b { color: var(--lime); }

/* -------------------------------------------------------------- the fuse -- */
.fusebox { max-width: 860px; }
.fuse-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fuse-k { margin: 0; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 11.5px; letter-spacing: .18em; color: var(--aqua); }
.fuse-count { margin: 0; font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }

.fuse-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px; margin: 0 0 16px;
}
.fuse-grid:empty { display: none; }
.pick {
  appearance: none; border: 1px solid var(--line); background: rgba(0, 0, 0, .3);
  border-radius: var(--r-md); padding: 9px; cursor: pointer; color: inherit; font: inherit;
  display: flex; flex-direction: column; gap: 7px; align-items: center; min-width: 0;
  transition: border-color .15s, transform .12s, background .15s;
}
.pick:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pick .pick-art {
  width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden;
  background: rgba(255, 255, 255, .04); display: grid; place-items: center;
}
.pick .pick-art img { width: 100%; height: 100%; image-rendering: pixelated; }
.pick .pick-art.empty::after { content: "?"; font-family: Fredoka, sans-serif; font-size: 26px; color: var(--dim); }
.pick-id { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 13px; }
.pick-tag { font-size: 9.5px; letter-spacing: .12em; font-weight: 700; color: var(--dim); }
.pick.is-on { border-color: var(--gold); background: rgba(255, 201, 63, .12); box-shadow: 0 0 0 2px rgba(255, 201, 63, .3); }
.pick.is-on .pick-tag { color: var(--gold); }
.pick.is-done { opacity: .42; cursor: default; }
.pick.is-done:hover { transform: none; border-color: var(--line); }
.pick.is-done .pick-tag { color: var(--gold); }

.fuse-stage { margin: 4px 0 16px; }
.stage-pair { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.stage-cap {
  width: clamp(108px, 24vw, 168px); aspect-ratio: 1; border-radius: var(--r-lg);
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line-2); overflow: hidden;
  display: grid; place-items: center;
}
.stage-cap img { width: 100%; height: 100%; image-rendering: pixelated; }
.stage-cap.empty::after { content: "?"; font-family: Fredoka, sans-serif; font-size: 40px; color: var(--dim); }
.stage-x { font-family: Fredoka, sans-serif; font-size: 26px; color: var(--gold); font-weight: 700; }
.stage-say { margin: 14px 0 0; text-align: center; font-family: Fredoka, sans-serif; font-size: 19px; color: var(--gold-2); }
.is-shaking .stage-cap { animation: shake .5s ease-in-out infinite; }
.is-shaking .stage-cap:last-child { animation-delay: .12s; }
.is-popping .stage-cap { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes shake {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  25% { transform: translate3d(-3px, 1px, 0) rotate(-2deg); }
  75% { transform: translate3d(3px, -1px, 0) rotate(2deg); }
}

/* -------------------------------------------------------------- the cast -- */
.castgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 12px; margin: 0 0 8px;
}
.castcard {
  background: linear-gradient(180deg, var(--shell-2), var(--shell));
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 14px 12px; min-width: 0;
  box-shadow: 0 10px 22px -16px rgba(0, 0, 0, .9), var(--lift);
}
.castcard h4 {
  margin: 0 0 3px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 15.5px;
  line-height: 1.2;
}
.castcard p { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.4; }
.castcard .pin {
  display: inline-block; margin-bottom: 9px; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(180deg, var(--red) 0 50%, var(--cream) 50% 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .35);
}
.castcard.pending { border-style: dashed; }
.castcard.pending .pin { background: linear-gradient(180deg, #39406f 0 50%, #262c55 50% 100%); }
.castcard.pending h4 { color: var(--muted); }

.ways { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.way {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 15px 7px 8px;
  font-family: Fredoka, sans-serif; font-weight: 600; font-size: 14px;
}
.way i { width: 22px; height: 22px; border-radius: 50%; display: block; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .35); }

.legband { margin-top: 40px; }
.legs { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.leg {
  border: 1px dashed rgba(255, 201, 63, .4); border-radius: var(--r-md);
  background: rgba(255, 201, 63, .05);
  padding: 14px 10px; text-align: center; min-width: 0;
}
.leg b { display: block; font-family: Fredoka, sans-serif; font-size: 22px; color: var(--gold); }
.leg span { font-size: 10px; letter-spacing: .1em; color: var(--dim); font-weight: 700; }

/* ------------------------------------------------------------ the gallery -- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 14px;
  margin-top: 6px;
}
.card {
  display: block; text-decoration: none; min-width: 0;
  background: linear-gradient(180deg, var(--shell-2), var(--shell));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 11px; box-shadow: 0 12px 26px -18px rgba(0, 0, 0, .95), var(--lift);
  transition: transform .14s ease, border-color .14s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.card-art {
  width: 100%; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden;
  background: rgba(0, 0, 0, .3); display: grid; place-items: center; margin-bottom: 9px;
}
.card-art img { width: 100%; height: 100%; image-rendering: pixelated; }
.card-art.empty::after { content: "?"; font-family: Fredoka, sans-serif; font-size: 34px; color: var(--dim); }
.card-id { margin: 0; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 15px; }
.card-state { margin: 2px 0 0; font-size: 10.5px; letter-spacing: .12em; font-weight: 700; color: var(--dim); }
.card.open .card-state { color: var(--gold); }
.card.sealed .card-state { color: var(--aqua); }

.recent { margin-top: 34px; }
.recentrow {
  display: flex; gap: 12px; overflow-x: auto; padding: 12px 2px 14px; margin-top: 8px;
  scrollbar-width: thin;
}
.recentrow .card { flex: 0 0 132px; }

/* ------------------------------------------------------------ plain answers */
.qa { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.qa-row {
  background: linear-gradient(180deg, var(--shell-2), var(--shell));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px; min-width: 0;
  box-shadow: 0 12px 26px -20px rgba(0, 0, 0, .95), var(--lift);
}
.qa dt { font-family: Fredoka, sans-serif; font-weight: 600; font-size: 17.5px; margin-bottom: 7px; color: var(--gold-2); }
.qa dd { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.qa dd b { color: var(--text); }

/* ================================================================== the foot */
.foot { border-top: 1px solid var(--line); margin-top: 30px; padding: 34px 0 54px; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.foot-brand { font-size: 26px; font-weight: 700; letter-spacing: .04em; margin: 0 0 12px; }
.foot-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.foot-link {
  font-size: 11px; letter-spacing: .12em; font-weight: 700; color: var(--muted);
  text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px;
}
a.foot-link:hover { color: var(--gold); border-color: var(--gold); }
.foot-link.off { opacity: .5; }
.foot-small { margin: 0; font-size: 12.5px; color: var(--dim); max-width: 76ch; line-height: 1.6; }
.noscript { padding: 22px var(--pad); color: var(--gold); }

/* ================================================================ responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .hero-art { order: 2; }
  .mint { max-width: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .qa { grid-template-columns: minmax(0, 1fr); }
  .topnav { display: none; }
  .toppills { margin-left: auto; }
}
@media (max-width: 560px) {
  :root { --pad: 16px; }
  body { font-size: 16px; }
  .top { padding-top: 12px; gap: 10px; }
  .wordmark { font-size: 17px; }
  .pill { font-size: 10.5px; padding: 4px 10px; }
  .hero { padding-bottom: 34px; }
  .hero-h1 { font-size: clamp(32px, 9.6vw, 46px); }
  .mint, .fusebox { padding: 18px 16px 15px; border-radius: var(--r-lg); }
  .band { padding: 40px 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 11px; }
  .castgrid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .fuse-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* ============================================== prefers-reduced-motion
   Everything that moves, off. The page is otherwise byte-for-byte identical —
   no layout depends on an animation having run. */
@media (prefers-reduced-motion: reduce) {
  .glow-a, .glow-b, .cap-art, .led.blink, .is-shaking .stage-cap, .is-popping .stage-cap { animation: none !important; }
  .cap-art img, .mint-bar i, .card, .pick, .btn { transition: none !important; }
}
