/* 年収の壁みはり帳（外部フォント・外部ファイルは読み込まない） */

:root {
  --bg: #f2efe7;
  --surface: #fffdf8;
  --surface-2: #f7f3ea;
  --ink: #1b2725;
  --ink-2: #3f4d4a;
  --muted: #66716e;
  --line: #e2dbcc;
  --line-strong: #cdc3ae;
  --brand: #0f5e5a;
  --brand-2: #0a4744;
  --brand-soft: #e1eeec;
  --on-brand: #ffffff;
  --cal: #2d5b98;
  --cal-soft: #e6edf7;
  --fwd: #367647;
  --fwd-soft: #e3f0e6;
  --cond: #865718;
  --cond-soft: #f5ebda;
  --ok: #2c7a4d;
  --near: #a3620a;
  --near-soft: #fbefd9;
  --over: #b0372a;
  --over-soft: #fae7e3;
  --track: #ebe5d7;
  --focus: #1c6db0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(40, 34, 20, .05), 0 8px 24px rgba(40, 34, 20, .06);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121615;
    --surface: #1a1f1e;
    --surface-2: #212726;
    --ink: #e9e6de;
    --ink-2: #c8c5bc;
    --muted: #9a9d97;
    --line: #2f3634;
    --line-strong: #434b48;
    --brand: #0f5e5a;
    --brand-2: #0b4643;
    --brand-soft: #173431;
    --cal: #8db3e6;
    --cal-soft: #1b2a3d;
    --fwd: #8fcf9f;
    --fwd-soft: #1a3022;
    --cond: #e0b170;
    --cond-soft: #35291a;
    --ok: #8fcf9f;
    --near: #f0b85a;
    --near-soft: #3a2c14;
    --over: #f19384;
    --over-soft: #3d1f1a;
    --track: #2b3230;
    --focus: #79b6ec;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121615;
  --surface: #1a1f1e;
  --surface-2: #212726;
  --ink: #e9e6de;
  --ink-2: #c8c5bc;
  --muted: #9a9d97;
  --line: #2f3634;
  --line-strong: #434b48;
  --brand-soft: #173431;
  --cal: #8db3e6;
  --cal-soft: #1b2a3d;
  --fwd: #8fcf9f;
  --fwd-soft: #1a3022;
  --cond: #e0b170;
  --cond-soft: #35291a;
  --ok: #8fcf9f;
  --near: #f0b85a;
  --near-soft: #3a2c14;
  --over: #f19384;
  --over-soft: #3d1f1a;
  --track: #2b3230;
  --focus: #79b6ec;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .02em;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

a { color: var(--cal); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 8px; }

/* ---------- ヘッダー ---------- */

.top {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-2) 100%);
  color: var(--on-brand);
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.top::after {
  /* 目盛りのような細い線 */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .18) 0 1px, transparent 1px 12px);
  pointer-events: none;
}
.top-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 44px; height: 44px; flex: none; }
.bm-bg { fill: rgba(255, 255, 255, .12); stroke: rgba(255, 255, 255, .28); stroke-width: 1; }
.bm-bar { fill: #ffffff; }
.bm-wall { fill: #f2b84b; }
.brand-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.3;
}
.brand-sub { margin: 2px 0 0; font-size: 12.5px; opacity: .86; line-height: 1.5; }

/* ---------- はじめに ---------- */

.notice {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  font-size: 14px;
  line-height: 1.7;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; }
.notice-main { font-weight: 600; }
.notice-privacy {
  padding-left: 22px;
  position: relative;
  color: var(--ink-2);
}
.notice-privacy::before {
  /* 鍵の形 */
  content: "";
  position: absolute;
  left: 2px;
  top: .5em;
  width: 12px;
  height: 9px;
  border-radius: 2px;
  background: var(--brand);
}
.notice-privacy::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: calc(.5em - 6px);
  width: 7px;
  height: 8px;
  border: 2px solid var(--brand);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}
.notice-warn {
  color: var(--over);
  font-weight: 600;
}

/* ---------- カード ---------- */

