/* Legal / policy pages (terms, privacy, etc.) */

.legal-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  width: 100%;
  color: rgba(255, 255, 255, 0.55);
  background: #010406;
  /* Licensed PingFang SC webfont must be supplied; do not synthesize another face. */
  font-family: "PingFang SC", sans-serif;
  font-synthesis: none;
}

.legal-page .page-main {
  flex: 1;
  padding: 24px 0;
  gap: 24px;
}

.legal-content.layout-section {
  width: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1200px;
}

.legal-breadcrumb {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 12px 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 600;
  line-height: 24px;
}

.legal-breadcrumb__back {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.legal-breadcrumb__back img {
  display: block;
  width: 24px;
  height: 24px;
  filter: invert(1);
  opacity: 0.9;
}

.legal-breadcrumb__back:hover img {
  opacity: 1;
}

.legal-breadcrumb strong {
  font: inherit;
}

.legal-breadcrumb > span {
  color: rgba(255, 255, 255, 0.9);
}

.legal-panel {
  width: 100%;
  padding: 24px;
  background: #0e1012;
  border-radius: 12px;
  border: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.legal-panel__title {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  font-family: PingFang SC, sans-serif;
  font-weight: 600;
  line-height: 24px;
}

.legal-panel__content {
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-family: PingFang SC, sans-serif;
  font-weight: 400;
  line-height: 22px;
}

.legal-panel__content h1,
.legal-panel__content h2,
.legal-panel__content h3,
.legal-panel__content h4,
.legal-panel__content h5,
.legal-panel__content h6 {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.legal-panel__content h1:first-child,
.legal-panel__content h2:first-child,
.legal-panel__content h3:first-child,
.legal-panel__content h4:first-child,
.legal-panel__content h5:first-child,
.legal-panel__content h6:first-child {
  margin-top: 0;
}

.legal-panel__content p {
  margin: 0;
}

.legal-panel__content p + p,
.legal-panel__content ul + p,
.legal-panel__content ol + p,
.legal-panel__content p + ul,
.legal-panel__content p + ol {
  margin-top: 8px;
}

.legal-panel__content ul,
.legal-panel__content ol {
  margin: 0;
  padding-left: 22px;
}

.legal-panel__content li + li {
  margin-top: 4px;
}

.legal-panel__content img,
.legal-panel__content video {
  max-width: 100%;
  height: auto;
}

.legal-panel__content table {
  width: 100%;
  border-collapse: collapse;
}

.legal-panel__content th,
.legal-panel__content td {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-panel__content blockquote {
  margin: 12px 0;
  padding-left: 14px;
  border-left: 3px solid var(--color-brand-primary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.legal-panel__content .faq-item__question {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

.faq-item__answer {
  margin: 0;
}

.faq-email {
  color: #f52c56;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
}

.faq-link {
  color: var(--color-brand-primary);
  text-decoration: none;
}

.faq-link:hover {
  text-decoration: underline;
}

.faq-rich-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-rich-text > h1,
.faq-rich-text > h2,
.faq-rich-text > h3,
.faq-rich-text > h4,
.faq-rich-text > h5,
.faq-rich-text > h6 {
  margin-top: 22px;
}

.faq-rich-text > h1:first-child,
.faq-rich-text > h2:first-child,
.faq-rich-text > h3:first-child,
.faq-rich-text > h4:first-child,
.faq-rich-text > h5:first-child,
.faq-rich-text > h6:first-child {
  margin-top: 0;
}

.faq-rich-text a {
  color: var(--color-brand-primary);
  text-decoration: none;
}

.faq-rich-text a:hover {
  text-decoration: underline;
}

.addr-block + .addr-block {
  margin-top: 18px;
}

.addr-block__label {
  margin: 0 0 4px;
}

.addr-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.addr-link {
  color: var(--color-brand-primary);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  word-break: break-all;
}

.addr-link:hover {
  text-decoration: underline;
}

.addr-tip {
  margin: 4px 0 0;
}

.addr-tip--red {
  color: #ff0000;
}

.addr-warn {
  margin: 0;
  color: #ff0000;
}

.addr-email-highlight {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 32px;
  font-family: "Kaiti SC", KaiTi, STKaiti, serif;
  font-weight: 400;
  line-height: 50px;
  text-shadow: 0 0 10px var(--color-primary-500);
}

.addr-email-highlight a {
  color: inherit;
  text-decoration: none;
}

.addr-inline-links a {
  color: var(--color-brand-primary);
  text-decoration: none;
}

.addr-inline-links a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .legal-page {
    background-image: none;
  }

  .legal-page .page-main {
    padding: 12px 0 0;
    gap: 0;
  }

  .legal-content.layout-section {
    width: 100%;
    gap: 18px;
    padding-left: var(--layout-padding-x);
    padding-right: var(--layout-padding-x);
    padding-bottom: 12px;
    box-sizing: border-box;
  }

  .legal-breadcrumb {
    font-size: 12px;
    line-height: 18px;
  }

  .legal-panel {
    padding: 24px 20px;
    background: #fff;
    border-radius: 18px;
    border: none;
    outline: 1px solid var(--color-black-alpha-10);
    outline-offset: -1px;
    backdrop-filter: none;
    gap: 18px;
    overflow: hidden;
  }

  .legal-panel__title {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
  }

  .legal-panel__content {
    font-size: 12px;
    line-height: 18px;
  }

  .legal-panel__content h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
  }

  .legal-panel__content h2:not(:first-child) {
    margin-top: 0;
  }

  .latest-address-page .legal-panel {
    background: #0e1012;
    outline-color: rgba(255, 255, 255, 0.1);
  }
}

.faq-rich-text a[href^="mailto:"] { color: #f52c56; }

/* PC contact: source 45916:267351 / 267352. Counts and labels remain configured. */
.contact-page {
  font-family: "PingFang SC", sans-serif;
  font-synthesis: none;
}

@media (min-width: 769px) {
  .contact-page .page-main {
    flex: 1;
    padding: 24px 0;
    gap: 24px;
  }

  .contact-page .contact-content.layout-section {
    gap: 24px;
  }

  .contact-page .contact-panel {
    min-height: 0;
    padding: 24px;
    align-items: stretch;
  }

  .contact-page .contact-panel__section {
    padding: 48px 0;
    gap: 36px;
    justify-content: center;
  }

  .contact-page .contact-channels {
    width: max-content;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 60px;
    overflow-x: auto;
  }

  .contact-page .contact-channel {
    flex: 0 0 auto;
    min-width: 80px;
  }

  .contact-page .contact-channel__label {
    color: #fff;
  }

  /* These legal bodies are distinct TEXT styles, not one shared typography scale. */
  .legal-page:is([data-legal-path="/terms/of/use"], [data-legal-path="/dmca"], [data-legal-path="/2257"]) .legal-panel__content {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
  }

  .legal-page:is([data-legal-path="/terms/of/use"], [data-legal-path="/privacy/policy"], [data-legal-path="/dmca"], [data-legal-path="/2257"]) .legal-panel__content :is(h1, h2, h3, h4, h5, h6) {
    color: inherit;
    font: inherit;
    line-height: inherit;
  }

  .legal-page:is([data-legal-path="/terms/of/use"], [data-legal-path="/privacy/policy"], [data-legal-path="/dmca"], [data-legal-path="/2257"]) .legal-panel__content :is(p + p, ul + p, ol + p, p + ul, p + ol) {
    margin-top: 0;
  }

  .legal-page[data-legal-path="/terms/of/use"] .faq-rich-text > :is(h1, h2, h3, h4, h5, h6):not(:first-child) {
    margin-top: 20px;
  }

  .legal-page:is([data-legal-path="/dmca"], [data-legal-path="/2257"]) .faq-rich-text > :is(h1, h2, h3, h4, h5, h6) {
    margin-top: 0;
  }

  .legal-page:is([data-legal-path="/dmca"], [data-legal-path="/2257"]) .faq-rich-text a {
    color: inherit;
    text-decoration: none;
  }
}

/* H5 legal source bodies: 266466 / 266473 / 266549 / 266624.
   Exact PingFang webfont must be provided; header paint remains source-blocked. */
body:is(.mobile-user-agreement-page, .mobile-privacy-policy-page, .mobile-dmca-page, .mobile-2257-page) {
  background: #010406;
  font-family: "PingFang SC", sans-serif;
  font-synthesis: none;
}

:is(.mobile-user-agreement-shell, .mobile-privacy-policy-shell, .mobile-dmca-shell, .mobile-2257-shell) {
  background: #010406;
}

:is(.mobile-user-agreement-header, .mobile-privacy-policy-header, .mobile-dmca-header, .mobile-2257-header) {
  z-index: var(--layer-sticky, 40);
}

:is(.mobile-dmca-copy, .mobile-dmca-rich-text, .mobile-2257-copy, .mobile-2257-rich-text) {
  letter-spacing: normal;
}

