.page-home {
  position: relative;
  overflow-x: clip;
}

.page-home img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ============ 首屏 ============ */
.page-home .hero-home {
  position: relative;
  isolation: isolate;
  padding: clamp(20px, 4vw, 48px) 0 clamp(40px, 7vw, 88px);
  overflow: hidden;
}

.page-home .hero-home::before {
  content: "";
  position: absolute;
  top: -32%;
  right: -22%;
  width: min(880px, 96vw);
  height: min(880px, 96vw);
  background:
    radial-gradient(circle at 50% 50%,
      rgba(255, 45, 138, 0.34) 0%,
      rgba(106, 43, 255, 0.20) 38%,
      rgba(35, 213, 232, 0.12) 58%,
      rgba(8, 9, 15, 0) 72%);
  pointer-events: none;
  z-index: -1;
  animation: home-breathe 6s var(--ease) infinite;
}

@keyframes home-breathe {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 0.9; }
}

.page-home .hero-grid {
  position: relative;
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.page-home .eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin: 0;
  text-transform: none;
}

.page-home .hero-title {
  margin: var(--sp-4) 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 62px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0 22px rgba(255, 45, 138, 0.26), 0 0 36px rgba(35, 213, 232, 0.14);
}

.page-home .hero-lead {
  margin: var(--sp-5) 0 0;
  max-width: 38em;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.8;
  color: var(--muted);
}

