.page-home {
  --home-grid-line: rgba(38, 48, 43, 0.9);
  --home-glow: rgba(200, 241, 60, 0.16);
  background: var(--ink);
  color: var(--text);
}

/* ---------- 通用页面节奏 ---------- */
.page-home .band {
  padding: clamp(48px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--line);
}

.page-home .band--pool,
.page-home .band--rules {
  background: var(--panel);
}

.page-home .band-lead {
  max-width: 58ch;
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.75;
}

.page-home .band-more {
  margin: 28px 0 0;
}

.page-home .link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 241, 60, 0.4);
  padding-bottom: 2px;
}

.page-home .link-arrow::after {
  content: "→";
}

.page-home .link-arrow:hover,
.page-home .link-arrow:focus-visible {
  border-bottom-color: var(--accent);
}

.page-home .btn--gold {
  background: linear-gradient(135deg, var(--gold-a), var(--gold-b));
  color: #1a1204;
  border: 1px solid rgba(246, 210, 107, 0.6);
  font-weight: 700;
}

/* ---------- 框景首屏 ---------- */
.page-home .hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: clamp(28px, 5vw, 56px) 0 clamp(40px, 7vw, 80px);
}

.page-home .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: saturate(0.65);
  z-index: 0;
}

.page-home .hero-scan {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--home-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--home-grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(120% 85% at 72% 18%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 85% at 72% 18%, #000 0%, transparent 72%);
}

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

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

.page-home .hero-inner {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 20, 19, 0.72), rgba(6, 20, 15, 0.94));
  padding: clamp(24px, 4vw, 48px);
}

.page-home .hero-inner::before,
.page-home .hero-inner::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--accent);
  opacity: 0.75;
}

.page-home .hero-inner::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.page-home .hero-inner::after {
  right: -1px;
  bottom: -1px;
  border-top: 0;
  border-left: 0;
}

.page-home .hero-copy {
  max-width: 30ch;
}

.page-home .hero h1 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 6.4vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--head);
}

.page-home .hero-lead {
  margin: 20px 0 0;
  max-width: 42ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}

.page-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-home .hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(28px, 5vw, 44px) 0 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.page-home .hero-stat {
  background: var(--panel-deep);
  padding: 16px 14px 18px;
}

.page-home .hero-stat dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.page-home .hero-stat dd {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.page-home .hero-stat dd small {
  margin-left: 5px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* ---------- 滚动公告 ---------- */
.page-home .ticker {
  display: flex;
  align-items: stretch;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.page-home .ticker-tag {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.page-home .ticker-view {
  flex: 1;
  overflow: hidden;
  padding: 12px 0;
}

.page-home .ticker-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  width: max-content;
  animation: home-marquee 60s linear infinite;
}

.page-home .ticker-track p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.page-home .ticker:hover .ticker-track,
.page-home .ticker:focus-within .ticker-track {
  animation-play-state: paused;
}

@keyframes home-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 开奖时间轴 ---------- */
.page-home .timeline {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.page-home .tl-node {
  position: relative;
  flex: 1 0 172px;
  padding: 26px 18px 24px;
  border-right: 1px solid var(--line);
}

.page-home .tl-node:last-child {
  border-right: 0;
}

.page-home .tl-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--home-glow);
}

.page-home .tl-node.is-next .tl-dot {
  background: transparent;
  border: 1px solid var(--line);
  box-shadow: none;
}

.page-home .tl-state {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.page-home .tl-node.is-next .tl-state {
  color: var(--accent-2);
}

.page-home .tl-label {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--head);
}

.page-home .tl-note {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-faint);
}

.page-home .tl-figure {
  margin: 32px 0 0;
  border: 1px solid var(--line);
  aspect-ratio: 3 / 1;
  overflow: hidden;
  background: var(--panel-deep);
}

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

/* ---------- 奖池与号码矩阵 ---------- */
.page-home .pool-grid {
  display: grid;
  gap: var(--gap);
}

.page-home .pool-panel {
  border: 1px solid rgba(246, 210, 107, 0.28);
  background: var(--panel-deep);
  padding: clamp(22px, 3vw, 32px);
  position: relative;
  overflow: hidden;
}

.page-home .pool-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-a), var(--gold-b));
}

