.page-home {
  --hm-gap: clamp(16px, 2.2vw, 28px);
  overflow-x: hidden;
}

.page-home [id] {
  scroll-margin-top: 96px;
}

/* ---------- 上下文条 ---------- */
.page-home .hm-context {
  background: var(--navy-700);
  color: var(--foam);
  border-bottom: 1px solid var(--hair-strong);
  font-size: 12px;
  line-height: 1.5;
}

.page-home .hm-context__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 9px;
}

.page-home .hm-context__crumb {
  color: var(--foam);
  letter-spacing: 0.04em;
}

.page-home .hm-context__sep {
  color: var(--mist);
}

.page-home .hm-context__here {
  color: var(--coral);
  letter-spacing: 0.04em;
}

.page-home .hm-context__tag {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

/* ---------- 首屏 ---------- */
.page-home .hm-hero {
  position: relative;
  overflow: hidden;
  background: var(--foam);
  border-bottom: 1px solid var(--hair-strong);
}

.page-home .hm-hero__chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.09;
  pointer-events: none;
  filter: grayscale(1) contrast(1.15);
}

.page-home .hm-hero__frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(26px, 4vw, 54px);
}

.page-home .hm-rail {
  background: var(--navy-900);
  border: 1px solid var(--hair-strong);
  padding: 16px 14px 18px;
  color: var(--foam);
}

.page-home .hm-rail__head {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--mist);
}

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

.page-home .hm-rail__list li {
  border-top: 1px solid var(--hair-light);
}

.page-home .hm-rail__list li:first-child {
  border-top: 0;
}

.page-home .hm-rail__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 6px 8px 10px;
  border-left: 2px solid transparent;
  color: var(--foam);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: border-left-color 0.24s var(--ease), background-color 0.24s var(--ease), color 0.24s var(--ease);
}

.page-home .hm-rail__link:hover,
.page-home .hm-rail__link:focus-visible {
  border-left-color: var(--coral);
  background-color: rgba(255, 107, 74, 0.12);
  color: #ffffff;
}

.page-home .hm-rail__link:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.page-home .hm-rail__idx {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
  transition: color 0.24s var(--ease);
}

.page-home .hm-rail__link:hover .hm-rail__idx,
.page-home .hm-rail__link:focus-visible .hm-rail__idx {
  color: var(--coral);
}

.page-home .hm-rail__foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--hair-light);
  font-size: 12px;
  line-height: 1.7;
  color: var(--mist);
}

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

.page-home .hm-display {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: clamp(2rem, 5.4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.page-home .hm-hero__lede {
  margin: 18px 0 0;
  max-width: 58ch;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.85;
  color: var(--salt);
}

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

.page-home .hm-scenes {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--hair-strong);
  border: 1px solid var(--hair-strong);
}

.page-home .hm-scene {
  background: var(--foam);
  min-width: 0;
}

.page-home .hm-scene__link {
  display: block;
  height: 100%;
  padding: 14px 14px 16px;
  border-top: 2px solid transparent;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.24s var(--ease), border-top-color 0.24s var(--ease);
}

.page-home .hm-scene__link:hover,
.page-home .hm-scene__link:focus-visible {
  background: #ffffff;
  border-top-color: var(--coral);
}

.page-home .hm-scene__link:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: -2px;
}

.page-home .hm-scene__idx {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--tide);
}

.page-home .hm-scene__name {
  display: block;
  margin-top: 6px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

.page-home .hm-scene__note {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--salt);
}

/* ---------- 区块通用 ---------- */
.page-home .hm-block {
  padding-block: clamp(52px, 7vw, 104px);
}

.page-home .hm-head {
  max-width: 78ch;
}

.page-home .hm-head__lede {
  margin: 14px 0 0;
  max-width: 64ch;
  font-size: var(--fs-body);
  line-height: 1.85;
  color: var(--salt);
}

/* ---------- 十二类服务 ---------- */
.page-home .hm-svc {
  background: var(--foam);
  border-bottom: 1px solid var(--hair);
}

.page-home .hm-svc__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin-top: clamp(28px, 3.4vw, 44px);
  background: var(--hair);
  border: 1px solid var(--hair);
}

.page-home .hm-svc__card {
  background: var(--foam);
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  transition: background-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.page-home .hm-svc__card:target {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px var(--coral);
}

.page-home .hm-svc__idx {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--tide);
}

.page-home .hm-svc__name {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.page-home .hm-svc__desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--salt);
}

/* ---------- 常用入口 ---------- */
.page-home .hm-entries {
  background: var(--navy-900);
  color: var(--foam);
  border-bottom: 1px solid var(--hair-strong);
}

.page-home .hm-entries .section-title,
.page-home .hm-trust .section-title {
  color: var(--foam);
}

.page-home .hm-entries .hm-head__lede,
.page-home .hm-trust .hm-head__lede {
  color: var(--mist);
}

.page-home .hm-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin-top: clamp(28px, 3.4vw, 44px);
  background: var(--hair-light);
  border: 1px solid var(--hair-light);
}

.page-home .hm-group {
  background: var(--navy-900);
  padding: 22px 18px 24px;
  min-width: 0;
}

.page-home .hm-group__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.page-home .hm-group__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
  background: var(--coral);
  padding: 3px 7px;
  line-height: 1.4;
}

.page-home .hm-group__title {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
  color: var(--foam);
}

.page-home .hm-group__desc {
  margin: 10px 0 0;
  max-width: 42ch;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--mist);
}

