@charset "UTF-8";
/*
 * 生命保険料控除 かんたんシミュレーション
 * 自社HP（テーマ homes）の style.css の後に読み込む。
 * - サイト側で html { font-size: 62.5% } のため、rem は使わず px で指定する
 * - 既存スタイルとぶつからないよう、クラス名はすべて hk- で始める
 */

/* ---------- 変数（自社HPの配色に合わせる） ---------- */
.hk-sim {
  --hk-primary: #09409e;
  --hk-primary-dark: #062f75;
  --hk-primary-weak: #eef4f7;
  --hk-accent: #a84f00;
  --hk-accent-weak: #fff4e8;
  --hk-text: #0d181e;
  --hk-muted: #56636d;
  --hk-border: #dce0e4;
  --hk-surface: #fff;
  --hk-ink: #0050d8;      /* 記入例でお客さまが書く文字 */
  --hk-ink-bg: #fff8d6;   /* 記入する欄の背景 */
  --hk-hint: #6b7680;
  --hk-radius: 10px;
  --hk-font: "Heebo", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;

  display: block;
  padding-bottom: 64px;
  color: var(--hk-text);
  font-family: var(--hk-font);
  font-size: 16px;
  line-height: 1.7;
}
.hk-sim *,
.hk-sim *::before,
.hk-sim *::after {
  box-sizing: border-box;
}
.hk-sim h2,
.hk-sim h3,
.hk-sim h4,
.hk-sim p,
.hk-sim ul,
.hk-sim ol,
.hk-sim dl,
.hk-sim dd,
.hk-sim figure {
  margin: 0;
}
.hk-sim a {
  color: var(--hk-primary);
  text-decoration: underline;
}
.hk-sim small {
  font-size: 13px;
  font-weight: 400;
}
/* サイト側の ol > li の自動番号（"1. "）と余白を打ち消す */
.hk-sim ol > li {
  margin-bottom: 0;
}
.hk-sim ol > li::before {
  content: none;
}

.hk-vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 見出し ---------- */
.hk-hero {
  margin-bottom: 24px;
}
.hk-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--hk-primary-weak);
  color: var(--hk-primary);
  font-size: 13px;
  font-weight: 700;
}
.hk-lead {
  margin-top: 12px;
}
.hk-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 14px;
}
.hk-badges li::before {
  content: "✓ ";
  color: var(--hk-primary);
  font-weight: 700;
}

/* ---------- レイアウト ---------- */
.hk-layout {
  display: grid;
  gap: 24px;
}
@media (min-width: 980px) {
  .hk-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }
  /* スクロール時に出るサイトの固定ヘッダー（高さ74px）の下に収める */
  .hk-result {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 106px);
    overflow-y: auto;
  }
}
.hk-form {
  display: grid;
  gap: 16px;
}

/* ---------- 入力ステップ ---------- */
.hk-step,
.hk-result-card,
.hk-section {
  padding: 20px;
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius);
  background: var(--hk-surface);
}
.hk-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.hk-step-num {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hk-primary);
  color: #fff;
  font-size: 14px;
}
.hk-step-desc {
  margin: 6px 0 14px;
  color: var(--hk-muted);
  font-size: 14px;
}

