:root {
  --bg: #F2EDE3;
  --surface: #FBF8F1;
  --ink: #1A1A1A;
  --ink-2: #4A4A4A;
  --ink-3: #7A7A78;
  --line: #D9D2C2;
  --pkv: #1F3A5F;
  --warn: #B85A20;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.legal-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-top {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.legal-top a {
  color: var(--pkv);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

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

.legal-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.1;
  margin-bottom: 12px;
}

.legal-lede {
  color: var(--ink-2);
  font-size: 15px;
}

.legal-content h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  margin: 36px 0 12px;
  color: var(--ink);
}

.legal-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--ink);
}

.legal-content p,
.legal-content li {
  color: var(--ink-2);
  font-size: 15px;
  margin-bottom: 12px;
}

.legal-content ul {
  margin: 0 0 16px 20px;
}

.legal-content a {
  color: var(--pkv);
}

.legal-content strong {
  color: var(--ink);
  font-weight: 500;
}

.legal-meta {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 8px;
}

.legal-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}

.legal-footer a {
  color: var(--pkv);
  text-decoration: none;
  font-weight: 500;
}

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

.legal-footer .app-version {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.03em;
}

@media (max-width: 760px) {
  .legal-wrap { padding: 32px 16px 64px; }
  h1 { font-size: 28px; }
  .legal-content h2 { font-size: 19px; margin-top: 28px; }
  .legal-content p,
  .legal-content li { font-size: 14px; }
}

.legal-notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  padding: 14px 16px;
  border-radius: 3px;
  margin: 24px 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* 404 */
.error-page-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(45, 95, 79, 0.06) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(31, 58, 95, 0.06) 0%, transparent 42%);
  background-attachment: fixed;
}

.error-page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.error-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.error-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
}

.error-brand:hover { color: var(--pkv); }

.error-eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.error-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 40px 36px 36px;
  box-shadow: 0 2px 24px rgba(26, 26, 26, 0.04);
}

.error-code {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(72px, 18vw, 120px);
  line-height: 0.9;
  font-weight: 300;
  color: var(--line);
  margin-bottom: 8px;
  letter-spacing: -0.04em;
  user-select: none;
}

.error-main h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--ink);
}

.error-main h1 em {
  font-style: italic;
  color: var(--pkv);
}

.error-lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 28px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.error-btn-primary {
  display: inline-block;
  padding: 14px 24px;
  background: var(--pkv);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.error-btn-primary:hover {
  background: #162d4a;
  transform: translateY(-1px);
}

.error-btn-secondary {
  display: inline-block;
  padding: 14px 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 3px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.error-btn-secondary:hover {
  border-color: var(--pkv);
  color: var(--pkv);
}

.error-footer {
  margin-top: 32px;
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.error-footer a {
  color: var(--pkv);
  text-decoration: none;
  font-weight: 500;
}

.error-footer a:hover { text-decoration: underline; }

.error-footer-sep { opacity: 0.5; }

.error-footer .app-version {
  margin-top: 0;
}

@media (max-width: 760px) {
  .error-page { padding: 32px 16px 48px; }
  .error-main { padding: 28px 22px 24px; }
  .error-actions { flex-direction: column; align-items: stretch; }
  .error-btn-primary,
  .error-btn-secondary { text-align: center; }
}
