/* 転職てつづきナビ — モバイルファースト／system font（画像はOGPのみ） */
:root {
  --c-main: #1d4f91;
  --c-main-dark: #153a6b;
  --c-accent: #e8f0fb;
  --c-text: #1f2328;
  --c-sub: #57606a;
  --c-line: #d0d7de;
  --c-bg: #ffffff;
  --c-bg-soft: #f6f8fa;
  --c-warn: #9a6700;
  --c-warn-bg: #fff8c5;
  --c-gate: #a40e26;
  --c-gate-bg: #ffebe9;
  --c-ok: #1a7f37;
  --c-ok-bg: #dafbe1;
  --radius: 10px;
  --wrap: 760px;
  /* D-05：カードの影（フラットな1px枠だけの「素のHTML」感を消す） */
  --shadow: 0 1px 2px rgba(16, 40, 80, 0.06), 0 4px 14px rgba(16, 40, 80, 0.07);
  --shadow-hover: 0 2px 4px rgba(16, 40, 80, 0.08), 0 8px 22px rgba(16, 40, 80, 0.12);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text);
  background: var(--c-bg);
  overflow-wrap: anywhere;
}
a {
  color: var(--c-main);
}
a:hover {
  color: var(--c-main-dark);
}
img {
  max-width: 100%;
}
h1,
h2,
h3 {
  line-height: 1.4;
}
h1 {
  font-size: 1.55rem;
  margin: 0.4em 0 0.5em;
}
/* D-05：h2 は全ページ・ボックス内も同じ形（左の太線）に統一 */
h2 {
  font-size: 1.25rem;
  margin: 2em 0 0.7em;
  padding: 0.05em 0 0.05em 12px;
  border-left: 5px solid var(--c-main);
}
h3 {
  font-size: 1.08rem;
  margin: 1.5em 0 0.5em;
}
small,
.small {
  font-size: 0.85rem;
  color: var(--c-sub);
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  background: #fff;
  padding: 8px;
  z-index: 10;
}
.sp-only {
  display: inline;
}
@media (min-width: 640px) {
  .sp-only {
    display: none;
  }
  h1 {
    font-size: 1.9rem;
  }
}

/* header / nav */
.site-header {
  background: var(--c-main);
  color: #fff;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.logo {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  flex: none;
  display: block;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.logo:hover {
  color: #fff;
}
.gnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  font-size: 0.85rem;
}
.gnav a {
  color: #fff;
  text-decoration: none;
  opacity: 0.92;
}
.gnav a[aria-current='page'] {
  text-decoration: underline;
  opacity: 1;
}
.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--c-sub);
}
.breadcrumb li + li::before {
  content: '›';
  margin: 0 6px;
}

/* page head */
.page-head,
.hero {
  margin-top: 8px;
}
.eyebrow {
  display: inline-block;
  margin: 16px 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-main);
  background: var(--c-accent);
  border-radius: 999px;
  padding: 2px 12px;
}
.lead {
  font-size: 1.02rem;
}

/* buttons */
.btn {
  display: inline-block;
  border: 1px solid var(--c-main);
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: #fff;
  color: var(--c-main);
  line-height: 1.4;
}
.btn-primary {
  background: var(--c-main);
  color: #fff;
}
.btn-primary:hover {
  background: var(--c-main-dark);
  color: #fff;
}
.btn-large {
  padding: 14px 20px;
  font-size: 1.05rem;
  width: 100%;
  text-align: center;
}
@media (min-width: 640px) {
  .btn-large {
    width: auto;
  }
}
.btn-small {
  padding: 8px 12px;
  font-size: 0.85rem;
}
.btn-ghost {
  border-color: var(--c-line);
  color: var(--c-sub);
}

/* boxes */
.summary30,
.notice,
.not-do,
.about-mini {
  border-radius: var(--radius);
  padding: 4px 18px 8px;
  margin: 24px 0;
}
.summary30 {
  background: var(--c-accent);
  border: 1px solid #bcd3f0;
}
.notice {
  background: var(--c-warn-bg);
  border: 1px solid #e9d68a;
}
.not-do,
.about-mini {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
}
.summary30 h2,
.notice h2,
.notice h3,
.not-do h2,
.about-mini h2 {
  margin-top: 0.8em;
  font-size: 1.1rem;
}
.summary30 ul,
.notice ul,
.not-do ul {
  padding-left: 1.2em;
}
.conclusion {
  background: var(--c-bg-soft);
  border-left: 4px solid var(--c-main);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
}
.src {
  font-size: 0.85rem;
  color: var(--c-sub);
}