.page-home .hm-group__list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-home .hm-entry {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid var(--hair-light);
  font-size: 13px;
  line-height: 1.4;
  color: var(--foam);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.page-home .hm-group__list li:hover .hm-entry {
  border-color: var(--coral);
  background-color: rgba(255, 107, 74, 0.14);
}

.page-home .hm-group__more {
  display: inline-block;
  margin-top: 18px;
  padding-bottom: 2px;
  font-size: 13px;
  color: var(--coral);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 107, 74, 0.45);
  transition: color 0.2s var(--ease), border-bottom-color 0.2s var(--ease);
}

.page-home .hm-group__more:hover,
.page-home .hm-group__more:focus-visible {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.page-home .hm-group__more:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ---------- 区域对比 ---------- */
.page-home .hm-region {
  background: var(--foam);
  border-bottom: 1px solid var(--hair);
}

.page-home .hm-region__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
}

.page-home .hm-region__map {
  margin: 0;
  border: 1px solid var(--hair-strong);
  background: var(--sand);
  min-width: 0;
}

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

.page-home .hm-region__cap {
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  border-top: 1px solid var(--hair-strong);
}

.page-home .hm-region__table {
  margin-top: clamp(28px, 3.4vw, 44px);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.page-home .hm-region__legend {
  display: none;
}

.page-home .hm-region__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "city count"
    "track track"
    "score slots";
  gap: 7px 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  transition: background-color 0.2s var(--ease);
}

.page-home .hm-region__row:last-child {
  border-bottom: 0;
}

.page-home .hm-region__row:hover {
  background-color: rgba(217, 199, 160, 0.22);
}

.page-home .hm-region__city {
  grid-area: city;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.page-home .hm-region__city a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--hair-strong);
}

.page-home .hm-region__city a:hover,
.page-home .hm-region__city a:focus-visible {
  border-bottom-color: var(--coral);
  color: var(--coral-deep);
}

.page-home .hm-region__track {
  grid-area: track;
  display: block;
  height: 10px;
  background: rgba(10, 26, 34, 0.08);
  position: relative;
  overflow: hidden;
}

.page-home .hm-region__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--tide), var(--coral));
}

.page-home .hm-region__count {
  grid-area: count;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.page-home .hm-region__score {
  grid-area: score;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--salt);
}

.page-home .hm-region__slots {
  grid-area: slots;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--salt);
  text-align: right;
}

.page-home .hm-region__foot {
  margin: 16px 0 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--salt);
  max-width: 78ch;
}

/* ---------- 换设备登录 ---------- */
.page-home .hm-login {
  background: var(--sand);
  border-bottom: 1px solid var(--hair-strong);
}

.page-home .hm-login__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 48px);
  align-items: center;
}

.page-home .hm-login__copy {
  min-width: 0;
}

.page-home .hm-steps {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--hair-strong);
  border: 1px solid var(--hair-strong);
}

.page-home .hm-step {
  background: var(--foam);
  padding: 16px 16px 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
}

.page-home .hm-step__num {
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--coral);
}

.page-home .hm-step__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.page-home .hm-step__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--salt);
}

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

.page-home .hm-login__fig {
  margin: 0;
  border: 1px solid var(--hair-strong);
  background: var(--foam);
  min-width: 0;
}

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

/* ---------- 服务保障 ---------- */
.page-home .hm-trust {
  background: var(--navy-900);
  color: var(--foam);
}

.page-home .hm-trust__stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: clamp(28px, 3.4vw, 44px) 0 0;
  background: var(--hair-light);
  border: 1px solid var(--hair-light);
}

.page-home .hm-stat {
  background: var(--navy-900);
  padding: 20px 16px 22px;
  min-width: 0;
}

.page-home .hm-stat dt {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.page-home .hm-stat dd {
  margin: 9px 0 0;
}

.page-home .hm-stat__num {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--coral);
}

.page-home .hm-stat__sub {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--mist);
}

.page-home .hm-trust__foot {
  margin-top: clamp(26px, 3vw, 38px);
  padding-top: 22px;
  border-top: 1px solid var(--hair-light);
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: center;
  justify-content: space-between;
}

.page-home .hm-trust__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  min-width: 0;
}

.page-home .hm-trust__links a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-bottom-color 0.2s var(--ease);
}

.page-home .hm-trust__links a:hover,
.page-home .hm-trust__links a:focus-visible {
  color: var(--foam);
  border-bottom-color: var(--coral);
}

.page-home .hm-trust__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 响应式 ---------- */
@media (min-width: 560px) {
  .page-home .hm-scenes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (min-width: 860px) {
  .page-home .hm-region__head {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }

  .page-home .hm-region__legend {
    display: grid;
    grid-template-columns: 5.5em minmax(0, 1fr) 7.5em 4.5em 8em;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hair-strong);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--salt);
  }

  .page-home .hm-region__row {
    grid-template-columns: 5.5em minmax(0, 1fr) 7.5em 4.5em 8em;
    grid-template-areas: "city track count score slots";
    gap: 16px;
    padding: 12px 0;
  }

  .page-home .hm-region__score {
    text-align: center;
  }
}

@media (min-width: 900px) {
  .page-home .hm-hero__frame {
    grid-template-columns: 288px minmax(0, 1fr);
    gap: clamp(24px, 3vw, 56px);
    align-items: start;
  }

  .page-home .hm-login__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  }
}

@media (min-width: 1024px) {
  .page-home .hm-svc__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .hm-trust__stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .page-home .hm-scenes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .page-home .hm-svc__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home *,
  .page-home *::before,
  .page-home *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