.page-home .pool-panel h2 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vw, 28px);
  letter-spacing: -0.01em;
  color: var(--head);
}

.page-home .pool-figure {
  margin: 22px 0 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  line-height: 0.9;
}

.page-home .pool-figure .num {
  font-size: clamp(62px, 14vw, 124px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-a), var(--gold-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(246, 210, 107, 0.24));
  font-variant-numeric: tabular-nums;
}

.page-home .pool-unit {
  font-size: 16px;
  letter-spacing: 0.12em;
  color: rgba(246, 210, 107, 0.7);
}

.page-home .pool-note {
  margin: 18px 0 0;
  max-width: 40ch;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
}

.page-home .pool-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 64px;
  margin: 24px 0 0;
}

.page-home .pool-bars span {
  flex: 1;
  min-height: 4px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--gold-a), rgba(176, 124, 42, 0.3));
}

.page-home .pool-bars span:nth-child(1) { height: 28%; }
.page-home .pool-bars span:nth-child(2) { height: 35%; }
.page-home .pool-bars span:nth-child(3) { height: 31%; }
.page-home .pool-bars span:nth-child(4) { height: 44%; }
.page-home .pool-bars span:nth-child(5) { height: 39%; }
.page-home .pool-bars span:nth-child(6) { height: 52%; }
.page-home .pool-bars span:nth-child(7) { height: 47%; }
.page-home .pool-bars span:nth-child(8) { height: 41%; }
.page-home .pool-bars span:nth-child(9) { height: 56%; }
.page-home .pool-bars span:nth-child(10) { height: 61%; }
.page-home .pool-bars span:nth-child(11) { height: 49%; }
.page-home .pool-bars span:nth-child(12) { height: 58%; }
.page-home .pool-bars span:nth-child(13) { height: 66%; }
.page-home .pool-bars span:nth-child(14) { height: 54%; }
.page-home .pool-bars span:nth-child(15) { height: 62%; }
.page-home .pool-bars span:nth-child(16) { height: 71%; }
.page-home .pool-bars span:nth-child(17) { height: 64%; }
.page-home .pool-bars span:nth-child(18) { height: 58%; }
.page-home .pool-bars span:nth-child(19) { height: 74%; }
.page-home .pool-bars span:nth-child(20) { height: 69%; }
.page-home .pool-bars span:nth-child(21) { height: 78%; }
.page-home .pool-bars span:nth-child(22) { height: 72%; }
.page-home .pool-bars span:nth-child(23) { height: 66%; }
.page-home .pool-bars span:nth-child(24) { height: 81%; }
.page-home .pool-bars span:nth-child(25) { height: 76%; }
.page-home .pool-bars span:nth-child(26) { height: 88%; }
.page-home .pool-bars span:nth-child(27) { height: 83%; }
.page-home .pool-bars span:nth-child(28) { height: 92%; }
.page-home .pool-bars span:nth-child(29) { height: 87%; }
.page-home .pool-bars span:nth-child(30) { height: 100%; }

.page-home .pool-panel .btn {
  margin-top: 28px;
}

.page-home .matrix-panel {
  border: 1px solid var(--line);
  background: var(--panel-deep);
  padding: clamp(20px, 3vw, 30px);
}

.page-home .matrix-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.page-home .matrix-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vw, 28px);
  letter-spacing: -0.01em;
  color: var(--head);
}

.page-home .matrix-legend {
  display: flex;
  gap: 8px;
  margin: 0;
}

.page-home .balls {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}

.page-home .ball {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(38, 48, 43, 0.28);
  font-family: var(--font-mono);
  font-size: clamp(10px, 2.6vw, 15px);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.page-home .ball--hot {
  background: rgba(255, 74, 90, 0.16);
  border-color: rgba(255, 74, 90, 0.5);
  color: #ffd7dc;
}

.page-home .ball--cold {
  background: rgba(46, 125, 255, 0.16);
  border-color: rgba(46, 125, 255, 0.5);
  color: #d3e3ff;
}

.page-home .ball:hover,
.page-home .ball:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--head);
}

