/*
 * Gカンパニー 日計転記 画面
 * 方針(AIデザイン品質向上 技法2・3): Apple Human Interface Guidelines のグループ化リスト風。
 *   絵文字・装飾アイコン・グラデーション・アニメーションは使わない。フォントは Noto Sans JP を明示。
 * 色: メイン(紺)・サブ(灰)・アクセント(緑=本番で登録した)の3色 + 状態色(エラー赤・要確認黄)
 *   + テストモード専用のオレンジ(本番の色と混ぜない。テストの結果は必ずオレンジで出す)
 */
:root {
  --c-main: #1d3557;
  --c-main-press: #142640;
  --c-sub: #5b6573;
  --c-accent: #1b7f4c;
  --c-accent-bg: #e6f4ec;
  --c-bg: #f2f3f5;
  --c-surface: #ffffff;
  --c-line: #d5d9df;
  --c-text: #1a1d21;
  --c-err: #b42318;
  --c-err-bg: #fdecea;
  --c-warn-text: #6b4100;
  --c-warn-bg: #fff4cc;
  --c-warn-line: #d9a300;
  --c-test: #b54708;
  --c-test-press: #8f3806;
  --c-test-bg: #fff1e6;
  --c-test-line: #f0a868;
  --c-focus: #2563eb;
  --radius: 12px;
  --gap: 16px;
  --tap: 52px;
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}
body.mode-test { background: #fbf3ec; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num, input.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 見出しの帯(上に固定) ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--c-main);
  color: #fff;
}
body.mode-test .app-header { background: var(--c-test); }
.app-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.app-header h1 { font-size: 20px; margin: 0; font-weight: 700; white-space: nowrap; }
.app-header__company { flex: 1 1 auto; font-size: 15px; opacity: .85; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-chip {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  color: var(--c-main);
  border-radius: 6px;
  padding: 2px 10px;
  white-space: nowrap;
}
body.mode-test .mode-chip { color: var(--c-test); }

/* テストモードの帯(オレンジ。いつも見える) */
.mode-band { background: var(--c-test-bg); color: var(--c-text); border-bottom: 3px solid var(--c-test); }
.mode-band__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.mode-band__text { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.45; }
.mode-band__text strong { color: var(--c-test); font-size: 16px; margin-right: 6px; }
.mode-band__short { display: none; }
@media (max-width: 640px) { .mode-band__short { display: inline; } }
.mode-band__btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 6px 12px;
  border: 2px solid var(--c-test);
  border-radius: 10px;
  background: #fff;
  color: var(--c-test);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* タブ */
.tabs { background: var(--c-surface); border-bottom: 1px solid var(--c-line); color: var(--c-text); }
.tabs__inner { max-width: 1100px; margin: 0 auto; display: flex; padding: 0 8px; min-width: 0; }
.tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--c-sub);
  cursor: pointer;
  padding: 6px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab[aria-current="page"] { color: var(--c-main); border-bottom-color: var(--c-main); }
body.mode-test .tab[aria-current="page"] { color: var(--c-test); border-bottom-color: var(--c-test); }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--gap) var(--gap) 120px;
}

.card {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: var(--gap);
  border: 1px solid var(--c-line);
}
.card h2 { font-size: 19px; margin: 0 0 10px; }
.lead { margin: 0 0 14px; color: var(--c-sub); }
.step-no {
  display: inline-block;
  min-width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 14px;
  background: var(--c-main);
  color: #fff;
  font-size: 15px;
  margin-right: 8px;
  vertical-align: 2px;
}
body.mode-test .step-no { background: var(--c-test); }

/* ---------- ボタン ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--c-main);
  background: var(--c-surface);
  color: var(--c-main);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn + .btn { margin-top: 12px; }
.btn--primary { background: var(--c-main); color: #fff; }
.btn--primary:active { background: var(--c-main-press); }
body.mode-test .btn--primary { background: var(--c-test); border-color: var(--c-test); }
body.mode-test .btn--primary:active { background: var(--c-test-press); }
.btn--big { min-height: 68px; font-size: 21px; }
.btn--small { width: auto; min-height: 44px; font-size: 16px; padding: 6px 14px; }
.btn--plain { border-color: transparent; background: transparent; text-decoration: underline; font-weight: 400; }
.btn--danger { border-color: var(--c-err); color: var(--c-err); }
.btn--test-outline { border-color: var(--c-test); color: var(--c-test); }
.btn:disabled, body.mode-test .btn:disabled, body.mode-test .btn--primary:disabled { background: #c9ced6; border-color: #c9ced6; color: #4a515c; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; margin-top: 12px; }
.btn-row .btn { margin-top: 0; min-width: 0; }
.btn-row--wrap { flex-wrap: wrap; }
.btn-row--wrap .btn { flex: 1 1 220px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, label.btn:focus-within, .seg input:focus-visible + span {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.dropzone {
  margin-top: 12px;
  padding: 18px;
  border: 2px dashed var(--c-line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--c-sub);
}
.dropzone.is-over { border-color: var(--c-main); color: var(--c-main); background: #eef2f8; }

/* ---------- 入力 ---------- */
.field { margin: 14px 0 0; min-width: 0; border: 0; padding: 0; }
.field > label, .field__label, fieldset.field > legend {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
  padding: 0;
}
.field__hint { display: block; font-size: 14px; color: var(--c-sub); font-weight: 400; }
.field input[type="text"], .field input[type="date"], .field input[type="month"], .field input[type="number"], .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
  font-size: 18px;
}
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.radio input, .check input { width: 22px; height: 22px; flex: 0 0 auto; }
.mode-switch {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--c-line);
}
.mode-switch p { margin: 0 0 8px; color: var(--c-sub); font-size: 15px; }

