.page-home {
  --home-gap: clamp(22px, 4vw, 48px);
  --home-bar-h: 9px;
}

/* ---------- 首屏：赛事封面 ---------- */
.page-home .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 52px) clamp(18px, 3.4vw, 46px) clamp(18px, 3vw, 38px);
  background:
    radial-gradient(120% 82% at 4% 2%, rgba(232, 163, 61, .28), transparent 56%),
    radial-gradient(112% 96% at 100% 100%, rgba(28, 143, 196, .32), transparent 60%),
    var(--ink-900);
}

.page-home .hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .26;
}

.page-home .hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 21, 34, .2) 0%, rgba(14, 21, 34, .8) 64%, var(--ink-900) 100%);
}

.page-home .hero__grid {
  display: grid;
  gap: clamp(20px, 3vw, 38px);
}

.page-home .hero__title {
  margin: clamp(14px, 2vw, 22px) 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 6.4vw, 82px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--star);
}

.page-home .hero__lede {
  margin: clamp(14px, 2vw, 20px) 0 0;
  max-width: 58ch;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.78;
  color: rgba(238, 244, 250, .78);
}

.page-home .hero__board {
  padding: 16px 16px 18px;
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  background: rgba(14, 21, 34, .74);
  box-shadow: var(--shadow-card);
}

.page-home .hero__board-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--gold-soft);
}

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

.page-home .board-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  grid-template-areas:
    "rank name pts"
    "rank bar  pts";
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
  padding: 9px 0;
}

.page-home .board-item + .board-item {
  border-top: 1px solid var(--line-soft);
}

.page-home .board-item__rank {
  grid-area: rank;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(238, 244, 250, .5);
}

.page-home .board-item__name {
  grid-area: name;
  font-size: 14px;
  font-weight: 600;
  color: var(--star);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-home .board-item__pts {
  grid-area: pts;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--star);
}

.page-home .board-item__bar {
  grid-area: bar;
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(238, 244, 250, .1);
  overflow: hidden;
}

.page-home .board-item__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lake), var(--lake-deep));
}

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

.page-home .board-item--top .board-item__bar i {
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
}

/* ---------- 比分条 ---------- */
.page-home .hero__ticker {
  display: flex;
  gap: 12px;
  margin-top: clamp(20px, 3vw, 34px);
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line-gold) transparent;
}

.page-home .ticker__item {
  flex: 0 0 clamp(212px, 76%, 288px);
  scroll-snap-align: start;
  padding: 12px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(24, 34, 52, .84);
}

.page-home .ticker__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(238, 244, 250, .62);
}

.page-home .ticker__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}

.page-home .ticker__team {
  font-size: 14px;
  color: var(--star);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-home .ticker__score {
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
}

/* ---------- 斜向切割 ---------- */
.page-home .seam {
  height: clamp(30px, 5vw, 54px);
  margin-top: clamp(24px, 4vw, 52px);
  color: var(--gold);
  opacity: .2;
}

.page-home .seam svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- 第二栏：费用查询 ---------- */
.page-home .query {
  padding: clamp(24px, 4vw, 52px) clamp(18px, 3.4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(28, 143, 196, .18) 0%, rgba(14, 21, 34, .5) 48%, rgba(232, 163, 61, .14) 100%);
}

.page-home .query__grid {
  display: grid;
  gap: clamp(22px, 3.2vw, 40px);
}

.page-home .field-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin: clamp(18px, 2.6vw, 26px) 0 0;
  padding: 0;
  list-style: none;
}

.page-home .field-list__item {
  padding: 9px 8px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  background: rgba(14, 21, 34, .55);
  font-size: 13px;
  color: var(--star);
  text-align: center;
}

.page-home .query__note {
  margin: clamp(16px, 2.4vw, 22px) 0 0;
  font-size: 14px;
  line-height: 1.78;
  color: rgba(238, 244, 250, .72);
}

.page-home .query__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 3vw, 30px);
}

.page-home .query__media {
  position: relative;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
}

.page-home .query__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.page-home .query__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(200deg, rgba(232, 163, 61, .18), rgba(11, 79, 112, .42));
}

/* ---------- 双表 ---------- */
.page-home .tables {
  margin-top: clamp(34px, 5vw, 68px);
}

.page-home .tables__head,
.page-home .next__head,
.page-home .matchup__head {
  max-width: 720px;
}

.page-home .tables__grid {
  display: grid;
  gap: clamp(22px, 3vw, 34px);
  margin-top: clamp(22px, 3vw, 34px);
}

