.page-home {
  position: relative;
  padding-bottom: 88px;
  color: var(--text);
  overflow-x: hidden;
}

@media (min-width: 960px) {
  .page-home {
    padding-bottom: 120px;
  }
}

/* ---------- 页面上下文条 ---------- */
.page-home .home-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 22px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: .01em;
}

.page-home .home-context__div {
  width: 1px;
  height: 13px;
  background: var(--line);
}

/* ---------- 首屏 ---------- */
.page-home .home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  padding-top: 30px;
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  top: -50px;
  left: -24px;
  right: -24px;
  height: 460px;
  background-image:
    repeating-linear-gradient(90deg, rgba(21, 34, 56, .9) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(21, 34, 56, .9) 0 1px, transparent 1px 88px);
  -webkit-mask-image: radial-gradient(120% 100% at 22% 0%, #000 0%, transparent 76%);
  mask-image: radial-gradient(120% 100% at 22% 0%, #000 0%, transparent 76%);
  pointer-events: none;
  z-index: 0;
}

.page-home .home-hero > * {
  position: relative;
  z-index: 1;
}

.page-home .home-hero__main {
  min-width: 0;
}

.page-home .home-hero__title {
  margin: 12px 0 0;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.9rem, 6vw, 3.05rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--title);
}

.page-home .home-hero__lede {
  margin: 16px 0 24px;
  max-width: 33em;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.page-home .home-hero__act {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.page-home .home-hero__rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* ---------- 联赛切换 ---------- */
.page-home .league-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.page-home .league-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.page-home .league-switch__label {
  margin-right: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

.page-home .league-switch__tab {
  padding: 6px 15px;
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast);
}

.page-home .league-switch__tab:hover {
  border-color: var(--cyan-soft);
  color: var(--cyan-soft);
}

.page-home #lg-csl:checked ~ .league-switch label[for="lg-csl"],
.page-home #lg-cba:checked ~ .league-switch label[for="lg-cba"] {
  border-color: var(--cyan);
  background: rgba(43, 232, 210, .1);
  color: var(--cyan);
}

.page-home #lg-csl:focus-visible ~ .league-switch label[for="lg-csl"],
.page-home #lg-cba:focus-visible ~ .league-switch label[for="lg-cba"] {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------- 榜单 ---------- */
.page-home .board {
  display: none;
}

.page-home #lg-csl:checked ~ .board--csl,
.page-home #lg-cba:checked ~ .board--cba {
  display: block;
}

.page-home .board__viewport {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 84%, transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 84%, transparent 100%);
}

.page-home .board__track {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 2px 2px 14px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.page-home .board__track::-webkit-scrollbar {
  height: 4px;
}

.page-home .board__track::-webkit-scrollbar-thumb {
  background: var(--line);
}

.page-home .board__row {
  flex: 0 0 auto;
  width: 168px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 15px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.page-home .board__row:hover {
  border-color: var(--cyan);
  background: rgba(43, 232, 210, .05);
}

.page-home .board__rank {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
}

.page-home .board__name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--title);
}

.page-home .board__val {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--cyan);
}

.page-home .board__detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  transition: max-height var(--t-med), opacity var(--t-med), margin-top var(--t-med);
}

.page-home .board__row:hover .board__detail,
.page-home .board__row:focus-within .board__detail {
  max-height: 3.4em;
  opacity: 1;
  margin-top: 4px;
}

.page-home .board__foot {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 右侧控制带 ---------- */
.page-home .rail-block {
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  background: var(--panel);
}

.page-home .rail-block__k {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

.page-home .rail-block__v {
  margin: 6px 0 6px;
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 7vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--title);
}

.page-home .rail-block__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.page-home .spark {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 54px;
  margin-top: 16px;
}

.page-home .spark span {
  flex: 1 1 0;
  min-width: 0;
  height: 38%;
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(43, 232, 210, .12) 100%);
}

.page-home .spark span:nth-child(1) { height: 32%; }
.page-home .spark span:nth-child(2) { height: 48%; }
.page-home .spark span:nth-child(3) { height: 41%; }
.page-home .spark span:nth-child(4) { height: 62%; }
.page-home .spark span:nth-child(5) { height: 55%; }
.page-home .spark span:nth-child(6) { height: 73%; }
.page-home .spark span:nth-child(7) { height: 68%; }
.page-home .spark span:nth-child(8) { height: 88%; background: linear-gradient(180deg, var(--orange) 0%, rgba(255, 122, 47, .14) 100%); }

.page-home .rail-block__sparkcap {
  margin: 8px 0 0;
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--muted);
}

