/* ==========================================================================
   実家どうする — site.css
   静的ページ（/ と /tool/ ほか）共通。トークンは WordPress テーマにも流用する。
   仕様：docs/DESIGN.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* 緑（ブランド） */
  --green-900: #123d2c;   /* フッター地・濃い面 */
  --green-800: #17503a;
  --green-700: #1b6446;   /* ブランド緑：ロゴ・見出しの罫・アイコン */
  --green-600: #1f7a52;   /* 行動の緑：主ボタン・リンク（白地 5:1 以上） */
  --green-500: #2f9467;
  --green-200: #bfdccb;
  --green-100: #dcede3;
  --green-50:  #eff7f2;

  /* 役割 */
  --canvas:        #ffffff;  /* ページ地は白 */
  --surface:       #ffffff;
  --surface-alt:   #f4f7f5;  /* 交互のセクション地（ごく薄いグレーグリーン） */
  --surface-sunk:  #edf2ee;  /* 表の見出し行 */
  --text:          #222a26;
  --text-strong:   #15261e;
  --text-muted:    #4d5a53;  /* 白地で 7:1 以上 */
  --error:         #a52b22;
  --border:        #d6dfd9;
  --border-strong: #a8b8ae;
  --link:          #1f7a52;
  --link-visited:  #56507f;
  --action:        #1f7a52;
  --action-hover:  #17603f;
  --action-text:   #ffffff;
  --focus:         #f2b705;

  --caution-bg:  #fdf6e3;  --caution-border: #a86b00;  --caution-text: #6b4500;
  --note-bg:     #eff7f2;  --note-border:    #1f7a52;
  --ok-text:     #1d6b45;

  /* 字体 */
  --font-body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --font-head: "BIZ UDPGothic", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;

  /* 文字サイズ：本文 18px 基準。最小は 14px（注釈） */
  --fs-note: 0.875rem;   /* 14px */
  --fs-small: 1rem;      /* 16px */
  --fs-body: 1.125rem;   /* 18px */
  --fs-lead: 1.25rem;    /* 20px */
  --fs-h4: 1.25rem;      /* 20px */
  --fs-h3: 1.375rem;     /* 22px */
  --fs-h2: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);    /* 24→30px */
  --fs-h1: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);      /* 28→40px */

  --lh-body: 1.85;
  --lh-tight: 1.45;

  /* 余白（4px 基準） */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;  --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;    --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 6rem;
  --section-gap: clamp(3.5rem, 2.5rem + 3.5vw, 5.5rem);

  --measure: 40em;
  --container: 72rem;    /* 1152px */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-card: 0 1px 3px rgba(21, 38, 30, .08), 0 6px 18px rgba(21, 38, 30, .07);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #101714;  --surface: #16201b;  --surface-alt: #131c18;  --surface-sunk: #1c2923;
    --text: #e2eae5;  --text-strong: #f2f7f4;  --text-muted: #b1c0b7;
    --error: #ff9b91;
    --border: #2b3b33;  --border-strong: #41574b;
    --link: #7fd1a6;  --link-visited: #c3b8f0;
    --action: #3fae78;  --action-hover: #5cc08f;  --action-text: #0b1510;
    --green-50: #15251d;  --green-100: #1a3024;  --green-200: #2a4a39;
    --green-700: #7fd1a6;  --green-900: #0a1611;
    --note-bg: #15251d;  --note-border: #3fae78;
    --caution-bg: #2a2110;  --caution-border: #d6a13a;  --caution-text: #f1d49a;
    --ok-text: #7fd3a6;
    --shadow-card: 0 1px 3px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101714;  --surface: #16201b;  --surface-alt: #131c18;  --surface-sunk: #1c2923;
  --text: #e2eae5;  --text-strong: #f2f7f4;  --text-muted: #b1c0b7;
  --error: #ff9b91;
  --border: #2b3b33;  --border-strong: #41574b;
  --link: #7fd1a6;  --link-visited: #c3b8f0;
  --action: #3fae78;  --action-hover: #5cc08f;  --action-text: #0b1510;
  --green-50: #15251d;  --green-100: #1a3024;  --green-200: #2a4a39;
  --green-700: #7fd1a6;  --green-900: #0a1611;
  --note-bg: #15251d;  --note-border: #3fae78;
  --caution-bg: #2a2110;  --caution-border: #d6a13a;  --caution-text: #f1d49a;
  --ok-text: #7fd3a6;
  --shadow-card: 0 1px 3px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.3);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-wrap: anywhere;
  line-break: strict;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-strong);
  font-weight: 700;
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-4);
  letter-spacing: .02em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p, ul, ol, dl, table { margin: 0 0 var(--sp-5); }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--link); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:visited { color: var(--link-visited); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

strong { font-weight: 700; color: var(--text-strong); }
small, .note { font-size: var(--fs-note); line-height: 1.7; color: var(--text-muted); }
.num { font-variant-numeric: tabular-nums; }
.plain-list { list-style: none; padding: 0; margin: 0; }

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 100;
  background: var(--surface); padding: var(--sp-2) var(--sp-4); border: 2px solid var(--action);
}
.skip-link:focus { top: var(--sp-4); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* アイコン（inline SVG、線画） */
.icon { width: 1.5em; height: 1.5em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--measure); }
.section { padding-block: var(--section-gap); }
.section--alt { background: var(--surface-alt); }
.section--tight { padding-block: var(--sp-7); }

