/*
  FactLoop — Stripe系の明るく信頼できるライトテーマ。
*/
:root {
  --ink: #f6f8fc;     /* ページ背景（明るいグレー） */
  --ink-2: #eef2f8;   /* セクション別背景 */
  --surface: #ffffff; /* カード背景（白） */
  --line: #e4e9f0;    /* 境界線 */
  --line-2: #cdd6e3;  /* 入力枠など強めの境界 */
  --fog: #5b6677;     /* 補助テキスト（白地でコントラスト確保） */
  --mist: #36404f;    /* 本文 */
  --snow: #0e1b2e;    /* 見出し・最前景（濃紺） */
  --accent: #2563eb;  /* 信頼の青 */
  --accent-soft: #d7e3ff; /* 選択範囲などの淡い青 */
  --good: #15a34a;
  --warn: #c2780a;
  --bad: #dc2626;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 3px rgba(16,24,40,0.06), 0 1px 2px rgba(16,24,40,0.04);
  --shadow-md: 0 6px 24px rgba(16,24,40,0.08);
  --shadow-lg: 0 20px 60px rgba(16,24,40,0.18);
}

* { box-sizing: border-box; border-color: var(--line); }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--mist);
  font-family: "Inter", "Noto Sans JP", ui-sans-serif, system-ui, -apple-system,
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-feature-settings: "palt" 1;
  letter-spacing: 0.01em;
  line-height: 1.85;
  overflow-x: hidden;
}
::selection { background: var(--accent-soft); color: var(--snow); }

h1, h2, h3, h4 { color: var(--snow); letter-spacing: 0.005em; line-height: 1.3; font-weight: 600; margin: 0; }
a { color: inherit; }
p { margin: 0; }
.mono { font-family: var(--mono); letter-spacing: 0; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }

/* reveal */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* grid bg */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(14,27,46,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14,27,46,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
}
.bg-radial { background: radial-gradient(120% 80% at 50% -10%, rgba(37,99,235,0.07) 0%, transparent 55%); }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; max-width: 64rem; margin: 0 auto; }
.brand { display: flex; align-items: baseline; gap: 0.5rem; text-decoration: none; }
.brand b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--snow); }
.brand span { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--fog); }
.nav-cta { border: 1px solid var(--line-2); border-radius: 999px; padding: 0.35rem 1rem; font-size: 12px; color: var(--mist); text-decoration: none; transition: all 0.2s; }
.nav-cta:hover { border-color: var(--accent); color: var(--snow); }

/* hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-inner { position: relative; max-width: 64rem; margin: 0 auto; width: 100%; padding: 7rem 1.5rem 0; }
.badge { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line-2); border-radius: 999px; padding: 0.25rem 0.75rem; font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; color: var(--fog); }
.pulse { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero h1 { max-width: 48rem; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.2; letter-spacing: -0.01em; }
.hero-sub { margin-top: 1.5rem; font-size: 1.125rem; color: var(--fog); }
.hero-lead { margin-top: 2rem; max-width: 42rem; font-size: 17px; line-height: 2.25; color: var(--mist); }
.hero-lead em { font-style: normal; color: var(--snow); }

.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--snow); color: var(--ink); padding: 0.85rem 1.5rem; border-radius: 0.5rem; font-size: 15px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: opacity 0.2s; }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-accent { display: block; width: 100%; background: rgba(91,140,255,0.1); border: 1px solid var(--accent); color: var(--snow); padding: 0.85rem 1.5rem; border-radius: 0.5rem; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-accent:hover { background: rgba(91,140,255,0.2); }
.btn-accent:disabled { opacity: 0.5; }

/* section */
.section { position: relative; max-width: 64rem; margin: 0 auto; padding: 6rem 1.5rem; }
@media (min-width: 640px) { .section { padding: 8rem 1.5rem; } }
.eyebrow { display: flex; align-items: center; gap: 0.75rem; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 1.25rem; }
.eyebrow .dot { width: 4px; height: 4px; border-radius: 999px; background: var(--accent); }
.section h2 { max-width: 48rem; font-size: clamp(1.875rem, 3.5vw, 2.25rem); line-height: 1.35; }
.lead { margin-top: 1.5rem; max-width: 42rem; font-size: 16px; line-height: 2.25; color: var(--mist); }
.lead + .lead { margin-top: 1.25rem; }
.lead strong, .lead .hi { color: var(--snow); font-weight: 600; }

