/* 世帯別試算（入口・結果・データ出典）。スマホ優先。既存CSSの .row などと衝突しないよう、すべて .hh 配下の独自クラスだけを使う */
.hh{--hh-g:#2f7d4f;--hh-g-d:#256640;--hh-g-l:#e8f3ec;--hh-ink:#222;--hh-sub:#5f6b64;--hh-line:#d9e2dc;--hh-warn:#b25a00;--hh-bg:#f6f8f6;--hh-gold:#e0a100;
  background:var(--hh-bg);color:var(--hh-ink);font-size:16px;line-height:1.75;padding-bottom:40px;-webkit-text-size-adjust:100%}
.hh *,.hh *::before,.hh *::after{box-sizing:border-box}
.hh-wrap{max-width:760px;margin:0 auto;padding:0 16px}
.hh-wrap.wide{max-width:980px}
.hh h1{font-size:1.45rem;line-height:1.4;margin:22px 0 10px;font-weight:700;color:var(--hh-ink)}
.hh h2{font-size:1.15rem;line-height:1.5;margin:0 0 10px;padding-left:10px;border-left:5px solid var(--hh-g);font-weight:700;color:var(--hh-ink)}
.hh h3{font-size:1rem;margin:0 0 6px;font-weight:700}
.hh p{margin:0 0 10px}
.hh a{color:var(--hh-g-d)}
.hh-lead{color:var(--hh-sub);font-size:1rem}
.hh-card{background:#fff;border:1px solid var(--hh-line);border-radius:12px;padding:18px 16px;margin:14px 0}
.hh-note{font-size:.875rem;color:var(--hh-sub);line-height:1.7}
.hh-small{font-size:.875rem}
.hh-tag{display:inline-block;background:var(--hh-g-l);color:var(--hh-g-d);border-radius:4px;padding:1px 8px;font-size:.8125rem;margin:2px 4px 2px 0}
.hh-tag.gray{background:#eef0ee;color:#555}

/* フォーム */
.hh-field{margin:16px 0}
.hh-label{display:block;font-weight:700;margin-bottom:6px}
.hh-step{display:inline-block;background:var(--hh-g);color:#fff;border-radius:50%;width:26px;height:26px;text-align:center;line-height:26px;font-size:.875rem;margin-right:8px}
.hh-ico{color:#d32f2f;margin-right:6px}
.hh-req{color:#d32f2f}
.hh-select{width:100%;min-height:52px;font-size:1.0625rem;padding:10px 12px;border:1px solid #9aa79f;border-radius:10px;background:#fff;color:var(--hh-ink)}
.hh-regions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:10px}
.hh-region{min-height:48px;border:2px solid #9aa79f;border-radius:10px;background:#fff;font-size:1rem;color:var(--hh-ink);cursor:pointer;padding:6px 4px}
.hh-region{white-space:nowrap;font-size:.9375rem;padding:6px 2px;line-height:1.2;box-shadow:none}
.hh-region:focus{outline:0;border-color:#9aa79f;box-shadow:none}
.hh-region:focus-visible{outline:3px solid #f0b400;outline-offset:2px}
.hh-region.on,.hh-region.on:focus{border-color:var(--hh-g);color:var(--hh-g);font-weight:700;background:#eef6f0}
.hh-prefs{margin-bottom:6px}
.hh-js .hh-prefs{display:none}
.hh-js .hh-prefs.open{display:flex;position:fixed;left:0;top:0;right:0;bottom:0;z-index:2000;background:rgba(0,0,0,.55);align-items:center;justify-content:center;padding:16px;margin:0}
.hh-js .hh-prefs-box{background:#fff;width:100%;max-width:520px;max-height:88vh;overflow:auto;padding:16px;border-radius:16px;box-shadow:0 8px 30px rgba(0,0,0,.3)}
.hh-prefs-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.hh-prefs-close{display:none;min-width:44px;min-height:44px;border:0;background:#eef2ef;border-radius:50%;font-size:1.5rem;line-height:1;cursor:pointer;color:var(--hh-ink)}
.hh-js .hh-prefs-close{display:block}
.hh-chosen{display:none;margin:12px 0 0;padding:12px;border-radius:10px;background:#eef6f0;font-weight:700;color:var(--hh-g)}
.hh-change{margin-left:8px;min-height:40px;padding:4px 14px;border:2px solid var(--hh-g);border-radius:8px;background:#fff;color:var(--hh-g);font-size:.9375rem;cursor:pointer}
.hh-sub{margin:0 0 8px;color:#55625a;font-size:.9375rem}
.hh-prefs-title{font-size:1rem;font-weight:700;color:var(--hh-ink)}
.hh-prefs-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.hh-prefs-grid input{position:absolute;opacity:0;width:1px;height:1px}
.hh-prefs-grid label{display:flex;align-items:center;justify-content:center;min-height:52px;border:2px solid #9aa79f;border-radius:10px;background:#fff;font-size:1.0625rem;cursor:pointer;text-align:center}
.hh-prefs-grid input:checked+label{background:var(--hh-g);border-color:var(--hh-g);color:#fff;font-weight:700}
.hh-prefs-grid input:focus-visible+label{outline:3px solid #f0b400;outline-offset:2px}
.hh-people{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.hh-people input{position:absolute;opacity:0;width:1px;height:1px}
.hh-people label{display:flex;align-items:center;justify-content:center;min-height:52px;border:2px solid #9aa79f;border-radius:10px;background:#fff;font-size:1.0625rem;cursor:pointer;text-align:center}
.hh-people input:checked+label{background:var(--hh-g);border-color:var(--hh-g);color:#fff;font-weight:700}
.hh-people input:focus-visible+label{outline:3px solid #f0b400;outline-offset:2px}
.hh-btn{display:block;width:100%;min-height:56px;padding:14px 20px;border:0;border-radius:32px;background:var(--hh-g);color:#fff!important;font-size:1.125rem;font-weight:700;text-align:center;text-decoration:none!important;cursor:pointer}
.hh-btn:hover,.hh-btn:focus{background:var(--hh-g-d)}
.hh-btn.sub{background:#fff;color:var(--hh-g-d)!important;border:2px solid var(--hh-g)}
.hh-btn.small{min-height:48px;font-size:1rem;padding:10px 16px}
.hh-error{background:#fff4e5;border:1px solid #f0c080;border-radius:10px;padding:12px 14px;color:#7a4300;margin:12px 0}

/* 使い方の3つ */
.hh-flow{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.hh-flow li{display:flex;gap:12px;align-items:flex-start}
.hh-flow .n{flex:0 0 30px;height:30px;border-radius:50%;background:var(--hh-g);color:#fff;text-align:center;line-height:30px;font-weight:700}

/* 結果 */
.hh-bignum{font-size:2rem;font-weight:700;color:var(--hh-g-d);line-height:1.2}
.hh-bignum small{font-size:1rem;color:var(--hh-ink);font-weight:400}
.hh-bignum.orange{color:#c8590a}
.hh-sum{display:grid;grid-template-columns:1fr;gap:6px}
.hh-hero{text-align:center}
.hh-hero .lab{color:var(--hh-sub);margin:0}
.hh-rank{counter-reset:rank;list-style:none;margin:0;padding:0}
.hh-plan{position:relative;background:#fff;border:1px solid var(--hh-line);border-radius:12px;padding:16px 14px 16px 14px;margin:12px 0}
.hh-plan .no{position:absolute;top:-10px;left:-6px;width:32px;height:32px;border-radius:50%;background:var(--hh-gold);color:#fff;text-align:center;line-height:32px;font-weight:700}
.hh-plan-head{display:flex;gap:12px;align-items:center;margin-left:20px}
.hh-plan-head img{width:56px;height:56px;object-fit:contain;border:1px solid var(--hh-line);border-radius:8px;background:#fff;flex:0 0 56px}
.hh-plan-head .co{font-size:.875rem;color:var(--hh-sub);line-height:1.4}
.hh-plan-head .pl{font-weight:700;line-height:1.4}
.hh-save{margin:10px 0 4px}
.hh-save .v{font-size:1.5rem;font-weight:700;color:#c8590a}
.hh-save .m{font-size:.875rem;color:var(--hh-sub)}
.hh-plan dl{margin:8px 0 10px;display:grid;grid-template-columns:auto 1fr;gap:2px 12px;font-size:.9375rem}
.hh-plan dt{color:var(--hh-sub);font-weight:400}
.hh-plan dd{margin:0;text-align:right}
.hh-more{display:none}
.hh-more.open{display:block}
.hh-actions{display:grid;gap:8px}
.hh-sticky{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--hh-line);padding:10px 16px;margin:20px -16px 0;z-index:5}

/* 表（データ出典） */
.hh-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:8px 0}
.hh table.hh-table{border-collapse:collapse;width:100%;min-width:560px;font-size:.9375rem}
.hh table.hh-table th,.hh table.hh-table td{border-bottom:1px solid var(--hh-line);padding:8px 6px;text-align:right;white-space:nowrap}
.hh table.hh-table th:first-child,.hh table.hh-table td:first-child{text-align:left;position:sticky;left:0;background:#fff}
.hh table.hh-table th{background:var(--hh-g-l);font-weight:700}
.hh table.hh-table td.est{background:#fbfaf0}
.hh-formula{background:#f1f5f2;border-radius:8px;padding:10px 12px;font-size:.9375rem;overflow-wrap:anywhere}

/* もっと正確に知りたい方へ */
.hh-accurate{background:#fff;border:2px solid var(--hh-g);border-radius:12px;padding:18px 16px;margin:18px 0}
.hh-accurate h2{border:0;padding:0;font-size:1.1rem;color:var(--hh-g-d)}

@media (min-width:640px){
  .hh h1{font-size:1.75rem}
  .hh-sum{grid-template-columns:1fr 1fr}
  .hh-people{grid-template-columns:repeat(6,1fr)}
  .hh-actions{grid-template-columns:1fr 1fr}
  .hh-btn{display:inline-block;width:auto;min-width:280px}
  .hh-actions .hh-btn{display:block;width:100%;min-width:0}
  .hh-sticky{display:none}
}

.hh-basis{margin-top:14px;padding:12px;border-radius:12px;background:#f3f8f4;text-align:left}
.hh-basis-title{margin:0 0 8px;font-weight:700;font-size:.9375rem;color:var(--hh-g-d)}
.hh-basis dl{margin:0}
.hh-basis .row{display:flex;gap:12px;padding:10px 0;border-top:1px solid #d9e5dc;align-items:flex-start}
.hh-basis dt{flex:0 0 6.5em;margin:0;font-size:.875rem;color:var(--hh-sub);padding-top:2px}
.hh-basis dd{flex:1;margin:0;line-height:1.7}
.hh-basis dd b{font-size:1.0625rem}
.hh-basis dd .sm{display:block;font-size:.8125rem;color:var(--hh-sub)}
.hh-basis-foot{margin:6px 0 0;padding-top:10px;border-top:1px solid #d9e5dc;font-size:.8125rem;color:var(--hh-sub);line-height:1.7}

.hh-basis{padding:0;background:none}
.hh-basis-btn{list-style:none;display:flex;align-items:center;justify-content:center;gap:2px;min-height:48px;padding:8px 14px;border:2px solid var(--hh-g);border-radius:10px;background:#fff;color:var(--hh-g);font-weight:700;font-size:.9375rem;cursor:pointer;text-align:center}
.hh-basis-btn::-webkit-details-marker{display:none}
.hh-basis-btn::after{content:"\25BC";font-size:.75rem;margin-left:8px}
.hh-basis[open] .hh-basis-btn::after{content:"\25B2"}
.hh-basis-close{display:none}
.hh-basis[open] .hh-basis-open{display:none}
.hh-basis[open] .hh-basis-close{display:inline}
.hh-basis[open] dl,.hh-basis[open] .hh-basis-foot{background:#f3f8f4}
.hh-basis[open] dl{margin-top:8px;padding:2px 12px;border-radius:12px 12px 0 0}
.hh-basis[open] .hh-basis-foot{margin:0;padding:10px 12px 12px;border-radius:0 0 12px 12px}
.hh-basis-title{display:none}

.hh-tag.pt{background:#fff3c4;color:#7a5a00}
.hh-tag.gift{background:#ffe3cf;color:#a2480a}
.hh-tag.safe{background:#dff1e4;color:#1e6b3a}
.hh-month{display:inline-block;margin-top:6px;padding:4px 12px;border-radius:999px;background:#fff0e3;color:#a2480a;font-size:.9375rem}
.hh-month b{font-size:1.25rem}
.hh-plan.hh-top{border:2px solid #e0a800;background:#fffdf3;padding-top:28px}
.hh-crown{position:absolute;top:-1px;right:-1px;padding:4px 12px 4px 14px;border-radius:0 10px 0 12px;background:#e0a800;color:#fff;font-weight:700;font-size:.875rem}

.hh-basis dd.use .ln{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.hh-basis dd.use .k{font-size:.9375rem}
.hh-basis dd.use b{text-align:right;font-variant-numeric:tabular-nums}
.hh-basis dd.use .sm{text-align:left}
.hh-basis dt{flex:0 0 5.2em}
.hh-basis dd.use .k{white-space:nowrap;font-size:.875rem}
.hh-basis dd.use b{white-space:nowrap;font-size:1rem}
.hh-basis .row{flex-direction:column;gap:2px}.hh-basis dt{flex:none}
.hh-basis dd{margin-left:6px;padding:2px 0 2px 14px;border-left:3px solid #bcd6c3;max-width:440px}.hh-basis dd.use .ln{padding:0}
.hh-basis dt .hh-pp{margin-left:6px;font-size:.8125rem;color:var(--hh-sub);white-space:nowrap}
.hh-crown{display:flex;align-items:center;gap:6px;font-size:.9375rem;padding:5px 14px 5px 12px}
.hh-crown-ico{flex:none;display:block}

.hh-revision{margin:0 0 12px;padding:12px 14px;border:2px solid #e0a800;border-radius:10px;background:#fff8e1;color:#5a4300;font-size:.875rem;line-height:1.7}

/* ===== 入口画面（/household）: シミュレーション入力画面A案のテイスト（2026-11-15） ===== */
.hh.hx{--hh-bg:#fbfdf5;--hh-ink:#3a2a14;--hh-g:#2f6b2a;--hh-g-d:#2f6b2a}
.hx .hh-btn{border:0}
.hx-n{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;font-size:.9375rem;font-weight:800;margin-right:8px;flex:0 0 30px;vertical-align:middle;background:#fff;color:#2f6b2a;box-shadow:0 2px 0 rgba(0,0,0,.2)}
.hx .hh-label{display:flex;align-items:center;flex-wrap:nowrap}
.hx .hh-ico{flex:none;color:#fff700;margin-right:8px}
.hx .hh-req{color:#fff700}
.hx form .hh-btn{display:block;width:100%;font-size:1.2rem;padding:14px 10px;background:linear-gradient(#ff7a6e,#e53935 55%,#c62828);box-shadow:0 6px 0 #8e1b1b,inset 0 2px 0 rgba(255,255,255,.4);text-shadow:0 1px 0 rgba(0,0,0,.25);border-radius:34px}
.hx .hh-prefs-grid label{font-weight:700}
.hx h1{text-align:center;font-weight:800}
.hx .hh-lead{text-align:center}
/* 外側の枠は作らず、内側のカードをそのまま全幅にする */
.hx form.hh-card{background:none;border:0;padding:0;margin:0;border-radius:0}
.hx .hh-field,.hx .hh-wrap>.hh-card:not(form),.hx .hh-accurate{background:#fff;border:3px solid #5a9a2f;border-radius:26px;padding:0 16px 18px;overflow:hidden;margin:16px 0;box-shadow:none}
.hx .hh-field>.hh-label,.hx .hh-wrap>.hh-card:not(form)>h2,.hx .hh-accurate>h2{margin:0 -16px 14px;padding:12px 16px;color:#fff;background:linear-gradient(#a3d04a,#4d8f2d 55%,#2f6b2a);text-shadow:0 1px 0 rgba(0,0,0,.25);box-shadow:inset 0 2px 0 rgba(255,255,255,.35);border:0;font-size:1.125rem;font-weight:800;border-radius:0}
.hx .hh-region,.hx .hh-people label{border:3px solid #5a9a2f;border-radius:16px;font-weight:800;color:#3a2a14}
.hx .hh-region.on,.hx .hh-region.on:focus,.hx .hh-people input:checked+label{background:#f0f8e4;border-color:#2f6b2a;color:#2f6b2a}
.hx .hh-chosen{background:#fffbe3;border:2px solid #f0c64a;border-radius:18px;color:#3a2a14}
.hx .hh-change{border-color:#4d8f2d;color:#2f6b2a;border-radius:12px}
.hx .hh-btn.sub{background:linear-gradient(#a3d04a,#4d8f2d 60%,#2f6b2a);color:#fff!important;box-shadow:0 4px 0 #1f4d1c,inset 0 2px 0 rgba(255,255,255,.35)}
.hx .hh-flow .n{background:linear-gradient(#a3d04a,#2f6b2a);box-shadow:0 2px 0 rgba(0,0,0,.2)}
.hx .hh-prefs-box{border:3px solid #5a9a2f;border-radius:26px}
@media(max-width:420px){.hx form .hh-btn{font-size:1.02rem;padding:14px 6px}}
