/* 建築費シミュレーション（GO QUEST 単体版。スマホ優先・縦1カラム）
 * 幅320〜430pxで成立させ、広い画面では最大480pxで中央に置く。外部の書体・画像は読み込まない。
 *
 * 見た目は大会用の原本（07_output/iekachi/2026-10-11-rplus-simulator/app/css/app.css）をそのまま引き継ぐ：
 *   - 黒〜チャコールの地、白い本文、明るいシアン1色を強調に使う
 *   - 見出し・数字・ボタンは、太さ800の LINE Seed JP を原稿の文字だけに絞って同梱（tools/build_fonts.py）。本文は端末のゴシック
 *   - 見出しの大きさは「いちばん長い語句が1行に収まる上限」から決めている。原稿の語句を長くしたら見直す
 *   - 強調色を替える時は、下の --ac・--ac-hi・--ac-ink・--ac-soft・--ac-line の5つだけを直す
 *   - 動きを減らす設定の端末では、広がる・動くをやめて、同じ内容をそのまま出す
 * 原本から外したもの：オープニング、大会向けの案内と紹介の枠、連絡先の入力、問い合わせ先、メッセージ。
 * 足したもの：GO QUEST のロゴ、入力の近くの案内、4項目の確認、住み継ぐ場面、時間軸、土台の図、相談先、画像の保存。
 * 営業シミュレーションと揃える部品の決まりは docs/03_UI共通仕様.md。
 */
@font-face {
  font-family: "RPSIM Gothic";
  src: url("../fonts/LINESeedJP-ExtraBold-subset.woff") format("woff");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #06080a;
  --bg-2: #0b0f13;          /* 入力欄の地 */
  --panel: #131a20;         /* カードの地 */
  --panel-2: #1c252d;
  --ink: #f4f7f9;
  --ink-2: rgba(244, 247, 249, .86);
  --mute: #9fadb9;
  --ac: #45d7ff;            /* 強調（シアン） */
  --ac-hi: #8ce7ff;         /* 押した時 */
  --ac-ink: #031a22;        /* シアンの上の文字 */
  --ac-soft: rgba(69, 215, 255, .14);
  --ac-line: rgba(69, 215, 255, .55);
  --hair: rgba(244, 247, 249, .14);         /* 飾りの区切り */
  --line-strong: rgba(244, 247, 249, .44);  /* 入力欄の枠・意味のある境界 */
  --danger: #ff9d9d;        /* 注意の文字と枠 */
  --danger-bg: rgba(255, 120, 120, .12);
  --bar-then: #7c8b99;
  --bar-mid: #2f95b3;
  --bar-rest: #2a343d;
  --r: 16px;
  --r-sm: 12px;
  --pad: 20px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", sans-serif;
  --display: "RPSIM Gothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", sans-serif;
  --num: "Helvetica Neue", "Arial", "Hiragino Sans", "Noto Sans JP", "BIZ UDPGothic", "Meiryo", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #000;
}
/* 画像の保存の画面を開いている間は、後ろの画面を動かさない */
html.is-modal, html.is-modal body { overflow: hidden; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  line-break: strict;
}

