:root {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #20203a;
  background: #f4f3ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --site-accent: #6359e0;
  --site-accent-soft: rgba(99, 89, 224, .14);
  --site-accent-faint: rgba(99, 89, 224, .08);
  --ink: #20203a;
  --body: #4f4d68;
  --muted: #77758f;
  --line: rgba(99, 89, 224, .18);
  --paper: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.88), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(99,89,224,.14), transparent 27%),
    radial-gradient(circle at 55% 92%, rgba(94,117,235,.14), transparent 32%),
    linear-gradient(125deg, #f5f2ff 0%, #f4f6ff 48%, #edf2ff 100%);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 50% -10%, rgba(255,255,255,.82), transparent 48%);
}

a { color: var(--site-accent); }

.legal-page {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 88px;
}

.legal-header {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto 32px;
  padding: 0 24px 28px;
  text-align: center;
}

.legal-header::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  width: 52px;
  height: 3px;
  content: "";
  background: var(--site-accent);
  transform: translateX(50%);
}

.legal-kicker {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--site-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.28;
}

.legal-updated {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}

.legal-card {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 76px) clamp(24px, 8vw, 96px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.82);
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(248,248,255,.62));
  -webkit-backdrop-filter: blur(24px) saturate(115%);
  backdrop-filter: blur(24px) saturate(115%);
  box-shadow: 0 28px 80px rgba(57,53,126,.14), 0 2px 10px rgba(57,53,126,.06), inset 0 1px 0 rgba(255,255,255,.82);
}

.legal-card > * { position: relative; z-index: 1; }

.legal-card::after {
  right: -110px;
  bottom: -130px;
  width: 300px;
  height: 300px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,89,224,.13), transparent 68%);
  filter: blur(2px);
  pointer-events: none;
}

.legal-card::before,
.legal-card::after {
  position: absolute;
  width: 12px;
  height: 12px;
  content: "";
  border-color: rgba(99,89,224,.52);
}

.legal-card::before { top: 18px; left: 18px; border-top: 1px solid; border-left: 1px solid; }
.legal-card::before { z-index: 2; }

.legal-card h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 48px 0 17px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.5;
}

.legal-card h2::before {
  width: 5px;
  height: 22px;
  flex: 0 0 5px;
  content: "";
  background: var(--site-accent);
}

.legal-card h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.legal-card p,
.legal-card li {
  overflow-wrap: anywhere;
  word-break: normal;
  color: var(--body);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 2.05;
}

.legal-card p { margin: 12px 0; text-align: justify; text-justify: inter-ideograph; }
.legal-card h2 + p { margin-top: 0; }
.legal-card ol, .legal-card ul { margin: 14px 0 18px; padding-left: 2em; }
.legal-card li { margin: 7px 0; padding-left: 8px; }

