@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/inter-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/inter-600-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --yellow: #ffd100;
  --ink: #1c1917;
  --muted: #6b6561;
  --border: #e7e5e4;
  --surface: #fafaf9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.75; }
a { color: #725c00; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.legal-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.legal-header-inner { display: flex; width: min(1180px, calc(100% - 40px)); min-height: 72px; margin: 0 auto; align-items: center; justify-content: space-between; }
.legal-brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.legal-brand img { display: block; width: 72px; height: auto; aspect-ratio: 320 / 261; }
.back-home { color: var(--ink); font-size: 14px; font-weight: 600; }
.legal-header-actions { display: flex; align-items: center; gap: 16px; }
.legal-language { display: flex; max-width: min(54vw, 590px); gap: 4px; overflow-x: auto; scrollbar-width: none; }
.legal-language::-webkit-scrollbar { display: none; }
.legal-language a { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: var(--muted); font-size: 12px; line-height: 1.4; text-decoration: none; }
.legal-language a:hover { background: #fff7cc; color: var(--ink); }
.legal-language a[aria-current="true"] { background: var(--yellow); color: var(--ink); font-weight: 600; }

.legal-shell { display: grid; grid-template-columns: 190px minmax(0, 760px) 190px; gap: 34px; width: min(1220px, calc(100% - 40px)); margin: 42px auto 72px; align-items: start; justify-content: center; }
.legal-sidebar, .legal-toc { position: sticky; top: 104px; }
.legal-sidebar > p, .legal-toc > p { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.legal-sidebar nav, .legal-toc nav { display: grid; gap: 4px; }
.legal-sidebar a, .legal-toc a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; line-height: 1.45; text-decoration: none; }
.legal-sidebar a:hover, .legal-toc a:hover { background: #fff7cc; color: var(--ink); }
.legal-sidebar a[aria-current="page"] { background: var(--yellow); color: var(--ink); font-weight: 600; }

.legal-breadcrumb { display: flex; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.legal-document { padding: clamp(26px, 5vw, 58px); border: 1px solid var(--border); border-radius: 20px; background: #fff; box-shadow: 0 12px 36px rgba(28,25,23,.05); }
.legal-document h1 { margin: 0 0 22px; font-size: clamp(30px, 5vw, 44px); line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.legal-document h2 { margin: 48px 0 16px; padding-top: 4px; font-size: 24px; line-height: 1.35; scroll-margin-top: 100px; }
.legal-document h3 { margin: 30px 0 12px; font-size: 18px; line-height: 1.45; scroll-margin-top: 100px; }
.legal-document p { margin: 0 0 16px; overflow-wrap: anywhere; }
.legal-document ul, .legal-document ol { margin: 12px 0 20px; padding-left: 24px; }
.legal-document li { margin: 7px 0; padding-left: 4px; }
.legal-document strong { font-weight: 650; }
.legal-document code { padding: 2px 6px; border-radius: 5px; background: #f5f5f4; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 32px; padding: 16px 18px; border-left: 4px solid var(--yellow); border-radius: 8px; background: #fff9dc; }
.legal-meta p { margin: 0; color: #514b46; font-size: 13px; }
.legal-table-wrap { margin: 18px 0 28px; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.legal-table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
.legal-table-wrap th, .legal-table-wrap td { min-width: 150px; padding: 12px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal-table-wrap th { background: #fafaf9; font-weight: 600; }
.legal-table-wrap tr:last-child td { border-bottom: 0; }
.legal-table-wrap th:last-child, .legal-table-wrap td:last-child { border-right: 0; }

.deletion-panel { margin-top: 36px; padding: 28px; border: 1px solid #dbe3ec; border-radius: 18px; background: #f8fafc; }
.deletion-panel h2 { margin-top: 0; }
.deletion-panel form { display: grid; gap: 18px; }
.deletion-field { display: grid; gap: 8px; }
.deletion-field label { color: var(--ink); font-weight: 700; }
.deletion-field input { width: 100%; min-height: 48px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; padding: 11px 13px; }
.deletion-email-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.deletion-code-button { min-height: 48px; border: 1px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; padding: 10px 16px; white-space: nowrap; }
.deletion-code-button:hover:not(:disabled) { background: #fff7cc; }
.deletion-code-button:disabled { cursor: not-allowed; opacity: .65; }
.deletion-field input:focus, .deletion-confirm input:focus-visible, .deletion-code-button:focus-visible, .deletion-submit:focus-visible { outline: 3px solid rgba(255,209,0,.45); outline-offset: 2px; border-color: var(--ink); }
.deletion-confirm { display: flex; align-items: flex-start; gap: 10px; color: #334155; cursor: pointer; }
.deletion-confirm input { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--ink); }
.deletion-submit { min-height: 48px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer; font: inherit; font-weight: 800; padding: 12px 20px; transition: transform 160ms ease, background 160ms ease, color 160ms ease; }
.deletion-submit:hover:not(:disabled) { background: var(--yellow); color: var(--ink); transform: translateY(-1px); }
.deletion-submit:disabled { cursor: wait; opacity: .7; }
.deletion-privacy { margin: -4px 0 0 !important; color: #64748b !important; font-size: .875rem; }
.deletion-status { border: 1px solid; border-radius: 10px; font-weight: 700; padding: 12px 14px; }
.deletion-status.is-success { border-color: #86efac; background: #f0fdf4; color: #166534; }
.deletion-status.is-info { border-color: #93c5fd; background: #eff6ff; color: #1e40af; }
.deletion-status.is-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

.legal-footer { padding: 26px 20px; border-top: 1px solid #3f3a37; background: var(--ink); color: #d6d3d1; text-align: center; }
.legal-footer p { max-width: 900px; margin: 3px auto; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
  .legal-shell { grid-template-columns: 180px minmax(0, 1fr); }
  .legal-toc { display: none; }
}

@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .legal-shell { display: block; width: calc(100% - 28px); max-width: 760px; margin-top: 20px; }
  .legal-main, .legal-document { width: 100%; min-width: 0; }
  .legal-sidebar { position: static; margin-bottom: 18px; overflow-x: auto; }
  .legal-sidebar > p { display: none; }
  .legal-sidebar nav { display: flex; width: max-content; gap: 6px; }
  .legal-sidebar a { white-space: nowrap; }
  .legal-document { padding: 24px 20px 36px; border-radius: 14px; }
  .legal-document h1 { max-width: 100%; font-size: 28px; word-break: normal; overflow-wrap: break-word; }
  .deletion-panel { padding: 22px 18px; }
  .deletion-email-row { grid-template-columns: 1fr; }
  .legal-document h2 { margin-top: 38px; font-size: 21px; }
  .legal-header-inner { width: calc(100% - 28px); min-width: 0; overflow: hidden; }
  .legal-brand { flex: 0 0 auto; }
  .legal-header-actions { min-width: 0; gap: 8px; }
  .legal-language { min-width: 0; max-width: 48vw; }
  .back-home { display: none; }
}