.app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(130% 46vh at 100% 0, rgba(38, 120, 150, .22), transparent 62%),
    radial-gradient(120% 40vh at 0 34vh, rgba(30, 86, 110, .14), transparent 64%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

.line { display: block; }
.ph { display: inline-block; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; border-radius: 6px; }
h1:focus, h1:focus-visible { outline: none; }

/* ---------- 動き：画面に入った時、見出しを1文字ずつ出し、ほかを下から順に出す ---------- */
@keyframes ch { 0% { opacity: 0; } 8% { opacity: .34; } 46% { opacity: .34; } 100% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.is-enter .ch { animation: ch .36s linear both; animation-delay: calc(var(--i) * 30ms + 60ms); }
.screen.is-enter > * { animation: rise .55s var(--ease) both; }
.screen.is-enter > :nth-child(2) { animation-delay: 60ms; }
.screen.is-enter > :nth-child(3) { animation-delay: 120ms; }
.screen.is-enter > :nth-child(4) { animation-delay: 180ms; }
.screen.is-enter > :nth-child(5) { animation-delay: 240ms; }
.screen.is-enter > :nth-child(6) { animation-delay: 300ms; }
.screen.is-enter > :nth-child(n+7) { animation-delay: 360ms; }
.veil { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 5; margin: 0 !important; background: var(--panel); pointer-events: none; }
.screen.is-enter > .veil { animation: none; }

/* ---------- 上部：GO QUEST のロゴ・名称・進み具合 ---------- */
.topbar {
  padding: calc(8px + env(safe-area-inset-top)) var(--pad) 0;
}
.topbar__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
/* ロゴ：正式素材（白抜き・横組み。規定の余白 1/2A ごと切り出された黒地の JPEG）をそのまま使う。
 * 箱の高さ 36px のうち上下左右の約 9px は規定の余白。マークの左端を本文の左にそろえるため、余白の分だけ左へ出す。
 * 黒い地を背景の色へ溶かすため lighten で重ねる（明るい方の色が残る。白いロゴの形と色は変わらない） */
.topbar__logo { flex: none; line-height: 0; }
.topbar__logo img { display: block; height: 36px; width: auto; margin-left: calc(-36px * 112 / 450); mix-blend-mode: lighten; }
.topbar__brand { font-family: var(--display); font-size: 11.5px; font-weight: 800; letter-spacing: .2em; color: var(--ac); text-align: right; }

/* 進み具合の表示。順番は 試す → つながり → 住み継ぐ → 相談 で固定。
 * すでに進んだ段階は押して戻れる。まだ進んでいない段階は押せない。押せる高さは44px */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: step; }
.steps__item { counter-increment: step; min-width: 0; }
.steps__btn {
  display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 44px; padding: 6px 0 3px;
  background: none; border: 0; border-bottom: 3px solid var(--hair); border-radius: 0;
  color: rgba(244, 247, 249, .4); font-family: var(--display); font-size: 13.5px; font-weight: 800; line-height: 1.3; white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.steps__btn::before { content: counter(step, decimal-leading-zero); font-size: 11px; letter-spacing: .04em; opacity: .9; }
.steps__btn[disabled] { cursor: default; }
.steps__item.is-reached .steps__btn { color: var(--ink-2); border-bottom-color: rgba(244, 247, 249, .34); }
.steps__item.is-done .steps__btn { color: var(--ink-2); border-bottom-color: var(--ac-line); }
.steps__item.is-current .steps__btn { color: var(--ink); border-bottom-color: var(--ac); }
.steps__item.is-current .steps__btn::before { color: var(--ac); opacity: 1; }
.steps__btn:not([disabled]):active { background: var(--ac-soft); }
.topbar :focus-visible { outline-offset: -3px; }

/* ---------- 画面の共通 ---------- */
.main { flex: 1; display: flex; flex-direction: column; }
.screen {
  position: relative;
  flex: 1;
  padding: 16px var(--pad) calc(36px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column;
}
.screen > * + * { margin-top: 12px; }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ac); }
.eyebrow::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: middle; position: relative; top: -1px; }
.title, .subtitle, .hero-title, .reference__title, .passon__title, .tl__title, .message__title, .found__top {
  font-family: var(--display); font-weight: 800; letter-spacing: .01em; font-feature-settings: "palt";
}
.title { font-size: clamp(24px, calc((100vw - 40px) / 11.3), 36px); line-height: 1.3; color: var(--ink); }
.eyebrow + .title { margin-top: 6px; }
.lead { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.lead, .note, .field__help, .fold__body, .bridge p, .evidence, .trend__note, .privacy, .hint__text, .passon__text, .direction, .stock, .consult p, .meaning dd, .value dd { text-wrap: pretty; }
.choice__label { text-wrap: balance; }
.note { font-size: 13px; line-height: 1.7; color: var(--mute); }
.note--center { text-align: center; }
/* 枠の中の見出し（試算の後の問いかけ・相談）。いちばん長い語句（12字）が、枠の内側（画面幅 − 80px）で1行に収まる大きさ */
.subtitle { font-size: clamp(19px, calc((100vw - 80px) / 12.2), 28px); line-height: 1.35; color: var(--ink); }

.section-gap { margin-top: 28px !important; }

/* 企画・制作の表記：最初の画面と相談の画面のいちばん下。画面に余りがあれば、下端へ寄せる */
.credit { margin-top: auto !important; padding-top: 32px; font-size: 12px; line-height: 1.7; color: var(--mute); }
.credit__in::before { content: ""; display: block; width: 18px; height: 2px; margin-bottom: 10px; background: var(--ac); }
.credit p:first-child { font-weight: 700; letter-spacing: .08em; }
.credit p:last-child { font-size: 13px; font-weight: 700; color: var(--ink); }

/* 入力の近くの案内（送信しない・自動保存しない・画像は自分で保存できる） */
.privacy {
  display: grid; grid-template-columns: 18px 1fr; column-gap: 8px; align-items: start;
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--panel);
  font-size: 12.5px; line-height: 1.65; color: var(--ink-2);
}
.privacy__icon { color: var(--ac); padding-top: 1px; }
.privacy__icon svg { display: block; width: 18px; height: 18px; }

