@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #0f1216;
  --panel: #171c22;
  --panel-soft: #1d242c;
  --line: #2b3540;
  --text: #f4f7f8;
  --muted: #9aa7b4;
  --accent: #42dcc2;
  --accent-dark: #0f786b;
  --danger: #ff756f;
  --warning: #f5c96a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --content: 1180px;
}

body.light {
  color-scheme: light;
  --bg: #eef4f2;
  --panel: #ffffff;
  --panel-soft: #f3f7f6;
  --line: #d6dfdd;
  --text: #142024;
  --muted: #59676d;
  --accent-dark: #087568;
  --shadow: 0 24px 70px rgba(38, 60, 57, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 88% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
button, input, select { font: inherit; }
button, .button { min-height: 44px; }
.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #092823;
  font-weight: 800;
}
.skip-link:focus { transform: none; }

.guide-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
}
.guide-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content), calc(100% - 36px));
  min-height: 72px;
  margin: auto;
  gap: 24px;
}
.guide-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.guide-brand i {
  position: relative;
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.guide-brand i::before,
.guide-brand i::after {
  position: absolute;
  content: "";
}
.guide-brand i::before {
  top: 12px;
  left: 0;
  width: 26px;
  height: 2px;
  background: var(--accent);
}
.guide-brand i::after {
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}
.guide-brand span span { color: var(--accent); }
.guide-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.guide-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.guide-nav a:hover, .guide-nav a:focus-visible { color: var(--accent); }
.theme-button {
  display: grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.guide-main {
  width: min(var(--content), calc(100% - 36px));
  margin: auto;
  padding: 38px 0 70px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 12px;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

.pokemon-hero {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(0, 1.55fr);
  gap: 44px;
  align-items: center;
  padding: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 11%, transparent), transparent 48%),
    var(--panel);
  box-shadow: var(--shadow);
}
.pokemon-portrait {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 26px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 58%),
    var(--panel-soft);
}
.pokemon-portrait img {
  width: min(100%, 310px);
  image-rendering: pixelated;
  filter: drop-shadow(0 20px 24px rgba(0, 0, 0, 0.24));
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-badges, .type-list, .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status-badge, .type-badge, .detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status-badge.released { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); }
.status-badge.unreleased { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.pokemon-hero h1 {
  margin: 14px 0 4px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.065em;
}
.pokemon-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 17px;
}
.pokemon-summary { max-width: 720px; margin: 20px 0 24px; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 17px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: #072a24;
  font-weight: 800;
  text-decoration: none;
}
.button.secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}
.button:hover { transform: translateY(-1px); }

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
  margin-top: 30px;
}
.guide-sections { display: grid; gap: 22px; min-width: 0; }
.guide-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.guide-card h2 {
  margin: 0 0 9px;
  font-size: 25px;
  letter-spacing: -0.035em;
}
.guide-card h3 { margin: 22px 0 7px; font-size: 17px; }
.guide-card > p:first-of-type { margin-top: 0; color: var(--muted); }
.guide-card p:last-child { margin-bottom: 0; }
.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.fact {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}
.fact small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.fact strong { display: block; margin-top: 2px; }
.route-list, .appearance-list, .method-list, .search-examples {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.route-card, .appearance-card, .method-card, .search-example {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
}
.route-card a, .appearance-card a { color: var(--accent); font-weight: 800; text-decoration: none; }
.route-arrow { margin: 0 6px; color: var(--muted); }
.requirement-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.requirement-list span {
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, var(--panel));
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.appearance-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.appearance-card small, .method-card small { color: var(--muted); }
.method-card ol { margin: 10px 0 0; padding-left: 22px; }
.method-card li + li { margin-top: 5px; }
.search-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.search-example code {
  overflow-wrap: anywhere;
  color: var(--accent);
  font-family: "Space Mono", monospace;
  font-size: 13px;
}
.copy-search {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.battle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
}
.battle-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}
.battle-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.battle-card h3 { margin: 2px 0 0; font-size: 17px; }
.battle-card .eyebrow { margin: 0; }
.battle-rank {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  color: var(--accent);
  font: 700 10px "Space Mono", monospace;
}
.battle-rank.estimated {
  background: color-mix(in srgb, var(--warning) 13%, var(--panel));
  color: var(--warning);
}
.moveset-line { display: grid; gap: 7px; }
.move-slot {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}
.move-slot small {
  color: var(--muted);
  font: 700 9px "Space Mono", monospace;
  text-transform: uppercase;
}
.move-slot strong { overflow-wrap: anywhere; padding-right: 6px; }
.legacy-badge {
  width: fit-content;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--warning) 13%, var(--panel));
  color: var(--warning);
  font: 700 9px "Space Mono", monospace;
}
.battle-context, .battle-empty {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.raid-card {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 32%),
    var(--panel-soft);
}
.raid-card .moveset-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raid-metric {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-top: 12px;
}
.raid-metric small { width: 100%; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.raid-metric strong { color: var(--accent); font-size: 25px; }
.raid-metric span { color: var(--muted); font-size: 11px; }
.battle-notice {
  margin-top: 13px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 4%, var(--panel));
}
.battle-notice p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.battle-notice a { color: var(--accent); font-weight: 800; }

