/* AniVoyage Legal Document Page Styles
 *
 * 規約ページ専用スタイル。既存 style.css（認証ページ）とは独立。
 * - レスポンシブ（モバイル ストア審査閲覧対応）
 * - ライト/ダーク自動切替（prefers-color-scheme）
 * - 印刷スタイル（@media print）
 */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f9;
  --fg: #1a1a1a;
  --fg-muted: #5a5a64;
  --fg-subtle: #8a8a94;
  --link: #2a5bd7;
  --link-hover: #1a3d9d;
  --border: #e4e4ea;
  --brand: #6b46c1;
  --max-width: 720px;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14141a;
    --bg-soft: #1c1c24;
    --fg: #f0f0f4;
    --fg-muted: #b8b8c4;
    --fg-subtle: #8a8a94;
    --link: #8ab4ff;
    --link-hover: #c5d6ff;
    --border: #2a2a34;
    --brand: #b794f4;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica,
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo,
    Arial, sans-serif;
  font-feature-settings: "palt";
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legal {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.brand {
  margin: 0 0 24px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand a {
  color: var(--brand);
  text-decoration: none;
}

.brand a:hover {
  text-decoration: underline;
}

article {
  font-size: 1rem;
}

article h1 {
  margin: 0 0 24px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

article h2 {
  margin: 32px 0 12px;
  padding-top: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--fg);
}

article h3 {
  margin: 20px 0 8px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--fg-muted);
}

article p {
  margin: 0 0 14px;
  color: var(--fg);
}

article ul {
  margin: 8px 0 16px;
  padding-left: 1.4em;
}

article li {
  margin: 4px 0;
}

article a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

article a:hover {
  color: var(--link-hover);
}

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--fg-subtle);
  text-align: center;
}

footer a {
  color: var(--fg-muted);
  text-decoration: none;
  padding: 4px 8px;
}

footer a:hover {
  color: var(--link);
  text-decoration: underline;
}

footer .sep {
  color: var(--border);
  margin: 0 4px;
}

/* スモールスクリーン */
@media (max-width: 480px) {
  .legal {
    padding: 16px 16px 48px;
  }
  article h1 {
    font-size: 1.4rem;
  }
  article h2 {
    font-size: 1.08rem;
  }
}

/* 印刷スタイル */
@media print {
  :root {
    --bg: #ffffff;
    --fg: #000000;
    --fg-muted: #333333;
    --fg-subtle: #666666;
    --border: #cccccc;
  }
  body {
    font-size: 11pt;
    line-height: 1.6;
  }
  .legal {
    max-width: 100%;
    padding: 0;
  }
  .brand,
  footer {
    border-color: #cccccc;
  }
  footer {
    font-size: 9pt;
  }
  article h1 {
    font-size: 18pt;
  }
  article h2 {
    font-size: 13pt;
    page-break-after: avoid;
  }
  article h3 {
    font-size: 11pt;
    page-break-after: avoid;
  }
  article p,
  article li {
    page-break-inside: avoid;
  }
  a {
    color: #000000 !important;
    text-decoration: underline;
  }
}
