/* =========================================================
   GameShelfClub: a scroll from 8-bit to 32-bit.
   Hero + ownership are NES, threat + features are SNES,
   retailers + FAQ + CTA are PlayStation.
   ========================================================= */

:root {
  /* 8-bit (NES palette) */
  --nes-black: #000000;
  --nes-white: #fcfcfc;
  --nes-orange: #e45c10;
  --nes-sky: #5c94fc;
  --nes-brick: #c84c0c;
  --nes-yellow: #f8b800;
  --nes-cyan: #3cbcfc;

  /* 16-bit */
  --snes-win-top: #3a58d0;
  --snes-win-bottom: #10197a;
  --snes-frame: #e8e8f4;
  --snes-night: #1a1040;
  --snes-gold: #ffd860;

  /* 32-bit */
  --ps-silver: #b9bbc6;
  --ps-panel: #e3e4ea;
  --ps-ink: #0f1a3c;
  --ps-dim: #4a5270;
  --ps-blue: #2c4fd0;
  --ps-red: #d0312d;

  --brand: #f4711f;

  --pixel: "Pixelify Sans", "Courier New", monospace;
  --body: "Chakra Petch", system-ui, sans-serif;
  --wrap: 1120px;

  /* stepped corners for 8-bit boxes */
  --px-corners: polygon(
    0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px,
    100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%,
    6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--nes-black);
  color: var(--nes-white);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px dashed var(--nes-yellow);
  outline-offset: 6px;
}

h1, h2, h3 { margin: 0; }

.wordmark {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--nes-white);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--brand); }

/* ---------- HUD (nav) restyles itself per era ---------- */
.hud {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nes-black);
  border-bottom: 4px solid var(--nes-white);
  transition: background 0.3s steps(3), border-color 0.3s steps(3);
}

.hud-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 24px;
}

.hud-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.hud-links a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.hud-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.era-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pixel);
  font-size: 0.95rem;
}
.era-label { min-width: 3.4em; text-align: right; }
.era-pips { display: flex; gap: 3px; }
.era-pips i {
  width: 10px; height: 14px;
  background: currentColor;
  opacity: 0.25;
}
body[data-era="8"]  .era-pips i:nth-child(-n+1),
body[data-era="16"] .era-pips i:nth-child(-n+2),
body[data-era="32"] .era-pips i:nth-child(-n+3) { opacity: 1; background: var(--nes-yellow); }

.hud-cta {
  font-family: var(--pixel);
  font-weight: 500;
  background: var(--nes-orange);
  color: var(--nes-white);
  text-decoration: none;
  padding: 6px 14px;
  box-shadow: 0 0 0 3px var(--nes-white);
}

body[data-era="16"] .hud {
  background: linear-gradient(var(--snes-win-top), var(--snes-win-bottom));
  border-bottom-color: var(--snes-frame);
}
body[data-era="16"] .hud-cta {
  background: var(--snes-gold);
  color: var(--snes-win-bottom);
  border-radius: 4px;
  box-shadow: 0 0 0 2px var(--snes-frame);
}

body[data-era="32"] .hud {
  background: linear-gradient(#eceef4, #b6b9c6);
  color: var(--ps-ink);
  border-bottom: 1px solid #7d8196;
  box-shadow: 0 2px 10px rgba(15, 26, 60, 0.18);
}
body[data-era="32"] .hud .wordmark { color: var(--ps-ink); }
body[data-era="32"] .era-meter { font-family: var(--body); font-weight: 700; }
body[data-era="32"] .era-pips i:nth-child(-n+3) { background: var(--ps-blue); }
body[data-era="32"] .hud-cta {
  font-family: var(--body);
  font-weight: 600;
  background: linear-gradient(#4a6cf0, var(--ps-blue));
  color: #fff;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 2px rgba(15,26,60,0.4);
}

/* =========================================================
   8-BIT
   ========================================================= */
.hero {
  padding: 72px 0 80px;
  background: var(--nes-black);
}

.hero-title {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 26ch;
}

.shelf {
  margin: 56px 0 0;
  position: relative;
}
.shelf svg {
  display: block;
  width: 100%;
  height: auto;
}

.ghost { animation: revoke 2.6s steps(1, end) 0.6s forwards; }
@keyframes revoke {
  0%   { opacity: 1; }
  30%  { opacity: 0; }
  40%  { opacity: 1; }
  55%  { opacity: 0; }
  62%  { opacity: 1; }
  70%, 100% { opacity: 0; }
}

.shelf-canvas { display: block; max-width: 100%; }

.shelf-caption {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--pixel);
  font-weight: 500;
  color: var(--nes-cyan);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.2;
  margin-top: 16px;
  opacity: 0;
  animation: appear 0s linear 2.6s forwards;
}
.sad-face { flex: none; }
@keyframes appear { to { opacity: 1; } }
.shelf-caption.is-scripted { animation: none; }
.shelf-caption.is-shown { opacity: 1; }
.shelf-caption.is-scripted { transition: opacity 0.2s steps(2); }

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 56px;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.65;
  margin: 0;
  max-width: 34em;
  color: #d8d8d8;
}

