/*
 * 2026年9月14日改訂：JIS X 8341-3:2016（達成等級AA）を目標に、
 * カラーユニバーサルデザイン推奨配色セット（CUDO/DIC ver.4）から4色のみを使用。
 * 書体はBIZ UDPGothic（UDフォント）。文字は#212121、背景は#FFFFFFを基本とする。
 *
 * 色の意味（この4色以外は使わない。文字色にはCUDカラーは基本使わず、
 * 判定は必ず色以外の文字・記号もあわせて行う）：
 *   青 #005AFF … 進む・保存する・押せるボタン
 *   赤 #FF4B00 … 注意・満枠・危険な操作
 *   緑 #03AF7A … 終わった・完了
 *   黄 #FFF100 … 目立たせたい背景（文字色には使わない）
 *
 * 実測コントラスト比（WCAG相対輝度式で計算。sakura-報告.mdに詳細記載）：
 *   本文 #212121 on #FFFFFF          … 16.1:1
 *   白文字 on 青 #005AFF             … 5.38:1
 *   #212121文字 on 赤 #FF4B00        … 4.80:1
 *   #212121文字 on 緑 #03AF7A        … 5.69:1
 *   #212121文字 on 黄 #FFF100        … 13.67:1
 */
:root {
  --blue: #005AFF;
  --red: #FF4B00;
  --green: #03AF7A;
  --yellow: #FFF100;
  --text: #212121;
  --bg: #FFFFFF;
  --page-bg: #FFFFFF;
  --line: #767676;       /* 罫線・枠線（装飾のみ。文字には使わない） */
  --muted: #212121;      /* 「薄いグレー」は全廃。補足文もすべて本文と同じ濃さにする */
  --error: var(--red);
  --error-bg: #FFFFFF;
  --success: var(--green);
  --danger: var(--red);
  --danger-bg: #FFFFFF;
  --warn-bg: var(--yellow);
  --warn-border: var(--text);
}

* { box-sizing: border-box; }

/* 文字の大きさ：本人が画面上部のボタンで3段階から選ぶ（標準18px／大きく22px／もっと大きく26px） */
html, html.fs-1 { font-size: 18px; }
html.fs-2 { font-size: 22px; }
html.fs-3 { font-size: 26px; }

body {
  font-family: "BIZ UDPGothic", "BIZ UDPゴシック", "Meiryo", "Yu Gothic", "Noto Sans JP", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 400;
}

b, strong, th, label { font-weight: 700; }
small { font-size: 1rem; } /* ブラウザ既定の縮小を打ち消す。小さい文字を作らない */

/* フォーカス（キーボード操作中の現在地）を必ずはっきり見せる */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

a { color: var(--blue); }
a:visited { color: var(--blue); }

.table-scroll { overflow-x: auto; margin-bottom: 12px; }

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 100px;
}

header.site {
  background: #fff;
  border-bottom: 4px solid var(--text);
  padding: 24px 20px;
  text-align: center;
}

header.site h1, header.site .site-title {
  font-size: 1.35rem;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}

h2.section-title {
  font-size: 1.5rem;
  color: var(--text);
  border-left: 8px solid var(--blue);
  padding-left: 14px;
  margin: 40px 0 20px;
  line-height: 1.4;
}

h3 { font-size: 1.2rem; color: var(--text); }

.card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 28px;
}

table.slots {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

table.slots th, table.slots td {
  border: 1px solid var(--line);
  padding: 16px 14px;
  font-size: 1rem;
  text-align: left;
  vertical-align: middle;
}

table.slots th {
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  border-bottom: 3px solid var(--text);
}

.badge-full {
  display: inline-block;
  background: var(--red);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  border: 2px solid var(--text);
}

.badge-remaining {
  color: var(--text);
  font-weight: 700;
}

/* ===== ボタン ===== */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: 2px solid var(--blue);
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  line-height: 1.3;
  text-align: center;
}

