/*
 * 法務 3 ページ（利用規約・プライバシーポリシー・特定商取引法に基づく表記）で共有する見た目。
 *
 * LP（index.html）とは別に持っている。あちらは世界観を見せるページで、
 * こちらは読ませるページなので、字送りと余白の作りが違う。
 * 色だけは AppTheme と揃えてあり、行き来しても同じサービスに見える。
 */

/*
 * 共通フッタと言語切り替えの文字サイズ。
 * **index.html / press-kit.html の --step--1 と同じ定義**にしてある——
 * 同じ部品が別の大きさで出ると、行き来したときに作りかけに見える。
 * 法務ページ本来の補助テキスト（.updated / .reference-note）は 0.85rem のまま。
 * あちらは本文の一部で、この尺度とは別物。
 */
:root {
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
}

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

body {
  /* 先頭は index.html / press-kit.html と同じ書体。行き来しても同じサービスに見せる。
     中国語は Zen Kaku に字が無いので、後ろの PingFang / YaHei が受け持つ */
  font-family: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo,
    "PingFang SC", "PingFang TC", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
  color: #f3f4f8;
  background: #0f111a;
  padding: 24px 16px;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  background: #1a1d2e;
  border: 1px solid #2a2f4c;
  border-radius: 12px;
  padding: 32px 24px;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #f3f4f8;
}

.updated {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 32px;
}

h2 {
  font-size: 1.15rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: #f3f4f8;
  border-bottom: 1px solid #2a2f4c;
  padding-bottom: 4px;
}

h3 {
  font-size: 1rem;
  margin-top: 16px;
  margin-bottom: 8px;
}

p { margin-bottom: 12px; }

ul, ol { margin: 8px 0 12px 20px; }

li { margin-bottom: 4px; }

/*
 * 本文中のリンクは地の文と同じ明るさにし、下線でだけリンクと分かるようにする。
 * 青は既定のリンク色そのもので、条文の中に置くと視線がそこで止まる——
 * 読ませたいのは本文で、リンクはその補助。
 */
a {
  color: inherit;
  text-decoration-line: underline;
  /* 下線は地の文より 1 段暗い程度に留める。薄くしすぎるとリンクだと
     気付けず、法務文書では参照先へ辿れないことが実害になる */
  text-decoration-color: #9ca3af;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

a:hover { text-decoration-color: #f3f4f8; }

.contact { margin-top: 24px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid #2a2f4c;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #232741;
  font-weight: 600;
  color: #f3f4f8;
}

td { background: #1a1d2e; }

/* 見出し行ではなく項目名の列として使う表（特商法・PP の一部）。
   幅を決めておかないと、訳文の長さで列幅が言語ごとに変わる */
.labeled th { width: 34%; }

/* ── 言語切り替え ────────────────────────── */

/*
 * LP と違い position: fixed にしない。
 * 法務ページは長く、スクロール中ずっと本文に重なるため。
 */
/*
 * index.html / press-kit.html と同じ見た目。
 * **位置だけ違う**——あちらは画面右上に絶対配置だが、こちらは読ませるページなので
 * 本文の上に置いて一緒に流れるようにしてある（狭い画面で本文にかぶらない）。
 */
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 3px;
  border: 1px solid #2a2f4c;
  border-radius: 999px;
  background: rgba(15, 17, 26, 0.78);
  backdrop-filter: blur(8px);
  width: fit-content;
  /* 本文（.container）の右端に揃える。外側の .lang-bar が幅を決める */
  margin: 0 0 12px auto;
}

/* 右端は .container の中身に合わせる（枠ではなく）。
   フッタの文字の左端と合わせて、ページの縦線を 1 本に保つ */
.lang-bar {
  max-width: 720px;
  margin: 0 auto;
  padding-inline: 24px;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-family: inherit;
  font-size: var(--step--1);
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-switch button:hover { color: #f3f4f8; }

.lang-switch button[aria-current="true"] {
  color: #0f111a;
  background: #e2e8f0;
}

/*
 * 選ばれていない言語の本文は消す。
 * **既定を hidden にしない**——JS が落ちても既定言語は読める形にしてある
 * （[data-lang-body] のうち hidden 属性が付いたものだけが消える）。
 */
[data-lang-body][hidden] { display: none; }

/* 訳文であることの断り。正文は日本語であることを各言語で示す */
.reference-note {
  font-size: 0.85rem;
  color: #9ca3af;
  border-left: 2px solid #2a2f4c;
  padding-left: 12px;
  margin-bottom: 24px;
}

/* ── フッター ────────────────────────────── */
/*
 * index.html / press-kit.html と同一。色は AppTheme の値を直に書き、
 * 文字サイズは --step--1（あちらと同じ定義）から引く。
 * verify-footer-i18n.js が HTML の同一性を見ている。
 */
footer {
  border-top: 1px solid #2a2f4c;
  /* 本文カードとの間を空ける。詰まっているとカードの下辺と区切り線が
     二重の線に見えて、フッタが本文の続きに見える */
  margin-top: 4rem;
  padding-block: 3rem 4rem;
}

/* index.html / press-kit.html は .wrap が本文幅を作る。フッタを同じ作りに
   保つため、こちらにも同名で置く（legal.css の他の箇所では使わない）。
   左右の余白は .container と同じ 24px——文字の左端をカードの中身に揃える
   （枠に揃えると、本文より 24px 外側から始まって段が付いて見える） */
footer .wrap {
  max-width: 720px;
  margin: 0 auto;
  padding-inline: 24px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.footer-mark {
  font-size: var(--step--1);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: #9ca3af;
}

.footer-mark a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-mark a:hover { color: #f3f4f8; }

nav.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: var(--step--1);
}

nav.legal a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav.legal a:hover { color: #f3f4f8; }

/* 規約の列より一段下げる。連絡先はリンク集の一員ではない */
.footer-contact {
  margin-top: -0.25rem;
  font-size: var(--step--1);
}

.footer-contact a {
  color: #9ca3af;
  text-decoration: none;
  border-bottom: 1px solid #2a2f4c;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-contact a:hover { color: #f3f4f8; border-color: #e2e8f0; }

.copyright {
  margin-top: 2rem;
  font-size: var(--step--1);
  color: #9ca3af;
  opacity: 0.7;
}
