/* ==========================================================================
   pages.css — 首页 / 聚合页 / 榜单页 / 我的记录 / 家长须知 / 404
   对应 design-spec §7 关键页面线框
   ========================================================================== */

/* ── 首页 Hero ────────────────────────────────────────────────── */
.m-hero {
  position: relative;
  overflow: hidden;
  padding: var(--m-s-9) 0 var(--m-s-7);
  background: var(--m-bg-base);
}

/* 右下角像素网格（纯 CSS，装饰） */
.m-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 420px;
  height: 420px;
  background-image:
    repeating-linear-gradient(90deg, var(--m-grid-tint) 0 2px, transparent 2px 24px),
    repeating-linear-gradient(0deg, var(--m-grid-tint) 0 2px, transparent 2px 24px);
  transform: rotate(-8deg);
  pointer-events: none;
  opacity: .5;
}

.m-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--m-gutter);
  align-items: center;
}

.m-hero__copy {
  grid-column: 1 / span 7;
}

.m-hero__art {
  grid-column: 8 / span 5;
  display: flex;
  justify-content: center;
}

.m-hero__eyebrow {
  font-family: var(--m-font-pixel);
  font-size: var(--m-fs-caption);
  letter-spacing: .08em;
  color: var(--m-brand);
  margin: 0 0 var(--m-s-3);
}

.m-hero__title {
  font-size: var(--m-fs-display);
  line-height: var(--m-lh-display);
  letter-spacing: .02em;
  margin: 0 0 var(--m-s-4);
  text-shadow: 3px 3px 0 var(--m-line-hard);
}

.m-hero__sub {
  font-size: var(--m-fs-body-l);
  line-height: var(--m-lh-body-l);
  color: var(--m-text-2);
  margin: 0 0 var(--m-s-6);
  max-width: 30ch;
}

.m-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--m-s-3);
}

.m-hero__note {
  margin: var(--m-s-3) 0 0;
  font-size: var(--m-fs-caption);
  color: var(--m-text-3);
}

.m-hero__stats {
  margin-top: var(--m-s-5);
}

/* Hero 右侧像素游戏机（纯 CSS，无图片） */
.m-arcade {
  width: min(400px, 100%);
  aspect-ratio: 1 / 1;
  padding: var(--m-s-5);
  background: var(--m-bg-surface);
  border-radius: var(--m-r-2);
  box-shadow: inset 0 0 0 3px var(--m-line-hard), 0 0 0 2px var(--m-line-strong), 8px 8px 0 0 var(--m-line-hard);
  display: flex;
  flex-direction: column;
  gap: var(--m-s-3);
}

.m-arcade__screen {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--m-s-2);
  padding: var(--m-s-3);
  background: var(--m-bg-inset);
  border-radius: var(--m-r-0);
  box-shadow: inset 0 0 0 2px var(--m-line);
  overflow: hidden;
}

.m-arcade__cell {
  display: grid;
  place-items: center;
  font-family: var(--m-font-pixel);
  font-size: var(--m-fs-h2);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--m-brand);
  background: var(--m-bg-surface);
  border-radius: var(--m-r-0);
  aspect-ratio: 1 / 1;
  animation: arcade-blink 2.4s steps(3, end) infinite;
}

.m-arcade__cell:nth-child(2n) {
  color: var(--m-dim, var(--m-brand));
  animation-delay: .3s;
}

.m-arcade__cell:nth-child(3n) {
  color: var(--m-text-2);
  animation-delay: .6s;
}

@keyframes arcade-blink {
  0%,
  70% {
    opacity: 1;
  }

  85% {
    opacity: .35;
  }

  100% {
    opacity: 1;
  }
}

.m-arcade__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--m-s-2);
  font-family: var(--m-font-pixel);
  font-size: var(--m-fs-badge);
  letter-spacing: .1em;
  color: var(--m-text-3);
}

.m-arcade__keys {
  display: flex;
  gap: var(--m-s-2);
}

.m-arcade__key {
  width: 28px;
  height: 12px;
  background: var(--m-line-strong);
  border-radius: var(--m-r-0);
}

.m-arcade__key--round {
  background: var(--m-brand);
}

@media (max-width: 1023px) {
  .m-hero__copy {
    grid-column: 1 / -1;
  }

  .m-hero__art {
    display: none;
  }

  .m-hero__title {
    /* 平板段 48px 在 768 宽下会挤成「一行 12 个字 + 孤字成行」，
       与手机的 32px 也没有过渡。40px 是 768–1023 的合适量级。 */
    font-size: 40px;
  }

  .m-hero__sub {
    max-width: 46ch;
  }
}

