/* 服务协议独立页 */
html {
  height: 100%;
}

.agreement-body-page {
  --agreement-mobile-browser-gap: 0px;
  height: 100%;
  overflow: hidden;
}

.agreement-body-page .agreement-page {
  --agreement-header-h: 56px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.agreement-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--agreement-header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.agreement-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}

.agreement-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  text-align: center;
}

.agreement-scroll {
  flex: 1;
  min-height: 0;
  margin-top: var(--agreement-header-h);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: calc(
    var(--agreement-footer-gap, 12px) + env(safe-area-inset-bottom, 0px)
  );
}

.agreement-main {
  padding-top: 16px;
  padding-bottom: 8px;
}

.agreement-article {
  padding: 24px 20px;
}

.agreement-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  word-break: break-word;
}

.agreement-body p {
  margin: 0 0 12px;
}

.agreement-body strong {
  font-weight: 600;
}

.agreement-body u {
  text-decoration: underline;
}

.footer.agreement-footer {
  --agreement-footer-gap: 12px;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: var(--agreement-footer-gap);
  padding-bottom: calc(
    var(--agreement-footer-gap)
    + env(safe-area-inset-bottom, 0px)
    + var(--agreement-mobile-browser-gap)
  );
}

.footer.agreement-footer .container a {
  display: inline-block;
  line-height: 1.6;
  color: inherit;
  text-decoration: none;
}

@media (max-width: 767px) {
  .agreement-body-page {
    --agreement-mobile-browser-gap: 52px;
  }

  .agreement-scroll {
    scroll-padding-bottom: calc(
      var(--agreement-footer-gap, 12px)
      + env(safe-area-inset-bottom, 0px)
      + var(--agreement-mobile-browser-gap)
    );
  }
}

@media (min-width: 768px) {
  .agreement-body-page .agreement-page {
    --agreement-header-h: 64px;
  }

  .agreement-title {
    font-size: 22px;
  }

  .agreement-main {
    padding-top: 24px;
  }

  .agreement-article {
    padding: 32px 40px;
  }

  .footer.agreement-footer {
    --agreement-footer-gap: 16px;
  }
}