/* 店の切り替え(ボタンの並び) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; flex: 1 1 0; min-width: 64px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 6px 10px;
  border: 2px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.seg input:checked + span { border-color: var(--c-main); background: var(--c-main); color: #fff; }
body.mode-test .seg input:checked + span { border-color: var(--c-test); background: var(--c-test); }

.toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.toolbar .field { flex: 1 1 200px; margin-top: 0; }

/* ---------- 取込の一覧 ---------- */
.queue-summary { font-weight: 700; margin-bottom: 8px; }
.queue { list-style: none; margin: 0; padding: 0; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.queue li + li { border-top: 1px solid var(--c-line); }
.q-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.q-item:disabled { cursor: default; }
.q-item:hover:not(:disabled) { background: #f6f7f9; }
.q-thumb { width: 56px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--c-line); background: #e7e9ed; grid-row: span 2; }
.q-main { min-width: 0; }
.q-title { display: block; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-sub { display: block; font-size: 14px; color: var(--c-sub); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-sub--error { color: var(--c-err); white-space: normal; }
.q-actions { padding: 0 12px 10px; margin-top: 0; }
.q-amount { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; text-align: right; }
.q-badges { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  padding: 1px 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--wait { background: #eceef1; color: var(--c-sub); }
.badge--busy { background: #e3e9f3; color: var(--c-main); }
.badge--review { background: var(--c-warn-bg); color: var(--c-warn-text); border-color: var(--c-warn-line); }
.badge--error { background: var(--c-err-bg); color: var(--c-err); border-color: var(--c-err); }
.badge--ok { background: #eceef1; color: var(--c-text); }
.badge--done { background: var(--c-accent-bg); color: var(--c-accent); border-color: var(--c-accent); }
.badge--test { background: var(--c-test-bg); color: var(--c-test); border-color: var(--c-test); }

/* ---------- 全画面の確認(position:fixed; inset:0) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--c-bg);
}
body.mode-test .overlay { background: #fbf3ec; }
.review { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.review__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--c-main);
  color: #fff;
  min-width: 0;
}
body.mode-test .review__bar { background: var(--c-test); }
.review__title { flex: 1 1 auto; margin: 0; font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review__nav { display: flex; gap: 6px; flex: 0 0 auto; }
.bar-btn {
  min-height: 44px;
  padding: 4px 12px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.bar-btn:disabled { opacity: .45; cursor: default; }
.review__test-note { flex: 0 0 auto; background: var(--c-test-bg); color: var(--c-test); font-weight: 700; padding: 4px 12px; border-bottom: 2px solid var(--c-test); font-size: 14px; }
.review__body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
}
.photo-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #2b2f36; }
.photo-tools { display: flex; gap: 6px; padding: 6px; flex: 0 0 auto; flex-wrap: wrap; }
.tool-btn {
  min-height: 40px;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid #8a919c;
  background: #3a3f47;
  color: #fff;
  cursor: pointer;
}
.tool-btn[aria-pressed="true"] { background: #fff; color: var(--c-text); border-color: #fff; font-weight: 700; }
.photo-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; text-align: center; -webkit-overflow-scrolling: touch; }
.photo-scroll img { display: inline-block; max-width: 100%; height: auto; vertical-align: top; }
.photo-scroll.zoom-1 img { max-height: 100%; }
.photo-scroll.zoom-2 img { max-width: none; width: 200%; }
.photo-scroll.zoom-3 img { max-width: none; width: 300%; }
.form-pane { min-height: 0; min-width: 0; overflow-y: auto; background: var(--c-bg); padding: 12px 14px 0; display: flex; flex-direction: column; }
body.mode-test .form-pane { background: #fbf3ec; }

@media (max-width: 820px) {
  .review__body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 38vh minmax(0, 1fr); }
  .review__title { font-size: 15px; }
  .bar-btn { padding: 4px 8px; }
  .photo-tools { padding: 4px 6px; }
  .tool-btn { min-height: 36px; padding: 2px 10px; }
}

/* 確認フォームの中身 */
.sec { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; min-width: 0; }
.sec h3 { font-size: 16px; margin: 0 0 8px; }
.sec h3 small { font-weight: 400; color: var(--c-sub); font-size: 13px; margin-left: 6px; }
.sec--must { border: 2px solid var(--c-warn-line); }
.sec--must h3 { color: var(--c-warn-text); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.grid-2 > * { min-width: 0; }
.vf { display: flex; flex-direction: column; min-width: 0; }
.vf label { font-size: 14px; font-weight: 700; color: var(--c-sub); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf input, .vf select, .vf textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 6px 10px;
  border: 2px solid var(--c-line);
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
}
.vf textarea { min-height: 64px; resize: vertical; font-size: 16px; }
.vf.is-unsure input, .vf.is-unsure textarea, .vf.is-unsure select { border-color: var(--c-warn-line); background: var(--c-warn-bg); }
.vf.is-unsure label::after { content: "(読取に自信なし)"; color: var(--c-warn-text); font-weight: 400; margin-left: 2px; }
.vf.is-changed input, .vf.is-changed textarea, .vf.is-changed select { border-color: var(--c-main); }
.vf.is-changed label::after { content: "(直した)"; color: var(--c-main); font-weight: 400; margin-left: 2px; }
.vf.is-missing input, .vf.is-missing select { border-color: var(--c-err); background: var(--c-err-bg); }
.vf--wide { grid-column: 1 / -1; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; border: 1px solid var(--c-line); background: #fff; font-size: 15px; line-height: 1.5; }
.checks li .lv { display: inline-block; font-weight: 700; margin-right: 6px; font-size: 13px; padding: 0 6px; border-radius: 4px; }
.checks li.lv-review { background: var(--c-warn-bg); border: 2px solid var(--c-warn-line); color: var(--c-warn-text); }
.checks li.lv-review .lv { background: var(--c-warn-line); color: #241600; }
.checks li.lv-error { background: var(--c-err-bg); border: 2px solid var(--c-err); color: var(--c-err); }
.checks li.lv-error .lv { background: var(--c-err); color: #fff; }
.checks li.lv-ok .lv { background: #eceef1; color: var(--c-sub); }
.checks li.lv-fixed { background: #fff; border: 2px solid var(--c-main); }
.checks li.lv-fixed .lv { background: var(--c-main); color: #fff; }
.checks li .was { display: block; font-size: 13px; color: var(--c-sub); margin-top: 2px; }
.ok-list summary { cursor: pointer; color: var(--c-sub); min-height: 40px; display: flex; align-items: center; }
.note-info { font-size: 14px; color: var(--c-sub); margin: 6px 0 0; }

/* モーニング(正の字)の表 */
.morning-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.morning-table th, .morning-table td { border-bottom: 1px solid var(--c-line); padding: 4px 2px; text-align: center; min-width: 0; }
.morning-table th[scope="row"] { text-align: left; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.morning-table thead th { font-size: 13px; color: var(--c-sub); }
.morning-table tfoot th, .morning-table tfoot td { font-weight: 700; border-bottom: 0; font-size: 14px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 2px; min-width: 0; }
.stepper button { width: 34px; height: 40px; border: 1px solid var(--c-line); background: #fff; border-radius: 6px; font-size: 18px; font-weight: 700; cursor: pointer; flex: 0 0 auto; }
.stepper input { width: 44px; min-width: 0; height: 40px; border: 2px solid var(--c-line); border-radius: 6px; text-align: center; font-size: 17px; padding: 0 2px; }
.stepper.is-unsure input { border-color: var(--c-warn-line); background: var(--c-warn-bg); }
.stepper.is-changed input { border-color: var(--c-main); }
.sum-ok { color: var(--c-text); }
.sum-ng { color: var(--c-err); }

/* 送迎(non-no)の行 */
.pk-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 120px) auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.pk-row > * { min-width: 0; }
.pk-del { min-height: 44px; padding: 4px 8px; }
.pk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* 登録ボタンの帯(確認フォームの下に貼り付く) */
.form-foot {
  position: sticky;
  bottom: 0;
  margin: auto -14px 0;
  padding: 10px 14px 12px;
  background: var(--c-surface);
  border-top: 1px solid var(--c-line);
}
.form-foot .check { font-size: 15px; min-height: 40px; }
.form-foot .msg { margin: 0 0 8px; font-size: 15px; }

/* 結果の表示 */
.result { border-radius: var(--radius); padding: 12px; margin-bottom: 12px; border: 2px solid var(--c-line); background: #fff; }
.result h3 { margin: 0 0 6px; font-size: 17px; }
.result--done { border-color: var(--c-accent); background: var(--c-accent-bg); }
.result--done h3 { color: var(--c-accent); }
.result--test { border-color: var(--c-test); background: var(--c-test-bg); }
.result--test h3 { color: var(--c-test); }
.result--error { border-color: var(--c-err); background: var(--c-err-bg); }
.result--error h3 { color: var(--c-err); }
.result--warn { border-color: var(--c-warn-line); background: var(--c-warn-bg); }
.result--warn h3 { color: var(--c-warn-text); }
.result ul { margin: 4px 0 0; padding-left: 20px; }
.result li { margin: 2px 0; font-size: 15px; word-break: break-all; }

.status { min-height: 1.6em; color: var(--c-sub); margin: 10px 0; }
.status--error { color: var(--c-err); font-weight: 700; }

/* ---------- 登録一覧 ---------- */
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.totals div { background: #f6f7f9; border-radius: 8px; padding: 6px 10px; min-width: 0; }
.totals dt { font-size: 13px; color: var(--c-sub); }
.totals dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.missing { background: var(--c-warn-bg); border: 1px solid var(--c-warn-line); color: var(--c-warn-text); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; font-size: 15px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: 10px; }
.list-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.list-table th, .list-table td { padding: 8px 10px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
.list-table th.num, .list-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-table thead th { background: #f6f7f9; font-size: 13px; color: var(--c-sub); white-space: nowrap; }
.list-table td.reason { max-width: 280px; min-width: 0; }
.list-table td.reason span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.list-table td.reg { white-space: nowrap; font-size: 13px; color: var(--c-sub); }
.list-table tfoot td, .list-table tfoot th { font-weight: 700; background: #f6f7f9; }
.list-empty { padding: 16px; color: var(--c-sub); text-align: center; }

/* スマホ幅: 一覧は表ではなくカードに */
@media (max-width: 640px) {
  .app-header__inner { padding: 8px 12px; gap: 8px; }
  .app-header h1 { font-size: 18px; }
  .mode-band__inner { padding: 4px 12px; }
  .mode-band__text { font-size: 13px; }
  .mode-band__long { display: none; }
  .mode-band__btn { min-height: 40px; padding: 4px 10px; }
  .tab { min-height: 44px; font-size: 15px; }
  main { padding: 12px 10px 120px; }
  .card { padding: 16px 12px; }
  .table-wrap { border: 0; overflow: visible; }
  .list-table thead { display: none; }
  .list-table, .list-table tbody, .list-table tfoot, .list-table tr, .list-table td, .list-table th { display: block; width: 100%; }
  .list-table tr { border: 1px solid var(--c-line); border-radius: 10px; margin-bottom: 8px; padding: 6px 10px; background: #fff; }
  .list-table td, .list-table th { border: 0; padding: 2px 0; }
  .list-table td.num { display: flex; justify-content: space-between; gap: 8px; text-align: right; }
  .list-table td.num::before { content: attr(data-label); color: var(--c-sub); font-size: 13px; text-align: left; }
  .list-table td.reason { max-width: none; }
  .list-table td.reason span { max-width: none; }
  .list-table td.reg { white-space: normal; }
}

/* ---------- 財務応援ファイル ---------- */
.export-result { margin-top: 14px; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.preview-table th, .preview-table td { padding: 4px 6px; border-bottom: 1px solid var(--c-line); text-align: left; white-space: nowrap; }
.preview-table td.num { text-align: right; }

/* ---------- ダイアログ ---------- */
.overlay--dialog { z-index: 80; background: rgba(20, 24, 30, .55); display: flex; align-items: center; justify-content: center; padding: 12px; }
body.mode-test .overlay--dialog { background: rgba(20, 24, 30, .55); }
.dialog { background: #fff; border-radius: var(--radius); width: min(640px, 100%); max-height: calc(100% - 24px); overflow: auto; padding: 18px 16px; }
.dialog__title { font-size: 19px; margin: 0 0 10px; }
.dialog__body { font-size: 16px; }
.dialog__body table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0; }
.dialog__body th, .dialog__body td { border-bottom: 1px solid var(--c-line); padding: 4px 6px; text-align: left; }
.dialog__body td.num, .dialog__body th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dialog__body .diff td { background: var(--c-warn-bg); font-weight: 700; }
.dialog__actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.dialog__actions .btn { flex: 1 1 200px; margin-top: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* スマホ・狭い画面: 登録ボタンの帯を貼り付けない(写真と入力欄の場所を空ける)。上から確かめて最後に登録。
   .form-foot の基本の指定より後に置く(前に置くと position:sticky に負ける) */
@media (max-width: 820px) {
  .form-foot { position: static; margin: 12px -14px 0; }
}
