/* 服务协议 / 隐私政策 页面样式（与官网视觉体系一致） */
.legal-page {
  background: #fff;
  color: #3c3c43;
  padding: 1.6rem 0 2.4rem;
}

.legal-wrap {
  max-width: 17.06667rem;
  margin: 0 auto;
  padding: 0 0.53333rem;
}

.legal-head {
  text-align: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(47, 47, 48, 0.1);
  margin-bottom: 0.8rem;
}

.legal-head h1 {
  font-size: 0.64rem;
  line-height: 1.2;
  color: #09090a;
  font-weight: 600;
}

.legal-head h1 strong {
  background: linear-gradient(90deg, #00d2c4 0%, #37efcd 60%, #20c3e7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.legal-head .legal-sub {
  margin-top: 0.24rem;
  font-size: 0.22667rem;
  line-height: 0.4rem;
  color: rgba(47, 47, 48, 0.55);
}

.legal-toc-box {
  margin: 0.53333rem 0 0.8rem;
  padding: 0.4rem 0.48rem 0.48rem;
  border: 1px solid rgba(47, 47, 48, 0.08);
  border-radius: 0.10667rem;
  background: #f8f9f9;
}

.legal-toc-label {
  font-size: 0.21333rem;
  line-height: 0.32rem;
  color: rgba(47, 47, 48, 0.5);
  margin-bottom: 0.24rem;
}

/* 覆盖基础样式里的全局 nav 定位，避免目录被固定在视口顶部 */
.legal-toc-box nav.legal-toc {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.legal-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 0.56rem;
  padding: 0.10667rem 0.24rem;
  border-radius: 0.08rem;
  background: #fff;
  border: 1px solid rgba(47, 47, 48, 0.08);
  color: rgba(47, 47, 48, 0.78);
  font-size: 0.21333rem;
  line-height: 0.32rem;
  transition: all 0.25s ease;
}

.legal-toc a:hover {
  border-color: rgba(0, 210, 196, 0.45);
  background: rgba(0, 210, 196, 0.08);
  color: #00b3a8;
}

.legal-section {
  margin-bottom: 0.8rem;
  scroll-margin-top: 1.6rem;
}

.legal-section h2 {
  font-size: 0.32rem;
  line-height: 0.48rem;
  color: #09090a;
  font-weight: 600;
  margin-bottom: 0.24rem;
  padding-left: 0.24rem;
  position: relative;
}

.legal-section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12rem;
  width: 0.08rem;
  height: 0.24rem;
  border-radius: 0.04rem;
  background: linear-gradient(180deg, #00d2c4, #20c3e7);
}

.legal-section p {
  font-size: 0.22667rem;
  line-height: 0.45333rem;
  color: rgba(47, 47, 48, 0.76);
  margin-bottom: 0.24rem;
}

.legal-note {
  margin-top: 0.8rem;
  padding: 0.32rem 0.4rem;
  border: 1px solid rgba(0, 210, 196, 0.25);
  border-radius: 0.10667rem;
  background: rgba(0, 210, 196, 0.05);
  font-size: 0.21333rem;
  line-height: 0.4rem;
  color: rgba(47, 47, 48, 0.7);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.10667rem;
  margin-top: 0.53333rem;
  color: #00b3a8;
  font-size: 0.22667rem;
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
}

@media only screen and (max-width: 768px) {
  .legal-page {
    padding: 0.8rem 0 1.2rem;
  }

  .legal-wrap {
    padding: 0 0.32rem;
  }

  .legal-head h1 {
    font-size: 0.48rem;
  }

  .legal-section h2 {
    font-size: 0.29333rem;
    line-height: 0.42667rem;
  }

  .legal-section p,
  .legal-head .legal-sub,
  .legal-note {
    font-size: 0.24rem;
    line-height: 0.45333rem;
  }
}
