:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-muted: #eef3f8;
  --text: #1f2937;
  --text-muted: #5b6472;
  --line: #d8dee8;
  --accent: #0f4c81;
  --accent-soft: #dfeefb;
  --warning-bg: #fff7e8;
  --warning-line: #f1d08a;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
}

a:hover {
  color: #0b3a62;
}

.container {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.legal-header {
  background: linear-gradient(180deg, #ffffff 0%, #f2f7fc 100%);
  border-bottom: 1px solid var(--line);
}

.legal-header .container {
  padding: 28px 0 24px;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.15;
}

.lede {
  max-width: 760px;
  margin: 12px 0 10px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  font-size: 0.95rem;
}

.legal-content {
  padding: 26px 0 48px;
}

.card,
.notice,
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.notice,
.toc {
  padding: 18px 20px;
  margin-bottom: 18px;
}

.notice {
  background: var(--warning-bg);
  border-color: var(--warning-line);
}

.notice p:last-child,
.toc p:last-child {
  margin-bottom: 0;
}

.toc h2 {
  margin-top: 0;
}

.toc ol {
  margin: 12px 0 0;
  padding-left: 22px;
  columns: 2;
  column-gap: 28px;
}

.toc li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.section h3 {
  margin: 18px 0 8px;
  font-size: 1.05rem;
}

.section p,
.section ul,
.section ol,
.section table {
  margin: 0 0 14px;
}

.section p:last-child,
.section ul:last-child,
.section ol:last-child,
.section table:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: 22px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 10px;
  border-top: 1px solid var(--line);
}

thead th {
  border-top: 0;
  background: var(--surface-muted);
  font-weight: 700;
}

tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.inline-code {
  font-family: Consolas, "Courier New", monospace;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.94em;
}

.footnote {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-list li + li {
  margin-top: 6px;
}

.legal-footer {
  padding: 8px 0 32px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 920px);
  }

  .toc ol {
    columns: 1;
  }

  .section,
  .notice,
  .toc {
    padding: 18px;
  }

  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody td {
    border-top: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
    background: transparent;
  }

  tbody tr:last-child td:last-child {
    border-bottom: 0;
  }
}