/* grid of cells */
.cells { margin-top: 2.5rem; display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); border-radius: 0.75rem; overflow: hidden; }
@media (min-width: 640px) { .cells.c3 { grid-template-columns: repeat(3, 1fr); } .cells.c4 { grid-template-columns: repeat(4, 1fr); } }
.cell { background: var(--surface); padding: 1.5rem; }
.cell .t { font-size: 14px; font-weight: 500; color: var(--snow); }
.cell .d { margin-top: 0.5rem; font-size: 14px; line-height: 1.6; color: var(--fog); }
.cell .n { font-family: var(--mono); font-size: 12px; color: var(--accent); }

/* core cards */
.cards2 { margin-top: 3rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .cards2 { grid-template-columns: 1fr 1fr; } }
.core { height: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 1rem; padding: 2rem; }
.core .no { font-family: var(--mono); font-size: 1.5rem; color: var(--accent); }
.core h3 { margin-top: 1rem; font-size: 1.125rem; line-height: 1.6; color: var(--snow); }
.core p { margin-top: 1rem; font-size: 15px; line-height: 2; color: var(--mist); }

.chips { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; font-size: 14px; }
.chip { border: 1px solid var(--line-2); border-radius: 999px; padding: 0.35rem 1rem; color: var(--mist); }
.arrow { color: var(--fog); }

.quote { margin-top: 2.5rem; border-left: 2px solid var(--accent); padding-left: 1.5rem; font-size: 1.125rem; line-height: 2.25; color: var(--snow); }
.loop-note { margin-top: 1.5rem; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.15em; color: var(--fog); }

/* faq */
.faq { margin-top: 2.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 1.25rem 0; }
.faq details:last-child { border-bottom: none; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; font-size: 15px; font-weight: 500; color: var(--snow); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { color: var(--fog); transition: transform 0.2s; }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq p { margin-top: 0.75rem; max-width: 42rem; font-size: 15px; line-height: 2; color: var(--mist); }

/* diagnose section */
.diagnose { position: relative; scroll-margin-top: 4rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink-2); padding: 6rem 0; }
@media (min-width: 640px) { .diagnose { padding: 8rem 0; } }

/* footer */
.footer { border-top: 1px solid var(--line); background: var(--ink); }
.footer-grid { max-width: 64rem; margin: 0 auto; padding: 4rem 1.5rem; display: grid; gap: 2.5rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer p { margin-top: 1rem; max-width: 24rem; font-size: 14px; line-height: 1.7; color: var(--fog); }
.footer .right { } @media (min-width:640px){ .footer .right { text-align: right; } }
.footer .office { font-size: 14px; font-weight: 500; color: var(--snow); }
.footer address { margin-top: 0.5rem; font-style: normal; font-size: 14px; line-height: 1.7; color: var(--fog); }
.footer nav { margin-top: 1.25rem; display: flex; gap: 1.25rem; font-size: 12px; color: var(--fog); }
@media (min-width:640px){ .footer nav { justify-content: flex-end; } }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--mist); }
.copy { border-top: 1px solid var(--line); padding: 1.5rem 0; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em; color: var(--fog); }

/* ───────── 診断ウィジェット ───────── */
.dx { max-width: 48rem; margin: 0 auto; width: 100%; }
.dx-card { border: 1px solid var(--line); background: var(--surface); border-radius: 1rem; padding: 1.5rem; }
@media (min-width: 640px) { .dx-card { padding: 2.25rem; } }
.dx-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.dx-head h3 { font-size: 1.125rem; color: var(--snow); }
.dx-tag { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--fog); }