/* ---------- ボタン ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 10px 22px;
  border: 1.5px solid var(--ac); border-radius: 28px;
  background: var(--ac); color: var(--ac-ink);
  font-family: var(--display); font-size: 16.5px; font-weight: 800; line-height: 1.4; text-align: center; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .25s var(--ease), background-color .2s;
}
.btn::after { content: "→"; }
.btn--plain::after { content: none; }
.btn--save::after { content: "↓"; }
.btn:active { background: var(--ac-hi); border-color: var(--ac-hi); transform: scale(.985); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn--secondary { background: transparent; border-color: rgba(244, 247, 249, .55); color: var(--ink); }
.btn--secondary::after { color: var(--ac); }
.btn--secondary:active { background: rgba(244, 247, 249, .1); border-color: var(--ink); }
.btn + .btn { margin-top: 12px; }

.textlink {
  display: inline-flex; align-items: center; min-height: 44px; padding: 4px 2px;
  background: none; border: 0; color: var(--ink); font-size: 15px; font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--ac); text-decoration-thickness: 2px; text-underline-offset: 6px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.actions { display: flex; flex-direction: column; }
.actions > .textlink { align-self: center; margin-top: 8px; }
.actions--start > .textlink { align-self: flex-start; }
.actions--end > .textlink { align-self: flex-end; margin-top: 0; }
.actions > .note { margin-top: 2px; }

/* ---------- S1 入口 ---------- */
.screen--hero { overflow: hidden; }
.screen--hero > * { position: relative; z-index: 1; }
.hero-art { position: absolute !important; z-index: 0 !important; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 170px; height: 170px; margin: 0 !important; opacity: .14; pointer-events: none; color: var(--ink); }
.hero-art .is-ac { fill: var(--ac); }
@media (max-height: 759px) { .hero-art { display: none; } }
.hero-title { font-size: clamp(30px, calc((100vw - 40px) / 9.2), 46px); line-height: 1.24; margin-top: 10px; }
.hero-title .line:last-child { color: var(--ac); }

.choice {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px;
  width: 100%; min-height: 84px; padding: 14px 14px 14px 18px;
  border: 1.5px solid var(--hair); border-radius: var(--r); background: var(--panel); color: var(--ink);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .3s var(--ease), border-color .2s;
}
.choice:active { transform: scale(.985); border-color: var(--ac-line); }
.choice__label { font-family: var(--display); font-size: 17px; font-weight: 800; line-height: 1.45; font-feature-settings: "palt"; }
.choice__note { display: block; font-size: 13px; font-weight: 500; color: var(--mute); margin-top: 2px; }
.choice__arrow {
  width: 38px; height: 38px; border-radius: 50%; background: var(--ac); color: var(--ac-ink);
  display: grid; place-items: center; font-family: var(--display); font-size: 17px; font-weight: 800;
}
.choice + .choice { margin-top: 12px; }
.assurance { font-size: 14px; color: var(--ink-2); text-align: center; }
.assurance .line { display: inline; }
.assurance::before { content: "✓"; color: var(--ac); font-weight: 700; margin-right: 6px; }