.hk-rows {
  display: grid;
  gap: 10px;
}
.hk-row {
  padding: 12px;
  border: 1px solid var(--hk-border);
  border-radius: 8px;
  background: #f8fafb;
}
.hk-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 8px;
}
.hk-row-title {
  color: var(--hk-muted);
  font-size: 13px;
  font-weight: 700;
}
.hk-row-remove {
  padding: 2px 8px;
  border: 0;
  background: none;
  color: var(--hk-muted);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.hk-row-remove:hover {
  color: var(--hk-text);
}
.hk-row-body {
  display: grid;
  gap: 10px;
}
@media (min-width: 600px) {
  .hk-row-body {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
  }
  .hk-row-body .hk-field-company {
    grid-column: 1 / -1;
  }
}

/* 新制度/旧制度などの切り替えボタン */
.hk-seg {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hk-primary);
  border-radius: 8px;
  overflow: hidden;
}
.hk-row-body .hk-seg {
  justify-self: start;
}
.hk-seg label {
  position: relative;
  cursor: pointer;
}
.hk-seg label + label {
  border-left: 1px solid var(--hk-primary);
}
.hk-seg input {
  position: absolute;
  opacity: 0;
}
.hk-seg span {
  display: block;
  min-width: 84px;
  padding: 10px 14px;
  background: #fff;
  color: var(--hk-primary);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.hk-seg input:checked + span {
  background: var(--hk-primary);
  color: #fff;
}
.hk-seg input:focus-visible + span {
  outline: 3px solid var(--hk-accent);
  outline-offset: -3px;
}
.hk-seg-wide span {
  min-width: 120px;
}

.hk-field {
  display: grid;
  gap: 4px;
}
.hk-field-label {
  color: var(--hk-muted);
  font-size: 13px;
}
.hk-amount-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hk-sim .hk-amount,
.hk-sim .hk-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #9aa8b6;
  border-radius: 8px;
  background-color: #fff;
  color: var(--hk-text);
  font: inherit;
  font-size: 18px; /* 16px以上にしてiPhoneの自動拡大を防ぐ */
}
.hk-sim .hk-amount {
  max-width: 260px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.hk-sim .hk-select {
  /* サイト側で select の見た目がリセットされているため矢印を描く */
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2356636d' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-size: 16px;
  cursor: pointer;
}
.hk-sim .hk-company {
  max-width: 360px;
}
.hk-sim .hk-amount:focus,
.hk-sim .hk-select:focus {
  border-color: var(--hk-primary);
  outline: 3px solid rgba(9, 64, 158, 0.25);
}
.hk-yen {
  font-weight: 700;
}

.hk-add {
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px dashed var(--hk-primary);
  border-radius: 8px;
  background: #fff;
  color: var(--hk-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.hk-add:hover {
  background: var(--hk-primary-weak);
}
.hk-add:disabled {
  border-color: var(--hk-border);
  color: var(--hk-muted);
  cursor: not-allowed;
}

.hk-subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hk-border);
  font-size: 15px;
}
.hk-subtotal strong {
  color: var(--hk-primary);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.hk-limit {
  margin-top: 6px;
  color: var(--hk-accent);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
.hk-callout {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--hk-accent);
  background: var(--hk-accent-weak);
  font-size: 14px;
}
.hk-note {
  margin-top: 8px;
  color: var(--hk-muted);
  font-size: 13px;
}

/* ---------- 結果 ---------- */
.hk-result-card {
  border-top: 4px solid var(--hk-primary);
}
.hk-result-title {
  font-size: 18px;
  font-weight: 700;
}
.hk-total-label {
  margin-top: 12px;
  color: var(--hk-muted);
  font-size: 14px;
}
.hk-total {
  color: var(--hk-primary);
  font-family: "Heebo", var(--hk-font);
  font-size: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.hk-unit {
  margin-left: 4px;
  font-size: 18px;
}
.hk-breakdown {
  margin-top: 16px;
  border-top: 1px solid var(--hk-border);
}
.hk-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hk-border);
  font-size: 15px;
}
.hk-breakdown dd {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.hk-mark-inline {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  border: 1px solid var(--hk-muted);
  border-radius: 50%;
  font-size: 12px;
  vertical-align: 1px;
}

.hk-saving {
  margin-top: 20px;
  padding: 14px;
  border-radius: 8px;
  background: var(--hk-primary-weak);
}
.hk-saving-title {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
}
.hk-saving .hk-field-label {
  display: block;
  margin-bottom: 4px;
}
.hk-saving-list {
  margin-top: 10px;
}
.hk-saving-list div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}
.hk-saving-total {
  margin-top: 4px;
  border-top: 1px solid var(--hk-border);
  font-weight: 700;
}
.hk-saving-total dd {
  color: var(--hk-primary);
  font-size: 20px;
}

.hk-actions {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}
.hk-sim .hk-btn {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--hk-primary);
  border-radius: 8px;
  background: var(--hk-primary);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.hk-sim .hk-btn:hover {
  background: var(--hk-primary-dark);
}
.hk-sim .hk-btn-outline {
  background: #fff;
  color: var(--hk-primary);
}
.hk-sim .hk-btn-outline:hover {
  background: var(--hk-primary-weak);
}
.hk-sim .hk-btn-small {
  padding: 8px 14px;
  font-size: 14px;
}
.hk-btn-text {
  padding: 6px;
  border: 0;
  background: none;
  color: var(--hk-muted);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.hk-sim button:focus-visible,
.hk-sim a:focus-visible,
.hk-sim summary:focus-visible {
  outline: 3px solid var(--hk-accent);
  outline-offset: 2px;
}

/* ---------- 共通セクション ---------- */
.hk-section {
  margin-top: 24px;
}
.hk-section-title {
  margin-bottom: 12px;
  color: var(--hk-primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}
.hk-table {
  width: 100%;
  margin-top: 8px;
  background: #fff;
  font-size: 13px;
}
.hk-table th,
.hk-table td {
  padding: 6px;
  border-bottom: 1px solid var(--hk-border);
  text-align: left;
}
.hk-table thead th {
  color: var(--hk-muted);
  font-weight: 400;
}

/* ---------- 申告書の記入例 ---------- */
.hk-ink-sample {
  color: var(--hk-ink);
  font-weight: 700;
}
.hk-hint-sample {
  color: var(--hk-hint);
}
/* PC・印刷では申告書と同じレイアウト、スマホでは縦に並べた記入例を出す */
.hk-sheet-desktop {
  display: none;
}
@media (min-width: 980px) {
  .hk-sheet-desktop {
    display: block;
  }
  .hk-sheet-mobile {
    display: none;
  }
}
.hk-sheet-fit {
  overflow-x: auto; /* zoom 非対応ブラウザ向けの保険 */
}
.hk-sheet-paper {
  width: max-content;
  padding: 14px 18px 12px;
  border: 1px solid var(--hk-border);
  background: #fff;
  color: #111;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.hk-sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hk-sheet-stamp {
  flex: none;
  white-space: nowrap;
  padding: 2px 12px;
  border: 2px solid #c8102e;
  border-radius: 4px;
  color: #c8102e;
  font-size: 15px;
  letter-spacing: 0.2em;
}

/* 列幅の合計 1,014px＋外枠。罫線は各セルの右・下の border で描く
   （印刷時に縮小しても線が消えないよう、grid の隙間は使わない） */
.hk-sheet {
  display: grid;
  grid-template-columns: 34px 30px 129px 46px 66px 35px 59px 145px 203px 59px 59px 87px 62px;
  grid-auto-rows: minmax(34px, auto);
  width: max-content;
  border: 2px solid #222;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  font-size: 11px;
  line-height: 1.35;
}
.hk-c {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 3px 5px;
  border-right: 1px solid #444;
  border-bottom: 1px solid #444;
  background: #fff;
}
.hk-c.is-right {
  border-right: 0;
}
.hk-c.is-bottom {
  border-bottom: 0;
}
.hk-c-head {
  justify-content: center;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-align: center;
}
.hk-c-head small {
  display: block;
  font-size: 9px;
  letter-spacing: 0;
}
.hk-c-vert {
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 13px;
  letter-spacing: 0.25em;
}
.hk-c-vert-strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.6em;
}
.hk-c-label {
  font-size: 10.5px;
}
.hk-c-label small {
  display: block;
  font-size: 8.5px;
}
.hk-c-center {
  justify-content: center;
  text-align: center;
}
.hk-c-gray {
  background: #d4d4d4;
}
.hk-c-hint {
  color: var(--hk-hint);
  font-size: 10px;
}
.hk-c.is-filled {
  background: var(--hk-ink-bg);
}
.hk-c.is-needed {
  box-shadow: inset 0 0 0 2px var(--hk-accent);
}

/* 金額欄（記号・最高額・金額・円） */
.hk-c-money {
  display: block;
  min-height: 40px;
}
.hk-c-letter,
.hk-c-mark {
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  font-size: 16px;
}
.hk-c-max {
  position: absolute;
  top: 1px;
  right: 6px;
  font-size: 9px;
}
.hk-c-val {
  position: absolute;
  right: 6px;
  bottom: 2px;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.hk-c-yen {
  font-size: 10px;
}
.hk-ink {
  color: var(--hk-ink);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hk-ink-text {
  color: var(--hk-ink);
  font-size: 12px;
  font-weight: 700;
}

/* 新・旧、無・有 を○で囲む */
.hk-circ {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
}
.hk-circ.is-on {
  border: 2px solid var(--hk-ink);
  border-radius: 50%;
  color: var(--hk-ink);
  font-weight: 700;
}
.hk-c-a {
  font-size: 10px;
}
.hk-kana {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #111;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
}
.hk-c-star {
  justify-content: center;
  padding: 2px;
  font-size: 8.5px;
  line-height: 1.25;
  text-align: center;
}
.hk-c-payday {
  position: absolute;
  right: 6px;
  bottom: 1px;
  font-size: 8.5px;
}

.hk-c-head-xs {
  font-size: 9px;
  letter-spacing: 0;
}
.hk-c-row {
  min-height: 40px; /* 契約の行は書き込みやすいよう少し高く（申告書と同じ） */
}
/* 「無」「有」から計算式Ⅰ・Ⅱの行へ向かう矢印 */
.hk-c.hk-c-arrow {
  justify-content: flex-start;
  padding-left: 2px;
}
.hk-c-arrow::after {
  position: absolute;
  top: 50%;
  right: 2px;
  border: 5px solid transparent;
  border-right: 0;
  border-left: 6px solid #222;
  transform: translateY(-50%);
  content: "";
}
/* イ・ロ・ハは申告書と同じく太枠 */
.hk-c-key {
  box-shadow: inset 0 0 0 2px #222;
}
/* ☆欄 */
.hk-c-stack {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
}
.hk-c-cap {
  font-size: 9.5px;
  line-height: 1.3;
  text-align: center;
}
.hk-c-spaced {
  letter-spacing: 0.5em;
}
.hk-c-furi {
  flex: 1;
  min-height: 14px;
  border-bottom: 1px dotted #777;
}
.hk-c-date {
  margin-top: auto;
  font-size: 10px;
  text-align: right;
}
.hk-mynum {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  height: 16px;
  border-bottom: 1px solid #777;
}
.hk-mynum i + i {
  border-left: 1px solid #999;
}
.hk-c-total {
  min-height: 80px;
}
.hk-c-total-label {
  position: absolute;
  top: 6px;
  right: 0;
  left: 0;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}
.hk-c-total .hk-kana {
  width: 16px;
  height: 16px;
  font-size: 9px;
}

.hk-badge {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--hk-accent);
  color: #fff;
  font-family: "Heebo", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.hk-formula {
  width: 1018px;
  margin-top: 8px;
  border: 2px solid #222;
  border-collapse: collapse;
  font-size: 10.5px;
}
.hk-formula th,
.hk-formula td {
  padding: 2px 6px;
  border: 1px solid #444;
  text-align: left;
}
.hk-formula thead th {
  background: #f2f2f2;
  font-weight: 500;
  text-align: center;
}
.hk-formula-note {
  margin-top: 4px;
  font-size: 10.5px;
}

/* 記入例の上：申告書全体の中の位置・色の見方・書き方の手順 */
.hk-guide-top {
  display: grid;
  gap: 16px;
  margin: 16px 0 20px;
}
@media (min-width: 760px) {
  .hk-guide-top {
    grid-template-columns: 320px minmax(0, 1fr);
    align-items: start;
  }
}
.hk-minimap svg {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
}
.hk-minimap figcaption {
  margin-top: 6px;
  color: var(--hk-muted);
  font-size: 13px;
}
.hk-keys {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 14px;
}
.hk-keys li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.hk-key {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #444;
  background: #fff;
}
.hk-key-fill {
  background: var(--hk-ink-bg);
}
.hk-key-hint {
  justify-content: flex-start;
  color: var(--hk-hint);
  font-size: 11px;
}
.hk-legend {
  display: grid;
  gap: 10px;
  font-size: 15px;
}
/* 番号と文章を2列に分け、文章は1つのかたまりとして折り返す */
.hk-legend li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.hk-legend .hk-badge {
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  font-size: 13px;
}

/* スマホ：入力欄の上のページ内ボタン・入力に戻るリンク */
.hk-quicknav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.hk-backlink {
  display: block;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.hk-sim [id] {
  scroll-margin-top: 70px; /* スマホのサイト固定ヘッダーの下に出す */
}
@media (min-width: 980px) {
  .hk-quicknav,
  .hk-backlink {
    display: none;
  }
  .hk-sim [id] {
    scroll-margin-top: 90px;
  }
}
.hk-sim [tabindex="-1"]:focus {
  outline: none;
}

/* ---------- 記入例（スマホ用） ---------- */
.hk-sheet-mobile .hk-sheet-heading {
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0;
}
.hk-msheet {
  display: grid;
  gap: 14px;
  color: #111;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
.hk-mblock {
  border: 2px solid #222;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.hk-mblock-title {
  padding: 6px 10px;
  border-bottom: 1px solid #444;
  background: #eef0f2;
  font-size: 15px;
  font-weight: 700;
}
.hk-mcontracts {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.hk-mcontracts th,
.hk-mcontracts td {
  padding: 6px;
  border-bottom: 1px solid #444;
  text-align: left;
  vertical-align: middle;
}
.hk-mcontracts th + th,
.hk-mcontracts td + td {
  border-left: 1px solid #444;
}
.hk-mcontracts th {
  font-size: 11px;
  font-weight: 500;
}
.hk-mcontracts .is-filled {
  background: var(--hk-ink-bg);
}
.hk-mcenter {
  text-align: center !important;
  white-space: nowrap;
}
.hk-mnum {
  text-align: right !important;
  white-space: nowrap;
}
.hk-mnote {
  padding: 6px 10px;
  color: var(--hk-muted);
  font-size: 12px;
}
.hk-mnote.is-needed {
  color: var(--hk-text);
  box-shadow: inset 4px 0 0 var(--hk-accent);
  background: var(--hk-accent-weak);
}
.hk-mlines {
  border-top: 1px solid #444;
}
.hk-mline {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 112px;
  min-height: 46px;
  border-bottom: 1px solid #bbb;
}
.hk-mline:last-child {
  border-bottom: 0;
}
.hk-mline > span {
  display: flex;
  align-items: center;
  padding: 4px 6px;
}
.hk-mline-mark {
  justify-content: center;
  gap: 2px;
  border-right: 1px solid #bbb;
  font-size: 16px;
  white-space: nowrap;
}
.hk-mline-mark .hk-badge {
  width: 16px;
  height: 16px;
  margin: 0;
  font-size: 10px;
}
.hk-mline-label {
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center;
  font-size: 12px;
  line-height: 1.4;
}
.hk-mline-label small {
  font-size: 10px;
}
.hk-mline-val {
  justify-content: flex-end;
  gap: 3px;
  border-left: 1px solid #bbb;
  white-space: nowrap;
}
.hk-mline-val.is-filled {
  background: var(--hk-ink-bg);
}
.hk-mline-val .hk-circ {
  font-size: 13px;
  line-height: 1;
}
.hk-mline.is-key .hk-mline-val {
  box-shadow: inset 0 0 0 2px #222;
}
.hk-blank {
  color: #9aa3ab;
  font-size: 11px;
}
.hk-mblock-total .hk-mline-label {
  font-size: 13px;
  font-weight: 700;
}
.hk-mformulas {
  margin-top: 14px;
  font-size: 14px;
}
.hk-mformulas summary {
  color: var(--hk-primary);
  font-weight: 700;
  cursor: pointer;
}
.hk-mtable {
  width: 100%;
  margin-top: 10px;
  border: 2px solid #222;
  border-collapse: collapse;
  font-size: 12px;
}
.hk-mtable caption {
  padding: 4px 0;
  font-weight: 700;
  text-align: left;
}
.hk-mtable th,
.hk-mtable td {
  padding: 4px 6px;
  border: 1px solid #444;
  text-align: left;
}
.hk-mtable thead th {
  background: #f2f2f2;
  font-weight: 500;
}

/* 開閉式のヘルプ・FAQ */
.hk-help {
  margin-top: 12px;
  font-size: 14px;
}
.hk-help summary,
.hk-faq-item summary {
  color: var(--hk-primary);
  font-weight: 700;
  cursor: pointer;
}
.hk-help p {
  margin-top: 6px;
}
.hk-faq-item {
  border-bottom: 1px solid var(--hk-border);
}
.hk-faq-item summary {
  padding: 14px 0;
}
.hk-faq-body {
  display: grid;
  gap: 8px;
  padding-bottom: 16px;
  font-size: 15px;
}
.hk-figure img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
}
.hk-figure figcaption {
  margin-top: 4px;
  color: var(--hk-muted);
  font-size: 13px;
}

/* 控除証明書の再発行・ご注意 */
.hk-link-list,
.hk-disclaimer ul {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-left: 1.4em;
  list-style: disc;
}
.hk-disclaimer ul {
  font-size: 14px;
}
.hk-updated {
  margin-top: 12px;
  color: var(--hk-muted);
  font-size: 13px;
}

/* ---------- スマホ用の合計バー ---------- */
.hk-mobilebar {
  position: fixed;
  right: 0;
  bottom: 0; /* サイトのスマホ用固定ボタンがある場合は app.js で上にずらす */
  left: 0;
  z-index: 90; /* サイトのスマホメニュー（120）と背景の影（100）より下 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--hk-border);
  background: #fff;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hk-mobilebar.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.hk-mobilebar-total {
  display: grid;
  line-height: 1.3;
}
.hk-mobilebar-total span {
  color: var(--hk-muted);
  font-size: 12px;
}
.hk-mobilebar-total strong {
  color: var(--hk-primary);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.hk-mobilebar-actions {
  display: flex;
  gap: 6px;
}
@media (min-width: 980px) {
  .hk-mobilebar {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hk-mobilebar {
    transition: none;
  }
}

/* ---------- 印刷（記入例を A4 縦1枚に縮小して収める） ---------- */
@page {
  size: A4 portrait;
  margin: 10mm;
}
@media print {
  .l-header,
  .l-shadow,
  .l-globalnavi-sp,
  .l-title,
  .l-contact,
  .l-footer-pagetop,
  .l-footer,
  .l-contact-sp,
  .hk-hero,
  .hk-layout,
  .hk-faq,
  .hk-reissue,
  .hk-disclaimer,
  .hk-mobilebar,
  .hk-quicknav,
  .hk-backlink,
  .hk-minimap,
  .hk-sheet-mobile {
    display: none !important;
  }
  /* スマホから印刷しても申告書と同じレイアウトで出す */
  .hk-sheet-desktop {
    display: block !important;
  }
  .hk-sheet-paper {
    zoom: 1 !important;
  }
  .hk-guide-top {
    display: block;
    margin: 8px 0;
  }
  .c-t-spacer-s {
    margin-top: 0 !important;
  }
  .u-c-width-e {
    width: 100% !important;
  }
  .hk-sim {
    padding: 0;
  }
  .hk-section {
    margin: 0;
    padding: 0;
    border: 0;
  }
  /* 幅1040pxの記入例を A4 縦の印刷幅（約718px）に収める */
  .hk-sim #hk-sheet-section {
    zoom: 0.68;
  }
  .hk-sheet-fit {
    overflow: visible;
  }
  .hk-sheet-paper {
    border: 0;
    padding: 0;
  }
  .hk-keys,
  .hk-legend {
    font-size: 13px;
    break-inside: avoid;
  }
}
