.page-home {
  --ph-panel: rgba(10, 7, 24, .74);
  --ph-panel-2: rgba(21, 10, 43, .68);
  --ph-grid: 42px;
  --ph-shadow: 0 18px 44px rgba(4, 2, 12, .5);
}

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

.page-home .home-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -16%;
  right: -16%;
  top: 16%;
  height: clamp(200px, 46vw, 460px);
  background:
    linear-gradient(102deg,
      rgba(255, 62, 143, .18) 0%,
      rgba(59, 240, 228, .12) 46%,
      rgba(15, 92, 74, .36) 100%);
  transform: rotate(-3.2deg);
  filter: blur(1px);
  pointer-events: none;
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -12%;
  top: 6%;
  width: clamp(220px, 40vw, 520px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(59, 240, 228, .16), transparent 68%);
  pointer-events: none;
}

.page-home .home-hero__inner {
  display: grid;
  gap: clamp(26px, 5vw, 48px);
  grid-template-columns: minmax(0, 1fr);
}

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

.page-home .home-hero__title {
  margin: clamp(14px, 2vw, 22px) 0 0;
  font-size: clamp(42px, 7.6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.page-home .home-hero__lede {
  margin: clamp(18px, 3vw, 28px) 0 0;
  max-width: 40ch;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.78;
  color: var(--text-body);
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(22px, 3.2vw, 34px);
}

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

.page-home .home-hero__figure .figure__frame {
  border-radius: var(--radius);
  clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%);
  overflow: hidden;
  border: 1px solid var(--line);
}

.page-home .home-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.page-home .home-hero__stat {
  background: var(--ph-panel);
  padding: clamp(16px, 2.4vw, 26px) clamp(14px, 2vw, 22px);
  min-width: 0;
}

.page-home .home-hero__statNum {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--glass-white);
}

.page-home .home-hero__statNum--cyan { color: var(--cyan); }
.page-home .home-hero__statNum--gold { color: var(--gold); }
.page-home .home-hero__statNum--magenta { color: var(--magenta); }

.page-home .home-hero__statLabel {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--gauze);
}

/* ---------- 出牌顺序时间轴 ---------- */
.page-home .turn-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: clamp(30px, 5vw, 62px);
  padding: clamp(26px, 3.4vw, 40px) 0;
}

.page-home .turn-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(59, 240, 228, .55) 0%,
    rgba(59, 240, 228, .18) 58%,
    rgba(243, 241, 255, .08) 100%);
}

.page-home .turn-track::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 62, 143, .6), transparent);
  animation: ph-scan 6s linear infinite;
  pointer-events: none;
}

@keyframes ph-scan {
  0%   { transform: translateX(-20%); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(860%); opacity: 0; }
}

.page-home .turn-dot {
  position: relative;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(59, 240, 228, .1);
  cursor: default;
  outline: none;
}

.page-home .turn-dot:nth-child(3n) {
  width: 8px;
  height: 8px;
  background: rgba(243, 241, 255, .55);
  box-shadow: 0 0 0 4px rgba(243, 241, 255, .05);
}

.page-home .turn-dot--live {
  width: 14px;
  height: 14px;
  background: var(--magenta);
  box-shadow: 0 0 0 6px rgba(255, 62, 143, .14), 0 0 18px rgba(255, 62, 143, .6);
}

.page-home .turn-dot > em {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--glass-white);
  background: rgba(10, 7, 24, .94);
  border: 1px solid var(--line-cyan);
  border-radius: 6px;
  padding: 5px 9px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s var(--ease), visibility .18s var(--ease);
  z-index: 4;
}

.page-home .turn-dot:hover > em,
.page-home .turn-dot:focus-visible > em {
  opacity: 1;
  visibility: visible;
}

/* ---------- 通用段落节奏 ---------- */
.page-home .home-replay,
.page-home .home-modes,
.page-home .home-metrics,
.page-home .home-reconnect,
.page-home .home-start {
  padding-block: clamp(52px, 8vw, 104px);
}

/* ---------- 回放入口 ---------- */
.page-home .home-replay__grid {
  display: grid;
  gap: clamp(26px, 4.4vw, 56px);
  grid-template-columns: minmax(0, 1fr);
}

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

.page-home .home-replay__figure .figure__frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.page-home .home-replay__paths {
  display: grid;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 34px);
  grid-template-columns: minmax(0, 1fr);
}

.page-home .path-card {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--glass-fill);
  text-decoration: none;
  color: var(--glass-white);
  transition: transform .18s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease);
}

.page-home .path-card:hover,
.page-home .path-card:focus-visible {
  transform: translateY(-3px);
  background: var(--glass-fill-hi);
  border-color: var(--line-cyan);
}

.page-home .path-card__k {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.page-home .path-card__d {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--gauze);
}

/* ---------- 两类玩法 ---------- */
.page-home .home-modes__head {
  max-width: 62ch;
}

.page-home .home-modes__grid {
  display: grid;
  gap: clamp(18px, 2.6vw, 28px);
  margin-top: clamp(26px, 4vw, 46px);
  grid-template-columns: minmax(0, 1fr);
}

.page-home .mode-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3.4vw, 40px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.page-home .mode-card--felt {
  background:
    linear-gradient(155deg, rgba(15, 92, 74, .44), rgba(10, 7, 24, .86) 64%);
  border-color: rgba(25, 211, 154, .2);
}

.page-home .mode-card--neon {
  background:
    linear-gradient(155deg, rgba(255, 62, 143, .17), rgba(59, 240, 228, .1) 48%, rgba(10, 7, 24, .88));
  border-color: var(--line-magenta);
}