/* ---------- 入力 ---------- */
.field { display: block; }
.field__label { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.field__sub { font-size: 13px; font-weight: 500; color: var(--mute); }
.field__help { font-size: 13px; color: var(--mute); margin-top: 5px; line-height: 1.6; }
.field__error { font-size: 14px; font-weight: 700; color: var(--danger); margin-top: 6px; line-height: 1.6; }
.field__error:empty { display: none; }
.field__error::before { content: "！"; margin-right: 2px; }

.control {
  width: 100%; min-height: 54px; padding: 9px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-2);
  font-family: var(--display); font-size: 20px; font-weight: 800; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.control:focus { outline: 3px solid var(--ac); outline-offset: 1px; border-color: var(--ac); }
select.control {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1 1l7 7 7-7' fill='none' stroke='%2345d7ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}

/* －・＋ の印（線で描く。色はボタンの文字色） */
.pm { position: relative; }
.pm::before, .pm--plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 2px; }
.pm::before { width: 18px; height: 3px; margin: -1.5px 0 0 -9px; }
.pm--plus::after { width: 3px; height: 18px; margin: -9px 0 0 -1.5px; }

/* 金額：－［数字 万円］＋。－・＋ で100万円ずつ増減する。数字と単位は、ひとまとまりで中央に置く */
.stepper { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; min-height: 56px; }
.stepper__btn {
  padding: 0; border: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--ac); color: var(--ac-ink);
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.stepper__btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.stepper__btn:active { background: var(--ac-hi); }
.stepper__btn[disabled] { background: var(--bar-rest); color: var(--bar-then); cursor: default; }
.stepper__box {
  display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden;
  border: 1.5px solid var(--line-strong); border-left: 0; border-right: 0; background: var(--bg-2); cursor: text;
}
.stepper__box:focus-within { outline: 3px solid var(--ac); outline-offset: -3px; }
.stepper.is-invalid .stepper__box { border-color: var(--danger); border-width: 2px; outline-color: var(--danger); }
.stepper__figure { display: inline-flex; align-items: baseline; gap: 4px; max-width: 100%; }
.stepper__sizer {
  display: inline-grid; min-width: 44px;
  font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.2; color: var(--ink);
}
.stepper__sizer::after { content: attr(data-value); grid-area: 1 / 1; visibility: hidden; white-space: pre; padding: 11px 1px; }
.stepper__input {
  grid-area: 1 / 1; width: 100%; min-width: 0; margin: 0; padding: 11px 0; border: 0; border-radius: 0; background: none;
  font: inherit; color: inherit; text-align: right; -webkit-appearance: none; appearance: none;
}
.stepper__input:focus, .stepper__input:focus-visible { outline: none; }
.stepper__unit { font-size: 15px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

/* 上昇率：見出しの右に今の値、下にスライダー。両端の －・＋ は0.1％ずつ動かす */
.rate__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.rate__head .field__label { margin-bottom: 0; }
.rate__value { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.2; color: var(--ac); font-feature-settings: "palt"; white-space: nowrap; }
.slider { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; column-gap: 10px; align-items: center; }
.slider__btn {
  width: 44px; height: 44px; padding: 0;
  border: 1.5px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink);
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.slider__btn.pm::before { width: 14px; height: 2px; margin: -1px 0 0 -7px; }
.slider__btn.pm--plus::after { width: 2px; height: 14px; margin: -7px 0 0 -1px; }
.slider__btn:active { background: rgba(244, 247, 249, .12); }
.slider__btn[disabled] { opacity: .4; cursor: default; }
.slider__track { position: relative; --zero: .5; --from: .5; --to: .5; --fill: linear-gradient(to right,
  var(--bar-rest) calc(13px + (100% - 26px) * var(--from)), var(--ac) calc(13px + (100% - 26px) * var(--from)),
  var(--ac) calc(13px + (100% - 26px) * var(--to)), var(--bar-rest) calc(13px + (100% - 26px) * var(--to))); }
.slider__track::before {
  content: ""; position: absolute; top: 50%; left: calc(13px + (100% - 26px) * var(--zero));
  width: 2px; height: 18px; margin: -9px 0 0 -1px; background: var(--line-strong);
}
.range {
  position: relative; display: block; width: 100%; height: 44px; margin: 0; padding: 0; background: none; border-radius: 0;
  -webkit-appearance: none; appearance: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.range:focus { outline: none; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--fill); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--fill); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -10px; border: 4px solid var(--ink); border-radius: 50%;
  background: var(--ac);
}
.range::-moz-range-thumb { width: 26px; height: 26px; border: 4px solid var(--ink); border-radius: 50%; background: var(--ac); }
.range:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--ac); outline-offset: 3px; }
.range:focus-visible::-moz-range-thumb { outline: 3px solid var(--ac); outline-offset: 3px; }
.rate__ref { margin-top: 4px; padding: 2px 0 2px 10px; border-left: 3px solid var(--ac); }
.rate__ref-main { font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--ink); }
.rate__ref-detail { font-size: 12px; line-height: 1.6; color: var(--mute); }

