/* ==========================================================================
   ELIO'S 5TH BIRTHDAY — POKÉMON PARTY
   BEST OF 2026 EDITION: NEO-ARCADIA POKÉMON CELEBRATION
   ========================================================================== */

:root {
  /* Game Boy DMG Retro Palette */
  --gb-darkest: #0f380f;
  --gb-dark: #306230;
  --gb-light: #8bac0f;
  --gb-lightest: #9bbc0f;
  --gb-shell: #dcd9e2;
  --gb-bezel: #585c6a;
  --gb-bezel-dark: #3b3e48;
  --gb-dpad: #2c2f38;
  --gb-btn-magenta: #9d255a;
  --gb-btn-magenta-active: #781c44;

  /* Overworld Anime Day Palette */
  --sky-top: #3b8cf2;
  --sky-mid: #68b8f8;
  --sky-bottom: #c6eaff;
  --grass-bright: #52ba41;
  --grass-deep: #3f9b31;
  --path-tan: #f0cf8e;
  --path-border: #c4994f;
  --path-stone: #dec07e;
  --cream: #fffdf5;
  --card-gold: #f6e297;
  --ink: #16181d;
  --poke-red: #eb3b32;
  --poke-red-dark: #c9241c;
  --fire-orange: #ff7714;
  --yellow: #ffd028;
  --gold: #ffbe00;
  --poke-blue: #1b8cf2;
  --white: #ffffff;

  /* Typography */
  --font-pixel: 'Press Start 2P', monospace;
  --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;

  /* Chunky Tabletop Borders & Pop Shadows */
  --border-comic: 4px solid var(--ink);
  --border-thick: 5px solid var(--ink);
  --border-thin: 3px solid var(--ink);
  --shadow-comic: 4px 4px 0 var(--ink);
  --shadow-comic-lg: 6px 6px 0 var(--ink);
  --shadow-comic-xl: 8px 8px 0 var(--ink);
  --shadow-comic-sm: 2px 2px 0 var(--ink);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 50px;
}

/* Sunset Theme */
[data-theme="sunset"] {
  --sky-top: #e65c00;
  --sky-mid: #f9d423;
  --sky-bottom: #ffc3a0;
  --grass-bright: #7aa33b;
  --grass-deep: #597d26;
  --path-tan: #deb273;
}

/* Cyber Neon Night Theme */
[data-theme="night"] {
  --sky-top: #0a0e27;
  --sky-mid: #1c1a4e;
  --sky-bottom: #392868;
  --grass-bright: #1b382b;
  --grass-deep: #10241b;
  --path-tan: #7d6b52;
  --cream: #1f2333;
  --white: #282c3f;
  color: #f0f3f8;
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--grass-bright);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Accessibility screen reader */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Particle Confetti Canvas */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10001;
}

/* ==========================================================================
   REUSABLE 3D CARTOON POKÉBALLS
   ========================================================================== */
.pokeball {
  display: inline-block;
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3.5px solid var(--ink);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, var(--poke-red) 0%, var(--poke-red) 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
  box-shadow: inset -4px -4px 0 rgba(0, 0, 0, 0.22), 3px 3px 0 rgba(22, 24, 29, 0.35);
  vertical-align: middle;
  flex-shrink: 0;
  overflow: hidden;
}

.pokeball::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 20%;
  width: 28%;
  height: 18%;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  transform: rotate(-30deg);
  pointer-events: none;
}

.pokeball::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28%;
  height: 28%;
  background: #ffffff;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #ffffff, 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ball-great {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #1b8cf2 0%, #1b8cf2 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-ultra {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #2c3e50 0%, #ffd028 20%, #2c3e50 21%, #2c3e50 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-master {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #8e44ad 0%, #8e44ad 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-premier {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 46%, #e74c3c 46.1%, #e74c3c 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-safari {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #27ae60 0%, #1e824c 30%, #a3cb38 46%, var(--ink) 46.1%, var(--ink) 53.9%, #dcdde1 54%, #dcdde1 100%);
}

.ball-luxury {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #2f3640 0%, #e1b12c 25%, #2f3640 26%, #2f3640 46%, #e84118 46.1%, #e84118 53.9%, #2f3640 54%, #2f3640 100%);
}

.ball-heal {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #ff9ff3 0%, #f368e0 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-quick {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #00d2d3 0%, #feca57 20%, #00d2d3 46%, var(--ink) 46.1%, var(--ink) 53.9%, #00d2d3 54%, #00d2d3 100%);
}

.ball-dive {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #48dbfb 0%, #0abde3 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-net {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #1dd1a1 0%, #10ac84 46%, var(--ink) 46.1%, var(--ink) 53.9%, #576574 54%, #576574 100%);
}

.ball-dusk {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #222f3e 0%, #10ac84 35%, #222f3e 46%, #ff9f43 46.1%, #ff9f43 53.9%, #222f3e 54%, #222f3e 100%);
}

.ball-timer {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #ffffff 0%, #ee5253 22%, #ffffff 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-repeat {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #ff9f43 0%, #ee5253 30%, #ff9f43 46%, var(--ink) 46.1%, var(--ink) 53.9%, #576574 54%, #576574 100%);
}

.ball-cherish {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #d63031 0%, #e17055 46%, var(--ink) 46.1%, var(--ink) 53.9%, #d63031 54%, #d63031 100%);
}

.ball-level {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #ff7675 0%, #ffeaa7 30%, #ff7675 46%, var(--ink) 46.1%, var(--ink) 53.9%, #55efc4 54%, #55efc4 100%);
}

.ball-lure {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #0984e3 0%, #d63031 25%, #0984e3 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-moon {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #636e72 0%, #00cec9 25%, #636e72 46%, #ffeaa7 46.1%, #ffeaa7 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-friend {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #00b894 0%, #fdcb6e 25%, #00b894 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-love {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #fd79a8 0%, #e84393 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-heavy {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #b2bec3 0%, #0984e3 25%, #b2bec3 46%, var(--ink) 46.1%, var(--ink) 53.9%, #636e72 54%, #636e72 100%);
}

.ball-fast {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #e17055 0%, #fdcb6e 25%, #e17055 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-sport {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #e67e22 0%, #d35400 46%, var(--ink) 46.1%, var(--ink) 53.9%, #ffffff 54%, #ffffff 100%);
}

.ball-beast {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #1e3799 0%, #f6b93b 25%, #1e3799 46%, #78e08f 46.1%, #78e08f 53.9%, #0c2461 54%, #0c2461 100%);
}

/* ==========================================================================
   1. ACCESS GATE: RETRO NINTENDO GAME BOY CONSOLE
   ========================================================================== */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b1f0b;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(56, 128, 56, 0.3) 0%, #061506 80%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.15) 0px, rgba(0, 0, 0, 0.15) 2px, transparent 2px, transparent 4px);
  padding: 1.5rem;
  overflow-y: auto;
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.65s ease, filter 0.65s ease;
}

.access-gate.unlocking {
  transform: scale(2.6);
  filter: brightness(3.5);
  opacity: 0;
  pointer-events: none;
}

.access-gate.hidden {
  display: none !important;
}

.unlock-flash {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
}

.unlock-flash.active {
  opacity: 1;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    0deg,
    rgba(15, 56, 15, 0.25) 0px,
    rgba(15, 56, 15, 0.25) 1px,
    transparent 1px,
    transparent 3px
  );
}

.gb-console-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(175deg, #dedce4 0%, #cac8d2 60%, #b5b3be 100%);
  background-color: var(--gb-shell);
  border: 5px solid var(--ink);
  border-radius: 20px 20px 70px 20px;
  padding: 16px 20px 24px 20px;
  box-shadow:
    inset -4px -6px 0 rgba(0, 0, 0, 0.25),
    inset 4px 4px 0 rgba(255, 255, 255, 0.7),
    0 18px 50px rgba(0, 0, 0, 0.85),
    0 0 60px rgba(139, 172, 15, 0.25);
}

.gb-top-ridge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 8px;
}

.cartridge-label {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: #7b7987;
  letter-spacing: 1px;
}

.gb-switch-label {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: #7b7987;
  letter-spacing: 1px;
}

.gb-bezel {
  position: relative;
  background: linear-gradient(180deg, var(--gb-bezel) 0%, var(--gb-bezel-dark) 100%);
  border: 4px solid var(--ink);
  border-radius: 14px 14px 40px 14px;
  padding: 18px 18px 22px 18px;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.15), inset -3px -3px 0 rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
}

