/* ============================================
   ② 破産確率シミュレーター 専用CSS (ruin-rate.css)
   ============================================ */

/* 入力側の補足ボックス */
.hint-box{
  font-size:.8rem;background:#F7FAF7;border:1px dashed var(--line);border-radius:10px;
  padding:10px 13px;color:var(--muted);line-height:1.7;
}

/* ===== 診断結果カード（危険度で色が変わる） ===== */
.result-ruin{border-radius:12px;padding:20px;text-align:center;margin-bottom:14px;transition:background .4s,border-color .4s}
.result-ruin .label{font-size:.8rem;font-weight:900;letter-spacing:.03em}
.result-ruin .value{font-family:var(--num);font-size:3rem;font-weight:600;line-height:1.25}
.result-ruin .value small{font-size:1.2rem;font-family:'Zen Kaku Gothic New',sans-serif;font-weight:700;margin-left:3px}
.result-ruin .verdict{font-size:.85rem;font-weight:900;margin-top:8px}

.result-ruin.safe{background:#EAF6EF;border:2.5px solid var(--leaf)}
.result-ruin.safe .label,.result-ruin.safe .verdict{color:var(--leaf-dark)}
.result-ruin.safe .value{color:var(--leaf-dark)}

.result-ruin.warn{background:var(--sand-bg);border:2.5px solid var(--sand)}
.result-ruin.warn .label,.result-ruin.warn .verdict{color:#8A6410}
.result-ruin.warn .value{color:#B07E14}

.result-ruin.bad{background:var(--danger-bg);border:2.5px solid var(--danger)}
.result-ruin.bad .label,.result-ruin.bad .verdict{color:#A33028}
.result-ruin.bad .value{color:var(--danger)}

.result-ruin.fatal{background:#3A1512;border:2.5px solid var(--danger)}
.result-ruin.fatal .label,.result-ruin.fatal .verdict{color:#F5B8B2}
.result-ruin.fatal .value{color:#FF7A6E}

/* 危険度メーター */
.meter{
  height:10px;border-radius:999px;margin:12px auto 0;max-width:340px;position:relative;
  background:linear-gradient(90deg,#2F9E6B 0%,#A9C94E 25%,#E3A93C 50%,#E0703C 75%,#D65045 100%);
}
.meter-fill{
  position:absolute;top:-4px;width:4px;height:18px;border-radius:2px;background:#1C2B26;
  border:2px solid #fff;left:0;transition:left .4s ease;
}

/* サマリー一文（①と共通の見た目） */
.summary-line{
  font-size:.88rem;font-weight:700;background:#F2F7F3;border-radius:10px;padding:12px 14px;margin-bottom:14px;line-height:1.7;
}
.summary-line em{font-style:normal;color:var(--leaf-dark)}

/* サブ情報 */
.result-rows{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.rrow{background:#F7FAF7;border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.rrow .k{font-size:.7rem;font-weight:700;color:var(--muted);line-height:1.4}
.rrow .v{font-family:var(--num);font-size:1.05rem;font-weight:600;color:var(--shell)}
.rrow .v.minus{color:var(--danger)}

/* 改善ヒント */
.hint-line{font-size:.8rem;font-weight:700;color:var(--leaf-dark);line-height:1.7}
.hint-line.warn{color:#9A6F14}

/* ===== バルサラ表 ===== */
.tbl-note{font-size:.8rem;color:var(--muted);margin:-6px 0 12px}
.tbl-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.balsara{border-collapse:collapse;font-size:.78rem;min-width:520px;width:100%}
.balsara th,.balsara td{padding:7px 4px;text-align:center;border:1px solid #fff}
.balsara th{background:var(--shell);color:#fff;font-size:.72rem;font-weight:700;white-space:nowrap}
.balsara th.corner{background:var(--shell-soft);font-size:.62rem;line-height:1.3}
.balsara td{font-family:var(--num);font-weight:600}
.balsara td.c-safe{background:#DFF2E6;color:#1E6B47}
.balsara td.c-low{background:#EFF2CF;color:#6B7314}
.balsara td.c-mid{background:#FBEFCB;color:#8A6410}
.balsara td.c-high{background:#F9DCC8;color:#9C4A1E}
.balsara td.c-max{background:#F6CFC9;color:#A33028}
.balsara td.me{outline:3px solid var(--shell);outline-offset:-3px;font-weight:600;position:relative}

/* 凡例 */
.legend{display:flex;gap:12px;flex-wrap:wrap;margin-top:12px;font-size:.72rem;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:4px}
.lg{display:inline-block;width:12px;height:12px;border-radius:3px}
.lg.c-safe{background:#DFF2E6}
.lg.c-low{background:#EFF2CF}
.lg.c-mid{background:#FBEFCB}
.lg.c-high{background:#F9DCC8}
.lg.c-max{background:#F6CFC9}
