.site-main {
  width: 100%;
  padding: 112px 0 28px;
}

.pokemon-page {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px var(--container-gutter) 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(45, 65, 56, 0.04);
}

.pokemon-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.pokemon-header h1 {
  margin-top: 0;
  font-family: var(--font-headline), sans-serif;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.07;
  letter-spacing: -0.01em;
  color: #3f2f72;
}

.pokemon-header p {
  margin-top: 6px;
  color: #63786f;
}

.module-tabs-wrap {
  margin-top: 18px;
  border-radius: 22px;
  background:
    radial-gradient(720px 220px at 0% -10%, rgba(6, 185, 109, 0.11), transparent 68%),
    radial-gradient(640px 220px at 100% -10%, rgba(255, 79, 147, 0.11), transparent 70%),
    rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 36px rgba(36, 61, 49, 0.1);
  padding: 14px;
}

.module-tabs-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.module-tab-link,
.module-tab-active {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 14px;
  padding: 8px 14px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
}

.module-tab-link {
  color: rgb(77, 94, 87);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(118, 146, 133, 0.16);
}

.module-tab-link:hover {
  color: #1d4f39;
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(6, 185, 109, 0.32),
    0 8px 16px rgba(50, 79, 64, 0.1);
}

.module-tab-active {
  color: #fff;
  background: linear-gradient(135deg, #ff4f93, #ff2f8a);
  box-shadow: 0 10px 20px rgba(255, 47, 138, 0.28);
}

.module-tab-link small,
.module-tab-active small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.1;
}

.module-tab-link small {
  border: 1px solid rgba(123, 145, 136, 0.34);
  color: rgb(77, 94, 87);
  background: rgba(255, 255, 255, 0.92);
}

.module-tab-active small {
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Force module nav colors to avoid accidental override from shared styles. */
.module-tabs-nav-row .module-tab-link,
.module-tabs-nav-row .module-tab-link span,
.module-tabs-nav-row .module-tab-link small {
  color: rgb(77, 94, 87) !important;
}

.module-tabs-nav-row .module-tab-active,
.module-tabs-nav-row .module-tab-active span,
.module-tabs-nav-row .module-tab-active small {
  color: #fff !important;
}

.module-tabs-search-box {
  margin-top: 12px;
}

.module-tabs-search-box input {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(121, 147, 136, 0.22);
  padding: 12px 14px;
  font-size: 15px;
}

.module-tabs-search-box input:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(6, 185, 109, 0.36),
    0 0 0 4px rgba(6, 185, 109, 0.14);
}

.module-tabs-results {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.module-tabs-hit {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 13px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(126, 150, 139, 0.2);
}

.module-tabs-hit:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(6, 185, 109, 0.33),
    0 8px 16px rgba(50, 79, 64, 0.1);
}

.module-tabs-tag {
  border-radius: 999px;
  border: 1px solid rgba(6, 185, 109, 0.26);
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #15975d;
  font-weight: 800;
  background: rgba(241, 255, 248, 0.9);
}

.module-tabs-hit strong {
  font-size: 15px;
}

.module-tabs-hit small {
  font-size: 12px;
  color: #677c72;
  grid-column: 2;
}

.module-tabs-empty {
  color: #60756c;
  font-size: 14px;
  margin: 4px 0;
}

.pokemon-filter-panel {
  margin-top: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(205, 220, 212, 0.7);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.pokemon-filter-group {
  display: grid;
  gap: 9px;
}

.pokemon-filter-title {
  font-size: 17px;
  font-family: var(--font-headline), sans-serif;
  color: #4a5f57;
  font-weight: 800;
}

.pokemon-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pokemon-tag-all,
.pokemon-tag-all-active,
.pokemon-type-tag,
.pokemon-type-tag-active,
.pokemon-special-tag,
.pokemon-special-tag-active {
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  min-height: 36px;
}

.pokemon-tag-all {
  color: #fff;
  background: #79cf49;
}

.pokemon-tag-all-active {
  color: #fff;
  background: #79cf49;
  box-shadow: 0 0 0 2px rgba(121, 207, 73, 0.55);
  border-color: rgba(255, 255, 255, 0.98);
}

.pokemon-type-tag,
.pokemon-type-tag-active {
  --type-color: #8a9893;
}

.pokemon-type-tag {
  color: #fff;
  background: var(--type-color);
}

.pokemon-type-tag-active {
  color: #fff;
  background: var(--type-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--type-color) 55%, transparent);
  border-color: rgba(255, 255, 255, 0.98);
}

.pokemon-special-tag {
  color: #fff;
  background: #2b3146;
}

.pokemon-special-tag-active {
  color: #fff;
  background: #2b3146;
  box-shadow: 0 0 0 2px rgba(143, 163, 234, 0.52);
  border-color: #b8c6ff;
}

.pokemon-tag-icon,
.pokemon-pill-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background-repeat: no-repeat;
  filter: brightness(1.18) saturate(0.9);
}

.pokemon-special-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-repeat: no-repeat;
  filter: none;
}

.pokemon-type-tag,
.pokemon-type-tag-active,
.pokemon-special-tag,
.pokemon-special-tag-active {
  color: #fff !important;
}

