@import url("https://fonts.cdnfonts.com/css/pokemon-solid");

:root {
  color-scheme: dark;
  --black: #080407;
  --ink: #160910;
  --red: #ff2448;
  --red-deep: #9d1026;
  --pink: #ff65c8;
  --pink-soft: #ff9edd;
  --yellow: #ffe15b;
  --blue: #2253d8;
  --cream: #fff8e7;
  --glass: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.18);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  --nav-height: 76px;
  --radius: 8px;
  --motion-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --motion-fast: 160ms;
  --motion-medium: 220ms;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-pokemon: "Pokemon Solid", "Arial Black", Impact, fantasy;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--black);
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--cream);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 6%, rgba(255, 101, 200, 0.28), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(255, 36, 72, 0.3), transparent 22rem),
    linear-gradient(180deg, #16050c 0%, #080407 42%, #13050d 100%);
}

button,
input {
  font: inherit;
  touch-action: manipulation;
}

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

img {
  display: block;
}

main {
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 18px);
}

.site-shell {
  min-height: 100svh;
  isolation: isolate;
}

.motion-delay-1,
.motion-delay-2,
.motion-delay-3,
.motion-delay-4,
.motion-delay-5 {
  animation-delay: 0ms;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(660px, calc(100svh - 54px));
  padding: max(24px, env(safe-area-inset-top)) 18px 22px;
  overflow: hidden;
  align-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hero::before,
.hero::after {
  position: absolute;
  inset: auto;
  z-index: -1;
  content: "";
}

.hero::before {
  width: 135vw;
  height: 135vw;
  right: -58vw;
  bottom: -34vw;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.18) 49%, rgba(255, 255, 255, 0.18) 51%, transparent 52%),
    radial-gradient(circle, transparent 0 27%, rgba(255, 255, 255, 0.18) 28% 30%, transparent 31% 100%),
    linear-gradient(180deg, #f92347 0 49%, #f8f8f8 50% 100%);
  opacity: 0.34;
  transform: rotate(-18deg);
}

.hero::after {
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 48px),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(8, 4, 7, 0.34) 100%);
  mask-image: linear-gradient(180deg, black 0%, transparent 86%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  max-width: 720px;
}

.hero-kicker {
  width: fit-content;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--pink-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.35);
}

.pokemon-title {
  max-width: 11ch;
  margin: 0;
  color: var(--yellow);
  font-family: var(--font-pokemon);
  font-size: clamp(2.15rem, 15vw, 4.55rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow:
    3px 3px 0 var(--blue),
    -2px 2px 0 var(--blue),
    0 5px 0 #102a87,
    0 14px 28px rgba(0, 0, 0, 0.48);
  transform: rotate(-1.5deg);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 248, 231, 0.88);
  background: rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 20px rgba(255, 101, 200, 0.08);
}

.hero-stats strong {
  color: #fff;
  font-size: 1.08rem;
}

.hero-stage {
  position: relative;
  min-height: 315px;
  margin-top: 8px;
}

.pokeball-ring {
  position: absolute;
  width: min(82vw, 340px);
  aspect-ratio: 1;
  right: -34px;
  bottom: 8px;
  border: 16px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 12px rgba(255, 36, 72, 0.28),
    0 0 60px rgba(255, 101, 200, 0.28);
  animation: pulse-ring 3.8s ease-in-out infinite;
}

.pokeball-ring::before,
.pokeball-ring::after {
  position: absolute;
  content: "";
}

.pokeball-ring::before {
  inset: 45% -16px auto;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.pokeball-ring::after {
  width: 72px;
  aspect-ratio: 1;
  inset: 50%;
  border: 10px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(8, 4, 7, 0.7);
  transform: translate(-50%, -50%);
}

.hero-pokemon {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 1;
  width: min(78vw, 360px);
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 28px 18px rgba(0, 0, 0, 0.46));
  animation: hero-float 4.5s ease-in-out infinite;
}

.spark {
  position: absolute;
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 24px rgba(255, 225, 91, 0.9);
  animation: sparkle 2.8s ease-in-out infinite;
}

