/* 介護のお給料ものさし：共通スタイル
   コンセプト：結果を「給与明細」の形で見せる。目立たせるのは明細と合計額だけで、ほかは静かに */
:root {
  --paper: #f2f6f4;   /* 背景：明細用紙の淡いグリーン */
  --sheet: #ffffff;   /* 明細・カードの紙 */
  --ink: #1e2b28;     /* 文字 */
  --sub: #55655f;     /* 補足の文字 */
  --green: #2f6f5e;   /* アクセント（ボタン・見出しの線） */
  --rule: #c9dcd5;    /* 罫線 */
  --marker: #ffe58a;  /* 合計額のマーカー */
  --minus: #a2462f;   /* マイナス差額 */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.8;
}
a { color: var(--green); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

/* ヘッダー・フッター */
.site-header, main, .site-footer { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.site-header { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; padding-top: 18px; padding-bottom: 6px; }
.logo { font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; margin-right: auto; }
.site-header nav { display: flex; gap: 16px; font-size: 15px; }
.pr { max-width: 680px; margin: 0 auto; padding: 0 16px; font-size: 13px; color: var(--sub); }
.site-footer { margin-top: 64px; padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--sub); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }

/* 見出しと本文 */
h1 { font-size: 28px; line-height: 1.4; margin: 28px 0 8px; }
h2 { font-size: 22px; line-height: 1.5; margin: 44px 0 12px; padding-left: 12px; border-left: 4px solid var(--green); }
h3 { font-size: 18px; margin: 28px 0 8px; }
.lead { color: var(--sub); margin: 0 0 24px; }
.note { font-size: 14px; color: var(--sub); }
table.plain { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
table.plain th, table.plain td { border-bottom: 1px solid var(--rule); padding: 8px 6px; text-align: left; }
table.plain td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 入力フォーム */
.calc { display: grid; gap: 14px; }
.calc label { display: grid; gap: 4px; font-weight: 700; font-size: 15px; }
.calc select, .calc input[type="text"] {
  font: inherit; font-weight: 400; width: 100%;
  padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink);
}
.calc .check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.calc .check input { width: 20px; height: 20px; accent-color: var(--green); }

/* 結果：給与明細 */
.slip {
  margin: 28px 0 8px; background: var(--sheet); border: 1px solid var(--rule); border-top: 6px solid var(--green);
  padding: 18px 18px 14px; font-variant-numeric: tabular-nums;
}
.slip-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--sub); border-bottom: 1px dashed var(--rule); padding-bottom: 8px; }
.slip table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 15px; }
.slip th { text-align: left; font-weight: 400; padding: 6px 0; }
.slip td { text-align: right; padding: 6px 0; white-space: nowrap; }
.slip tr + tr th, .slip tr + tr td { border-top: 1px solid var(--rule); }
.slip .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 4px; }
.slip .total b { font-size: 40px; line-height: 1.2; background: linear-gradient(transparent 62%, var(--marker) 62%); }
.slip .sub-total { display: flex; justify-content: space-between; font-size: 14px; color: var(--sub); }
.advice { margin: 16px 0 0; }
.advice p { margin: 6px 0; }

/* 次の一歩への誘導 */
.next { margin: 28px 0; padding: 16px 18px; background: var(--sheet); border-left: 4px solid var(--green); }
.next a { font-weight: 700; }

/* 広告ボタン（記事内の [[cta:…]]） */
.cta { margin: 16px 0 24px; }
.cta a {
  display: block; text-align: center; padding: 14px 16px; border-radius: 8px;
  background: var(--green); color: #fff; font-weight: 700; text-decoration: none;
}
.cta a:hover { filter: brightness(1.1); }
.cta img { display: block; width: 1px; height: 1px; }

/* 記事一覧 */
.posts { list-style: none; padding: 0; margin: 0; }
.posts li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.posts a { font-weight: 700; text-decoration: none; }
.posts p { margin: 4px 0 0; font-size: 15px; color: var(--sub); }

/* 記事内の表：スマホでは横スクロール（ページ全体がはみ出さないように） */
article table {
  display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-collapse: collapse; font-size: 15px; margin: 16px 0;
}
article th, article td { border-bottom: 1px solid var(--rule); padding: 8px 6px; text-align: left; vertical-align: top; min-width: 5em; }
article thead th { border-bottom: 2px solid var(--rule); white-space: nowrap; }

/* パンくずリスト */
.breadcrumb { margin: 20px 0 0; font-size: 13px; color: var(--sub); }
.breadcrumb a { color: var(--sub); }
.breadcrumb span[aria-hidden] { margin: 0 6px; }