/* tool form */
.tool {
  border: 2px solid var(--c-main);
  border-radius: var(--radius);
  padding: 4px 16px 16px;
  margin: 28px 0;
  box-shadow: var(--shadow);
}
.tool .notice {
  margin: 20px 0 4px;
}
.tool > h2 {
  margin-top: 0.8em;
}
.tool-form .field {
  margin: 0 0 18px;
  border: 0;
  padding: 0;
}
.tool-form label,
.tool-form legend {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}
.tool-form input[type='date'],
.tool-form select {
  width: 100%;
  max-width: 320px;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: #fff;
  min-height: 44px;
}
.req {
  font-size: 0.72rem;
  background: var(--c-gate);
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 8px;
  vertical-align: 2px;
}
.help {
  font-size: 0.85rem;
  color: var(--c-sub);
  margin: 4px 0 0;
}
#gap-indicator:not(:empty) {
  color: var(--c-main);
  font-weight: 700;
}
.radios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radios label {
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 44px;
  cursor: pointer;
}
.field-optional summary {
  cursor: pointer;
  color: var(--c-main);
  font-weight: 700;
  margin-bottom: 8px;
}
[hidden] {
  display: none !important;
}

/* result */
.result {
  margin-top: 16px;
  border-top: 1px dashed var(--c-line);
  padding-top: 12px;
}
.result-empty {
  color: var(--c-sub);
}
.result-errors,
.gate {
  background: var(--c-gate-bg);
  border: 1px solid #ffc1c0;
  border-radius: 8px;
  padding: 8px 14px;
}
.result-summary {
  background: var(--c-accent);
  border-radius: 8px;
  padding: 8px 14px;
}
.result-summary p {
  margin: 4px 0;
}
.key-deadline strong {
  color: var(--c-gate);
  font-size: 1.1rem;
}
.note {
  border-radius: 8px;
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 0.95rem;
}
.note-warn {
  background: var(--c-warn-bg);
  border: 1px solid #e9d68a;
}
.note-gate {
  background: var(--c-gate-bg);
  border: 1px solid #ffc1c0;
}
.note-info {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.phase {
  border-left: 3px solid var(--c-main);
  padding-left: 12px;
  margin-bottom: 12px;
}
.phase-h {
  margin: 0.6em 0;
  font-size: 1.05rem;
}
.phase-range {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--c-sub);
}
.items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.item {
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.item-core {
  border-color: var(--c-main);
  box-shadow: 0 0 0 1px var(--c-main) inset;
}
.item.is-checked {
  background: var(--c-bg-soft);
}
.item.is-checked .item-title {
  text-decoration: line-through;
  color: var(--c-sub);
}
.item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 8px;
}
.item-head input[type='checkbox'] {
  width: 22px;
  height: 22px;
  margin: 3px 0 0;
  flex: none;
}
.item-title {
  font-weight: 700;
  flex: 1 1 200px;
  cursor: pointer;
}
span.item-title {
  cursor: default;
}
.status-tag {
  font-size: 0.75rem;
  border-radius: 4px;
  padding: 1px 8px;
  background: var(--c-accent);
  color: var(--c-main);
  white-space: nowrap;
}
.status-not-required .status-tag {
  background: var(--c-ok-bg);
  color: var(--c-ok);
}
.status-gate .status-tag,
.status-check .status-tag {
  background: var(--c-warn-bg);
  color: var(--c-warn);
}
.status-conditional .status-tag {
  background: var(--c-bg-soft);
  color: var(--c-sub);
}
.item-date {
  margin: 6px 0 2px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.date-kind {
  display: inline-block;
  font-size: 0.75rem;
  border-radius: 4px;
  padding: 0 6px;
  margin-right: 6px;
  background: var(--c-main);
  color: #fff;
  vertical-align: 1px;
}
.date-deadline {
  background: var(--c-gate);
}
.date-reference {
  background: var(--c-sub);
}
.date-note {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--c-sub);
}
.item-where {
  margin: 2px 0;
  font-size: 0.9rem;
}
.item-where span {
  color: var(--c-sub);
}
.item-lines {
  margin: 6px 0;
  padding-left: 1.2em;
  font-size: 0.92rem;
}
.item-hint {
  font-size: 0.88rem;
  background: var(--c-bg-soft);
  padding: 6px 10px;
  border-radius: 6px;
}
.item-links {
  margin: 6px 0 0;
  padding-left: 1.2em;
  font-size: 0.82rem;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
}
/* D-03：見出し直後のシェア導線。主ボタン（X）はスマホで全幅 */
.result-actions-share {
  margin: 10px 0 4px;
}
.btn-share-x {
  flex: 1 1 100%;
  text-align: center;
}
@media (min-width: 640px) {
  .btn-share-x {
    flex: 0 0 auto;
  }
}
/* D-06：入力エラーを入力欄に紐付けて表示 */
.tool-form [aria-invalid='true'] {
  border-color: var(--c-gate);
  box-shadow: 0 0 0 1px var(--c-gate) inset;
  background: #fffafa;
}
.field-error {
  margin: 4px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-gate);
}
.field-error::before {
  content: '！ ';
}
.result-errors a {
  color: var(--c-gate);
}
.action-status:empty {
  display: none;
}