.spark-one {
  right: 68%;
  bottom: 58%;
}

.spark-two {
  right: 8%;
  bottom: 72%;
  width: 8px;
  background: var(--pink);
  animation-delay: 0.45s;
}

.spark-three {
  right: 48%;
  bottom: 18%;
  width: 10px;
  background: #fff;
  animation-delay: 0.9s;
}

.control-band {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-block: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 5, 10, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.search-box svg {
  width: 19px;
  height: 19px;
  color: var(--pink-soft);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--cream);
  font-size: 16px;
  background: transparent;
}

.search-box input::placeholder {
  color: rgba(255, 248, 231, 0.56);
}

.chip-group,
.rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.chip-group::-webkit-scrollbar,
.rail-track::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 248, 231, 0.82);
  font-size: 0.82rem;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.07);
}

.filter-chip.is-active {
  color: #18040a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--yellow), var(--pink-soft));
  box-shadow: 0 8px 22px rgba(255, 101, 200, 0.26);
}

.strong-rail,
.grid-section,
.related-forms {
  padding: 18px 14px 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: rgba(255, 248, 231, 0.78);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.section-heading strong {
  display: inline-grid;
  min-width: 32px;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #19040b;
  background: var(--pink-soft);
}

.rail-track {
  grid-auto-columns: minmax(138px, 44vw);
  padding-bottom: 8px;
}

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

.pokemon-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 214px;
  aspect-ratio: 0.76;
  padding: 10px;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: var(--radius);
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.2), transparent 36%),
    linear-gradient(160deg, rgba(255, 36, 72, 0.32), rgba(255, 101, 200, 0.18) 52%, rgba(0, 0, 0, 0.62));
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  transform: translateZ(0);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
  contain: layout paint;
}

.pokemon-card:nth-child(3n + 2) {
  animation-delay: 42ms;
}

.pokemon-card:nth-child(3n + 3) {
  animation-delay: 84ms;
}

.pokemon-card:active {
  border-color: rgba(255, 255, 255, 0.34);
}

.pokemon-card:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.pokemon-card::before {
  position: absolute;
  inset: 9px;
  z-index: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  content: "";
  pointer-events: none;
}

.pokemon-card::after {
  position: absolute;
  width: 92%;
  aspect-ratio: 1;
  inset: 24px auto auto 50%;
  z-index: 0;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255, 255, 255, 0.22) 48% 52%, transparent 53%),
    radial-gradient(circle, transparent 0 31%, rgba(255, 255, 255, 0.2) 32% 35%, transparent 36% 100%);
  opacity: 0.5;
  transform: translateX(-50%);
  content: "";
}

.pokemon-card--compact {
  min-height: 190px;
  aspect-ratio: 0.82;
}

.card-energy {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(120deg, transparent 0 28%, rgba(255, 255, 255, 0.16) 32%, transparent 36% 100%),
    radial-gradient(circle at 80% 14%, rgba(255, 225, 91, 0.28), transparent 34%);
  mix-blend-mode: screen;
}

.category-mark,
.form-ribbon {
  position: relative;
  z-index: 2;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-mark {
  color: #1a030a;
  background: var(--yellow);
}

.form-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

.sprite-stage {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 112px;
  place-items: center;
  align-self: end;
}

.card-sprite {
  width: min(112px, 78%);
  max-height: 126px;
  object-fit: contain;
  filter: drop-shadow(0 16px 12px rgba(0, 0, 0, 0.5));
  transition: transform 180ms ease;
}

.card-footer {
  position: relative;
  z-index: 3;
  display: grid;
  align-self: end;
  gap: 8px;
  min-width: 0;
}

.card-name {
  display: -webkit-box;
  min-height: 2.42em;
  overflow: hidden;
  color: #fff;
  font-size: clamp(0.94rem, 4vw, 1.1rem);
  font-weight: 950;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-types,
.detail-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.type-orb {
  --type-color: #9ca3af;
  display: inline-grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.58), transparent 33%),
    var(--type-color);
  box-shadow:
    inset 0 -4px 8px rgba(0, 0, 0, 0.24),
    0 6px 12px rgba(0, 0, 0, 0.24);
}