.checklist-card {
  position: sticky;
  top: 94px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.checklist-card h2 { margin: 0; font-size: 22px; }
.checklist-card > p { margin: 5px 0 18px; color: var(--muted); font-size: 14px; }
.guide-checklist { display: grid; gap: 8px; }
.check-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  cursor: pointer;
  font-weight: 700;
}
.check-item input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent-dark);
}
.check-item:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-soft));
}
.check-item:has(input:disabled) { cursor: not-allowed; opacity: 0.52; }
.checklist-actions { display: grid; gap: 9px; margin-top: 16px; }
.checklist-actions button { width: 100%; cursor: pointer; }
.checklist-status {
  min-height: 44px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.checklist-status.success { color: var(--accent); }
.checklist-status.error { color: var(--danger); }

.guide-neighbors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}
.guide-neighbor {
  display: flex;
  min-height: 80px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  text-decoration: none;
}
.guide-neighbor.next { justify-content: flex-end; text-align: right; }
.guide-neighbor span { color: var(--muted); font-size: 12px; }
.guide-neighbor strong { display: block; }

.guide-footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.guide-footer-inner {
  display: flex;
  width: min(var(--content), calc(100% - 36px));
  margin: auto;
  justify-content: space-between;
  gap: 24px;
}
.guide-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.guide-footer a { color: var(--muted); }

.directory-hero { max-width: 830px; padding: 50px 0 26px; }
.directory-hero h1 { margin: 0; font-size: clamp(42px, 7vw, 72px); line-height: 1.02; letter-spacing: -0.06em; }
.directory-hero p { max-width: 720px; color: var(--muted); font-size: 18px; }
.directory-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.directory-controls label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.directory-controls input, .directory-controls select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-soft);
  color: var(--text);
}
.directory-meta { display: flex; justify-content: space-between; gap: 16px; margin: 18px 0 12px; color: var(--muted); }
.pokemon-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.directory-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  text-decoration: none;
}
.directory-link:hover, .directory-link:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.directory-number { color: var(--accent); font-family: "Space Mono", monospace; font-size: 12px; }
.directory-link strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.directory-link small { color: var(--muted); }
.directory-types { color: var(--muted); font-size: 11px; text-align: right; }
.directory-link[hidden] { display: none; }

@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; }
  .checklist-card { position: static; order: -1; }
  .pokemon-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .guide-nav a:not(.keep-mobile) { display: none; }
  .pokemon-hero { grid-template-columns: 1fr; gap: 22px; padding: 24px; }
  .pokemon-portrait { min-height: 240px; }
  .pokemon-portrait img { width: 230px; }
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .battle-grid { grid-template-columns: 1fr; }
  .raid-card { grid-column: auto; }
  .directory-controls { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .guide-main { width: min(100% - 24px, var(--content)); padding-top: 22px; }
  .guide-header-inner, .guide-footer-inner { width: min(100% - 24px, var(--content)); }
  .pokemon-hero, .guide-card, .checklist-card { border-radius: 18px; }
  .pokemon-hero h1 { font-size: 44px; }
  .guide-card, .checklist-card { padding: 20px; }
  .fact-grid, .pokemon-directory { grid-template-columns: 1fr; }
  .raid-card .moveset-line { grid-template-columns: 1fr; }
  .guide-neighbors { grid-template-columns: 1fr; }
  .guide-footer-inner { display: grid; }
  .search-example { align-items: flex-start; flex-direction: column; }
}