.btn:hover, .btn:focus { background: #0041BF; border-color: #0041BF; }

.btn-sub {
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-sub:hover, .btn-sub:focus { background: #eaf1ff; }

/* 取消・削除・復元・受付ON/OFFなど、間違えると困る操作専用（赤＝注意・危険） */
.btn-danger {
  background: var(--red);
  color: var(--text);
  border: 2px solid var(--text);
}
.btn-danger:hover, .btn-danger:focus { background: #FF8A5C; text-decoration: underline; }

/* 完了・終わった、を表す場面用（緑） */
.btn-done {
  background: var(--green);
  color: var(--text);
  border: 2px solid var(--text);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 32px;
}

/* 危険な操作は、他の操作から離して置くための余白 */
.danger-zone {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 3px solid var(--red);
}

/* ===== フォーム ===== */
form .field {
  margin-bottom: 24px;
}

form label {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

form label .required {
  color: var(--text);
  background: var(--yellow);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  border: 1px solid var(--text);
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="password"],
form input[type="file"],
form textarea,
form select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--text);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

form input:focus, form textarea:focus, form select:focus {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}

form textarea { resize: vertical; min-height: 96px; }

.counter {
  text-align: right;
  font-size: 0.95rem;
  color: var(--text);
  margin-top: 6px;
}

.counter.over { color: var(--text); background: var(--yellow); font-weight: 700; text-decoration: underline; display: inline-block; padding: 0 8px; }

.radio-group label {
  display: inline-flex;
  align-items: center;
  font-weight: 400;
  margin-right: 28px;
  font-size: 1.05rem;
}
.radio-group input[type="radio"] {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}
form input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: middle;
}

.error-box {
  background: #fff;
  border: 3px solid var(--red);
  color: var(--text);
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 1.05rem;
  font-weight: 700;
}
.error-box::before { content: "⚠ "; }

.field-error {
  color: var(--text);
  background: var(--yellow);
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--text);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 6px;
}

.notice-box {
  background: var(--yellow);
  border: 2px solid var(--text);
  color: var(--text);
  padding: 20px 24px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.confirm-table { width: 100%; border-collapse: collapse; }
.confirm-table th, .confirm-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 1rem;
}
.confirm-table th { width: 34%; color: var(--text); font-weight: 700; }

footer.site {
  text-align: center;
  font-size: 1rem;
  color: var(--text);
  padding: 48px 20px;
  line-height: 1.9;
  border-top: 2px solid var(--line);
}
.a11y-statement {
  font-size: 0.95rem;
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--text);
}

.complete-box {
  text-align: center;
  padding: 48px 20px;
}
.complete-box .app-no {
  font-size: 2.2rem;
  color: var(--text);
  font-weight: 700;
  margin: 20px 0;
  letter-spacing: 0.03em;
  background: var(--green);
  display: inline-block;
  padding: 8px 24px;
  border-radius: 8px;
  border: 2px solid var(--text);
}

/* ===== 申込フォーム：1問ずつウィザード ===== */
.wizard-progress {
  margin-bottom: 28px;
}
.wizard-progress-text {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.wizard-progress-bar {
  height: 16px;
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 8px;
  overflow: hidden;
}
.wizard-progress-bar-fill {
  height: 100%;
  background: var(--blue);
}
.wizard-question {
  font-size: 1.35rem;
  line-height: 1.5;
  margin: 0 0 20px;
}
.wizard-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}
.btn-wide {
  display: block;
  width: 100%;
  min-height: 64px;
  font-size: 1.25rem;
  padding: 16px 20px;
}
.btn-small {
  min-height: 48px;
  padding: 10px 18px;
  font-size: 1rem;
  margin-top: 10px;
}
/* 広告サイズの画像（2026年11月5日） */
.ad-size-wrap { margin: 0 0 12px; }
.ad-size-img { display: block; width: 100%; max-width: 900px; height: auto; border: 2px solid #212121; }

.optional {
  font-size: 0.95rem;
  font-weight: 400;
  margin-left: 8px;
}
.field-hint {
  margin: 0 0 8px;
  font-size: 1rem;
}
.confirm-amount {
  font-size: 1.6rem;
  font-weight: 700;
}
fieldset.choice-list {
  border: 0;
  padding: 0;
  margin: 0;
}
.choice-list label.choice {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid var(--text);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
  min-height: 60px;
  font-weight: 400;
  font-size: 1.1rem;
  cursor: pointer;
}
.choice-list label.choice input[type="radio"] {
  width: 28px;
  height: 28px;
  flex: none;
  margin: 0;
}
.choice-list label.choice:has(input:checked) {
  background: var(--yellow);
  border-width: 4px;
  padding: 12px 14px;
}
.choice-list label.choice:has(input:disabled) {
  cursor: not-allowed;
}
.choice-list label.choice:has(input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* キーボード操作の人が、繰り返しの見出し部分を飛ばして本文へ移れるようにする */
.skip-link {
  position: absolute;
  left: 8px;
  top: -80px;
  background: var(--yellow);
  color: var(--text);
  border: 3px solid var(--text);
  padding: 12px 18px;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus { top: 8px; }



/* ===== 2026年9月24日 追加：全画面共通の部品 ===== */

/* 数字（金額・件数）は本文より大きく太く */
.amount-strong { font-size: 1.5rem; font-weight: 700; }
.table-amount { font-size: 1.2rem; font-weight: 700; }
.card > h3:first-child, .card > h2:first-child { margin-top: 0; }
.text-center { text-align: center; }
.no-js-hidden { display: none; }

/* 文字の大きさ・印刷の道具 */
.tools-bar {
  border-bottom: 2px solid var(--line);
  background: #fff;
}
.tools-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.fontsize-switch { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tools-label { font-weight: 700; margin-right: 4px; }
.fontsize-btn, .print-btn {
  min-height: 48px;
  min-width: 48px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  background: #fff;
  border: 2px solid var(--text);
  border-radius: 8px;
  cursor: pointer;
}
.fontsize-btn[aria-pressed="true"] {
  background: var(--yellow);
  border-width: 4px;
  padding: 6px 14px;
}
.fontsize-btn[aria-pressed="true"]::before { content: "✓ "; }
.fontsize-btn:hover, .print-btn:hover { text-decoration: underline; }

/* 困ったときは（右下に固定） */
body { padding-bottom: 104px; }
.help-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
}
.help-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px 20px;
  background: var(--yellow);
  color: var(--text);
  border: 3px solid var(--text);
  border-radius: 28px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--text);
}
.help-fab:visited { color: var(--text); }
.help-fab:hover { text-decoration: underline; }
.help-fab span[aria-hidden] {
  display: inline-flex;
  width: 1.5em;
  height: 1.5em;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: #fff;
  border-radius: 50%;
}
.help-panel {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 95;
  background: #fff;
  border-top: 6px solid var(--text);
  box-shadow: 0 -4px 0 rgba(33, 33, 33, 0.25);
}
.help-panel:target, .help-panel.is-open { display: block; }
.help-panel-inner { max-width: 820px; margin: 0 auto; padding: 20px 20px 28px; }
.help-panel h2 { font-size: 1.4rem; margin: 0 0 12px; }
.help-contacts { font-size: 1.15rem; font-weight: 700; padding-left: 1.4em; }
.help-contacts li { margin-bottom: 6px; }

/* 状態の7段の帯 */
.stage-band { margin: 0 0 28px; }
.stage-band-summary { font-size: 1.1rem; margin: 0 0 12px; }
.stage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5em, 1fr));
  gap: 8px;
}
.stage {
  border: 2px solid var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 5.2em;
}
.stage-no { font-size: 0.95rem; font-weight: 700; }
.stage-name { font-weight: 700; line-height: 1.4; }
.stage-state { font-size: 0.95rem; }
.stage-done { background: var(--green); }
.stage-current { background: var(--yellow); border-width: 4px; padding: 6px 8px; }
.stage-current .stage-state { font-weight: 700; }
.stage-todo { border-style: dashed; }
.stage-canceled {
  border: 3px solid var(--text);
  background: var(--red);
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 0 0 28px;
}