.card {
  margin: 14px 0;
  padding: 18px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.card.is-cal, .card.is-rec { border-top: 4px solid var(--cal); }
.card.is-fwd { border-top: 4px solid var(--fwd); }
.card.is-cond { border-top: 4px solid var(--cond); }

.card-head { margin-bottom: 10px; }
.card h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
  letter-spacing: .04em;
}
.card h3 { font-size: 15px; margin: 16px 0 6px; }
.card p { margin: 0 0 10px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tag-cal, .tag-rec { color: var(--cal); background: var(--cal-soft); }
.tag-fwd { color: var(--fwd); background: var(--fwd-soft); }
.tag-cond { color: var(--cond); background: var(--cond-soft); }

.em-cal { color: var(--cal); font-weight: 700; }
.em-fwd { color: var(--fwd); font-weight: 700; }

.hint { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; line-height: 1.65; }

.key-box {
  background: var(--cond-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14.5px;
}

/* ---------- 毎月の給料 ---------- */

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
  margin: 12px 0 14px;
}
@media (min-width: 540px) { .month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 720px) { .month-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.month label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin: 0 0 3px 2px;
  line-height: 1.3;
}
.month.is-filled label { color: var(--cal); }

.unit-input { position: relative; }
.unit-input input {
  width: 100%;
  min-height: 46px;
  padding: 10px 34px 10px 10px;
  font: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  appearance: none;
}
.unit-input input:focus { background: var(--surface); border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.unit-input input[aria-invalid="true"] { border-color: var(--over); background: var(--over-soft); }
.unit-input .unit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}
.month .unit-input input { padding-right: 26px; padding-left: 6px; }
.month .unit-input .unit { right: 8px; }
.field-error { color: var(--over); font-size: 12px; margin: 3px 0 0 2px; line-height: 1.4; }

.total {
  border-top: 1px dashed var(--line-strong);
  padding-top: 12px;
  margin-bottom: 10px;
}
.total-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 !important;
}
.total-label { font-weight: 700; }
.total-value {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  color: var(--cal);
}
.total-meta { margin: 2px 0 0 !important; color: var(--muted); font-size: 13.5px; }

/* ---------- 壁の一覧 ---------- */

.legend {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--ink-2);
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-cal, .dot-rec { background: var(--cal); }
.dot-fwd { background: var(--fwd); }
.dot-cond { background: var(--cond); }

