body[data-pokemon-ranking] {
  background:
    linear-gradient(180deg, #f6f2e9 0%, #eee6d7 100%);
}

.pokemon-hero {
  background:
    radial-gradient(circle at 84% 10%, rgba(238,107,55,.24), transparent 28%),
    radial-gradient(circle at 72% 72%, rgba(247,204,75,.18), transparent 30%),
    linear-gradient(120deg, #071522, #173044 58%, #5c1f1c);
}

.pokemon-hero::after {
  content: attr(data-label);
  right: -30px;
  bottom: -88px;
  color: rgba(255,255,255,.035);
  font-size: clamp(92px, 16vw, 230px);
}

.pokemon-hero .hero-card-stack::before,
.pokemon-hero .hero-card-stack::after {
  border-color: rgba(238,107,55,.26);
}

.rank-seal {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 112px;
  height: 112px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #fff;
  background: #8f2330;
  border: 1px solid #f1ce79;
  border-radius: 50%;
  box-shadow: 0 16px 30px rgba(0,0,0,.3);
}

.rank-seal span,
.rank-seal small {
  color: rgba(255,255,255,.68);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.rank-seal strong {
  color: #f1ce79;
  font-family: var(--hs-serif);
  font-size: 30px;
  line-height: 1;
}

.pokemon-page .collection-heading {
  align-items: end;
}

.pokemon-page .card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.pokemon-rank-card {
  display: grid;
  grid-template-rows: 360px auto;
}

.pokemon-rank-card .card-visual {
  min-height: 360px;
  padding: 34px 30px 24px;
}

.pokemon-rank-card .card-visual::after {
  content: attr(data-era);
  opacity: 1;
  transform: none;
  color: #071522;
  background: rgba(246,242,233,.86);
}

.pokemon-rank-card .card-visual img {
  max-height: 310px;
}

.pokemon-rank-card .card-visual.has-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(7,21,34,.92), rgba(143,35,48,.82)),
    #071522;
}

.pokemon-image-placeholder {
  width: min(210px, 72%);
  aspect-ratio: 2.5 / 3.5;
  display: grid;
  place-items: center;
  gap: 8px;
  align-content: center;
  color: #f4efe5;
  background: rgba(255,255,255,.08);
  border: 1px dashed rgba(241,206,121,.55);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.04);
  text-align: center;
}

.pokemon-image-placeholder strong {
  color: #f1ce79;
  font-family: var(--hs-serif);
  font-size: 42px;
  line-height: 1;
}

.pokemon-image-placeholder span {
  color: rgba(244,239,229,.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.pokemon-rank-card .card-content h3 {
  min-height: 64px;
}

.pop-snapshot {
  margin-top: 17px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pop-snapshot div {
  padding: 13px 12px;
  background: #f4efe5;
  border: 1px solid #e1d7c6;
}

.pop-snapshot span {
  display: block;
  color: var(--hs-slate);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pop-snapshot strong {
  display: block;
  margin-top: 4px;
  font-family: var(--hs-serif);
  font-size: 24px;
  line-height: 1;
}

.card-note {
  min-height: 66px;
  margin: 15px 0 0;
  color: var(--hs-slate);
  font-size: 13px;
  line-height: 1.55;
}

.rank-button {
  width: 100%;
  margin-top: 18px;
  padding: 13px 14px;
  color: #fff;
  background: var(--hs-red);
  border: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s, background .2s;
}

.rank-button:hover {
  transform: translateY(-2px);
  background: #7e1f2a;
}

.rank-button:disabled {
  cursor: default;
  opacity: .62;
  transform: none;
}

.rank-board {
  margin-top: 96px;
  padding: clamp(36px, 6vw, 70px);
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: clamp(34px, 6vw, 70px);
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(238,107,55,.18), transparent 26%),
    linear-gradient(130deg, #071522, #101f2b 58%, #301b1f);
  position: relative;
  overflow: hidden;
}

.rank-board::after {
  content: attr(data-label);
  position: absolute;
  left: -24px;
  bottom: -82px;
  color: rgba(255,255,255,.035);
  font-family: var(--hs-serif);
  font-size: clamp(90px, 14vw, 220px);
  font-weight: 700;
  line-height: .9;
}

.rank-copy,
.rank-panel {
  position: relative;
  z-index: 2;
}

.rank-copy h2 {
  margin: 0;
  font-family: var(--hs-serif);
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.05;
}

.rank-copy p:not(.eyebrow) {
  color: #aebbc4;
  line-height: 1.75;
}

.rank-panel {
  padding: 24px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.14);
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-slot,
.leaderboard-row {
  min-height: 58px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: #e7edf1;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(255,255,255,.12);
}

.rank-slot.is-empty {
  color: rgba(255,255,255,.5);
  border-style: dashed;
}

.slot-number,
.leaderboard-rank {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  color: #071522;
  background: #f1ce79;
  font-family: var(--hs-serif);
  font-weight: 700;
}

.slot-title,
.leaderboard-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.slot-title strong,
.leaderboard-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-title span,
.leaderboard-title span {
  color: #9eacb5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.slot-actions {
  display: flex;
  gap: 6px;
}

.slot-actions button {
  min-width: 38px;
  min-height: 32px;
  color: #071522;
  background: #f1ce79;
  border: 0;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.slot-actions button:last-child {
  color: #fff;
  background: rgba(157,38,52,.92);
}

.ballot-status {
  margin: 16px 0 0;
  color: #aebbc4;
  font-size: 12px;
}

.submit-ranking {
  width: 100%;
  margin-top: 18px;
  padding: 15px;
  color: #071522;
  background: #f1ce79;
  border: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}

.leaderboard {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.14);
}

.leaderboard h3 {
  margin: 0 0 13px;
  font-family: var(--hs-serif);
  font-size: 27px;
}

.leaderboard-votes {
  color: #f1ce79;
  font-size: 11px;
  font-weight: 800;
}

.leaderboard-empty {
  margin: 0;
  color: #aebbc4;
  font-size: 13px;
  line-height: 1.6;
}

.schema-note {
  margin-top: 42px;
  padding: 26px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 28px;
  background: #ebe3d5;
  border: 1px solid var(--hs-line);
}

.schema-note h2 {
  margin: 0;
  font-family: var(--hs-serif);
  font-size: 34px;
  line-height: 1.1;
}

.schema-note p {
  margin: 0;
  color: var(--hs-slate);
  line-height: 1.7;
}

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

  .rank-board,
  .schema-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .pokemon-rank-card {
    grid-template-rows: 330px auto;
  }

  .pokemon-rank-card .card-visual {
    min-height: 330px;
  }

  .pokemon-rank-card .card-visual img {
    max-height: 280px;
  }

  .rank-seal {
    right: 8%;
  }

  .rank-slot,
  .leaderboard-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .slot-actions {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .pokemon-page .card-grid {
    grid-template-columns: 1fr;
  }

  .pop-snapshot {
    grid-template-columns: 1fr;
  }

  .rank-board {
    margin-inline: -24px;
    padding-inline: 24px;
  }
}