.type-orb__icon {
  width: 58%;
  height: 58%;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 3px 9px 3px 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 248, 231, 0.94);
  font-size: 0.84rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.24);
}

.type-normal { --type-color: #a8a77a; }
.type-fire { --type-color: #ee8130; }
.type-water { --type-color: #6390f0; }
.type-electric { --type-color: #f7d02c; }
.type-grass { --type-color: #7ac74c; }
.type-ice { --type-color: #96d9d6; }
.type-fighting { --type-color: #c22e28; }
.type-poison { --type-color: #a33ea1; }
.type-ground { --type-color: #e2bf65; }
.type-flying { --type-color: #a98ff3; }
.type-psychic { --type-color: #f95587; }
.type-bug { --type-color: #a6b91a; }
.type-rock { --type-color: #b6a136; }
.type-ghost { --type-color: #735797; }
.type-dragon { --type-color: #6f35fc; }
.type-dark { --type-color: #705746; }
.type-steel { --type-color: #b7b7ce; }
.type-fairy { --type-color: #d685ad; }

.type-card-fire,
.type-detail-fire { --type-accent: #ee8130; }
.type-card-water,
.type-detail-water { --type-accent: #6390f0; }
.type-card-electric,
.type-detail-electric { --type-accent: #f7d02c; }
.type-card-grass,
.type-detail-grass { --type-accent: #7ac74c; }
.type-card-ice,
.type-detail-ice { --type-accent: #96d9d6; }
.type-card-fighting,
.type-detail-fighting { --type-accent: #c22e28; }
.type-card-poison,
.type-detail-poison { --type-accent: #a33ea1; }
.type-card-ground,
.type-detail-ground { --type-accent: #e2bf65; }
.type-card-flying,
.type-detail-flying { --type-accent: #a98ff3; }
.type-card-psychic,
.type-detail-psychic { --type-accent: #f95587; }
.type-card-bug,
.type-detail-bug { --type-accent: #a6b91a; }
.type-card-rock,
.type-detail-rock { --type-accent: #b6a136; }
.type-card-ghost,
.type-detail-ghost { --type-accent: #735797; }
.type-card-dragon,
.type-detail-dragon { --type-accent: #6f35fc; }
.type-card-dark,
.type-detail-dark { --type-accent: #705746; }
.type-card-steel,
.type-detail-steel { --type-accent: #b7b7ce; }
.type-card-fairy,
.type-detail-fairy { --type-accent: #d685ad; }
.type-card-normal,
.type-detail-normal { --type-accent: #a8a77a; }

.pokemon-card[class*="type-card-"] {
  background:
    radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--type-accent, var(--pink)) 44%, white 0%), transparent 34%),
    linear-gradient(160deg, rgba(255, 36, 72, 0.34), color-mix(in srgb, var(--type-accent, var(--pink)) 36%, transparent) 54%, rgba(0, 0, 0, 0.66));
}

.detail-view {
  min-height: calc(100svh - var(--nav-height));
  padding: max(18px, env(safe-area-inset-top)) 14px 0;
  background:
    radial-gradient(circle at 76% 12%, color-mix(in srgb, var(--type-accent, var(--pink)) 36%, transparent), transparent 28rem),
    linear-gradient(180deg, rgba(255, 36, 72, 0.12), transparent 32%);
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.detail-eyebrow,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  color: var(--cream);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.09);
}

.detail-eyebrow {
  color: rgba(255, 248, 231, 0.8);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.detail-number {
  color: var(--yellow);
  font-weight: 950;
}

.detail-hero {
  display: grid;
  gap: 14px;
}

.detail-title {
  display: grid;
  gap: 10px;
}

.detail-title p {
  margin: 0;
  color: var(--pink-soft);
  font-size: 0.8rem;
  font-weight: 950;
  text-transform: uppercase;
}

.detail-title h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 11vw, 4.2rem);
  line-height: 0.95;
}

.detail-art-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.art-panel {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 210px;
  margin: 0;
  padding: 12px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.18), transparent 42%),
    rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.art-panel::before {
  position: absolute;
  width: 86%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  content: "";
}

.art-panel figcaption {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  padding: 5px 8px;
  border-radius: 999px;
  color: #18040a;
  font-size: 0.72rem;
  font-weight: 950;
  background: var(--yellow);
}

.shiny-panel figcaption {
  background: var(--pink-soft);
}

.shiny-sweep,
.shiny-sparkles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.shiny-sweep {
  background: linear-gradient(
    115deg,
    transparent 0 36%,
    rgba(255, 255, 255, 0.08) 43%,
    rgba(255, 255, 255, 0.72) 49%,
    rgba(255, 101, 200, 0.26) 55%,
    transparent 64% 100%
  );
  opacity: 0;
  transform: translateX(-130%);
}

.shiny-sparkles span {
  position: absolute;
  display: block;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 18px rgba(255, 101, 200, 0.58);
  opacity: 0;
}

.shiny-sparkles span:nth-child(1) {
  top: 29%;
  left: 28%;
}

.shiny-sparkles span:nth-child(2) {
  top: 38%;
  right: 24%;
  width: 5px;
}

.shiny-sparkles span:nth-child(3) {
  right: 36%;
  bottom: 23%;
  width: 6px;
}

.detail-art {
  position: relative;
  z-index: 3;
  width: 100%;
  max-height: 218px;
  object-fit: contain;
  filter: drop-shadow(0 22px 16px rgba(0, 0, 0, 0.44));
  will-change: transform;
}

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

.fact-strip span {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 66px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  color: rgba(255, 248, 231, 0.86);
  font-size: 0.78rem;
  line-height: 1.1;
  background: rgba(255, 255, 255, 0.07);
}

.fact-strip strong {
  color: var(--pink-soft);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.story-panels {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.story-panel {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.24);
}

.story-panel svg {
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 50%;
  color: #16040a;
  background: var(--yellow);
}

.story-panel p {
  margin: 0;
  color: rgba(255, 248, 231, 0.94);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
}

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

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  gap: 12px;
  padding: 44px 18px;
  text-align: center;
}

.empty-state h2 {
  margin: 0;
}

.empty-state svg {
  width: 42px;
  height: 42px;
  color: var(--pink-soft);
}

.image-fallback {
  display: grid;
  width: 82px;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: var(--yellow);
  font-size: 2rem;
  font-weight: 950;
  background: rgba(0, 0, 0, 0.36);
}

.bottom-nav {
  position: fixed;
  right: 10px;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 10px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-height: 68px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(10, 4, 8, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.46);
}

.bottom-nav button {
  display: grid;
  grid-template-rows: 22px auto;
  gap: 3px;
  align-content: center;
  justify-content: center;
  min-width: 0;
  min-height: 54px;
  padding: 5px 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: rgba(255, 248, 231, 0.78);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    filter 120ms ease;
}

.bottom-nav button:active {
  background: rgba(255, 255, 255, 0.12);
  filter: brightness(1.14);
}

.bottom-nav button.is-active {
  color: #18040a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--yellow), var(--pink-soft));
}

.bottom-nav button.is-muted {
  color: rgba(255, 248, 231, 0.36);
}

.bottom-nav svg {
  width: 19px;
  height: 19px;
  justify-self: center;
}

@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(1) rotate(-4deg);
  }
  50% {
    transform: scale(1.04) rotate(4deg);
  }
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

@media (min-width: 720px) {
  main {
    padding-bottom: 24px;
  }

  .hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.75fr);
    min-height: 620px;
    padding: 52px clamp(28px, 5vw, 72px) 38px;
    align-items: center;
  }

  .pokemon-title {
    max-width: 13ch;
    font-size: clamp(4.4rem, 8vw, 7.2rem);
  }

  .hero-stage {
    min-height: 460px;
  }

  .hero-pokemon {
    right: 0;
    width: min(42vw, 520px);
    max-height: 540px;
  }

  .control-band {
    grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1fr);
    align-items: center;
    padding-inline: clamp(22px, 5vw, 72px);
  }

  .control-band .chip-group:last-child {
    grid-column: 2;
  }

  .strong-rail,
  .grid-section,
  .related-forms,
  .detail-view {
    padding-inline: clamp(22px, 5vw, 72px);
  }

  .rail-track {
    grid-auto-columns: minmax(180px, 220px);
  }

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

  .pokemon-card:hover {
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42);
    transform: translateY(-6px);
  }

  .pokemon-card:hover .card-sprite {
    transform: translateY(-8px) scale(1.08);
  }

  .detail-view {
    padding-top: 28px;
  }

  .detail-hero {
    grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1fr);
    align-items: center;
  }

  .detail-art-grid {
    gap: 14px;
  }

  .art-panel {
    min-height: 360px;
  }

  .detail-art {
    max-height: 330px;
  }

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

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  }

  .bottom-nav {
    right: 50%;
    left: auto;
    width: min(480px, calc(100vw - 28px));
    transform: translateX(50%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .site-shell.motion-page main {
    animation: page-soft-in var(--motion-fast) var(--motion-ease) both;
  }

  .motion-enter {
    animation: motion-fade-up var(--motion-medium) var(--motion-ease) both;
  }

  .pokemon-idle-art {
    animation: pokemon-idle-float 3.8s ease-in-out infinite;
  }

  .shiny-panel .pokemon-idle-art {
    animation-delay: 280ms;
  }

  .shiny-effect-panel {
    box-shadow:
      var(--shadow),
      inset 0 0 34px rgba(255, 101, 200, 0.12);
  }

  .shiny-sweep {
    animation: shiny-sweep 3.4s ease-in-out infinite;
  }

  .shiny-sparkles span {
    animation: shiny-sparkle 2.6s ease-in-out infinite;
  }

  .shiny-sparkles span:nth-child(2) {
    animation-delay: 540ms;
  }

  .shiny-sparkles span:nth-child(3) {
    animation-delay: 1080ms;
  }

  .motion-delay-1 {
    animation-delay: 35ms;
  }

  .motion-delay-2 {
    animation-delay: 70ms;
  }

  .motion-delay-3 {
    animation-delay: 105ms;
  }

  .motion-delay-4 {
    animation-delay: 140ms;
  }

  .motion-delay-5 {
    animation-delay: 175ms;
  }

  .rail-track .motion-card,
  .related-grid .motion-card,
  .pokemon-grid .motion-card:nth-child(-n + 12) {
    animation: motion-card-in var(--motion-medium) var(--motion-ease) both;
  }

  .pokemon-grid .motion-card:nth-child(2),
  .rail-track .motion-card:nth-child(2),
  .related-grid .motion-card:nth-child(2) {
    animation-delay: 35ms;
  }

  .pokemon-grid .motion-card:nth-child(3),
  .rail-track .motion-card:nth-child(3),
  .related-grid .motion-card:nth-child(3) {
    animation-delay: 70ms;
  }

  .pokemon-grid .motion-card:nth-child(4),
  .rail-track .motion-card:nth-child(4),
  .related-grid .motion-card:nth-child(4) {
    animation-delay: 105ms;
  }

  @keyframes page-soft-in {
    from {
      opacity: 0.88;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes motion-fade-up {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes motion-card-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes pokemon-idle-float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-4px);
    }
  }

  @keyframes shiny-sweep {
    0%,
    42% {
      opacity: 0;
      transform: translateX(-130%);
    }
    52% {
      opacity: 0.86;
    }
    66% {
      opacity: 0;
      transform: translateX(130%);
    }
    100% {
      opacity: 0;
      transform: translateX(130%);
    }
  }

  @keyframes shiny-sparkle {
    0%,
    30%,
    100% {
      opacity: 0;
      transform: translateY(0);
    }
    42% {
      opacity: 1;
      transform: translateY(-3px);
    }
    54% {
      opacity: 0;
      transform: translateY(-7px);
    }
  }
}

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