details.fold { border: 1px solid var(--hair); border-radius: 14px; background: var(--panel); overflow: hidden; }
details.fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 10px 14px; font-size: 15px; font-weight: 700; color: var(--ink);
  -webkit-tap-highlight-color: transparent; word-break: auto-phrase;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "＋"; color: var(--ac); font-weight: 700; flex: none; }
details.fold[open] > summary::after { content: "−"; }
details.fold > summary:focus-visible { outline-offset: -3px; border-radius: 14px; }
.fold__body { padding: 2px 14px 16px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.fold__body > * + * { margin-top: 12px; }
.fold__body h3 { font-size: 13px; font-weight: 700; color: var(--ac); letter-spacing: .06em; padding-bottom: 3px; border-bottom: 1px solid var(--hair); }
.fold__body h3 + * { margin-top: 6px; }
.fold__body ul.dots li { position: relative; padding-left: 1em; }
.fold__body ul.dots li::before { content: "・"; position: absolute; left: 0; }
.fold__body ul.dots li + li { margin-top: 6px; }
.fold__body a { color: var(--ink); font-weight: 700; text-decoration-color: var(--ac); text-decoration-thickness: 2px; text-underline-offset: 4px; display: inline-flex; min-height: 44px; align-items: center; }
.formula { padding: 10px 12px; border-left: 3px solid var(--ac); border-radius: 0 10px 10px 0; background: var(--panel-2); font-weight: 700; color: var(--ink); }
.demo-flag { padding: 8px 12px; border-left: 3px solid var(--danger); background: var(--danger-bg); color: var(--danger); font-weight: 700; font-size: 14px; }

/* 年度ごとの指数の表（出典の中） */
.idx { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.idx th, .idx td { padding: 5px 6px; border-bottom: 1px solid var(--hair); text-align: right; font-family: var(--num); }
.idx th { font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--panel-2); text-align: center; }
.idx td:nth-child(odd) { text-align: center; color: var(--mute); font-family: var(--font); }
.idx td:nth-child(2) { border-right: 1px solid var(--hair); }
.idx td.is-then, .idx td.is-now { font-weight: 700; color: var(--ink); background: var(--ac-soft); }
.idx__note { font-size: 12px; color: var(--mute); }

/* ---------- 結果 ---------- */
.result { text-align: center; padding: 6px 0 2px; }
.result .eyebrow::before { content: none; }
.result__figure { font-family: var(--num); color: var(--ink); font-weight: 700; line-height: 1.1; white-space: nowrap; }
.result__approx, .result__unit { font-size: clamp(18px, 5.4vw, 22px); font-weight: 700; font-family: var(--font); }
.result__num { font-family: var(--display); font-size: clamp(46px, 16vw, 68px); letter-spacing: -.01em; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ac); }
.result__caption { font-size: 13px; line-height: 1.6; color: var(--mute); text-align: center; margin-top: 10px !important; }
.result__caption--start { text-align: left; margin-top: 8px !important; }
.result__underline { width: 72px; height: 2px; background: var(--ac); margin: 12px auto 0; }

