.tw-lifeplan {
  --tw-ink: #26312d;
  --tw-muted: #66716c;
  --tw-brand: #2f6655;
  --tw-brand-dark: #214b3f;
  --tw-brand-soft: #eaf2ee;
  --tw-paper: #fffefa;
  --tw-bg: #f7f5ef;
  --tw-line: #d9dfda;
  --tw-warn: #8a5b18;
  --tw-warn-bg: #fff5da;
  --tw-danger: #a6423b;
  color: var(--tw-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  margin-inline: auto;
  max-width: 1180px;
  width: 100%;
}
.tw-lifeplan *, .tw-lifeplan *::before, .tw-lifeplan *::after { box-sizing: border-box; }
.tw-lifeplan button, .tw-lifeplan input, .tw-lifeplan select { font: inherit; }
.tw-lifeplan button, .tw-lifeplan a, .tw-lifeplan input, .tw-lifeplan select { min-height: 44px; }
.tw-lifeplan :focus-visible { outline: 3px solid #1d6fa5; outline-offset: 3px; }
.tw-lifeplan__intro { background: linear-gradient(135deg, #f0f6f2, #fffaf0); border: 1px solid var(--tw-line); border-radius: 24px; padding: clamp(24px, 5vw, 56px); }
.tw-lifeplan__intro h1 { font-size: clamp(28px, 5vw, 48px); letter-spacing: .02em; line-height: 1.25; margin: .2em 0; }
.tw-lifeplan__eyebrow { color: var(--tw-brand); font-size: 13px; font-weight: 800; letter-spacing: .12em; margin: 0; text-transform: uppercase; }
.tw-lifeplan__lead { font-size: clamp(17px, 2vw, 21px); margin: 12px 0 22px; max-width: 760px; }
.tw-lifeplan__privacy { align-items: center; background: white; border-radius: 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 18px; }
.tw-lifeplan__privacy strong { color: var(--tw-brand-dark); }
.tw-lifeplan__disclaimer { color: var(--tw-muted); font-size: 13px; margin-bottom: 0; }
.tw-lifeplan__progress { background: rgba(255, 254, 250, .96); border: 1px solid var(--tw-line); border-radius: 16px; display: grid; gap: 4px; grid-template-columns: repeat(10, minmax(72px, 1fr)); margin: 18px 0; overflow-x: auto; padding: 8px; position: sticky; top: 8px; z-index: 20; }
.tw-lifeplan__progress a { align-items: center; border-radius: 10px; color: var(--tw-muted); display: flex; flex-direction: column; font-size: 13px; justify-content: center; min-width: 72px; padding: 6px; text-decoration: none; }
.tw-lifeplan__progress a.complete { background: var(--tw-brand-soft); color: var(--tw-brand-dark); }
.tw-lifeplan__progress a.needs-review { background: var(--tw-warn-bg); color: var(--tw-warn); }
.tw-lifeplan__progress a.unconfirmed { background: #eef2f6; color: #4e5e67; }
.tw-lifeplan__progress small { display: block; font-size: 10px; line-height: 1.2; }
.tw-lifeplan__toolbar { align-items: center; background: var(--tw-paper); border: 1px solid var(--tw-line); border-radius: 14px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-bottom: 18px; padding: 12px 16px; }
.tw-lifeplan__mode, .tw-lifeplan__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tw-lifeplan__toolbar-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; }
.tw-lifeplan__notice { background: var(--tw-brand-soft); border-left: 4px solid var(--tw-brand); border-radius: 8px; margin: 12px 0; padding: 12px 16px; }
.tw-lifeplan__toggle { align-items: center; cursor: pointer; display: inline-flex; gap: 10px; }
.tw-lifeplan__toggle input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.tw-lifeplan__toggle-ui { background: #929b97; border-radius: 999px; display: inline-block; height: 26px; min-height: 26px; position: relative; transition: .2s; width: 46px; }
.tw-lifeplan__toggle-ui::after { background: white; border-radius: 50%; content: ""; height: 20px; left: 3px; position: absolute; top: 3px; transition: .2s; width: 20px; }
.tw-lifeplan__toggle input:checked + .tw-lifeplan__toggle-ui { background: var(--tw-brand); }
.tw-lifeplan__toggle input:checked + .tw-lifeplan__toggle-ui::after { transform: translateX(20px); }
.tw-lifeplan__toggle input:focus-visible + .tw-lifeplan__toggle-ui { outline: 3px solid #1d6fa5; outline-offset: 3px; }
.tw-lifeplan__toggle small { color: var(--tw-muted); display: block; font-size: 11px; }
.tw-lifeplan__section { background: var(--tw-paper); border: 1px solid var(--tw-line); border-radius: 18px; margin: 14px 0; overflow: clip; scroll-margin-top: 120px; }
.tw-lifeplan__section > summary { align-items: center; cursor: pointer; display: flex; font-size: clamp(18px, 2vw, 22px); font-weight: 800; justify-content: space-between; list-style: none; padding: 20px clamp(18px, 3vw, 30px); }
.tw-lifeplan__section > summary::-webkit-details-marker { display: none; }
.tw-lifeplan__section > summary::after { content: "＋"; font-size: 20px; order: 3; }
.tw-lifeplan__section[open] > summary::after { content: "−"; }
.tw-lifeplan__section-note { color: var(--tw-muted); margin: -10px 28px 0; }
.tw-lifeplan__review-reasons { background: var(--tw-warn-bg); border-left: 4px solid var(--tw-warn); margin: 0 28px 16px; padding: 12px 16px; }
.tw-lifeplan__review-reasons[role="note"] { background: #eef2f6; border-left-color: #647984; }
.tw-lifeplan__review-reasons ul { margin: 4px 0 6px; padding-left: 1.4em; }
.tw-lifeplan__section-body { border-top: 1px solid var(--tw-line); padding: clamp(18px, 3vw, 30px); }
.tw-lifeplan__grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tw-lifeplan__field { min-width: 0; }
.tw-lifeplan__field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.tw-lifeplan__input-wrap { align-items: center; display: flex; gap: 8px; }
.tw-lifeplan__date-parts { display: grid; gap: 8px; grid-template-columns: minmax(104px, 1.35fr) minmax(76px, .85fr) minmax(76px, .85fr); }
.tw-lifeplan__date-parts--month { grid-template-columns: minmax(104px, 1.35fr) minmax(76px, .85fr); }
.tw-lifeplan__date-parts select { min-width: 0; }
.tw-lifeplan__field input, .tw-lifeplan__field select, .tw-lifeplan__inline-form input { background: white; border: 1px solid #aab5b0; border-radius: 9px; color: var(--tw-ink); padding: 10px 12px; width: 100%; }
.tw-lifeplan__field input[inputmode="numeric"], .tw-lifeplan__field input[inputmode="decimal"] { text-align: right; }
.tw-lifeplan__field.is-error input, .tw-lifeplan__field.is-error select { border-color: var(--tw-danger); }
.tw-lifeplan__help, .tw-lifeplan__error { font-size: 12px; margin: 5px 0 0; }
.tw-lifeplan__help { color: var(--tw-muted); }
.tw-lifeplan__error { color: var(--tw-danger); font-weight: 700; }
.tw-lifeplan__required { color: var(--tw-danger); font-size: 11px; }
.tw-lifeplan__button { background: white; border: 1px solid var(--tw-brand); border-radius: 10px; color: var(--tw-brand-dark); cursor: pointer; font-weight: 700; padding: 9px 16px; }
.tw-lifeplan__button:hover { filter: brightness(.97); }
.tw-lifeplan__button:disabled { cursor: not-allowed; opacity: .5; }
.tw-lifeplan__button--primary { background: var(--tw-brand); color: white; }
.tw-lifeplan__button--danger { border-color: var(--tw-danger); color: var(--tw-danger); }
.tw-lifeplan__button--text { border-color: transparent; color: var(--tw-brand); min-height: 38px; padding: 4px 8px; }
.tw-lifeplan__badge { border: 1px solid currentColor; border-radius: 999px; display: inline-block; font-size: 11px; font-weight: 800; line-height: 1.4; margin-inline: 4px; padding: 3px 8px; white-space: nowrap; }
.tw-lifeplan__badge--complete, .tw-lifeplan__badge--standard { background: var(--tw-brand-soft); color: var(--tw-brand-dark); }
.tw-lifeplan__badge--approximate, .tw-lifeplan__badge--unresolved { background: var(--tw-warn-bg); color: var(--tw-warn); }
.tw-lifeplan__badge--optional, .tw-lifeplan__badge--progress, .tw-lifeplan__badge--unconfirmed { background: #f1f2f1; color: var(--tw-muted); }
.tw-lifeplan__assumptions { background: #f7faf8; border: 1px solid var(--tw-line); border-radius: 16px; margin: 18px 0; padding: clamp(18px, 3vw, 28px); }
.tw-lifeplan__assumptions-head { align-items: start; display: flex; justify-content: space-between; }
.tw-lifeplan__assumptions h2 { font-size: clamp(20px, 3vw, 28px); margin: 2px 0 12px; }
.tw-lifeplan__assumption-summary { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.tw-lifeplan__assumption-summary div { background: white; border: 1px solid var(--tw-line); border-radius: 10px; padding: 10px 12px; }
.tw-lifeplan__assumption-summary dt { color: var(--tw-muted); font-size: 12px; }
.tw-lifeplan__assumption-summary dd { font-weight: 800; margin: 2px 0 0; }
.tw-lifeplan__assumption-fields { margin-top: 16px; }
.tw-lifeplan__emergency-target { background: var(--tw-brand-soft); border-radius: 10px; color: var(--tw-brand-dark); font-weight: 700; margin: 18px 0 0; padding: 12px 14px; }
.tw-lifeplan__subcard { background: var(--tw-bg); border: 1px solid var(--tw-line); border-radius: 14px; margin: 10px 0; padding: 18px; }
.tw-lifeplan__subcard h3 { font-size: 17px; margin: 0 0 12px; }
.tw-lifeplan__subcard-title { align-items: center; display: flex; justify-content: space-between; }
.tw-lifeplan__list { display: grid; gap: 10px; margin: 14px 0; }
.tw-lifeplan__breakdown { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.tw-lifeplan__reconcile { align-items: center; border-radius: 12px; display: flex; flex-wrap: wrap; gap: 10px 20px; grid-column: 1 / -1; padding: 14px; }
.tw-lifeplan__reconcile.unallocated { background: #eef2f6; }
.tw-lifeplan__reconcile.over { background: var(--tw-warn-bg); }
.tw-lifeplan__reconcile.match { background: var(--tw-brand-soft); }
.tw-lifeplan__calculate { background: var(--tw-brand-soft); border-radius: 18px; margin: 24px 0; padding: 24px; text-align: center; }
.tw-lifeplan__calculate .tw-lifeplan__button { font-size: 18px; padding: 14px 26px; }
.tw-lifeplan__results { scroll-margin-top: 120px; }
.tw-lifeplan__results-head { align-items: end; display: flex; justify-content: space-between; margin-top: 36px; }
.tw-lifeplan__results-head h2 { font-size: clamp(24px, 4vw, 38px); margin: 4px 0; }
.tw-lifeplan__verdict { background: var(--tw-brand-soft); border-left: 5px solid var(--tw-brand); border-radius: 14px; margin: 18px 0; padding: 18px 20px; }
.tw-lifeplan__verdict.has-warning { background: var(--tw-warn-bg); border-left-color: var(--tw-warn); }
.tw-lifeplan__verdict h3 { font-size: clamp(18px, 2.5vw, 24px); margin: 0 0 6px; }
.tw-lifeplan__verdict p { margin: 0; }
.tw-lifeplan__kpis { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 18px 0; }
.tw-lifeplan__kpi { background: var(--tw-paper); border: 1px solid var(--tw-line); border-radius: 15px; padding: 18px; }
.tw-lifeplan__kpi h3 { color: var(--tw-muted); font-size: 12px; margin: 0; }
.tw-lifeplan__kpi strong { display: block; font-size: clamp(18px, 2vw, 25px); margin: 8px 0; overflow-wrap: anywhere; }
.tw-lifeplan__kpi p { color: var(--tw-muted); font-size: 12px; margin: 0; }
.tw-lifeplan__baseline { align-items: center; background: #eef2f6; border-radius: 12px; display: flex; justify-content: space-between; padding: 12px 16px; }
.tw-lifeplan__baseline p { margin: 0; }
.tw-lifeplan__chart { background: white; border: 1px solid var(--tw-line); border-radius: 16px; margin: 18px 0; padding: 18px; }
.tw-lifeplan__chart figcaption { font-size: 18px; font-weight: 800; }
.tw-lifeplan__chart-note { color: var(--tw-muted); font-size: 12px; margin: 4px 0 8px; }
.tw-lifeplan__chart svg { height: auto; max-height: 360px; width: 100%; }
.tw-lifeplan__chart-negative-zone { fill: #fff1ed; }
.tw-lifeplan__chart .grid { stroke: #e4e8e5; stroke-width: 1; }
.tw-lifeplan__chart .axis { stroke: #8c9691; stroke-width: 2; }
.tw-lifeplan__chart text { fill: var(--tw-muted); font-size: 12px; }
.tw-lifeplan__chart-hit { cursor: crosshair; pointer-events: all; }
.tw-lifeplan__chart-selection { pointer-events: none; }
.tw-lifeplan__chart-guide { stroke: #517066; stroke-dasharray: 4 4; stroke-width: 1.5; }
.tw-lifeplan__chart-active-point { stroke: #fff; stroke-width: 3; }
.tw-lifeplan__chart-callout { fill: #26312d; filter: drop-shadow(0 2px 4px rgba(38, 49, 45, .2)); }
.tw-lifeplan__chart .tw-lifeplan__chart-callout-year { fill: #fff; font-size: 12px; font-weight: 700; }
.tw-lifeplan__chart .tw-lifeplan__chart-callout-value { fill: #fff; font-size: 12px; }
.tw-lifeplan__chart-tooltip { background: #f4f8f6; border: 1px solid var(--tw-line); border-radius: 12px; margin: 10px 0; padding: 12px 14px; }
.tw-lifeplan__chart-tooltip > strong { border-left: 4px solid var(--tw-brand); display: block; padding-left: 8px; }
.tw-lifeplan__chart-tooltip dl { display: grid; gap: 4px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 8px 0 0; }
.tw-lifeplan__chart-tooltip dl div { display: flex; justify-content: space-between; }
.tw-lifeplan__chart-tooltip dt { color: var(--tw-muted); }
.tw-lifeplan__chart-tooltip dd { font-weight: 700; margin: 0; text-align: right; }
.tw-lifeplan__chart-placeholder { color: var(--tw-muted); font-size: 12px; margin: 8px 0; }
.tw-lifeplan__legend { display: flex; flex-wrap: wrap; gap: 12px; }
.tw-lifeplan__legend i { border-radius: 50%; display: inline-block; height: 10px; margin-right: 5px; width: 10px; }
.tw-lifeplan__chart-data { color: var(--tw-muted); font-size: 13px; }
.tw-lifeplan__concerns, .tw-lifeplan__scenarios, .tw-lifeplan__detail, .tw-lifeplan__exports { background: var(--tw-paper); border: 1px solid var(--tw-line); border-radius: 16px; margin: 18px 0; padding: clamp(18px, 3vw, 28px); }
.tw-lifeplan__concerns article { align-items: start; border-top: 1px solid var(--tw-line); display: grid; gap: 6px 16px; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.2fr) auto; padding: 16px 0; }
.tw-lifeplan__concerns article > div strong, .tw-lifeplan__concerns article > div span { display: block; }
.tw-lifeplan__concerns article p { margin: 0; }
.tw-lifeplan__concerns .tw-lifeplan__suggestion { color: var(--tw-muted); grid-column: 2; }
.tw-lifeplan__concerns a { align-items: center; color: var(--tw-brand); display: inline-flex; }
.tw-lifeplan__presets { align-items: center; background: var(--tw-brand-soft); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.tw-lifeplan__presets strong { flex: 1 1 100%; }
.tw-lifeplan__inline-form { align-items: end; display: grid; gap: 8px; grid-template-columns: 1fr auto; }
.tw-lifeplan__inline-form label { grid-column: 1 / -1; font-weight: 700; }
.tw-lifeplan__scenario-list { display: grid; gap: 8px; margin-top: 16px; }
.tw-lifeplan__scenario-list article { align-items: center; background: var(--tw-bg); border-radius: 10px; display: flex; justify-content: space-between; padding: 10px 14px; }
.tw-lifeplan__scenario-list label { align-items: center; display: flex; gap: 8px; font-weight: 700; }
.tw-lifeplan__scenario-list input { min-height: auto; }
.tw-lifeplan__comparison { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.tw-lifeplan__comparison article { border: 1px solid var(--tw-line); border-radius: 12px; padding: 14px; }
.tw-lifeplan__comparison h4 { margin: 0 0 8px; }
.tw-lifeplan__comparison dl div { display: flex; justify-content: space-between; }
.tw-lifeplan__comparison dt, .tw-lifeplan__comparison dd { margin: 2px 0; }
.tw-lifeplan__comparison dd { font-weight: 700; }
.tw-lifeplan__table-scroll { overflow-x: auto; }
.tw-lifeplan table { border-collapse: collapse; min-width: 1120px; width: 100%; }
.tw-lifeplan th, .tw-lifeplan td { border-bottom: 1px solid var(--tw-line); padding: 9px 11px; text-align: right; white-space: nowrap; }
.tw-lifeplan th { background: var(--tw-brand-soft); }
.tw-lifeplan td.negative { color: var(--tw-danger); font-weight: 700; }
.tw-lifeplan__issues { columns: 2; }
.tw-lifeplan__privacy-warning { background: var(--tw-warn-bg); border-radius: 10px; color: #654413; padding: 12px 14px; }
.tw-lifeplan__empty { color: var(--tw-muted); }
.tw-lifeplan__resume { background: var(--tw-paper); border: 1px solid var(--tw-line); border-radius: 20px; margin: 30px auto; max-width: 680px; padding: clamp(26px, 5vw, 48px); }
.tw-lifeplan__app-footer { color: var(--tw-muted); font-size: 12px; margin: 24px 0; text-align: center; }
.tw-lifeplan__visually-hidden { height: 1px!important; margin: -1px!important; overflow: hidden!important; padding: 0!important; position: absolute!important; width: 1px!important; clip: rect(0 0 0 0)!important; border: 0!important; }
.tw-lifeplan__print-only { display: none; }
.tw-lifeplan-page .sidebar, .tw-lifeplan-page #sidebar { display: none!important; }
.tw-lifeplan-page .main, .tw-lifeplan-page #main { width: 100%!important; }

@media (max-width: 900px) {
  .tw-lifeplan__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-lifeplan__breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-lifeplan__comparison { grid-template-columns: 1fr; }
  .tw-lifeplan__assumption-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tw-lifeplan { font-size: 15px; }
  .tw-lifeplan__intro { border-radius: 16px; padding: 22px 16px; }
  .tw-lifeplan__progress { border-radius: 0; margin-inline: -10px; top: 0; }
  .tw-lifeplan__toolbar, .tw-lifeplan__toolbar-actions, .tw-lifeplan__results-head, .tw-lifeplan__baseline, .tw-lifeplan__scenario-list article { align-items: stretch; flex-direction: column; }
  .tw-lifeplan__toolbar, .tw-lifeplan__toolbar-actions, .tw-lifeplan__results-head, .tw-lifeplan__baseline, .tw-lifeplan__scenario-list article { display: flex; }
  .tw-lifeplan__grid, .tw-lifeplan__breakdown { grid-template-columns: minmax(0, 1fr); }
  .tw-lifeplan__kpis { grid-template-columns: 1fr; }
  .tw-lifeplan__section > summary { gap: 6px; padding: 16px 14px; }
  .tw-lifeplan__section-body { padding: 16px 14px; }
  .tw-lifeplan__section-note { margin-inline: 14px; }
  .tw-lifeplan__review-reasons { margin-inline: 14px; }
  .tw-lifeplan__assumptions-head { gap: 8px; }
  .tw-lifeplan__assumption-summary, .tw-lifeplan__chart-tooltip dl { grid-template-columns: minmax(0, 1fr); }
  .tw-lifeplan__chart-tooltip dl div { gap: 12px; }
  .tw-lifeplan__concerns article { align-items: start; grid-template-columns: 1fr; }
  .tw-lifeplan__concerns .tw-lifeplan__suggestion { grid-column: 1; }
  .tw-lifeplan__presets .tw-lifeplan__button { flex: 1 1 100%; }
  .tw-lifeplan__inline-form { grid-template-columns: 1fr; }
  .tw-lifeplan__actions .tw-lifeplan__button { flex: 1 1 100%; }
  .tw-lifeplan__issues { columns: 1; }
}

@media print {
  @page { margin: 14mm; size: A4 portrait; }
  body.tw-lifeplan-page header, body.tw-lifeplan-page footer, body.tw-lifeplan-page .breadcrumb, body.tw-lifeplan-page .entry-title, body.tw-lifeplan-page .date-tags, body.tw-lifeplan-page .sns-share, body.tw-lifeplan-page .ad-area { display: none!important; }
  .tw-lifeplan__intro, .tw-lifeplan__progress, .tw-lifeplan__toolbar, .tw-lifeplan__notice, .tw-lifeplan__section, .tw-lifeplan__calculate, .tw-lifeplan__baseline, .tw-lifeplan__scenarios, .tw-lifeplan__exports, .tw-lifeplan__app-footer { display: none!important; }
  .tw-lifeplan__results { display: block!important; }
  .tw-lifeplan__print-only { display: block!important; page-break-before: always; }
  .tw-lifeplan__kpis { grid-template-columns: repeat(2, 1fr); }
  .tw-lifeplan__kpi, .tw-lifeplan__chart, .tw-lifeplan__concerns, .tw-lifeplan__detail { break-inside: avoid; }
  .tw-lifeplan__table-scroll { overflow: visible; }
  .tw-lifeplan table { font-size: 8px; min-width: 0; }
}

/* UX candidate: initial JSON entry and current-scenario text only. */
.tw-lifeplan__import { margin: 16px 0; }
.tw-lifeplan__import .tw-lifeplan__button { max-width: 100%; }
.tw-lifeplan__scenario-heading { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.tw-lifeplan__scenario-heading label { min-width: 0; overflow-wrap: anywhere; }
.tw-lifeplan__current-plan { color: var(--tw-brand-dark); font-size: 14px; font-weight: 700; }
@media print { .tw-lifeplan__import { display: none!important; } }