.page-home .table-block__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: clamp(17px, 2.1vw, 21px);
  font-weight: 700;
  color: var(--star);
}

.page-home .table-block__title::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--lake));
}

.page-home .table-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(238, 244, 250, .58);
}

/* ---------- 主客场速览 ---------- */
.page-home .matchup {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: clamp(34px, 5vw, 68px);
  padding: clamp(28px, 4.4vw, 56px) clamp(18px, 3.4vw, 46px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--ink-800);
}

.page-home .matchup__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .22;
}

.page-home .matchup::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 21, 34, .74), rgba(14, 21, 34, .95));
}

.page-home .matchup__inner {
  position: relative;
}

.page-home .bars {
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
  margin: clamp(22px, 3vw, 34px) 0 0;
  padding: 0;
  list-style: none;
}

.page-home .bar-row {
  display: grid;
  gap: 8px;
}

.page-home .bar-row__team {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--star);
}

.page-home .bar-row__set {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
}

.page-home .bar-row__tag {
  font-size: 12px;
  color: rgba(238, 244, 250, .58);
}

.page-home .bar-row__track {
  display: block;
  height: var(--home-bar-h);
  border-radius: 999px;
  background: rgba(238, 244, 250, .1);
  overflow: hidden;
}

.page-home .bar-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.page-home .bar-row__fill--home {
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
}

.page-home .bar-row__fill--away {
  background: linear-gradient(90deg, var(--lake), var(--lake-deep));
}

.page-home .bar-row__val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  text-align: right;
  color: var(--star);
}

.page-home .matchup__foot {
  margin: clamp(20px, 3vw, 28px) 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.78;
  color: rgba(238, 244, 250, .74);
}

/* ---------- 版本说明条 ---------- */
.page-home .version {
  margin-top: clamp(28px, 4vw, 52px);
  padding: 12px clamp(14px, 2.4vw, 26px);
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(232, 163, 61, .14), rgba(28, 143, 196, .14));
}

.page-home .version__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.page-home .version__item {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--star);
}

.page-home .version__dot {
  flex: 0 0 auto;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- 索引 ---------- */
.page-home .next {
  margin-top: clamp(34px, 5vw, 68px);
}

.page-home .index-list {
  margin: clamp(20px, 3vw, 30px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.page-home .index-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: clamp(14px, 2vw, 20px) 6px;
  border-bottom: 1px solid var(--line);
  color: var(--star);
  text-decoration: none;
  transition: background-color .2s ease, padding-left .2s ease;
}

.page-home .index-item:hover,
.page-home .index-item:focus-visible {
  background: rgba(232, 163, 61, .08);
  padding-left: 14px;
}

.page-home .index-item__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
}

.page-home .index-item__text {
  display: grid;
  gap: 4px;
}

.page-home .index-item__text strong {
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 700;
}

.page-home .index-item__text em {
  font-style: normal;
  font-size: 13.5px;
  line-height: 1.68;
  color: rgba(238, 244, 250, .66);
}

.page-home .index-item__arrow {
  font-size: 18px;
  text-align: right;
  color: var(--gold);
}

/* ---------- 天山长幅 ---------- */
.page-home .ridge {
  margin: clamp(36px, 5vw, 64px) 0 0;
}

.page-home .ridge img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 40%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 40%, #000 100%);
}

/* ---------- 响应式 ---------- */
@media (min-width: 700px) {
  .page-home .bar-row {
    grid-template-columns: minmax(120px, 168px) minmax(0, 1fr);
    grid-template-areas:
      "team homeset"
      "team awayset";
    align-items: center;
    column-gap: 18px;
  }

  .page-home .bar-row__team {
    grid-area: team;
  }

  .page-home .bar-row__set:first-of-type {
    grid-area: homeset;
  }

  .page-home .bar-row__set:last-of-type {
    grid-area: awayset;
  }
}

@media (min-width: 900px) {
  .page-home .query__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr);
    align-items: center;
  }
}

@media (min-width: 960px) {
  .page-home .hero__grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(276px, .78fr);
    align-items: start;
  }
}

@media (min-width: 1024px) {
  .page-home .hero__ticker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .page-home .ticker__item {
    flex: none;
  }
}

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

@media (max-width: 560px) {
  .page-home .version__dot {
    display: none;
  }

  .page-home .index-item {
    grid-template-columns: 28px minmax(0, 1fr) 20px;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .index-item {
    transition: none;
  }
}