/* 見出し：左に緑の縦罫（日本の不動産サイトの定番） */
.heading-bar { display: flex; gap: var(--sp-3); align-items: stretch; font-size: var(--fs-h2); margin-bottom: var(--sp-5); }
.heading-bar::before { content: ""; flex: none; width: 6px; border-radius: 3px; background: var(--green-600); }
.section__head { margin-bottom: var(--sp-6); }
.section__head p { max-width: var(--measure); color: var(--text-muted); }
.section__foot { margin-top: var(--sp-6); }
.more-link { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 700; }
.more-link::after { content: "›"; font-size: 1.3em; line-height: 1; text-decoration: none; }

/* ページ見出し（下層ページ） */
.page-head { background: var(--green-50); border-bottom: 1px solid var(--green-100); padding-block: var(--sp-7) var(--sp-6); }
.page-head h1 { margin-bottom: var(--sp-3); }
.page-head p { color: var(--text-muted); max-width: var(--measure); margin: 0; }
.breadcrumb { font-size: var(--fs-note); color: var(--text-muted); margin-bottom: var(--sp-4); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: var(--sp-2); }
.breadcrumb a { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   4. Header / Footer
   -------------------------------------------------------------------------- */
.site-header { background: var(--surface); border-top: 4px solid var(--green-600); border-bottom: 1px solid var(--border); position: relative; z-index: 10; }
.site-header__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); text-decoration: none; color: var(--text-strong); }
.brand:visited { color: var(--text-strong); }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__name { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; letter-spacing: .06em; line-height: 1.1; }
.brand__tag { display: block; font-size: var(--fs-note); color: var(--text-muted); letter-spacing: .02em; margin-top: 2px; }
.header-cta { font-size: var(--fs-small); min-height: 48px; padding-inline: var(--sp-5); }