.pokemon-toolbar {
  margin-top: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(205, 220, 212, 0.7);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pokemon-toolbar input {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 0 0 1px rgba(121, 146, 134, 0.22);
}

.pokemon-toolbar input:focus {
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(6, 185, 109, 0.4),
    0 0 0 4px rgba(6, 185, 109, 0.12);
}

.pokemon-toolbar span {
  color: #5f746b;
  font-size: 14px;
  font-weight: 700;
}

.pokemon-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pokemon-card {
  --aura-color: #79cf49;
  border-radius: 20px;
  background: linear-gradient(148deg, #ffffff 0%, #f6fbf8 100%);
  border: 1px solid rgba(198, 216, 207, 0.8);
  padding: 11px;
  color: #385349;
}

.pokemon-card:hover {
  transform: translateY(-1px);
  border-color: rgba(172, 198, 186, 0.92);
}

.pokemon-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 112px;
}

.pokemon-info-col {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
}

.pokemon-name {
  font-size: clamp(24px, 2vw, 33px);
  line-height: 1.05;
  color: #31453f;
  font-family: var(--font-headline), sans-serif;
}

.pokemon-dex-text {
  color: #869a92;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.pokemon-subtitle {
  color: #7d9089;
  font-size: 12px;
}

.pokemon-type-row {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pokemon-type-badge {
  --type-color: #879398;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--type-color);
}

.pokemon-sprite-dock {
  width: 98px;
  height: 98px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: radial-gradient(84% 84% at 50% 46%, rgba(255, 255, 255, 0.98), rgba(242, 249, 245, 0.92));
  border: 1px solid rgba(196, 211, 221, 0.7);
  position: relative;
  overflow: hidden;
}

.pokemon-sprite-dock::before {
  content: "";
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--aura-color) 36%, white);
  filter: blur(10px);
  opacity: 0.58;
}

.pokemon-hero-sprite {
  width: 82px;
  height: 82px;
  position: relative;
  z-index: 2;
  image-rendering: pixelated;
}

.pokemon-meta-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pokemon-meta-chip,
.pokemon-env-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}

.pokemon-meta-chip {
  background: #edf3f8;
  color: #526779;
}

.pokemon-env-chip {
  color: #9d861d;
  background: #fdf5d8;
}

.pokemon-habitat-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.pokemon-habitat-item {
  border-radius: 10px;
  background: #f8fbff;
  border: 1px solid rgba(194, 209, 224, 0.58);
  padding: 6px;
}

.pokemon-habitat-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.pokemon-habitat-sprite {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background-color: #fff;
  border: 1px solid rgba(196, 211, 226, 0.62);
}

.pokemon-habitat-text {
  min-width: 0;
}

.pokemon-habitat-text strong {
  display: block;
  color: #334f62;
  font-size: 12px;
  line-height: 1.2;
}

.pokemon-habitat-text small {
  display: block;
  margin-top: 1px;
  color: #7f93a3;
  font-size: 10px;
}

.pokemon-habitat-code {
  border-radius: 8px;
  background: rgba(79, 132, 228, 0.15);
  color: #315d9f;
  font-weight: 800;
  font-size: 10px;
  padding: 3px 6px;
}

.pokemon-condition-row {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pokemon-condition-label {
  font-size: 11px;
  font-weight: 700;
  color: #6e8397;
  line-height: 1;
}

.pokemon-icon-series {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(72, 95, 132, 0.07);
}

.pokemon-condition-icon-on,
.pokemon-condition-icon-off {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background-repeat: no-repeat;
  border-radius: 999px;
}

.pokemon-condition-icon-on {
  background-color: #5d789f;
  opacity: 1;
}

.pokemon-condition-icon-off {
  background-color: #c6d1df;
  opacity: 0.6;
}

.pokemon-empty-habitat,
.pokemon-empty-list {
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid rgba(194, 209, 224, 0.58);
  padding: 12px;
  text-align: center;
  color: #738896;
  font-size: 13px;
}

.pokemon-pagination {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.pokemon-pagination a {
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(123, 147, 136, 0.22);
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 700;
}

.pokemon-pagination a:hover:not(.is-disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(6, 185, 109, 0.28),
    0 8px 16px rgba(45, 68, 58, 0.11);
}

.pokemon-pagination .is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.pokemon-pagination span {
  color: #556b63;
  font-weight: 700;
  font-size: 14px;
}

@media (max-width: 1220px) {
  .pokemon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 860px) {
  .site-main {
    padding-top: 96px;
  }

  .pokemon-page {
    border-radius: 18px;
    padding: 12px 12px 22px;
  }

  .module-tabs-wrap {
    padding: 11px;
    border-radius: 18px;
  }

  .module-tab-link,
  .module-tab-active {
    border-radius: 12px;
    padding: 7px 11px;
    font-size: 13px;
  }

  .module-tabs-search-box input {
    font-size: 14px;
  }

  .module-tabs-hit {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 5px;
  }

  .module-tabs-hit small {
    grid-column: 1;
  }

  .pokemon-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pokemon-filter-title {
    font-size: 15px;
  }

  .pokemon-tag-all,
  .pokemon-tag-all-active,
  .pokemon-type-tag,
  .pokemon-type-tag-active,
  .pokemon-special-tag,
  .pokemon-special-tag-active {
    border-radius: 10px;
    padding: 6px 9px;
    font-size: 12px;
    min-height: 34px;
  }

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

  .pokemon-card-head {
    grid-template-columns: 1fr 92px;
    align-items: start;
  }

  .pokemon-sprite-dock {
    width: 86px;
    height: 86px;
  }

  .pokemon-hero-sprite {
    width: 74px;
    height: 74px;
  }

  .pokemon-name {
    font-size: 25px;
  }

  .pokemon-dex-text {
    font-size: 16px;
  }
}