.signup-box {
  background: var(--nes-black);
  border: 4px solid var(--nes-white);
  padding: 24px;
  clip-path: var(--px-corners);
}

.signup {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.signup input {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 0;
  background: #1c1c1c;
  color: var(--nes-white);
  box-shadow: 0 0 0 3px var(--nes-white);
}
.signup input::placeholder { color: #8c8c8c; }

.signup button,
.suggest button,
.btn {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 1.05rem;
  border: 0;
  cursor: pointer;
  padding: 12px 18px;
  background: var(--nes-orange);
  color: var(--nes-white);
  box-shadow:
    3px 0 0 0 var(--nes-white), -3px 0 0 0 var(--nes-white),
    0 3px 0 0 var(--nes-white), 0 -3px 0 0 var(--nes-white),
    inset -4px -4px 0 0 #a83800;
  text-decoration: none;
  display: inline-block;
}
.signup button:hover,
.btn:hover { background: #f87838; }
.signup button:active,
.btn:active { box-shadow:
    3px 0 0 0 var(--nes-white), -3px 0 0 0 var(--nes-white),
    0 3px 0 0 var(--nes-white), 0 -3px 0 0 var(--nes-white),
    inset 4px 4px 0 0 #a83800; }
.signup button:disabled { opacity: 0.6; cursor: wait; }

.signup-message,
.suggest-message {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 0.95rem;
}
.signup-message.success { color: #80d010; }
.signup-message.error   { color: #ff7a7a; }

.platform-strip {
  margin: 4px 0 0;
  color: #9c9c9c;
  font-size: 0.9rem;
}

/* ---------- World 1-1 ---------- */
.ownership {
  background: var(--nes-sky);
  color: var(--nes-black);
  padding-top: 96px;
}

.dialog {
  max-width: 720px;
  background: var(--nes-black);
  color: var(--nes-white);
  border: 4px solid var(--nes-white);
  outline: 4px solid var(--nes-black);
  padding: 32px 36px 36px;
  clip-path: var(--px-corners);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.dialog h2 {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.cursor-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.cursor-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
}
/* pixel ▶ cursor */
.cursor-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 12px;
  height: 14px;
  background: var(--nes-white);
  clip-path: polygon(0 0, 4px 0, 4px 2px, 8px 2px, 8px 5px, 12px 5px, 12px 9px, 8px 9px, 8px 12px, 4px 12px, 4px 14px, 0 14px);
}

.gog-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--nes-white);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 14px;
  box-shadow: 0 0 0 2px #5c5c5c;
}
.gog-badge:hover { box-shadow: 0 0 0 2px var(--nes-white); }
.gog-logo { height: 26px; width: auto; filter: invert(1); }
.dialog-cta { margin: 20px 0 0; }
.dialog-cta a { color: var(--nes-yellow); font-weight: 600; }

.ownership-inner { position: relative; }
.ownership { overflow: hidden; }
/* game night: the dialog floats over the room on wide screens */
.ownership { background: #1d1628; padding-top: 48px; }
.living-room { display: block; }
@media (min-width: 1000px) {
  .ownership { position: relative; padding-top: 0; }
  .ownership-inner { position: absolute; top: 64px; left: 0; right: 0; z-index: 1; pointer-events: none; }
  .ownership .dialog { max-width: 440px; margin-bottom: 0; pointer-events: auto; }
}

/* SMB ? block: click for a coin */
.qblock {
  position: absolute;
  right: 170px;
  top: 170px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}
.qblock canvas { display: block; }
.qblock.bump { animation: bump 0.18s steps(3) 1; }
@keyframes bump {
  50% { transform: translateY(-12px); }
}

.coin-pop {
  position: absolute;
  z-index: 60;
  pointer-events: none;
}


/* dithered handoff between eras (drawn by script.js) */
.era-shift {
  display: block;
  width: 100%;
  line-height: 0;
  background: var(--from, transparent);
}
canvas.px {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.era-shift canvas {
  display: block;
  width: 100%;
  image-rendering: pixelated;
}

/* =========================================================
   16-BIT
   ========================================================= */
.threat {
  /* banded dusk sky, no smooth gradient yet */
  background: linear-gradient(
    #f09050 0 14%, #e0705a 14% 28%, #b84c60 28% 44%,
    #80305e 44% 60%, #4a2056 60% 78%, var(--snes-night) 78% 100%);
  padding: 72px 0 96px;
}

.window {
  background: linear-gradient(var(--snes-win-top), var(--snes-win-bottom));
  color: #fff;
  border: 3px solid var(--snes-frame);
  border-radius: 6px;
  box-shadow: 0 0 0 3px #2a2a48, 4px 4px 0 3px rgba(0, 0, 0, 0.35);
  padding: 28px 30px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.threat-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: start;
}

.threat-copy h2 {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  line-height: 1.05;
  color: var(--snes-gold);
  margin-bottom: 20px;
}
.threat-copy p { margin: 0 0 16px; max-width: 38em; }

.threat-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}

.threat .btn {
  background: var(--snes-gold);
  color: var(--snes-win-bottom);
  text-shadow: none;
  border-radius: 4px;
  box-shadow: 0 0 0 3px var(--snes-frame), inset 0 -4px 0 #d0a020;
}
.threat .btn:hover { background: #ffe688; }

.btn-link {
  color: #fff;
  font-weight: 600;
  text-underline-offset: 4px;
}
.btn-link:hover { color: var(--snes-gold); }

.threat-side { display: grid; gap: 32px; }

.countdown { text-align: left; }
.countdown-label { margin: 0; font-size: 0.95rem; color: #c8d0ff; }
.countdown-value {
  margin: 6px 0 0;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(3.2rem, 7vw, 4.8rem);
  line-height: 1;
  color: var(--snes-gold);
  font-variant-numeric: tabular-nums;
}

.threat-shot { margin: 0; padding: 12px; }
.threat-shot img { display: block; width: 100%; border-radius: 2px; }
.threat-shot figcaption { font-size: 0.85rem; color: #c8d0ff; margin-top: 10px; }

.features {
  background: var(--snes-night);
  padding: 24px 0 112px;
}

.features-title {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  line-height: 1.05;
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.feature { display: flex; flex-direction: column; }
.feature h3 {
  font-family: var(--pixel);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--snes-gold);
  margin-bottom: 10px;
}
.feature > p { margin: 0 0 24px; }

.menu {
  margin-top: auto;
  background: rgba(0, 0, 40, 0.45);
  border: 2px solid rgba(232, 232, 244, 0.5);
  border-radius: 4px;
  padding: 14px 16px;
  font-family: var(--pixel);
  font-size: 1.05rem;
}
.menu-row { display: flex; gap: 14px; align-items: baseline; padding: 3px 0; }
.menu-key { color: #c8d0ff; min-width: 5.5em; }
.menu em { font-style: normal; color: #c8d0ff; margin-left: 6px; }
.menu-hit { color: var(--snes-gold); margin-top: 6px; }

/* SNES-style white hand cursor, simplified to a pixel pointer */
.menu-cursor.has-sprite {
  width: auto;
  height: auto;
  background: none;
  clip-path: none;
  line-height: 0;
  animation: point 0.9s steps(1) infinite;
}
@keyframes point {
  50% { transform: translateX(4px); }
}

.menu-cursor {
  flex: none;
  width: 14px; height: 12px;
  background: #fff;
  clip-path: polygon(0 4px, 8px 4px, 8px 0, 14px 6px, 8px 12px, 8px 8px, 0 8px);
  align-self: center;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
  margin: 10px 0 4px;
}
.bars i {
  flex: 1;
  height: var(--h);
  background: #8898f0;
}
.bars i {
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.35), inset -4px 0 0 rgba(0, 0, 60, 0.25);
}
.bars i.drop { background: var(--snes-gold); }
.bars.is-watching i.drop { height: 86%; transition: height 0.6s steps(4); }
.bars.is-watching.has-dropped i.drop { height: var(--h); }

/* =========================================================
   32-BIT
   ========================================================= */
.retailers,
.faq,
.cta {
  background: var(--ps-silver);
  color: var(--ps-ink);
  text-shadow: none;
}

.retailers { padding: 40px 0 72px; }

.panel {
  background: linear-gradient(180deg, #f2f3f7, var(--ps-panel));
  border: 1px solid #fff;
  border-radius: 8px;
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px #8a8ea3, 0 18px 40px -20px rgba(15, 26, 60, 0.5);
  padding: 40px;
}

.panel-head h2,
.faq h2,
.save-slot h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.panel-head p { margin: 12px 0 0; color: var(--ps-dim); max-width: 36em; }

/* PlayStation memory card: 15 blocks */
.memcard {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.memcard li {
  aspect-ratio: 5 / 3;
  display: grid;
  place-items: center;
  padding: 36px 18px 14px;
  background: #fff;
  border-radius: 4px;
  box-shadow: inset 0 -2px 0 #c9cbd6, 0 0 0 1px #9ea2b6;
}
.memcard li { position: relative; }
.memicon { position: absolute; top: 6px; left: 6px; }
.memcard img {
  max-height: 40px;
  max-width: 100%;
  object-fit: contain;
}
.memcard-free {
  background: repeating-linear-gradient(135deg, #e3e4ea 0 6px, #d6d8e0 6px 12px) !important;
}
.memcard-free label {
  color: var(--ps-dim);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.suggest { margin-top: 32px; }
.suggest-label { display: block; font-weight: 600; margin-bottom: 10px; }
.suggest-row { display: flex; gap: 10px; flex-wrap: wrap; }

.suggest input,
.cta .signup input {
  flex: 1 1 260px;
  min-width: 0;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #8a8ea3;
  border-radius: 4px;
  background: #fff;
  color: var(--ps-ink);
  box-shadow: inset 0 2px 3px rgba(15, 26, 60, 0.12);
}

.suggest button,
.cta .signup button {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 4px;
  background: linear-gradient(#4a6cf0, var(--ps-blue));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 1px #1c3494, 0 2px 4px rgba(15, 26, 60, 0.3);
}
.suggest button:hover,
.cta .signup button:hover { background: linear-gradient(#5c7cf8, #3558e0); }
.suggest button:active,
.cta .signup button:active { background: linear-gradient(var(--ps-blue), #4a6cf0); }

.suggest-message.success,
.cta .signup-message.success { color: #1c7a2c; }
.suggest-message.error,
.cta .signup-message.error { color: var(--ps-red); }

.faq { padding: 32px 0 80px; }
.faq-inner {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 40px;
  align-items: start;
}

.faq-list { display: grid; gap: 10px; }

.faq-item {
  background: linear-gradient(#f7f8fb, #e6e7ee);
  border-radius: 6px;
  box-shadow: 0 0 0 1px #9ea2b6, inset 0 1px 0 #fff;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px 16px 48px;
  font-weight: 600;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
/* PS face-button circle becomes a cross when open */
.faq-item summary::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  border: 2.5px solid var(--ps-red);
  border-radius: 50%;
}
.faq-item[open] summary::before {
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(45deg, transparent 43%, var(--ps-blue) 43% 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, var(--ps-blue) 43% 57%, transparent 57%);
}
.faq-item p { margin: 0; padding: 0 20px 18px 48px; color: var(--ps-dim); }

.cta { padding: 16px 0 112px; }

.save-slot {
  background: linear-gradient(160deg, #22348c, #0d1646 70%);
  color: #fff;
  border-radius: 10px;
  padding: 48px;
  box-shadow: 0 0 0 1px #0a1030, inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 24px 50px -24px rgba(15, 26, 60, 0.7);
}
.save-slot p { margin: 10px 0 28px; color: #c4ccf0; }
.save-slot .signup { max-width: 560px; }
.save-slot .signup-message { margin-bottom: 0; }
.cta .signup-message.success { color: #8ff0a0; }
.cta .signup-message.error { color: #ffa0a0; }

/* ---------- footer ---------- */
.site-footer {
  background: #0d1646;
  color: #c4ccf0;
  padding: 48px 0 28px;
  font-size: 0.95rem;
}
.site-footer .wordmark { font-size: 1.25rem; }
.site-footer p { margin: 6px 0 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 32px; font-size: 0.85rem; color: #8a94c8; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hud-links { display: none; }
  .era-meter { margin-left: auto; }
  .hero-bottom,
  .threat-inner,
  .features-grid,
  .faq-inner { grid-template-columns: 1fr; }
  .memcard { grid-template-columns: repeat(3, 1fr); }
  .panel, .save-slot { padding: 28px 22px; }
  .dialog { padding: 26px 22px; }
  .shelf-canvas { display: block; max-width: 100%; }

.shelf-caption { padding-left: 0; }
}

@media (max-width: 560px) {
  .hud-inner { gap: 14px; padding: 10px 16px; }
  .wrap { padding: 0 16px; }
  .era-label { display: none; }
  .hud-cta { font-size: 0.85rem; padding: 5px 10px; }
  .wordmark { font-size: 1.2rem; }
  .memcard { grid-template-columns: repeat(2, 1fr); }
  .memicon { display: none; }
  .window { padding: 22px 18px; }
  .signup button, .suggest button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ghost { animation: none; opacity: 0; }
  .shelf-canvas { display: block; max-width: 100%; }

.shelf-caption { animation: none; opacity: 1; }
  .hud { transition: none; }
  .menu-cursor.has-sprite { animation: none; }
  .qblock.bump { animation: none; }
}

/* =========================================================
   BLOG (32-bit reading pages) + homepage "From the blog"
   ========================================================= */
.blog-body {
  background: var(--ps-silver);
  color: var(--ps-ink);
}
.blog-body .site-footer { margin-top: 0; }

.blog-intro {
  background: var(--nes-black);
  color: var(--nes-white);
  padding: 64px 0 56px;
  border-bottom: 4px solid var(--nes-white);
}
.blog-intro h1 {
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
}
.blog-intro p { margin: 16px 0 0; max-width: 40em; color: #d8d8d8; font-size: 1.1rem; }

.blog-main { padding-bottom: 96px; }

.post-list {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  gap: 18px;
}
.post-card a {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  padding: 16px;
  background: linear-gradient(180deg, #f7f8fb, var(--ps-panel));
  border-radius: 8px;
  box-shadow: 0 0 0 1px #9ea2b6, inset 0 1px 0 #fff;
  color: var(--ps-ink);
  text-decoration: none;
}
.post-card a:hover { box-shadow: 0 0 0 2px var(--ps-blue), inset 0 1px 0 #fff; }
.post-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: #0d1646;
}
.post-card-text { display: grid; gap: 6px; }
.post-card-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.88rem; color: var(--ps-dim); font-weight: 600; }
.post-card-title { font-weight: 700; font-size: 1.3rem; line-height: 1.25; }
.post-card-desc { color: var(--ps-dim); }

.post-list.is-compact { grid-template-columns: repeat(3, 1fr); margin-top: 20px; }
.post-list.is-compact .post-card a { grid-template-columns: 1fr; gap: 12px; height: 100%; }
.post-list.is-compact .post-card-title { font-size: 1.1rem; }
.post-list.is-compact .post-card-desc { display: none; }

/* single post */
.post { max-width: 800px; padding-top: 40px; }

.post-hero {
  margin: 0 0 28px;
  background: #0d1646;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #0a1030, 0 18px 40px -22px rgba(15, 26, 60, 0.6);
}
.post-hero img { display: block; width: 100%; height: auto; }
.post-hero.is-portrait img { width: auto; max-width: 100%; max-height: min(72vh, 720px); margin: 0 auto; }
.post-hero figcaption { font-size: 0.85rem; color: #c4ccf0; padding: 8px 14px; }

.post-crumb { margin: 0 0 8px; }
.post-crumb a { color: var(--ps-blue); font-weight: 600; }
.post-head h1 {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 0; color: var(--ps-dim); }
.post-meta a { color: var(--ps-blue); }

.post-body { margin-top: 32px; font-size: 1.1rem; line-height: 1.75; }
.post-body p { margin: 0 0 1.1em; }
.post-body h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 1.8em 0 0.5em;
}
.post-body a { color: var(--ps-blue); }

.post-source {
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--ps-panel);
  border-left: 4px solid var(--ps-blue);
  border-radius: 6px;
}
.post-source h2 { font-family: var(--body); font-size: 1.15rem; margin-bottom: 8px; }
.post-source ul { margin: 0 0 10px; padding-left: 20px; }
.post-source li { margin-bottom: 6px; }
.post-source a { color: var(--ps-blue); word-break: break-word; }
.post-source p { margin: 0; font-size: 0.9rem; color: var(--ps-dim); }

.post-cta { margin-top: 40px; }
.post-cta .signup input {
  flex: 1 1 260px;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #8a8ea3;
  border-radius: 4px;
  background: #fff;
  color: var(--ps-ink);
  box-shadow: inset 0 2px 3px rgba(15, 26, 60, 0.12);
}
.post-cta .signup button {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 4px;
  background: linear-gradient(#4a6cf0, var(--ps-blue));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 1px #1c3494, 0 2px 4px rgba(15, 26, 60, 0.3);
}
.post-cta .signup-message.success { color: #8ff0a0; }
.post-cta .signup-message.error { color: #ffa0a0; }

.post-more { padding-top: 56px; }
.post-more h2,
.latest h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* homepage block */
.latest { background: var(--ps-silver); color: var(--ps-ink); padding: 8px 0 56px; }
.latest-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.latest-head a { color: var(--ps-blue); font-weight: 600; }

@media (max-width: 900px) {
  .post-list.is-compact { grid-template-columns: 1fr; }
  .post-list.is-compact .post-card a { grid-template-columns: 140px 1fr; }
}
@media (max-width: 640px) {
  .post-card a { grid-template-columns: 1fr; gap: 12px; }
  .post-list.is-compact .post-card a { grid-template-columns: 1fr; }
}

/* =========================================================
   Shop finder + city pages, collectors counter
   ========================================================= */
.shops-wrap { display: grid; gap: 24px; margin-top: 40px; }
.shops-wrap .panel h2 { font-family: var(--body); font-weight: 700; font-size: 1.4rem; margin-bottom: 12px; }
.shops-wrap .panel > p { margin: 0 0 16px; color: var(--ps-dim); }

.finder-form label { display: block; font-weight: 600; margin-bottom: 10px; }
.finder-form input,
.shop-suggest input {
  flex: 1 1 200px;
  min-width: 0;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #8a8ea3;
  border-radius: 4px;
  background: #fff;
  color: var(--ps-ink);
  box-shadow: inset 0 2px 3px rgba(15, 26, 60, 0.12);
}
.finder-form button,
.shop-suggest button {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 22px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  background: linear-gradient(#4a6cf0, var(--ps-blue));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 1px #1c3494;
}
.finder-form .finder-locate {
  background: linear-gradient(#f7f8fb, #dfe1e8);
  color: var(--ps-ink);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px #8a8ea3;
}
.finder-form button:disabled,
.shop-suggest button:disabled { opacity: 0.6; cursor: wait; }
.finder-note { margin: 10px 0 0; font-size: 0.88rem; color: var(--ps-dim); }
.finder-form .suggest-message.success,
.shop-suggest .suggest-message.success { color: #1c7a2c; }
.finder-form .suggest-message.error,
.shop-suggest .suggest-message.error { color: var(--ps-red); }

.shop-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.shop {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #c9cbd6;
}
.shop-kind {
  font-family: var(--pixel);
  font-size: 0.9rem;
  text-align: center;
  padding: 3px 0;
  border-radius: 3px;
  color: #fff;
  background: var(--ps-dim);
}
.shop-kind.kind-cex { background: #d0312d; }
.shop-kind.kind-game { background: #1d1d1d; }
.shop-kind.kind-independent { background: #1c7a2c; }
.shop-text { display: grid; }
.shop-name { font-weight: 700; }
.shop-addr { color: var(--ps-dim); font-size: 0.92rem; }
.shop-links { display: flex; gap: 14px; align-items: center; font-weight: 600; white-space: nowrap; }
.shop-links a { color: var(--ps-blue); }
.shop-dist { color: var(--ps-ink); font-family: var(--pixel); }

.city-list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 4 180px;
  column-gap: 24px;
}
.city-list li { break-inside: avoid; padding: 4px 0; }
.city-list a { color: var(--ps-blue); font-weight: 600; }
.city-list span { color: var(--ps-dim); font-size: 0.88rem; }

.osm-credit { font-size: 0.85rem; color: var(--ps-dim); margin: 0; }
.osm-credit a { color: var(--ps-blue); }

.shop-cta { margin: 20px 0 0; font-weight: 600; }
.shop-cta a { color: var(--ps-blue); }

.counted {
  display: inline-block;
  margin: 8px 0 0;
  padding: 6px 12px;
  font-family: var(--pixel);
  font-size: 1.15rem;
  color: var(--snes-win-bottom);
  background: var(--snes-gold);
  border-radius: 4px;
  text-shadow: none;
}
.counted[hidden], .js-count[hidden] { display: none; }

@media (max-width: 640px) {
  .shop { grid-template-columns: 56px 1fr; }
  .shop-links { grid-column: 2; }
}
