/* 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;
  font-family: PingFang SC, "Microsoft YaHei", sans-serif;
}

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

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

/* Figma 51065:412380 返回/页签：60px 高，返回图标与页名间距 18px */
.legal-breadcrumb {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  padding: 12px 10px;
  box-sizing: border-box;
  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;
}

.legal-breadcrumb__current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-breadcrumb__current strong,
.legal-breadcrumb > strong {
  font: inherit;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.legal-breadcrumb__current > span,
.legal-breadcrumb > span[aria-hidden="true"] {
  color: rgba(255, 255, 255, 0.35);
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
}

/* Figma 51065:412406 正文卡片：#0e1012 / 圆角 12 / 内边距 24 */
.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 #e9b54b;
}

/* Figma FAQ 条目间空行 ≈ 22px */
.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;
}

/* Figma ov3：邮箱 18/24 SemiBold #f52c56 */
.faq-email,
.faq-rich-text a[href^="mailto:"] {
  color: #f52c56;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  text-decoration: none;
}

/* Figma ov4：强调链接 #ffb800 */
.faq-link,
.faq-rich-text a {
  color: #ffb800;
  text-decoration: none;
}

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

/* 设计稿中「点此进入」无金色强调，保持正文色 */
.faq-rich-text a.faq-inline,
a.faq-inline {
  color: inherit;
  text-decoration: none;
}

.faq-rich-text a.faq-inline:hover,
a.faq-inline: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;
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-weight: 400;
  line-height: 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 > p + p {
  margin-top: 22px;
}

/* Figma 51065:412421 隐私政策等条款正文：单栏 16/22 Regular，段间无 FAQ 式空行 */
.legal-rich-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

.legal-panel__content .legal-rich-text > p + p {
  margin-top: 0;
}

.legal-rich-text > p:empty {
  min-height: 22px;
}

.legal-rich-text > h1,
.legal-rich-text > h2,
.legal-rich-text > h3,
.legal-rich-text > h4,
.legal-rich-text > h5,
.legal-rich-text > h6 {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
}

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

.legal-rich-text a {
  color: #ffb800;
  text-decoration: none;
}

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

.legal-rich-text a[href^="mailto:"] {
  color: #f52c56;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

/* Figma 51065:412727 DMCA：卡片无填充，正文 14/20 Regular rgba(255,255,255,0.90) */
.legal-page--dmca .legal-panel {
  background: transparent;
}

.legal-page--dmca .legal-panel__content,
.legal-page--dmca .legal-rich-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.legal-page--dmca .legal-rich-text > p:empty {
  min-height: 20px;
}

.legal-page--dmca .legal-rich-text > h1,
.legal-page--dmca .legal-rich-text > h2,
.legal-page--dmca .legal-rich-text > h3,
.legal-page--dmca .legal-rich-text > h4,
.legal-page--dmca .legal-rich-text > h5,
.legal-page--dmca .legal-rich-text > h6 {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.legal-page--dmca .legal-rich-text a,
.legal-page--dmca .legal-rich-text a[href^="mailto:"] {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* Figma 51065:412880 2257：内容卡无填充（与 DMCA 同），正文见下 */
.legal-page--2257 .legal-panel {
  background: transparent;
}

/* Figma 51065:412574 用户协议 / 51065:412880 2257：正文 14/20 Regular，白色 90%（与隐私 16/22 区分） */
.legal-page--terms .legal-panel__content,
.legal-page--terms .legal-rich-text,
.legal-page--2257 .legal-panel__content,
.legal-page--2257 .legal-rich-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.legal-page--terms .legal-panel__content h1,
.legal-page--terms .legal-panel__content h2,
.legal-page--terms .legal-panel__content h3,
.legal-page--terms .legal-panel__content h4,
.legal-page--terms .legal-panel__content h5,
.legal-page--terms .legal-panel__content h6,
.legal-page--terms .legal-rich-text > h1,
.legal-page--terms .legal-rich-text > h2,
.legal-page--terms .legal-rich-text > h3,
.legal-page--terms .legal-rich-text > h4,
.legal-page--terms .legal-rich-text > h5,
.legal-page--terms .legal-rich-text > h6,
.legal-page--2257 .legal-panel__content h1,
.legal-page--2257 .legal-panel__content h2,
.legal-page--2257 .legal-panel__content h3,
.legal-page--2257 .legal-panel__content h4,
.legal-page--2257 .legal-panel__content h5,
.legal-page--2257 .legal-panel__content h6,
.legal-page--2257 .legal-rich-text > h1,
.legal-page--2257 .legal-rich-text > h2,
.legal-page--2257 .legal-rich-text > h3,
.legal-page--2257 .legal-rich-text > h4,
.legal-page--2257 .legal-rich-text > h5,
.legal-page--2257 .legal-rich-text > h6 {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.legal-page--terms .legal-panel__content h1:first-child,
.legal-page--terms .legal-panel__content h2:first-child,
.legal-page--terms .legal-panel__content h3:first-child,
.legal-page--terms .legal-panel__content h4:first-child,
.legal-page--terms .legal-panel__content h5:first-child,
.legal-page--terms .legal-panel__content h6:first-child,
.legal-page--terms .legal-rich-text > h1:first-child,
.legal-page--terms .legal-rich-text > h2:first-child,
.legal-page--terms .legal-rich-text > h3:first-child,
.legal-page--terms .legal-rich-text > h4:first-child,
.legal-page--terms .legal-rich-text > h5:first-child,
.legal-page--terms .legal-rich-text > h6:first-child,
.legal-page--2257 .legal-panel__content h1:first-child,
.legal-page--2257 .legal-panel__content h2:first-child,
.legal-page--2257 .legal-panel__content h3:first-child,
.legal-page--2257 .legal-panel__content h4:first-child,
.legal-page--2257 .legal-panel__content h5:first-child,
.legal-page--2257 .legal-panel__content h6:first-child,
.legal-page--2257 .legal-rich-text > h1:first-child,
.legal-page--2257 .legal-rich-text > h2:first-child,
.legal-page--2257 .legal-rich-text > h3:first-child,
.legal-page--2257 .legal-rich-text > h4:first-child,
.legal-page--2257 .legal-rich-text > h5:first-child,
.legal-page--2257 .legal-rich-text > h6:first-child {
  margin-top: 0;
}

.legal-page--terms .legal-rich-text > p:empty,
.legal-page--2257 .legal-rich-text > p:empty {
  min-height: 20px;
}

.legal-page--terms .legal-panel__content p + p,
.legal-page--terms .legal-panel__content ul + p,
.legal-page--terms .legal-panel__content ol + p,
.legal-page--terms .legal-panel__content p + ul,
.legal-page--terms .legal-panel__content p + ol,
.legal-page--2257 .legal-panel__content p + p,
.legal-page--2257 .legal-panel__content ul + p,
.legal-page--2257 .legal-panel__content ol + p,
.legal-page--2257 .legal-panel__content p + ul,
.legal-page--2257 .legal-panel__content p + ol {
  margin-top: 0;
}

/* Figma 2257 正文无粉红 mailto 强调，链接与正文同色 */
.legal-page--2257 .legal-rich-text a,
.legal-page--2257 .legal-rich-text a[href^="mailto:"] {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
}

.legal-page--2257 .legal-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: #e9b54b;
  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: #e9b54b;
  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);
  }
}