.page-home .hero-actions {
  margin-top: clamp(24px, 4vw, 36px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-home .hero-visual {
  position: relative;
}

.page-home .hero-visual .media-frame {
  aspect-ratio: 4 / 3;
}

.page-home .hero-ghost {
  position: absolute;
  right: -4px;
  bottom: -20px;
  font-size: clamp(34px, 8vw, 76px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(242, 244, 255, 0.05);
  -webkit-text-stroke: 1px rgba(255, 45, 138, 0.30);
  pointer-events: none;
  user-select: none;
}

/* 数据条 */
.page-home .hero-stats {
  margin-top: clamp(36px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-home .hero-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: linear-gradient(150deg, rgba(27, 30, 46, 0.86), rgba(18, 20, 32, 0.6));
}

.page-home .hero-stats .stat-value {
  font-size: clamp(20px, 2.8vw, 28px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

.page-home .hero-stats .stat:nth-child(1) .stat-value { color: var(--magenta); }
.page-home .hero-stats .stat:nth-child(2) .stat-value { color: var(--cyan); }
.page-home .hero-stats .stat:nth-child(3) .stat-value { color: var(--gold); }

.page-home .hero-stats .stat-label {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* 章节预览 */
.page-home .chapter-preview {
  margin-top: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-home .chapter-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: linear-gradient(160deg, rgba(27, 30, 46, 0.9), rgba(18, 20, 32, 0.68));
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.page-home .chapter-tile .tile-num {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.page-home .chapter-tile .tile-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-home .chapter-tile .tile-hint {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.page-home .chapter-tile:hover,
.page-home .chapter-tile:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 45, 138, 0.55);
  box-shadow: var(--shadow-lift);
}

.page-home .chapter-tile:hover .tile-hint,
.page-home .chapter-tile:focus-visible .tile-hint {
  max-height: 48px;
  opacity: 1;
}

/* ============ 主体分屏 ============ */
.page-home .page-body {
  position: relative;
  display: grid;
  gap: clamp(16px, 3vw, 40px);
  padding-bottom: clamp(56px, 9vw, 120px);
}

.page-home .index-rail {
  position: sticky;
  top: var(--header-space);
  z-index: 6;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  background: linear-gradient(180deg, rgba(8, 9, 15, 0.96), rgba(8, 9, 15, 0.68));
  backdrop-filter: blur(10px);
  scrollbar-width: none;
}

.page-home .index-rail::-webkit-scrollbar { display: none; }

.page-home .index-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.page-home .index-link .index-num {
  font-size: 12px;
  color: var(--cyan);
}

.page-home .index-link:hover {
  color: var(--ink);
  border-color: rgba(35, 213, 232, 0.5);
}

.page-home .index-link[aria-current="true"] {
  color: var(--ink);
  border-color: rgba(255, 45, 138, 0.6);
  background: rgba(255, 45, 138, 0.14);
  box-shadow: var(--glow-magenta);
}

/* ============ 章节 ============ */
.page-home .chapter {
  position: relative;
  padding: clamp(44px, 7vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.page-home .chapter:first-child {
  border-top: none;
  padding-top: clamp(16px, 4vw, 40px);
}

.page-home .chapter-ghost {
  position: absolute;
  top: clamp(24px, 4vw, 56px);
  right: 0;
  font-size: clamp(52px, 10vw, 96px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(242, 244, 255, 0.06);
  pointer-events: none;
  user-select: none;
}

.page-home .chapter-head {
  position: relative;
  max-width: 60ch;
}

.page-home .section-title {
  margin: var(--sp-3) 0 0;
  font-family: var(--font-display);
  font-size: clamp(23px, 3.2vw, 34px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(255, 45, 138, 0.18);
}

.page-home .section-lead {
  margin: var(--sp-4) 0 0;
  max-width: 44em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .media-frame {
  margin: 0;
  border-radius: var(--r-frame);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(27, 30, 46, 0.8), rgba(8, 9, 15, 0.9));
}

.page-home .play-figure {
  margin-top: clamp(24px, 4vw, 40px);
  aspect-ratio: 14 / 9;
}

.page-home .play-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 三类玩法卡 */
.page-home .play-grid {
  margin-top: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 16px;
}

.page-home .play-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: linear-gradient(160deg, rgba(27, 30, 46, 0.9), rgba(18, 20, 32, 0.72));
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.page-home .play-card:hover,
.page-home .play-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 45, 138, 0.5);
  box-shadow: var(--shadow-lift);
}

.page-home .play-card .chip {
  align-self: flex-start;
}

.page-home .play-card .card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-home .play-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

.page-home .play-meta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--cyan);
  transition: color var(--dur) var(--ease);
}

.page-home .play-card:hover .play-meta {
  color: var(--gold);
}

/* 榜单 */
.page-home .rank-split {
  margin-top: clamp(24px, 4vw, 40px);
  display: grid;
  gap: clamp(20px, 3vw, 32px);
}

.page-home .rank-list {
  display: grid;
  gap: 12px;
}

.page-home .rank-card {
  position: relative;
  padding: 22px 22px 22px 76px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: linear-gradient(140deg, rgba(27, 30, 46, 0.88), rgba(18, 20, 32, 0.66));
}

.page-home .rank-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.page-home .rank-card p {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.page-home .rank-badge {
  position: absolute;
  left: 20px;
  top: 22px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 700;
  color: var(--night);
}

.page-home .rank-card--first { border-color: rgba(255, 196, 107, 0.42); }
.page-home .rank-card--first .rank-badge { background: var(--grad-magenta); color: var(--ink); }
.page-home .rank-card--second .rank-badge { background: rgba(35, 213, 232, 0.9); }
.page-home .rank-card--third .rank-badge { background: rgba(255, 196, 107, 0.9); }

.page-home .rank-figure {
  aspect-ratio: 4 / 3;
}

.page-home .rank-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .metric-row {
  margin-top: clamp(20px, 3vw, 32px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .chapter-foot {
  margin-top: clamp(20px, 3vw, 28px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.page-home .foot-note {
  font-size: 13px;
  color: var(--muted);
}

/* 三步上手 */
.page-home .start-steps {
  margin: clamp(24px, 4vw, 40px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.page-home .start-step {
  position: relative;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: linear-gradient(180deg, rgba(18, 20, 32, 0.9), rgba(8, 9, 15, 0.72));
}

.page-home .start-step::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--grad-hair);
  opacity: 0.7;
}

.page-home .step-num {
  display: block;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: rgba(35, 213, 232, 0.85);
}

.page-home .start-step h3 {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.page-home .start-step p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

/* 桌号与积分 */
.page-home .table-split {
  margin-top: clamp(24px, 4vw, 40px);
  display: grid;
  gap: clamp(20px, 3vw, 36px);
}

.page-home .table-figure {
  aspect-ratio: 3 / 2;
}

.page-home .table-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-home .num-rail {
  display: grid;
  gap: 10px;
}

.page-home .num-seg {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: linear-gradient(100deg, rgba(27, 30, 46, 0.9), rgba(18, 20, 32, 0.6));
  border-left-width: 3px;
}

.page-home .num-seg--magenta { border-left-color: var(--magenta); }
.page-home .num-seg--cyan { border-left-color: var(--cyan); }
.page-home .num-seg--gold { border-left-color: var(--gold); }

.page-home .num-range {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.page-home .num-name {
  font-size: 14px;
  color: var(--ink);
}

.page-home .num-count {
  font-size: 12.5px;
  color: var(--muted);
}

.page-home .table-note {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.page-home .link-arrow {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 213, 232, 0.45);
  padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.page-home .link-arrow:hover {
  color: var(--gold);
  border-color: rgba(255, 196, 107, 0.6);
}

/* 手风琴 */
.page-home .accordion {
  margin-top: clamp(24px, 4vw, 40px);
  display: grid;
  gap: 10px;
}

.page-home .accordion-item {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: linear-gradient(160deg, rgba(27, 30, 46, 0.86), rgba(18, 20, 32, 0.62));
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}

.page-home .accordion-item:hover {
  border-color: rgba(35, 213, 232, 0.4);
}

.page-home .accordion-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 20px 54px 20px 22px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}

.page-home .accordion-trigger::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--magenta);
}

.page-home .accordion-trigger[aria-expanded="true"]::after {
  content: "–";
  color: var(--cyan);
}

.page-home .accordion-panel {
  padding: 0 22px 22px;
}

.page-home .accordion-panel:not(:last-child) {
  border-bottom: 1px solid transparent;
}

.page-home .accordion-panel p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

/* 收尾 */
.page-home .home-cta {
  border-top: 1px solid var(--line);
}

.page-home .cta-band {
  position: relative;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(255, 45, 138, 0.28);
  border-radius: var(--r-frame);
  background:
    radial-gradient(120% 140% at 88% 0%, rgba(255, 45, 138, 0.20) 0%, rgba(35, 213, 232, 0.10) 46%, rgba(18, 20, 32, 0.9) 76%),
    linear-gradient(160deg, rgba(27, 30, 46, 0.9), rgba(8, 9, 15, 0.92));
  display: grid;
  gap: 24px;
}

.page-home .cta-copy p {
  margin: var(--sp-4) 0 0;
  max-width: 46em;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ 响应式 ============ */
@media (min-width: 760px) {
  .page-home .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .page-home .cta-band {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 900px) {
  .page-home .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .page-home .rank-split {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .page-home .table-split {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
  }
}

@media (min-width: 1000px) {
  .page-home .page-body {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
  }

  .page-home .index-rail {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    overflow: visible;
    margin-inline: 0;
    padding: 0;
    background: none;
    backdrop-filter: none;
    top: calc(var(--header-space) + 20px);
  }

  .page-home .index-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 0 10px 12px;
    border: none;
    border-left: 2px solid var(--line);
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--muted);
  }

  .page-home .index-link .index-num {
    font-size: 13px;
  }

  .page-home .index-link:hover {
    border-left-color: rgba(35, 213, 232, 0.6);
  }

  .page-home .index-link[aria-current="true"] {
    border-left-color: var(--magenta);
    background: linear-gradient(90deg, rgba(255, 45, 138, 0.18), rgba(255, 45, 138, 0));
    box-shadow: none;
  }

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

@media (min-width: 1240px) {
  .page-home .rank-list {
    gap: 14px;
  }
}

@media (hover: none) {
  .page-home .chapter-tile .tile-hint {
    max-height: 48px;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero-home::before {
    animation: none;
  }

  .page-home .chapter-tile,
  .page-home .play-card,
  .page-home .play-meta {
    transition: none;
  }
}