.global-nav { border-top: 1px solid var(--border); }
.global-nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.global-nav li { flex: 1 1 0; }
.global-nav a {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 56px; padding: var(--sp-2) var(--sp-3);
  color: var(--text-strong); text-decoration: none; font-size: var(--fs-small); font-weight: 500; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.global-nav li + li a { border-left: 1px solid var(--border); }
.global-nav a:visited { color: var(--text-strong); }
.global-nav a:hover { background: var(--green-50); color: var(--green-700); }
.global-nav a[aria-current="page"] { border-bottom-color: var(--green-600); color: var(--green-700); font-weight: 700; }
.global-nav .icon { width: 1.25em; height: 1.25em; color: var(--green-700); }

.site-footer { background: var(--green-900); color: #d9e6de; padding-block: var(--sp-8) var(--sp-6); font-size: var(--fs-small); }
.site-footer a, .site-footer a:visited { color: #ffffff; }
.site-footer h2 { color: #ffffff; font-size: var(--fs-body); margin-bottom: var(--sp-3); }
.site-footer__grid { display: grid; gap: var(--sp-6); grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.site-footer__brand { display: flex; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
.site-footer__brand .brand__mark { width: 34px; height: 34px; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.18); margin-top: var(--sp-7); padding-top: var(--sp-5); font-size: var(--fs-note); color: #bfd1c6; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 56px; padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-head); font-size: var(--fs-body); font-weight: 700; line-height: 1.3;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn--primary, .btn--primary:visited { background: var(--action); color: var(--action-text); box-shadow: 0 2px 0 var(--green-900); }
.btn--primary:hover { background: var(--action-hover); }
.btn--secondary, .btn--secondary:visited { background: var(--surface); color: var(--link); border-color: var(--link); }
.btn--secondary:hover { background: var(--green-50); }
.btn--block { display: flex; width: 100%; }
.btn__arrow { width: 1.1em; height: 1.1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------------------
   6. Hero（トップ）：家の写真 + 診断の1問目
   -------------------------------------------------------------------------- */
.hero { position: relative; background: var(--green-900); color: #fff; overflow: hidden; }
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; filter: brightness(1.3) contrast(.95) saturate(1.1); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,34,24,.72) 0%, rgba(12,34,24,.45) 40%, rgba(12,34,24,0) 70%); }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: var(--sp-7); align-items: center; padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.hero__eyebrow { display: inline-block; font-family: var(--font-head); font-size: var(--fs-small); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 2px 14px; margin-bottom: var(--sp-4); }
.hero h1 { color: #fff; font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.75rem); margin-bottom: var(--sp-4); text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero__lead { font-size: var(--fs-lead); line-height: 1.8; margin: 0; max-width: 26em; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.hero__credit { position: absolute; right: var(--sp-3); bottom: var(--sp-2); z-index: 1; font-size: var(--fs-note); color: rgba(255,255,255,.8); }
.hero__credit a { color: inherit; }

/* 診断の質問カード（トップの Q1、診断ページで共通） */
.quiz { background: var(--surface); color: var(--text); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,.25); overflow: hidden; }
.quiz__bar { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); background: var(--green-700); color: #fff; font-size: var(--fs-small); }
.quiz__bar strong { color: #fff; font-family: var(--font-head); }
.quiz__body { padding: var(--sp-5); }
.quiz__q { font-size: var(--fs-h4); margin-bottom: var(--sp-4); }
.choices { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.choice {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  min-height: 56px; padding: var(--sp-2) var(--sp-4);
  background: var(--surface); color: var(--text-strong);
  border: 2px solid var(--border); border-radius: var(--radius);
  font: inherit; font-size: var(--fs-small); font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
}
.choice:visited { color: var(--text-strong); }
.choice:hover { border-color: var(--action); background: var(--green-50); }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--action); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--action); }
.choice::after { content: "›"; margin-left: auto; font-size: 1.4em; line-height: 1; color: var(--green-600); }
.quiz__foot { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin: var(--sp-4) 0 0; font-size: var(--fs-note); color: var(--text-muted); }
.quiz__foot span::before { content: "✓ "; color: var(--ok-text); font-weight: 700; }

/* --------------------------------------------------------------------------
   7. 5つの選択肢：入口ボタン帯（ヒーロー直下）
   -------------------------------------------------------------------------- */
.entry-band { background: var(--surface); border-bottom: 1px solid var(--border); }
.entry-band__title { font-size: var(--fs-small); color: var(--text-muted); font-family: var(--font-body); font-weight: 500; text-align: center; margin: 0; padding-top: var(--sp-5); }
.entries { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); list-style: none; padding: var(--sp-4) 0 var(--sp-6); margin: 0; }
.entry {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); height: 100%;
  padding: var(--sp-4) var(--sp-2) var(--sp-3); text-align: center; text-decoration: none;
  background: var(--surface); color: var(--text-strong);
  border: 1px solid var(--border); border-bottom: 3px solid var(--green-600); border-radius: var(--radius);
}
.entry:visited { color: var(--text-strong); }
.entry:hover { background: var(--green-50); border-color: var(--green-600); }
.entry__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green-50); color: var(--green-700); }
.entry__icon .icon { width: 30px; height: 30px; }
.entry__name { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h4); line-height: 1.3; }
.entry__desc { font-size: var(--fs-note); color: var(--text-muted); line-height: 1.5; }

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); }
.card--shadow { box-shadow: var(--shadow-card); }
.card__title { font-size: var(--fs-h4); margin-bottom: var(--sp-2); }
.card-grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 写真つきカード（5つの選択肢など） */
.photo-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--text); }
.photo-card:visited { color: var(--text); }
.photo-card:hover { border-color: var(--green-600); box-shadow: var(--shadow-card); }
.photo-card__img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; background: var(--surface-sunk); }
.photo-card__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4) var(--sp-5) var(--sp-5); flex: 1; }
.photo-card__title { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h4); color: var(--text-strong); display: flex; align-items: center; gap: var(--sp-2); margin: 0; }
.photo-card__title .icon { color: var(--green-700); }
.photo-card p { font-size: var(--fs-small); margin: 0; }
.photo-card__more { margin-top: auto; padding-top: var(--sp-2); color: var(--link); font-weight: 700; font-size: var(--fs-small); }
.photo-card__more::after { content: " ›"; }