.bars { padding: 16px; border-radius: var(--r); background: var(--panel); }
.bar + .bar { margin-top: 14px; }
.bar__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 12px; }
.bar__label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.bar__value { font-family: var(--display); font-size: 20px; font-weight: 800; color: var(--ink); margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar__value small { font-size: 13px; font-weight: 700; font-family: var(--font); margin-left: 1px; }
.bar__track { height: 22px; margin-top: 4px; border-radius: 6px; background: rgba(244, 247, 249, .08); overflow: hidden; }
.bar__fill { height: 100%; width: 0; border-radius: 0 6px 6px 0; background: var(--bar-then); transition: width .8s cubic-bezier(.2,.7,.2,1); }
.bar--mid .bar__fill { background: var(--bar-mid); }
.bar--main .bar__fill { background: var(--ac); }
.bar--main .bar__value { font-size: 22px; color: var(--ac); }

.diff { text-align: center; font-family: var(--display); font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.45; }
.diff .line:last-child { font-size: clamp(20px, 6vw, 26px); }

.evidence { font-size: 12px; line-height: 1.7; color: var(--ink-2); padding: 8px 10px; border-left: 3px solid var(--ac); border-radius: 0 10px 10px 0; background: var(--panel); font-variant-numeric: tabular-nums; }

/* 試算の後の問いかけ（A・B それぞれ）。シアンの罫の枠 */
.bridge { padding: 22px 18px; border: 1.5px solid var(--ac-line); border-radius: 20px; background: var(--panel); color: var(--ink); }
.bridge .subtitle .line:last-child { color: var(--ac); }
.bridge p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
.bridge .btn { margin-top: 18px; }

/* 参考資料：建築費の推移（S3A のいちばん下） */
.reference { margin-top: 32px !important; padding-top: 20px; border-top: 1px solid var(--hair); }
.reference > * + * { margin-top: 10px; }
.reference__title { font-size: 22px; line-height: 1.4; color: var(--ink); }
.reference__title .line { display: inline; }
.reference__caption { font-size: 12px; line-height: 1.7; color: var(--mute); }
.decade { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 12px; row-gap: 6px; padding: 14px 14px 12px; border-radius: var(--r); background: var(--panel-2); color: var(--ink); }
.decade__label { font-size: 14px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.decade__period { display: block; font-size: 12px; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; }
.decade__rate { font-family: var(--display); font-weight: 800; font-size: clamp(32px, 10vw, 46px); line-height: 1; color: var(--ac); white-space: nowrap; font-variant-numeric: tabular-nums; }
.decade__detail { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--hair); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.trend { border-radius: var(--r); background: var(--panel); padding: 12px 10px 8px; }
.trend svg { display: block; width: 100%; height: auto; }
.trend .g-grid { stroke: var(--hair); stroke-width: 1; }
.trend .g-base { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.trend .g-axis { stroke: var(--line-strong); stroke-width: 1; }
.trend .g-tick { fill: var(--mute); font-family: var(--num); font-size: 11px; }
.trend .c-rest { fill: var(--bar-rest); }
.trend .c-then { fill: var(--bar-then); }
.trend .c-now { fill: var(--ac); }
.trend .c-cap { fill: var(--ink); }
.trend .m-then { fill: var(--bar-then); }
.trend .m-now { fill: var(--ac); }
.trend__legend { display: grid; gap: 4px; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.5; font-variant-numeric: tabular-nums; }
.trend__legend li { display: grid; grid-template-columns: 14px 1fr; column-gap: 8px; align-items: baseline; }
.trend__legend li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--bar-then); position: relative; top: 1px; }
.trend__legend li.is-now::before { background: var(--ac); }
.trend__note { font-size: 12px; line-height: 1.7; color: var(--mute); }

/* ---------- S4 つながり（任意の4項目） ----------
 * 3つの選び方は同じ見た目にする（「できている」を良い色にしない＝評価に見せない）。押した物だけシアンの枠 */
.checkitems { display: grid; gap: 12px; counter-reset: q; }
.checkitem { padding: 14px 14px 12px; border-radius: var(--r); background: var(--panel); counter-increment: q; }
.checkitem__q { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.checkitem__q::before { content: counter(q, decimal-leading-zero); font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 1.75; color: var(--ac); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.seg__btn {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 4px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg-2); color: var(--ink-2);
  font-size: 13.5px; font-weight: 700; line-height: 1.3; text-align: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.seg__btn[aria-pressed="true"] { border-color: var(--ac); background: var(--ac-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ac); }
.seg__btn:active { background: var(--panel-2); }
.seg__text .line { display: block; }
.hint { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--ac); border-radius: 0 10px 10px 0; background: var(--panel-2); }
.hint__label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; line-height: 1.5; color: var(--ac); }
.hint__title { margin-top: 2px; font-size: 15px; font-weight: 700; line-height: 1.55; color: var(--ink); }
.hint__text { margin-top: 4px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }

/* ---------- S5 住み継ぐ場面 ---------- */
.passon { display: grid; gap: 10px; counter-reset: pass; margin-top: 18px !important; }
.passon__item { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--panel); counter-increment: pass; }
.passon__item::before { content: counter(pass, decimal-leading-zero); grid-row: 1 / span 2; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.2; color: var(--ac); }
.passon__title { font-size: 19px; line-height: 1.4; color: var(--ink); }
.passon__text { margin-top: 2px; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.value { display: grid; gap: 10px; margin-top: 20px !important; }
.value__row { padding: 2px 0 2px 12px; border-left: 3px solid var(--ac); }
.value__row dt { font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--ac); }
.value__row dd { font-size: 15px; line-height: 1.65; color: var(--ink); }
.direction { margin-top: 20px !important; padding: 18px; border: 1.5px solid var(--ac-line); border-radius: 20px; background: var(--panel); font-size: 15.5px; font-weight: 700; line-height: 1.8; color: var(--ink); }

