:root {
  --bg: #f3e7c6;
  --screen: #d8f3a6;
  --screen-dark: #91a66a;
  --panel: #fff8dc;
  --text: #1b1b1b;
  --muted: #4f4f42;
  --line: #1b1b1b;
  --pokedex: #d73737;
  --pokedex-dark: #9f2323;
  --blue: #2f80d0;
  --yellow: #ffd55c;
  --green: #4abf6a;
  --shadow: #6d4c35;
}

* {
  box-sizing: border-box;
}

.pokedex-booting .dex-shell {
  visibility: hidden;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(27, 27, 27, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(27, 27, 27, 0.055) 1px, transparent 1px),
    var(--bg);
  background-size: 16px 16px;
  color: var(--text);
  font-family: "Trebuchet MS", Verdana, Arial, sans-serif;
}

a {
  color: inherit;
}

.pokedex-lights {
  display: grid;
  grid-template-columns: 44px repeat(3, 14px);
  gap: 7px;
  align-items: start;
  min-width: 112px;
}

.light {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.25);
}

.light.main {
  width: 44px;
  height: 44px;
  background: #8fe9ff;
  box-shadow: inset -5px -5px 0 var(--blue);
}

.light.red {
  background: #ff6961;
}

.light.yellow {
  background: var(--yellow);
}

.light.green {
  background: var(--green);
}

.dex-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4px 0 48px;
}

.dex-topbar,
.dex-panel,
.pokemon-card,
.stage-card {
  border: 3px solid var(--line);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--screen-dark);
}

.dex-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand tools"
    "title title"
    "nav nav";
  align-items: start;
  column-gap: 18px;
  row-gap: 12px;
  padding: 16px 18px 18px;
  background: var(--pokedex);
  color: #fff;
  box-shadow: 6px 6px 0 var(--shadow);
}

.dex-topbar > div:not(.lang-switch) {
  min-width: 0;
}

.dex-back {
  grid-area: brand;
  justify-self: start;
}

.dex-topbar > div:not(.lang-switch):not(.dex-header-tools) {
  grid-area: title;
}

.dex-nav {
  grid-area: nav;
  display: none;
}

.dex-header-tools {
  grid-area: tools;
  justify-self: end;
  min-width: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--pokedex-dark);
}

.ru-name-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding-left: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.ru-name-select[hidden] {
  display: none;
}

.ru-name-select select {
  max-width: 190px;
  min-height: 30px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: #fffbe6;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.original-name {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.lang-switch button {
  min-height: 34px;
  padding: 0 10px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--yellow);
  color: var(--text);
}

.dex-kicker {
  margin: 0 0 6px;
  color: #fff4b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 100%;
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.03;
  overflow-wrap: anywhere;
  text-shadow: 3px 3px 0 var(--pokedex-dark);
}

body[data-page="starter-teams"] h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.04;
}

h2 {
  margin-bottom: 14px;
  font-size: 22px;
  line-height: 1.05;
}

.dex-back,
.dex-button,
.dex-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--text);
  box-shadow: 3px 3px 0 var(--shadow);
  font-weight: 800;
  text-decoration: none;
}

.dex-back:hover,
.dex-button:hover,
.dex-links a:hover,
.catalog-view-toggle button:hover,
.tab-button:hover,
.lang-switch button:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--shadow);
}

.dex-back:focus-visible,
.dex-button:focus-visible,
.dex-links a:focus-visible,
.catalog-view-toggle button:focus-visible,
.tab-button:focus-visible,
.lang-switch button:focus-visible,
.starter-team-details summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.dex-nav {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.dex-panel {
  margin-top: 22px;
  padding: 16px;
  background: var(--screen);
}

.dex-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
}

.dex-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dex-controls input,
.dex-controls select {
  width: 100%;
  min-height: 42px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.dex-toggle {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.dex-toggle input {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 3px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.dex-toggle input:checked {
  background: var(--yellow);
}

.dex-toggle input:checked::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--line);
}

.dex-section {
  margin-top: 28px;
}

.dex-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dex-section-heading h2 {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--shadow);
}

.dex-count,
.pill,
.status-badge,
.move-chip,
.type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.type-pill {
  position: relative;
  min-width: 58px;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.type-pill--compact {
  min-width: 28px;
}

.type-floating-tooltip {
  position: fixed;
  z-index: 20;
  display: grid;
  gap: 7px;
  width: max-content;
  max-width: min(420px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #fff8dc;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-shadow: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: pre-line;
}

.type-tooltip-freeze-meter {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0deg, rgba(47, 128, 208, 0.15) 0deg);
  opacity: 0;
  pointer-events: none;
}

.type-tooltip-freeze-meter::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff8dc;
}

.type-tooltip__row {
  display: grid;
  gap: 5px;
}