.legal-subclause {
  margin: 20px 0 22px 26px !important;
  padding: 16px 22px 16px 20px;
  border-left: 2px solid rgba(99,89,224,.62);
  background: rgba(99,89,224,.07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-align: left !important;
}

.legal-subclause-label,
.legal-summary-label {
  display: block;
  margin-bottom: 6px;
  color: var(--site-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.legal-summary {
  margin: 28px 0 16px !important;
  padding: 18px 22px;
  border: 1px solid rgba(99,89,224,.20);
  border-radius: 3px;
  background: rgba(255,255,255,.42);
  box-shadow: inset 3px 0 0 var(--site-accent);
  text-align: left !important;
}

.legal-card li::marker {
  color: var(--site-accent);
  font-size: .82em;
  font-weight: 700;
}

.legal-card strong {
  color: #4f46b8;
  font-weight: 700;
  background: linear-gradient(transparent 72%, rgba(99,89,224,.18) 72%);
}

.legal-card p:last-child {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 2px solid var(--site-accent);
  background: rgba(99,89,224,.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: left;
}

.legal-card p:last-child a { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-decoration: none; }

.legal-back-top {
  margin: 0 auto 28px;
  padding: 10px 18px;
  border: 1px solid rgba(99,89,224,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.56);
}

.legal-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 28px auto 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  text-decoration: none;
}

.legal-back:hover, .legal-back:focus-visible,
.legal-card a:hover, .legal-card a:focus-visible {
  color: var(--site-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 640px) {
  .legal-page { width: min(100% - 24px, 560px); padding: 40px 0 52px; }
  .legal-header { margin-bottom: 24px; padding-inline: 8px; }
  .legal-kicker { margin-bottom: 16px; }
  h1 { font-size: 29px; }
  .legal-updated { font-size: 11px; line-height: 1.8; }
  .legal-card { padding: 30px 22px 38px; }
  .legal-card::before { top: 12px; left: 12px; }
  .legal-card::after { right: 12px; bottom: 12px; }
  .legal-card h2 { gap: 11px; margin-top: 38px; font-size: 18px; }
  .legal-card p, .legal-card li { font-size: 15px; line-height: 1.95; }
  .legal-card p { text-align: left; }
  .legal-card ol, .legal-card ul { padding-left: 1.45em; }
  .legal-card li { padding-left: 4px; }
  .legal-subclause { margin-left: 10px !important; padding: 14px 15px; }
  .legal-summary { padding: 15px 16px; }
}

@supports not ((backdrop-filter: blur(1px))) {
  .legal-card,
  .legal-subclause,
  .legal-card p:last-child {
    background: rgba(255, 255, 255, .96);
  }
}

@media print {
  body { background: #fff; }
  .legal-page { width: 100%; padding: 0; }
  .legal-card { box-shadow: none; }
  .legal-back { display: none; }
}

/* ---------------------------------------------------------------
   隐私政策附表：子处理者清单 / DPA 条款摘要 / 模型合规附件
   宽表在窄屏用横向滚动承载，其余页面（用户协议）无 table，不受影响。
   --------------------------------------------------------------- */
.legal-table-wrap {
  margin: 20px 0 26px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, .55);
}

.legal-card table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.75;
}

.legal-card table.legal-table-2col { min-width: 460px; }
.legal-card table.legal-table-2col th:first-child,
.legal-card table.legal-table-2col td:first-child { width: 22%; }

.legal-card th,
.legal-card td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(99, 89, 224, .10);
  color: var(--body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: normal;
}

.legal-card th:last-child,
.legal-card td:last-child { border-right: 0; }
.legal-card tbody tr:last-child th,
.legal-card tbody tr:last-child td { border-bottom: 0; }

.legal-card thead th {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  background: var(--site-accent-faint);
}

.legal-card tbody tr:nth-child(even) { background: rgba(99, 89, 224, .035); }

/* 附表二末尾的签署区 */
.legal-sign {
  margin: 18px 0 26px;
  padding: 16px 20px;
  border-left: 2px solid rgba(99, 89, 224, .62);
  background: var(--site-accent-faint);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.legal-sign p { margin: 6px 0; text-align: left; }
/* 覆盖 .legal-card p:last-child 的高亮块，避免签署区里最后一行被二次装饰 */
.legal-sign p:last-child {
  margin: 6px 0;
  padding: 0;
  border: 0;
  background: none;
}

@media (max-width: 640px) {
  .legal-table-wrap { margin: 16px 0 20px; }
  .legal-card table { min-width: 520px; font-size: 13px; }
  .legal-card th,
  .legal-card td { padding: 9px 11px; font-size: 13px; }
}

@media print {
  .legal-table-wrap { overflow: visible; border-color: #ccc; background: #fff; }
  .legal-card table { min-width: 0; font-size: 10.5px; }
  .legal-card th,
  .legal-card td { padding: 4px 6px; font-size: 10.5px; }
  .legal-card thead th { white-space: normal; }
}

/* 附表下载按钮（隐私协议附录用） */
.legal-download {
  margin: 16px 0 30px !important;
  text-align: left !important;
}

.legal-download a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(99, 89, 224, .30);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  color: var(--site-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}

.legal-download a svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legal-download a:hover,
.legal-download a:focus-visible {
  border-color: var(--site-accent);
  background: var(--site-accent-faint);
  text-decoration: none;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .legal-download a { padding: 9px 15px; font-size: 12px; }
}

@media print {
  .legal-download { display: none; }
}