/* ---------- S6 時間軸 ----------
 * 左の縦線に4つの点。「引き渡し」の札の先も線が続き、最後は点線で「その先へ」。
 * 画面に入った時だけ、線が上から伸び、点が順に出る（動きを減らす設定の端末では、最初から全部見える） */
@keyframes tl-grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes tl-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.timeline { position: relative; margin-top: 22px !important; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 34px; width: 2px; background: var(--ac); transform-origin: 50% 0; }
.tl { position: relative; padding-bottom: 16px; }
.tl__dot { position: absolute; left: -34px; top: 5px; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ac); background: var(--bg); }
.tl--after .tl__dot { background: var(--ac); box-shadow: 0 0 0 4px var(--ac-soft); }
.tl__title { font-size: 20px; line-height: 1.5; color: var(--ink); }
.tl__text { font-size: 13.5px; line-height: 1.65; color: var(--mute); }
.tl--mark { padding-bottom: 14px; margin-left: -34px; }
.tl__tag { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--ac); color: var(--ac-ink); font-size: 12.5px; font-weight: 800; line-height: 1.6; letter-spacing: .06em; }
.tl--beyond { padding: 2px 0 0; min-height: 34px; }
.tl--beyond::before { content: ""; position: absolute; left: -25px; top: -16px; height: 46px; border-left: 2px dashed var(--ac-line); }
.tl__beyond { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ac); }
.screen.is-enter .timeline::before { animation: tl-grow 1.5s var(--ease) .25s both; }
.screen.is-enter .tl { animation: tl-in .5s var(--ease) both; animation-delay: calc(.3s + var(--k, 0) * 200ms); }