/* 関連記事 */
.related { margin-top: 44px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media (max-width: 480px) { h1 { font-size: 24px; } .slip .total b { font-size: 34px; } }

/* 介護福祉士 一問一答（/quiz/） */
.quiz { margin: 20px 0 8px; background: var(--sheet); border: 1px solid var(--rule); border-top: 6px solid var(--green); padding: 16px 16px 12px; }
.quiz h2 { margin-top: 24px; font-size: 18px; }
.quiz-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; border-bottom: 1px dashed var(--rule); padding-bottom: 10px; }
.quiz-total b { font-size: 34px; line-height: 1.2; background: linear-gradient(transparent 62%, var(--marker) 62%); font-variant-numeric: tabular-nums; }
.quiz-total .note { flex-basis: 100%; margin: 0; }
.quiz-modes { display: grid; gap: 10px; margin: 16px 0 4px; }
.quiz button { font: inherit; cursor: pointer; touch-action: manipulation; }
.btn-main, .btn-sub {
  display: block; width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 8px; font-weight: 700;
}
.btn-main { background: var(--green); color: #fff; border: 2px solid var(--green); }
.btn-sub { background: var(--sheet); color: var(--green); border: 2px solid var(--green); }
.btn-main:hover, .btn-sub:hover { filter: brightness(1.08); }
.btn-sub:disabled { color: var(--sub); border-color: var(--rule); cursor: default; filter: none; }
.link-btn { background: none; border: 0; padding: 4px 2px; color: var(--green); text-decoration: underline; font-size: 14px; min-height: 44px; }
.quiz-subjects { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.quiz-subjects button {
  width: 100%; min-height: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 12px;
  text-align: left; padding: 10px 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; font-weight: 700;
}
.quiz-subjects button:hover { border-color: var(--green); }
.quiz-subjects .meta { font-weight: 400; font-size: 14px; color: var(--sub); font-variant-numeric: tabular-nums; }
.quiz-bar { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--sub); border-bottom: 1px dashed var(--rule); padding-bottom: 8px; }
.quiz-q { font-size: 18px; font-weight: 700; margin: 14px 0; }
.quiz-choices { display: grid; gap: 10px; }
.quiz-choices.tf { grid-template-columns: 1fr 1fr; }
.quiz-choices button {
  min-height: 56px; padding: 12px 14px; text-align: left; line-height: 1.6;
  background: var(--sheet); color: var(--ink); border: 2px solid var(--rule); border-radius: 8px;
}
.quiz-choices.tf button { text-align: center; font-size: 30px; font-weight: 700; min-height: 72px; }
.quiz-choices button:not(:disabled):hover { border-color: var(--green); }
.quiz-choices button:disabled { cursor: default; }
.quiz-choices button.is-right { border-color: var(--green); background: #e3f1ec; }
.quiz-choices button.is-right::before { content: "正解 "; font-size: 13px; font-weight: 700; color: var(--green); }
.quiz-choices.tf button.is-right::before { content: ""; }
.quiz-choices button.is-wrong { border-color: var(--minus); background: #f8e9e5; }
.quiz-feedback { margin-top: 16px; padding-top: 12px; border-top: 2px solid var(--ink); }
.quiz-verdict { font-weight: 700; font-size: 18px; margin: 0 0 6px; }
.quiz-verdict.ok { color: var(--green); }
.quiz-verdict.ng { color: var(--minus); }
.quiz-feedback .btn-main { margin-top: 8px; }
.next-title { margin: 0 0 8px; font-size: 18px; padding-left: 0; border-left: 0; }
.quiz-link { margin-top: 16px; font-size: 15px; }
.quiz-link a { font-weight: 700; }
.quiz-sources summary { cursor: pointer; color: var(--green); font-weight: 700; }
.quiz-sources li { font-size: 14px; margin: 4px 0; }

/* hidden 属性を確実に効かせる（.calc label の display 指定に負けないように） */
[hidden] { display: none !important; }

/* 求人の年収比較（/hikaku/）：いまの職場と求人を左右（スマホは上下）に並べる */
.pair { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.pair fieldset { margin: 0; padding: 14px 14px 16px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); display: grid; gap: 12px; min-width: 0; }
.pair legend { font-weight: 700; padding: 0 6px; }
.pair .unit { display: grid; grid-template-columns: 6.5em 1fr; gap: 6px; }
@media (max-width: 600px) { .pair { grid-template-columns: 1fr; } }
.slip table.cmp th, .slip table.cmp td { padding: 6px 0 6px 6px; }
.slip table.cmp thead th { font-size: 13px; color: var(--sub); text-align: right; }
.slip table.cmp thead th:first-child { text-align: left; }
.slip table.cmp tfoot th, .slip table.cmp tfoot td { font-weight: 700; border-top: 2px solid var(--ink); }
.minus { color: var(--minus); }

/* 図（static/img/ のSVG） */
figure { margin: 20px 0 24px; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); }
figcaption { margin-top: 6px; font-size: 14px; color: var(--sub); }

/* 手取り計算（/tedori/）。ナビが6項目になったので折り返す */
.site-header nav { flex-wrap: wrap; gap: 4px 16px; }
.site-header nav a { white-space: nowrap; }
.calc .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .calc .row2 { grid-template-columns: 1fr; } }
.calc details { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 14px; background: var(--sheet); }
.calc details summary { cursor: pointer; font-weight: 700; }
.calc details[open] { display: grid; gap: 12px; }
.wide { overflow-x: auto; }

/* 受験資格の計算（/jukenshikaku/）：日数の進み具合 */
.meter { height: 8px; background: var(--rule); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--green); }
.calc input[type="date"] {
  font: inherit; font-weight: 400; width: 100%; box-sizing: border-box;
  padding: 9px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); color: var(--ink);
}
.calc fieldset { margin: 0; padding: 14px 14px 16px; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); display: grid; gap: 12px; min-width: 0; }
.calc fieldset legend { font-weight: 700; padding: 0 6px; }
.slip.jk th { width: 45%; padding-right: 8px; }
.slip.jk td { white-space: normal; }
.slip.jk .total { flex-wrap: wrap; gap: 4px 12px; }
.slip.jk .total b { font-size: 22px; }