/* ボタンとリンクの区別：ボタンは塗り＋枠、リンクは下線付きの文字 */
a:not(.btn):not(.help-fab):not(.skip-link) { text-decoration: underline; text-underline-offset: 3px; }
.btn, .btn:visited { color: #fff; }
.btn-sub, .btn-sub:visited { color: var(--blue); }
.btn-danger, .btn-danger:visited, .btn-done, .btn-done:visited { color: var(--text); }
button.btn { font-family: inherit; }

@media (max-width: 480px) {
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .tools-bar-inner { padding: 8px 16px; }
  .help-dock { right: 8px; bottom: 8px; }
}

/* 印刷：画面の道具や固定ボタンは紙に出さない */
@media print {
  .no-print, .skip-link, .help-dock, .help-panel, .admin-nav, .tools-bar { display: none !important; }
  body { padding-bottom: 0; }
  html, html.fs-1, html.fs-2, html.fs-3 { font-size: 12pt; }
  .wrap { max-width: none; padding: 0; }
  .card { border: 1px solid #000; break-inside: avoid; }
  a { color: #000; }
  .stage-done, .stage-current, .stage-canceled { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.preparing-box { text-align: center; padding: 48px 20px; font-size: 1.3rem; }
.mypage-note { margin-top: 32px; }
.flow-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.flow-list li { border: 2px solid var(--text); border-radius: 8px; padding: 6px 12px; font-weight: 700; }
.flow-list .stage-no { display: inline-flex; width: 1.6em; height: 1.6em; align-items: center; justify-content: center; background: var(--text); color: #fff; border-radius: 50%; margin-right: 4px; }