.field { display: block; margin-bottom: 1.25rem; }
.field > span { display: block; margin-bottom: 0.5rem; font-size: 14px; color: var(--fog); }
.field .req { color: var(--accent); }
.input, .select {
  width: 100%; border: 1px solid var(--line-2); background: var(--ink);
  padding: 0.7rem 1rem; font-size: 15px; color: var(--snow);
  border-radius: 0.5rem; outline: none; transition: border-color 0.2s;
  font-family: inherit;
}
.input::placeholder { color: rgba(138,138,148,0.6); }
.input:focus, .select:focus { border-color: var(--accent); }
.select { appearance: none; padding: 0.7rem 0.75rem; font-size: 14px; }
/* 選択肢の文字が長く見切れるため、常に縦積みで全文表示（シニア配慮） */
.grid3 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.grid2 { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.dx-note { margin-top: 0.75rem; text-align: center; font-size: 12px; color: var(--fog); }

/* live log */
.dx-log { margin-top: 1.25rem; border: 1px solid var(--line); background: var(--ink-2); border-radius: 0.75rem; padding: 1.25rem; font-family: var(--mono); font-size: 13px; line-height: 1.8; }
.dx-log .ln { color: rgba(138,138,148,0.3); }
.dx-log .ln.active { color: var(--mist); }
.dx-log .ln.done-ln { color: var(--mist); }
.dx-log .gt { color: var(--accent); }
.dx-log .done { color: var(--good); }

.dx-error { margin-top: 1.25rem; border: 1px solid rgba(248,113,113,0.4); background: rgba(248,113,113,0.05); border-radius: 0.75rem; padding: 1.25rem; font-size: 14px; color: var(--mist); }

/* result card */
.dx-result { margin-top: 1.5rem; scroll-margin-top: 6rem; }
.rc { border: 1px solid var(--line); background: var(--surface); border-radius: 1rem; overflow: hidden; }
.rc-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 1rem 1.5rem; }
@media (min-width: 640px) { .rc-head { padding: 1rem 2.25rem; } }
.rc-head .dom { font-family: var(--mono); font-size: 14px; color: var(--mist); }
.rc-head .meta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--fog); }
.rc-body { display: grid; gap: 2rem; padding: 1.5rem; }
@media (min-width: 640px) { .rc-body { padding: 2.25rem; } }
@media (min-width: 768px) { .rc-body { grid-template-columns: 180px 1fr; } }

.score-label { font-size: 12px; color: var(--fog); }
.score-val { margin-top: 0.25rem; display: flex; align-items: baseline; gap: 0.25rem; }
.score-val .num { font-family: var(--mono); font-size: 3rem; font-weight: 600; line-height: 1; }
.score-val .max { font-size: 14px; color: var(--fog); }
.score-bar { margin-top: 0.75rem; height: 6px; width: 100%; border-radius: 999px; background: var(--ink); overflow: hidden; }
.score-bar > i { display: block; height: 100%; border-radius: 999px; transition: width 0.7s var(--ease); }
.meta-list { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 12px; }
.meta-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }
.meta-row dt { color: var(--fog); margin: 0; }
.meta-row dd { margin: 0; text-align: right; color: var(--mist); }

.rc-blocks { display: flex; flex-direction: column; gap: 1.75rem; }
.block-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.block-title .d { width: 4px; height: 4px; border-radius: 999px; background: var(--accent); }
.block-title h4 { font-size: 14px; font-weight: 600; color: var(--snow); }
.block p { font-size: 15px; line-height: 2; color: var(--mist); }
.loop-ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.loop-ol li { display: flex; gap: 0.75rem; }
.loop-ol .no { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 2px; }
.loop-ol .t { font-size: 14px; font-weight: 500; color: var(--snow); }
.loop-ol .d2 { font-size: 14px; color: var(--fog); }

.money-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.money { border: 1px solid var(--line); background: var(--ink); border-radius: 0.5rem; padding: 0.75rem 1rem; }
.money .l { font-size: 12px; color: var(--fog); }
.money .v { margin-top: 0.1rem; }
.money .v b { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; color: var(--snow); }
.money .v span { margin-left: 0.25rem; font-size: 12px; color: var(--fog); }
.usage { margin-top: 1rem; border: 1px solid var(--line); background: var(--ink); border-radius: 0.5rem; padding: 0.75rem 1rem; }
.usage .l { font-size: 12px; color: var(--fog); }
.usage .v { margin-top: 0.1rem; font-family: var(--mono); font-size: 14px; color: var(--mist); }
.basis { margin-top: 0.75rem; font-size: 12px; line-height: 1.6; color: var(--fog); }

/* step2 */
.dx-step2 { margin-top: 1.5rem; }
.thanks { padding: 1rem 0; text-align: center; }
.thanks .big { font-size: 1.125rem; font-weight: 600; color: var(--snow); }
.thanks .sm { margin-top: 0.5rem; font-size: 14px; color: var(--fog); }