/* アイコンつきカード（ツール） */
.tool-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); align-items: start; height: 100%; text-decoration: none; color: var(--text); }
.tool-card:visited { color: var(--text); }
a.tool-card:hover { border-color: var(--green-600); box-shadow: var(--shadow-card); }
.tool-card__icon { grid-row: span 3; display: grid; place-items: center; width: 64px; height: 64px; border-radius: var(--radius-lg); background: var(--green-50); color: var(--green-700); }
.tool-card__icon .icon { width: 34px; height: 34px; }
.tool-card .card__title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.tool-card p { font-size: var(--fs-small); margin: 0; }
.tool-card__more { color: var(--link); font-weight: 700; font-size: var(--fs-small); }
.tool-card__more::after { content: " ›"; }
.tool-card--soon { background: var(--surface-alt); }
.tool-card--soon .tool-card__icon { background: var(--surface-sunk); color: var(--text-muted); }

.status { align-self: flex-start; display: inline-block; font-size: var(--fs-note); font-weight: 700; line-height: 1; padding: 5px 10px; border-radius: 999px; }
.status--live { color: #fff; background: var(--green-600); }
.status--soon { color: var(--text-muted); background: var(--surface); border: 1px solid var(--border-strong); }

/* 3ステップ */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-6) var(--sp-5) var(--sp-5); counter-increment: step; }
.step::before { content: "STEP " counter(step); position: absolute; top: -14px; left: var(--sp-5); background: var(--green-600); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-note); letter-spacing: .08em; padding: 4px 12px; border-radius: 999px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: calc(var(--sp-6) * -1 + 6px); width: 12px; height: 12px; border-top: 3px solid var(--green-200); border-right: 3px solid var(--green-200); transform: translateY(-50%) rotate(45deg); }
.step__icon { color: var(--green-700); margin-bottom: var(--sp-2); }
.step__icon .icon { width: 40px; height: 40px; }
.step h3 { font-size: var(--fs-h4); margin-bottom: var(--sp-2); }
.step p { font-size: var(--fs-small); color: var(--text-muted); margin: 0; }

/* 運営者 */
.profile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.profile__avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; border: 2px solid var(--green-100); }
.profile__avatar .icon { width: 52px; height: 52px; }
.profile__name { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h4); color: var(--text-strong); margin-bottom: var(--sp-2); }

/* --------------------------------------------------------------------------
   9. 5つの選択肢（詳細ページ：写真 + 説明の段組）
   -------------------------------------------------------------------------- */
.option { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: var(--sp-6); align-items: start; padding-block: var(--sp-7); border-bottom: 1px solid var(--border); scroll-margin-top: var(--sp-5); }
.option:first-child { padding-top: 0; }
.option__photo { background: var(--surface-sunk); border-radius: var(--radius-lg); aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.option__label { display: inline-flex; align-items: center; gap: var(--sp-2); font-family: var(--font-head); font-weight: 700; color: var(--green-700); font-size: var(--fs-small); margin-bottom: var(--sp-2); }
.option h2 { margin-bottom: var(--sp-2); }
.option__sub { color: var(--text-muted); margin-bottom: var(--sp-4); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); margin: var(--sp-4) 0; padding: var(--sp-4) var(--sp-5); background: var(--surface-alt); border-radius: var(--radius); font-size: var(--fs-small); }
.facts dt { font-weight: 700; color: var(--text-strong); }
.facts dd { margin: 0; }

.toc { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; margin: 0; }
.toc a { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: var(--sp-1) var(--sp-4); border: 1px solid var(--green-200); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 500; font-size: var(--fs-small); }
.toc a:hover { background: var(--green-50); }
.toc .icon { width: 1.2em; height: 1.2em; }

/* --------------------------------------------------------------------------
   10. 表
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); margin: 0; }
.table th, .table td { padding: var(--sp-4) var(--sp-5); text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.table thead th { background: var(--green-50); font-family: var(--font-head); color: var(--text-strong); white-space: nowrap; }
.table tbody th { background: var(--surface-alt); color: var(--text-strong); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table .deadline { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--green-700); white-space: nowrap; font-size: var(--fs-body); }
.table td.source { white-space: nowrap; }

/* --------------------------------------------------------------------------
   11. 広告表記（ステマ規制対応）・免責・注記
       ※アフィリリンクを含むページ（診断結果など）でのみ使う
   -------------------------------------------------------------------------- */
