/* エコキュート 必要容量シミュレーター。共通の /assets/style.css の上に重ねる。 */
:root { --line2: #c5d9e5; --text2: #4a5a65; --tint: #eaf4fa; --neg: #a63c27; --pos: #14614e; }
[hidden] { display: none !important; }
.wrap.wide { max-width: 1120px; }

.sim-head { padding-block: 24px 20px; }
.sim-head h1 { font-size: clamp(26px, 4.2vw, 38px); margin: 0 0 14px; }
.sim-head .lead { margin: 0; font-size: 15px; color: var(--text2); max-width: none; text-wrap: pretty; }
.nb { display: inline-block; }

.mini { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border: 1px solid var(--line2); border-radius: 16px;
  padding: 10px 18px; margin: 0 0 20px; box-shadow: 0 10px 24px -20px rgba(40, 90, 120, 0.5); }
.mini div { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.mini .k { font-size: 11px; color: var(--text2); letter-spacing: 0.04em; }
.mini b { font-size: 17px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sim { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 40px; }
.inputs, .results { display: grid; gap: 16px; min-width: 0; }
.box { background: #fff; border: 1px solid var(--line2); border-radius: 20px; padding: 22px 22px 20px; min-width: 0;
  box-shadow: 0 1px 2px rgba(40, 90, 120, 0.06), 0 8px 22px -18px rgba(40, 90, 120, 0.35); }
.box h2 { font-size: 16px; font-weight: 500; letter-spacing: 0.04em; margin: 0 0 14px; line-height: 1.5; }
.box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.box-head h2 { margin: 0; }
.fine, .fine-inline { font-size: 12.5px; color: var(--text2); line-height: 1.85; }
.fine { margin: 12px 0 0; }
.mt { margin-top: 14px; }

/* segmented */
.seg { display: grid; gap: 8px; }
.seg.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg label { display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; flex-direction: column; border: 1px solid var(--line2); border-radius: 14px; padding: 9px 12px; height: 100%; transition: background .15s, border-color .15s; }
.seg b { font-weight: 500; font-size: 15px; line-height: 1.5; }
.seg small { color: var(--text2); font-size: 12px; line-height: 1.5; }
.seg input:checked + span { background: var(--tint); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* fields */
.fld { display: grid; gap: 6px; margin: 0 0 16px; }
.fld:last-child { margin-bottom: 0; }
.lab { font-size: 13.5px; font-weight: 500; line-height: 1.6; margin: 0 0 6px; }
.fld .lab { margin: 0; }
.inp { display: flex; align-items: center; gap: 8px; }
.inp input, .inp select { font: inherit; font-size: 16px; color: var(--ink); background: #fff; width: 100%; min-width: 0;
  border: 1px solid var(--line2); border-radius: 12px; padding: 10px 14px; line-height: 1.5; }
.inp input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
.inp input:focus, .inp select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.unit { flex: 0 0 auto; min-width: 2.2em; font-size: 13px; color: var(--text2); }
.hint { color: var(--text2); font-size: 12.5px; line-height: 1.8; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 0 0 12px; cursor: pointer; line-height: 1.7; }
.chk input { margin-top: 5px; accent-color: var(--accent-ink); width: 16px; height: 16px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.btn { font: inherit; font-size: 14px; font-weight: 500; color: var(--accent-ink); background: #fff; border: 1px solid #b7cedb; border-radius: 999px; padding: 9px 18px; cursor: pointer; }
.btn:hover { background: var(--bg-soft); border-color: var(--accent); }
.btn.sm { padding: 6px 14px; font-size: 13px; }

/* results */
.verdict { margin: 0; font-size: 16px; line-height: 2; font-weight: 500; }
.verdict .big { font-family: var(--font-latin), var(--font-body); font-size: 40px; font-weight: 400; color: var(--accent-ink); letter-spacing: 0.01em; margin-right: 4px; }
.warns:empty { display: none; }
.warns p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.85; color: var(--text2); border-top: 1px dashed #b7cedb; padding-top: 10px; }

/* capacity comparison */
.caps { display: grid; gap: 10px; }
.cap { border: 1px solid var(--line2); border-radius: 14px; padding: 12px 14px 10px; background: #fff; }
.cap.rec { background: var(--tint); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cap-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cap-h b { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tag { font-size: 12.5px; color: var(--text2); }
.cap.rec .tag { color: var(--accent-ink); font-weight: 500; }
.cap.short .tag { color: var(--neg); }
.bar { position: relative; height: 12px; border-radius: 999px; background: #e3edf3; margin: 8px 0 6px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--accent); }
.cap.short .bar i { background: #b9c9d3; }
.bar u { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); text-decoration: none; transform: translateX(-1px); }
.cap-f { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text2); line-height: 1.6; }

/* table */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid #d5e4ed; text-align: right; line-height: 1.6; vertical-align: top; }
.tbl thead th { font-size: 12px; font-weight: 500; color: #3c4c57; white-space: nowrap; vertical-align: bottom; background: #f1f7fb; }
.tbl th[scope="row"], .tbl thead th:first-child { text-align: left; font-weight: 500; color: var(--ink); }
.tbl .d { text-align: left; color: var(--text2); font-size: 12.5px; }
.tbl tr.sum th, .tbl tr.sum td { background: var(--tint); font-weight: 500; }

/* notes */
.notes { border-top: 1px solid var(--line2); padding-block: 36px 72px; max-width: 52em; }
.notes h2 { font-size: 18px; font-weight: 500; margin: 0 0 12px; }
.notes > details > summary { cursor: pointer; font-size: 14.5px; color: var(--accent-ink); }
.notes-body { margin-top: 14px; font-size: 14px; color: var(--text2); line-height: 1.95; }
.notes-body h3 { font-size: 14px; font-weight: 500; color: var(--ink); margin: 18px 0 6px; }
.notes-body ul { margin: 0; padding-left: 1.3em; }
.notes-body li { margin-bottom: 6px; }
.disclaimer { margin: 18px 0 0; font-size: 13px; color: var(--text2); line-height: 1.9; }
a.text { color: var(--accent-ink); border-bottom: 1px solid var(--line2); }
a.text:hover { border-bottom-color: var(--accent); }

footer { border-top-color: var(--line2); }
footer, .foot a { color: var(--text2); }
.foot .copy { color: var(--accent-ink); border-bottom: 1px solid var(--line2); }

@media (max-width: 860px) {
  .sim { grid-template-columns: minmax(0, 1fr); }
  .mini { padding: 8px 12px; gap: 4px; }
  .mini b { font-size: 15px; }
}

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.pair .fld { margin-bottom: 8px; }
.hint.gap { margin: 0 0 6px; }
@media (max-width: 380px) { .pair { grid-template-columns: minmax(0, 1fr); } }
.fld.is-off .lab, .fld.is-off .hint, .fld.is-off .unit { opacity: 0.45; }
.inp input:disabled { background: #eef2f5; color: #8a9aa5; cursor: not-allowed; }

/* 「HEAT PUMP WATER HEATER」と同じ行の右端に「その他のサイト」(共通部品 /assets/sites.js) */
.sim-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sim-top .eyebrow { margin: 0; }
.sim-top .h9s__btn { min-height: 30px; padding: 0 12px; font-size: 12px; font-weight: 400; color: var(--text2); border-color: var(--line2); }
.sim-top .h9s__btn:hover { color: var(--accent-ink); }
.sim-head { padding-block-start: 28px; }

/* ---- 泡の雰囲気（h9-g.com 共通の世界観。トップより色を控えめに。太陽光と同じ段落） ---- */
:root { --bub-a: rgba(120, 200, 230, 0.16); --bub-b: rgba(190, 225, 245, 0.32); --bub-ring: #d3e6f0; }
main.wrap { position: relative; isolation: isolate; }
.bubbles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
html, body { overflow-x: clip; }
.bubbles i { position: absolute; border-radius: 50%; }
.bubbles i:nth-child(1) { right: -220px; top: -240px; width: 640px; height: 640px; background: radial-gradient(closest-side, var(--bub-a), transparent); }
.bubbles i:nth-child(2) { right: 18%; top: 60px; width: 54px; height: 54px; background: radial-gradient(circle at 35% 30%, #fff, #e3f2f9); border: 1px solid var(--bub-ring); opacity: .8; }
.bubbles i:nth-child(3) { left: -180px; top: 640px; width: 440px; height: 440px; background: radial-gradient(closest-side, var(--bub-b), transparent); opacity: .7; }
@media (max-width: 860px) { .bubbles i:nth-child(2) { right: 10%; top: 120px; width: 36px; height: 36px; } }

/* 枠は線を引かず、薄い影と内側の線で浮かせる。右上にだけ小さな泡の光（グラフの吹き出しが切れないよう背景で描く） */
.box { border: 0; border-radius: 22px;
  background: radial-gradient(circle 110px at calc(100% - 20px) 20px, var(--bub-b), rgba(255, 255, 255, 0) 100%), #fff;
  box-shadow: 0 18px 40px -32px rgba(40, 110, 150, 0.45), inset 0 0 0 1px var(--line2); }
/* 見出しの左の縦線はやめて、小さな泡の丸 */
.box h2 { border-left: 0; padding-left: 0; display: flex; align-items: center; gap: 10px; }
.box h2::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #a9d6ea); box-shadow: inset 0 0 0 1px #8cc3dc; }
/* 結果の文: 左の太線はやめ、淡いグラデーションと泡で目立たせる */
.lead-box { border: 0; border-radius: 22px;
  background: radial-gradient(circle 150px at calc(100% - 40px) 30px, rgba(170, 215, 238, 0.45), rgba(255, 255, 255, 0) 100%), linear-gradient(140deg, #f3f9fc 0%, #ffffff 70%);
  box-shadow: 0 22px 44px -30px rgba(40, 110, 150, 0.5), inset 0 0 0 1px #cfe4ef; }
.verdict { font-weight: 400; }
.mini { border: 0; border-radius: 18px; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -24px rgba(40, 110, 150, 0.5), inset 0 0 0 1px var(--line2); }
.seg input:checked + span { background: #f3f9fc; }

/* エコキュート固有: 結果の数字、容量の比較 */
.lead-box h2 { font-size: 16px; }
.verdict .big { font-weight: 300; font-size: 48px; }
.cap { border: 0; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line2); }
.cap.rec { background: #f3f9fc; box-shadow: inset 0 0 0 1px #b9d9e8; }
.cap-h b { display: inline-flex; align-items: center; gap: 8px; }
.cap.rec .cap-h b::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #a9d6ea); box-shadow: inset 0 0 0 1px #8cc3dc; }
.bar { background: #e9f1f6; }
.bar i { background: linear-gradient(90deg, #a9d6ea, #5aaed2); }
.cap.short .bar i { background: #c9d6de; }
.tbl tr.sum th, .tbl tr.sum td { background: #f3f9fc; }