@media (max-width: 767px) {
  .m-hero {
    padding: var(--m-s-6) 0 var(--m-s-5);
  }

  .m-hero__title {
    font-size: 32px;
  }

  .m-hero__sub {
    font-size: var(--m-fs-body);
    line-height: var(--m-lh-body);
  }

  .m-hero__actions .m-btn {
    flex: 1 1 100%;
  }
}

/* 平板段 hero 字号由上文 max-width:1023 的 40px 统一负责。
   这里原有一条 48px 的重复声明，因为排在后面而实际生效，
   导致 768 宽下标题挤成「一行 12 字 + 孤字成行」。不要再加回来。 */

/* ── 首页：六维区 ─────────────────────────────────────────────── */
.m-dims {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--m-gutter);
}

@media (max-width: 1023px) {
  .m-dims {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .m-dims {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── 首页：今日数据条 ─────────────────────────────────────────── */
.m-todaybar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--m-s-2) var(--m-s-4);
  padding: var(--m-s-3) var(--m-s-4);
  background: var(--m-info-bg);
  border-left: 6px solid var(--m-info);
  border-radius: var(--m-r-1);
  color: var(--m-info);
  font-size: var(--m-fs-body);
  line-height: var(--m-lh-body);
}

/* ── 首页/榜单：最新成绩流 ───────────────────────────────────── */
.m-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--m-bg-surface);
  border-radius: var(--m-r-2);
  box-shadow: inset 0 0 0 2px var(--m-line);
  overflow: hidden;
}

.m-feed li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--m-s-2);
  min-height: 40px;
  padding: var(--m-s-1) var(--m-s-3);
  border-bottom: 1px dashed var(--m-line-dashed);
  font-size: var(--m-fs-caption);
  color: var(--m-text-2);
}

.m-feed li:last-child {
  border-bottom: none;
}

.m-feed__nick {
  font-weight: 700;
  color: var(--m-text-1);
  max-width: 8ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-feed__game {
  color: var(--dim-text, var(--m-text-2));
}

.m-feed__score {
  font-family: var(--m-font-pixel);
  font-size: var(--m-fs-caption);
  letter-spacing: .06em;
  color: var(--m-brand);
  margin-left: auto;
  white-space: nowrap;
}

.m-feed__time {
  color: var(--m-text-3);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .m-feed li {
    min-height: var(--m-hit);
  }
}

/* ── 首页：榜单预览三行 ───────────────────────────────────────── */
.m-minirank {
  list-style: none;
  margin: 0 0 var(--m-s-5);
  padding: 0;
  counter-reset: mini;
}

.m-minirank li {
  display: flex;
  align-items: center;
  gap: var(--m-s-3);
  margin: 0;
  min-height: 56px;
  padding: var(--m-s-2) var(--m-s-3);
  border-bottom: 1px dashed var(--m-line-dashed);
  counter-increment: mini;
}

.m-minirank li::before {
  content: counter(mini);
  font-family: var(--m-font-pixel);
  font-size: var(--m-fs-h3);
  color: var(--m-text-2);
  min-width: 2ch;
}

.m-minirank li:nth-child(1)::before {
  color: var(--m-gold);
}

.m-minirank li:nth-child(2)::before {
  color: var(--m-silver);
}

.m-minirank li:nth-child(3)::before {
  color: var(--m-bronze);
}

.m-minirank__nick {
  font-weight: 700;
  color: var(--m-text-1);
}

.m-minirank__score {
  margin-left: auto;
  font-family: var(--m-font-pixel);
  font-size: var(--m-fs-h4);
  letter-spacing: .08em;
  color: var(--m-brand);
}

/* ── 首页：家长三条 ───────────────────────────────────────────── */
.m-parents {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--m-gutter);
  margin-bottom: var(--m-s-5);
}

@media (max-width: 1023px) {
  .m-parents {
    grid-template-columns: minmax(0, 1fr);
  }
}

.m-parents__card {
  padding: var(--m-s-5);
  background: var(--m-bg-surface);
  border-radius: var(--m-r-2);
  box-shadow: inset 0 0 0 2px var(--m-line), var(--m-shadow-2);
}

.m-parents__title {
  font-size: var(--m-fs-h4);
  line-height: var(--m-lh-h4);
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0 0 var(--m-s-2);
  color: var(--m-text-1);
}