.ad-disclosure {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  font-size: var(--fs-note); line-height: 1.7; color: var(--text-muted);
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.pr-label {
  flex: none; display: inline-block; font-size: var(--fs-note); font-weight: 700; line-height: 1;
  padding: 4px 8px; border: 1px solid var(--text-muted); border-radius: var(--radius-sm); color: var(--text-muted); background: var(--surface);
}
.disclaimer {
  font-size: var(--fs-small); line-height: 1.8;
  background: var(--caution-bg); border-left: 4px solid var(--caution-border); color: var(--text);
  padding: var(--sp-4) var(--sp-5); border-radius: 0 var(--radius) var(--radius) 0;
}
.disclaimer__title { display: block; font-family: var(--font-head); font-weight: 700; color: var(--caution-text); margin-bottom: var(--sp-1); }
.callout { background: var(--note-bg); border-left: 4px solid var(--note-border); padding: var(--sp-4) var(--sp-5); border-radius: 0 var(--radius) var(--radius) 0; }
.source { font-size: var(--fs-note); color: var(--text-muted); }
.source a { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   12. 結果画面（診断・計算ツール共通）
   -------------------------------------------------------------------------- */
.result { display: grid; gap: var(--sp-6); }
.result__tool-name { margin: 0; color: var(--text-strong); font-size: var(--fs-h2); }
.result__answers { padding: var(--sp-4) var(--sp-5); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.result__answers h3 { margin: 0 0 var(--sp-3); font-size: var(--fs-h4); }
.result__answer-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--sp-2) var(--sp-5); margin: 0; }
.result__answer { min-width: 0; display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: var(--sp-2); font-size: var(--fs-small); line-height: 1.6; }
.result__answer dt { color: var(--text-muted); font-size: var(--fs-small); }
.result__answer dd { margin: 0; font-weight: 600; }
.result__head { background: var(--surface); border: 1px solid var(--border); border-top: 6px solid var(--green-600); border-radius: var(--radius-lg); padding: var(--sp-6); }
.result__label { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: var(--sp-2); }
.result__title { font-size: var(--fs-h2); margin-bottom: var(--sp-4); }
.result__figure { font-family: var(--font-head); font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1.2; }
.result__figure small { font-size: var(--fs-body); color: var(--text-muted); font-family: var(--font-body); }
.ranking { list-style: none; padding: 0; margin: 0; counter-reset: rank; display: grid; gap: var(--sp-2); }
.ranking li { counter-increment: rank; display: flex; gap: var(--sp-4); align-items: baseline; padding: var(--sp-3) var(--sp-4); background: var(--surface-alt); border-radius: var(--radius); }
.ranking li::before { content: counter(rank) "位"; font-family: var(--font-head); font-weight: 700; color: var(--green-700); min-width: 2.5em; }

.offers { display: grid; gap: var(--sp-4); }
.offers__lead { font-weight: 500; }
.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-3) var(--sp-5); align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); }
.offer__name { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h4); color: var(--text-strong); display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; margin: 0; }
.offer__meta { grid-column: 1; font-size: var(--fs-small); color: var(--text-muted); margin: 0; }
.offer .btn { grid-row: 1 / span 2; grid-column: 2; }
.offer--contract { border-style: dashed; }

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-6); }
  .hero::after { background: linear-gradient(180deg, rgba(10,30,21,.55) 0%, rgba(10,30,21,.75) 100%); }
  .entries { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card-grid--3, .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: var(--sp-6); }
  .step:not(:last-child)::after { top: auto; bottom: calc(var(--sp-6) * -1 + 4px); right: 50%; transform: translateX(50%) rotate(135deg); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .option { grid-template-columns: 1fr; gap: var(--sp-4); }
  .option__photo { aspect-ratio: 16 / 9; }
}
@media (max-width: 760px) {
  .header-cta { display: none; }
  /* メニューは横スクロールさせず、3列×2段で全部見せる（幅が足りないのでアイコンは省く） */
  .global-nav ul { flex-wrap: wrap; }
  .global-nav li { flex: 0 0 33.333%; }
  .global-nav a { min-height: 48px; padding-inline: var(--sp-1); font-size: .9375rem; }
  .global-nav .icon { display: none; }
  .global-nav li:nth-child(3n+1) a { border-left: 0; }
  .global-nav li:nth-child(n+4) a { border-top: 1px solid var(--border); }
  .card-grid--2, .card-grid--3, .card-grid--4 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --fs-h3: 1.25rem; }
  .site-header__top { min-height: 64px; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__name { font-size: 1.3125rem; }
  .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .result__head { padding: var(--sp-5); }
  .quiz__body { padding: var(--sp-4); }
  .offer { grid-template-columns: 1fr; }
  .offer .btn { grid-row: auto; grid-column: 1; width: 100%; }
  .btn { width: 100%; }
  .btn--inline { width: auto; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: var(--sp-2); }

  /* 表をカード型に組み替える（td に data-label が必要） */
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack th, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); }
  .table--stack tbody tr:last-child { border-bottom: 0; }
  .table--stack th, .table--stack td { border: 0; padding: 0; white-space: normal; background: none; }
  .table--stack th[scope="row"] { font-family: var(--font-head); font-size: var(--fs-body); margin-bottom: var(--sp-2); }
  .table--stack td + td { margin-top: var(--sp-2); }
  .table--stack td[data-label]::before { content: attr(data-label) "："; font-weight: 400; color: var(--text-muted); font-size: var(--fs-note); }
  .table--stack td.source { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .global-nav, .site-footer, .quiz { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; }
}