/* 経営へのメッセージ（この画面の主役）。シアンの罫の枠 */
.message { padding: 22px 18px; border: 1.5px solid var(--ac-line); border-radius: 20px; background: var(--panel); }
.message__title { font-size: clamp(21px, calc((100vw - 76px) / 11.4), 30px); line-height: 1.4; color: var(--ink); }
.message__title .line:last-child { color: var(--ac); }
.message__lead { margin-top: 12px; font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.meaning { display: grid; gap: 0; border-radius: var(--r); background: var(--panel); overflow: hidden; }
.meaning__row { padding: 12px 16px; }
.meaning__row + .meaning__row { border-top: 1px solid var(--hair); }
.meaning__row dt { font-size: 13px; font-weight: 700; line-height: 1.6; color: var(--ac); }
.meaning__row dd { font-size: 15px; line-height: 1.7; color: var(--ink); }
.stock { padding: 12px 14px; border: 1px solid var(--hair); border-radius: 14px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }

/* ---------- S7 着地と相談 ---------- */
/* 土台の図：下に4つの土台（長期修繕計画・定期点検・必要なメンテナンス・住宅履歴）、その上に接点 */
.found { display: grid; justify-items: center; gap: 6px; margin-top: 20px !important; }
.found__top { width: 86%; padding: 12px 14px; border: 1.5px solid var(--ac); border-radius: 14px; background: var(--ac-soft); font-size: 16px; line-height: 1.45; color: var(--ink); text-align: center; }
.found__base { width: 100%; padding: 10px 10px 12px; border-radius: var(--r); background: var(--panel-2); }
.found__label { font-size: 12px; font-weight: 700; letter-spacing: .12em; line-height: 1.6; color: var(--ac); text-align: center; }
.found__list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.found__list li { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 8px; border-radius: 10px; background: var(--panel); font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--ink); text-align: center; }
.offer { padding: 14px 16px; border-radius: var(--r); background: var(--panel); }
.offer p { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.offer p + p { margin-top: 8px; }
/* 相談先：メールの起動リンク（件名だけ）と、アドレスの表示。送信の仕組みは無い */
.consult { padding: 22px 18px; border: 1.5px solid var(--ac-line); border-radius: 20px; background: var(--panel); }
.consult .subtitle .line:last-child { color: var(--ac); }
.consult p { margin-top: 10px; font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.consult .btn--mail { margin-top: 18px; }
.consult .consult__note { margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--mute); }
.consult__to { margin-top: 14px; border-top: 1px solid var(--hair); }
.consult__to > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.consult__to dt { min-width: 5.4em; font-size: 12.5px; font-weight: 700; color: var(--mute); }
.consult__to dd { font-size: 16px; font-weight: 700; color: var(--ink); }
.consult__mail { font-family: var(--num); -webkit-user-select: all; user-select: all; }
.save-again { margin-top: 24px !important; }
.save-again:empty { display: none; }
.save-again .note { margin-bottom: 8px; }

/* ---------- 結果を画像で保存（作った画像の確認と保存） ---------- */
.save {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 80; overflow-y: auto; overscroll-behavior: contain;
  display: flex; justify-content: center; align-items: flex-start;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .78);
}
.save__box { width: 100%; max-width: 440px; padding: 14px 16px 18px; border-radius: 20px; background: var(--panel); border: 1px solid var(--hair); }
.save__box:focus { outline: none; }
.save__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.save__title { font-family: var(--display); font-weight: 800; font-size: 18px; line-height: 1.4; }
.save__close {
  flex: none; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: none; color: var(--ink);
  font-family: var(--display); font-size: 13px; font-weight: 800; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.save__status { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.save__frame { margin-top: 10px; border-radius: 12px; overflow: hidden; background: #000; }
.save__frame:has(img[hidden]) { display: none; }
.save__img { display: block; width: 100%; height: auto; -webkit-touch-callout: default; }
.save__download { margin-top: 14px; }
.save__howto { margin-top: 12px; }
.save__howto li { position: relative; padding-left: 1em; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.save__howto li::before { content: "・"; position: absolute; left: 0; }

.noscript { padding: 24px var(--pad); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* 幅の狭い端末（320px前後）：ボタンの文が途中で折れないように少し詰める */
@media (max-width: 359px) {
  .btn { font-size: 15.5px; padding: 10px 14px; gap: 6px; }
  .choice { padding: 12px 12px 12px 14px; column-gap: 8px; }
  .choice__label { font-size: 16px; }
  .choice__note { font-size: 12px; }
  .choice__arrow { width: 32px; height: 32px; font-size: 15px; }
  .steps { gap: 4px; }
  .steps__btn { font-size: 13px; gap: 4px; }
  .decade { grid-template-columns: 1fr; }
  .decade__period { display: inline; margin-left: 10px; }
  .seg__btn { font-size: 13px; padding: 6px 2px; }
}
/* 進み具合の番号は、4文字の段階名が収まらない幅では外す（名前だけ残す） */
@media (max-width: 389px) {
  .steps__btn::before { content: none; }
}

@media (min-width: 481px) {
  .app { border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
}