.gb-bezel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.gb-stripe { height: 3px; flex-grow: 1; }
.stripe-blue { background-color: #2980b9; }
.stripe-magenta { background-color: #8e24aa; }

.gb-lens-text {
  font-family: system-ui, sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #b0b4c2;
  white-space: nowrap;
}

.gb-battery-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding-left: 6px;
}

.battery-led {
  width: 9px;
  height: 9px;
  background-color: #ff3838;
  border-radius: 50%;
  box-shadow: 0 0 6px #ff3838, inset 1px 1px 2px rgba(255, 255, 255, 0.6);
  animation: ledPulse 2s ease-in-out infinite;
}

@keyframes ledPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.battery-label {
  font-family: system-ui, sans-serif;
  font-size: 0.5rem;
  font-weight: bold;
  color: #8f92a1;
  letter-spacing: 1px;
}

.gb-screen {
  position: relative;
  background-color: var(--gb-lightest);
  border: 4px solid var(--ink);
  border-radius: 8px;
  padding: 20px 14px;
  box-shadow:
    inset 3px 3px 0 rgba(0, 0, 0, 0.3),
    inset -2px -2px 0 rgba(255, 255, 255, 0.4),
    0 0 20px rgba(155, 188, 15, 0.45);
  color: var(--gb-darkest);
  text-align: center;
  background-image:
    repeating-linear-gradient(0deg, rgba(48, 98, 48, 0.08) 0px, rgba(48, 98, 48, 0.08) 2px, transparent 2px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(48, 98, 48, 0.08) 0px, rgba(48, 98, 48, 0.08) 2px, transparent 2px, transparent 4px);
}

.gb-screen.shake {
  animation: gbShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes gbShake {
  10%, 90% { transform: translate3d(-4px, 0, 0); }
  20%, 80% { transform: translate3d(6px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-7px, 0, 0); }
  40%, 60% { transform: translate3d(7px, 0, 0); }
}

.gb-kicker {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
  color: var(--gb-dark);
}

.gate-pokeball-container {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.spinning-pokeball {
  width: 60px;
  height: 60px;
  animation: spinPokeball 3.5s linear infinite;
}

@keyframes spinPokeball {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.gb-title {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--gb-darkest);
  margin-bottom: 10px;
}

.gb-subtitle {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--gb-dark);
  font-weight: 700;
  margin-bottom: 18px;
}

.gate-input-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.gb-input {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gb-darkest);
  background-color: var(--gb-light);
  border: 3px solid var(--gb-darkest);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 170px;
  text-align: center;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.2);
  outline: none;
}

.gb-input:focus {
  border-color: var(--gb-darkest);
  background-color: #a4c713;
  box-shadow: 0 0 0 3px var(--gb-dark);
}

.gb-input::placeholder {
  color: var(--gb-dark);
  letter-spacing: 2px;
  opacity: 0.7;
}

.gb-btn {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--gb-lightest);
  background-color: var(--gb-darkest);
  border: 3px solid var(--gb-darkest);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--gb-dark);
  transition: transform 0.1s, box-shadow 0.1s;
}

.gb-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--gb-dark);
}

.gb-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--gb-dark);
}

.gb-error {
  min-height: 1.8rem;
  margin-top: 10px;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  line-height: 1.45;
  color: #73130e;
  font-weight: bold;
}

.gb-press-start {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--gb-darkest);
  letter-spacing: 2px;
  margin-top: 6px;
  animation: blinkSteps 1s steps(2, start) infinite;
}

@keyframes blinkSteps {
  to { visibility: hidden; }
}

.gb-console-brand {
  padding-left: 10px;
  margin-bottom: 16px;
}

.gb-brand-gameboy {
  font-family: system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: #35368a;
  letter-spacing: 0.5px;
}

.gb-logo-italic {
  font-style: italic;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.gb-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 20px;
}

.gb-dpad {
  position: relative;
  width: 90px;
  height: 90px;
}

.gb-dpad::before,
.gb-dpad::after {
  content: "";
  position: absolute;
  background-color: var(--gb-dpad);
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.2), 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.gb-dpad::before { top: 30px; left: 0; width: 90px; height: 30px; }
.gb-dpad::after { top: 0; left: 30px; width: 30px; height: 90px; }

.dpad-center {
  position: absolute;
  top: 35px;
  left: 35px;
  width: 20px;
  height: 20px;
  background-color: #1a1b1f;
  border-radius: 50%;
  z-index: 2;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.dpad-btn {
  position: absolute;
  color: #4a4d57;
  font-size: 0.6rem;
  z-index: 3;
}
.dpad-up { top: 6px; left: 40px; }
.dpad-right { top: 38px; right: 8px; }
.dpad-down { bottom: 6px; left: 40px; }
.dpad-left { top: 38px; left: 8px; }

.gb-action-buttons {
  display: flex;
  gap: 16px;
  transform: rotate(-25deg);
  padding-right: 10px;
}

.gb-action-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background-color: #c4c2cb;
  padding: 6px 8px 8px 8px;
  border-radius: 24px;
  box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.2);
}

.gb-round-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8306e 0%, var(--gb-btn-magenta) 60%, var(--gb-btn-magenta-active) 100%);
  border: 3px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink), inset 1px 1px 2px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: system-ui, sans-serif;
  font-weight: 900;
  font-size: 0.9rem;
}

.btn-label {
  font-family: system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.65rem;
  color: #35368a;
}

.gb-bottom-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 16px;
}

.gb-pill-btns {
  display: flex;
  gap: 16px;
  transform: rotate(-25deg);
  margin-top: 10px;
}

.pill-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rubber-pill {
  width: 38px;
  height: 12px;
  background-color: #6e717b;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.3), 1px 2px 0 var(--ink);
}

.pill-text {
  font-family: system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.55rem;
  color: #35368a;
  letter-spacing: 0.5px;
}

.gb-speaker-grille {
  display: flex;
  gap: 6px;
  transform: rotate(-25deg);
  padding-bottom: 8px;
}

.speaker-slot {
  width: 7px;
  height: 48px;
  background-color: #7d7a86;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.gb-phones-notch {
  text-align: center;
  margin-top: 10px;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.55rem;
  color: #8c8a98;
  letter-spacing: 1px;
}

/* ==========================================================================
   2. STICKY NAVBAR WITH AUDIO & ATMOSPHERE TOGGLES
   ========================================================================== */
.pallet-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--ink);
  border-bottom: 4px solid var(--poke-red);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  padding: 10px 16px;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-brand {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--cream);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.15s;
}

.nav-pokeball-icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, var(--poke-red) 0 46%, var(--ink) 46.1% 53.9%, #ffffff 54% 100%);
  position: relative;
  box-shadow: 0 0 0 2px #ffffff;
}

.nav-pokeball-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.nav-bolt {
  color: var(--yellow);
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--cream);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all 0.15s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--yellow);
  background-color: rgba(255, 208, 40, 0.15);
  border-color: var(--yellow);
  outline: none;
}