.page-home .mode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(243, 241, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 241, 255, .04) 1px, transparent 1px);
  background-size: var(--ph-grid) var(--ph-grid);
  -webkit-mask-image: radial-gradient(120% 90% at 84% 0%, rgba(0, 0, 0, .95), transparent 74%);
  mask-image: radial-gradient(120% 90% at 84% 0%, rgba(0, 0, 0, .95), transparent 74%);
  pointer-events: none;
}

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

.page-home .mode-card__title {
  margin: clamp(14px, 2vw, 20px) 0 0;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--glass-white);
}

.page-home .mode-card__text {
  margin: clamp(12px, 1.6vw, 18px) 0 0;
  max-width: 40ch;
  font-size: 15px;
  line-height: 1.78;
  color: var(--text-body);
}

.page-home .mode-card__list {
  list-style: none;
  margin: clamp(16px, 2.4vw, 26px) 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-home .mode-card__list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-body);
}

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

.page-home .mode-card .btn {
  margin-top: clamp(20px, 2.6vw, 28px);
}

/* ---------- 统计摘要 ---------- */
.page-home .home-metrics__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  object-fit: cover;
}

.page-home .home-metrics__head {
  margin-top: clamp(26px, 4vw, 44px);
  max-width: 56ch;
}

.page-home .home-metrics__grid {
  display: grid;
  gap: 1px;
  margin-top: clamp(22px, 3.2vw, 34px);
  grid-template-columns: minmax(0, 1fr);
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.page-home .home-metrics__cell {
  background: var(--ph-panel-2);
  padding: clamp(20px, 2.8vw, 32px);
}

.page-home .home-metrics__value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--cyan);
}

.page-home .home-metrics__text {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.78;
  color: var(--text-body);
}

.page-home .home-metrics .rail-note {
  margin-top: clamp(18px, 2.4vw, 26px);
}

/* ---------- 断线重连 ---------- */
.page-home .home-reconnect__eyebrow {
  color: var(--orange);
}

.page-home .home-reconnect__grid {
  display: grid;
  gap: clamp(26px, 4vw, 52px);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

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

.page-home .home-reconnect__copy .prose + .prose {
  margin-top: 16px;
}

.page-home .home-reconnect__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: clamp(22px, 3vw, 32px);
}

.page-home .link-arrow {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--glass-white);
  text-decoration: none;
}

.page-home .link-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}

.page-home .link-arrow:hover::after,
.page-home .link-arrow:focus-visible::after {
  transform: scaleX(1);
}

.page-home .home-reconnect__figure .figure__frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 138, 61, .22);
}

/* ---------- 新手路径 ---------- */
.page-home .home-start__head {
  max-width: 60ch;
}

.page-home .home-start__steps {
  display: grid;
  gap: clamp(16px, 2.4vw, 22px);
  margin: clamp(26px, 4vw, 44px) 0 0;
  padding: 0;
  list-style: none;
  grid-template-columns: minmax(0, 1fr);
}

.page-home .start-step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 2.8vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(162deg, rgba(243, 241, 255, .07), rgba(243, 241, 255, .015));
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}

.page-home .start-step:hover {
  transform: translateY(-3px);
  border-color: var(--line-cyan);
}

.page-home .start-step__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--gold);
}

.page-home .start-step__title {
  margin: 12px 0 0;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.4;
  color: var(--glass-white);
}

.page-home .start-step__text {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.78;
  color: var(--text-body);
  flex: 1 1 auto;
}

.page-home .start-step__link {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  margin-top: 18px;
  padding-bottom: 3px;
  font-size: 14px;
  color: var(--cyan);
  text-decoration: none;
}

.page-home .start-step__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}

.page-home .start-step__link:hover::after,
.page-home .start-step__link:focus-visible::after {
  transform: scaleX(1);
}

.page-home .home-start__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(26px, 4vw, 42px);
  padding: clamp(20px, 2.8vw, 30px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--magenta);
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(255, 62, 143, .1), rgba(10, 7, 24, .7) 62%);
}

.page-home .home-start__asideText {
  margin: 0;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-body);
}

/* ---------- 桌面增强 ---------- */
@media (min-width: 760px) {
  .page-home .home-replay__paths {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (min-width: 920px) {
  .page-home .home-hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    grid-template-areas:
      "copy figure"
      "copy stats";
    align-items: start;
    column-gap: clamp(30px, 4.6vw, 68px);
    row-gap: clamp(22px, 3vw, 36px);
  }

  .page-home .home-hero__copy { grid-area: copy; align-self: start; }
  .page-home .home-hero__figure { grid-area: figure; margin-top: -26px; }
  .page-home .home-hero__stats { grid-area: stats; align-self: end; }

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

  .page-home .home-modes__grid {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    align-items: start;
  }

  .page-home .home-modes__grid > .mode-card:nth-child(2) {
    margin-top: clamp(30px, 5vw, 76px);
  }

  .page-home .home-reconnect__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  }
}

@media (min-width: 1180px) {
  .page-home .home-hero__inner {
    grid-template-columns: minmax(0, 1.14fr) minmax(340px, .86fr);
  }
}

/* ---------- 降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-home .turn-track::after {
    animation: none;
    opacity: 0;
  }

  .page-home .path-card,
  .page-home .start-step,
  .page-home .start-step__link::after,
  .page-home .link-arrow::after,
  .page-home .turn-dot > em {
    transition: none;
  }

  .page-home .path-card:hover,
  .page-home .start-step:hover {
    transform: none;
  }
}