.m-parents__body {
  font-size: var(--m-fs-body);
  line-height: var(--m-lh-body);
  color: var(--m-text-2);
  margin: 0;
}

/* ── 聚合页：维度区块 ─────────────────────────────────────────── */
.m-dim-block {
  padding-top: var(--m-s-5);
  scroll-margin-top: calc(var(--m-nav-h) + 64px);
}

.m-dim-block__head {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--m-s-4);
  align-items: center;
  padding: var(--m-s-4);
  margin-bottom: var(--m-s-5);
  background: var(--dim-tint);
  border-radius: var(--m-r-2);
  box-shadow: inset 0 0 0 2px var(--dim);
}

.m-dim-block__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: var(--m-bg-inset);
  border-radius: var(--m-r-0);
  box-shadow: inset 0 0 0 2px var(--dim);
}

.m-dim-block__title {
  font-size: var(--m-fs-h3);
  color: var(--m-text-1);
  margin: 0 0 var(--m-s-1);
}

.m-dim-block__desc {
  font-size: var(--m-fs-caption);
  line-height: var(--m-lh-caption);
  color: var(--m-text-2);
  margin: 0;
}

/* ── 榜单页：筛选行 ───────────────────────────────────────────── */
.m-filter {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--m-gutter);
  align-items: end;
  margin-bottom: var(--m-s-5);
}

.m-filter__ages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--m-s-2);
}

.m-filter__hint {
  margin: var(--m-s-2) 0 0;
  font-size: var(--m-fs-caption);
  color: var(--m-text-3);
}

@media (max-width: 767px) {
  .m-filter {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--m-s-4);
  }
}

.m-rankbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--m-s-3);
  margin-bottom: var(--m-s-4);
}

.m-rankbar__note {
  font-size: var(--m-fs-caption);
  color: var(--m-text-3);
}

/* ── 我的记录 ─────────────────────────────────────────────────── */
.m-me-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--m-s-6);
  align-items: end;
  padding: var(--m-s-6) 0 var(--m-s-5);
}

@media (max-width: 1023px) {
  .m-me-head {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--m-s-5);
  }
}

.m-me-score {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--m-s-1);
  padding: var(--m-s-4);
  background: var(--m-bg-surface);
  border-radius: var(--m-r-2);
  box-shadow: inset 0 0 0 2px var(--m-line), var(--m-shadow-2);
}

.m-me-score__label {
  font-size: var(--m-fs-caption);
  color: var(--m-text-3);
  letter-spacing: .06em;
}

.m-me-score__value {
  font-family: var(--m-font-pixel);
  font-size: var(--m-fs-display);
  line-height: var(--m-lh-display);
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--m-brand);
  text-shadow: 3px 3px 0 var(--m-line-hard);
}

.m-me-score__meta {
  font-size: var(--m-fs-caption);
  color: var(--m-text-3);
  margin: 0;
}

.m-radar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: var(--m-s-6);
  align-items: center;
}

@media (max-width: 1023px) {
  .m-radar-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--m-s-5);
  }
}

.m-radar-canvas {
  width: 100%;
  max-width: 480px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  background: var(--m-bg-surface);
  border-radius: var(--m-r-2);
  box-shadow: inset 0 0 0 2px var(--m-line);
}