.nav-extra-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-icon-btn {
  background: #232731;
  border: 2px solid #3d4251;
  border-radius: 8px;
  color: #ffffff;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}

.nav-icon-btn:hover {
  transform: scale(1.1);
  background-color: var(--poke-red);
  border-color: var(--yellow);
}

/* ==========================================================================
   3. HERO: PALLET TOWN SKY & 2026 TCG CARD
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 50%, var(--sky-bottom) 100%);
  padding: 80px 16px 70px 16px;
  overflow: hidden;
  transition: background 0.5s ease;
}

.sky-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.sunbeam {
  position: absolute;
  top: -100px;
  left: -50px;
  width: 400px;
  height: 800px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15) 0%, transparent 80%);
  transform: rotate(35deg);
}

.sunbeam-2 {
  left: 250px;
  width: 500px;
  opacity: 0.6;
}

.cloud {
  position: absolute;
  background: #ffffff;
  border-radius: 50px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08), inset 0 -6px 0 #e6f3ff;
  opacity: 0.95;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
}

.cloud-1 {
  width: 160px;
  height: 48px;
  top: 12%;
  left: -200px;
  animation: driftCloud 55s linear infinite -10s;
}
.cloud-1::before { width: 62px; height: 62px; top: -28px; left: 26px; }
.cloud-1::after { width: 48px; height: 48px; top: -18px; left: 76px; }

.cloud-2 {
  width: 220px;
  height: 60px;
  top: 38%;
  left: -260px;
  animation: driftCloud 70s linear infinite -35s;
}
.cloud-2::before { width: 88px; height: 88px; top: -42px; left: 42px; }
.cloud-2::after { width: 66px; height: 66px; top: -28px; left: 115px; }

.cloud-3 {
  width: 180px;
  height: 52px;
  top: 72%;
  left: -220px;
  animation: driftCloud 80s linear infinite -5s;
}
.cloud-3::before { width: 70px; height: 70px; top: -32px; left: 32px; }
.cloud-3::after { width: 54px; height: 54px; top: -20px; left: 90px; }

.cloud-4 {
  width: 130px;
  height: 40px;
  top: 24%;
  left: -160px;
  animation: driftCloud 62s linear infinite -48s;
  opacity: 0.75;
}
.cloud-4::before { width: 46px; height: 46px; top: -20px; left: 20px; }
.cloud-4::after { width: 36px; height: 36px; top: -14px; left: 60px; }

@keyframes driftCloud {
  0% { transform: translateX(0vw); }
  100% { transform: translateX(calc(100vw + 320px)); }
}

.sparkle {
  position: absolute;
  color: #fffbcf;
  font-size: 1.4rem;
  animation: twinkle 3s ease-in-out infinite;
}

.sparkle-1 { top: 10%; left: 15%; animation-delay: 0.2s; }
.sparkle-2 { top: 25%; right: 14%; animation-delay: 1.1s; }
.sparkle-3 { top: 60%; left: 10%; animation-delay: 2.2s; }
.sparkle-4 { top: 46%; right: 20%; animation-delay: 0.7s; }
.sparkle-5 { top: 82%; right: 12%; animation-delay: 1.7s; }

@keyframes twinkle {
  0%, 100% { transform: scale(0.6); opacity: 0.25; }
  50% { transform: scale(1.4); opacity: 1; text-shadow: 0 0 12px #ffe259; }
}

.floating-balls-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.floating-pokeball-btn {
  position: absolute;
  pointer-events: auto;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s ease;
}

.floating-pokeball-btn:focus-visible .float-ball {
  box-shadow: 0 0 0 4px var(--yellow), 0 0 15px var(--yellow);
}

.float-ball {
  width: 48px;
  height: 48px;
  animation: floatBob 4s ease-in-out infinite;
  display: block;
}

.ball-pos-1 { top: 14%; left: 7%; }
.ball-pos-1 .float-ball { animation-delay: 0s; width: 44px; height: 44px; }

.ball-pos-2 { top: 38%; left: 4%; }
.ball-pos-2 .float-ball { animation-delay: 1.3s; width: 50px; height: 50px; }

.ball-pos-3 { top: 72%; left: 8%; }
.ball-pos-3 .float-ball { animation-delay: 2.3s; width: 40px; height: 40px; }

.ball-pos-4 { top: 16%; right: 7%; }
.ball-pos-4 .float-ball { animation-delay: 0.8s; width: 48px; height: 48px; }

.ball-pos-5 { top: 45%; right: 5%; }
.ball-pos-5 .float-ball { animation-delay: 1.9s; width: 42px; height: 42px; }

.ball-pos-6 { top: 76%; right: 8%; }
.ball-pos-6 .float-ball { animation-delay: 2.9s; width: 46px; height: 46px; }

.ball-pos-7 { top: 6%; left: 16%; }
.ball-pos-7 .float-ball { animation-delay: 0.5s; width: 38px; height: 38px; }

.ball-pos-8 { top: 22%; left: 18%; }
.ball-pos-8 .float-ball { animation-delay: 1.7s; width: 44px; height: 44px; }

.ball-pos-9 { top: 48%; left: 3%; }
.ball-pos-9 .float-ball { animation-delay: 2.1s; width: 42px; height: 42px; }

.ball-pos-10 { top: 58%; left: 15%; }
.ball-pos-10 .float-ball { animation-delay: 0.9s; width: 46px; height: 46px; }

.ball-pos-11 { top: 84%; left: 4%; }
.ball-pos-11 .float-ball { animation-delay: 3.1s; width: 40px; height: 40px; }

.ball-pos-12 { top: 92%; left: 14%; }
.ball-pos-12 .float-ball { animation-delay: 1.5s; width: 42px; height: 42px; }

.ball-pos-13 { top: 28%; left: 26%; }
.ball-pos-13 .float-ball { animation-delay: 2.7s; width: 36px; height: 36px; }

.ball-pos-14 { top: 68%; left: 23%; }
.ball-pos-14 .float-ball { animation-delay: 0.3s; width: 40px; height: 40px; }

.ball-pos-15 { top: 82%; left: 21%; }
.ball-pos-15 .float-ball { animation-delay: 1.8s; width: 44px; height: 44px; }

.ball-pos-16 { top: 4%; left: 28%; }
.ball-pos-16 .float-ball { animation-delay: 2.4s; width: 38px; height: 38px; }

.ball-pos-17 { top: 6%; right: 16%; }
.ball-pos-17 .float-ball { animation-delay: 1.1s; width: 40px; height: 40px; }

.ball-pos-18 { top: 22%; right: 19%; }
.ball-pos-18 .float-ball { animation-delay: 2.2s; width: 44px; height: 44px; }

.ball-pos-19 { top: 52%; right: 3%; }
.ball-pos-19 .float-ball { animation-delay: 0.7s; width: 42px; height: 42px; }

.ball-pos-20 { top: 60%; right: 16%; }
.ball-pos-20 .float-ball { animation-delay: 3.3s; width: 46px; height: 46px; }

.ball-pos-21 { top: 84%; right: 4%; }
.ball-pos-21 .float-ball { animation-delay: 1.4s; width: 40px; height: 40px; }

.ball-pos-22 { top: 92%; right: 15%; }
.ball-pos-22 .float-ball { animation-delay: 2.6s; width: 42px; height: 42px; }

.ball-pos-23 { top: 28%; right: 26%; }
.ball-pos-23 .float-ball { animation-delay: 0.4s; width: 36px; height: 36px; }

.ball-pos-24 { top: 68%; right: 24%; }
.ball-pos-24 .float-ball { animation-delay: 2.0s; width: 40px; height: 40px; }

.ball-pos-25 { top: 82%; right: 22%; }
.ball-pos-25 .float-ball { animation-delay: 3.5s; width: 44px; height: 44px; }

.ball-pos-26 { top: 4%; right: 28%; }
.ball-pos-26 .float-ball { animation-delay: 1.6s; width: 38px; height: 38px; }

@keyframes floatBob {
  0%, 100% { transform: translateY(0px) rotate(-6deg); }
  50% { transform: translateY(-16px) rotate(8deg); }
}

.ball-burst-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px dashed var(--gold);
  pointer-events: none;
  opacity: 0;
}

.popup-sprite-wrapper {
  position: absolute;
  top: -95px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 90px;
  height: 90px;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
}

.popup-sprite-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45));
}

.floating-pokeball-btn.popping .float-ball {
  animation: ballWigglePop 0.4s ease forwards;
}

.floating-pokeball-btn.popping .ball-burst-ring {
  animation: burstRingExpand 0.75s ease-out forwards;
}

.floating-pokeball-btn.popping .popup-sprite-wrapper {
  animation: spritePopIn 2.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes ballWigglePop {
  0% { transform: rotate(0deg) scale(1); filter: brightness(1); }
  25% { transform: rotate(-24deg) scale(1.2); }
  50% { transform: rotate(24deg) scale(1.3); filter: brightness(1.7); }
  75% { transform: rotate(-12deg) scale(1.35); filter: brightness(2); }
  100% { transform: rotate(0deg) scale(0); opacity: 0; }
}

@keyframes burstRingExpand {
  0% { transform: translate(-50%, -50%) scale(0.2) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2) rotate(180deg); opacity: 0; }
}

@keyframes spritePopIn {
  0% { transform: translateX(-50%) scale(0); opacity: 0; }
  25% { transform: translateX(-50%) scale(1.25); opacity: 1; }
  35% { transform: translateX(-50%) scale(1); opacity: 1; }
  85% { transform: translateX(-50%) scale(1) translateY(-10px); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.8) translateY(-20px); opacity: 0; }
}

/* ==========================================================================
   AUTHENTIC POKÉMON TRADING CARD (HERO)
   ========================================================================== */
.hero-container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 490px;
  margin: 0 auto;
}

.card-tilt-stage {
  perspective: 1200px;
}

.tcg-pokemon-card {
  position: relative;
  background: linear-gradient(135deg, #f0ede6 0%, #ffffff 35%, #e8e4db 100%);
  border: 6px solid var(--ink);
  border-radius: 22px;
  padding: 16px 14px;
  box-shadow:
    0 0 0 3px #ffffff,
    0 0 0 7px #dcdcdc,
    0 0 0 11px var(--ink),
    0 22px 45px rgba(0, 0, 0, 0.35),
    var(--shadow-comic-xl);
  overflow: hidden;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

.card-holo-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.4) 40%,
    rgba(255, 220, 100, 0.25) 45%,
    rgba(100, 200, 255, 0.25) 50%,
    rgba(255, 100, 200, 0.25) 55%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 10;
  opacity: 0.55;
  mix-blend-mode: overlay;
  transition: opacity 0.3s;
}

.card-foil-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 215, 0, 0.8) 1.5px, transparent 2.5px);
  background-size: 24px 24px, 36px 36px;
  background-position: 0 0, 12px 12px;
  opacity: 0.3;
  mix-blend-mode: color-dodge;
  pointer-events: none;
  animation: sparkleShift 12s linear infinite;
  z-index: 11;
}

