:root {
  --ink: #351c2a;
  --ink-2: #532d40;
  --muted: #78616d;
  --line: #ead8df;
  --soft: #fff7fa;
  --paper: #ffffff;
  --accent: #f6a9bf;
  --accent-strong: #d85c87;
  --accent-soft: #fff0f5;
  --coral: #d94d68;
  --yellow: #ffd55a;
  --blue: #2e6eea;
  --shadow: 0 18px 50px rgba(88, 35, 60, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 292px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px 20px;
  overflow-y: auto;
  color: #fff;
  background:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px),
    var(--ink);
  background-size: 22px 22px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 2px solid var(--accent); border-radius: 12px; color: var(--accent);
  font-family: Georgia, serif; font-size: 24px; font-style: italic; font-weight: 700;
  transform: rotate(-4deg);
}
.brand b { display: block; font-size: 12px; letter-spacing: .13em; line-height: 1.4; }
.brand small { display: block; margin-top: 2px; color: #9eafc3; font-size: 12px; }
.course-progress { margin: 32px 0 22px; padding: 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(255,255,255,.075); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.progress-copy { display: flex; justify-content: space-between; align-items: baseline; }
.progress-copy span { color: #ead5de; font-size: 13px; font-weight: 700; }
.progress-copy strong { color: var(--accent); font-size: 21px; line-height: 1; white-space: nowrap; }
.progress-track { height: 11px; margin: 13px 0 8px; overflow: hidden; background: rgba(255,255,255,.14); border-radius: 999px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #f7bdd0, var(--accent-strong)); border-radius: inherit; transition: width .35s ease; box-shadow: 0 0 15px rgba(246,169,191,.35); }
.progress-detail { margin-bottom: 10px; color: #f2dfe7; font-size: 12px; font-weight: 700; }
.course-progress > small { display: block; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.1); color: #b99cab; font-size: 11px; }
.chapter-nav { display: grid; gap: 5px; }
.nav-item {
  position: relative; width: 100%; min-height: 61px; display: grid; grid-template-columns: 31px 1fr; grid-template-rows: 1fr 1fr;
  gap: 0 8px; padding: 10px 12px; text-align: left; color: #aebdd0; background: transparent; border: 0; border-radius: 12px; cursor: pointer;
}
.nav-item::after { content: ""; position: absolute; right: 8px; top: 50%; width: 6px; height: 6px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: translateY(-50%) rotate(45deg); opacity: .5; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.is-active { color: #fff; background: rgba(246, 169, 191, .14); }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; border-radius: 6px; background: var(--accent); }
.nav-item span { grid-row: 1 / 3; align-self: center; color: var(--accent); font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.nav-item i { align-self: end; color: inherit; font-size: 14px; font-style: normal; font-weight: 700; }
.nav-item em { align-self: start; color: #7188a3; font-size: 11px; font-style: normal; }
.sidebar-actions { display: grid; gap: 9px; margin-top: 20px; }
.sidebar-actions .button { width: 100%; color: #fff; border-color: rgba(255,255,255,.18); }
.sidebar-actions .text-button { color: #758aa4; }

.main { min-width: 0; }
.mobile-header { display: none; }
#worksheet { max-width: 1180px; margin: 0 auto; padding: 55px 52px 28px; }
.resume-banner {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 15px; align-items: center;
  margin-bottom: 22px; padding: 12px 16px; color: var(--ink); background: #fff;
  border: 1px solid #f0ccd8; border-radius: 15px; box-shadow: 0 8px 28px rgba(88,35,60,.06);
}
.resume-banner[hidden] { display: none; }
.resume-banner.has-saved-data { background: linear-gradient(135deg, #fff1f6, #fff); border-color: #eba8bf; }
.resume-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--ink); background: var(--accent); border-radius: 10px; font-size: 20px; font-weight: 800; }
.resume-copy { min-width: 0; }
.resume-copy strong { display: block; font-size: 14px; }
.resume-copy p { margin: 1px 0 0; color: #6b4a58; font-size: 12px; }
.resume-state { display: inline-flex; gap: 7px; align-items: center; padding: 7px 10px; color: #9d3159; background: #fff0f5; border-radius: 999px; white-space: nowrap; font-size: 11px; font-weight: 800; }
.resume-state i { width: 7px; height: 7px; background: var(--accent-strong); border-radius: 50%; box-shadow: 0 0 0 4px rgba(216,92,135,.1); }
.resume-state.is-saving i { animation: savePulse .8s ease infinite alternate; }
.resume-state.is-error { color: #a33a2b; background: #fff0ed; }
.resume-state.is-error i { background: var(--coral); box-shadow: none; }
@keyframes savePulse { to { opacity: .35; transform: scale(.72); } }
.quick-chapter-nav {
  position: sticky; z-index: 20; top: 12px; display: flex; gap: 6px; align-items: center;
  width: 100%; margin: 0 0 24px; padding: 7px; overflow-x: auto; color: var(--ink);
  background: rgba(255,255,255,.94); border: 1px solid #ebcfda; border-radius: 13px;
  box-shadow: 0 8px 24px rgba(88,35,60,.08); backdrop-filter: blur(12px); scrollbar-width: thin;
}
.quick-chapter-nav > span { flex: 0 0 auto; padding: 0 7px; color: var(--muted); font-size: 11px; font-weight: 900; white-space: nowrap; }
.quick-chapter-nav button {
  flex: 1 0 auto; min-width: 76px; min-height: 36px; display: flex; gap: 5px; align-items: center; justify-content: center;
  padding: 6px 9px; color: #6b5360; background: #fff8fa; border: 1px solid transparent; border-radius: 9px;
  cursor: pointer; white-space: nowrap; transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}
.quick-chapter-nav button:hover, .quick-chapter-nav button:focus-visible { color: #8d244d; border-color: #e7adc1; outline: none; transform: translateY(-1px); }
.quick-chapter-nav button.is-active { color: #fff; background: var(--accent-strong); border-color: var(--accent-strong); }
.quick-chapter-nav button b { font: 900 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.quick-chapter-nav button small { font-size: 11px; font-weight: 900; }
.step { display: none; animation: reveal .34s ease both; }
.step.is-active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.step-kicker { display: flex; align-items: center; gap: 14px; color: var(--muted); font: 700 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.step-kicker span { color: var(--accent-strong); }
.step-kicker i { width: 42px; height: 1px; background: var(--line); }
.step-kicker em { font-style: normal; }
.step-heading { display: flex; justify-content: space-between; gap: 36px; align-items: flex-end; margin: 16px 0 32px; }
.step-heading p { margin: 0 0 5px; color: var(--muted); font-size: 14px; font-weight: 600; }
.step-heading h1 { max-width: 820px; margin: 0; font-size: clamp(32px, 4.2vw, 54px); line-height: 1.18; letter-spacing: -.045em; }
.chapter-badge { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding-bottom: 5px; }
.chapter-badge b { font: 700 54px/.8 Georgia, serif; color: transparent; -webkit-text-stroke: 1px #9aabba; }
.chapter-badge span { color: #8292a6; font: 700 10px/1.35 ui-monospace, monospace; letter-spacing: .11em; text-transform: uppercase; }
.section-jump-nav { display: flex; gap: 7px; align-items: center; margin: -15px 0 22px; padding: 2px 0 5px; overflow-x: auto; scrollbar-width: thin; }
.section-jump-nav > span { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 900; }
.section-jump-nav button { flex: 0 0 auto; min-height: 34px; display: flex; gap: 6px; align-items: center; padding: 6px 10px; color: #704657; background: #fff; border: 1px solid #e8cad6; border-radius: 999px; cursor: pointer; white-space: nowrap; font-size: 11px; font-weight: 800; }
.section-jump-nav button b { color: #a12f5a; font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.section-jump-nav button:hover, .section-jump-nav button:focus-visible { color: #fff; background: var(--accent-strong); border-color: var(--accent-strong); outline: none; }
.section-jump-nav button:hover b, .section-jump-nav button:focus-visible b { color: #fff; }
.section-jump-target { scroll-margin-top: 90px; }

.note-strip { display: flex; gap: 24px; align-items: center; padding: 16px 20px; margin-bottom: 20px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; }
.note-strip b { flex: 0 0 auto; font-size: 13px; }
.note-strip span { color: #6b4a58; font-size: 13px; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { position: relative; margin-bottom: 18px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 1px 0 rgba(16,35,63,.02); }
.card-accent { overflow: hidden; background: linear-gradient(145deg, #fff, #fff1f6); }
.card-accent::after { content: ""; position: absolute; width: 120px; height: 120px; right: -45px; bottom: -45px; border: 25px solid rgba(246,169,191,.22); border-radius: 50%; }
.card-dark { color: #fff; background: var(--ink); border-color: var(--ink); }
.card-dark .helper, .card-dark .card-number { color: #9eb0c7; }
.card-dark textarea { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.07); }
.card-dark textarea::placeholder { color: #7f91aa; }
.card-number { color: #90a0b1; font: 700 12px/1 ui-monospace, monospace; }
.card h2 { margin: 11px 0 2px; font-size: 21px; line-height: 1.35; letter-spacing: -.025em; }
.card h3 { margin: 0; font-size: 16px; }
.helper { margin: 0 0 15px; color: var(--muted); font-size: 13px; }
.section-card { padding: 30px; }
.section-title { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 15px; row-gap: 7px; align-items: start; margin-bottom: 22px; }
.section-title > span { grid-column: 1; grid-row: 1; display: grid; place-items: center; width: 34px; height: 34px; color: var(--ink); background: var(--accent); border-radius: 9px; font: 800 11px/1 ui-monospace, monospace; }
.section-title > div { grid-column: 2; grid-row: 1; min-width: 0; }
.section-title h2 { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: 0 0 2px; font-size: 21px; line-height: 1.35; }
.section-title p { margin: 0; color: var(--muted); font-size: 14px; }
.help-button { grid-column: 2; grid-row: 2; justify-self: start; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 124px; min-height: 44px; margin: 0; padding: 5px 10px; color: #8d3859; background: #fff8fa; border: 1px solid #e7adc1; border-radius: 10px; cursor: pointer; line-height: 1.2; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.help-button > span { font-size: 13px; font-weight: 800; }
.help-button small { display: block; margin-top: 1px; font-size: 9px; font-weight: 700; }
.help-button small b { font-weight: inherit; }
.help-button small b:last-child { display: none; }
.help-button:hover, .help-button:focus-visible, .help-button[aria-expanded="true"] { color: #fff; background: var(--accent-strong); border-color: var(--accent-strong); box-shadow: 0 8px 20px rgba(216,92,135,.22); transform: translateY(-2px); }
.help-button[aria-expanded="true"] small b:first-child { display: none; }
.help-button[aria-expanded="true"] small b:last-child { display: inline; }
.help-popover { position: absolute; z-index: 12; top: calc(100% + 7px); left: 49px; width: min(420px, calc(100% - 49px)); max-height: 0; padding: 0 17px; overflow: hidden; visibility: hidden; opacity: 0; color: #5b3847; background: #fff5f8; border: 1px solid transparent; border-radius: 12px; box-shadow: 0 16px 36px rgba(88,35,60,.16); transform: translateY(-8px) scale(.96); transform-origin: top left; transition: max-height .24s ease, padding .24s ease, opacity .2s ease, transform .2s ease, visibility 0s linear .24s; }
.help-popover.is-open { max-height: 260px; padding: 15px 17px; visibility: visible; opacity: 1; border-color: #e9a9bf; transform: none; transition-delay: 0s; }
.help-popover strong { display: block; margin-bottom: 4px; color: #8d244d; font-size: 14px; }
.help-popover p { margin: 0; font-size: 15px; line-height: 1.7; }

.mobile-compare-launch {
  position: relative; width: 100%; min-height: 74px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
  margin: -2px 0 20px; padding: 13px 52px 13px 15px; color: #7f2347; text-align: left; background: linear-gradient(135deg, #fff1f6, #fff9fb);
  border: 2px solid #ecaac0; border-radius: 14px; cursor: pointer; box-shadow: 0 8px 20px rgba(126,35,70,.08); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mobile-compare-launch:hover, .mobile-compare-launch:focus-visible { border-color: var(--accent-strong); box-shadow: 0 12px 28px rgba(126,35,70,.14); transform: translateY(-1px); outline: none; }
.mobile-compare-launch span { grid-column: 1; font-size: 16px; font-weight: 900; }
.mobile-compare-launch small { grid-column: 1; color: #765563; font-size: 11px; font-weight: 700; }
.mobile-compare-launch b { position: absolute; right: 17px; top: 50%; display: grid; place-items: center; width: 30px; height: 30px; color: #fff; background: var(--accent-strong); border-radius: 50%; transform: translateY(-50%); }

label { display: block; }
label > span { display: block; margin-bottom: 7px; color: var(--ink-2); font-size: 14px; font-weight: 700; }
input, textarea, select {
  width: 100%; min-height: 46px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #cbd7e2; border-radius: 10px; outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.65; }
input:focus, textarea:focus, select:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(216,92,135,.14); }
input::placeholder, textarea::placeholder { color: #9ba9b9; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.chip-checks label { cursor: pointer; }
.chip-checks input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.chip-checks span { margin: 0; padding: 9px 14px; color: #53667e; background: #f5f8fa; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.chip-checks input:checked + span { color: var(--ink); background: var(--accent-soft); border-color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent-strong); }
.household-first-grid { align-items: start; }
.household-first-grid .compact-card { height: auto; }
.insurance-photo-request { display: grid; gap: 8px; margin: -2px 0 20px; padding: 16px; color: #633247; background: linear-gradient(135deg,#fff0f5,#fff9fb); border: 2px solid #e9a9bf; border-radius: 14px; }
.insurance-photo-request strong { color: #86294c; font-size: 17px; line-height: 1.45; }
.insurance-photo-request p { margin: 0; color: #654d58; font-size: 14px; line-height: 1.7; }
.insurance-photo-request .check-line { margin-top: 3px; padding-top: 11px; border-top: 1px solid #edc6d4; }
.insurance-fieldset { min-width: 0; margin: 0; padding: 15px; border: 1px solid #dfcdd4; border-radius: 13px; }
.insurance-fieldset legend { padding: 0 7px; color: var(--ink-2); font-size: 15px; font-weight: 900; }
.insurance-fieldset > p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.insurance-fieldset .chip-checks { margin-bottom: 0; }
.insurance-type-checks span, .insurance-life-checks span { position: relative; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px 13px; font-size: 14px; font-weight: 800; text-align: center; }
.insurance-type-checks input:checked + span::before, .insurance-life-checks input:checked + span::before { content: "✓"; margin-right: 5px; font-weight: 900; }
.insurance-cost-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.insurance-final-checks { display: grid; gap: 11px; padding: 15px; background: #fffaf2; border: 1px solid #ead8af; border-radius: 13px; }
.insurance-final-checks > strong { color: #684c1e; font-size: 15px; }
.insurance-final-checks .check-line { align-items: flex-start; }
.prompt-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prompt-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rank-list { display: grid; gap: 10px; }
.rank-list label { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; }
.rank-list b { display: grid; place-items: center; height: 46px; color: var(--ink); background: var(--accent); border-radius: 10px; font: 800 15px/1 ui-monospace, monospace; }

.dashboard-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; overflow: hidden; color: #fff; background: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.dashboard-strip > div { padding: 20px 24px; border-right: 1px solid rgba(255,255,255,.11); }
.dashboard-strip > div:last-child { border: 0; }
.dashboard-strip small, .summary-hero small { display: block; color: #9fb0c5; font-size: 11px; font-weight: 700; }
.dashboard-strip strong { display: block; margin-top: 4px; font-size: 24px; line-height: 1.2; }
.dashboard-strip .highlight { background: var(--accent); color: var(--ink); }
.dashboard-strip .highlight small { color: #6f2944; }
.table-wrap { width: 100%; overflow-x: auto; }
.entry-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.fixed-table { min-width: 420px; }
.fixed-table td:first-child { width: 65%; }
.entry-table th { padding: 0 7px 9px; color: #6a7b90; text-align: left; white-space: nowrap; font-size: 13px; }
.entry-table td { padding: 5px 7px; vertical-align: middle; }
.entry-table input, .entry-table select { min-height: 46px; padding: 9px 10px; border-radius: 8px; font-size: 15px; }
.entry-table .amount-cell { min-width: 140px; }
.entry-table .remove-cell { width: 35px; padding-right: 0; }
.remove-row { width: 40px; height: 40px; padding: 0; color: #78899d; background: #f3f6f8; border: 0; border-radius: 9px; cursor: pointer; font-size: 18px; }
.remove-row:hover { color: #fff; background: var(--coral); }
.add-row { min-height: 46px; margin-top: 13px; padding: 10px 15px; color: var(--ink-2); background: #f5f8fa; border: 1px dashed #93a6b8; border-radius: 9px; cursor: pointer; font-size: 15px; font-weight: 800; }
.add-row:hover { color: var(--accent-strong); border-color: var(--accent-strong); background: var(--accent-soft); }
.add-row.prominent { width: 100%; padding: 14px; }
.inline-total { display: flex; justify-content: flex-end; gap: 24px; align-items: baseline; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.inline-total span { color: var(--muted); font-size: 13px; }
.inline-total strong { font-size: 22px; }
.wide-field { margin-top: 20px; }
.wide-table table { min-width: 980px; }
.budget-period-guide { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin-bottom: 16px; }
.budget-period-guide div { display: grid; gap: 3px; min-height: 72px; align-content: center; padding: 12px 13px; border: 1px solid #ead8df; border-radius: 12px; background: #fff8fa; }
.budget-period-guide div:nth-child(2) { background: #f8f5ff; }
.budget-period-guide div:nth-child(3) { background: #f2f7ff; }
.budget-period-guide div:nth-child(4) { background: #fff8e8; }
.budget-period-guide b { color: var(--ink-2); font-size: 15px; }
.budget-period-guide small { color: var(--muted); font-size: 12px; }
.budget-card-list { display: grid; gap: 13px; }
.budget-entry { padding: 17px; background: #fff; border: 1px solid #e8d5dc; border-radius: 15px; box-shadow: 0 5px 14px rgba(88,35,60,.05); animation: popIn .2s ease both; }
.budget-entry-head { display: grid; grid-template-columns: minmax(0,1fr) 40px; gap: 12px; align-items: end; margin-bottom: 13px; }
.budget-entry-head select { min-height: 52px; color: #6f2944; background: #fff5f8; border-color: #e5aabe; font-size: 16px; font-weight: 800; }
.budget-entry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.budget-entry-grid label > span { font-size: 14px; }
.budget-entry-grid label > small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.budget-name-field { grid-column: span 2; }
.budget-entry .remove-row { align-self: end; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.custom-variable-list { display: grid; gap: 10px; margin-top: 16px; }
.custom-variable-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,.55fr) 36px; gap: 10px; align-items: end; padding: 13px; background: #fff7fa; border: 1px solid #f0d7e0; border-radius: 12px; animation: popIn .2s ease both; }
.custom-variable-row .remove-cell { align-self: end; padding-bottom: 7px; }
@keyframes popIn { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: none; } }
.money-input, .suffix-input { position: relative; }
.money-input i, .suffix-input i { position: absolute; top: 50%; transform: translateY(-50%); color: #8292a6; font-style: normal; font-size: 13px; font-weight: 700; pointer-events: none; }
.money-input i { left: 13px; }
.money-input input { padding-left: 31px; text-align: right; }
.suffix-input i { right: 13px; }
.suffix-input input { padding-right: 42px; text-align: right; }
.income-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.income-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.income-grid label > small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.formula-note { margin: 14px 0 0; padding: 10px 13px; color: #6e5862; background: #fff5f8; border-radius: 9px; font-size: 12px; }
.asset-table td:nth-child(2), .asset-table td:nth-child(3) { min-width: 170px; }
.subsection { margin-top: 22px; padding-top: 21px; border-top: 1px solid var(--line); }
.subsection h3 { margin-bottom: 14px; }
.reflection-card, .outcome-card { border-color: #edc8d5; background: linear-gradient(135deg, #fff 55%, #fff0f5); }
.compact-card { height: calc(100% - 18px); }
.budget-split-grid { align-items: start; }
.budget-split-grid .compact-card { height: auto; }
.stack-fields { display: grid; gap: 13px; }
.bucket-method-picker { margin: 0; padding: 0; border: 0; }
.bucket-method-picker legend { margin-bottom: 10px; color: var(--ink-2); font-size: 15px; font-weight: 900; }
.bucket-method-picker > div { display: grid; gap: 9px; }
.bucket-method-picker label { cursor: pointer; }
.bucket-method-picker input { position: absolute; width: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.bucket-method-picker label > span { display: grid; gap: 3px; min-height: 68px; align-content: center; margin: 0; padding: 13px 14px; background: #fff; border: 2px solid #e5d2da; border-radius: 13px; }
.bucket-method-picker b { color: #5d3445; font-size: 16px; }
.bucket-method-picker small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.bucket-method-picker input:checked + span { background: #fff0f5; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(196,71,119,.09); }
.bucket-method-picker input:checked + span b::before { content: "✓ "; color: var(--accent-strong); }
.bucket-method-picker input:focus-visible + span { outline: 3px solid rgba(196,71,119,.24); outline-offset: 2px; }
.bucket-date-field > small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.bucket-plan { padding: 15px; background: #fff8fa; border: 2px solid #e7b3c6; border-radius: 14px; }
.bucket-plan-heading { display: grid; gap: 2px; margin-bottom: 11px; }
.bucket-plan-heading strong { color: #6f2944; font-size: 16px; }
.bucket-plan-heading small { color: var(--muted); font-size: 12px; }
#bucketBudgetGroups { display: grid; gap: 10px; }
.bucket-group { overflow: hidden; background: #fff; border: 1px solid #ead8df; border-radius: 11px; }
.bucket-group h3 { margin: 0; padding: 8px 11px; color: #6f2944; background: #fce9f0; font-size: 13px; }
.bucket-group.is-middle h3 { background: #eee9fb; }
.bucket-group.is-future h3 { background: #e9f1fb; }
.bucket-group.is-enjoy h3 { background: #fff0ca; }
.bucket-group > div { display: grid; }
.bucket-group p { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0; padding: 10px 11px; border-top: 1px solid #f2e4e9; font-size: 13px; }
.bucket-group p:first-child { border-top: 0; }
.bucket-group p span { min-width: 0; overflow-wrap: anywhere; }
.bucket-group p strong { flex: 0 0 auto; color: #8d244d; white-space: nowrap; }
.bucket-empty { margin: 0; padding: 12px; color: #6e5862; background: #fff; border-radius: 10px; font-size: 13px; line-height: 1.65; }
.bucket-official-link { display: flex; align-items: center; min-height: 44px; color: #9b2d58; font-size: 12px; font-weight: 800; line-height: 1.5; }
.rent-contract-note { padding: 13px 14px; color: #654453; background: #fff8fa; border: 1px solid #ead4dd; border-radius: 11px; font-size: 14px; line-height: 1.65; }
.rent-guide-button { width: 100%; min-height: 52px; color: #fff; background: var(--accent-strong); border: 1px solid var(--accent-strong); font-size: 15px; }
.rent-guide-button:hover { color: #fff; background: #a93662; }
.furusato-layout { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(280px,.7fr); gap: 18px; align-items: stretch; }
.furusato-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.furusato-fields label > small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.furusato-result { display: grid; align-content: center; gap: 8px; padding: 22px; color: #fff; background: var(--ink); border-radius: 15px; }
.furusato-result > span { color: #d8bdc8; font-size: 14px; font-weight: 800; }
.furusato-result > strong { color: var(--accent); font-size: 34px; line-height: 1.2; }
.furusato-result p { min-height: 40px; margin: 0; color: #e5d9df; font-size: 13px; line-height: 1.55; }
.furusato-result .button { margin-top: 4px; color: #fff; border-color: rgba(255,255,255,.45); }
.furusato-result .button:hover { background: rgba(255,255,255,.1); }
.furusato-caution { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; color: #6b4a24; background: #fff9e7; border: 1px solid #ead9a3; border-radius: 11px; font-size: 13px; line-height: 1.6; }
.furusato-caution b { flex: 0 0 auto; }
.furusato-outcome { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding: 15px; background: #fff7df; border: 1px solid #ead59a; border-radius: 13px; }
.furusato-outcome > div { padding: 12px; background: #fff; border-radius: 10px; }
.furusato-outcome span { display: block; color: #7b6842; font-size: 12px; font-weight: 800; }
.furusato-outcome strong { display: block; margin-top: 4px; color: #6a4215; font-size: 18px; line-height: 1.4; }
.furusato-outcome p { grid-column: 1 / -1; margin: 0; color: #765e36; font-size: 12px; line-height: 1.65; }
.check-line { display: flex; gap: 10px; align-items: center; padding: 12px; background: #f4f8fa; border-radius: 10px; cursor: pointer; }
.check-line input { width: 20px; min-height: 20px; accent-color: var(--accent-strong); }
.check-line span { margin: 0; }
.decision-entry-note { margin: 0 0 14px; padding: 11px 13px; color: #684653; background: #fff5f8; border: 1px solid #efd4de; border-radius: 10px; font-size: 13px; line-height: 1.55; }
.decision-entry-note b { padding: 0 4px; color: var(--accent-strong); font-size: 17px; }
.decision-card-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.decision-card { display: grid; gap: 13px; padding: 17px; background: #fffafc; border: 1px solid #ead2dc; border-radius: 14px; }
.decision-card-head { display: grid; grid-template-columns: minmax(0,1fr) 38px; gap: 10px; align-items: end; }
.decision-money-flow { display: grid; grid-template-columns: minmax(0,1fr) 30px minmax(0,1fr); gap: 8px; align-items: end; }
.decision-money-flow > b { display: grid; place-items: center; min-height: 46px; color: var(--accent-strong); font-size: 24px; }
.decision-conclusion { display: grid; grid-template-columns: minmax(130px,.65fr) minmax(0,1.35fr); gap: 10px; }
.decision-card .remove-row { margin-bottom: 3px; }
.goal-table td:nth-child(4) { min-width: 240px; }
.computed-field { align-self: end; min-height: 76px; padding: 12px 14px; background: var(--ink); border-radius: 10px; }
.computed-field span { display: block; color: #9eafc4; font-size: 12px; }
.computed-field strong { color: #fff; font-size: 21px; }
.improvement-breakdown { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 15px; }
.improvement-breakdown > div { padding: 12px; background: #fff; border: 1px solid #efd6df; border-radius: 11px; }
.improvement-breakdown span { display: block; color: var(--muted); font-size: 12px; }
.improvement-breakdown strong { display: block; margin-top: 3px; font-size: 18px; }
.other-improvement { max-width: 330px; margin-bottom: 16px; }
.improvement-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.improvement-totals > div { padding: 15px; color: #fff; background: var(--ink); border-radius: 12px; }
.improvement-totals .highlight { color: var(--ink); background: var(--accent); }
.improvement-totals span { display: block; font-size: 12px; font-weight: 700; opacity: .75; }
.improvement-totals strong { display: block; margin-top: 3px; font-size: 23px; }
.allocation-panel { margin: 24px 0; padding: 20px; background: #fff; border: 1px solid #eab7ca; border-radius: 14px; }
.allocation-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 15px; }
.allocation-heading h3 { margin: 0; font-size: 20px; }
.allocation-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.allocation-heading > strong { flex: 0 0 auto; padding: 8px 11px; color: #8d244d; background: var(--accent-soft); border-radius: 9px; font-size: 13px; }
.allocation-list { display: grid; gap: 10px; }
.allocation-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, .7fr) 40px; gap: 10px; align-items: end; }
.allocation-row .remove-cell { padding-bottom: 3px; }
.allocation-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.allocation-totals > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 12px; background: #f7f9fb; border-radius: 10px; }
.allocation-totals .remaining { background: #fff0f5; }
.allocation-totals span { color: var(--muted); font-size: 12px; }
.allocation-totals strong { font-size: 20px; }
.allocation-status { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.allocation-status.is-over { color: #a33a2b; font-weight: 800; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; border: 0; }
.segmented legend { width: 100%; margin-bottom: 7px; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.segmented input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.segmented label { flex: 1; min-width: 145px; cursor: pointer; }
.segmented span { display: grid; place-items: center; min-height: 45px; margin: 0; padding: 7px 12px; text-align: center; color: #62748a; background: #f4f7f9; border: 1px solid var(--line); border-radius: 10px; }
.segmented input:checked + span { color: var(--ink); background: var(--accent-soft); border-color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent-strong); }

.child-plan { padding: 22px; margin-top: 13px; background: #f7f9fb; border: 1px solid var(--line); border-radius: 14px; }
.child-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.child-head h3 { display: flex; gap: 9px; align-items: center; }
.child-head h3 span { display: grid; place-items: center; width: 29px; height: 29px; color: #fff; background: var(--ink); border-radius: 8px; font: 700 11px/1 ui-monospace, monospace; }
.child-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.child-grid .span-two { grid-column: span 2; }
.child-grid label > small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.child-result { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.child-result div { padding: 13px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.child-result .investment-result { background: #fff0f5; border-color: #eab6c9; }
.child-result span { display: block; color: var(--muted); font-size: 11px; }
.child-result strong { font-size: 18px; }
.child-result .investment-result small { display: block; margin-top: 5px; color: #77505f; font-size: 12px; line-height: 1.5; }
.education-source-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.education-source-links { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 7px; }
.education-source-links a { color: #9b2d58; font-size: 11px; font-weight: 800; }
.education-total { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 18px; }
.education-total div { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; color: #fff; background: var(--ink); border-radius: 12px; }
.education-total div:last-child { color: var(--ink); background: var(--accent); }
.education-total span { font-size: 12px; font-weight: 700; }
.education-total strong { font-size: 21px; }
.education-shortage-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.education-shortage-summary > div { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 15px; color: #6f4354; background: #fff7fa; border: 1px solid #ead8df; border-radius: 11px; }
.education-shortage-summary span { font-size: 12px; font-weight: 800; }
.education-shortage-summary strong { flex: 0 0 auto; font-size: 19px; }
.investment-caution { margin: 11px 0 0; padding: 11px 13px; color: #6b5b2d; background: #fff9e7; border: 1px solid #ead9a3; border-radius: 10px; font-size: 12px; line-height: 1.65; }
.education-auto-shortage { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 15px; padding: 16px; color: #fff; background: var(--ink); border-radius: 13px; }
.education-auto-shortage > div { display: grid; gap: 3px; }
.education-auto-shortage span { color: #d8bdc8; font-size: 12px; font-weight: 800; }
.education-auto-shortage strong { color: var(--accent); font-size: 27px; }
.education-auto-shortage small { color: #d7cbd1; font-size: 11px; line-height: 1.5; }
.education-auto-shortage .button { flex: 0 0 auto; color: #fff; border-color: rgba(255,255,255,.42); }
.education-auto-shortage .button:hover,
.education-auto-shortage .button:focus-visible,
.education-auto-shortage .button.is-applied { color: var(--ink); background: #fff; border-color: #fff; }
.education-shortage-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.education-loan-result { display: grid; align-content: center; min-height: 92px; }
.education-loan-result small { color: #c8b7bf; font-size: 10px; line-height: 1.45; }
.education-support-button { width: 100%; min-height: 54px; margin: 15px 0; padding: 10px 15px; color: #fff; background: var(--accent-strong); border: 1px solid var(--accent-strong); border-radius: 11px; font-size: 15px; font-weight: 900; cursor: pointer; }
.education-support-button:hover { background: #a93662; }
.education-support-panel { max-width: 980px; }
.education-guide-lead { margin-bottom: 15px; padding: 15px 17px; color: #5d3f4c; background: #fff1f6; border: 1px solid #e9bdce; border-radius: 12px; }
.education-guide-lead strong { font-size: 18px; }
.education-guide-lead p { margin: 5px 0 0; font-size: 13px; line-height: 1.65; }
.education-support-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.education-support-cards article { display: flex; gap: 12px; padding: 16px; background: #fff; border: 1px solid #ead7df; border-radius: 13px; }
.support-order { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; color: #fff; background: var(--ink); border-radius: 9px; font-weight: 900; }
.education-support-cards h3 { margin: 0 0 4px; font-size: 18px; }
.education-support-cards b { color: #a52f5a; font-size: 13px; }
.education-support-cards p { margin: 8px 0 5px; font-size: 13px; line-height: 1.65; }
.education-support-cards small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.education-official-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 15px; }
.education-official-links a { display: grid; place-items: center; min-height: 52px; padding: 9px; text-align: center; color: #8f2850; background: #fff5f8; border: 1px solid #e8bfd0; border-radius: 10px; font-size: 12px; font-weight: 900; line-height: 1.45; }
.education-legal-caution { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }

.calculator-card { overflow: hidden; padding: 30px; background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: var(--shadow); }
.calculator-card .section-title h2 { color: #fff; }
.calculator-card .section-title p { color: #9fb0c5; }
.calculator-card .section-title > span { color: var(--ink); }
.calculator-card label > span { color: #b9c6d6; }
.calculator-card input, .calculator-card select, .calculator-card textarea { color: #fff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.17); }
.calculator-card .money-input i, .calculator-card .suffix-input i { color: #7f95ae; }
.retirement-calculator-card { overflow: hidden; background: #fff; border-color: var(--line); box-shadow: var(--shadow); }
.retirement-household-choice { margin-bottom: 18px; }
.retirement-person-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.retirement-person-card { padding: 17px; background: #fff8fb; border: 1px solid #ecd6df; border-radius: 13px; }
.retirement-person-card h3 { margin-bottom: 12px; color: var(--accent-strong); font-size: 19px; }
.retirement-person-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.retirement-age-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.retirement-timeline-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 18px 0; padding: 15px; background: #fff4f8; border: 1px solid #ecc8d6; border-radius: 13px; }
.retirement-timeline-summary > div { min-width: 0; padding: 11px 12px; background: #fff; border-radius: 10px; }
.retirement-timeline-summary span,
.retirement-timeline-summary small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.retirement-timeline-summary strong { display: block; margin: 3px 0; color: var(--ink); font-size: 20px; }
.timeline-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.12); }
.retirement-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc-column { display: grid; gap: 13px; padding: 20px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.035); }
.calc-column h3 { color: var(--accent); }
.calc-result { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.1); }
.calc-result span { color: #a6b5c7; font-size: 12px; }
.calc-result strong { font-size: 22px; }
.calc-result small { grid-column: 1 / 3; color: #7890aa; }
.retirement-calculator-card .calc-column { background: #f8fafb; border-color: var(--line); }
.retirement-calculator-card .calc-column h3 { color: var(--accent-strong); }
.retirement-calculator-card .calc-result { border-color: var(--line); }
.retirement-calculator-card .calc-result span,
.retirement-calculator-card .calc-result small { color: var(--muted); }
.retirement-extra-cost { display: block; margin-top: 15px; padding: 15px; background: #f8fafb; border: 1px solid var(--line); border-radius: 12px; }
.retirement-extra-cost > span { display: block; margin-bottom: 7px; font-weight: 800; }
.retirement-extra-cost > small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.retirement-total { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding: 19px 22px; color: var(--ink); background: var(--accent); border-radius: 13px; }
.retirement-total span { font-weight: 800; }
.retirement-total strong { font-size: 30px; }
.retirement-total small { display: block; margin-top: 3px; color: #6f2944; font-size: 12px; line-height: 1.5; }
.retirement-bridge { display: grid; grid-template-columns: 1fr auto 1fr auto 1.35fr; gap: 14px; align-items: center; margin-top: 22px; }
.retirement-bridge > div { padding: 15px; background: #f3f7fa; border-radius: 11px; }
.retirement-bridge > i { font-style: normal; color: #8190a2; font-size: 22px; }
.retirement-bridge small { display: block; color: var(--muted); }
.retirement-bridge strong { font-size: 19px; }
.retirement-bridge .highlight { color: #fff; background: var(--ink); }
.retirement-bridge .highlight small { color: #9eb0c5; }
.savings-methods { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 12px; }
.savings-methods div { padding: 15px; border: 1px solid var(--line); border-radius: 11px; }
.savings-methods span, .savings-methods small { display: block; color: var(--muted); font-size: 11px; }
.savings-methods strong { display: block; font-size: 20px; }
.action-list { margin-top: 18px; }
.check-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 20px; }
.check-list label { display: flex; gap: 10px; align-items: center; padding: 12px 13px; background: #f5f8fa; border: 1px solid transparent; border-radius: 10px; cursor: pointer; }
.check-list label:has(input:checked) { background: var(--accent-soft); border-color: #eba8bf; }
.check-list input { width: 19px; min-height: 19px; accent-color: var(--accent-strong); }
.check-list span { margin: 0; font-size: 13px; }
.investment-amount-card { background: #fff; box-shadow: var(--shadow); }
.investment-auto-note { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; padding: 11px 14px; color: #6f2944; background: #fff2f7; border: 1px solid #edc4d3; border-radius: 11px; }
.investment-auto-note b { flex: 0 0 auto; padding: 4px 8px; color: #fff; background: var(--accent-strong); border-radius: 999px; font-size: 11px; }
.investment-auto-note span { font-size: 12px; line-height: 1.55; }
.investment-sources { display: grid; grid-template-columns: repeat(2,1fr); gap: 11px; }
.investment-source-card { min-width: 0; padding: 15px 16px; background: #fffafb; border: 1px solid #edd4de; border-radius: 12px; }
.investment-source-card span, .investment-source-card small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }
.investment-source-card strong { display: block; margin: 4px 0 2px; color: var(--ink); font-size: 24px; line-height: 1.25; }
.investment-plan-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; margin: 18px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.investment-plan-summary > div { min-width: 0; padding: 17px; color: #fff; background: var(--ink); border-radius: 13px; }
.investment-plan-summary span, .investment-plan-summary small { display: block; color: #d8bdc8; font-size: 11px; line-height: 1.5; }
.investment-plan-summary strong { display: block; margin: 5px 0 2px; font-size: 25px; line-height: 1.2; }
.investment-plan-summary .investment-gap-result { color: var(--ink); background: var(--accent); }
.investment-plan-summary .investment-gap-result span, .investment-plan-summary .investment-gap-result small { color: #6f2944; }
.investment-plan-summary .investment-gap-result.is-covered { color: #fff; background: #8a6275; }
.investment-plan-summary .investment-gap-result.is-covered span, .investment-plan-summary .investment-gap-result.is-covered small { color: #f5e8ed; }

.summary-hero { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 18px; overflow: hidden; color: #fff; background: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.summary-hero > div { min-width: 0; padding: 21px; border-right: 1px solid rgba(255,255,255,.11); }
.summary-hero > div:last-child { border: 0; }
.summary-hero strong { display: block; margin: 5px 0; overflow: hidden; font-size: 22px; text-overflow: ellipsis; }
.summary-hero span { color: #768da7; font-size: 11px; }
.summary-hero .accent { color: var(--ink); background: var(--accent); }
.summary-hero .accent small, .summary-hero .accent span { color: #6f2944; }
.allocation-summary-card { padding: 24px 28px; border-color: #eab7ca; background: linear-gradient(135deg, #fff, #fff2f7); }
.allocation-summary-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-bottom: 15px; border-bottom: 1px solid #efd6df; }
.allocation-summary-head small { color: var(--accent-strong); font-weight: 800; }
.allocation-summary-head h2 { margin: 2px 0 0; }
.allocation-summary-head > strong { font-size: 24px; white-space: nowrap; }
.final-allocation-list { display: grid; gap: 8px; padding: 15px 0; }
.final-allocation-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; background: #fff; border-radius: 9px; }
.final-allocation-list p { margin: 0; color: var(--muted); }
.final-allocation-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 13px; border-top: 1px solid #efd6df; }
.final-allocation-foot span { color: var(--muted); font-size: 13px; }
.final-allocation-foot strong { font-size: 20px; }
.summary-card { padding: 8px 28px; }
.summary-section { display: grid; grid-template-columns: 50px 1fr; gap: 14px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.summary-section:last-child { border: 0; }
.summary-num { color: var(--accent-strong); font: 800 12px/1.4 ui-monospace, monospace; }
.summary-section small { display: block; margin-bottom: 7px; color: var(--muted); font-weight: 700; }
.summary-section p { margin: 0; white-space: pre-wrap; }
.summary-section ol { margin: 0; padding-left: 22px; }
.finish-card { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 38px; color: #fff; background: var(--ink); border-color: var(--ink); }
.finish-label { color: var(--accent); font: 700 11px/1 ui-monospace, monospace; letter-spacing: .12em; }
.finish-card h2 { margin: 12px 0 8px; font-size: clamp(21px,3vw,31px); }
.finish-card p { max-width: 700px; margin: 0; color: #9eb0c5; font-size: 13px; }

.step-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.step-footer > div { display: grid; gap: 7px; place-items: center; color: var(--muted); font-size: 12px; }
.step-footer > div small { color: #8292a4; font-size: 10px; }
.step-footer > div i { width: 35px; height: 2px; background: var(--ink); }
.step-footer #nextStep { justify-self: end; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 17px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 800; }
.button-primary { color: var(--ink); background: var(--accent); border: 1px solid var(--accent); }
.button-primary:hover { background: #f8bfd0; }
.button-secondary { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.button-secondary:hover { background: #fff; }
.text-button { padding: 6px; background: transparent; border: 0; cursor: pointer; font-size: 12px; }
.button:disabled { opacity: .35; cursor: default; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; padding: 10px 16px; color: #fff; background: var(--ink); border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; font-size: 13px; }
.toast.show { opacity: 1; transform: none; }

body.plan-modal-open { overflow: hidden; }
.plan-modal[hidden] { display: none; }
.plan-modal { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 24px; }
.plan-modal-backdrop { position: absolute; inset: 0; background: rgba(46,22,35,.72); backdrop-filter: blur(5px); }
.plan-modal-panel { position: relative; width: min(1240px, 100%); height: min(92vh, 920px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: #fffafc; border: 1px solid #e9b8c8; border-radius: 22px; box-shadow: 0 30px 90px rgba(50,18,34,.35); }
.plan-modal-header { z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 24px; color: #fff; background: var(--ink); }
.plan-modal-header p { margin: 0 0 2px; color: #e6b9ca; font-size: 11px; font-weight: 800; }
.plan-modal-header h2 { margin: 0; font-size: 25px; line-height: 1.35; }
.plan-modal-close { width: 46px; height: 46px; flex: 0 0 auto; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 50%; cursor: pointer; font-size: 28px; line-height: 1; }
.plan-modal-close:hover, .plan-modal-close:focus-visible { background: var(--accent-strong); outline: 3px solid rgba(255,255,255,.3); }
.plan-modal-body { min-height: 0; padding: 20px 24px 28px; overflow-y: auto; }
.plan-guide { padding: 17px 19px; color: #6b344a; background: #fff0f5; border: 1px solid #efbdd0; border-radius: 14px; }
.plan-guide strong { display: block; margin-bottom: 3px; color: #84284b; font-size: 17px; }
.plan-guide p { margin: 0; font-size: 14px; line-height: 1.7; }
.quick-picks { margin-top: 14px; padding: 18px; background: #fff; border: 2px solid #e9b8c8; border-radius: 16px; }
.quick-picks-heading { display: grid; gap: 3px; margin-bottom: 12px; }
.quick-picks-heading > span { color: #a13d64; font-size: 13px; font-weight: 900; }
.quick-picks-heading h3 { margin: 0; color: #5d2b40; font-size: 20px; }
.quick-pick-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.quick-pick-card { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 7px; padding: 16px; background: #fff8fa; border: 1px solid #e7bdcc; border-radius: 13px; }
.quick-pick-tag { justify-self: start; padding: 5px 9px; color: #7c294a; background: #f7dce6; border-radius: 999px; font-size: 12px; font-weight: 900; }
.quick-pick-card h4 { margin: 0; color: #6f2343; font-size: 21px; }
.quick-pick-card p { margin: 0; color: #614b55; font-size: 14px; line-height: 1.6; }
.quick-pick-card > strong { color: #8d244d; font-size: 20px; }
.quick-pick-card .plan-candidate-button { width: 100%; margin-top: 3px; }
.plan-change-alert { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 11px 14px; color: #6b4a24; background: #fff9e7; border: 1px solid #ead9a3; border-radius: 11px; font-size: 12px; }
.plan-change-alert b { flex: 0 0 auto; color: #7b5315; }
.device-choice { display: grid; gap: 9px; margin: 20px 0 8px; }
.device-choice > span { color: var(--ink-2); font-size: 16px; font-weight: 900; }
.device-choice > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.device-choice button { min-height: 76px; display: grid; gap: 4px; align-content: center; padding: 12px 14px; color: #704a59; text-align: left; background: #fff; border: 2px solid #dcbeca; border-radius: 13px; cursor: pointer; }
.device-choice button b { font-size: 15px; line-height: 1.35; }
.device-choice button small { color: #806572; font-size: 12px; line-height: 1.4; }
.device-choice button.is-active, .device-choice button:hover, .device-choice button:focus-visible { color: #fff; background: var(--accent-strong); border-color: var(--accent-strong); outline: none; }
.device-choice button.is-active small, .device-choice button:hover small, .device-choice button:focus-visible small { color: #fff3f7; }
.plan-filter { display: grid; gap: 9px; margin: 20px 0 14px; }
.plan-filter > span { color: var(--ink-2); font-size: 14px; font-weight: 900; }
.plan-filter > div { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-filter button { min-width: 106px; min-height: 50px; padding: 7px 14px; color: #704a59; background: #fff; border: 1px solid #dcbeca; border-radius: 11px; cursor: pointer; font-weight: 800; line-height: 1.2; }
.plan-filter button small { font-size: 10px; }
.plan-filter button.is-active, .plan-filter button:hover, .plan-filter button:focus-visible { color: #fff; background: var(--accent-strong); border-color: var(--accent-strong); outline: none; }
.plan-filter > p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.mobile-plan-table-wrap { overflow-x: auto; border: 1px solid #e6ccd6; border-radius: 14px; background: #fff; }
.mobile-plan-table { width: 100%; min-width: 1140px; border-collapse: collapse; font-size: 14px; line-height: 1.65; }
.mobile-plan-table th, .mobile-plan-table td { padding: 15px; text-align: left; vertical-align: top; border-right: 1px solid #f0dde4; border-bottom: 1px solid #ead8df; }
.mobile-plan-table th:last-child, .mobile-plan-table td:last-child { border-right: 0; }
.mobile-plan-table tbody tr:last-child > * { border-bottom: 0; }
.mobile-plan-table thead th { position: sticky; z-index: 1; top: 0; color: #fff; background: #6f3850; white-space: nowrap; font-size: 12px; }
.mobile-plan-table thead th:nth-child(1) { width: 150px; }
.mobile-plan-table thead th:nth-child(2) { width: 330px; }
.mobile-plan-table thead th:nth-child(3) { width: 270px; }
.mobile-plan-table thead th:nth-child(4) { width: 200px; }
.mobile-plan-table tbody th { color: #6f2343; background: #fff8fa; }
.mobile-plan-table tbody th strong { display: block; margin-top: 7px; font-size: 17px; }
.mobile-plan-table tbody th a { display: inline-block; margin-top: 9px; color: #a13d64; font-size: 13px; font-weight: 800; }
.plan-price-cell { background: #fff8fb; }
.regular-price-label { display: inline-flex; margin-bottom: 9px; padding: 4px 8px; color: #84284b; background: #f8dce7; border-radius: 999px; font-size: 13px; font-weight: 900; }
.plan-price-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.plan-price-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px; background: #fff; border: 2px solid #efc4d3; border-radius: 12px; }
.plan-price-name { display: grid; gap: 2px; min-width: 0; }
.plan-price-name b { color: #533743; font-size: 14px; line-height: 1.35; }
.plan-price-name small { color: #745966; font-size: 14px; font-weight: 800; }
.plan-price-amount { display: flex; align-items: baseline; justify-content: flex-end; gap: 3px; color: #8d244d; white-space: nowrap; }
.plan-price-amount b { font-size: 26px; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.plan-price-amount small { font-size: 12px; font-weight: 900; }
.plan-fit-cell { color: #523c46; font-size: 15px; font-weight: 800; line-height: 1.75; }
.plan-help-cell { color: #6f3850; font-size: 14px; font-weight: 900; line-height: 1.7; }
.mobile-plan-table td > small { display: block; margin-top: 10px; color: #6c5660; font-size: 12px; line-height: 1.65; }
.plan-candidate-button { min-width: 100px; min-height: 48px; display: grid; gap: 2px; place-content: center; padding: 8px 10px; color: #7e294b; background: #fff0f5; border: 1px solid #e6a9bf; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 900; }
.plan-candidate-button small { color: inherit; font-size: 10px; line-height: 1.3; }
.plan-candidate-button:hover, .plan-candidate-button:focus-visible { color: #fff; background: var(--accent-strong); outline: none; }
.plan-candidate-button.is-added { color: #fff; background: #8f536b; border-color: #8f536b; }
.plan-notes { display: grid; gap: 4px; margin-top: 13px; padding: 0 3px; color: #6d5560; font-size: 11px; }
.plan-notes p { margin: 0; }
.plan-modal-footer { z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 14px 24px; background: #fff; border-top: 1px solid #ead8df; box-shadow: 0 -10px 30px rgba(88,35,60,.06); }
.plan-modal-footer span { color: var(--muted); font-size: 12px; font-weight: 700; }
.rent-guide-panel { width: min(760px,100%); height: auto; max-height: 92vh; }
.rent-guide-body { display: grid; gap: 14px; }
.rent-guide-type { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; color: #6f3850; background: #fff0f5; border: 1px solid #efbdd0; border-radius: 11px; }
.rent-guide-type span { font-size: 13px; font-weight: 800; }
.rent-guide-type strong { font-size: 17px; }
#rentGuideContent { display: grid; gap: 14px; }
.rent-guide-card, .rent-message-card, .rent-guide-empty { padding: 18px; background: #fff; border: 1px solid #e9d5dd; border-radius: 14px; }
.rent-guide-card h3 { margin: 0 0 8px; color: #682a43; font-size: 21px; }
.rent-law-note { margin: 0 0 16px; color: #5f4c54; font-size: 14px; line-height: 1.75; }
.rent-guide-card h4 { margin: 0 0 8px; font-size: 15px; }
.rent-guide-card ol { display: grid; gap: 7px; margin: 0; padding-left: 23px; color: #55444b; font-size: 14px; line-height: 1.65; }
.rent-message-card { background: #fff7df; border-color: #ead59a; }
.rent-message-card > span { color: #8b5b20; font-size: 13px; font-weight: 900; }
.rent-message-card p { margin: 9px 0 0; color: #4f3e2a; font-size: 15px; line-height: 1.85; }
.rent-legal-caution { margin: 0; padding: 12px 14px; color: #6e5862; background: #f5f1f3; border-radius: 10px; font-size: 12px; line-height: 1.65; }
.rent-source-links { display: flex; flex-wrap: wrap; gap: 8px 15px; }
.rent-source-links a { min-height: 44px; display: inline-flex; align-items: center; color: #9b2d58; font-size: 13px; font-weight: 800; }
.rent-guide-empty strong { color: #6f2944; font-size: 18px; }
.rent-guide-empty p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 230px minmax(0,1fr); }
  .sidebar { padding-inline: 15px; }
  #worksheet { padding-inline: 32px; }
  .income-grid.four { grid-template-columns: repeat(2,1fr); }
  .summary-hero { grid-template-columns: repeat(2,1fr); }
  .summary-hero > div:nth-child(2) { border-right: 0; }
  .summary-hero > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.11); }
}

@media (max-width: 820px) {
  html, body { overflow-x: clip; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 40; inset: 0 0 0 auto; width: min(88vw, 340px); height: 100vh; visibility: hidden; opacity: 0; transform: translateX(102%); transition: transform .25s ease, opacity .2s ease, visibility 0s linear .25s; box-shadow: -20px 0 60px rgba(16,35,63,.25); }
  body.menu-open::before { content: ""; position: fixed; z-index: 39; inset: 0; background: rgba(4,16,31,.55); }
  body.menu-open .sidebar { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .mobile-header { position: sticky; z-index: 30; top: 0; display: flex; justify-content: space-between; align-items: center; height: 70px; padding: 11px 20px; color: #fff; background: rgba(16,35,63,.97); backdrop-filter: blur(12px); }
  .mobile-header .brand-mark { width: 36px; height: 36px; font-size: 20px; }
  .mobile-progress { display: grid; grid-template-columns: 1fr; gap: 5px; width: 128px; padding: 7px 10px; color: #fff; text-align: left; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; cursor: pointer; }
  .mobile-progress span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .mobile-progress small { color: #d8bdc8; font-size: 9px; font-weight: 700; }
  .mobile-progress strong { color: var(--accent); font-size: 14px; }
  .mobile-progress > i { display: block; height: 5px; overflow: hidden; background: rgba(255,255,255,.16); border-radius: 999px; }
  .mobile-progress > i b { display: block; width: 0; height: 100%; background: var(--accent); border-radius: inherit; transition: width .35s ease; }
  #worksheet { padding: 35px 20px 24px; }
  .resume-banner { grid-template-columns: auto minmax(0,1fr); margin-bottom: 26px; }
  .resume-state { grid-column: 2; justify-self: start; }
  .step-heading { align-items: flex-start; }
  .chapter-badge { display: none; }
  .quick-chapter-nav { top: 78px; }
  .form-grid.two-col, .prompt-row, .prompt-row.three, .retirement-columns, .retirement-timeline-summary, .investment-sources { grid-template-columns: 1fr; }
  .investment-plan-summary { grid-template-columns: 1fr; }
  .section-jump-target { scroll-margin-top: 132px; }
  .budget-period-guide { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .budget-entry-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .furusato-layout { grid-template-columns: 1fr; }
  .category-grid, .income-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .custom-variable-row { grid-template-columns: minmax(0,1fr) minmax(140px,.7fr) 36px; }
  .improvement-breakdown { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .decision-card-list { grid-template-columns: 1fr; }
  .timeline-inputs { grid-template-columns: repeat(2,1fr); }
  .retirement-bridge { grid-template-columns: 1fr; }
  .retirement-bridge > i { text-align: center; line-height: 1; }
  .savings-methods { grid-template-columns: 1fr; }
  .check-list { grid-template-columns: 1fr; }
  .child-grid { grid-template-columns: 1fr 1fr; }
  .child-result { grid-template-columns: 1fr 1fr; }
  .education-total { grid-template-columns: 1fr; }
  .education-support-cards { grid-template-columns: 1fr; }
  .finish-card { display: grid; }
  .plan-modal { padding: 0; }
  .plan-modal-panel { width: 100%; height: 100%; border: 0; border-radius: 0; }
  .plan-modal-header { padding: 14px 16px; }
  .plan-modal-header h2 { font-size: 21px; }
  .plan-modal-body { padding: 14px 14px 22px; }
  .quick-pick-grid { grid-template-columns: 1fr; }
  .device-choice > div { grid-template-columns: 1fr; }
  .device-choice button { min-height: 68px; }
  .mobile-plan-table-wrap { overflow: visible; border: 0; background: transparent; }
  .mobile-plan-table { display: block; min-width: 0; }
  .mobile-plan-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mobile-plan-table tbody { display: grid; gap: 13px; }
  .mobile-plan-table tr { display: grid; overflow: hidden; background: #fff; border: 1px solid #e5c7d2; border-radius: 14px; box-shadow: 0 6px 18px rgba(88,35,60,.05); }
  .mobile-plan-table th, .mobile-plan-table td { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 10px; width: auto; padding: 12px 13px; border-right: 0; border-bottom: 1px solid #f1dfe6; }
  .mobile-plan-table th::before, .mobile-plan-table td::before { content: attr(data-label); color: #8c6a78; font-size: 11px; font-weight: 900; }
  .mobile-plan-table tbody th { background: #fff1f6; }
  .mobile-plan-table tbody th strong, .mobile-plan-table tbody th a { grid-column: 2; }
  .mobile-plan-table tbody th::before { grid-row: 1 / 3; }
  .mobile-plan-table td.plan-price-cell { display: block; padding: 14px 13px; }
  .mobile-plan-table td.plan-price-cell::before { display: block; margin-bottom: 9px; }
  .plan-candidate-button { width: 100%; }
  .plan-modal-footer { padding: 11px 14px; }
}

@media (max-width: 560px) {
  .mobile-header .brand b { font-size: 10px; }
  .mobile-header .brand small { font-size: 10px; }
  .resume-banner { gap: 10px; margin-bottom: 20px; padding: 11px 12px; }
  .resume-icon { width: 32px; height: 32px; font-size: 18px; }
  .resume-copy strong { font-size: 13px; }
  .resume-copy p { font-size: 11px; }
  .quick-chapter-nav { width: calc(100% + 12px); margin-left: -6px; padding: 6px; }
  .quick-chapter-nav > span { display: none; }
  .quick-chapter-nav button { flex: 0 0 auto; min-width: 68px; min-height: 35px; padding-inline: 8px; }
  .section-jump-nav { margin-top: -17px; }
  .section-jump-nav button { min-height: 38px; font-size: 12px; }
  .step-heading h1 { font-size: 34px; }
  .section-title h2 { font-size: 20px; }
  .help-button { width: auto; min-width: 120px; min-height: 42px; }
  .help-popover { width: calc(100% - 49px); }
  .note-strip { display: grid; gap: 4px; }
  .card, .section-card, .calculator-card { padding: 21px 17px; border-radius: 15px; }
  .dashboard-strip { grid-template-columns: 1fr; }
  .dashboard-strip > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.11); }
  .dashboard-strip strong { font-size: 22px; }
  .category-grid, .income-grid, .income-grid.four, .timeline-inputs { grid-template-columns: 1fr; }
  .retirement-person-grid, .retirement-person-fields { grid-template-columns: 1fr; }
  .retirement-total { display: grid; gap: 8px; }
  .budget-entry { padding: 14px; }
  .budget-entry-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .budget-name-field { grid-column: span 2; }
  .furusato-fields { grid-template-columns: 1fr; }
  .furusato-caution { display: grid; }
  .furusato-outcome { grid-template-columns: 1fr; }
  .furusato-outcome p { grid-column: auto; }
  .rent-guide-panel { height: 100%; max-height: none; }
  .rent-guide-type { align-items: flex-start; }
  .rent-guide-modal .plan-modal-footer { display: grid; }
  .improvement-breakdown { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .improvement-totals { grid-template-columns: 1fr; }
  .allocation-panel { padding: 16px 14px; }
  .allocation-heading { display: grid; gap: 9px; }
  .allocation-heading > strong { justify-self: start; }
  .allocation-row { grid-template-columns: 1fr 40px; padding: 12px; background: #fff8fa; border-radius: 11px; }
  .allocation-row label:first-child { grid-column: 1 / 3; }
  .allocation-totals { grid-template-columns: 1fr; }
  .allocation-summary-head { display: grid; gap: 8px; }
  .allocation-summary-head > strong { font-size: 21px; }
  .decision-card { padding: 15px 13px; }
  .decision-conclusion { grid-template-columns: 1fr; }
  .custom-variable-row { grid-template-columns: 1fr 36px; }
  .custom-variable-row label:first-child { grid-column: 1 / 3; }
  .child-grid { grid-template-columns: 1fr; }
  .child-grid .span-two { grid-column: auto; }
  .child-result { grid-template-columns: 1fr; }
  .education-total div { display: grid; gap: 4px; }
  .education-shortage-summary { grid-template-columns: 1fr; }
  .education-shortage-summary > div { display: grid; gap: 4px; }
  .education-auto-shortage { display: grid; }
  .education-auto-shortage .button { width: 100%; }
  .education-shortage-grid { grid-template-columns: 1fr; }
  .education-official-links { grid-template-columns: 1fr; }
  .summary-hero { grid-template-columns: 1fr; }
  .summary-hero > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.11); }
  .step-footer { grid-template-columns: 1fr 1fr; gap: 10px; }
  .step-footer > div { display: none; }
  .step-footer .button { width: 100%; padding-inline: 8px; }
  .finish-card .button { width: 100%; }
  .toast { right: 14px; bottom: 14px; }
  .mobile-compare-launch { min-height: 78px; }
  .plan-change-alert { display: grid; gap: 2px; }
  .plan-filter > div { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .plan-filter button { min-width: 0; }
  .mobile-plan-table th, .mobile-plan-table td { grid-template-columns: 96px minmax(0, 1fr); padding: 11px 12px; }
  .plan-price-list li { grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 10px; }
  .plan-price-name b, .plan-price-name small { font-size: 13px; }
  .plan-price-amount b { font-size: 24px; }
  .insurance-cost-grid { grid-template-columns: 1fr; }
  .plan-modal-footer { display: grid; }
  .plan-modal-footer .button { width: 100%; }
}

@media print {
  body { background: #fff; font-size: 12px; }
  .sidebar, .mobile-header, .resume-banner, .quick-chapter-nav, .section-jump-nav, .step-footer, .add-row, .remove-row, .finish-card .button, .toast, .plan-modal, .mobile-compare-launch { display: none !important; }
  .app-shell { display: block; }
  #worksheet { max-width: none; padding: 0; }
  .step { display: block !important; break-before: page; animation: none; }
  .step:first-child { break-before: auto; }
  .card { box-shadow: none; break-inside: avoid; }
  .calculator-card { color: var(--ink); background: #fff; border-color: var(--line); }
  .calculator-card .section-title h2, .calculator-card label > span { color: var(--ink); }
  .calculator-card .section-title p { color: var(--muted); }
  .calculator-card input, .calculator-card select, .calculator-card textarea { color: var(--ink); background: #fff; border-color: var(--line); }
  .table-wrap { overflow: visible; }
  .entry-table { min-width: 0; font-size: 10px; }
}