.wall-list { list-style: none; margin: 0; padding: 0; }
.wall-list li + li { margin-top: 8px; }
.wall {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 12px 12px 0;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 5px solid var(--cal);
  color: inherit;
  text-decoration: none;
}
.wall.is-fwd { border-left-color: var(--fwd); }
.wall.is-cond { border-left-color: var(--cond); }
.wall:hover { border-color: var(--line-strong); }
.wall-amt {
  text-align: right;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.wall-amt small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.wall-name { margin: 0 !important; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.wall-status { margin: 1px 0 6px !important; font-weight: 700; font-size: 15.5px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.wall.is-over .wall-status { color: var(--over); }
.wall.is-near .wall-status { color: var(--near); }
.wall.is-none .wall-status { color: var(--muted); font-weight: 600; font-size: 14px; }

/* ---------- メーター ---------- */

.bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: var(--cal);
  transition: width .25s ease;
}
.is-fwd .bar-fill { background: var(--fwd); }
.is-near .bar-fill { background: var(--near); }
.is-over .bar-fill {
  background: repeating-linear-gradient(135deg, var(--over) 0 8px, color-mix(in srgb, var(--over) 75%, #fff) 8px 14px);
}
.bar.big { height: 14px; margin: 10px 0 6px; }
.bar-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
@media (prefers-reduced-motion: reduce) { .bar-fill { transition: none; } }

/* ---------- 結果 ---------- */

.result {
  border-radius: var(--radius-sm);
  padding: 14px 14px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin: 4px 0 12px;
}
.result.is-over { background: var(--over-soft); border-color: color-mix(in srgb, var(--over) 35%, transparent); }
.result.is-near { background: var(--near-soft); border-color: color-mix(in srgb, var(--near) 35%, transparent); }
.result-label { margin: 0 !important; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.result-big {
  margin: 2px 0 0 !important;
  font-size: clamp(26px, 7.4vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
.result-big small { font-size: 15px; font-weight: 700; margin-right: 6px; }
.is-over .result-big { color: var(--over); }
.is-near .result-big { color: var(--near); }
.result-note { margin: 4px 0 6px !important; font-size: 13.5px; color: var(--ink-2); }

.kv { list-style: none; margin: 0 0 12px; padding: 0; }
.kv li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.kv li:last-child { border-bottom: 0; }
.kv .k { color: var(--ink-2); }
.kv .v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.kv .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; white-space: normal; }

.empty {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin: 4px 0 12px;
}

.status {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 4px 0 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.status-title { margin: 0 0 4px !important; font-weight: 800; font-size: 16px; }
.status p:last-child { margin-bottom: 0; }
.status.is-covered { background: var(--cond-soft); border-color: color-mix(in srgb, var(--cond) 35%, transparent); }
.status.is-covered .status-title { color: var(--cond); }
.status ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 14px; }

.dep-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dep-row:last-child { border-bottom: 0; }
.dep-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dep-name { font-weight: 700; font-size: 15px; }
.dep-range { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dep-status { font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0 6px !important; }
.dep-row.is-over .dep-status { color: var(--over); }
.dep-row.is-near .dep-status { color: var(--near); }
.band-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--cal);
  background: var(--cal-soft);
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* ---------- 箇条 ---------- */

.facts { margin: 0; padding: 0; list-style: none; }
.facts li {
  position: relative;
  padding: 0 0 0 16px;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
}
.facts li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.facts li.key { color: var(--ink); font-weight: 600; }
.is-cal .facts li.key::before, .is-rec .facts li.key::before { background: var(--cal); }
.is-fwd .facts li.key::before { background: var(--fwd); }
.is-cond .facts li.key::before { background: var(--cond); }
#out .facts li.key::before { background: var(--over); }

details.more {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
details.more summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14.5px;
  padding: 8px 0;
  color: var(--ink-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s ease;
  margin-right: 2px;
}
details.more[open] summary::before { transform: rotate(45deg); }

/* ---------- 選択と入力 ---------- */

.field {
  border: 0;
  padding: 0;
  margin: 14px 0 0;
  min-width: 0;
}
.field legend {
  padding: 0;
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 6px;
}
.seg {
  display: grid;
  gap: 6px;
}
.seg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-stack { grid-template-columns: 1fr; }
.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.seg label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
}
.seg-stack label { justify-content: flex-start; text-align: left; }
.seg-3 label { padding: 8px 4px; font-size: 13.5px; }
.seg input:checked + label {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--brand);
}
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.inputs { display: grid; gap: 10px; margin-top: 10px; }
.input-row label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 3px; }
@media (min-width: 540px) {
  .inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 期間の図 ---------- */

.timeline { margin: 12px 0 6px; }
.tl-row { margin-bottom: 10px; }
.tl-label { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.tl-label .r { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-track {
  position: relative;
  height: 22px;
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--track) 0 calc(100% / 24 - 1px), var(--surface) calc(100% / 24 - 1px) calc(100% / 24));
}
.tl-band {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 6px;
}
.tl-band.cal { background: var(--cal); }
.tl-band.fwd { background: var(--fwd); }
.tl-today {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.tl-axis {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line-strong);
  padding-top: 3px;
  margin-top: 2px;
}
.tl-axis span + span { border-left: 1px solid var(--line-strong); padding-left: 4px; }
.tl-axis span:first-child { padding-left: 2px; }
.tl-legend { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.tl-legend i { display: inline-block; width: 2px; height: 14px; background: var(--ink); border-radius: 2px; }

/* ---------- 計算式と出典 ---------- */

.formula { margin: 8px 0 4px; }
.formula div {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.formula div:last-child { border-bottom: 0; }
.formula dt { font-weight: 700; font-size: 14px; }
.formula dd { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.sources { padding-left: 1.2em; margin: 0; font-size: 14px; }
.sources li { margin-bottom: 6px; }
.sources a { word-break: break-word; }

/* ---------- ボタン ---------- */

.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.btn {
  appearance: none;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}
.btn:hover { border-color: var(--ink-2); }
.btn-danger { color: var(--over); border-color: color-mix(in srgb, var(--over) 45%, transparent); background: var(--over-soft); }
.done { color: var(--ok); font-weight: 700; font-size: 14px; margin-top: 8px !important; }

/* ---------- フッター ---------- */

.foot {
  padding: 18px 0 max(28px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.foot p { margin: 0 0 4px; }
.foot p:first-child { font-weight: 700; color: var(--ink-2); }

@media (min-width: 720px) {
  .card { padding: 22px 24px 20px; }
  .card h2 { font-size: 20px; }
  .wall { grid-template-columns: 110px minmax(0, 1fr); }
}

@media print {
  .top { background: none; color: var(--ink); }
  .year-step, .buttons, .skip { display: none; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- 社会保険だけの版で足したもの ---------- */

.brand-pre { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; opacity: .85; }

.notice-tax {
  font-weight: 700;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  border-left: 4px solid var(--over);
}

.checks { display: grid; gap: 6px; }
.checks input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.checks label {
  position: relative;
  display: block;
  min-height: 44px;
  padding: 10px 12px 10px 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.checks label::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
}
.checks input:checked + label { border-color: var(--near); background: var(--near-soft); font-weight: 700; }
.checks input:checked + label::before { border-color: var(--near); background: var(--near); }
.checks input:checked + label::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 15px;
  width: 6px;
  height: 11px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
}
.checks input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

.year-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
}
.year-step .step {
  appearance: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.year-step .step:disabled { opacity: .35; cursor: default; }
.year-now { min-width: 96px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }

.wall.is-rec { border-left-color: var(--cal); }
.is-rec .bar-fill { background: var(--cal); }

.diff-table { list-style: none; margin: 8px 0 0; padding: 0; }
.diff-table li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 60%, transparent);
  font-size: 14.5px;
}
.diff-table li:last-child { border-bottom: 0; }
.diff-table .k { color: var(--ink-2); }
.diff-table .v { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.diff-table .sub { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); text-align: right; margin-top: 1px; }
.wall-status span { display: block; }

.tl-band.cal-ghost {
  background: transparent;
  border: 2px dashed var(--line-strong);
}
.is-rec .total-value { font-size: 22px; color: var(--ink-2); }
.wall { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; }
.wall-amt { font-size: 17px; }
.wall-status { font-size: 14.5px; }
@media (min-width: 720px) { .wall { grid-template-columns: 110px minmax(0, 1fr); } .wall-status { font-size: 15.5px; } }

/* 画面の準備の案内（スクリプトが動けばすぐ消える。2秒たっても残っているときだけ見える） */
.boot { visibility: hidden; animation: boot-show 0s linear 2s forwards; }
.boot.is-error { visibility: visible; animation: none; }
@keyframes boot-show { to { visibility: visible; } }
.foot a { color: inherit; }