.page-home .home-rail-figure {
  margin: 0;
}

/* ---------- 通用区块 ---------- */
.page-home .home-sec {
  margin-top: 68px;
  padding-top: 38px;
  border-top: 1px solid var(--grid);
}

.page-home .home-sec__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  margin-top: 26px;
}

.page-home .home-sec__figure {
  margin: 0;
}

.page-home .home-sec__figure .figure__media {
  aspect-ratio: 16 / 9;
}

.page-home .home-sec__figure .figure__media--portrait {
  aspect-ratio: 4 / 5;
}

.page-home .home-sec__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-home .home-sec__body {
  min-width: 0;
}

.page-home .home-sec__meta {
  margin: 20px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--grid);
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .home-sec__act {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- 统计值 ---------- */
.page-home .home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 22px;
  background: var(--grid);
  border: 1px solid var(--grid);
}

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

.page-home .home-stats .stat {
  padding: 15px 13px 17px;
  background: var(--bg);
}

.page-home .home-stats .stat__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.55rem, 5.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--cyan);
}

.page-home .home-stats .stat__label {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--muted);
}

/* ---------- 要点列表 ---------- */
.page-home .home-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 13px;
}

.page-home .home-bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.78;
  color: var(--text);
}

.page-home .home-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 9px;
  height: 1px;
  background: var(--cyan);
}

.page-home .home-bullets b {
  color: var(--title);
  font-weight: 700;
}

/* ---------- 刷新节奏 ---------- */
.page-home .cadence-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;
  background: var(--grid);
  border: 1px solid var(--grid);
}

.page-home .cadence-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-areas:
    "t h"
    "t p";
  gap: 6px 18px;
  align-items: start;
  padding: 20px 18px 22px;
  background: var(--panel);
}

.page-home .cadence-item__t {
  grid-area: t;
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--cyan);
}

.page-home .cadence-item__t em {
  font-style: normal;
  font-size: .5em;
  letter-spacing: 0;
  color: var(--muted);
}

.page-home .cadence-item__h {
  grid-area: h;
  margin: 0;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--title);
}

.page-home .cadence-item__p {
  grid-area: p;
  margin: 0;
  max-width: 36em;
  font-size: 14px;
  line-height: 1.78;
  color: var(--muted);
}

/* ---------- 安装步骤 ---------- */
.page-home .steps {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 22px;
}

.page-home .steps__item {
  position: relative;
  padding-left: 50px;
}

.page-home .steps__n {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--cyan);
}

.page-home .steps__h {
  margin: 4px 0 6px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--title);
}

.page-home .steps__p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--text);
}

/* ---------- 求助路径 ---------- */
.page-home .help-links {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.page-home .help-link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "k a"
    "t a";
  gap: 4px 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  background: var(--panel);
  text-decoration: none;
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.page-home .help-link:hover,
.page-home .help-link:focus-visible {
  border-color: var(--cyan);
  border-left-color: var(--orange);
  background: rgba(43, 232, 210, .05);
}

.page-home .help-link__k {
  grid-area: k;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

.page-home .help-link__t {
  grid-area: t;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--title);
}

.page-home .help-link__a {
  grid-area: a;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--cyan);
  white-space: nowrap;
}

.page-home .home-help__line {
  margin: 22px 0 0;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- 抽屉内容 ---------- */
.page-home .drawer-note {
  margin: 10px 0 16px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.page-home .drawer-list {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.page-home .drawer-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--text);
}

.page-home .drawer-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .8em;
  width: 8px;
  height: 1px;
  background: var(--orange);
}

/* ---------- 桌面布局 ---------- */
@media (min-width: 960px) {
  .page-home .home-hero {
    grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
    gap: 46px;
    padding-top: 42px;
  }

  .page-home .home-hero::before {
    height: 560px;
  }

  .page-home .home-hero__rail {
    padding-top: 6px;
  }

  .page-home .board__row {
    width: 182px;
  }

  .page-home .home-sec {
    margin-top: 96px;
    padding-top: 50px;
  }

  .page-home .home-sec__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 42px;
    margin-top: 34px;
  }

  .page-home .home-sec__grid--flip > .home-sec__figure {
    order: 2;
  }

  .page-home .cadence-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .cadence-item {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "t"
      "h"
      "p";
    gap: 8px;
    padding: 26px 22px 28px;
  }

  .page-home .cadence-item__t {
    font-size: 2.1rem;
  }

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

@media (min-width: 1280px) {
  .page-home .board__row {
    width: 196px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .board__row,
  .page-home .board__detail,
  .page-home .league-switch__tab,
  .page-home .help-link {
    transition: none;
  }
}