/* legal pages */
.legal { max-width: 48rem; margin: 0 auto; min-height: 100vh; padding: 7rem 1.5rem; }
.legal .back { font-family: var(--mono); font-size: 12px; letter-spacing: 0.15em; color: var(--fog); text-decoration: none; }
.legal h1 { margin-top: 1.5rem; font-size: 1.5rem; color: var(--snow); }
.legal-body { margin-top: 2.5rem; }
.legal dl { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.legal dl > div { display: grid; gap: 0.25rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.legal dl > div:last-child { border-bottom: none; }
@media (min-width: 640px) { .legal dl > div { grid-template-columns: 200px 1fr; } }
.legal dt { font-size: 14px; color: var(--fog); margin: 0; }
.legal dd { font-size: 14px; line-height: 1.7; color: var(--mist); margin: 0; }
.legal h2 { font-size: 1rem; font-weight: 600; color: var(--snow); margin-bottom: 0.75rem; }
.legal section { margin-bottom: 2rem; }
.legal p, .legal li { font-size: 15px; line-height: 2; color: var(--mist); }
.legal ul { padding-left: 1.25rem; color: var(--fog); }
/* 一次データ収集設計ブロック */
.fp { }
.fp-score { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.75rem; }
.fp-num { font-family: var(--mono); font-size: 2rem; font-weight: 600; line-height: 1; }
.fp-max { font-size: 12px; color: var(--fog); }
.fp-lv { margin-left: 0.25rem; font-size: 12px; }
.fp-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fp-row:last-of-type { border-bottom: none; }
.fp-l { color: var(--mist); white-space: nowrap; }
.fp-d { color: var(--fog); text-align: right; }
.fp-comment { margin-top: 0.75rem; font-size: 14px; line-height: 1.9; color: var(--mist); }

/* 設計シグナルの負リスト */
.sig-neg { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.sig-neg li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--warn); }
.sig-neg li:last-child { border-bottom: none; }
.sig-neg li span { display: block; margin-top: 0.1rem; font-size: 12px; color: var(--fog); }

/* 指標について（控えめなリンク） */
.glossary-link {
  margin-top: 1rem; background: none; border: none; padding: 0; cursor: pointer;
  font-size: 12px; color: var(--fog); text-decoration: underline; text-underline-offset: 3px;
  font-family: inherit;
}
.glossary-link:hover { color: var(--mist); }

/* 旧指標カード（タップで個別ポップアップ） */
.term-grid {
  margin-top: 2.5rem; display: grid; gap: 1px;
  border: 1px solid var(--line); background: var(--line);
  border-radius: 0.75rem; overflow: hidden;
}
@media (min-width: 640px) { .term-grid { grid-template-columns: 1fr 1fr; } }
.term-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; text-align: left; background: var(--surface); border: none;
  padding: 1.25rem 1.5rem; font-family: inherit; font-size: 16px; font-weight: 500;
  color: var(--snow); cursor: pointer; transition: background 0.2s;
}
.term-card:hover { background: #f1f5fb; }
.term-plus { color: var(--accent); font-size: 1.25rem; flex-shrink: 0; }

/* モーダル */
.modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 1.5rem;
  background: rgba(14,27,46,0.45); backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal-panel {
  position: relative; width: 100%; max-width: 40rem; max-height: 85vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 1rem; padding: 2rem;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem; width: 2rem; height: 2rem; line-height: 1;
  background: none; border: 1px solid var(--line-2); border-radius: 999px; color: var(--mist);
  font-size: 1.1rem; cursor: pointer;
}
.modal-close:hover { color: var(--snow); border-color: var(--accent); }
.modal-title { font-size: 1.1rem; color: var(--snow); }
.modal-lead { margin-top: 0.75rem; font-size: 13px; line-height: 1.8; color: var(--fog); }
.modal-sec { margin-top: 1.5rem; }
.modal-h { font-size: 12px; font-family: var(--mono); letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.5rem; }
.modal-dl { border-top: 1px solid var(--line); }
.modal-dl > div { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.modal-dl dt { font-size: 14px; font-weight: 600; color: var(--snow); margin: 0; }
.modal-dl dd { margin: 0.25rem 0 0; font-size: 13px; line-height: 1.7; color: var(--fog); }

.hidden { display: none !important; }

/* ───────────────────────────────────────────
   シニアフレンドリー強化（文字を大きく・コントラスト引き上げ）
   ─────────────────────────────────────────── */
:root {
  --fog: #4d5868;   /* 白地でさらに濃く（シニア配慮の高コントラスト） */
  --mist: #2a3340;  /* 本文をより濃く */
}
body { font-size: 19px; line-height: 2.0; }

/* ライトテーマの奥行き（信頼感）：カードに影 */
.core, .dx-card, .dx-step2 { box-shadow: var(--shadow-sm); }
.rc { box-shadow: var(--shadow-md); }
.modal-panel { box-shadow: var(--shadow-lg); }
.cells, .term-grid { box-shadow: var(--shadow-sm); }

.hero-sub { font-size: 1.4rem; }
.hero-lead { font-size: 20px; line-height: 2.25; }
.lead { font-size: 18px; line-height: 2.25; }
.eyebrow { font-size: 12.5px; }

.brand b { font-size: 17px; }
.nav-cta { font-size: 14px; padding: 0.5rem 1.1rem; }

.cell .t { font-size: 16px; }
.cell .d { font-size: 16px; line-height: 1.9; }
.cell .n { font-size: 13px; }

.core h3 { font-size: 1.2rem; }
.core p { font-size: 16px; line-height: 2.05; }
.chip { font-size: 15px; }

/* ボタン：大きく・押しやすく */
.btn-primary, .btn-accent { font-size: 17px; padding: 1rem 1.6rem; }
.nav-cta, .glossary-link { min-height: 0; }

/* フォーム：大きく（スマホの自動ズーム防止にも有効） */
.dx-head h3 { font-size: 1.3rem; }
.dx-tag { font-size: 12px; }
.field > span { font-size: 16px; }
.input, .select { font-size: 18px; padding: 0.9rem 1rem; }
.dx-note { font-size: 14px; }

/* 診断結果 */
.rc-head .dom { font-size: 16px; }
.score-label { font-size: 14px; }
.score-val .max { font-size: 15px; }
.meta-row, .meta-row dt, .meta-row dd { font-size: 14.5px; }
.block-title h4 { font-size: 16.5px; }
.block p { font-size: 17px; line-height: 2.15; }
.loop-ol .t { font-size: 16px; }
.loop-ol .d2 { font-size: 15px; line-height: 1.85; }
.fp-row, .fp-l, .fp-d { font-size: 15px; }
.fp-comment { font-size: 16px; line-height: 2.05; }
.sig-neg li { font-size: 14.5px; }
.sig-neg li span { font-size: 13px; }
.money .v b { font-size: 1.45rem; }
.money .l, .money .v span, .usage .l { font-size: 14px; }
.usage .v { font-size: 16px; }
.basis { font-size: 13px; line-height: 1.8; }
.dx-log { font-size: 15px; }
.glossary-link { font-size: 14px; }

/* FAQ・フッター・モーダル */
.faq summary { font-size: 17px; }
.faq p { font-size: 16px; line-height: 2.15; }
.footer p, .footer address, .footer .office { font-size: 16px; }
.footer nav { font-size: 14px; }
.copy { font-size: 13px; }
.modal-title { font-size: 1.3rem; }
.modal-lead { font-size: 15px; line-height: 1.9; }
.modal-dl dt { font-size: 16px; }
.modal-dl dd { font-size: 15px; line-height: 1.8; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero-lead { font-size: 18px; }
  .lead { font-size: 17px; }
  .input, .select { font-size: 18px; } /* 16px以上でiOSの自動ズームを防止 */
}

/* ───────────────────────────────────────────
   画像・セクションのメリハリ
   ─────────────────────────────────────────── */
/* Hero 2カラム（テキスト＋画像） */
.hero-inner { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.05fr 0.95fr; } }
.hero-media img { width: 100%; height: auto; display: block; border-radius: 1.25rem; }

/* セクション背景のメリハリ */
.sec-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-tint { background: linear-gradient(180deg, #e9f0fc 0%, #f6f8fc 100%); border-bottom: 1px solid var(--line); }

/* 循環図ビジュアル */
.concept-visual { margin: 3rem auto 0; max-width: 560px; text-align: center; }
.concept-visual img { width: 100%; height: auto; display: block; }
.concept-cap { margin-top: 1rem; font-size: 15px; color: var(--fog); }

/* 資産バンド（2カラム） */
.band { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 820px) { .band { grid-template-columns: 1.1fr 0.9fr; } }
.band-media img { width: 100%; height: auto; display: block; border-radius: 1.25rem; }

/* ───────────────────────────────────────────
   ヒーロー：画像の上にテキストをレイヤー（本気デザイン）
   ─────────────────────────────────────────── */
.hero-inner { position: relative; z-index: 2; display: block; } /* テキストは最前面 */
.hero-copy { max-width: 600px; }
/* テキスト側を白く保つグラデ被せ（可読性確保） */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, var(--ink) 30%, rgba(246,248,252,0.6) 48%, rgba(246,248,252,0) 66%);
}
.hero-media {
  position: absolute; top: 0; right: 0; bottom: 0; width: 56%;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: right center;
  mix-blend-mode: multiply; /* 白背景を消し、線だけ溶け込ませる */
  -webkit-mask-image: linear-gradient(to left, #000 55%, transparent 100%);
  mask-image: linear-gradient(to left, #000 55%, transparent 100%);
}
@media (max-width: 860px) {
  .hero::after { background: linear-gradient(180deg, rgba(246,248,252,0.72), rgba(246,248,252,0.88)); }
  .hero-media { width: 100%; opacity: 0.16; }
  .hero-media img { object-position: center; -webkit-mask-image: none; mask-image: none; }
}

/* ───────── 全画像を背景レイヤーとして処理（multiply合成・マスク） ───────── */
.has-media { position: relative; overflow: hidden; }
.has-media > *:not(.sec-media) { position: relative; z-index: 2; }
.sec-media { position: absolute; top: 0; bottom: 0; z-index: 0; pointer-events: none; }
.sec-media-right { right: 0; width: 46%; }
.sec-media img {
  width: 100%; height: 100%; object-fit: contain; object-position: right center;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to left, #000 58%, transparent 100%);
  mask-image: linear-gradient(to left, #000 58%, transparent 100%);
}
.concept-visual img { mix-blend-mode: multiply; }
@media (max-width: 820px) { .sec-media { display: none; } } /* モバイルはテキスト優先 */

/* ───────── 複数選択チップ ───────── */
.dx-group { border: none; margin: 0 0 1.5rem; padding: 0; }
.dx-group legend { padding: 0; margin-bottom: 0.7rem; font-size: 16px; color: var(--mist); font-weight: 500; }
.dx-group legend em { font-style: normal; font-size: 12px; color: var(--accent); margin-left: 0.5rem; }
.chips-select { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-opt span {
  display: inline-block; padding: 0.65rem 1.05rem; border: 1px solid var(--line-2);
  border-radius: 999px; font-size: 15px; color: var(--mist); background: var(--surface);
  cursor: pointer; transition: all 0.15s; user-select: none;
}
.chip-opt span:hover { border-color: var(--accent); }
.chip-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea.input { resize: vertical; line-height: 1.7; }

/* ───────── 解析中フルスクリーンオーバーレイ ───────── */
.dx-overlay {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 1.5rem;
  background: rgba(14,27,46,0.55); backdrop-filter: blur(6px);
}
.dx-overlay.active { display: flex; }
.dx-overlay-card {
  width: 100%; max-width: 34rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 1.25rem; box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem; text-align: center;
}
.dx-overlay-title { margin-top: 1.5rem; font-size: 1.35rem; font-weight: 600; color: var(--snow); }
.dx-overlay-sub { margin-top: 0.5rem; font-size: 14px; color: var(--fog); }
#dx-overlay-log { margin-top: 1.5rem; text-align: left; }
.dx-orbit { position: relative; width: 84px; height: 84px; margin: 0 auto; }
.dx-orbit::before, .dx-orbit::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.dx-orbit::before { border-top-color: var(--accent); border-right-color: var(--accent); animation: dx-spin 1s linear infinite; }
.dx-orbit::after { inset: 14px; border-bottom-color: #9bb8ff; border-left-color: #9bb8ff; animation: dx-spin 1.6s linear infinite reverse; }
.dx-orbit-core {
  position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(37,99,235,0.15);
  animation: dx-pulse 1.4s ease-in-out infinite;
}
@keyframes dx-spin { to { transform: rotate(360deg); } }
@keyframes dx-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.55); opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .dx-orbit::before, .dx-orbit::after, .dx-orbit-core { animation: none; } }

/* ───────── 見積り：コンサルを主役に ───────── */
.est-hero {
  border: 1.5px solid var(--accent);
  background: linear-gradient(180deg, rgba(37,99,235,0.07), rgba(37,99,235,0.02));
  border-radius: 0.85rem; padding: 1.25rem;
}
.est-hero-tag { display: inline-block; font-size: 12px; font-weight: 600; color: #fff; background: var(--accent); border-radius: 999px; padding: 0.22rem 0.75rem; }
.est-hero-name { margin-top: 0.6rem; font-size: 15px; color: var(--snow); font-weight: 600; }
.est-hero-val { margin-top: 0.15rem; }
.est-hero-val b { font-family: var(--mono); font-size: 2rem; font-weight: 600; color: var(--snow); }
.est-hero-val span { margin-left: 0.35rem; font-size: 14px; color: var(--fog); }
.est-hero-note { margin-top: 0.45rem; font-size: 13px; color: var(--fog); line-height: 1.75; }
.est-sub { margin: 1.25rem 0 0.6rem; font-size: 13px; color: var(--fog); }

/* 料金：実装とコンサルを並列（比較・対等・おすすめ表記なし） */
.plan-grid { display: grid; gap: 1rem; }
@media (min-width: 560px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
.plan { border: 1px solid var(--line-2); border-radius: 0.85rem; padding: 1.25rem; background: var(--surface); }
.plan-name { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0.06em; }
.plan-price { margin-top: 0.5rem; }
.plan-price b { font-family: var(--mono); font-size: 1.85rem; font-weight: 600; color: var(--snow); }
.plan-price span { margin-left: 0.3rem; font-size: 13px; color: var(--fog); }
.plan-rows { margin-top: 0.9rem; border-top: 1px solid var(--line); }
.plan-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.plan-row span:first-child { color: var(--fog); }
.plan-row span:last-child { color: var(--mist); font-family: var(--mono); }
.plan-desc { margin-top: 0.75rem; font-size: 13px; line-height: 1.7; color: var(--fog); }

/* ───────── 運用年数グラフ＋積層イメージ ───────── */
.compound-grid { margin-top: 2.5rem; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) { .compound-grid { grid-template-columns: 1.4fr 0.6fr; } }
.compound-media img { width: 100%; height: auto; display: block; }

.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--shadow-sm); }
.chart-cap { font-size: 13px; color: var(--fog); margin-bottom: 0.5rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .gap { fill: rgba(37,99,235,0.10); }
.chart .dot-fl { fill: var(--accent); }
.chart .dot-nm { fill: #94a0b3; }
.chart .xlab { fill: var(--fog); font-size: 13px; text-anchor: middle; font-family: var(--mono); }
.chart .gaplab { fill: var(--accent); font-size: 13px; text-anchor: middle; font-weight: 600; }

/* 線の描画アニメ（reveal表示でドロー） */
.chart .line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.chart .line-fl { stroke: var(--accent); stroke-width: 4; transition: stroke-dashoffset 1.9s var(--ease) 0.15s; }
.chart .line-normal { stroke: #94a0b3; stroke-width: 2.5; transition: stroke-dashoffset 1.9s var(--ease); }
.chart.is-visible .line { stroke-dashoffset: 0; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; font-size: 14px; color: var(--mist); }
.lg { display: inline-flex; align-items: center; gap: 0.5rem; }
.lg i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.lg-fl i { background: var(--accent); }
.lg-nm i { background: #94a0b3; }

/* 年ごとの差：伸びるバーで可視化 */
.gap-viz { margin-top: 1.5rem; }
.gap-viz-head { font-size: 13px; color: var(--fog); margin-bottom: 0.75rem; }
.gap-row { display: grid; grid-template-columns: 44px 1fr 56px; align-items: center; gap: 0.85rem; padding: 0.42rem 0; }
.gap-year { font-family: var(--mono); font-size: 14px; color: var(--mist); }
.gap-bar { height: 12px; background: var(--ink-2); border-radius: 999px; overflow: hidden; }
.gap-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #9bc0ff, var(--accent)); transition: width 1.2s var(--ease); }
.gap-viz.is-visible .gap-bar i { width: var(--w); }
.gap-row:nth-child(3) .gap-bar i { transition-delay: 0.08s; }
.gap-row:nth-child(4) .gap-bar i { transition-delay: 0.16s; }
.gap-row:nth-child(5) .gap-bar i { transition-delay: 0.24s; }
.gap-row:nth-child(6) .gap-bar i { transition-delay: 0.32s; }
.gap-row:nth-child(7) .gap-bar i { transition-delay: 0.40s; }
.gap-val { font-family: var(--mono); font-size: 15px; font-weight: 600; color: var(--accent); text-align: right; }
.gap-row-last .gap-bar { height: 15px; }
.gap-row-last .gap-val { font-size: 1.15rem; }
.gap-note { margin-top: 0.85rem; font-size: 12.5px; color: var(--fog); }

/* 「お金では買えない＝時間が要る」論理の強調ブロック */
.moat { margin-top: 2.5rem; max-width: 680px; border-left: 3px solid var(--accent); background: linear-gradient(90deg, rgba(37,99,235,0.06), transparent); padding: 1.25rem 1.5rem; border-radius: 0 0.75rem 0.75rem 0; }
.moat-h { font-size: 1.25rem; font-weight: 600; color: var(--snow); }
.moat-p { margin-top: 0.6rem; font-size: 16px; line-height: 2; color: var(--mist); }
.moat-p strong { color: var(--snow); font-weight: 600; }

/* ───────── 自走ループ図（汎用SVG） ───────── */
.loop-wrap { margin: 2.5rem auto 0; max-width: 540px; }
.loop-svg { width: 100%; height: auto; display: block; overflow: visible; }
.loop-track { fill: none; stroke: var(--line-2); stroke-width: 2; }
.loop-flow {
  fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 80 990; transform-origin: 360px 280px;
  animation: loop-rot 5.5s linear infinite;
}
@keyframes loop-rot { to { transform: rotate(360deg); } }
.loop-node { fill: var(--accent); }
.loop-num { fill: #fff; font-family: var(--mono); font-size: 22px; font-weight: 600; text-anchor: middle; }
.loop-name { fill: var(--snow); font-size: 19px; font-weight: 600; }
.loop-center { fill: var(--fog); font-size: 16px; font-weight: 500; text-anchor: middle; }
@media (prefers-reduced-motion: reduce) { .loop-flow { animation: none; } }

.loop-key { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
@media (min-width: 680px) { .loop-key { grid-template-columns: 1fr 1fr; gap: 0.9rem 2rem; } }
.loop-key li { display: flex; gap: 0.85rem; align-items: flex-start; }
.loop-key-n { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.loop-key div { font-size: 15px; line-height: 1.75; color: var(--fog); }
.loop-key b { color: var(--snow); margin-right: 0.5rem; }
.loop-note { margin-top: 1.5rem; text-align: center; font-size: 13px; color: var(--fog); }

/* ───────── BEFORE / AFTER ───────── */
.ba-grid { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
@media (min-width: 680px) { .ba-grid { grid-template-columns: 1fr 1fr; } }
.ba-card { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); box-shadow: var(--shadow-sm); padding: 1.75rem; text-align: center; }
.ba-after { border-color: rgba(37,99,235,0.4); }
.ba-tag { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; padding: 0.22rem 0.75rem; border-radius: 999px; }
.ba-tag-before { color: var(--fog); background: var(--ink-2); }
.ba-tag-after { color: #fff; background: var(--accent); }
.ba-title { margin-top: 0.75rem; font-size: 1.15rem; font-weight: 600; color: var(--snow); }
.ba-flow { margin: 1.5rem auto 0; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.ba-chip { display: inline-block; border: 1px solid var(--line-2); border-radius: 8px; padding: 0.6rem 1.1rem; font-size: 15px; color: var(--mist); background: var(--surface); }
.ba-arrow { color: var(--fog); font-size: 18px; line-height: 1; }
.ba-dead { display: inline-block; padding: 0.6rem 1.1rem; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--bad); background: rgba(220,38,38,0.06); border: 1px dashed rgba(220,38,38,0.4); }
.ba-loop { margin: 1rem auto 0; max-width: 170px; }
.ba-loop-svg { width: 100%; height: auto; display: block; }
.ba-loop-svg marker path { fill: var(--accent); }
.ba-loop-c { fill: var(--snow); font-size: 24px; font-weight: 600; text-anchor: middle; }
.ba-desc { margin-top: 1.25rem; font-size: 14px; line-height: 1.85; color: var(--fog); }
@media (prefers-reduced-motion: reduce) { .gap-bar i { width: var(--w) !important; transition: none; } }

@media (prefers-reduced-motion: reduce) {
  .chart .line { stroke-dashoffset: 0 !important; transition: none; }
}