/* steps */
.step {
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 8px;
}
.step-no {
  display: inline-block;
  font-size: 0.75rem;
  background: var(--c-main);
  color: #fff;
  border-radius: 4px;
  padding: 1px 8px;
  margin-right: 8px;
  vertical-align: 2px;
}

/* tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.9rem;
}
.deadline-table {
  min-width: 900px;
}
th,
td {
  border: 1px solid var(--c-line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
thead th {
  background: var(--c-accent);
  white-space: nowrap;
}
tbody th {
  background: var(--c-bg-soft);
}
.tag {
  font-size: 0.75rem;
  border-radius: 4px;
  padding: 1px 6px;
}
.tag-warn {
  background: var(--c-warn-bg);
  color: var(--c-warn);
}

/* flow figure */
.flow {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  counter-reset: flow;
}
.flow-step {
  position: relative;
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 10px 12px 10px 48px;
  margin-bottom: 28px;
  display: grid;
  gap: 2px;
  counter-increment: flow;
}
.flow-step::before {
  content: counter(flow);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-main);
  color: #fff;
  text-align: center;
  line-height: 26px;
  font-weight: 700;
}
.flow-step:not(:last-child)::after {
  content: '↓';
  position: absolute;
  left: 50%;
  bottom: -26px;
  color: var(--c-main);
  font-weight: 700;
}
.flow-actor {
  font-weight: 700;
  color: var(--c-main);
}
.flow-when {
  font-size: 0.85rem;
  color: var(--c-gate);
  font-weight: 700;
}
.flow-core {
  border: 2px solid var(--c-main);
  background: var(--c-accent);
}

/* lists */
.fail-list dt {
  font-weight: 700;
  margin-top: 12px;
}
.fail-list dd {
  margin: 4px 0 0 1em;
}
.info-list dt {
  font-weight: 700;
  margin-top: 10px;
}
.info-list dd {
  margin: 2px 0 0 1em;
}
.faq-item {
  border: 1px solid var(--c-line);
  border-radius: 8px;
  margin: 0 0 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.faq-item summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
}
.faq-item .q {
  color: var(--c-main);
  margin-right: 6px;
}
.faq-a {
  padding: 0 12px 4px;
  border-top: 1px dashed var(--c-line);
}
.card-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
@media (min-width: 640px) {
  .card-list {
    grid-template-columns: 1fr 1fr;
  }
  .card-list .card-main {
    grid-column: 1 / -1;
  }
}
.card a {
  display: block;
  height: 100%;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--c-text);
  background: #fff;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.card a:hover {
  border-color: var(--c-main);
  box-shadow: var(--shadow-hover);
}
.card strong {
  display: block;
  color: var(--c-main);
}
.card span {
  font-size: 0.88rem;
  color: var(--c-sub);
}
.update-list {
  list-style: none;
  padding: 0;
}
.update-list li {
  display: grid;
  gap: 0 12px;
  border-bottom: 1px solid var(--c-line);
  padding: 6px 0;
}
@media (min-width: 640px) {
  .update-list li {
    grid-template-columns: 9em 1fr;
  }
}
.update-list time {
  color: var(--c-sub);
  font-size: 0.9rem;
}
.toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}
.empty-state {
  background: var(--c-bg-soft);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

/* sources / feedback / cta */
.sources {
  margin-top: 32px;
}
.source-list {
  font-size: 0.88rem;
  padding-left: 1.2em;
}
.meta-line {
  font-size: 0.88rem;
  color: var(--c-sub);
}
.disclaimer-list {
  font-size: 0.88rem;
  padding-left: 1.2em;
}
.feedback {
  margin-top: 32px;
}
.cta-final {
  margin: 36px 0;
  border-radius: var(--radius);
  background: var(--c-main);
  color: #fff;
  padding: 16px 18px;
}
.cta-title {
  font-weight: 700;
  font-size: 1.1rem;
}
.cta-final .btn-primary {
  background: #fff;
  color: var(--c-main);
  border-color: #fff;
}
.site-footer {
  margin-top: 40px;
  background: var(--c-bg-soft);
  border-top: 1px solid var(--c-line);
  padding: 16px 0 24px;
}
.footer-h {
  font-weight: 700;
  margin-bottom: 0;
}
.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.85rem;
}
@media print {
  .site-header,
  .site-footer,
  .cta-final,
  .result-actions,
  .tool-form {
    display: none;
  }
}

