/* 規約3ページ（terms / privacy / commercial）共通の体裁。
   文言はHTML側（Word原本と照合済み）。ここでは見た目だけを決める。
   枠（ヘッダー・タブ・フッター）・色・文字は index.html と同じにする（2026-10-15 統一）。 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;600;700&display=swap");
:root {
  color-scheme: light;
  --bg: #ffffff;
  --muted: #f6f7f9;
  --line: #e6e8ec;
  --line-strong: #d3d8e0;
  --text: #172033;
  --sub: #667085;
  --faint: #98a2b3;
  --red: #d92d20;
  --red-weak: #fef3f2;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 14px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* ヘッダー（index.html の .topbar と同じ） */
.topbar { border-bottom: 1px solid var(--line); background: var(--bg); }
.topbar-in { max-width: 1440px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand .icon { width: 28px; height: 28px; }
.brand .name { height: 15px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 6px 12px; border-radius: 8px; color: var(--sub); white-space: nowrap; }
.nav a:hover { background: var(--muted); color: var(--text); }

/* 本文の枠（index.html の main と同じ幅・余白。文章は読みやすい幅で止める） */
main { max-width: 1440px; margin: 0 auto; padding: 24px 16px 64px; }   /* 1120→1440（2026-10-21 アプリに合わせた） */
main > :not(.doc-tabs) { max-width: 760px; }

/* 3文書の切り替え（index.html の工事ページのタブと同じチップ） */
.doc-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.doc-tabs a { display: inline-flex; align-items: center; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 99px;
  background: var(--bg); color: var(--sub); font-size: 13px; white-space: nowrap; transition: background .15s, border-color .15s; }
.doc-tabs a:hover { color: var(--text); background: var(--muted); }
.doc-tabs a[aria-current="page"] { color: #fff; background: var(--text); border-color: var(--text); font-weight: 600; }

/* 見出し・段落 */
h1 { font-size: 22px; font-weight: 700; line-height: 1.35; margin: 0 0 16px; }
h2 { font-size: 16px; font-weight: 700; line-height: 1.5; margin: 32px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); }
h3 { font-size: 15px; font-weight: 700; line-height: 1.6; margin: 20px 0 6px; }
main p { margin: 0; line-height: 1.85; }
p.sp { margin-top: 12px; }  /* 原本で前に空行があった段落 */

/* 項（1. 2. …）と号（(1) (2) …）。番号は原文の文字のまま、2行目以降を本文の頭にそろえる */
.item, .sub { display: grid; grid-template-columns: 2.3em 1fr; }
.item { margin-top: 6px; }
.sub { margin: 2px 0 0 1.5em; }
.item + .sub { margin-top: 4px; }
:is(h1, h2, h3) + p:is(.sp, .item, .sub) { margin-top: 0; }

/* 未確定箇所（原本の赤字） */
.todo { color: var(--red); background: var(--red-weak); border-radius: 6px; padding: 4px 10px; margin-left: -10px; margin-right: -10px; }
.sub.todo { margin-left: calc(1.5em - 10px); }

/* 特定商取引法に基づく表記（index.html の表と同じ線・見出し色） */
.spec { width: 100%; border-collapse: collapse; border: 1px solid var(--line); }
.spec th, .spec td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.85; }
.spec th { width: 14em; background: var(--muted); font-size: 13px; font-weight: 600; color: var(--sub); }
.spec .todo { display: inline-block; margin-left: -10px; margin-right: 0; }

/* フッター（index.html の .foot と同じ） */
.foot { max-width: 1440px; margin: 0 auto; padding: 0 16px 32px; color: var(--faint); font-size: 12px; }

@media (max-width: 640px) {
  .spec, .spec tbody, .spec tr, .spec th, .spec td { display: block; width: auto; }
  .spec th { padding: 8px 14px; border-bottom: 0; }
  .spec td { padding: 8px 14px 14px; }
}
@media (max-width: 560px) {
  .topbar-in { gap: 8px; }
  .brand { gap: 6px; }
  .brand .icon { width: 24px; height: 24px; }
  .brand .name { height: 12px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  h1 { font-size: 19px; }
}

@media print {
  .topbar, .doc-tabs, .foot { display: none; }
  main { max-width: none; padding: 0; }
  main > :not(.doc-tabs) { max-width: none; }
  body { font-size: 10.5pt; }
  h2, h3 { break-after: avoid; }
  .item, .sub, .spec tr { break-inside: avoid; }
}

/* 2026-11-05: 狭い画面の上部ナビゲーションを折り返す */
@media (max-width: 640px) { .topbar-in { height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; } .nav { width: 100%; margin-left: 0; flex-wrap: wrap; } .nav a { padding: 6px 8px; } }
