.wealth-intro{max-width:780px}.wealth-tag{display:inline-block;border:1px solid #91a58b;border-radius:5px;padding:3px 9px;font-size:13px;color:#e0e7c5}
select{font:inherit;box-sizing:border-box;width:100%;min-height:48px;padding:10px;border:1px solid #70877c;border-radius:5px;background:#fffdf6;color:#172d27}
select:focus-visible{outline:3px solid #e4bd62;outline-offset:3px}
#wealth-result h2{margin-top:0}.wealth-score{font-size:46px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums;color:#f6dfab}
.wealth-range{position:relative;height:14px;background:#344e42;border-radius:8px;margin:22px 0 8px}.wealth-band{position:absolute;top:0;height:100%;background:#abbf82;border-radius:8px}.wealth-pin{position:absolute;top:-5px;width:3px;height:24px;background:#fff}
.range-labels{display:flex;justify-content:space-between;font-size:12px}.money-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}
.money-grid .metric strong{font-size:22px}.money-grid small{display:block;font-size:13px}.wealth-dialogue{border-left:3px solid #c9b778;padding:0 18px;margin:22px 0}.wealth-dialogue strong{color:#edd7ac}
#wealth-result[hidden],#wealth-error[hidden]{display:none}
.tablewrap:focus-visible{outline:3px solid #e4bd62}.source-list a{overflow-wrap:anywhere}.input-tip{font-size:14px;color:#d0d9ce}
@media(max-width:700px){.money-grid{grid-template-columns:1fr}.wealth-score{font-size:39px}.fields .full{grid-column:1/-1}}


/* Wealth tool: prominent optional housing inputs and upper result table. */
.wealth-results{display:grid;gap:22px;min-width:0}
.wealth-thresholds h2{margin-top:0}
.wealth-thresholds th,.wealth-thresholds td{white-space:normal;padding:9px 8px}
.housing-entry{padding-top:35px}
#housing-toggle{width:100%;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;background:#f2d6a0;color:#263a2d;border:2px solid #f6e3bd;line-height:1.5;font-size:14px;padding:10px 12px}
#housing-toggle:hover{background:#ffe8bd}
#housing-toggle[aria-expanded="true"]{background:#e6e9bd}
.housing-toggle-icon{font-size:23px;flex-shrink:0}
.housing-entry small{margin-top:6px}
.housing-fields{margin-top:18px;padding:16px;border:1px solid #c5ac74;border-radius:8px;background:#13352d}
.housing-fields[hidden]{display:none}
.housing-fields h3{margin:0;font-size:17px}
@media(max-width:420px){.fields>.field:has(>#financial){grid-column:1/-1}.housing-entry{padding-top:0;grid-column:1/-1}#housing-toggle{min-height:48px}.wealth-thresholds th,.wealth-thresholds td{font-size:13px;padding:8px 5px}}


/* Keep the financial table high; show the net-worth result below inputs. */
.wealth-layout{grid-template-areas:"input financial" "networth financial";grid-template-rows:auto auto}
.wealth-input{grid-area:input}.wealth-results{grid-area:financial}
.networth-group{grid-area:networth;display:grid;gap:22px;min-width:0}
.networth-group[hidden]{display:none}
#networth-result h2{margin-top:0}.networth-amount{font-size:25px;color:#f6dfab}
.networth-unavailable{font-size:20px;font-weight:700;color:#f6dfab}
#networth-method{scroll-margin-top:20px}
@media(max-width:700px){.wealth-layout{grid-template-areas:"input" "financial" "networth"}}
/* 年代別結果を残し、年齢推計を明確な別枠にする。 */
.age-estimate{margin-top:22px;padding:18px 16px;background:#173e35;border:1px solid #a6bfa1;border-radius:8px}
.age-estimate h3{margin:0 0 8px;font-size:18px;color:#edf2d8}
.age-estimate p:last-child{margin-bottom:0}
.age-score{font-size:38px;color:#e7eacc}
#age-method{scroll-margin-top:20px}
.wealth-thresholds table{table-layout:fixed;width:100%;min-width:0}
.wealth-thresholds th,.wealth-thresholds td{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
@media(max-width:420px){.age-estimate{padding:14px 12px}.age-score{font-size:34px}.wealth-thresholds th,.wealth-thresholds td{font-size:12px;padding:8px 4px}}
/* 4種類の偏差値は入力欄の隣に集約。詳細と目安表はその下。 */
.wealth-layout{grid-template-areas:"input comparison" "financial networth"}
.wealth-comparison{grid-area:comparison;min-width:0}
.wealth-comparison[hidden]{display:none}
.wealth-comparison h2{margin-top:0}
.comparison-table{table-layout:fixed;white-space:normal;line-height:1.5}
.comparison-table caption{text-align:left;font-size:13px;color:#d0d9ce;margin-bottom:10px}
.comparison-table th,.comparison-table td{text-align:center;padding:13px 7px;vertical-align:middle;overflow-wrap:anywhere}
.comparison-table th:first-child{width:30%;text-align:left}
.comparison-table thead th{font-size:14px;color:#e6ebd2}
.comparison-table tbody th{font-size:15px}
.comparison-table tbody th small{display:block;font-size:11px;font-weight:400;color:#d0d9ce;margin-top:8px}
.comparison-table td:nth-child(3){background:#24483c}
.comparison-value{display:block;font-size:36px;font-variant-numeric:tabular-nums;line-height:1.3;color:#f6dfab}
.comparison-value.unavailable{font-size:18px}
.comparison-method,.comparison-tail{display:block;font-size:12px;margin-top:7px;color:#e0e7d8}
.comparison-amount{display:block;font-size:13px;color:#f1dfb5;margin-top:7px}
.comparison-notes{font-size:13px;color:#d0d9ce;line-height:1.75}
.comparison-notes p{margin:12px 0}
.result-details{padding-top:10px;padding-bottom:10px}
.result-details summary{font-size:15px}
.result-details[open] summary{margin-bottom:12px;border-bottom:1px solid #557768}
@media(max-width:700px){.wealth-layout{grid-template-areas:"input" "comparison" "financial" "networth"}}
@media(max-width:420px){.comparison-table th,.comparison-table td{padding:11px 4px}.comparison-value{font-size:29px}.comparison-table tbody th,.comparison-table thead th{font-size:13px}.comparison-method,.comparison-tail{font-size:11px}.comparison-value.unavailable{font-size:16px}}

