:root {
  --tmhr-navy: #343f5a;
  --tmhr-navy-dark: #252e44;
  --tmhr-navy-soft: #edf0f5;
  --tmhr-red: #a0291d;
  --tmhr-red-dark: #7f2017;
  --tmhr-red-soft: #f8ecea;
  --white: #ffffff;
  --ink: #202636;
  --muted: #626b7d;
  --border: #dfe3ea;
  --surface: #f7f8fa;
  --sidebar-width: 18rem;
  --content-width: 52rem;
  --shadow: 0 18px 50px rgba(37, 46, 68, 0.15);
  --radius: 0.75rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  min-width: 20rem;
  background: var(--white);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: var(--tmhr-navy);
  text-decoration-color: var(--tmhr-red);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--tmhr-red);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 0.2rem solid var(--tmhr-red);
  outline-offset: 0.2rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-180%);
  border-radius: 0.4rem;
  background: var(--tmhr-red);
  color: var(--white);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.mobile-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--tmhr-navy-dark);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  border-radius: 0.55rem;
  object-fit: contain;
  box-shadow: inset 0 -0.22rem 0 var(--tmhr-red);
}

.brand-copy {
  display: grid;
  line-height: 1.12;
}

.brand-copy strong {
  font-size: 0.95rem;
}

.brand-copy small {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.menu-button,
.sidebar-close {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--white);
  color: var(--tmhr-navy);
  cursor: pointer;
}

.menu-button:hover,
.sidebar-close:hover {
  border-color: var(--tmhr-navy);
  background: var(--tmhr-navy-soft);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  width: 1.2rem;
  height: 0.12rem;
  border-radius: 1rem;
  background: currentColor;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-icon::before { top: -0.38rem; }
.menu-icon::after { top: 0.38rem; }

.sidebar {
  position: fixed;
  z-index: 60;
  inset: 0 auto 0 0;
  display: flex;
  width: min(var(--sidebar-width), 88vw);
  flex-direction: column;
  transform: translateX(-102%);
  border-right: 1px solid var(--border);
  background: var(--white);
  transition: transform 180ms ease;
}

.sidebar.is-open {
  transform: translateX(0);
  box-shadow: var(--shadow);
}

.sidebar-head {
  flex-shrink: 0;
  display: flex;
  min-height: 4.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.1rem 0.8rem 2rem;
}

.nav-label {
  margin: 1.4rem 0.7rem 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-label:first-child {
  margin-top: 0;
}

.nav-link,
.nav-pending {
  display: flex;
  min-height: 2.65rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-left: 0.2rem solid transparent;
  border-radius: 0.4rem;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--surface);
  color: var(--tmhr-red);
}

.nav-link[aria-current="page"] {
  border-left-color: var(--tmhr-red);
  background: var(--tmhr-navy-soft);
  color: var(--tmhr-navy-dark);
  font-weight: 800;
}

.nav-pending {
  color: #8a91a0;
  cursor: default;
}

.nav-dot {
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--border);
}

.nav-link[aria-current="page"] .nav-dot {
  background: var(--tmhr-red);
}

.sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.sidebar-social-label {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.sidebar-social-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sidebar-social-link {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--white);
  color: var(--tmhr-navy);
  text-decoration: none;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.sidebar-social-link:hover {
  transform: translateY(-0.1rem);
  border-color: var(--tmhr-red);
  background: var(--tmhr-red-soft);
  color: var(--tmhr-red);
}

.sidebar-social-link svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-social-link .icon-fill {
  fill: currentColor;
  stroke: none;
}

.menu-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  visibility: hidden;
  background: rgba(24, 29, 42, 0.48);
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.menu-overlay.is-visible {
  visibility: visible;
  opacity: 1;
}

.main-shell {
  min-height: 100vh;
}

.content {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
  padding: 2.4rem 0 4rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--tmhr-red);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  color: var(--tmhr-red);
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.5rem;
  height: 0.15rem;
  border-radius: 1rem;
  background: currentColor;
  content: "";
}

