/* /money/ 共通スタイル（全ページで共用・外部読み込みなし） */
:root{
  --ink:#1c2733;--sub:#52606d;--line:#e3e8ee;--bg:#f4f6f9;
  --brand:#1f5fa8;--brand-dark:#174a84;--brand-soft:#eaf2fb;
  --green:#1d6b35;--green-soft:#e9f6ee;--red:#9b1c12;
  --radius:14px;--shadow:0 1px 2px rgba(16,32,56,.06),0 4px 14px rgba(16,32,56,.06)
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:system-ui,-apple-system,"Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Meiryo",sans-serif;color:var(--ink);background:var(--bg);line-height:1.8;font-size:16px}
body::before{content:"";display:block;height:6px;background:linear-gradient(90deg,#1f5fa8,#3aa0c8 60%,#3fb27f)}
main{max-width:680px;margin:0 auto;padding:16px 16px 8px}
a{color:var(--brand);text-underline-offset:3px}
a:hover{color:var(--brand-dark)}

/* 上部 */
.pr{font-size:12px;color:var(--sub);background:#fff;border:1px solid var(--line);border-radius:999px;padding:4px 12px;margin:4px 0 10px;display:inline-block}
.crumb{font-size:13px;margin:0 0 6px;color:var(--sub)}
.crumb a{color:var(--sub)}
h1{font-size:25px;line-height:1.45;margin:6px 0 8px;letter-spacing:.01em}
.lead{margin:0 0 18px;color:#3b4855;font-size:15.5px}
h2{font-size:19px;line-height:1.5;margin:34px 0 10px;padding:0 0 6px 12px;border-left:5px solid var(--brand);border-bottom:1px solid var(--line)}
h3{font-size:17px}

/* カード */
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin:14px 0;box-shadow:var(--shadow)}
.card>p:first-child{margin-top:0}
.card>p:last-child,.card>ul:last-child{margin-bottom:0}
.card>ul:first-child{margin-top:0}
ul{padding-left:22px}
li{margin:6px 0}

/* 入力 */
label{display:block;font-weight:700;margin:18px 0 6px}
label:first-child{margin-top:0}
.hint{display:block;font-weight:400;font-size:13px;color:#667585;line-height:1.6}
.field{display:flex;align-items:center;gap:8px}
input[type=text]{width:100%;font-size:20px;font-weight:600;padding:12px 14px;border:1.5px solid #c9d2dc;border-radius:10px;text-align:right;background:#fbfcfd;color:var(--ink);font-variant-numeric:tabular-nums;transition:border-color .15s,box-shadow .15s}
input[type=text]::placeholder{color:#a7b1bc;font-weight:400}
input[type=text]:focus{outline:none;border-color:var(--brand);background:#fff;box-shadow:0 0 0 4px rgba(31,95,168,.15)}
.unit{white-space:nowrap;color:var(--sub);font-weight:600}
select{width:100%;font-size:16px;padding:12px;border:1.5px solid #c9d2dc;border-radius:10px;background:#fbfcfd}
select:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 4px rgba(31,95,168,.15)}
fieldset.mode{border:0;padding:0;margin:0 0 4px}
fieldset.mode legend{font-weight:700;padding:0;margin-bottom:6px}
label.radio{font-weight:500;margin:6px 0;display:flex;align-items:center;gap:10px;padding:10px 12px;border:1.5px solid var(--line);border-radius:10px;cursor:pointer}
label.radio:has(input:checked){border-color:var(--brand);background:var(--brand-soft)}
input[type=radio]{accent-color:var(--brand);width:18px;height:18px}
[hidden]{display:none!important}

/* 結果 */
.result{border:2px solid var(--brand);background:linear-gradient(180deg,#f3f8fe,#fff 120px)}
.result #empty{margin:0;text-align:center;padding:10px 0;color:#667585}
.result .row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.result .row>span:last-child{white-space:nowrap}
.result .row:last-of-type{border-bottom:0}
.result .num{font-size:24px;font-weight:800;color:var(--brand-dark);font-variant-numeric:tabular-nums}
.result .total .num{font-size:28px}
.result .furusato{margin:12px -8px 4px;padding:14px 12px;border:0;border-radius:12px;background:var(--green-soft)}
.result .furusato .num{color:var(--green);font-size:32px}
#out>.furusato:first-child{margin-top:-4px}
.badge{display:block;padding:12px 14px;border-radius:10px;font-weight:700;margin-bottom:12px;line-height:1.6}
.badge.req{background:#fdecea;color:var(--red)}
.badge.res{background:#fff5dc;color:#7a5200}
.badge.none{background:var(--green-soft);color:var(--green)}
.big{font-size:30px;font-weight:800;color:var(--brand-dark)}

/* 補足 */
.note{font-size:13px;color:var(--sub)}
.note.first{margin-top:0}
.warn{font-size:13px;color:var(--red);background:#fff7f6;border-radius:8px;padding:10px 12px}
details{margin-top:14px;font-size:14px}
summary{cursor:pointer;color:var(--brand);font-weight:600;padding:4px 0}
details[open] summary{margin-bottom:6px}

/* 表 */
table{border-collapse:collapse;width:100%;font-size:14px}
td{padding:8px 0;border-bottom:1px solid #edf0f3;vertical-align:top}
td:last-child{text-align:right;font-variant-numeric:tabular-nums}
tr:last-child td{border-bottom:0}
table.mt{margin-top:12px}
.data table td:first-child{padding-right:8px}
.soft-cmp h3{font-size:18px;margin:0 0 10px;padding-bottom:8px;border-bottom:2px solid var(--brand-soft)}
.soft-cmp td:first-child{width:42%;color:var(--sub);padding-right:10px}
.soft-cmp td:last-child{text-align:left}

/* 次へ進むリンクをボタン風に（.cta=主・.cta.sub=従） */
.cta>a{display:block;text-align:center;text-decoration:none;font-weight:700;padding:13px 16px;border-radius:12px;background:var(--brand);color:#fff;box-shadow:0 2px 6px rgba(31,95,168,.25);transition:background .15s,transform .05s;line-height:1.5}
.cta>a:hover{background:var(--brand-dark);color:#fff}
.cta>a:active{transform:translateY(1px)}
.cta.sub>a{background:#fff;color:var(--brand);border:1.5px solid var(--brand);box-shadow:none;font-weight:600}
.cta.sub>a:hover{background:var(--brand-soft);color:var(--brand-dark)}

/* 入口ページなどのリンク一覧 */
.card li:has(>a:first-child){list-style:none;margin:0 0 0 -22px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fbfcfd}
.card li:has(>a:first-child)+li:has(>a:first-child){margin-top:10px}
.card li:has(>a:first-child)>a{font-weight:700;text-decoration:none}
.card li:has(>a:first-child)>a::after{content:" →"}
.card li:has(>a:first-child) .note{display:inline-block;margin-top:2px}

/* 入口ページ */
.hero{margin:4px 0 8px}
.hero-kicker{margin:0;color:var(--brand);font-weight:700;font-size:14px;letter-spacing:.05em}
.hero h1{font-size:28px;margin:2px 0 8px}
.chips{list-style:none;padding:0;margin:0 0 6px;display:flex;flex-wrap:wrap;gap:8px}
.chips li{margin:0;font-size:13px;font-weight:600;color:var(--brand-dark);background:var(--brand-soft);border-radius:999px;padding:4px 12px}
.feature{margin:22px 0 8px;padding:22px 20px;border-radius:var(--radius);color:#fff;background:linear-gradient(135deg,#1f5fa8,#2b86b8 55%,#2f9e74);box-shadow:var(--shadow)}
.feature h2{border:0;margin:4px 0 8px;padding:0;font-size:22px;color:#fff}
.feature p{margin:0 0 14px}
.feature .feature-tag{display:inline-block;margin:0;font-size:12px;font-weight:700;background:rgba(255,255,255,.2);border-radius:999px;padding:2px 10px}
.feature .cta{margin:0}
.feature .cta>a{background:#fff;color:var(--brand-dark);box-shadow:0 2px 8px rgba(0,0,0,.15)}
.feature .cta>a:hover{background:#f1f6fc;color:var(--brand-dark)}
.tools{display:grid;gap:12px}
.tool{display:block;text-decoration:none;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;box-shadow:var(--shadow);transition:border-color .15s,transform .1s}
.tool:hover{border-color:var(--brand);color:var(--ink);transform:translateY(-1px)}
.tool-name{display:block;font-size:18px;font-weight:800;color:var(--brand-dark)}
.tool-name::after{content:" →"}
.tool-desc{display:block;font-size:14px;color:#3b4855;margin:4px 0 8px}
.tool-for{display:inline-block;font-size:12px;font-weight:600;color:var(--green);background:var(--green-soft);border-radius:999px;padding:2px 10px}
.card ul.paths{list-style:none;padding:0;margin:0}
.card ul.paths li{margin:0;padding:12px 0;border-bottom:1px solid var(--line)}
.card ul.paths li:first-child{padding-top:0}
.card ul.paths li:last-child{border-bottom:0;padding-bottom:0}
.faq details{margin:0;border-bottom:1px solid var(--line);padding:10px 0}
.faq details:first-child{padding-top:0}
.faq details:last-child{border-bottom:0;padding-bottom:0}
.faq summary{font-size:15px;color:var(--ink)}
.faq summary::marker{color:var(--brand)}
.faq p{margin:6px 0 0;font-size:14.5px}
@media (min-width:560px){.tools{grid-template-columns:1fr 1fr}.tools .tool:first-child{grid-column:1/-1}}

/* 広告 */
.ad{text-align:center;margin-top:14px;padding-top:12px;border-top:1px dashed var(--line)}
.ad .note{margin:0 0 6px}
.ad img{max-width:100%;height:auto}
.soft{background:#fbfcfd}

footer{font-size:12px;color:#667585;margin:36px 0 20px;padding-top:14px;border-top:1px solid var(--line)}
footer a{color:var(--sub)}
footer a[href="../"]{font-size:14px;font-weight:600;color:var(--brand)}

@media (max-width:380px){
  main{padding:12px 12px 8px}
  h1{font-size:22px}
  .card{padding:16px}
  .result .furusato .num{font-size:28px}
}

/* 記事内の広告まとめ（PR表記つき） */
.adbox{text-align:center}
.adbox-lead{font-weight:700;margin:0 0 4px}
.adbox .ad{border-top:1px dashed var(--line);padding-top:12px}
.adbox .ad .note{margin:0 0 6px;font-weight:600}
.result .minus .num{color:var(--red)}
.field select{width:auto;min-width:10em}
#f-target .field+.field{margin-top:8px}
.cmp{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.cmp-h{margin:0 0 4px}
.cmp-h .hint,.cmp label .hint{display:block}
.cmp tr:first-child td,.cmp-fixed tr:first-child td{font-weight:700;font-size:13px}
.cmp td:nth-child(2){text-align:right;padding-right:12px}
.cmp tr.best td{color:var(--green);font-weight:700}
.cmp-fixed td{padding-right:8px}
.cmp-fixed td:last-child{text-align:left}
.card-in{border:1px solid var(--line);border-radius:12px;padding:6px 12px;margin:12px 0}
.card-in.best{border:2px solid var(--green);background:var(--green-soft)}
.card-in h3{font-size:15px;margin:8px 0 2px}
.btn{font:inherit;font-size:14px;font-weight:600;padding:8px 12px;margin:6px 6px 0 0;border-radius:10px;border:1.5px solid var(--brand);background:#fff;color:var(--brand);cursor:pointer}
.btn:hover{background:var(--brand-soft)}
.item{border-top:1px solid var(--line);padding-top:6px;margin-top:10px}
.pair{display:grid;grid-template-columns:3fr 2fr;gap:8px}
.helper-out{font-weight:700;color:var(--brand-dark)}
