.page-home {
  --home-line-blue: rgba(65, 88, 208, 0.08);
  --home-line-purple: rgba(139, 92, 246, 0.08);
  --home-panel-white: #ffffff;
  --home-border: #D9CBB8;
  --home-dark-panel: #141414;
  --home-tilt: -2deg;
  background: transparent;
}

.page-home .home-hero {
  position: relative;
  padding: 24px 0 var(--space-section);
  background:
    radial-gradient(circle at 8% 20%, rgba(65, 88, 208, 0.10), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(139, 92, 246, 0.10), transparent 30%),
    linear-gradient(var(--home-line-blue) 1px, transparent 1px),
    linear-gradient(90deg, var(--home-line-purple) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
  overflow: hidden;
}

.page-home .breadcrumb {
  margin-bottom: 24px;
}

.page-home .home-hero__split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.page-home .home-rank-zone {
  position: relative;
}

.page-home .home-rank-zone__bg {
  position: absolute;
  inset: 8px 0 16px;
  z-index: 0;
  pointer-events: none;
}

.page-home .home-rank-zone__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.5;
  display: block;
}

.page-home .home-rank-frame {
  position: relative;
  z-index: 1;
  background: var(--home-dark-panel);
  color: #ffffff;
  border-radius: 8px;
  padding: 20px 18px 0;
  box-shadow: 0 28px 56px rgba(20, 20, 20, 0.22);
  transform: rotate(var(--home-tilt));
  transform-origin: 6% 10%;
  margin: 26px 2px 42px 10px;
  scroll-margin-top: 120px;
  overflow: hidden;
}

.page-home .home-rank-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 88% -10%, rgba(65, 88, 208, 0.55), transparent 52%),
    radial-gradient(ellipse at 12% 112%, rgba(139, 92, 246, 0.42), transparent 55%);
  pointer-events: none;
}

.page-home .home-rank-frame__head {
  position: relative;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.page-home .home-rank-frame__heading {
  flex: 1;
  min-width: 0;
}

.page-home .home-hero__title {
  font-family: var(--font-headline);
  font-size: clamp(1.55rem, 3.6vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
  color: #ffffff;
}

.page-home .home-hero__lead {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  line-height: 1.7;
  max-width: 46em;
}

.page-home .home-rank-frame__head .badge {
  flex-shrink: 0;
  margin-top: 4px;
}

.page-home .league-switcher {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 14px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-home .league-switcher::-webkit-scrollbar {
  display: none;
}

.page-home .league-switcher__tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  font-family: var(--font-base);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.64);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.page-home .league-switcher__tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.page-home .league-switcher__tab:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.page-home .league-switcher__tab.is-active {
  background: var(--grad-data);
  color: #ffffff;
  border-color: transparent;
}

.page-home .rank-board {
  display: none;
  position: relative;
  padding-top: 16px;
  scroll-margin-top: 120px;
}

.page-home .rank-board:first-of-type {
  display: block;
}

.page-home .home-rank-frame:has(.rank-board:target) .rank-board:first-of-type {
  display: none;
}

.page-home .home-rank-frame:has(.rank-board:target) .rank-board:target {
  display: block;
}

.page-home .rank-board__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 2px 10px;
}

.page-home .rank-board__title {
  font-family: var(--font-headline);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.page-home .rank-board__meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.page-home .rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-home .rank-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  grid-template-areas:
    "num team record pts"
    "num recent recent recent";
  column-gap: 10px;
  row-gap: 8px;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s;
}

.page-home .rank-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.page-home .rank-item:focus-within {
  background: rgba(255, 255, 255, 0.07);
}

.page-home .rank-item__num {
  grid-area: num;
  font-family: var(--font-number);
  font-size: 1.4rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.page-home .rank-item--top .rank-item__num {
  background: var(--grad-data);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-home .rank-item__team {
  grid-area: team;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.98rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-home .rank-item__record {
  grid-area: record;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.56);
  white-space: nowrap;
}

.page-home .rank-item__pts {
  grid-area: pts;
  font-family: var(--font-number);
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: right;
  min-width: 2ch;
}

.page-home .rank-item--top .rank-item__pts {
  color: var(--gold);
}

.page-home .rank-item__recent {
  grid-area: recent;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.page-home .rank-item__stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--cyan);
  border-radius: 10px;
  transition: background 0.2s, transform 0.2s;
}

.page-home .rank-item__stamp.is-loss {
  background: rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.6);
}

.page-home .rank-item:hover .rank-item__stamp {
  transform: translateY(-1px);
}

.page-home .rank-board__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 2px 18px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.page-home .rank-board__note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

.page-home .rank-board__note a {
  color: var(--signal-purple);
  text-underline-offset: 3px;
}

.page-home .rank-board__count {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.page-home .rank-board__scale {
  display: block;
  flex: 1 1 100%;
  height: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.22) 0 1px,
    transparent 1px 12px
  );
  border-left: 1px solid rgba(255, 255, 255, 0.32);
  border-right: 1px solid rgba(255, 255, 255, 0.32);
}