h1,
h2,
h3 {
  color: var(--tmhr-navy-dark);
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  max-width: 48rem;
  margin: 0;
  font-size: clamp(2.05rem, 8vw, 3.65rem);
  letter-spacing: -0.045em;
}

h2 {
  margin: 3.1rem 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 0.15rem solid var(--tmhr-navy);
  font-size: clamp(1.45rem, 5vw, 2rem);
  letter-spacing: -0.025em;
}

h3 {
  margin: 1.7rem 0 0.55rem;
  font-size: 1.12rem;
}

p,
ul,
ol {
  margin-top: 0;
  margin-bottom: 1.15rem;
}

ul,
ol {
  padding-left: 1.35rem;
}

li + li {
  margin-top: 0.45rem;
}

.lead {
  max-width: 46rem;
  margin: 1.15rem 0 0;
  color: #414a5d;
  font-size: clamp(1.08rem, 3.8vw, 1.25rem);
  line-height: 1.65;
}

.page-intro {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.home-intro-layout {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.game-cover {
  width: min(100%, 23rem);
  margin: 0;
  justify-self: center;
}

.game-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  object-fit: cover;
  box-shadow: 0 1rem 2.5rem rgba(37, 46, 68, 0.14);
}

.notice {
  margin: 2rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid #e8c8c4;
  border-left: 0.28rem solid var(--tmhr-red);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--tmhr-red-soft);
}

.notice strong {
  color: var(--tmhr-red-dark);
}

.section-links,
.feature-grid {
  display: grid;
  gap: 0.9rem;
  padding: 0;
  list-style: none;
}

.section-link,
.feature-card {
  display: block;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.section-link {
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.section-link:hover {
  transform: translateY(-0.12rem);
  border-color: var(--tmhr-navy);
  color: var(--ink);
  box-shadow: 0 0.55rem 1.3rem rgba(52, 63, 90, 0.09);
}

.section-link strong,
.feature-card strong {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--tmhr-navy-dark);
}

.section-link span,
.feature-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.section-link .link-arrow {
  margin-top: 0.8rem;
  color: var(--tmhr-red);
  font-weight: 800;
}

.on-this-page {
  margin: 2rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.on-this-page strong {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--tmhr-navy-dark);
}

.on-this-page ul {
  margin: 0;
}

.generation {
  scroll-margin-top: 5rem;
}

.pokemon-list {
  display: grid;
  gap: 0.4rem 1.5rem;
  padding: 0;
  list-style: none;
}

.pokemon-list li {
  margin: 0;
  padding: 0.34rem 0;
  border-bottom: 1px solid #edf0f4;
}

.pokemon-list a {
  font-weight: 750;
}

.pokemon-list .unavailable {
  color: var(--muted);
}

.article-copy {
  max-width: 45rem;
  font-size: 1.06rem;
}

.legendary-images {
  display: grid;
  gap: 1rem;
  max-width: 45rem;
  margin: 0 0 2rem;
}

.legendary-image {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 0.65rem 1.8rem rgba(37, 46, 68, 0.1);
}

.legendary-image img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.encounter-group {
  scroll-margin-top: 5rem;
}

.encounter-group + .encounter-group {
  margin-top: 3.5rem;
}

.encounter-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.15rem;
}

.encounter-group-head h2 {
  margin-bottom: 0.5rem;
}

.encounter-group-head p {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
}