/* ===== 退職後キャッシュフロー・シミュレーター ===== */
.tool-form input[type='text'],
.tool-form input[type='number'] {
  width: 100%;
  max-width: 200px;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: #fff;
  min-height: 44px;
}
.input-unit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.input-unit > span {
  color: var(--c-sub);
  white-space: nowrap;
}
.field-optional .field {
  margin-top: 14px;
}
.example {
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 4px 18px 12px;
  margin: 24px 0;
}
.example h2 {
  margin-top: 0.8em;
  font-size: 1.1rem;
}
/* D-07：試算例カード（結果画面の見出しカードを流用） */
.example-h {
  font-weight: 700;
}
p.example-h {
  margin: 14px 0 6px;
  font-size: 0.95rem;
}
.example-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--c-main);
  border-radius: 4px;
  padding: 0 8px;
  margin-right: 8px;
  vertical-align: 2px;
}
.example-cond {
  margin: 6px 0;
}
.example-cta {
  margin: 8px 0 4px;
}
.example-list {
  padding-left: 1.2em;
}
.cf-h {
  font-size: 1.05rem;
  margin: 1.4em 0 0.5em;
  padding-left: 8px;
  border-left: 4px solid var(--c-main);
}
/* D-04：1行目＝①が全幅、2行目＝②③の2列（モバイル・デスクトップ共通） */
.cf-headline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 8px;
}
.cf-headline > .hl-runway {
  grid-column: 1 / -1;
}
.hl-card {
  background: var(--c-accent);
  border: 1px solid #bcd3f0;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.hl-card p {
  margin: 0;
}
.hl-card.is-short {
  background: var(--c-gate-bg);
  border-color: #ffc1c0;
}
.hl-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-sub);
}
.hl-num {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-main-dark);
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
  word-break: keep-all;
}
.hl-card .hl-num {
  margin: 2px 0 4px;
}
@media (min-width: 640px) {
  .hl-num {
    font-size: 2.1rem;
  }
}
/* スマホの2列カード（②③）は金額が欄内に収まるよう幅に合わせて縮める（上限は 1.8rem） */
@media (max-width: 639px) {
  .cf-headline > .hl-card:not(.hl-runway) .hl-num {
    font-size: clamp(1.1rem, 5.6vw, 1.8rem);
    overflow-wrap: anywhere; /* 7桁以上の金額でも欄からはみ出さない（収まる場合は折り返さない） */
  }
  .hl-num .hl-paren {
    font-size: 0.55em;
  }
  .tool {
    padding-left: 12px;
    padding-right: 12px;
  }
  .hl-card {
    padding: 10px;
  }
  .example {
    padding-left: 12px;
    padding-right: 12px;
  }
}
.hl-unit {
  font-size: 0.62em;
  margin-right: 0.1em;
}
.hl-card.is-short .hl-num {
  color: var(--c-gate);
}
.hl-paren {
  display: inline-block;
  font-size: 0.8em;
  white-space: nowrap;
}
.hl-sub {
  font-size: 0.85rem;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0 6px;
  vertical-align: 1px;
  white-space: nowrap;
  background: var(--c-bg-soft);
  color: var(--c-sub);
  border: 1px solid var(--c-line);
}
.badge-yours,
.badge-input {
  background: var(--c-ok-bg);
  color: var(--c-ok);
  border-color: #aceebb;
}
.badge-estimate,
.badge-default {
  background: var(--c-warn-bg);
  color: var(--c-warn);
  border-color: #e9d68a;
}
.badge-fixed {
  background: var(--c-accent);
  color: var(--c-main);
  border-color: #bcd3f0;
}
.cf-assumptions {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 2px 12px 6px;
  margin: 10px 0;
}
.cf-assumptions .cf-h {
  margin-top: 0.8em;
}
.assume-list {
  margin: 0;
}
.assume {
  border-bottom: 1px dashed var(--c-line);
  padding: 6px 0;
}
.assume dt {
  font-weight: 700;
  font-size: 0.9rem;
}
.assume dd {
  margin: 0;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.cf-table-wrap {
  margin: 8px 0;
}
.cf-table {
  min-width: 0;
  font-size: 0.85rem;
}
.cf-table td,
.cf-table th {
  padding: 6px 8px;
}
.cf-table td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cf-table tbody th {
  white-space: nowrap;
}
.m-ym {
  display: block;
  font-weight: 700;
}
.m-idx,
.m-note {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--c-sub);
}
.mini {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.68rem;
  border-radius: 3px;
  padding: 0 4px;
  vertical-align: 1px;
}
.mini-estimate {
  background: var(--c-warn-bg);
  color: var(--c-warn);
}
.mini-lump {
  background: var(--c-gate-bg);
  color: var(--c-gate);
}
.cf-table .c-tax {
  background: #fff4e5;
  font-weight: 700;
}
.cf-table .c-neg {
  color: var(--c-gate);
}
.cf-table .c-balance {
  font-weight: 700;
}
.cf-table tr.is-short th {
  background: var(--c-gate-bg);
}
.runout-tag {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--c-gate);
  color: #fff;
  border-radius: 4px;
  padding: 0 6px;
}
.cf-table tr.is-runout {
  outline: 2px solid var(--c-gate);
  outline-offset: -2px;
}
.ev-row td {
  text-align: left;
  white-space: normal;
  background: #fbfcfe;
  padding-top: 4px;
  padding-bottom: 4px;
}
.cf-events {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ev {
  font-size: 0.8rem;
  margin: 2px 0;
}
.ev time {
  font-weight: 700;
}
.ev-note {
  color: var(--c-sub);
}
.ev-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 0 5px;
  margin-right: 6px;
  background: var(--c-main);
  color: #fff;
  vertical-align: 1px;
}
.ev-deadline .ev-tag {
  background: var(--c-gate);
}
.ev-tax .ev-tag {
  background: var(--c-warn);
}
.ev-benefit .ev-tag {
  background: var(--c-ok);
}
.ev-target .ev-tag,
.ev-milestone .ev-tag {
  background: var(--c-sub);
}
.sc-table td {
  white-space: normal;
  font-variant-numeric: tabular-nums;
}
.sc-table tr.is-base th,
.sc-table tr.is-base td {
  background: var(--c-accent);
}
.sc-reason {
  border-left: 3px solid var(--c-line);
  padding-left: 10px;
  margin: 10px 0;
  font-size: 0.92rem;
}
.sc-reason ul {
  padding-left: 1.2em;
  margin: 4px 0;
}
.sc-reason p {
  margin: 4px 0;
}
.cf-cross {
  border: 2px solid var(--c-main);
  border-radius: 8px;
  padding: 4px 12px 8px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.sum-line {
  font-weight: 700;
}
.cross-link {
  background: var(--c-bg-soft);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.92rem;
}
/* スマホ：月次表を1か月＝1枚のカードにして横はみ出しをなくす */
@media (max-width: 639px) {
  .cf-table thead {
    display: none;
  }
  .cf-table,
  .cf-table tbody,
  .cf-table tr,
  .cf-table th,
  .cf-table td {
    display: block;
    width: 100%;
  }
  .cf-table {
    border: 0;
  }
  .cf-table tr.m-row,
  .sc-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    margin-top: 10px;
    overflow: hidden;
  }
  .sc-table tr {
    grid-template-columns: 1fr;
  }
  .cf-table tr.m-row:has(+ tr.ev-row) {
    border-radius: 8px 8px 0 0;
  }
  .cf-table tr.m-row > th,
  .sc-table tr > th {
    grid-column: 1 / -1;
    border: 0;
    border-bottom: 1px solid var(--c-line);
  }
  .cf-table tr.m-row > td,
  .sc-table tr > td {
    border: 0;
    border-bottom: 1px dotted var(--c-line);
    display: flex;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
    white-space: normal;
  }
  .cf-table td[data-label]::before {
    content: attr(data-label);
    color: var(--c-sub);
    font-size: 0.75rem;
    text-align: left;
  }
  .cf-table .m-note {
    width: 100%;
    text-align: right;
  }
  .cf-table tr.ev-row {
    border: 1px solid var(--c-line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
  }
  .cf-table tr.ev-row td {
    border: 0;
  }
  .cf-table tr.is-runout {
    outline: 0;
    border: 2px solid var(--c-gate);
  }
}