@keyframes sparkleShift {
  0% { background-position: 0 0, 12px 12px; }
  100% { background-position: 24px 48px, 48px 36px; }
}

.tcg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #e4e7eb 0%, #ffffff 50%, #e4e7eb 100%);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 6px 10px;
}

.tcg-stage-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: radial-gradient(circle, #ffeaa7 0%, #fdcb6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 1px 1px 0 var(--ink);
}

.stage-avatar-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.badge-level {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  background-color: var(--ink);
  color: var(--cream);
  padding: 4px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.tcg-title-block {
  text-align: center;
  flex-grow: 1;
}

.card-sub-title {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--ink);
  line-height: 1.1;
}

.card-main-title {
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--poke-red);
  text-shadow: 2px 2px 0 var(--yellow), 3px 3px 0 var(--ink);
  letter-spacing: 0.5px;
}

.tcg-hp-badge {
  text-align: right;
}

.badge-hp {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--ink);
}

.hp-val {
  font-size: 0.85rem;
  color: #d63031;
  font-weight: 900;
}

.mascot-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 1.5rem;
  margin: 6px 0;
}

.mascot-icon {
  display: inline-block;
  animation: mascotBob 2.8s ease-in-out infinite;
}

.mascot-1 { animation-delay: 0s; }
.mascot-2 { animation-delay: 0.35s; }
.mascot-3 { animation-delay: 0.7s; }
.mascot-4 { animation-delay: 1.05s; }

@keyframes mascotBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.tcg-art-frame {
  position: relative;
  height: 220px;
  background: radial-gradient(circle at 50% 60%, #ffeaa7 0%, #ff7675 50%, #d63031 90%);
  border: 4px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.4), var(--shadow-comic-sm);
  margin-bottom: 12px;
}

.art-bg-flames {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 234, 167, 0.8) 0%, transparent 65%),
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 118, 117, 0.2) 0deg 20deg, transparent 20deg 40deg);
  animation: rotateFlames 30s linear infinite;
}

@keyframes rotateFlames {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.art-squad-composition {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.art-charizard {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 175px;
  height: 175px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5));
  z-index: 1;
}

.art-pikachu {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 105px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
  z-index: 4;
}

.art-squirtle {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
  z-index: 3;
}

.art-bulbasaur {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
  z-index: 3;
}

.art-sparkle-overlay {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1.5rem;
  color: #fffbcf;
  z-index: 5;
  animation: twinkle 2s infinite;
}

.tcg-moves-block {
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.move-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.move-row:not(:last-child) {
  border-bottom: 2px dashed #cfc8be;
}

.move-energy-and-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.energy-icons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.energy-orb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  font-size: 0.65rem;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.orb-fire {
  background: radial-gradient(circle at 35% 35%, #ff7675 0%, #d63031 100%);
}

.orb-colorless {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #b2bec3 100%);
}

.move-name-text {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  color: var(--ink);
}

.move-dots {
  flex-grow: 1;
  border-bottom: 2px dotted #888;
  margin: 0 8px;
}

.move-damage {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: #d63031;
}

.tcg-bottom-plaque {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #dfe6e9 0%, #ffffff 50%, #b2bec3 100%);
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.8), var(--shadow-comic-sm);
}

.turning-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 12px;
  border-right: 3px solid var(--ink);
}

.turning-label {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--ink);
}

.turning-huge-num {
  font-family: var(--font-sans);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 0.9;
  color: var(--ink);
}

.specs-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.spec-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink);
}

.spec-icon-pokeball {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: linear-gradient(180deg, var(--poke-red) 50%, #ffffff 50%);
  display: inline-block;
  flex-shrink: 0;
}

.tcg-card-footer-bar {
  background-color: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.75rem;
  text-align: center;
  padding: 6px 8px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.hero-cta-wrap {
  text-align: center;
}

.card-cta-btn {
  width: 100%;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.party-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  border: var(--border-comic);
  box-shadow: var(--shadow-comic);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  line-height: 1.4;
}

.party-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-comic-lg);
}

.party-btn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-comic-sm);
}

.party-btn-primary {
  background-color: var(--poke-red);
  color: #ffffff;
}

.party-btn-primary:hover {
  background-color: #ff4757;
}

.party-btn-secondary {
  background-color: var(--poke-blue);
  color: #ffffff;
}

.party-btn-secondary:hover {
  background-color: #2ed573;
}

.party-btn-gold {
  background: linear-gradient(180deg, #ffd32a 0%, #ffa801 100%);
  color: var(--ink);
}

.party-btn-gold:hover {
  background: #ffd32a;
}

.btn-bounce-icon {
  display: inline-block;
  animation: mascotBob 1.5s infinite;
}

.cal-pokeball-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, var(--poke-red) 50%, #ffffff 50%);
  display: inline-block;
}

/* Authentic Pokémon Forest Tree Canopy Horizon (Transition from Sky to Ground) */
.sky-forest-horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 3;
  line-height: 0;
}

.svg-forest-tree-canopy {
  display: block;
  width: 100%;
  height: 64px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.22));
}

.forest-ground-strip {
  height: 16px;
  background:
    repeating-linear-gradient(
      90deg,
      #3da33e 0px,
      #3da33e 28px,
      #2f8a30 28px,
      #2f8a30 56px
    );
  border-top: 3.5px solid var(--ink);
}

/* ==========================================================================
   CARTOON OVERWORLD SECTIONS & CHECKERBOARDS
   ========================================================================== */
section {
  position: relative;
  padding: 60px 16px 80px 16px;
  border-bottom: 5px solid var(--ink);
}

