/* ===== 色・フォントは sr-nao.com（紺 #104976 / 青 #2382cc）に合わせています ===== */
.kc {
  --navy: #104976;
  --navy-d: #0b3556;
  --blue: #2382cc;
  --sky: #31aaf7;
  --grad: linear-gradient(135deg, #104976 0%, #2382cc 65%, #31aaf7 100%);
  --grad-dark: linear-gradient(135deg, #0b3556 0%, #104976 45%, #2382cc 100%);
  --tint: #eef5fc;
  --tint-2: #f4f8fd;
  --line: #e3eaf2;
  --input-line: #e5e9ee;
  --text: #222;
  --ink: #1f2a37;
  --muted: #5f6b7a;
  --orange: #e8590c;
  --gold: #f2c94c;
  --sans: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-family: var(--sans);
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}
body { margin: 0; background: #fff; }
.kc *, .kc *::before, .kc *::after { box-sizing: border-box; }
.kc p { margin: 0 0 .8em; }
.kc a { color: var(--blue); }

/* ヒーロー */
.kc-hero { background: linear-gradient(135deg, #f2f7fd 0%, #f6fafe 100%); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px 28px; }
.kc-hero h1 { font-size: clamp(25px, 5vw, 34px); font-weight: 700; color: var(--navy); line-height: 1.35; margin: 0 0 6px; }
.kc-sub { font-size: clamp(16px, 2.6vw, 19px); font-weight: 700; color: var(--ink); padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px !important; }
.kc-lead { font-size: 15px; color: var(--muted); }
.kc-basis { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: baseline; margin-bottom: 18px !important; }
.kc-tag { flex: none; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 4px; }
.kc-formula { background: #fff; border: 1px solid #d6e3f2; border-radius: 14px; box-shadow: 0 8px 24px rgba(16, 73, 118, .08); padding: 18px 22px; }
.kc-formula-t { font-size: 13px; font-weight: 700; color: var(--muted); }
.kc-formula-b { font-size: clamp(16px, 2.8vw, 19px); font-weight: 700; color: var(--navy); margin: 2px 0 12px; }
.kc-rates { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kc-rates li { background: var(--tint); color: var(--navy); border-radius: 999px; padding: 3px 12px; font-size: 13px; }
.kc-rates b { font-weight: 700; margin-left: 4px; }

/* セクション帯 */
.kc-band { background: var(--grad); border-radius: 12px; padding: 18px 24px; margin: 40px 0 20px; text-align: center; }
.kc-band h2 { margin: 0; color: #fff; font-size: clamp(20px, 3.6vw, 26px); font-weight: 700; letter-spacing: .04em; }

/* タブ（ピル型） */
.kc-tabs { display: inline-flex; gap: 4px; background: #eaf0f7; border-radius: 999px; padding: 5px; }
.kc-tabs button { font: inherit; font-size: 15px; font-weight: 700; padding: 9px 22px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 999px; }
.kc-tabs button[aria-selected="true"] { background: #fff; color: var(--blue); box-shadow: 0 2px 8px rgba(35, 130, 204, .2); }
.kc-auto { background: var(--tint); color: var(--navy); font-size: 14px; font-weight: 700; border-radius: 8px; padding: 10px 14px; margin: 16px 0 8px !important; }
.kc-panel[hidden] { display: none; }

/* 入力ステップ */
.kc-step { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; color: var(--ink); margin: 28px 0 14px; }
.kc-step span { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 13px; display: grid; place-items: center; }

.kc-form { display: grid; gap: 20px; }
.kc-field { display: flex; flex-direction: column; gap: 6px; }
.kc-field > label, .kc-field .kc-lbl { font-weight: 700; font-size: 15px; color: #3d4752; }
.kc-req, .kc-opt { font-size: 11px; font-weight: 700; padding: 1px 7px; margin-left: 8px; border-radius: 4px; vertical-align: 2px; }
.kc-req { background: var(--orange); color: #fff; }
.kc-opt { background: #e9edf2; color: var(--muted); }
.kc-help { font-size: 12px; color: var(--muted); line-height: 1.6; }
.kc-yen { display: flex; align-items: center; border: 2px solid var(--input-line); border-radius: 8px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.kc-yen:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(35, 130, 204, .12); }
.kc-yen input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 17px; font-weight: 600; padding: 11px 8px 11px 15px; text-align: right; background: transparent; color: var(--ink); }
.kc-yen input:disabled { color: #aaa; }
.kc-yen span { padding: 0 15px 0 4px; color: var(--muted); font-size: 15px; }
.kc select { font: inherit; font-size: 16px; padding: 11px 42px 11px 15px; border: 2px solid var(--input-line); border-radius: 8px; width: 100%; color: var(--ink); appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 14px center / 16px; }
.kc select:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 4px rgba(35, 130, 204, .12); }

/* 選択ボタン（ラジオ） */
.kc-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kc-seg label { cursor: pointer; }
.kc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.kc-seg span { display: block; text-align: center; border: 2px solid var(--input-line); border-radius: 8px; padding: 9px 8px; font-size: 15px; font-weight: 600; color: #3d4752; background: #fff; transition: all .15s; }
.kc-seg input:checked + span { border-color: var(--blue); background: var(--tint); color: var(--navy); font-weight: 700; }
.kc-seg input:focus-visible + span { box-shadow: 0 0 0 4px rgba(35, 130, 204, .2); }

/* チェック */
.kc-checks { display: grid; gap: 8px; }
.kc-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; font-weight: 600; color: #3d4752; border: 2px solid var(--input-line); border-radius: 8px; padding: 10px 14px; background: #fff; line-height: 1.6; }
.kc-check:has(input:checked) { border-color: var(--blue); background: var(--tint); color: var(--navy); }
.kc-check input { accent-color: var(--blue); width: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.kc-check small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }

/* ボタン */
.kc-actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.kc-btn { font: inherit; font-weight: 700; font-size: 16px; padding: 12px 34px; border-radius: 999px; cursor: pointer; border: 0; background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(16, 73, 118, .22); transition: transform .15s, box-shadow .15s; }
.kc-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16, 73, 118, .28); }
.kc-btn.ghost { background: #fff; color: #3d4752; border: 1px solid #cfd6de; box-shadow: none; font-size: 14px; font-weight: 400; padding: 9px 20px; }
.kc-btn.ghost:hover { background: var(--tint-2); transform: none; }

/* 結果 */
.kc-result { margin-top: 40px; scroll-margin-top: 16px; }
.kc-rh { background: var(--grad); border-radius: 10px; padding: 14px 20px; margin-bottom: 14px; }
.kc-rh h2 { margin: 0; color: #fff; font-size: 20px; font-weight: 700; }
.kc-summary { background: var(--grad-dark); color: #fff; border-radius: 12px; padding: 20px 22px 18px; font-variant-numeric: tabular-nums; }
.kc-summary .lbl { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.82); }
.kc-summary .val { font-size: clamp(32px, 7vw, 42px); font-weight: 700; line-height: 1.25; }
.kc-summary .val small { font-size: .45em; margin-left: 4px; }
.kc-summary .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 14px; }
.kc-summary .grid div { background: rgba(255,255,255,.12); border-radius: 8px; padding: 8px 12px; font-size: 12px; color: rgba(255,255,255,.85); }
.kc-summary .grid b { display: block; font-size: 18px; color: #fff; }
.kc-bar { height: 8px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; }
.kc-bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.kc-bar-l { display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.9); margin-top: 6px; }
.kc-bar-l b { color: #fff; }

.kc h3 { font-size: 17px; font-weight: 700; color: var(--ink); border-left: 4px solid var(--blue); padding-left: 10px; margin: 32px 0 10px; line-height: 1.5; }
.kc-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.kc-table th, .kc-table td { border-bottom: 1px solid #edf1f5; padding: 9px 10px; }
.kc-table thead th { background: var(--tint); color: var(--navy); font-weight: 700; font-size: 13px; text-align: center; border-bottom: 0; }
.kc-table tbody th { text-align: left; font-weight: 400; color: #3d4752; }
.kc-table td { text-align: right; white-space: nowrap; }
.kc-table td.c { text-align: center; }
.kc-table tr.in th { padding-left: 22px; }
.kc-table tr.sub th, .kc-table tr.sub td { background: var(--tint); color: var(--navy); font-weight: 700; border-bottom: 0; }
.kc-table tr.sum th, .kc-table tr.sum td { background: #fff8e1; color: #5c4a00; font-weight: 700; }
.kc-table tr.grand th, .kc-table tr.grand td { background: #e8f1fd; color: var(--navy); font-weight: 700; font-size: 16px; border-top: 2px solid var(--blue); border-bottom: 0; }
.kc-table .muted { color: var(--muted); font-size: 12px; font-weight: 400; }
.kc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
.kc-scroll .kc-table tr:last-child th, .kc-scroll .kc-table tr:last-child td { border-bottom: 0; }
.kc-note-s { font-size: 12px; color: var(--muted); margin-top: 8px !important; }

/* 解説 */
.kc-h2 { font-size: clamp(20px, 3.6vw, 24px); font-weight: 700; color: var(--ink); border-left: 5px solid var(--blue); padding-left: 14px; margin: 56px 0 16px; line-height: 1.45; }
.kc-explain th { width: 9em; background: var(--tint); color: var(--navy) !important; font-weight: 700 !important; vertical-align: top; white-space: nowrap; }
.kc-explain td { text-align: left; white-space: normal; }
.kc-notes { font-size: 14px; padding-left: 1.3em; color: #3d4752; }
.kc-notes li { margin-bottom: .5em; }

/* お問い合わせ（sr-nao.com 本体と同じ見出しとバナー） */
.kc-contact { margin-top: 56px; text-align: center; }
.kc .kc-contact h3 { font-family: "ヒラギノ明朝 ProN W3", "Hiragino Mincho ProN W3", HiraMinProN-W3, "ヒラギノ明朝 ProN", "Hiragino Mincho ProN", "Yu Mincho", "游明朝体", YuMincho, "游明朝", "HGS明朝E", "ＭＳ Ｐ明朝", "MS PMincho", serif; font-size: clamp(24px, 4.4vw, 35px); font-weight: 400; color: #605537; letter-spacing: .14em; text-align: center; border: 0; padding: 0; margin: 0 0 28px; }
.kc-contact a { display: block; }
.kc-contact img { display: block; width: 100%; height: auto; }
.kc-updated { text-align: right; font-size: 12px; color: var(--muted); margin-top: 20px; }

/* iframe で埋め込んだときはページ側の見出しを使うので、ツールの大見出しを隠す */
.kc.is-embedded { padding-top: 0; }
.kc.is-embedded .kc-hero h1 { display: none; }
.kc.is-embedded .kc-sub { padding-top: 0; }

@media (min-width: 721px) {
  .kc-form.two { grid-template-columns: 1fr 1fr; gap: 20px 20px; }
  .kc-form.two .wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .kc { font-size: 15px; padding-top: 16px; }
  .kc-hero { padding: 22px 18px; }
  .kc-tabs { display: flex; }
  .kc-tabs button { flex: 1; padding: 9px 8px; }
  .kc-table th, .kc-table td { padding: 8px 8px; }
  .kc-explain th { width: auto; }
}
@media print {
  .kc-tabs, .kc-auto, .kc-panel, .kc-step, .kc-form, .kc-actions, .kc-contact { display: none !important; }
}

/* ===== 各ツール共通の追加部品 ===== */
.kc-sum-ok { background: linear-gradient(135deg, #0b3556 0%, #104976 45%, #2382cc 100%); }
.kc-sum-ng { background: linear-gradient(135deg, #7a1f12 0%, #b23a1e 60%, #e8590c 100%); }
.kc-panel-t { margin-bottom: 8px; }
.kc-warn { background: #fff4e5; border: 1px solid #f5d3a9; color: #7a4a00; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 12px 0 !important; }
.kc-info { background: var(--tint); color: var(--navy); border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 12px 0 !important; }
.kc-empty { background: var(--tint-2); border: 1px dashed #c9d6e4; border-radius: 10px; padding: 24px; text-align: center; color: var(--muted); font-size: 15px; }
.kc-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kc-num { display: flex; align-items: center; border: 2px solid var(--input-line); border-radius: 8px; background: #fff; }
.kc-num:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(35, 130, 204, .12); }
.kc-num input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 17px; font-weight: 600; padding: 11px 8px 11px 15px; text-align: right; background: transparent; color: var(--ink); }
.kc-num span { padding: 0 15px 0 4px; color: var(--muted); font-size: 15px; white-space: nowrap; }
.kc-date, .kc-text { font: inherit; font-size: 16px; padding: 11px 15px; border: 2px solid var(--input-line); border-radius: 8px; width: 100%; color: var(--ink); background: #fff; min-height: 50px; }
.kc-date:focus, .kc-text:focus { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 4px rgba(35, 130, 204, .12); }
.kc-seg.three { grid-template-columns: repeat(3, 1fr); }
.kc-seg.four { grid-template-columns: repeat(4, 1fr); }
.kc-hide { display: none !important; }
.kc-table tr.hit th, .kc-table tr.hit td { background: #fff8e1; font-weight: 700; }
.kc-table tr.off th, .kc-table tr.off td { color: #a0a8b2; text-decoration: line-through; }
.kc-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.kc-tools a { display: block; height: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; background: #fff; transition: box-shadow .15s, border-color .15s; }
.kc-tools a:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(16, 73, 118, .12); }
.kc-tools b { display: block; color: var(--navy); font-size: 16px; line-height: 1.5; margin-bottom: 4px; }
.kc-tools span { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; }
.kc-links { display: grid; gap: 10px; }
.kc-links a { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; text-decoration: none; background: #fff; }
.kc-links a:hover { border-color: var(--blue); background: var(--tint-2); }
.kc-links b { display: block; color: var(--navy); }
.kc-links span { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) { .kc-seg.four { grid-template-columns: 1fr 1fr; } .kc-seg.three { grid-template-columns: 1fr; } .kc-inline { grid-template-columns: 1fr; } }
@media print { .kc-related { display: none !important; } }

.kc-table thead th { white-space: nowrap; }
@media (min-width: 721px) { .kc-tools.two { grid-template-columns: 1fr 1fr; } }

/* そのほかの自動計算ツール（枠でひとまとめにした一覧） */
.kc-toolbox { position: relative; margin-top: 56px; border: 2px solid var(--blue); border-radius: 6px; padding: 26px 24px 20px; background: #fff; }
.kc-toolbox h2 { position: absolute; top: 0; left: 18px; transform: translateY(-50%); margin: 0; padding: 0 10px; background: #fff; color: var(--blue); font-size: 17px; font-weight: 700; line-height: 1.4; }
.kc-toolbox ul { list-style: none; margin: 0; padding: 0; }
.kc-toolbox li { margin: 0 0 6px; line-height: 1.7; }
.kc-toolbox li:last-child { margin-bottom: 0; }
.kc-toolbox a { color: var(--blue); text-decoration: underline; font-size: 16px; }
.kc-toolbox a:hover { color: var(--navy); }
@media (max-width: 720px) { .kc-toolbox { padding: 24px 16px 16px; } .kc-toolbox h2 { left: 10px; font-size: 16px; } .kc-toolbox a { font-size: 15px; } }
@media (max-width: 720px) { .kc-tools a { padding: 14px; } }

/* 見出しを大きく。スマホでは金額・数値の欄を項目名と同じ行にして、一覧性を上げる */
.kc-step { font-size: 22px; line-height: 1.4; }
.kc-step span { width: 30px; height: 30px; font-size: 15px; }
@media (max-width: 720px) {
  .kc-form { gap: 14px; }
  .kc-step { margin: 24px 0 12px; }
  .kc-field:has(> .kc-yen), .kc-field:has(> .kc-num) { display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: center; column-gap: 10px; row-gap: 4px; }
  .kc-field:has(> .kc-yen) > label, .kc-field:has(> .kc-num) > label { line-height: 1.5; }
  .kc-field:has(> .kc-yen) > .kc-help, .kc-field:has(> .kc-num) > .kc-help { grid-column: 1 / -1; }
  .kc-field > .kc-yen input, .kc-field > .kc-num input { padding: 7px 4px 7px 8px; font-size: 16px; }
  .kc-field > .kc-yen span, .kc-field > .kc-num span { padding: 0 9px 0 2px; font-size: 14px; }
}
.kc-req, .kc-opt { display: inline-block; white-space: nowrap; }
@media (max-width: 720px) {
  .kc-field.kc-row { display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: center; column-gap: 10px; row-gap: 4px; }
  .kc-row > label, .kc-row > .kc-lbl { line-height: 1.5; }
  .kc-row > .kc-help { grid-column: 1 / -1; }
  .kc .kc-row > select { padding: 8px 26px 8px 10px; background-position: right 7px center; }
  .kc-row > .kc-seg { gap: 4px; }
  .kc-row > .kc-seg span { padding: 8px 0; font-size: 14px; }
}
/* 手取り額のカードの下に置く計算式（囲みなし） */
.kc-result .kc-formula { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin-top: 12px; }
.kc-result .kc-formula-t { font-size: 11px; }
.kc-result .kc-formula-b { font-size: 13px; margin: 1px 0 8px; line-height: 1.5; }
.kc-result .kc-rates { gap: 4px; }
.kc-result .kc-rates li { font-size: 11px; line-height: 1.5; padding: 2px 8px; border-radius: 0; }
.kc-bar-l { flex-wrap: wrap; gap: 2px 10px; }
.kc-bar-l span { white-space: nowrap; }

/* 見出しのある多列の表：縦線を入れ、スマホでは横スクロールなしで全列を見せる */
.kc-table:has(thead) thead th:not(:first-child), .kc-table:has(thead) tbody td { border-left: 1px solid #edf1f5; }
@media (max-width: 720px) {
  .kc-table:has(thead) { font-size: 12px; }
  .kc-table:has(thead) th, .kc-table:has(thead) td { padding: 7px 4px; white-space: normal; }
  .kc-table:has(thead) thead th { font-size: 11px; white-space: normal; line-height: 1.4; }
  .kc-table:has(thead) tbody th { min-width: 4.5em; padding-left: 6px; line-height: 1.5; }
  .kc-table:has(thead) tr.grand th, .kc-table:has(thead) tr.grand td { font-size: 12px; }
  .kc-table:has(thead) .muted { font-size: 10px; }
}
@media (max-width: 340px) {
  .kc-table:has(thead) { font-size: 11px; }
  .kc-table:has(thead) th, .kc-table:has(thead) td { padding: 6px 2px; }
  .kc-table:has(thead) tbody th { min-width: 3.5em; padding-left: 4px; }
  .kc-table:has(thead) tr.grand th, .kc-table:has(thead) tr.grand td { font-size: 11px; }
}