.m-dimbars {
  display: grid;
  gap: var(--m-s-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.m-dimbars li {
  margin: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 7em 1fr auto;
  align-items: center;
  gap: var(--m-s-2);
  padding: var(--m-s-1) 0;
  border-bottom: 1px dashed var(--m-line-dashed);
}

.m-dimbars__name {
  font-size: var(--m-fs-caption);
  color: var(--m-text-2);
  display: inline-flex;
  align-items: center;
  gap: var(--m-s-1);
}

.m-dimbars__value {
  font-family: var(--m-font-pixel);
  font-size: var(--m-fs-h4);
  letter-spacing: .08em;
  color: var(--dim-text, var(--m-text-1));
  min-width: 5ch;
  text-align: right;
}

.m-dimbars__value[data-unmeasured="true"] {
  font-family: var(--m-font-body);
  font-size: var(--m-fs-caption);
  color: var(--m-text-3);
}

.m-chart-canvas {
  width: 100%;
  height: 240px;
  background: var(--m-bg-surface);
  border-radius: var(--m-r-2);
  box-shadow: inset 0 0 0 2px var(--m-line);
}

/* ── 家长须知：纸面反色长文 ───────────────────────────────────── */
.m-paper {
  background: var(--m-bg-paper);
  color: var(--m-bg-paper-ink);
  border-radius: var(--m-r-2);
  padding: var(--m-s-7) var(--m-s-6);
  box-shadow: inset 0 0 0 2px var(--m-line-hard), var(--m-shadow-3);
  font-size: var(--m-fs-body-l);
  line-height: 1.75;
}

.m-paper h2,
.m-paper h3,
.m-paper h4 {
  color: var(--m-bg-paper-ink);
  text-shadow: none;
}

.m-paper h2 {
  margin-bottom: var(--m-s-3);
}

.m-paper h3 {
  margin: var(--m-s-6) 0 var(--m-s-2);
}

.m-paper p,
.m-paper li {
  color: var(--m-bg-paper-ink);
}

.m-paper a {
  color: var(--m-focus-paper);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.m-paper ol,
.m-paper ul {
  padding-left: var(--m-s-6);
}

.m-paper li {
  margin-bottom: var(--m-s-2);
}

.m-paper strong {
  color: var(--m-bg-paper-ink);
}

.m-paper__lead {
  font-size: var(--m-fs-body-l);
  line-height: 1.75;
}

.m-paper__table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--m-s-4) 0;
  font-size: var(--m-fs-body);
}

.m-paper__table th,
.m-paper__table td {
  border: 1px solid var(--m-paper-line);
  padding: var(--m-s-2) var(--m-s-3);
  text-align: left;
  vertical-align: top;
  color: var(--m-bg-paper-ink);
}

.m-paper__table th {
  background: var(--m-paper-fill);
  font-weight: 700;
}

.m-paper__faq {
  display: grid;
  gap: var(--m-s-2);
}

.m-paper__faq details {
  border: 1px solid var(--m-paper-line);
  border-radius: var(--m-r-1);
  padding: var(--m-s-3) var(--m-s-4);
  background: var(--m-paper-card);
}

.m-paper__faq summary {
  cursor: pointer;
  font-weight: 700;
  min-height: var(--m-hit);
  display: flex;
  align-items: center;
}

.m-paper__faq p {
  margin: var(--m-s-2) 0 0;
}

@media (max-width: 767px) {
  .m-paper {
    padding: var(--m-s-5) var(--m-s-4);
    font-size: var(--m-fs-body-l);
  }
}

/* ── 404 ──────────────────────────────────────────────────────── */
.m-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--m-s-4);
  text-align: center;
  padding: var(--m-s-8) 0;
}

.m-404__code {
  font-family: var(--m-font-pixel);
  font-size: clamp(48px, 14vw, 120px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--m-danger);
  text-shadow: 4px 4px 0 var(--m-line-hard);
}

.m-404__text {
  font-size: var(--m-fs-body-l);
  color: var(--m-text-2);
  max-width: 34ch;
  margin: 0;
}

.m-404__sub {
  font-size: var(--m-fs-caption);
  color: var(--m-text-3);
  max-width: 40ch;
  margin: 0;
}

.m-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--m-s-3);
  justify-content: center;
  margin-top: var(--m-s-4);
}

@media (max-width: 767px) {
  .m-404__actions .m-btn {
    flex: 1 1 100%;
  }
}

/* ── 相关推荐 ─────────────────────────────────────────────────── */
.m-related {
  margin-top: var(--m-s-8);
}

.m-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--m-gutter);
}

@media (max-width: 767px) {
  .m-related__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── D1 维度落地页 /dim/{key}/ ───────────────────────────────── */
.m-dim-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--m-s-4);
  align-items: center;
  padding: var(--m-s-5);
  margin-bottom: var(--m-s-5);
  background: var(--dim-tint);
  border-radius: var(--m-r-2);
  box-shadow: inset 0 0 0 2px var(--dim), var(--m-shadow-2);
}

.m-dim-hero__icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  font-size: 40px;
  background: var(--m-bg-inset);
  border-radius: var(--m-r-0);
  box-shadow: inset 0 0 0 2px var(--dim);
}

.m-dim-hero__sub {
  font-size: var(--m-fs-badge);
  letter-spacing: .06em;
  color: var(--dim-text);
  font-weight: 700;
  margin: 0 0 var(--m-s-1);
}

.m-dim-others {
  display: flex;
  flex-wrap: wrap;
  gap: var(--m-s-2);
  margin-top: var(--m-s-5);
}