.content-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.tile-grass-light {
  background-color: #5bbd49;
  background-image:
    radial-gradient(circle at 10% 20%, #68cf55 12%, transparent 13%),
    radial-gradient(circle at 70% 60%, #68cf55 10%, transparent 11%),
    radial-gradient(circle at 40% 80%, #4ea83e 14%, transparent 15%),
    repeating-conic-gradient(rgba(0, 0, 0, 0.03) 0% 25%, transparent 0% 50%);
  background-size: 60px 60px, 70px 70px, 80px 80px, 32px 32px;
}

.tile-grass-deep {
  background-color: #3b8c2d;
  background-image:
    radial-gradient(circle at 20% 30%, #48a537 14%, transparent 15%),
    radial-gradient(circle at 80% 70%, #2f7324 16%, transparent 17%),
    repeating-conic-gradient(rgba(0, 0, 0, 0.04) 0% 25%, transparent 0% 50%);
  background-size: 70px 70px, 90px 90px, 32px 32px;
}

.tile-tan-mart {
  background-color: #f1d7a8;
  background-image:
    radial-gradient(circle at 25% 25%, #e2c38e 15%, transparent 16%),
    radial-gradient(circle at 75% 75%, #fae6c3 15%, transparent 16%),
    repeating-conic-gradient(rgba(0, 0, 0, 0.03) 0% 25%, transparent 0% 50%);
  background-size: 40px 40px, 40px 40px, 30px 30px;
}

.tile-red-center {
  background-color: #ffd8d6;
  background-image:
    radial-gradient(circle at 20% 40%, #ffc5c2 12%, transparent 13%),
    radial-gradient(circle at 80% 60%, #ffe9e8 15%, transparent 16%),
    repeating-conic-gradient(rgba(0, 0, 0, 0.025) 0% 25%, transparent 0% 50%);
  background-size: 50px 50px, 70px 70px, 32px 32px;
}

.section-heading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto 36px auto;
  position: relative;
  z-index: 4;
}

.section-h2 {
  font-family: var(--font-pixel);
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--poke-red-dark);
  text-shadow: 2px 2px 0 var(--yellow), 3px 3px 0 var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.section-h2::after {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0%, #ffffff 20%, var(--ink) 20.5%, var(--ink) 28%, transparent 28.5%),
    linear-gradient(180deg, var(--poke-red) 0%, var(--poke-red) 45%, var(--ink) 45.1%, var(--ink) 54.9%, #ffffff 55%, #ffffff 100%);
  box-shadow: 2px 2px 0 var(--ink);
}

.section-sub {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 10px;
}

/* Pokémon Route Wooden Signboard Plaque */
.section-sub.sign-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 400px;
  background: linear-gradient(180deg, #653b16 0%, #3e2008 100%);
  color: #fff9e6;
  border: 3.5px solid #201004;
  border-radius: 8px;
  padding: 8px 18px;
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.3px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-shadow: 1.5px 1.5px 0 #120903;
  position: relative;
  z-index: 4;
}

#details .details-grid {
  margin-top: 110px;
}

.town-scene-row,
.tallgrass-scene-row,
.mart-scene-row,
.center-scene-row {
  width: 100%;
  margin-bottom: 32px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.dirt-trail {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  min-width: 720px;
  padding: 16px 24px;
  background-color: var(--path-tan);
  border-top: 5px solid var(--path-border);
  border-bottom: 5px solid var(--path-border);
  background-image:
    radial-gradient(circle at 20% 30%, var(--path-border) 10%, transparent 12%),
    radial-gradient(circle at 70% 60%, var(--path-stone) 14%, transparent 16%);
  background-size: 24px 24px, 32px 32px;
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.building-unit {
  position: relative;
  filter: drop-shadow(4px 4px 0 rgba(22, 24, 29, 0.25));
  transition: transform 0.2s ease;
}

.building-unit:hover {
  transform: translateY(-4px);
}

.scene-svg {
  display: block;
}

.tallgrass-tufts-cluster {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.cartoon-tuft {
  width: 18px;
  background-color: #2e7d32;
  border: 2.5px solid var(--ink);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
.tuft-left { height: 28px; background-color: #1b5e20; }
.tuft-mid { height: 38px; background-color: #2e7d32; }
.tuft-right { height: 24px; background-color: #388e3c; }

/* ==========================================================================
   4. DETAILS SECTION: 4 CARDS & CALENDAR
   ========================================================================== */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.detail-card {
  position: relative;
  background-color: var(--cream);
  border: var(--border-comic);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-comic);
  padding: 24px 18px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-comic-lg);
}

.detail-badge-pill {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--ink);
  color: var(--yellow);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 4px 10px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.detail-icon-wrap {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, #ffeaa7 0%, #ffc048 100%);
  border: 3px solid var(--ink);
  border-radius: 50%;
  margin: 6px auto 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0 var(--ink);
}

.detail-icon {
  font-size: 2rem;
}

.detail-title {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--poke-red);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.detail-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
}

.detail-subtext {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
}

.detail-flourish {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--poke-blue);
  background: #e1f5fe;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-action-link {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--poke-blue);
  text-decoration: underline;
  padding: 6px 4px;
  transition: color 0.15s;
}

.card-action-link:hover {
  color: var(--poke-red);
}

.calendar-action-wrap {
  text-align: center;
}

/* ==========================================================================
   5. WILD POKÉMON SECTION: DIALOG BOX & CAPTURE REVEAL GRID
   ========================================================================== */
.gb-dialog-box {
  position: relative;
  background-color: #ffffff;
  border: 5px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow:
    0 0 0 3px #ffffff,
    0 0 0 7px var(--ink),
    var(--shadow-comic-lg);
  padding: 22px 38px 22px 22px;
  max-width: 720px;
  margin: 0 auto 36px auto;
  min-height: 85px;
}

.dialog-content {
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--ink);
}

.dialog-arrow {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-size: 0.85rem;
  color: var(--poke-red);
  animation: blinkSteps 0.8s steps(2, start) infinite;
}

.pokemon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .pokemon-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

.pokemon-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, var(--cream) 100%);
  border: var(--border-comic);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-comic);
  padding: 16px 10px;
  text-align: center;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pokemon-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-comic-lg);
}

.card-sprite-stage {
  position: relative;
  width: 105px;
  height: 105px;
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 208, 40, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}

.card-pokeball {
  width: 54px;
  height: 54px;
  position: absolute;
  z-index: 2;
  transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
  animation: pokeballFloat 2.8s ease-in-out infinite;
}

@keyframes pokeballFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.burst-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 95px;
  height: 95px;
  border-radius: 50%;
  border: 4px dashed var(--gold);
  pointer-events: none;
  opacity: 0;
}

.pokemon-sprite {
  width: 100px;
  height: 100px;
  object-fit: contain;
  opacity: 0;
  transform: scale(0);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.pokemon-card.anim-wiggle .card-pokeball {
  animation: pokeballWiggle 0.65s ease-in-out;
}

.pokemon-card.anim-burst .card-pokeball {
  animation: pokeballBurst 0.35s ease-out forwards;
}

.pokemon-card.anim-burst .burst-ring {
  animation: burstRingExpand 0.6s ease-out forwards;
}

.pokemon-card.revealed .card-pokeball {
  display: none !important;
}

.pokemon-card.revealed .pokemon-sprite {
  opacity: 1;
  transform: scale(1);
  animation: spritePopReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, spriteIdleBob 3s ease-in-out infinite 0.7s;
}

.pokemon-card:nth-child(2n) .pokemon-sprite { animation-delay: 0.25s, 0.95s; }
.pokemon-card:nth-child(3n) .pokemon-sprite { animation-delay: 0.45s, 1.15s; }
.pokemon-card:nth-child(4n) .pokemon-sprite { animation-delay: 0.15s, 0.85s; }
.pokemon-card:nth-child(5n) .pokemon-sprite { animation-delay: 0.35s, 1.05s; }

@keyframes pokeballWiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-24deg); }
  50% { transform: rotate(18deg); }
  75% { transform: rotate(-12deg); }
  100% { transform: rotate(0deg); }
}

@keyframes pokeballBurst {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.8; filter: brightness(1.8); }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes spritePopReveal {
  0% { opacity: 0; transform: scale(0.2); }
  70% { opacity: 1; transform: scale(1.18); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes spriteIdleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.pokemon-name {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  color: var(--ink);
  margin: 6px 0 6px 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pokemon-name.mystery-name {
  color: #4b5563;
  letter-spacing: 0.5px;
}

.pokemon-name.revealed-name {
  color: var(--ink);
}

.pokemon-desc {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  line-height: 1.45;
  color: #374151;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 10px 0 8px 0;
  text-align: center;
  font-style: italic;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pokemon-desc.mystery-desc {
  border-left: 3.5px solid #f59e0b;
  background: #fffdf5;
  color: #4b5563;
}

.pokemon-desc.revealed-desc {
  border-left: 3.5px solid #10b981;
  background: #f0fdf4;
  color: #111827;
}

.pokemon-types {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.type-badge {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  text-transform: uppercase;
  color: #ffffff;
  padding: 3px 7px;
  border-radius: 12px;
  border: 1.5px solid var(--ink);
  letter-spacing: 0.5px;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.type-fire { background-color: #EE8130; }
.type-water { background-color: #6390F0; }
.type-electric { background-color: #F7D02C; color: #16181d; }
.type-grass { background-color: #7AC74C; }
.type-poison { background-color: #A33EA1; }
.type-normal { background-color: #A8A77A; }
.type-ghost { background-color: #735797; }
.type-fighting { background-color: #C22E28; }
.type-steel { background-color: #B7B7CE; color: #16181d; }
.type-dark { background-color: #705746; }
.type-fairy { background-color: #D685AD; }
.type-flying { background-color: #A98FF3; }
.type-dragon { background-color: #6F35FC; }

/* ==========================================================================
   POKÉMON TRAINER QUIZ MODAL & MULTIPLE CHOICE GUESSING GAME
   ========================================================================== */
.pokemon-card {
  cursor: pointer;
}

.pokemon-card:hover .card-pokeball {
  transform: scale(1.1) rotate(-8deg);
  filter: drop-shadow(0 6px 12px rgba(231, 76, 60, 0.4));
}

.card-mystery-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 8px;
  background: #ffcb05;
  color: #16181d;
  border: 2px solid #16181d;
  border-radius: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 6.5px;
  box-shadow: 0 2px 0 #16181d;
  animation: tapPulse 1.6s infinite ease-in-out;
}

.trainer-guess-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 6.5px;
  letter-spacing: 0.2px;
  border: 1.5px solid #16181d;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.trainer-guess-tag.guess-correct {
  background: #2ecc71;
  color: #ffffff;
  text-shadow: 1px 1px 0 #1b5e20;
}

.trainer-guess-tag.guess-wrong {
  background: #f39c12;
  color: #ffffff;
  text-shadow: 1px 1px 0 #b33939;
}

.guess-retry-hint {
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 5.5px;
  color: #7f8c8d;
  margin-top: 4px;
  text-decoration: underline;
}

/* Modal Window */
.pokemon-quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.25s ease;
}

.pokemon-quiz-modal.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.quiz-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.quiz-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: #fffcf0;
  border: 4px solid #16181d;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 6px 6px 0 #16181d;
  overflow: hidden;
  animation: modalPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPopIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.quiz-card-header {
  background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
  color: #ffffff;
  padding: 12px 16px;
  border-bottom: 3.5px solid #16181d;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-pokeball-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #16181d;
  background: linear-gradient(180deg, #ffffff 50%, #e74c3c 50%);
  box-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.quiz-header-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000;
}

.quiz-close-btn {
  background: #ffffff;
  border: 2px solid #16181d;
  color: #16181d;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 1.5px 1.5px 0 #16181d;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.15s ease;
}

.quiz-close-btn:hover {
  transform: scale(1.1);
  background: #ff7675;
  color: #ffffff;
}

.quiz-card-body {
  padding: 16px;
}

.quiz-mystery-stage {
  position: relative;
  background: radial-gradient(circle, #fbf2c0 0%, #e0f2fe 75%);
  border: 3px solid #16181d;
  border-radius: 10px;
  padding: 16px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.12);
  margin-bottom: 12px;
  overflow: hidden;
}

.quiz-modal-pokeball {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  animation: pokeballWobblePulse 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.3));
}

@keyframes pokeballWobblePulse {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  25% {
    transform: translateY(-6px) scale(1.05) rotate(-6deg);
  }
  75% {
    transform: translateY(-3px) scale(1.02) rotate(6deg);
  }
}

.quiz-mystery-sprite {
  width: 105px;
  height: 105px;
  object-fit: contain;
  filter: brightness(1) drop-shadow(0 6px 14px rgba(0,0,0,0.35));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-mystery-sprite.revealed-color {
  transform: scale(1.1);
  animation: spriteIdleBob 2.5s ease-in-out infinite;
}

.quiz-clue-box {
  margin-bottom: 12px;
}

.quiz-clue-desc {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11.5px;
  line-height: 1.45;
  color: #1e293b;
  background: #f8fafc;
  border: 2px dashed #ffcb05;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  font-style: italic;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.quiz-type-clue {
  margin-top: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: #2c3e50;
  display: flex;
  gap: 6px;
  align-items: center;
}

.quiz-prompt-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1.5;
  color: #16181d;
  text-align: center;
  margin-bottom: 14px;
}

.quiz-choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.quiz-choice-btn {
  background: #ffffff;
  border: 3px solid #16181d;
  border-radius: 8px;
  padding: 12px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 8.5px;
  color: #16181d;
  cursor: pointer;
  box-shadow: 0 4px 0 #16181d;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.quiz-choice-btn:hover:not(:disabled) {
  background: #fffa65;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #16181d;
}

.quiz-choice-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #16181d;
}

.quiz-choice-btn.is-correct {
  background: #2ecc71 !important;
  color: #ffffff !important;
  border-color: #1b5e20 !important;
  text-shadow: 1px 1px 0 #1b5e20;
  animation: correctBounce 0.4s ease-out;
}

.quiz-choice-btn.is-wrong {
  background: #e74c3c !important;
  color: #ffffff !important;
  border-color: #78281f !important;
  text-shadow: 1px 1px 0 #78281f;
  opacity: 0.85;
}

@keyframes correctBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.quiz-feedback {
  text-align: center;
  padding-top: 6px;
}

.quiz-feedback.hidden {
  display: none;
}

.quiz-feedback-msg {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1.6;
  margin-bottom: 12px;
  color: #16181d;
}

.quiz-feedback-msg.feedback-correct {
  color: #27ae60;
}

.quiz-feedback-msg.feedback-wrong {
  color: #d35400;
}

/* ==========================================================================
   6. GIFTS SECTION: POKÉ MART
   ========================================================================== */
.rotated-sign-banner {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  line-height: 1.6;
  background-color: var(--yellow);
  color: var(--ink);
  border: var(--border-comic);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  box-shadow: var(--shadow-comic);
  transform: rotate(-1.5deg);
  margin-top: 10px;
}

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.gift-card {
  position: relative;
  background-color: var(--cream);
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-comic);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gift-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-comic-lg);
}

.shelf-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--poke-blue);
  color: #ffffff;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  padding: 4px 12px;
  border-radius: 12px;
  border: 2px solid var(--ink);
  letter-spacing: 0.5px;
}

.gift-icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
}

.gift-title {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: var(--poke-red);
  margin-bottom: 12px;
}

.gift-desc {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  flex-grow: 1;
}

.swap-placeholder-note {
  font-family: monospace;
  font-size: 0.7rem;
  color: #777;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px dashed #999;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 16px;
}

.gift-btn {
  width: 100%;
}

/* ==========================================================================
   7. RSVP & DIET RESTRICTIONS: POKÉMON CENTER
   ========================================================================== */
.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-card {
  position: relative;
  background-color: var(--cream);
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-comic-lg);
  padding: 32px 26px;
}

.healing-machine-lights {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  background: #2f3640;
  padding: 10px 18px;
  border-radius: 30px;
  border: 3px solid var(--ink);
}

.heal-slot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background-color: #57606f;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.heal-slot.slot-active {
  background-color: #ff4757;
  box-shadow: 0 0 8px #ff4757;
  animation: healPulse 1.2s ease-in-out infinite alternate;
}
.heal-slot:nth-child(2).slot-active { animation-delay: 0.3s; background-color: #ffd32a; box-shadow: 0 0 8px #ffd32a; }
.heal-slot:nth-child(3).slot-active { animation-delay: 0.6s; background-color: #2ed573; box-shadow: 0 0 8px #2ed573; }

@keyframes healPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 14px;
}

.form-header-icon {
  font-size: 1.8rem;
}

.form-header-title {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--poke-red);
}

.form-field {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}

.party-input,
.party-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background-color: #ffffff;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.08);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.party-input:focus,
.party-textarea:focus {
  border-color: var(--poke-red);
  box-shadow: 0 0 0 3px rgba(235, 59, 50, 0.25);
}

.form-submit-btn {
  width: 100%;
  margin-top: 10px;
}

.diet-success-card {
  background-color: #edfbf0;
  border: 4px solid #2b7722;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-comic);
  padding: 24px;
  text-align: center;
  animation: popInSuccess 0.4s ease-out;
}

@keyframes popInSuccess {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-icon {
  font-size: 2.8rem;
  margin-bottom: 10px;
}

.success-title {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  color: #1f6b24;
  margin-bottom: 8px;
}

.success-desc {
  font-size: 1rem;
  color: #2b7722;
  font-weight: 700;
}

/* ==========================================================================
   8. FOOTER: GAME BOY NOSTALGIA & PIKACHU RUN
   ========================================================================== */
.footer-dmg {
  background-color: var(--gb-darkest);
  border-top: 6px solid var(--ink);
  padding: 48px 16px;
  text-align: center;
  color: var(--gb-light);
}

.footer-pikachu-runner {
  width: 100%;
  height: 52px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.running-pika-img {
  position: absolute;
  left: -60px;
  width: 48px;
  height: 48px;
  object-fit: contain;
  animation: runPikachu 14s linear infinite;
}

@keyframes runPikachu {
  0% { transform: translateX(0) scaleX(1); }
  49% { transform: translateX(calc(100vw + 40px)) scaleX(1); }
  50% { transform: translateX(calc(100vw + 40px)) scaleX(-1); }
  99% { transform: translateX(-40px) scaleX(-1); }
  100% { transform: translateX(-40px) scaleX(1); }
}

.footer-dialog {
  margin-bottom: 20px;
}

.footer-high-score {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--yellow);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.footer-tagline {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--gb-light);
  letter-spacing: 2px;
}

/* ==========================================================================
   SCROLL REVEAL UTILITY
   ========================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .cloud {
    transform: none !important;
    left: 10% !important;
  }

  .float-ball {
    animation: none !important;
  }

  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .pokemon-sprite {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .card-pokeball,
  .burst-ring {
    display: none !important;
  }

  .access-gate.unlocking {
    opacity: 0 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 640px) {
  .nav-container {
    justify-content: center;
  }

  .nav-links {
    gap: 8px;
    justify-content: center;
  }

  .nav-link {
    font-size: 0.55rem;
    padding: 4px 8px;
  }

  .card-main-title {
    font-size: 1rem;
  }

  .section-h2 {
    font-size: 1.1rem;
  }

  .gb-title {
    font-size: 0.8rem;
  }

  .gb-console-body {
    padding: 14px 10px 20px 10px;
  }

  .pokemon-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .float-ball {
    width: 36px !important;
    height: 36px !important;
  }
  .ball-pos-1 { top: 8%; left: 3%; }
  .ball-pos-2 { top: 34%; left: 2%; }
  .ball-pos-3 { top: 82%; left: 4%; }
  .ball-pos-4 { top: 8%; right: 3%; }
  .ball-pos-5 { top: 34%; right: 2%; }
  .ball-pos-6 { top: 82%; right: 4%; }
}

/* ==========================================================================
   OVERWORLD ROADS & SCROLL-DRIVEN PIXEL TRAINER
   ========================================================================== */

/* ==========================================================================
   OVERWORLD ROADS, LIVING TOWN BACKDROPS & SCROLL-DRIVEN PIXEL TRAINER
   ========================================================================== */

/* FOREGROUND CONTENT LAYER: Cards, UI & Forms sit at z-index: 20 so Trainer walks BEHIND them */
.content-container,
.hero-container,
.tcg-pokemon-card,
.card-tilt-stage,
.details-grid,
.detail-card,
.pokemon-grid,
.pokemon-card,
.gifts-grid,
.gift-card,
.form-card,
.site-footer-inner {
  position: relative;
  z-index: 20;
}

/* OVERWORLD ROAD NETWORK LAYER */
.overworld-roads-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.road-network-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Secondary Town Connector Routes (Authentic GBA Branching) */
.town-branch-routes path {
  fill: none;
  stroke: #d8b870;
  stroke-width: 22px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}

.town-branch-routes path.branch-border {
  stroke: #7f521f;
  stroke-width: 30px;
  opacity: 0.55;
  stroke-dasharray: none;
}

/* Primary Walking Route (Route 5 to Chuck E. Cheese Gym) */
.route-path-border {
  fill: none;
  stroke: #6a3e14;
  stroke-width: 52px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
}

.route-path-stepped {
  fill: none;
  stroke: #966127;
  stroke-width: 44px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-path-surface {
  fill: none;
  stroke: url(#poke-dirt-sand);
  stroke-width: 38px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-path-dashes {
  fill: none;
  stroke: #be923e;
  stroke-width: 5px;
  stroke-linecap: round;
  stroke-dasharray: 8 16;
  opacity: 0.85;
}

/* Wooden Bridge Crossing Deck */
.route-bridge-deck rect {
  fill: url(#poke-bridge-planks);
  stroke: #5a300a;
  stroke-width: 3px;
  rx: 2px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
}

/* Route Landmark Signposts (Aligned to Left Side of Section) */
.section-signpost-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding-top: 14px;
  margin-bottom: 26px;
  position: relative;
  z-index: 25;
  pointer-events: auto;
}

.overworld-signpost {
  position: relative;
  display: inline-block;
  pointer-events: auto;
  z-index: 25;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.overworld-signpost:hover {
  transform: scale(1.08) translateY(-4px);
}

.sign-board {
  background: #9b5e28;
  border: 3px solid #4a2800;
  box-shadow: 0 4px 0 #281400, inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 8px 12px rgba(0, 0, 0, 0.2);
  color: #fff8e7;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  text-shadow: 1px 1px 0 #281400;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.sign-board::before,
.sign-board::after {
  content: '';
  position: absolute;
  bottom: -8px;
  width: 5px;
  height: 8px;
  background: #5a320d;
  border: 1px solid #281400;
}

.sign-board::before { left: 8px; }
.sign-board::after { right: 8px; }

@media (max-width: 640px) {
  .section-signpost-bar {
    margin-bottom: 16px;
  }
  .sign-board {
    font-size: 6.5px;
    padding: 4px 8px;
  }
}

/* ==========================================================================
   TOWN BACKDROPS & OVERWORLD SCENERY
   ========================================================================== */

.overworld-town-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.building-nameplate {
  display: inline-block;
  background: #523112;
  border: 2px solid #251302;
  color: #ffeaa7;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  padding: 3px 6px;
  border-radius: 3px;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

/* ==========================================================================
   TOWN HOUSES & OVERWORLD BUILDINGS (7-8 HOUSES PER SECTION)
   ========================================================================== */

.town-building,
.town-house {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
  transition: transform 0.2s ease;
  pointer-events: none;
}

/* 1. Viridian / Pallet Town Square (Details: 7 Houses neatly arranged next to each other, NOT crossing the river) */
/* North Lawn West Neighborhood: Cleanly cleared for Route 5 sign on the left */
.viridian-square-backdrop .house-ash {
  top: 15px;
  left: 25%;
}
.viridian-square-backdrop .house-gary {
  top: 15px;
  left: 36%;
}
.viridian-square-backdrop .house-green {
  bottom: 25px;
  left: 24%;
}

/* North Lawn East Neighborhood: 3 houses side by side */
.viridian-square-backdrop .house-lakeside {
  top: 15px;
  right: 21%;
}
.viridian-square-backdrop .house-yellow {
  top: 15px;
  right: 11%;
}
.viridian-square-backdrop .lab-oak {
  top: 15px;
  right: 1%;
}

/* Pallet Town Hall on lower right lawn, clear of canal and cards */
.viridian-square-backdrop .house-townhall {
  bottom: 25px;
  right: 4%;
}

/* Scenic Blue Canal: Flows horizontally below northern residential row (which ends at 130px), canal is at 170px-310px */
.viridian-square-backdrop .town-canal-wrap {
  position: absolute;
  top: 170px;
  left: 0;
  width: 100%;
  height: 140px;
  z-index: 1;
}

/* Town Center Fountain: In open park plaza on lower left lawn, completely free and clear from any house */
.viridian-square-backdrop .square-fountain {
  position: absolute;
  bottom: 35px;
  left: 4%;
  z-index: 3;
  text-align: center;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25));
}

.streetlamp {
  position: absolute;
  z-index: 4;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}
.streetlamp.lamp-left { top: 20px; left: 47%; }
.streetlamp.lamp-right { top: 20px; right: 47%; }

.park-bench {
  position: absolute;
  bottom: 35px;
  left: 14%;
  z-index: 3;
}

/* 2. Safari Tall Grass & Rock Cliffs (Pokemon: 7 Houses) */
.safari-route-backdrop .cliff-ledge {
  position: absolute;
  top: 60px;
  z-index: 2;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3));
}
.safari-route-backdrop .cliff-ledge.cliff-left {
  top: 170px;
  left: 0;
}
.safari-route-backdrop .cliff-ledge.cliff-right { right: 0; }

.safari-route-backdrop .cabin-warden {
  top: 15px;
  left: 26%;
}
.safari-route-backdrop .house-daycare {
  top: 15px;
  right: 2%;
}
.safari-route-backdrop .cabin-fishing {
  top: 180px;
  left: 3%;
}
.safari-route-backdrop .house-berry {
  top: 180px;
  right: 3%;
}
.safari-route-backdrop .cabin-stone {
  bottom: 40px;
  left: 3%;
}
.safari-route-backdrop .cabin-ranger {
  bottom: 40px;
  right: 3%;
}
.safari-route-backdrop .cabin-camp {
  top: 360px;
  left: 4%;
}

.safari-prop.stump-left {
  position: absolute;
  top: 290px;
  left: 4%;
  z-index: 2;
}

.safari-prop.berry-right {
  position: absolute;
  top: 290px;
  right: 4%;
  z-index: 2;
}

.tallgrass-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.grass-tuft-item {
  position: absolute;
  width: 36px;
  height: 28px;
  background:
    radial-gradient(ellipse at bottom left, #27ae60 60%, transparent 62%),
    radial-gradient(ellipse at bottom center, #2ecc71 60%, transparent 62%),
    radial-gradient(ellipse at bottom right, #27ae60 60%, transparent 62%);
  background-size: 12px 28px;
  background-repeat: repeat-x;
  animation: tuftSway 3s ease-in-out infinite alternate;
}
.tuft-1 { top: 20%; left: 12%; }
.tuft-2 { top: 45%; right: 10%; animation-delay: 0.8s; }
.tuft-3 { top: 70%; left: 8%; animation-delay: 1.6s; }
.tuft-4 { top: 85%; right: 12%; animation-delay: 2.2s; }

@keyframes tuftSway {
  0% { transform: skewX(0deg); }
  100% { transform: skewX(6deg); }
}

/* 3. Commercial Plaza (Gifts: 8 Buildings, top-left clear for sign) */
.commercial-plaza-backdrop .center-left {
  position: absolute;
  top: 150px;
  left: 2%;
  z-index: 2;
  text-align: center;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25));
}

.commercial-plaza-backdrop .mart-right {
  position: absolute;
  top: 55px;
  right: 2%;
  z-index: 2;
  text-align: center;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25));
}

.commercial-plaza-backdrop .bldg-dept {
  top: 15px;
  left: 26%;
}
.commercial-plaza-backdrop .bldg-game {
  top: 15px;
  right: 14%;
}
.commercial-plaza-backdrop .bldg-bike {
  top: 200px;
  left: 3%;
}
.commercial-plaza-backdrop .bldg-boutique {
  top: 200px;
  right: 3%;
}
.commercial-plaza-backdrop .bldg-bakery {
  bottom: 30px;
  left: 4%;
}
.commercial-plaza-backdrop .bldg-townhome {
  bottom: 30px;
  right: 4%;
}

.town-banner-arch {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25));
}

/* 4. Chuck E. Cheese Victory Gym Arena (RSVP: 7 Buildings, top-left clear for sign) */
.victory-gym-backdrop .gym-arena-building {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.3));
}

.victory-gym-backdrop .villa-champion {
  top: 150px;
  left: 2%;
}
.victory-gym-backdrop .bldg-guild {
  top: 20px;
  right: 2%;
}
.victory-gym-backdrop .house-rest {
  top: 180px;
  left: 3%;
}
.victory-gym-backdrop .house-lodge {
  top: 180px;
  right: 3%;
}
.victory-gym-backdrop .house-archive {
  bottom: 35px;
  left: 4%;
}
.victory-gym-backdrop .house-elite {
  bottom: 35px;
  right: 4%;
}

.gym-statue {
  position: absolute;
  top: 80px;
  z-index: 3;
}
.statue-left { left: 36%; }
.statue-right { right: 36%; }

/* Responsive Scaling for town buildings */
@media (max-width: 900px) {
  .town-building,
  .town-house {
    transform: scale(0.82);
    transform-origin: top center;
  }
}

@media (max-width: 768px) {
  .town-building,
  .town-house {
    transform: scale(0.68);
    transform-origin: top center;
    opacity: 0.9;
  }

  .viridian-square-backdrop .house-gary,
  .viridian-square-backdrop .house-green,
  .viridian-square-backdrop .house-yellow,
  .viridian-square-backdrop .house-lakeside {
    display: none;
  }
  .viridian-square-backdrop .house-ash { left: 4%; }
  .viridian-square-backdrop .lab-oak { right: 4%; }
  #details .details-grid { margin-top: 85px; }

  .cliff-ledge svg {
    width: 90px;
    height: 150px;
  }

  .finish-ribbon {
    font-size: 6px;
    padding: 6px 10px;
  }
}

/* ==========================================================================
   PIXEL TRAINER BOY (ELIO THE POKÉMON CHAMPION)
   Depth: Walks at z-index: 6 (BEHIND content cards z-index: 20, ON TOP of road z-index: 2)
   ========================================================================== */

.pixel-trainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 56px;
  z-index: 6; /* IN FRONT OF roads & background scenery, BEHIND foreground content cards */
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.35));
}

.pixel-trainer:focus-visible {
  outline: 3px dashed #ffcb05;
  outline-offset: 4px;
}

/* Speech Bubble */
.trainer-speech-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #ffffff;
  border: 3px solid #1c2833;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7.5px;
  color: #1a252f;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.96;
}

.trainer-speech-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #1c2833 transparent transparent transparent;
}

.trainer-speech-bubble::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 3px 3px 0 3px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
  z-index: 1;
}

/* Trainer Body Parts */
.trainer-sprite-container {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 90%;
  transition: transform 0.12s ease-out;
}

/* Facing Directions */
.pixel-trainer.facing-left .trainer-sprite-container {
  transform: scaleX(-1);
}

.pixel-trainer.facing-right .trainer-sprite-container {
  transform: scaleX(1);
}

/* Trainer Cap */
.trainer-cap {
  position: absolute;
  top: 2px;
  left: 10px;
  width: 24px;
  height: 14px;
  z-index: 5;
}

.cap-crown {
  position: absolute;
  top: 0;
  left: 2px;
  width: 20px;
  height: 11px;
  background: #e52521;
  border: 2px solid #1a1a1a;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.cap-bill {
  position: absolute;
  bottom: 0;
  right: -5px;
  width: 11px;
  height: 4px;
  background: #ffffff;
  border: 2px solid #1a1a1a;
  border-radius: 2px;
}

.cap-emblem {
  position: absolute;
  top: 3px;
  left: 9px;
  width: 6px;
  height: 6px;
  background: #ffffff;
  border: 1px solid #1a1a1a;
  border-radius: 50%;
}

.cap-emblem::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 2px;
  height: 2px;
  background: #e52521;
  border-radius: 50%;
}

/* Trainer Head & Face */
.trainer-head {
  position: absolute;
  top: 11px;
  left: 11px;
  width: 22px;
  height: 18px;
  z-index: 4;
}

.trainer-hair {
  position: absolute;
  top: -2px;
  left: 1px;
  width: 20px;
  height: 7px;
  background: #3e2723;
  border: 2px solid #1a1a1a;
  border-radius: 3px;
}

.trainer-hair::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -2px;
  width: 4px;
  height: 7px;
  background: #3e2723;
  border-radius: 2px;
}

