/* しごとのモヤモヤ推理 — スマホ縦画面ファースト（§7-5）
   配色はキャラクター（藍の和装×金飾り）に合わせた和風トーン */

:root {
  --ink: #22405e;        /* 藍（メイン） */
  --ink-deep: #16304a;
  --gold: #b9964a;       /* 金飾り */
  --paper: #f6f1e7;      /* 和紙 */
  --paper-deep: #efe7d7;
  --white: #ffffff;
  --text: #33302a;
  --muted: #7d766a;
  --ok: #2e7d4f;
  /* 注意（エラーではない）。責めない色として、赤ではなく落ち着いた橙にする */
  --caution: #a8622a;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(34, 64, 94, .10);
}

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

body {
  min-height: 100dvh;
  background: var(--paper);
  background-image: radial-gradient(rgba(185,150,74,.06) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;      /* 引っ張り更新・バウンスで推理が途切れないように */
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}

/* ---------- ヘッダー ---------- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 2px 6px;
}
.app-title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .06em;
  font-size: 1.02rem;
}
/* 進捗チップ：絵文字は使わず、金色のドットで状態を示す */
.stage-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(34,64,94,.22);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.stage-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

/* ---------- キャラ＋吹き出し ---------- */
.stage {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 0 4px;
}
.char { flex: 0 0 118px; }
.char img {
  width: 118px;
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(34,64,94,.18));
  transition: opacity .18s ease;
}
.char img.swap { opacity: 0; }
/* 長考中はキャラをゆっくり揺らし、固まっていないことを伝える */
.char img.thinking { animation: bob 2.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.bubble {
  position: relative;
  flex: 1;
  background: var(--white);
  border: 1.5px solid rgba(34,64,94,.18);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 92px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
}
.bubble::before {
  content: "";
  position: absolute;
  left: -9px;
  bottom: 26px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border-left: 1.5px solid rgba(34,64,94,.18);
  border-bottom: 1.5px solid rgba(34,64,94,.18);
  transform: rotate(45deg);
}
.bubble p {
  margin: 0;
  font-size: .98rem;
  min-height: 1.75em;
  overflow-wrap: anywhere;
}
.bubble p strong { color: var(--ink); }

/* 長考中の「...」：考えているセリフの末尾でだけ、点が1つずつ増える。
   要素は setThinking() が #bubbleText の末尾に挿し込み、話し始めに取り除く。
   （hidden属性やCSSでの出し分けはflexコンテキストで壊れやすいためDOM操作で制御する） */
.wait-dots {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  width: 0;
  letter-spacing: .05em;
  animation: dotsGrow 1.6s steps(4, jump-none) infinite;
}
@keyframes dotsGrow {
  from { width: 0; }
  to   { width: 3.2ch; }
}

/* S0 ヒーロー表示（キャラを大きく・吹き出しを下に） */
.stage.hero {
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 16px;
}
.stage.hero .char { flex: none; }
.stage.hero .char img { width: 168px; }
.stage.hero .bubble { flex: none; width: 100%; min-height: 84px; }
.stage.hero .bubble::before {
  left: 50%;
  top: -9px;
  bottom: auto;
  margin-left: -8px;
  border: none;
  border-left: 1.5px solid rgba(34,64,94,.18);
  border-top: 1.5px solid rgba(34,64,94,.18);
}

/* ---------- コンテンツ ---------- */
/* 選択肢・CTAを親指の届く下側に寄せるため、縦フレックスで構成 */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 0 max(20px, env(safe-area-inset-bottom));
}
.content > .fade-in {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.spacer { flex: 1; min-height: 8px; }

.fade-in { animation: fadeUp .28s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.note {
  font-size: .86rem;
  color: var(--muted);
  margin: 10px 2px;
}

.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.badge {
  font-size: .78rem;
  color: var(--ink);
  background: var(--paper-deep);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ボタン */
.btn {
  display: block;
  width: 100%;
  min-height: 54px;
  border: none;
  border-radius: var(--radius);
  font-size: 1.02rem;
  font-family: inherit;
  cursor: pointer;
  padding: 12px 16px;
  transition: transform .06s ease, opacity .15s ease, background-color .15s ease;
  touch-action: manipulation;   /* ダブルタップ拡大を防ぐ */
  user-select: none;
  -webkit-user-select: none;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* タップした選択肢の視覚フィードバック（応答待ちの間も「押せた」と分かるように） */
.btn-choice.selected,
.btn-choice.selected:disabled {
  background: var(--ink-deep);
  color: #fff;
  border-color: var(--ink-deep);
  opacity: 1;
}
.btn-choice.dimmed:disabled { opacity: .35; }

.btn-primary {
  background: linear-gradient(180deg, #2c4d70, var(--ink-deep));
  color: #fff;
  font-weight: 600;
  letter-spacing: .04em;
  box-shadow: 0 3px 10px rgba(22,48,74,.28);
}
.btn-choice {
  background: var(--white);
  color: var(--ink-deep);
  border: 1.5px solid rgba(34,64,94,.25);
  margin-bottom: 10px;
  font-weight: 500;
}
.btn-choice.emph { border-color: var(--ink); border-width: 2px; font-weight: 600; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  font-size: .88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.choice-list { margin-top: 4px; }

/* 補助リンク行 */
.aux-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.aux-row .btn-ghost { width: auto; padding: 8px 6px; }

.help-box {
  background: var(--paper-deep);
  border-radius: 10px;
  font-size: .86rem;
  padding: 10px 14px;
  margin: 0 0 12px;
  color: #5a5344;
}

/* インライン確認（やめる） */
.inline-confirm {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.inline-confirm .btn { min-height: 46px; font-size: .92rem; }

/* ---------- 結果画面 ---------- */
.result-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
}
/* 推理の答え＝この画面の主役。金の枠で1枚だけ格を変える */
.result-card.reveal {
  border: 1.5px solid rgba(185,150,74,.6);
  background: #fffdf7;
}
.result-headline {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  color: var(--ink-deep);
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.7;
  margin: 0 0 8px;
  text-wrap: balance;
}

.section-title {
  display: flex;
  /* 見出しが2行になったとき、center だと金のドットが行間へ落ちる。
     先頭行の高さに合わせて上端で揃える */
  align-items: flex-start;
  gap: 8px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
}
.section-title::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: .55em;
  flex: none;
  background: var(--gold);
  border-radius: 50%;
}

/* 小見出し（あなたは、こう答えました／だから、こう考えられます 等）。推理の「間」をつくる */
.p-kicker {
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 600;
  margin: 14px 0 8px;
}
.result-card > .p-kicker:first-child,
.section-title + .p-kicker { margin-top: 0; }

/* 推理の道すじ図（回答 → 見立て）。#63
   手がかりを縦に並べ、下向き矢印で見立てへ収束させる。番号ではなくアイコンにするのは、
   手がかりに順位や時系列があるように読まれないようにするため（順序は寄与度であって工程ではない） */
.dmap { margin: 0; }
.achip { list-style: none; margin: 0; padding: 0; }
.achip li {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  padding: 0 0 14px;
  font-size: .9rem;
}
.achip li:last-child { padding-bottom: 4px; }
.achip .amark {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--white);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.achip .amark .ic { width: 14px; height: 14px; }
.achip li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 12px; top: 30px; bottom: 2px;
  width: 1.5px;
  background: rgba(185,150,74,.35);
}

.dmap-join {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 6px 0 10px;
  color: var(--gold);
}
.dmap-join .jtext { font-size: .8rem; letter-spacing: .1em; color: var(--ink); font-weight: 600; }

/* 見立ては、この図の収束点だけに置く。カード①と二重に出すと同じラベルを2回読ませることになる */
.verdicts { display: flex; flex-direction: column; gap: 8px; }
.verdict { border-radius: 12px; padding: 10px 12px; }
.verdict.main { border: 2px solid var(--gold); background: #fffdf7; }
.verdict-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: var(--gold); }
.verdict-title { font-weight: 700; color: var(--ink-deep); font-size: .98rem; line-height: 1.5; }
.verdict-sub { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.verdict-altline {
  align-self: flex-start;
  font-size: .78rem;
  color: var(--muted);
  border: 1px dashed rgba(34,64,94,.3);
  border-radius: 8px;
  padding: 3px 10px;
  background: var(--white);
}

/* 消去法の一文（だから、こう考えられます）。ここだけ明朝＝推理師の声 */
.deduction {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-deep);
  background: var(--paper-deep);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
  margin: 0;
}

/* 消去法と「ひょっとして」のあいだの間（ま）。カードは分けず、息継ぎだけ入れる */
.scene-sep {
  border: none;
  border-top: 1px dashed rgba(34,64,94,.2);
  margin: 16px 0 0;
}
.scene-text { margin: 0; font-size: .92rem; }

/* 回答から個別に確認できた作業。関連・順序・回数は推定しない */
.touch-box {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--paper-deep);
  border-radius: 10px;
}
.touch-count { font-size: .88rem; color: var(--ink); margin-bottom: 8px; font-weight: 600; }
/* 番号付きではなくアイコン付きにする。番号は工程の順序に読まれるが、
   ここは個別に確認できた作業の列挙であって順序ではない */
.touch-list { list-style: none; margin: 0; padding: 0; font-size: .86rem; color: #55503f; }
.touch-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 6px;
}
.touch-list .ic-s { margin-top: 4px; color: var(--gold); }
/* 回数を責めに変えないための一言。必ず添える（§8-3 事業者を責めない） */
.touch-note { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }

/* 頼めることカード */
.ask-lead { margin: 0 0 12px; font-size: .88rem; }
.effect-note { font-size: .84rem; color: var(--muted); margin: 10px 0 0; }

/* 「おまかせできる部分」は構成図と確認できた作業で3回目の重複になるため置かない。
   残すのは丸投げ不安への答え＝「ここはあなたの手元に残ります」だけ（#63 モックレビュー） */
.scope-box { border-radius: 10px; padding: 12px 14px; font-size: .88rem; margin-top: 14px; }
.scope-human { background: var(--paper-deep); }
.scope-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .84rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.scope-head .ic-s { margin-top: 4px; }
.scope-human .scope-head { color: var(--gold); }
.scope-list { list-style: none; margin: 0; padding: 0; }
.scope-list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 7px;
  align-items: start;
  margin-bottom: 4px;
}
.scope-list .ic-s { width: 12px; height: 12px; margin-top: 6px; }
.scope-human .scope-list .ic-s { color: var(--gold); }

/* カタログカード */
.catalog-card {
  border: 1.5px solid rgba(34,64,94,.2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: var(--white);
}
.catalog-card.first { border-color: var(--gold); border-width: 2px; background: #fffdf7; }
.catalog-rank { font-size: .74rem; color: var(--gold); font-weight: 600; letter-spacing: .06em; }
.catalog-title { font-size: 1rem; font-weight: 600; color: var(--ink-deep); margin: 2px 0 4px; }
.catalog-desc { font-size: .86rem; margin: 0 0 8px; color: #55503f; }
.summary-lead { margin-bottom: 10px; }
.consult-button, .summary-note { margin-top: 10px; }
.consultation-preview p { margin: 0; font-size: .9rem; }
.consultation-preview .note { margin-top: 8px; }
/* 価格・納期：絵文字ではなくSVGアイコン＋ラベルで表示 */
.catalog-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.mchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  background: var(--paper-deep);
  border-radius: 6px;
  padding: 3px 10px;
}
.mchip .ic-s { color: var(--muted); }
.mchip b { font-weight: 600; color: var(--muted); font-size: .72rem; }

.disclaimer { font-size: .78rem; color: var(--muted); margin: 8px 2px 16px; }

/* 答え合わせの締めの一文。ここも推理師の声＝明朝 */
.closing {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: .95rem;
  color: var(--ink-deep);
  margin: 0 0 10px;
}

/* 相談要約 */
.field-label {
  display: block;
  color: var(--ink-deep);
  font-size: .9rem;
  font-weight: 600;
  margin: 12px 0 6px;
}
.field-select {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid rgba(34,64,94,.25);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  padding: 8px 12px;
}
.field-select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* 相談のタイトル欄（#57）。本文と同じ枠に見せて、どちらも直せることを形で示す */
.field-input {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid rgba(34,64,94,.25);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  padding: 8px 12px;
}
.field-input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.field-note { margin: 4px 2px 10px; }
.consult-note { color: #8a3b2f; }
.summary-box {
  width: 100%;
  min-height: 220px;
  border: 1.5px solid rgba(34,64,94,.25);
  border-radius: 10px;
  font-family: inherit;
  font-size: .86rem;
  line-height: 1.7;
  padding: 12px;
  background: var(--white);
  color: var(--text);
  resize: vertical;
}
.copy-done { color: var(--ok); font-size: .86rem; text-align: center; margin: 6px 0; min-height: 1.4em; }
/* 完了マーク：絵文字ではなくCSSのチェック形状 */
.copy-done.done::before {
  content: "";
  display: inline-block;
  width: 5px; height: 10px;
  margin-right: 8px;
  border: solid var(--ok);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}

/* ---------- フッター ---------- */
.app-footer {
  font-size: .72rem;
  color: var(--muted);
  text-align: center;
  padding: 10px 8px 18px;
}
.app-footer p { margin: 4px 0; }
.app-footer__links { display: flex; gap: 8px; justify-content: center; align-items: center; }
.app-footer__links a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.app-footer__links span { color: var(--muted); }

/* ---------- 演出制御 ---------- */
@media (prefers-reduced-motion: reduce) {
  .fade-in { animation: none; }
  .char img { transition: none; }
  .char img.thinking { animation: none; }
  .btn { transition: none; }
  .stage-chip::before { animation: none; opacity: .8; }
  /* 点の増減は止め、3点を出したままにする（考え中であることは伝える） */
  .wait-dots { animation: none; width: auto; }
}

/* 背の低い端末（iPhone SE等）: 1画面に収まるよう詰める */
@media (max-height: 720px) {
  .app-header { padding: 8px 2px 4px; }
  .stage { padding: 6px 0 2px; }
  .char { flex-basis: 96px; }
  .char img { width: 96px; }
  .bubble { min-height: 78px; padding: 10px 14px; }
  .bubble::before { bottom: 20px; }
  .stage.hero .char img { width: 132px; }
  .btn { min-height: 48px; }
  .btn-choice { margin-bottom: 8px; }
  .content { padding-top: 8px; }
  .app-footer { padding: 6px 8px 12px; }
}

/* 補足欄（自由記入・#56）
   選択肢が主役で補足は添えもの、という順序をそのまま画面の順序にする（#55 決定事項24）。
   選択肢の下に置き、罫線で「ここから先は任意」と分かる形にする */
.aside-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(34, 64, 94, .12);
}
.aside-label { font-size: .86rem; color: var(--muted); margin: 0 2px 6px; }
.aside-box {
  width: 100%;
  min-height: 62px;
  border: 1.5px solid rgba(34, 64, 94, .25);
  border-radius: 10px;
  font-family: inherit;
  font-size: .9rem;
  line-height: 1.6;
  padding: 10px;
  background: var(--white);
  color: var(--text);
  resize: vertical;
}
.aside-count { font-size: .8rem; color: var(--muted); text-align: right; margin: 4px 2px 0; }
.aside-count.full { color: var(--caution); }
/* 個人情報らしき入力への注意。責めない色にする（エラーの赤ではない） */
.aside-warn { font-size: .86rem; color: var(--caution); margin: 6px 2px 0; }

/* 解決策3案（#59）
   カード自体が次へのボタン。選んでから別のボタンを押す形にすると、
   選んだのに進めていない状態が生まれる（#55 決定事項19） */
.plan-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  white-space: normal;
  padding: 14px;
  border: 1.5px solid rgba(34, 64, 94, .25);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  height: auto;
  min-height: 0;
}
.plan-label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.plan-doing { font-size: .98rem; font-weight: 700; line-height: 1.5; }
.plan-line { font-size: .88rem; line-height: 1.6; }
.plan-line b {
  display: inline-block;
  min-width: 4.6em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}
/* 「こうなる」だけを強調する。いまの場面と変わったあとの場面を対で置き、
   変わったあとが目に入るようにする（#55 決定事項20） */
.plan-line.becomes { font-weight: 700; }
.plan-line.becomes b { color: var(--ok); font-weight: 700; }
.plan-meta { font-size: .82rem; color: var(--muted); }
/* 断定しないための一言。目立たせすぎると推奨に読まれる */
.plan-note { font-size: .84rem; color: var(--muted); line-height: 1.6; }
.plan-unsure { border-style: dashed; }

/* ---------- 結果画面の図解（#63） ---------- */

/* 文節単位の改行制御。日本語は既定だと任意の文字間で折り返すため、
   意味のかたまりで包んで、かたまりの境界でだけ改行させる */
.nb { display: inline-block; }

/* アイコンスプライトの置き場。描画させずに定義だけを持たせる。
   style属性で書くとCSP（style-src 'self'）に弾かれて画面に露出するため、必ずここで指定する */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* インラインSVGアイコン。currentColor で親の色を継ぐ */
.ic { width: 20px; height: 20px; flex: none; }
.ic-s { width: 14px; height: 14px; flex: none; }

/* こん の演出配置。セリフは足さず、ブロックの中で指し・披露し・見守る。
   アニメーションは付けない（付けると図より先に動きへ目が行く。#63 モック v5） */
.char-wrap { position: relative; display: block; }
.char-wrap img { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 5px rgba(34,64,94,.18)); }
.char-wrap .spark { position: absolute; top: -9px; left: -9px; width: 16px; height: 16px; color: var(--gold); opacity: .9; }

/* 見立てノード: point の指が左上（＝見立ての文字）を向く */
.vgrid { display: grid; grid-template-columns: 1fr 62px; gap: 6px; align-items: center; }
.vgrid .char-wrap { width: 62px; margin: -6px -2px -10px 0; }

/* いま → 頼んだ後 の構成図。ノードは1段だけ置き、リンク部で手作業と自動を対比する。
   2段（いまの列／頼んだ後の列）にすると同じノードを2度読ませることになる */
.flowbox {
  background: #faf6ee;
  border: 1px solid rgba(185,150,74,.25);
  border-radius: 10px;
  padding: 12px 10px;
  margin: 0 0 10px;
}
.flow-row { display: flex; align-items: stretch; gap: 4px; }
.fnode {
  flex: 1;
  min-width: 0;
  background: var(--white);
  border: 1.5px solid rgba(34,64,94,.25);
  border-radius: 10px;
  padding: 8px 2px 6px;
  text-align: center;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.fnode .flabel { font-size: .68rem; line-height: 1.35; color: var(--text); }
.flink {
  flex: 0 0 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: var(--ink);
}
.flink .ic-s { width: 12px; height: 12px; }
.flink .lk-now { color: var(--muted); }
.flink .lk-after { color: var(--ok); }
/* 凡例は第一候補にだけ添える。全カードに付けると同じ説明を繰り返すことになる */
.flow-foot { display: grid; grid-template-columns: 1fr 58px; gap: 8px; align-items: end; }
.flow-foot .char-wrap { width: 58px; margin: 0 -2px -6px 0; }
.flow-legend { list-style: none; margin: 10px 2px 0; padding: 0; font-size: .8rem; }
.flow-legend li { display: grid; grid-template-columns: 16px 1fr; gap: 7px; align-items: start; margin-bottom: 4px; }
.flow-legend .ic-s { width: 12px; height: 12px; margin-top: 5px; }
.flow-legend b { font-weight: 700; font-size: .74rem; margin-right: 6px; }
.leg-now { color: var(--muted); }
.leg-after, .leg-after b { color: var(--ok); }

.disclaimer.in-card { margin: 10px 0 0; }

/* 掲載案内＝ためらいへの答え3点（無料・下書きはこちら・匿名）。
   こん はカード右上に前面で乗る（背面へ回すと隠れて見えない。#63 モック v5） */
.consultation-preview { position: relative; margin-top: 56px; }
.peek-char {
  position: absolute;
  top: -48px; right: 14px;
  width: 62px; height: auto;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(34,64,94,.16));
}
.assure-list { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.assure-list li { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; margin-bottom: 8px; }
.assure-list li:last-child { margin-bottom: 0; }
.assure-list .ic-s { width: 15px; height: 15px; margin-top: 4px; color: var(--gold); }

/* 答え合わせ。confident が見出しの横で答えを待つ */
.gate-head { display: grid; grid-template-columns: 1fr 66px; gap: 10px; align-items: center; margin-bottom: 4px; }
.gate-head .char-wrap { width: 66px; margin: -4px -2px -8px 0; }

/* 答え合わせのあとの受け止めと、3候補への確認ボタン。
   「次の画面で選べます」と注記しても読まれないため、挙動そのもので次の一歩を見せる（#63 モック v6） */
.btn-choice.selected { background: var(--ink-deep); color: #fff; border-color: var(--ink-deep); }
.fb-response { margin-top: 6px; border-top: 1px dashed rgba(34,64,94,.2); padding-top: 14px; }
.fb-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fb-row img { width: 62px; height: auto; flex: none; filter: drop-shadow(0 2px 4px rgba(34,64,94,.16)); }
.fb-line { margin: 0; font-size: .92rem; }
.fb-note { font-size: .82rem; color: var(--muted); margin: 8px 2px 0; }

/* 狭い端末では構成図のラベルを詰める（320pxで横はみ出しさせない） */
@media (max-width: 340px) {
  .fnode .flabel { font-size: .64rem; }
  .flink { flex-basis: 20px; }
  .vgrid { grid-template-columns: 1fr 54px; }
  .vgrid .char-wrap { width: 54px; }
  .gate-head { grid-template-columns: 1fr 58px; }
  .gate-head .char-wrap { width: 58px; }
}