.encounter-count {
  flex: 0 0 auto;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: var(--tmhr-red-soft);
  color: var(--tmhr-red-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.encounter-zone {
  margin-bottom: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.encounter-zone summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  color: var(--tmhr-navy-dark);
  cursor: pointer;
  list-style: none;
  transition: color 150ms ease, background 150ms ease;
}

.encounter-zone summary::-webkit-details-marker {
  display: none;
}

.encounter-zone summary:hover {
  background: var(--surface);
  color: var(--tmhr-red);
}

.encounter-zone summary:focus-visible {
  outline: 0.18rem solid var(--tmhr-red);
  outline-offset: -0.18rem;
}

.encounter-zone summary::after {
  flex: 0 0 auto;
  color: var(--tmhr-red);
  content: "+";
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.encounter-zone[open] summary {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.encounter-zone[open] summary::after {
  content: "−";
}

.encounter-zone-title {
  font-size: 1rem;
  font-weight: 820;
}

.encounter-zone-action {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.encounter-list {
  margin: 0;
  padding: 0.25rem 1rem 0.7rem;
}

.encounter-list > div {
  padding: 0.8rem 0;
  border-bottom: 1px solid #edf0f4;
}

.encounter-list > div:last-child {
  border-bottom: 0;
}

.encounter-list dt {
  margin-bottom: 0.25rem;
  color: var(--tmhr-red-dark);
  font-size: 0.85rem;
  font-weight: 820;
}

.encounter-list dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}

.encounter-note {
  color: var(--muted);
  font-size: 0.92em;
}

@media (min-width: 46rem) {
  .encounter-list > div {
    display: grid;
    grid-template-columns: minmax(10rem, 0.35fr) minmax(0, 1fr);
    gap: 1.25rem;
  }

  .encounter-list dt {
    margin-bottom: 0;
  }
}

.article-copy p + p {
  margin-top: 1.35rem;
}

.article-nav {
  display: grid;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-nav a {
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  text-decoration: none;
}

.site-footer {
  display: grid;
  gap: 0.7rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.site-footer a {
  font-weight: 800;
}

.footer-disclaimer {
  max-width: 58rem;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
}

.legal-page h2 {
  margin-top: 2.5rem;
}

.legal-page .updated-date {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 38rem) {
  .content {
    width: min(100% - 3.5rem, var(--content-width));
    padding-top: 3.25rem;
  }

  .section-links,
  .feature-grid,
  .pokemon-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-nav {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 48rem) {
  .home-intro-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr);
    gap: 2.5rem;
  }

  .game-cover {
    justify-self: end;
  }
}

@media (min-width: 64rem) {
  html {
    scroll-padding-top: 2rem;
  }

  body.menu-open {
    overflow: auto;
  }

  .mobile-header,
  .sidebar-close,
  .menu-overlay {
    display: none;
  }

  .sidebar {
    width: var(--sidebar-width);
    transform: none;
    box-shadow: none;
  }

  .main-shell {
    margin-left: var(--sidebar-width);
  }

  .content {
    width: min(100% - 6rem, var(--content-width));
    padding: 4.6rem 0 6rem;
  }

  .site-footer {
    margin-left: var(--sidebar-width);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Capturas de las páginas principales: conservar proporción y pixel art. */
.section-screenshot img {
  aspect-ratio: auto;
  object-fit: contain;
  image-rendering: pixelated;
}

.article-copy code {
  overflow-wrap: anywhere;
}

/* Capturas dentro de los desplegables de encuentros. */
.encounter-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.25rem 1rem;
}

.encounter-images .game-cover {
  width: min(100%, 23rem);
}

.encounter-images figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.evolution-list {
  list-style: none;
  margin: 0;
  padding: 0 1rem;
}
.evolution-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.evolution-list li:last-child { border-bottom: 0; }
.evolution-list .evolution-pair { margin: 0 0 0.35rem; color: var(--tmhr-navy-dark); }
.evolution-pair span { color: var(--tmhr-red); margin: 0 0.3rem; }
.evolution-list .evolution-method { margin: 0; overflow-wrap: anywhere; }

/* Language links stay available without JavaScript. */
.language-switcher { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .75rem 1.25rem; }
.language-switcher a { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid #d8dde5; border-radius: .4rem; color: #343F5A; text-decoration: none; }
.language-switcher a[aria-current="page"] { background: #343F5A; color: white; }
.language-switcher a:hover { border-color: #343F5A; }
.language-switcher a:focus-visible { outline: 3px solid #A0291D; outline-offset: 3px; }
.language-flag { display: block; flex-shrink: 0; width: 30px; height: 20px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