.trainer-face {
  position: absolute;
  top: 3px;
  left: 2px;
  width: 18px;
  height: 14px;
  background: #fedbb2;
  border: 2px solid #1a1a1a;
  border-radius: 2px;
}

.trainer-eye {
  position: absolute;
  top: 3px;
  width: 2px;
  height: 4px;
  background: #1a1a1a;
  border-radius: 1px;
}

.trainer-eye.eye-left { left: 4px; }
.trainer-eye.eye-right { right: 4px; }

.trainer-blush {
  position: absolute;
  top: 8px;
  width: 3px;
  height: 2px;
  background: #ff8a80;
  border-radius: 1px;
}

.trainer-blush.blush-left { left: 2px; }
.trainer-blush.blush-right { right: 2px; }

/* Torso, Vest & Backpack */
.trainer-torso {
  position: absolute;
  top: 26px;
  left: 12px;
  width: 20px;
  height: 16px;
  z-index: 3;
}

.trainer-backpack {
  position: absolute;
  top: 1px;
  left: -4px;
  width: 6px;
  height: 14px;
  background: #2e7d32;
  border: 2px solid #1a1a1a;
  border-radius: 3px;
}

.trainer-vest {
  position: absolute;
  top: 0;
  left: 2px;
  width: 16px;
  height: 12px;
  background: #1976d2;
  border: 2px solid #1a1a1a;
  border-radius: 2px;
}

