:root {
  --bg: #071423;
  --bg-vignette: radial-gradient(
    circle at 12% 8%,
    rgba(255, 203, 5, 0.2) 0%,
    rgba(20, 26, 55, 0.82) 32%,
    rgba(5, 7, 15, 0.95) 68%,
    rgba(3, 4, 10, 1) 100%
  );
  --bg-stripe: linear-gradient(
    120deg,
    rgba(60, 16, 118, 0.45),
    rgba(15, 110, 147, 0.35) 42%,
    rgba(7, 23, 64, 0.85) 100%
  );
  --bg-veil: linear-gradient(
    120deg,
    rgba(60, 16, 118, 0.42),
    rgba(16, 68, 148, 0.28) 48%,
    rgba(10, 24, 58, 0.88) 100%
  );
  --ink: #f2f4ff;
  --muted: #bcc9e5;
  --accent: #ffcb05;
  --accent-alt: #7aa2ff;
  --frame: #2b355b;
  --frame-soft: rgba(142, 131, 255, 0.22);
  --panel: linear-gradient(
    150deg,
    rgba(24, 34, 78, 0.94),
    rgba(12, 20, 46, 0.9)
  );
  --panel-soft: linear-gradient(
    150deg,
    rgba(32, 46, 110, 0.94),
    rgba(18, 28, 68, 0.88)
  );
  --panel-outline: rgba(92, 138, 255, 0.3);
  --surface-border-muted: rgba(121, 205, 255, 0.32);
  --card-border: 1px solid var(--surface-border-muted);
  --card-shadow: 0 28px 48px rgba(6, 12, 32, 0.52);
  --radius: 18px;
  --gap: 24px;
  --pad: 26px;
  --ctrl-h: 42px;
  --btn-bg: rgba(18, 28, 66, 0.9);
  --btn-bg-hover: rgba(25, 38, 88, 0.95);
  --border: 1px solid var(--surface-border-muted);
  --border-strong: 1px solid rgba(255, 141, 240, 0.4);
  --shadow-deep: 0 30px 64px rgba(5, 10, 30, 0.65);
  --shadow-soft: 0 18px 42px rgba(6, 14, 34, 0.48);
  --green-bg: rgba(45, 188, 140, 0.2);
  --green-bd: rgba(61, 214, 158, 0.48);
  --red-bg: rgba(216, 66, 108, 0.18);
  --red-bd: rgba(244, 94, 140, 0.5);
  --glow: 0 0 22px rgba(113, 220, 233, 0.45);
  --rift-shell-bg: linear-gradient(
    160deg,
    rgba(16, 24, 60, 0.96),
    rgba(8, 14, 36, 0.95)
  );
  --rift-shell-border: 1px solid rgba(121, 205, 255, 0.28);
  --rift-shell-shadow: 0 24px 54px rgba(4, 8, 26, 0.58);
}

/* Shared-skin variable mappings */
:root {
  --bg-accent-splash: rgba(59, 76, 202, 0.2);
  --focus-ring: rgba(255, 141, 240, 0.92);
  --chrome-glow: linear-gradient(
    118deg,
    rgba(255, 203, 5, 0.14),
    rgba(59, 76, 202, 0.12) 48%,
    rgba(76, 224, 255, 0)
  );
}

/* Pokemon-specific shell differences */
body.pokemon-app::before {
  background-image: var(--bg-veil);
}

/* Pokemon-specific calculator overrides */
.pokemon-section input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  padding: 0;
  accent-color: #4da3ff;
}

/* Pokémon brand-style treatment for section shell + nav */
body.pokemon-section {
  --pokemon-yellow: #ffcb05;
  --pokemon-blue: #2a4ea1;
  --pokemon-blue-dark: #1d3574;
}

@media (max-width: 720px) {
  body.pokemon-section .calc-page .monte-carlo-section {
    display: none;
  }
}

body.pokemon-section .no-chase-ev-table {
  min-width: 1160px;
}

body.pokemon-section .no-chase-ev-table th,
body.pokemon-section .no-chase-ev-table td {
  white-space: nowrap;
}

body.pokemon-section .no-chase-ev-table th:first-child,
body.pokemon-section .no-chase-ev-table td:first-child {
  min-width: 230px;
  white-space: normal;
}