/* 金額を扱うツールの参考資料 */
.tool-sources { min-width: 0; padding: var(--sp-5); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-wrap: anywhere; }
.tool-sources .heading-bar { margin-bottom: var(--sp-4); }
.tool-sources__intro { font-size: var(--fs-note); color: var(--text-muted); }
.tool-sources__list { list-style: none; margin: var(--sp-4) 0 0; padding: 0; }
.tool-sources__list > li { padding: var(--sp-4) 0; }
.tool-sources__list > li + li { border-top: 1px solid var(--border); }
.tool-sources__list > li:first-child { padding-top: 0; }
.tool-sources__list > li:last-child { padding-bottom: 0; }
.tool-sources__list p { margin: 0; font-size: var(--fs-small); }
.tool-sources__list p + p { margin-top: var(--sp-2); }
.tool-sources__list .tool-sources__checked { font-size: var(--fs-note); color: var(--text-muted); }

/* 実家どうする診断：共通部品に必要な配置だけを追加 */
.shindan-container { max-width: 52rem; }
#shindan-app { min-height: 32rem; }
.shindan-container .quiz { border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.shindan-container .quiz__bar { background: var(--action); color: var(--action-text); }
.shindan-container .quiz__bar strong { color: inherit; }
.shindan-container progress { display: block; width: 100%; height: 8px; border: 0; accent-color: var(--action); background: var(--surface-sunk); }
.shindan-container progress::-webkit-progress-bar { background: var(--surface-sunk); }
.shindan-container progress::-webkit-progress-value { background: var(--action); }
.shindan-container progress::-moz-progress-bar { background: var(--action); }
.shindan-container .ranking a { flex: 1; }
.shindan-container .ranking li:first-child { background: var(--green-50); border: 1px solid var(--green-200); }
.shindan-container button:disabled { cursor: default; }
.shindan-container progress { margin-bottom: var(--sp-5); }
.quiz__actions { margin-top: var(--sp-5); }
.shindan-container .callout li + li { margin-top: var(--sp-4); }
.shindan-container .result > div:empty { display: none; }

/* 金額を扱うツールの参考資料 */
.tool-sources { min-width: 0; padding: var(--sp-5); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-wrap: anywhere; }
.tool-sources .heading-bar { margin-bottom: var(--sp-4); }
.tool-sources__intro { font-size: var(--fs-note); color: var(--text-muted); }
.tool-sources__list { list-style: none; margin: var(--sp-4) 0 0; padding: 0; }
.tool-sources__list > li { padding: var(--sp-4) 0; }
.tool-sources__list > li + li { border-top: 1px solid var(--border); }
.tool-sources__list > li:first-child { padding-top: 0; }
.tool-sources__list > li:last-child { padding-bottom: 0; }
.tool-sources__list p { margin: 0; font-size: var(--fs-small); }
.tool-sources__list p + p { margin-top: var(--sp-2); }
.tool-sources__list .tool-sources__checked { font-size: var(--fs-note); color: var(--text-muted); }