.page-home .heat-figure {
  margin: 26px 0 0;
}

.page-home .heat-figure img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border: 1px solid var(--line);
  background: var(--panel);
}

.page-home .heat-figure figcaption,
.page-home .pitch-figure figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-faint);
}

/* ---------- 球队数据 ---------- */
.page-home .teams-grid {
  display: grid;
  gap: var(--gap);
}

.page-home .teams-intro h2,
.page-home .rules-intro h2,
.page-home .closing-col h2 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 4.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--head);
}

.page-home .teams-intro p {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
}

.page-home .metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.page-home .metric {
  background: var(--panel-deep);
  padding: 20px 18px 22px;
}

.page-home .metric-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.page-home .metric-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--head);
}

.page-home .metric-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.page-home .metric-bar {
  display: block;
  width: 100%;
  height: 8px;
  margin: 14px 0 0;
}

.page-home .metric-track {
  fill: rgba(38, 48, 43, 0.9);
}

.page-home .metric:nth-child(1) .metric-fill { fill: var(--accent); width: 196px; }
.page-home .metric:nth-child(2) .metric-fill { fill: var(--accent-2); width: 152px; }
.page-home .metric:nth-child(3) .metric-fill { fill: var(--cold); width: 118px; }

.page-home .metric p {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
}

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

.page-home .pitch-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: var(--panel-deep);
}

/* ---------- 规则分层 ---------- */
.page-home .rules-grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
}

.page-home .rules-intro p {
  margin: 16px 0 24px;
  max-width: 42ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
}

.page-home .rule-tree {
  list-style: none;
  margin: 0;
  padding: 0 0 0 30px;
  position: relative;
}

.page-home .rule-tree::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: var(--line);
}

.page-home .rule-node {
  position: relative;
  border-top: 1px solid var(--line);
}

.page-home .rule-node:last-child {
  border-bottom: 1px solid var(--line);
}

.page-home .rule-node::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 26px;
  width: 14px;
  height: 1px;
  background: var(--accent);
}

.page-home .rule-node summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  color: var(--head);
}

.page-home .rule-node summary::-webkit-details-marker {
  display: none;
}

.page-home .rule-idx {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.page-home .rule-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-home .rule-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.page-home .rule-node summary:hover .rule-name,
.page-home .rule-node summary:focus-visible .rule-name {
  color: var(--accent);
}

.page-home .rule-node p {
  margin: 0 0 20px;
  max-width: 60ch;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
}

.page-home .rule-node details[open] summary {
  padding-bottom: 10px;
}

/* ---------- 页尾两栏 ---------- */
.page-home .band--closing {
  border-bottom: 0;
}

.page-home .closing-grid {
  display: grid;
  gap: clamp(32px, 5vw, 64px);
}

.page-home .closing-col p {
  margin: 16px 0 0;
  max-width: 48ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
}

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

.page-home .closing-col .btn {
  margin-top: 26px;
}

.page-home .closing-col .closing-actions .btn {
  margin-top: 0;
}

/* ---------- 响应式 ---------- */
@media (min-width: 768px) {
  .page-home .balls {
    gap: 8px;
  }

  .page-home .teams-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .page-home .teams-intro {
    grid-column: 1 / 6;
    grid-row: 1;
  }

  .page-home .metrics {
    grid-column: 6 / 13;
    grid-row: 1 / span 2;
  }

  .page-home .pitch-figure {
    grid-column: 1 / 6;
    grid-row: 2;
  }

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

@media (min-width: 1024px) {
  .page-home .pool-grid {
    grid-template-columns: minmax(300px, 4fr) minmax(0, 8fr);
    align-items: start;
  }

  .page-home .rules-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: start;
  }

  .page-home .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 200px));
  }
}

@media (max-width: 600px) {
  .page-home .hero-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-home .tl-node {
    flex: 0 0 156px;
    padding: 22px 14px 20px;
  }

  .page-home .heat-figure img {
    max-width: 100%;
  }
}

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

  .page-home .ball {
    transition: none;
  }
}