@media (max-width: 767px) {
  .m-dim-hero {
    grid-template-columns: 56px minmax(0, 1fr);
    padding: var(--m-s-4);
  }

  .m-dim-hero__icon {
    width: 56px;
    height: 56px;
    font-size: 32px;
  }
}

/* 三榜对照：桌面三列，手机竖排（避免 375px 下挤成竖排单字） */
.m-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--m-gutter);
}

@media (max-width: 767px) {
  .m-compare {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 昵称过长不换行成竖排单字 */
.m-minirank li {
  flex-wrap: nowrap;
}

.m-minirank__nick {
  max-width: 9ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-minirank__score {
  flex: 0 0 auto;
}

/* ── /games/ 吸顶锚点条（56px，chips 44px 热区，只做页内定位） ── */
.m-anchor-bar {
  position: sticky;
  top: var(--m-nav-h);
  z-index: var(--m-z-sticky);
  height: 56px;
  display: flex;
  align-items: center;
  gap: var(--m-s-2);
  padding: 0 var(--m-pad-x);
  background: rgba(14, 11, 36, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--m-line-dashed);
}

.m-anchor-bar__list {
  display: flex;
  align-items: center;
  gap: var(--m-s-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.m-anchor-bar__list::-webkit-scrollbar {
  display: none;
}

.m-anchor-bar__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--m-hit);
  padding: 0 var(--m-s-4);
  border: none;
  border-radius: var(--m-r-1);
  background: var(--m-bg-surface);
  color: var(--m-text-2);
  font-size: var(--m-fs-body);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--m-line-strong);
  transition: background-color var(--m-dur-2) var(--m-ease-io), color var(--m-dur-2) var(--m-ease-io);
}

.m-anchor-bar__item:hover {
  background: var(--m-bg-raised);
  color: var(--m-text-1);
}

.m-anchor-bar__item[aria-current="true"] {
  background: var(--m-brand-tint-strong);
  color: var(--m-brand);
  box-shadow: inset 0 0 0 2px var(--m-brand), var(--m-shadow-1);
}

@media (max-width: 767px) {
  .m-anchor-bar {
    top: var(--m-nav-h);
    padding: 0 var(--m-pad-x);
  }
}

/* ── /dim/{key}/ 的吸顶维度切换（当前项 aria-current="page"） ── */
.m-dim-switch {
  position: sticky;
  top: var(--m-nav-h);
  z-index: var(--m-z-sticky);
  display: flex;
  gap: var(--m-s-2);
  overflow-x: auto;
  padding: var(--m-s-2) var(--m-pad-x);
  background: rgba(14, 11, 36, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--m-line-dashed);
  scrollbar-width: none;
}

.m-dim-switch::-webkit-scrollbar {
  display: none;
}

.m-dim-switch__item {
  display: inline-flex;
  align-items: center;
  gap: var(--m-s-1);
  min-height: var(--m-hit);
  padding: 0 var(--m-s-4);
  border-radius: var(--m-r-1);
  background: var(--m-bg-surface);
  color: var(--m-text-2);
  font-size: var(--m-fs-body);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 0 0 2px var(--m-line-strong);
}

.m-dim-switch__item:hover {
  background: var(--m-bg-raised);
  color: var(--m-text-1);
  text-decoration: none;
}

.m-dim-switch__item[aria-current="page"] {
  background: var(--m-brand);
  color: var(--m-brand-ink);
  box-shadow: var(--m-shadow-1);
}

/* 维度页 H1：主标 + 副标（副标 20px --dim-text） */
.m-dim-h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--m-s-3);
}

.m-dim-h1__sub {
  font-size: var(--m-fs-h4);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--dim-text);
  text-shadow: none;
}

/* 锚点命中时不被吸顶导航/锚点条盖住（桌面 136px，移动 120px） */
.m-dim-block {
  scroll-margin-top: calc(136px + var(--m-offline-h, 0px));
}

@media (max-width: 767px) {
  .m-dim-block {
    scroll-margin-top: calc(120px + var(--m-offline-h, 0px));
  }
}

/* 离线条存在时，维度切换条也要跟着下移 */
body.has-offline-bar .m-dim-switch {
  top: calc(40px + var(--m-nav-h));
}

@media (max-width: 767px) {
  body.has-offline-bar .m-dim-switch {
    top: calc(48px + var(--m-nav-h));
  }
}