.page-home .home-index-col {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.page-home .home-index-col .eyebrow {
  margin: 0;
  color: var(--muted);
}

.page-home .home-index-col__title {
  font-family: var(--font-headline);
  font-size: 1.35rem;
  margin: 0 0 2px;
  color: var(--ink);
}

.page-home .home-history-card,
.page-home .home-subscribe-card {
  position: relative;
  display: block;
  background: var(--home-panel-white);
  border: 1px solid var(--home-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  padding: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.page-home .home-history-card:hover,
.page-home .home-subscribe-card:hover {
  box-shadow: 0 12px 28px rgba(20, 20, 20, 0.10);
  transform: translateY(-2px);
}

.page-home .home-history-card__top,
.page-home .home-subscribe-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.page-home .home-history-card__img,
.page-home .home-subscribe-card__img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin-bottom: 12px;
}

.page-home .home-history-card__desc,
.page-home .home-subscribe-card__desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 12px;
}

.page-home .home-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--signal-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-home .home-subscribe-card .btn {
  width: auto;
}

.page-home .version-sidebar {
  position: relative;
  display: block;
  min-height: 220px;
  background: var(--home-dark-panel);
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
}

.page-home .version-sidebar__img {
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.36;
  pointer-events: none;
}

.page-home .version-sidebar__content {
  position: relative;
  z-index: 1;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.page-home .version-sidebar__top {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.page-home .version-sidebar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
  flex-shrink: 0;
}

.page-home .version-sidebar__label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.64);
  height: 96px;
  line-height: 1.6;
}

.page-home .version-sidebar__version {
  font-family: var(--font-number);
  font-size: 2.2rem;
  line-height: 1;
  background: var(--grad-data);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 6px;
}

.page-home .version-sidebar__note {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.52);
}

.page-home .version-sidebar__list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.page-home .version-sidebar__list li {
  position: relative;
  padding-left: 14px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.page-home .version-sidebar__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 2px;
  background: var(--cyan);
}

.page-home .home-roster {
  background: var(--paper);
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.page-home .home-roster__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 26px;
}

.page-home .roster-entry {
  position: relative;
  background: var(--home-panel-white);
  border: 1px solid var(--home-border);
  border-radius: 8px;
  padding: 18px;
  transition: box-shadow 0.2s;
}

.page-home .roster-entry:hover {
  box-shadow: 0 12px 26px rgba(20, 20, 20, 0.08);
}

.page-home .roster-entry__detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.page-home .roster-entry__team {
  font-family: var(--font-headline);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.page-home .roster-entry__arrow {
  font-size: 1.1rem;
  color: var(--signal-blue);
}

.page-home .roster-entry__meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 10px 0 12px;
  line-height: 1.6;
}

.page-home .roster-entry__link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--signal-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-home .home-roster__foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--home-border);
}

.page-home .home-roster__stat {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.page-home .home-roster__stat strong {
  font-family: var(--font-number);
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.page-home .home-help {
  background:
    linear-gradient(180deg, var(--paper) 0%, rgba(255, 255, 255, 0.55) 55%, var(--paper) 100%),
    var(--paper);
}

.page-home .home-help__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 26px;
}

.page-home .help-card {
  position: relative;
  background: var(--home-panel-white);
  border: 1px solid var(--home-border);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.2s;
}

.page-home .help-card:hover {
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.08);
}

.page-home .help-card__q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-family: var(--font-number);
  font-size: 1rem;
  background: var(--grad-data);
  color: #ffffff;
  border-radius: 6px;
  margin-bottom: 12px;
}

.page-home .help-card__title {
  font-family: var(--font-headline);
  font-size: 1.12rem;
  color: var(--ink);
  margin: 0 0 8px;
}

.page-home .help-card__desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.page-home .help-card__link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--signal-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-home .home-help__foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--home-border);
}

.page-home .home-help__foot p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.page-home .home-help__foot a {
  color: var(--signal-blue);
  text-underline-offset: 3px;
}

@media (min-width: 640px) {
  .page-home .home-hero {
    padding-top: 36px;
  }

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

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

  .page-home .home-history-card__img,
  .page-home .home-subscribe-card__img {
    height: 160px;
  }
}

@media (min-width: 992px) {
  .page-home .home-hero__split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 36px 40px;
  }

  .page-home .home-rank-frame {
    padding: 28px 26px 0;
    margin: 36px 8px 48px 22px;
  }

  .page-home .home-hero__title {
    font-size: clamp(1.8rem, 3vh + 1rem, 2.7rem);
  }

  .page-home .home-hero__lead {
    font-size: 1rem;
  }

  .page-home .rank-item {
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    column-gap: 14px;
    row-gap: 8px;
    padding: 14px 10px;
  }

  .page-home .rank-item__num {
    font-size: 1.6rem;
  }

  .page-home .rank-item__team {
    font-size: 1.05rem;
  }

  .page-home .rank-board__scale {
    flex-basis: auto;
    height: 8px;
  }

  .page-home .home-index-col {
    gap: 20px;
  }

  .page-home .home-roster__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-home .home-roster__foot {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .page-home .home-help {
    padding-bottom: calc(var(--space-section) + 20px);
  }
}

@media (min-width: 1200px) {
  .page-home .home-history-card__img,
  .page-home .home-subscribe-card__img {
    height: 180px;
  }
}