.type-tooltip__row > span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.type-mini {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.type-mini--link {
  cursor: pointer;
}

.type-mini--link:hover,
.type-mini--link:focus-visible {
  outline: 2px solid var(--line);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.tooltip-none {
  color: var(--muted);
  font-weight: 800;
}

.type-floating-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.type-floating-tooltip.is-arming .type-tooltip-freeze-meter {
  opacity: 1;
  animation: tooltip-freeze-ring 3s linear forwards;
}

.type-floating-tooltip.is-frozen {
  border-color: var(--blue);
  box-shadow: 3px 3px 0 rgba(47, 128, 208, 0.35);
}

.type-floating-tooltip.is-frozen .type-tooltip-freeze-meter {
  opacity: 1;
  background: conic-gradient(var(--blue) 360deg, rgba(47, 128, 208, 0.15) 0deg);
}

@keyframes tooltip-freeze-ring {
  from {
    background: conic-gradient(var(--blue) 0deg, rgba(47, 128, 208, 0.15) 0deg);
  }
  to {
    background: conic-gradient(var(--blue) 360deg, rgba(47, 128, 208, 0.15) 0deg);
  }
}

.type-filter-pills {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 248, 220, 0.72);
}

.type-filter-pill {
  min-height: 34px;
  border: 2px solid var(--line);
  border-radius: 5px;
  box-shadow: 2px 2px 0 rgba(109, 76, 53, 0.65);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.type-filter-pill--all {
  padding: 5px 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.type-filter-pill[aria-pressed="true"] {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  box-shadow: 3px 3px 0 var(--shadow);
}

.type-filter-pill:hover,
.type-filter-pill:focus-visible {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(109, 76, 53, 0.65);
}

.type-normal { background: #fffdf4; color: #1b1b1b; text-shadow: none; }
.type-fire { background: #ff9d55; color: #1b1b1b; text-shadow: none; }
.type-water { background: #5090d6; }
.type-electric { background: #f4d23c; color: #1b1b1b; text-shadow: none; }
.type-grass { background: #63bc5a; color: #1b1b1b; text-shadow: none; }
.type-ice { background: #73cec0; color: #1b1b1b; text-shadow: none; }
.type-fighting { background: #ce416b; }
.type-poison { background: #b567ce; }
.type-ground { background: #d97845; color: #1b1b1b; text-shadow: none; }
.type-flying { background: #89aae3; color: #1b1b1b; text-shadow: none; }
.type-psychic { background: #fa7179; color: #1b1b1b; text-shadow: none; }
.type-bug { background: #91c12f; color: #1b1b1b; text-shadow: none; }
.type-rock { background: #c5b78c; color: #1b1b1b; text-shadow: none; }
.type-ghost { background: #5269ad; }
.type-dragon { background: #0b6dc3; }
.type-dark { background: #5a5465; }
.type-steel { background: #5a8ea2; }

.type-mini.type-normal,
.type-mini.type-fire,
.type-mini.type-electric,
.type-mini.type-grass,
.type-mini.type-ground,
.type-mini.type-flying,
.type-mini.type-psychic,
.type-mini.type-bug,
.type-mini.type-rock,
.type-mini.type-ice {
  color: #1b1b1b;
  text-shadow: none;
}

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

.catalog-view-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.catalog-view-toggle button {
  min-height: 30px;
  padding: 0 9px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.catalog-view-toggle button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--yellow);
}

.pokemon-list {
  display: grid;
  gap: 4px;
}

.catalog-list-head,
.catalog-list-row {
  display: grid;
  grid-template-columns: 64px minmax(170px, 1.1fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr) minmax(220px, 1.4fr) minmax(120px, 0.7fr);
  gap: 8px;
  align-items: center;
}

.catalog-list-head {
  padding: 7px 10px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-list-row {
  min-height: 48px;
  padding: 6px 10px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  content-visibility: auto;
  contain-intrinsic-size: 48px;
}

.catalog-list-row:hover,
.catalog-list-row:focus-visible {
  background: #fff8dc;
  outline: 2px solid var(--line);
  outline-offset: 1px;
}

.catalog-list-number {
  font-weight: 900;
}

.catalog-list-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
}

.catalog-list-name img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.catalog-sprite {
  display: block;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 213, 92, 0.22), transparent 62%),
    rgba(255, 248, 220, 0.54);
}

.pokemon-list .type-pill {
  min-width: 46px;
  min-height: 24px;
  padding: 4px 6px;
  font-size: 10px;
}

.pokemon-card,
.stage-card {
  position: relative;
  overflow: visible;
  padding: 14px;
  background: var(--screen);
}

.pokemon-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  content-visibility: auto;
  contain-intrinsic-size: 132px;
}

.pokemon-card img,
.stage-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: auto;
}

.pokemon-card h3,
.stage-card h3 {
  margin-bottom: 6px;
  font-size: 20px;
  line-height: 1.05;
}

.card-meta,
.type-row,
.move-row,
.dex-links {
  display: flex;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 9px;
  align-items: flex-start;
}

.card-meta + .card-meta,
.card-meta + .type-row,
.type-row + .card-meta {
  margin-top: 10px;
}

.card-meta .pill {
  min-height: 30px;
  line-height: 1.12;
  text-align: center;
}

.card-text,
.stage-role,
.guide-text,
.source-box p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.42;
}

.detail-stack,
.stage-facts {
  display: grid;
  gap: 8px;
}

.stage-facts {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px solid rgba(27, 27, 27, 0.14);
}

.detail-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.detail-row > span {
  color: rgba(40, 56, 32, 0.78);
  font-weight: 900;
}

.detail-row > strong {
  min-width: 0;
  color: var(--text);
  font-weight: 750;
}

.detail-row--stacked {
  grid-template-columns: 1fr;
  gap: 3px;
}

.evolution-chain {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
}

.evolution-chain--branching {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.chain-stage {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: 260px;
  padding: 18px 16px 20px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
}

.chain-stage .type-row {
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
}

.chain-stage img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.chain-number {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.chain-from {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 2px solid rgba(27, 27, 27, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.evo-label {
  align-self: center;
  justify-self: center;
  color: var(--muted);
  font-weight: 900;
}

.advice-panel {
  background: #fff8dc;
}

.advice-panel[hidden],
.dex-panel[hidden] {
  display: none;
}

.advice-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.advice-status {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--green);
  font-weight: 900;
}

.guide-note {
  margin: 12px 0 0;
  color: rgba(40, 56, 32, 0.82);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.source-box p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.reason-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  padding: 8px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.32;
}

.evolution-requirements {
  margin-top: 14px;
  padding: 12px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.45);
}

.evolution-requirements h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.evolution-requirements ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evolution-requirements li {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  gap: 3px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
}

.evolution-requirements strong {
  color: var(--text);
  font-weight: 850;
}

.evolution-requirements li > span {
  grid-column: 2;
}

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

.learnset-panel {
  background: var(--panel);
}

.moveset-panel {
  overflow: visible;
  background: var(--panel);
}

.moveset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
  gap: 14px;
}

.moveset-stage {
  position: relative;
  overflow: visible;
  display: grid;
  align-self: start;
  gap: 12px;
  padding: 12px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.48);
}

.moveset-stage.is-compact {
  background: rgba(255, 255, 255, 0.34);
}

.moveset-stage__head {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
}

.moveset-stage__head img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.moveset-stage__head h3 {
  margin-bottom: 7px;
  font-size: 18px;
  line-height: 1.05;
}

.moveset-builds {
  display: grid;
  gap: 10px;
}

.moveset-build {
  overflow: visible;
  padding: 10px;
  border: 2px solid rgba(27, 27, 27, 0.16);
  border-radius: 5px;
  background: #fff8dc;
}

.moveset-build h4 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.1;
}

.moveset-build ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.move-rating-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.move-rating-legend span {
  padding: 5px 7px;
  border: 2px solid rgba(27, 27, 27, 0.16);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.52);
}

.move-rating-legend strong {
  color: var(--text);
}

.moveset-empty-note {
  margin: 0;
  padding: 9px 10px;
  border: 2px solid rgba(27, 27, 27, 0.16);
  border-radius: 5px;
  background: #fff8dc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
}

.moveset-move {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto;
  gap: 5px 8px;
  align-items: center;
  min-height: 36px;
  padding: 7px 8px;
  border: 2px solid rgba(27, 27, 27, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.62);
}

.move-source-detail {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.move-name {
  min-width: 0;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.move-facts {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.move-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.move-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid rgba(27, 27, 27, 0.32);
  border-radius: 4px;
  background: #ffe9a6;
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.starter-team-page {
  display: grid;
  gap: 28px;
}

.starter-team-intro {
  display: grid;
  gap: 12px;
}

.starter-team-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.starter-team-legend span,
.starter-team-phase {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--yellow);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.starter-team-timing {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 2px solid rgba(27, 27, 27, 0.35);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.starter-group {
  display: grid;
  gap: 12px;
}

.starter-group__heading {
  margin-bottom: 0;
}

.starter-group__heading .type-pill {
  margin-bottom: 14px;
}

.starter-group__summary {
  max-width: 78ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.starter-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
  align-items: flex-start;
}

.starter-team-card {
  display: grid;
  gap: 14px;
  align-self: flex-start;
  padding: 14px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--screen);
  box-shadow: 5px 5px 0 var(--screen-dark);
}

.starter-team-card__head {
  display: grid;
  gap: 8px;
}

.starter-team-card__head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.15;
}

.starter-team-card__head p,
.starter-team-notes li {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.38;
}

.team-member-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: team;
}

.team-member {
  counter-increment: team;
  min-width: 0;
}

.team-member a,
.team-member__missing {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 74px;
  padding: 8px;
  border: 2px solid rgba(27, 27, 27, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--text);
  text-decoration: none;
}

.team-member a::before,
.team-member__missing::before {
  content: counter(team);
  position: absolute;
  top: 5px;
  left: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.team-member img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.team-member strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.05;
}

.team-member .type-pill {
  min-width: 46px;
  min-height: 22px;
  padding: 3px 5px;
  font-size: 10px;
}

.starter-team-hm {
  display: grid;
  gap: 8px;
}

.starter-team-hm h4 {
  margin: 0;
  font-size: 14px;
}

.starter-team-hm p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.starter-team-hm dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.starter-team-hm dl > div {
  display: grid;
  grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border: 2px solid rgba(27, 27, 27, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.48);
}

.starter-team-hm dt {
  display: grid;
  gap: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.starter-team-hm dt em {
  display: inline-flex;
  width: fit-content;
  min-height: 20px;
  padding: 3px 5px;
  border: 1px solid rgba(27, 27, 27, 0.34);
  border-radius: 4px;
  background: var(--yellow);
  color: var(--text);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.starter-team-hm dd {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.starter-team-hm dd strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.15;
}

.starter-team-notes {
  display: grid;
  gap: 7px;
}

.starter-team-details {
  border: 2px solid rgba(27, 27, 27, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.38);
}

.starter-team-details summary {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
}

.starter-team-details[open] summary {
  border-bottom: 2px solid rgba(27, 27, 27, 0.16);
}

.starter-team-details > div {
  padding: 10px;
}

.starter-team-notes h4 {
  margin: 0;
  font-size: 14px;
}

.starter-team-notes ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.gym-prep-panel {
  display: grid;
  gap: 10px;
}

.gym-prep-list {
  display: grid;
  gap: 8px;
}

.gym-prep-details summary {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.gym-prep-details summary em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.gym-prep-body {
  display: grid;
  gap: 10px;
}

.gym-prep-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.gym-prep-body h3 {
  margin: 0;
  font-size: 15px;
}

.gym-counter-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gym-counter {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.52);
}

.gym-counter > div:first-child {
  display: grid;
  gap: 6px;
}

.gym-counter strong,
.gym-counter a {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.gym-counter dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.gym-counter dl > div {
  display: grid;
  gap: 2px;
}

.gym-counter dt {
  color: rgba(40, 56, 32, 0.78);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.gym-counter dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-heading h2 {
  margin-bottom: 0;
}

.learnset-active {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.learnset-active span {
  padding: 5px 8px;
  border: 2px solid rgba(27, 27, 27, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.45);
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.learnset-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.learnset-filters label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.learnset-filters select {
  min-height: 34px;
  padding: 0 9px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.learnset-sort {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: 24px;
  padding: 4px 5px;
  border: 2px solid transparent;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.learnset-sort:hover,
.learnset-sort:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
  outline: none;
}

.learnset-sort__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  min-height: 16px;
  border: 1px solid rgba(27, 27, 27, 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1;
}

.learnset-table th.is-sorted .learnset-sort {
  border-color: var(--line);
  background: var(--screen);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border: 2px solid rgba(27, 27, 27, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  font-weight: 800;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.tab-button {
  min-height: 34px;
  padding: 0 9px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  font-weight: 900;
  cursor: pointer;
}

.tab-button[aria-selected="true"] {
  background: var(--yellow);
}

.table-wrap {
  overflow-x: auto;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 8px;
  border-bottom: 2px solid rgba(27, 27, 27, 0.14);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--yellow);
  font-size: 12px;
  text-transform: uppercase;
}

.learnset-table .table-wrap {
  margin-top: 12px;
  overflow-x: visible;
}

.learnset-cards {
  display: none;
}

.learnset-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(27, 27, 27, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.learnset-card header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.learnset-card header > span {
  font-weight: 900;
}

.learnset-card header strong {
  min-width: 0;
  font-size: 15px;
  line-height: 1.1;
}

.learnset-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.learnset-card__facts span {
  padding: 4px 6px;
  border: 1px solid rgba(27, 27, 27, 0.22);
  border-radius: 4px;
  background: #fff8dc;
  font-size: 11px;
  font-weight: 850;
}

.learnset-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.learnset-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 13px;
}

.learnset-table th,
.learnset-table td {
  padding: 6px;
  overflow-wrap: anywhere;
}

.learnset-table th:nth-child(1),
.learnset-table td:nth-child(1) {
  width: 8%;
}

.learnset-table th:nth-child(2),
.learnset-table td:nth-child(2) {
  width: 14%;
}

.learnset-table th:nth-child(3),
.learnset-table td:nth-child(3) {
  width: 12%;
}

.learnset-table th:nth-child(4),
.learnset-table td:nth-child(4) {
  width: 14%;
}

.learnset-table th:nth-child(5),
.learnset-table td:nth-child(5) {
  width: 22%;
}

.learnset-table th:nth-child(6),
.learnset-table td:nth-child(6) {
  width: 20%;
}

.learnset-table th:nth-child(7),
.learnset-table td:nth-child(7) {
  width: 10%;
}

.learnset-table .type-pill,
.learnset-type-class .type-pill {
  min-width: 0;
  min-height: 24px;
  padding: 4px 6px;
  font-size: 11px;
}

.learnset-type-class {
  display: grid;
  gap: 5px;
  align-items: start;
}

.learnset-type-class > span:not(.type-pill) {
  font-size: 12px;
  font-weight: 800;
}

.learnset-facts {
  display: grid;
  gap: 3px;
  font-size: 12px;
  line-height: 1.25;
}

.learnset-facts span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  max-width: 150px;
}

.learnset-table .learnset-sort {
  min-height: 30px;
  padding: 4px 5px;
  gap: 4px;
}

.learnset-table .learnset-sort__mark {
  min-width: 14px;
  min-height: 14px;
  font-size: 10px;
}

.acquisition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.acquisition-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.acquisition-card header {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.acquisition-card img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.acquisition-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.acquisition-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.acquisition-card li {
  display: grid;
  gap: 2px;
  font-size: 13px;
  line-height: 1.25;
}

.acquisition-card li span {
  color: var(--muted);
  font-weight: 750;
}

.type-chart-panel {
  overflow: visible;
  background: var(--panel);
}

.comparison-table {
  min-width: 0;
  table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
  overflow-wrap: anywhere;
}

.type-chart-wrap {
  width: 100%;
  max-height: none;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

.type-chart-cards {
  display: none;
}

.type-chart-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 2px solid rgba(27, 27, 27, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
}

.type-chart-card h3 {
  margin: 0;
}

.type-chart-card div {
  display: grid;
  gap: 4px;
}

.type-chart-card div > strong {
  font-size: 12px;
  line-height: 1.1;
}

.type-chart-card div > span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.type-chart {
  table-layout: fixed;
  font-size: 10px;
  min-width: 0;
  width: 100%;
}

.type-chart th,
.type-chart td {
  padding: 2px;
  text-align: center;
  vertical-align: middle;
}

.type-chart__attack-col {
  width: 70px;
}

.type-chart thead th,
.type-chart tbody th {
  z-index: 2;
}

.type-chart .type-pill {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 3px 2px;
  font-size: 8px;
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: anywhere;
}

.type-chart tbody th .type-pill {
  font-size: 9px;
}

.multiplier {
  background: #f7f1df;
  font-weight: 900;
}

.multiplier-2 {
  background: #159947;
  color: #fff;
}

.multiplier-0_5 {
  background: #d92924;
  color: #fff;
}

.multiplier-0 {
  background: #111;
  color: #fff;
}

.trainer-guide {
  display: grid;
  gap: 12px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: flex-start;
  gap: 12px;
}

.guide-grid--auto {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guide-box--wide {
  grid-column: span 2;
}

.guide-box {
  align-self: flex-start;
  padding: 12px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.45);
}

.guide-box h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.guide-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.42;
}

.guide-box li span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.resource-link {
  color: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.resource-link:hover,
.resource-link:focus-visible {
  color: #0b63ce;
  outline: 0;
}

.resource-link--missing {
  display: inline;
  color: var(--muted);
  text-decoration-style: dotted;
}

.side-quests-page,
.side-objective-list {
  display: grid;
  gap: 12px;
}

#side-objective-list {
  display: grid;
  gap: 18px;
}

.side-objective-timeline {
  display: grid;
  gap: 10px;
}

.side-objective-timeline[hidden] {
  display: none;
}

.side-objective-timeline > h2 {
  margin: 0;
  padding: 8px 12px;
  border: 3px solid var(--line);
  border-radius: 7px;
  background: var(--screen);
  box-shadow: 4px 4px 0 var(--screen-dark);
  font-size: 20px;
}

.side-quest-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: center;
}

.side-quest-stats {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr);
  gap: 10px;
  align-items: center;
  max-width: 420px;
  margin-top: 12px;
  font-weight: 900;
}

.side-quest-stats progress {
  width: 100%;
  height: 14px;
  accent-color: var(--green);
}

.side-quest-controls {
  display: grid;
  gap: 12px;
}

.side-quest-controls input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.side-quest-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.side-quest-filter-row .dex-button {
  min-height: 36px;
}

.side-quest-filter-row .dex-button.is-active {
  background: var(--blue);
  color: #fff;
  box-shadow: 3px 3px 0 #173b69;
}

.side-objective {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 248, 220, 0.94);
  box-shadow: 4px 4px 0 var(--screen-dark);
}

.side-objective[hidden] {
  display: none;
}

.side-objective.is-done {
  background: rgba(216, 243, 166, 0.96);
}

.side-objective.is-skipped {
  background: rgba(255, 255, 255, 0.64);
  opacity: 0.76;
}

.side-objective.is-saving {
  opacity: 0.68;
}

.side-objective__marker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--text);
  font-weight: 900;
}

.side-objective.is-done .side-objective__marker {
  background: var(--green);
}

.side-objective.is-skipped .side-objective__marker {
  background: rgba(79, 79, 66, 0.22);
}

.side-objective__body {
  min-width: 0;
}

.side-objective__body header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.side-objective__body h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.15;
}

.side-objective__category {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 7px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--yellow);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-objective__location {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.side-objective .guide-text {
  font-weight: 500;
}

.side-objective__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.side-objective__facts div {
  min-width: 0;
}

.side-objective__facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-objective__facts dd {
  margin: 3px 0 0;
  font-weight: 650;
  line-height: 1.35;
}

.side-objective__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.side-status-button {
  min-height: 34px;
  padding: 0 10px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  box-shadow: 2px 2px 0 var(--shadow);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.side-status-button:hover,
.side-status-button:focus-visible {
  background: var(--yellow);
  outline: 2px solid var(--line);
  outline-offset: 1px;
}

.side-status-button.is-active {
  background: var(--green);
}

.side-status-button--skip.is-active {
  background: rgba(79, 79, 66, 0.24);
}

.side-status-button[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.side-objective__error {
  margin: 8px 0 0;
  color: var(--pokedex-dark);
  font-size: 13px;
  font-weight: 800;
}

.side-objective-list--compact {
  gap: 8px;
}

.side-objective-link {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  text-decoration: none;
}

.side-objective-link:hover,
.side-objective-link:focus-visible {
  background: #fff8dc;
  outline: 2px solid var(--line);
  outline-offset: 1px;
}

.side-objective-link.is-done {
  background: rgba(216, 243, 166, 0.86);
}

.side-objective-link span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.resource-reference {
  align-self: start;
}

.resource-group + .resource-group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid rgba(27, 27, 27, 0.18);
}

.resource-group h4 {
  margin: 0 0 8px;
  font-size: 15px;
  text-transform: uppercase;
}

.resource-list {
  display: grid;
  gap: 8px;
}

.resource-list li {
  padding: 8px;
  border: 2px solid rgba(27, 27, 27, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.48);
}

.resource-list li:target {
  border-color: var(--line);
  background: #fff7cf;
  box-shadow: inset 0 0 0 2px rgba(255, 213, 92, 0.55);
}

.resource-page {
  display: grid;
  gap: 16px;
}

.resource-page__heading {
  align-items: end;
}

.resource-search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.resource-search input {
  min-height: 42px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.resource-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.resource-catalog--items {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.resource-catalog-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 3px 3px 0 rgba(61, 83, 47, 0.28);
}

.resource-catalog-card:target {
  background: #fff7cf;
  box-shadow: inset 0 0 0 3px rgba(255, 213, 92, 0.75), 3px 3px 0 rgba(61, 83, 47, 0.28);
}

.resource-catalog-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.resource-code {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 4px 9px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--shadow);
  font-weight: 950;
}

.resource-catalog-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.08;
}

.resource-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.resource-meta div {
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 2px solid rgba(27, 27, 27, 0.14);
}

.resource-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.resource-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.resource-source-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-source-list li {
  display: grid;
  grid-template-columns: minmax(74px, max-content) 1fr;
  gap: 8px;
  align-items: baseline;
}

.resource-source-list strong {
  font-size: 12px;
  font-weight: 950;
}

.resource-source-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resource-empty {
  margin: 0;
  padding: 12px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #fff7cf;
  font-weight: 900;
}

.guide-facts {
  display: grid;
  gap: 8px;
  padding-left: 0 !important;
  list-style: none;
}

.guide-facts li {
  display: grid;
  gap: 3px;
}

.guide-facts li > span:first-child {
  margin: 0;
  color: rgba(40, 56, 32, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-facts li > strong {
  color: var(--text);
  font-weight: 750;
}

.companion-page {
  display: grid;
  gap: 22px;
}

.companion-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 16px;
  align-items: center;
}

.companion-location-picker,
.progress-numbers label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.companion-location-picker select,
.progress-numbers input {
  width: 100%;
  min-height: 42px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.companion-current {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 3px solid var(--line);
  border-radius: 6px;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--shadow);
}

.companion-current span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.companion-current strong {
  font-size: 24px;
  line-height: 1.05;
}

.companion-location-nav,
.companion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.companion-location-nav .dex-button,
.companion-actions .dex-button {
  min-height: 38px;
}

.companion-location-nav .dex-button[disabled],
.companion-actions .dex-button[disabled] {
  opacity: 0.56;
  cursor: default;
  transform: none;
}

.companion-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: flex-start;
}

.companion-main,
.companion-side {
  align-self: flex-start;
}

.companion-side {
  display: grid;
  gap: 18px;
}

.route-ratings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.route-ratings div {
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 9px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 248, 220, 0.82);
}

.route-ratings span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.route-ratings strong {
  color: var(--pokedex-dark);
  font-size: 18px;
  letter-spacing: 0;
}

.companion-answer-panel {
  display: grid;
  gap: 12px;
  background: #f6ffd2;
}

.companion-answer-panel .dex-kicker {
  color: rgba(40, 56, 32, 0.72);
  text-shadow: none;
}

.answer-panel-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.answer-panel-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.answer-card {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 142px;
  padding: 10px;
  border: 2px solid rgba(27, 27, 27, 0.76);
  border-radius: 6px;
  background: rgba(255, 248, 220, 0.8);
}

.answer-card--next {
  background: #fff4b7;
}

.answer-card--warning {
  background: #ffe2cf;
}

.answer-card__label {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 3px 7px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--yellow);
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.answer-card p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.answer-card__action {
  align-self: end;
  width: fit-content;
  min-height: 30px;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: #fff8dc;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.answer-card__action:hover,
.answer-card__action:focus-visible {
  background: var(--yellow);
  outline: 2px solid var(--line);
  outline-offset: 1px;
}

.companion-feedback {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}

.companion-feedback__label,
.companion-feedback__status {
  color: rgba(27, 27, 27, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.companion-feedback__comment {
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 2px solid rgba(27, 27, 27, 0.76);
  border-radius: 5px;
  background: #fffef2;
  font: inherit;
  font-size: 12px;
}

.companion-feedback__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.companion-feedback__buttons button {
  min-height: 32px;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #fff8dc;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.companion-feedback__buttons button:hover,
.companion-feedback__buttons button:focus-visible {
  background: var(--yellow);
  outline: 2px solid var(--line);
  outline-offset: 1px;
}

.companion-debug-panel {
  background: #f2f2f2;
}

.companion-debug-panel pre {
  max-height: 520px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #151515;
  color: #f5f5f5;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.companion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: flex-start;
}

.companion-encounters {
  display: grid;
  gap: 8px;
}

.companion-encounter-section {
  display: grid;
  gap: 8px;
}

.companion-encounter-section + .companion-encounter-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid rgba(27, 27, 27, 0.18);
}

.companion-encounter-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.companion-encounter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 2px solid rgba(27, 27, 27, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.companion-encounter:hover,
.companion-encounter:focus-visible {
  background: #fff8dc;
  outline: 2px solid var(--line);
  outline-offset: 1px;
}

.companion-encounter > span:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.companion-encounter__meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.companion-checklist,
.oak-notes {
  padding-left: 0 !important;
  list-style: none;
}

.companion-checklist li,
.oak-notes li {
  position: relative;
  padding-left: 22px;
}

.companion-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 900;
}

.oak-panel {
  background: #fff8dc;
}

.companion-account-panel {
  background: #fff8dc;
}

.companion-profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.companion-profile-facts div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 8px;
  border: 2px solid rgba(27, 27, 27, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.58);
}

.companion-profile-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.companion-profile-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.oak-notes li::before {
  content: "Oak";
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  overflow: hidden;
  color: var(--pokedex-dark);
  font-size: 10px;
  font-weight: 900;
}

html[lang="ru"] .oak-notes li::before {
  content: "Оук";
}

.companion-items {
  display: grid;
  gap: 8px;
  margin: 0;
}

.companion-items div {
  display: grid;
  gap: 3px;
}

.companion-items dt {
  font-weight: 900;
}

.companion-items dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.progress-panel {
  display: grid;
  gap: 10px;
}

.progress-panel h2,
.progress-panel h3 {
  margin-bottom: 0;
}

.progress-panel h3 {
  font-size: 15px;
}

.progress-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.progress-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.progress-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 7px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  font-weight: 900;
}

.progress-check input {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.progress-check input:checked {
  background: var(--yellow);
}

.progress-check input:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--line);
}

.badge-tray {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 7px;
}

.badge-token {
  position: relative;
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 0;
  min-height: 74px;
  padding: 8px 5px 7px;
  border: 2px solid rgba(27, 27, 27, .16);
  border-radius: 7px;
  background: rgba(255, 255, 255, .46);
  cursor: pointer;
}

.badge-token input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.badge-token__medal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid rgba(27, 27, 27, .42);
  border-radius: 999px;
  background: #ece6d3;
  color: rgba(27, 27, 27, .42);
  box-shadow: inset -3px -4px 0 rgba(0, 0, 0, .16);
  font-size: 16px;
  font-weight: 900;
  transform: scale(.94);
  filter: grayscale(1);
  opacity: .58;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}

.badge-token__name {
  max-width: 100%;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 750;
}

.badge-token input:checked + .badge-token__medal {
  border-color: var(--line);
  color: var(--text);
  transform: scale(1);
  filter: none;
  opacity: 1;
}

.badge-token input:checked ~ .badge-token__name {
  color: var(--text);
  font-weight: 900;
}

.badge-token:has(input:checked) {
  border-color: var(--line);
  background: #fff7cf;
  box-shadow: inset 0 0 0 2px rgba(255, 213, 92, .32);
}

.badge-token__medal--boulder { background: linear-gradient(145deg, #b9b1a1, #ede4ca); }
.badge-token__medal--cascade { background: linear-gradient(145deg, #75c8ff, #e3f8ff); }
.badge-token__medal--thunder { background: linear-gradient(145deg, #ffd236, #fff6a8); }
.badge-token__medal--rainbow { background: conic-gradient(#ff6565, #ffd85a, #65d66b, #61a8ff, #c66aff, #ff6565); }
.badge-token__medal--soul { background: linear-gradient(145deg, #ff90b5, #ffe0eb); }
.badge-token__medal--marsh { background: linear-gradient(145deg, #d9c88c, #fff3be); }
.badge-token__medal--volcano { background: linear-gradient(145deg, #ff6a3d, #ffd18a); }
.badge-token__medal--earth { background: linear-gradient(145deg, #86c56b, #d9f0b0); }

.progress-save-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 1120px) {
  .guide-grid--auto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-box--wide {
    grid-column: span 2;
  }

  .companion-layout {
    grid-template-columns: 1fr;
  }

  .companion-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .answer-card--warning {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .dex-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 8px;
  }

  .dex-topbar {
    align-items: flex-start;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "title"
      "nav"
      "tools";
    row-gap: 8px;
    padding: 10px;
  }

  .dex-topbar h1 {
    font-size: 28px;
  }

  body[data-page="companion"] .dex-topbar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "brand title"
      "tools tools";
    align-items: center;
    column-gap: 10px;
    padding: 8px;
  }

  body[data-page="companion"] .dex-back {
    min-height: 34px;
    padding: 6px 10px;
  }

  body[data-page="companion"] .dex-kicker {
    margin-bottom: 4px;
    font-size: 10px;
  }

  body[data-page="companion"] .dex-topbar h1 {
    font-size: 24px;
  }

  .dex-header-tools {
    justify-self: stretch;
    width: 100%;
  }

  .lang-switch {
    align-self: flex-start;
    justify-self: start;
    width: 100%;
  }

  .ru-name-select,
  .ru-name-select select {
    width: 100%;
  }

  body[data-page="companion"] .lang-switch {
    border-width: 2px;
  }

  body[data-page="companion"] .ru-name-select {
    width: auto;
    flex: 1 1 190px;
  }

  body[data-page="companion"] .ru-name-select select {
    width: 100%;
    font-size: 11px;
  }

  body[data-page="companion"] .companion-page {
    gap: 12px;
  }

  body[data-page="companion"] .companion-hero {
    gap: 10px;
    padding: 10px;
  }

  body[data-page="companion"] .companion-hero .guide-text {
    display: none;
  }

  body[data-page="companion"] .companion-location-picker {
    gap: 4px;
  }

  body[data-page="companion"] .companion-location-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 8px;
  }

  body[data-page="companion"] .companion-location-nav .dex-button {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 12px;
  }

  body[data-page="companion"] .companion-location-nav .dex-button[href="/account/"] {
    grid-column: 1 / -1;
  }

  body[data-page="companion"] .companion-current {
    gap: 3px;
    padding: 8px;
  }

  body[data-page="companion"] .companion-current span {
    font-size: 10px;
  }

  body[data-page="companion"] .companion-current strong {
    font-size: 20px;
  }

  body[data-page="companion"] .companion-answer-panel {
    gap: 8px;
    padding: 10px;
  }

  body[data-page="companion"] .companion-answer-panel .dex-kicker {
    display: none;
  }

  body[data-page="companion"] .answer-panel-heading h2 {
    font-size: 22px;
  }

  body[data-page="companion"] .answer-panel-heading .dex-button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .dex-controls {
    grid-template-columns: 1fr;
  }

  .pokemon-card {
    grid-template-columns: 82px 1fr;
  }

  .pokemon-card img {
    width: 82px;
    height: 82px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    display: grid;
  }

  .advice-summary,
  .guide-grid--auto {
    grid-template-columns: 1fr;
  }

  .guide-box--wide {
    grid-column: auto;
  }

  .detail-row,
  .evolution-requirements li {
    grid-template-columns: 1fr;
  }

  .starter-team-grid,
  .team-member-grid {
    grid-template-columns: 1fr;
  }

  .evolution-requirements li > span {
    grid-column: auto;
  }

  .learnset-active {
    justify-content: flex-start;
  }

  .evolution-chain {
    grid-template-columns: 1fr;
  }

  .learnset-table .table-wrap {
    display: none;
  }

  table {
    min-width: 0;
    font-size: 11px;
  }

  th,
  td {
    padding: 5px;
  }

  .learnset-cards {
    display: grid;
    gap: 8px;
    margin-top: 10px;
  }

  .type-chart-wrap {
    display: none;
  }

  .type-chart-cards {
    display: grid;
    gap: 10px;
  }

  .companion-hero,
  .side-quest-hero,
  .answer-grid,
  .companion-grid,
  .companion-side,
  .resource-catalog,
  .route-ratings,
  .companion-profile-facts {
    grid-template-columns: 1fr;
  }

  .answer-card,
  .answer-card--warning {
    grid-column: auto;
  }

  .answer-card {
    min-height: 0;
  }

  .companion-feedback {
    grid-template-columns: 1fr;
  }

  .companion-feedback__buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .companion-encounter {
    grid-template-columns: 1fr;
  }

  .companion-encounter__meta {
    white-space: normal;
  }

  .side-objective {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .side-objective__facts {
    grid-template-columns: 1fr;
  }

  .side-quest-filter-row .dex-button {
    flex: 1 1 145px;
  }
}