/* 合格点の推移と自己採点（/goukakuten/） */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll table.plain { min-width: 520px; }
table.judge td.ok { color: var(--green); font-weight: 700; }
table.judge td.ng { color: var(--minus); font-weight: 700; }
.calc label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.calc label.check input { width: auto; margin: 0; }
.slip table.judge { margin: 8px 0 12px; }
.slip table.judge th, .slip table.judge td { white-space: nowrap; padding: 6px 4px; width: auto; text-align: right; font-size: 14px; }
.slip table.judge th:first-child, .slip table.judge td:first-child { text-align: left; }
.scroll table.plain th:first-child, .scroll table.plain td:first-child { white-space: nowrap; }

/* ===== 2026-10 デザイン見直し（枠・見出し・ナビ）=====
   ねらい：仕事帰りにスマホで開いても、どこを押せば計算できるかがすぐ分かること。
   ・ヘッダーは白い帯にして、ロゴの「印」で看板を作る
   ・ナビは折り返さない横スクロールのタブ。今いるページに下線
   ・見出しだけ丸みのある字体（本文は読みやすさ優先の BIZ UDPゴシックのまま） */
.site-header {
  position: relative; background: var(--sheet);
  box-shadow: 0 0 0 100vmax var(--sheet); clip-path: inset(0 -100vmax);
  border-bottom: 1px solid var(--rule);
  display: grid; gap: 6px; padding-top: 14px; padding-bottom: 0;
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 19px; letter-spacing: .02em; }
.logo .mark { width: auto; height: 28px; flex: none; }
.site-header nav.tabs {
  display: flex; flex-wrap: nowrap; gap: 2px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 0 12px; font-size: 15px;
}
.site-header nav.tabs::-webkit-scrollbar { display: none; }
.site-header nav.tabs a {
  flex: none; white-space: nowrap; text-decoration: none; color: var(--sub);
  padding: 10px 10px 9px; border-bottom: 3px solid transparent;
}
.site-header nav.tabs a:hover { color: var(--ink); }
.site-header nav.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--green); }
.pr { margin-top: 10px; font-size: 12px; }

h1, h2, h3, .next-title { font-family: var(--head); letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: 30px; line-height: 1.35; font-weight: 700; margin-top: 22px; }
h2 { border-left: 0; padding-left: 0; padding-top: 12px; border-top: 2px solid var(--ink); font-size: 22px; }
.lead { font-size: 16px; }
.slip .total b, .quiz-total b { font-family: var(--head); }
.cta a, .btn-main { border-radius: 10px; font-family: var(--head); letter-spacing: .02em; }
.posts a { font-family: var(--head); }
@media (max-width: 480px) { h1 { font-size: 25px; } }

:root { --head: "Zen Maru Gothic", "BIZ UDPGothic", "Hiragino Maru Gothic ProN", sans-serif; --paper: #f3f6f1; --rule: #cfddd5; }
.site-header nav.tabs { padding-right: 32px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