.trainer-vest::after {
  content: '';
  position: absolute;
  top: 0;
  left: 5px;
  width: 4px;
  height: 10px;
  background: #ffffff;
}

.trainer-belt {
  position: absolute;
  bottom: 0;
  left: 1px;
  width: 18px;
  height: 4px;
  background: #37474f;
  border: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-pokeball-belt {
  width: 5px;
  height: 5px;
  background: linear-gradient(to bottom, #e52521 50%, #ffffff 50%);
  border: 1px solid #1a1a1a;
  border-radius: 50%;
  position: relative;
}

.mini-pokeball-belt::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  width: 1px;
  height: 1px;
  background: #1a1a1a;
  border-radius: 50%;
}

/* Arms */
.trainer-arms {
  position: absolute;
  top: 27px;
  left: 8px;
  width: 28px;
  height: 14px;
  z-index: 4;
}

.trainer-arm {
  position: absolute;
  top: 0;
  width: 5px;
  height: 13px;
  background: #1976d2;
  border: 2px solid #1a1a1a;
  border-radius: 2px;
  transform-origin: top center;
}

.trainer-arm::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 3px;
  height: 3px;
  background: #fedbb2;
  border-radius: 1px;
}

.trainer-arm.arm-left {
  left: 1px;
}

.trainer-arm.arm-right {
  right: 1px;
}