body.pokemon-section .site-header,
body.pokemon-section .site-footer {
  border: 1px solid rgba(255, 203, 5, 0.62);
  background:
    linear-gradient(160deg, rgba(22, 47, 120, 0.93), rgba(14, 30, 82, 0.94)),
    radial-gradient(
      circle at top right,
      rgba(255, 203, 5, 0.18),
      transparent 54%
    );
  box-shadow:
    0 0 0 2px rgba(35, 72, 162, 0.78),
    0 24px 56px rgba(8, 16, 44, 0.58);
}

body.pokemon-section .site-header::before,
body.pokemon-section .site-footer::before {
  background: linear-gradient(
    120deg,
    rgba(255, 203, 5, 0.2),
    rgba(76, 126, 255, 0.14) 52%,
    rgba(76, 126, 255, 0)
  );
}

body.pokemon-section .site-header .nav-link,
body.pokemon-section .site-footer .nav-link,
body.pokemon-section .site-header .site-nav-toggle {
  color: var(--pokemon-yellow);
  border-color: rgba(255, 203, 5, 0.7);
  background: linear-gradient(
    160deg,
    rgba(43, 76, 170, 0.8),
    rgba(24, 47, 114, 0.86)
  );
}

body.pokemon-section .site-header .site-nav-toggle {
  min-height: 38px;
  height: 38px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

body.pokemon-section .site-footer .nav-link {
  background: none;
}

body.pokemon-section .site-header.is-floating .site-home-link {
  color: #f6f2ff;
  border-color: rgba(248, 200, 107, 0.62);
  background: rgba(24, 18, 56, 0.92);
}

body.pokemon-section .site-header.is-floating .site-home-link:hover,
body.pokemon-section .site-header.is-floating .site-home-link:focus-visible {
  color: #ffffff;
  border-color: rgba(255, 223, 151, 0.92);
  background: rgba(46, 31, 102, 0.96);
}

body.pokemon-section .site-header .nav-link:hover,
body.pokemon-section .site-header .nav-link:focus-visible,
body.pokemon-section .site-header .site-nav-toggle:hover,
body.pokemon-section .site-header .site-nav-toggle:focus-visible,
body.pokemon-section .site-footer .nav-link:hover,
body.pokemon-section .site-footer .nav-link:focus-visible {
  color: #ffe788;
  border-color: #ffe788;
  background: linear-gradient(
    160deg,
    rgba(57, 95, 201, 0.92),
    rgba(33, 62, 145, 0.95)
  );
}

body.pokemon-section .site-title,
body.pokemon-section .site-title-primary,
body.pokemon-section .site-title-secondary {
  color: var(--pokemon-yellow);
  background: none;
  text-shadow: none;
}

body.pokemon-section .site-title-secondary {
  color: #ffe788;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  body.pokemon-section .site-title,
  body.pokemon-section .site-title-primary {
    background: linear-gradient(180deg, #ffeaa3 0%, #ffd34d 56%, #ffbf2f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

body.pokemon-section .page-intro,
body.pokemon-section .tracker-cta,
body.pokemon-section .era-filter-panel,
body.pokemon-section .set-navigator {
  border: 1px solid rgba(255, 203, 5, 0.36);
  box-shadow: 0 16px 38px rgba(9, 17, 48, 0.52);
}

body.pokemon-section .set-tools .btn,
body.pokemon-section .btn {
  background: linear-gradient(155deg, #3769d6, #274ea8);
  border: 1px solid rgba(255, 203, 5, 0.62);
  color: var(--pokemon-yellow);
  text-shadow:
    -1px -1px 0 var(--pokemon-blue-dark),
    1px -1px 0 var(--pokemon-blue-dark),
    -1px 1px 0 var(--pokemon-blue-dark),
    1px 1px 0 var(--pokemon-blue-dark);
}

body.pokemon-section .set-tools .btn:hover,
body.pokemon-section .btn:hover {
  background: linear-gradient(155deg, #4882ff, #2f63d7);
}

body.pokemon-section .tracker-cta {
  text-align: center;
}

body.pokemon-section .tracker-cta h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

body.pokemon-section .tracker-cta p {
  margin: 0 auto 18px;
  max-width: 74ch;
}

body.pokemon-section .tracker-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-width: 2px;
  box-shadow:
    0 10px 24px rgba(9, 19, 56, 0.52),
    0 0 0 1px rgba(255, 203, 5, 0.34) inset;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

body.pokemon-section .tracker-cta-button::before {
  content: "⚡";
  font-size: 0.9em;
  line-height: 1;
}

body.pokemon-section .tracker-cta-button:hover,
body.pokemon-section .tracker-cta-button:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(12, 25, 70, 0.6),
    0 0 0 1px rgba(255, 203, 5, 0.46) inset;
}

body.pokemon-section .era-filter-panel {
  text-align: left;
}

body.pokemon-section .era-filter-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

body.pokemon-section .era-filter-header h2,
body.pokemon-section .set-navigator-heading h2 {
  margin: 0;
}

body.pokemon-section .era-filter-kicker {
  margin: 0 0 5px;
  color: #ffdf67;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.pokemon-section .era-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

body.pokemon-section .era-filter-btn {
  height: auto;
  min-height: 68px;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #f8fbff;
  text-align: left;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
  background:
    linear-gradient(155deg, rgba(47, 91, 188, 0.88), rgba(26, 55, 134, 0.94)),
    radial-gradient(circle at 90% 10%, rgba(255, 203, 5, 0.22), transparent 42%);
  border-color: rgba(255, 203, 5, 0.42);
  box-shadow:
    0 14px 26px rgba(6, 16, 50, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

body.pokemon-section .era-filter-btn span {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
}

body.pokemon-section .era-filter-btn small {
  color: #cfdcff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.pokemon-section .era-filter-btn:hover,
body.pokemon-section .era-filter-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 231, 136, 0.88);
  background:
    linear-gradient(155deg, rgba(60, 111, 222, 0.95), rgba(32, 71, 172, 0.98)),
    radial-gradient(circle at 90% 10%, rgba(255, 203, 5, 0.28), transparent 42%);
  box-shadow:
    0 18px 34px rgba(6, 16, 50, 0.46),
    0 0 0 1px rgba(255, 203, 5, 0.24) inset;
}

body.pokemon-section .era-filter-btn.is-active {
  color: #0d255d;
  border-color: rgba(255, 244, 169, 0.96);
  background:
    linear-gradient(155deg, #ffe987, #ffcb05 64%, #f1b81f),
    radial-gradient(
      circle at 88% 18%,
      rgba(255, 255, 255, 0.34),
      transparent 38%
    );
  box-shadow:
    0 18px 34px rgba(8, 18, 56, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.34) inset;
}

body.pokemon-section .era-filter-btn.is-active span,
body.pokemon-section .era-filter-btn.is-active small {
  color: #0d255d;
}

body.pokemon-section .set-navigator-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

body.pokemon-section .set-result-count {
  margin: 0;
  color: #dbe7ff;
  font-size: 0.94rem;
  font-weight: 700;
}

body.pokemon-section .set-empty-state {
  margin: 14px 0 0;
  padding: 13px 15px;
  border: 1px solid rgba(255, 203, 5, 0.36);
  border-radius: 12px;
  background: rgba(10, 22, 64, 0.52);
  color: #ffefad;
  font-weight: 700;
}

body.pokemon-section {
  background:
    radial-gradient(
      circle at 14% 12%,
      rgba(255, 224, 95, 0.24),
      transparent 34%
    ),
    radial-gradient(
      circle at 84% 18%,
      rgba(82, 131, 255, 0.26),
      transparent 38%
    ),
    linear-gradient(165deg, #0f2b7a 0%, #183a9f 42%, #102458 100%);
  color: #f6f8ff;
}

body.pokemon-section::before {
  background-image:
    radial-gradient(
      circle at 24px 24px,
      rgba(255, 203, 5, 0.2) 0 10px,
      rgba(33, 64, 150, 0.18) 10px 19px,
      transparent 20px
    ),
    radial-gradient(
      circle at 74px 74px,
      rgba(255, 203, 5, 0.12) 0 8px,
      rgba(33, 64, 150, 0.12) 8px 16px,
      transparent 17px
    ),
    linear-gradient(
      120deg,
      rgba(255, 203, 5, 0.12),
      rgba(83, 126, 255, 0.09) 54%,
      rgba(83, 126, 255, 0)
    );
  background-size:
    120px 120px,
    120px 120px,
    auto;
  opacity: 0.45;
}

body.pokemon-section .card {
  background: linear-gradient(
    155deg,
    rgba(26, 56, 140, 0.86),
    rgba(14, 30, 82, 0.9)
  );
  border-color: rgba(255, 203, 5, 0.36);
}

body.pokemon-section .card h2 {
  color: #ffe788;
}