/* Legs & Sneakers */
.trainer-legs {
  position: absolute;
  top: 40px;
  left: 13px;
  width: 18px;
  height: 15px;
  z-index: 2;
}

.trainer-leg {
  position: absolute;
  top: 0;
  width: 6px;
  height: 13px;
  background: #283593;
  border: 2px solid #1a1a1a;
  transform-origin: top center;
}

.trainer-leg.leg-left {
  left: 1px;
}

.trainer-leg.leg-right {
  right: 1px;
}

.trainer-shoe {
  position: absolute;
  bottom: -3px;
  left: -2px;
  width: 8px;
  height: 5px;
  background: #e52521;
  border: 1.5px solid #1a1a1a;
  border-radius: 2px;
}

.trainer-shoe::after {
  content: '';
  position: absolute;
  top: 0;
  left: 2px;
  width: 3px;
  height: 2px;
  background: #ffffff;
}

/* Walking Animations */
@keyframes trainerArmLeftSwing {
  0%, 100% { transform: rotate(-22deg); }
  50% { transform: rotate(26deg); }
}

@keyframes trainerArmRightSwing {
  0%, 100% { transform: rotate(26deg); }
  50% { transform: rotate(-22deg); }
}

@keyframes trainerLegLeftStride {
  0%, 100% { transform: rotate(24deg) translateY(-1px); }
  50% { transform: rotate(-22deg) translateY(1px); }
}

@keyframes trainerLegRightStride {
  0%, 100% { transform: rotate(-22deg) translateY(1px); }
  50% { transform: rotate(24deg) translateY(-1px); }
}

@keyframes trainerBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes trainerCelebration {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-16px) scale(1.15) rotate(-5deg); }
  60% { transform: translateY(-20px) scale(1.2) rotate(5deg); }
  85% { transform: translateY(-4px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

.pixel-trainer.is-walking .trainer-sprite-container {
  animation: trainerBob 0.32s infinite ease-in-out;
}

.pixel-trainer.is-walking .arm-left {
  animation: trainerArmLeftSwing 0.32s infinite ease-in-out;
}

.pixel-trainer.is-walking .arm-right {
  animation: trainerArmRightSwing 0.32s infinite ease-in-out;
}

.pixel-trainer.is-walking .leg-left {
  animation: trainerLegLeftStride 0.32s infinite ease-in-out;
}

.pixel-trainer.is-walking .leg-right {
  animation: trainerLegRightStride 0.32s infinite ease-in-out;
}

.pixel-trainer.trainer-jumping .trainer-sprite-container {
  animation: trainerCelebration 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
