:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1c1f23;
  --muted: #6b727c;
  --line: #d9dde3;
  --accent: #1f5fa9;
  --warn: #b4451f;
  --ok: #1d7a4c;
  --grid: #b9c0ca;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }

h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 24px 0 8px; }

a { color: var(--accent); }

.site-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
}
.site-header .brand { font-weight: 700; color: var(--ink); text-decoration: none; }
/* メニューは折り返して2段にする。1語の途中で縦に割れないよう、各項目は改行させない
   （iPad の幅で「名/簿/出/力」のように1文字ずつ縦に並んでいた） */
.site-header nav { display: flex; flex-wrap: wrap; gap: 6px 16px; flex: 1; min-width: 0; }
.site-header nav a { white-space: nowrap; }
.site-header .brand, .site-header .user { white-space: nowrap; }
.site-header .logout { display: flex; align-items: center; gap: 10px; margin: 0; }
.site-header .user { color: var(--muted); font-size: 13px; }

button, .primary {
  font: inherit;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
}
button.primary, .primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}
button.link {
  border: none;
  background: none;
  color: var(--accent);
  padding: 0;
}
a.link { text-decoration: none; }
button.wide { width: 100%; padding: 14px; font-size: 17px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
label input, label select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 0 0 20px; }
legend { font-size: 13px; color: var(--muted); padding: 0 6px; }
.row { display: flex; gap: 16px; }
.row > label { flex: 1; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.filters input[type="search"] { flex: 1 1 260px; padding: 8px 10px; font: inherit; border: 1px solid var(--line); border-radius: 6px; }
.filters select { padding: 8px 10px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.filters .inline-check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; flex: none; }

/* 見出し付きの入力欄とボタンを横に並べる。ボタンは入力欄の下端と高さに揃える
   （中央揃えだと、上の見出しのぶんボタンだけ浮いて見える） */
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin-bottom: 0; }
/* 入力欄（文字13px・上下9px）と同じ高さになるよう、文字15pxのボタンは上下を詰める */
.inline-form button { padding-top: 6px; padding-bottom: 6px; line-height: normal; }
.inline-form .preview-note { flex-basis: 100%; margin: 0; }

/* 面接フォームの身分証: 撮る面ごとの欄と、撮った写真の小さな確認 */
.id-slot { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 10px 0; background: #fff; }
.id-slot label { margin-bottom: 0; color: var(--ink); font-size: 15px; font-weight: 700; }
.id-slot .muted { margin: 8px 0 0; }
.id-thumb { display: block; max-width: 100%; max-height: 160px; margin-top: 10px; border-radius: 6px; border: 1px solid var(--line); }
.id-thumb[hidden] { display: none; }

/* アカウント: 立場ごとにできることの説明と、1回だけ出すパスワード */
.role-hints { margin: 4px 0 10px; padding-left: 1.2em; line-height: 1.7; }
.password-once { font-family: ui-monospace, Consolas, monospace; font-size: 20px; letter-spacing: .08em; }

/* 面接フォームのプレビュー中だけ出す帯。面接の人の画面と見分けがつくよう、上に貼り付ける */
.preview-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
  padding: 10px 16px;
  background: #fff4d6; border-bottom: 2px solid #e0b44c; color: #5a4100;
  font-size: 13px;
}
.preview-bar strong { font-size: 14px; }
.preview-bar a { color: #5a4100; font-weight: 700; }

table.list { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
table.list th { background: #eef1f5; font-size: 13px; color: var(--muted); }
table.list tr.is-left td { color: var(--muted); }
table.list td.empty { text-align: center; color: var(--muted); padding: 32px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #eceff3; font-size: 12px; color: var(--muted); }
.badge.warn { background: #fbe9e2; color: var(--warn); }
.badge.ok { background: #e3f2ea; color: var(--ok); }

.muted { color: var(--muted); font-size: 13px; }
.summary { margin: 4px 0 12px; }
.breadcrumb { margin: 0 0 4px; font-size: 13px; }
.error { color: var(--warn); font-size: 13px; }
.notice { background: #fff8e6; border: 1px solid #efdca6; border-radius: 6px; padding: 10px 12px; }
.notice.ok { background: #e8f5ee; border-color: #b6ddc6; }
.notice.warn { background: #fbe9e2; border-color: #efc2b3; color: var(--warn); }

/* 面接の記録（views/interviews/show.ejs） */
.iv-kana { font-size: 14px; font-weight: 400; }
.iv-actions form + form { margin-top: 10px; }
.iv-actions .inline-form .muted { font-size: 12.5px; }
.iv-okng { display: flex; align-items: center; gap: 16px; margin: 6px 0; }
.iv-okng-label { width: 7em; font-size: 14px; }
label.radio-inline { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: var(--ink); font-size: 14px; }
label.radio-inline input { width: auto; margin: 0; display: inline; }
table.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
table.kv th { width: 15em; text-align: left; font-weight: 400; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
/* 担当者が面接中に開いておく画面。左に本人の答え（紙の順・その場で直せる）、右に面接後の記入欄。幅が狭いと縦に並ぶ */
.iv-sheet { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.iv-sheet .card { margin: 0; }
.iv-staff { position: sticky; top: 12px; }
@media (max-width: 900px) { .iv-sheet { grid-template-columns: minmax(0, 1fr); } .iv-staff { position: static; } }
.iv-sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.iv-save-state { font-size: 13px; }
.iv-save-state.error { color: var(--warn); }
.iv-hint { font-size: 13px; margin-top: 0; }
.iv-group { margin: 14px 0 0; }
.iv-group h3 { font-size: 13px; font-weight: 400; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin: 0 0 6px; }
.iv-dig { background: #fff8e6; border: 1px solid #efdca6; border-radius: 8px; padding: 8px 10px; }
.iv-dig h3 { border-bottom-color: #efdca6; color: #8a5a00; }
.iv-dig-tag { font-size: 12px; background: #fbe7b5; color: #8a5a00; border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.iv-row { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 10px; align-items: center; padding: 3px 0; font-size: 14px; }
.iv-label { color: var(--muted); font-size: 13px; }
.iv-row input[type="text"], .iv-row input[type="date"] { margin: 0; }
.iv-choices { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.iv-old, .iv-purge { font-size: 12.5px; }
[data-save-button][hidden] { display: none; }
/* 名簿の詳細に出す、面接のときの記入欄（views/casts/show.ejs）。NG を見落とさないよう黄色の枠 */
.iv-note { background: #fff8e6; border-color: #efdca6; }
.iv-note-okng { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; }
.iv-note-remarks { white-space: pre-wrap; background: #fff; border: 1px solid #efdca6; border-radius: 6px; padding: 8px 10px; }

.files { list-style: none; padding: 0; margin: 0 0 16px; }
.files li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
}
.tile:hover { border-color: var(--accent); }
.tile strong { display: block; font-size: 16px; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 13px; }
.tile.wide { grid-column: 1 / -1; }

.login-wrap { max-width: 380px; margin: 12vh auto; padding: 0 16px; }
.login-wrap h1 { text-align: center; }

.qr-card { text-align: center; }
.qr-card img { max-width: 320px; height: auto; }
.qr-card .url { word-break: break-all; font-size: 13px; background: #f0f2f5; padding: 10px; border-radius: 6px; }

/* 面接者フォーム（スマホ） */
body.intake { background: #fff; }
.intake-wrap { max-width: 560px; margin: 0 auto; padding: 24px 18px 64px; }
.intake-wrap.center { text-align: center; padding-top: 18vh; }
/* 面接シートのあとの待ち画面（views/intake/wait.ejs）。止まって見えないように点を明滅させる */
.wait-dots { letter-spacing: 6px; color: var(--muted); animation: wait-blink 1.6s ease-in-out infinite; }
@keyframes wait-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.intake-header h1 { font-size: 20px; margin-bottom: 0; }
.intake .step { display: none; }
.intake .step.active { display: block; }
.intake .step h2 { font-size: 18px; margin: 16px 0 18px; }
.intake label { font-size: 14px; }
.intake input, .intake select { font-size: 16px; padding: 12px; }
.intake .choice { display: flex; gap: 18px; margin-bottom: 14px; }
.intake .radio { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; color: var(--ink); }
.intake .radio input { width: auto; margin: 0; }
/* 面接シート（views/intake/interview.ejs） */
.intake .choice.wrap { flex-wrap: wrap; gap: 10px 18px; }
.intake .choice-list { display: grid; gap: 10px; margin-bottom: 14px; }
.intake .choice-list label.checkbox { font-size: 15px; }
.intake .q-label { font-size: 14px; color: var(--muted); margin: 6px 0 8px; }
.intake .field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
/* 生年月日の3つの数字の欄（views/partials/birth-date.ejs）。数字だけなので、スマホでも3つを1行に並べる */
.birth-date { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; max-width: 420px; }
.birth-date label { margin-bottom: 6px; }
.birth-date input { text-align: center; font-size: 18px; }
.birth-date-check { grid-column: 1 / -1; margin: 0 0 14px; min-height: 1.4em; font-size: 14px; }
.field-label { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.step-nav { display: flex; gap: 12px; margin-top: 24px; }
.step-nav button { flex: 1; padding: 12px; }
.progress { height: 4px; background: #e7eaee; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

@media (max-width: 640px) {
  .row { flex-direction: column; gap: 0; }
  .site-header { flex-wrap: wrap; gap: 10px; }
}

/* ---- 書類 ---- */
.doc-frame { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.doc-actions { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.doc-body { white-space: pre-wrap; line-height: 1.9; }
.summary .add-doc { float: right; padding: 6px 14px; font-size: 14px; }

label.checkbox { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); font-size: 14px; }
label.checkbox input { width: auto; margin: 4px 0 0; }

textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  font: inherit;
  line-height: 1.8;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
}

.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; font-size: 14px; }
table.data th { background: #eef1f5; font-size: 13px; }

.table-editor { overflow-x: auto; }
table.editable input {
  width: 100%;
  min-width: 110px;
  padding: 6px 8px;
  font: inherit;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
}
table.editable input:focus { border-color: var(--accent); background: #fff; outline: none; }
table.editable th { vertical-align: top; }
/* 2026-11-13: 11px だと押しにくかった（パックを追加・外す・行の削除・部品など、よく押すボタン）。普通の大きさにする */
button.tiny { font-size: 14px; padding: 7px 14px; margin-top: 4px; }
.table-editor-actions { display: flex; gap: 10px; margin: 12px 0; }

.store-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.store-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
}
.store-tab:hover { border-color: var(--accent); }
.store-tab.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.store-tab .count { font-size: 12px; color: var(--muted); }
.store-tab.current .count { color: #dce8f6; }

/* ---- 表の閲覧（料金表など） ---- */
/* 紙の料金表と同じく、全セルを罫線で囲った枠にする */
.table-scroll { overflow: auto; max-height: 72vh; border: 2px solid var(--grid); border-radius: 6px; }
.table-scroll table.sheet { border-collapse: separate; border-spacing: 0; width: 100%; margin: 0; }
table.sheet th, table.sheet td {
  border: 0;
  border-bottom: 1px solid var(--grid);
  border-right: 1px solid var(--grid);
  padding: 11px 14px;
  font-size: 14px;
  white-space: nowrap;
  background: var(--panel);
}
table.sheet th:last-child, table.sheet td:last-child { border-right: 0; }
table.sheet tbody tr:last-child td { border-bottom: 0; }
table.sheet thead th { border-bottom: 2px solid var(--grid); }

/* ヘッダー行を固定 */
table.sheet thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef1f5;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* 1列目（ルーム名など）を固定 */
table.sheet th.rowhead, table.sheet td.rowhead {
  position: sticky;
  left: 0;
  z-index: 1;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 1px 0 0 var(--grid);
}
table.sheet thead th.rowhead { z-index: 3; }

table.sheet td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.sheet td.dash { text-align: center; color: #b6bcc4; }
table.sheet td.empty-cell { background: var(--panel); }

table.sheet tbody tr:nth-child(even) td { background: #fafbfc; }
table.sheet tbody tr:hover td { background: #eef4fb; }
table.sheet tbody tr.note-row td { background: #fff8e6; color: var(--warn); font-size: 13px; white-space: normal; }
table.sheet tbody tr.note-row:hover td { background: #fdf1d4; }

.table-hint { margin: 8px 0 0; }

@media (max-width: 640px) {
  table.sheet th, table.sheet td { padding: 9px 10px; font-size: 13px; }
}

/* 編集画面の表も枠を出す */
.table-editor table.editable { border-collapse: collapse; width: 100%; border: 2px solid var(--grid); }
table.editable th, table.editable td { border: 1px solid var(--grid); padding: 4px 6px; vertical-align: middle; }
table.editable thead th { background: #eef1f5; }
table.editable input { border: 1px solid transparent; background: #fff; }
table.editable input:hover { border-color: var(--line); }

button.danger { background: var(--warn); border-color: var(--warn); color: #fff; }
a.danger-link { color: var(--warn); }
/* 危ない操作は本文から離して、いちばん下に置く */
/* 書きながらプレビューを見る。左に本文、右に紙 */
.compose { display: flex; gap: 20px; align-items: flex-start; }
.compose-edit { flex: 1 1 0; min-width: 0; }
.compose-preview { flex: 1 1 0; min-width: 0; }
.compose-edit .doc-edit { min-height: 460px; }

.paper-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.paper { border: 0; display: block; transform-origin: top left; background: #fff; }

.scale-row { display: flex; align-items: center; gap: 6px; }
.scale-row input { width: 70px; }
.paper-pages { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.paper-pages.ok { color: var(--ok); }
.paper-pages.over { color: var(--warn); }

/* 幅が足りないときは縦に積む */
@media (max-width: 900px) {
  .compose { flex-direction: column; }
  .compose-edit, .compose-preview { width: 100%; }
}

/* 書類の部品のボタン。本文欄のすぐ上に並べる */
.part-bar-label { font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.part-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; }
.part-edit { min-height: 90px; }

/* 書類をつくる の本文欄。条文をそのまま貼るので広く取る */
.doc-edit { width: 100%; min-height: 380px; line-height: 1.8; font-family: inherit; resize: vertical; }

.danger-area { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }

ol.flow { margin: 0 0 8px; padding-left: 1.4em; }
ol.flow li { margin-bottom: 6px; }

.secret-list { list-style: none; margin: 0; padding: 0; }
.secret-list li {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 5px 0; border-bottom: 1px dotted #e3c3ce;
}
.secret-list .num { font-variant-numeric: tabular-nums; }

.copy-source { width: 100%; font-family: ui-monospace, "Consolas", monospace; font-size: 13px; }

/* 面接フォームで読んでもらう書類 */
.agree-doc {
  border: 1px solid #d6dbe0;
  border-radius: 8px;
  margin-bottom: 18px;
  background: #fff;
}
.agree-doc h3 {
  margin: 0;
  padding: 12px 14px;
  font-size: 16px;
  border-bottom: 1px solid #e5e9ed;
  background: #f6f8fa;
  border-radius: 8px 8px 0 0;
}
.agree-doc h3 .ver { margin-left: 10px; font-size: 12px; font-weight: 400; color: #6b7280; }

/* 書類は1画面に1つ。枠の中だけをスクロールさせず、ページそのものに広げて大きな字で読ませる
   （2026-10-15〜。枠のスクロールだと iPad でページのスクロールと混ざり、どこまで読んだか分かりにくかった） */
.agree-body {
  padding: 16px;
  margin: 0;
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
}
/* 第◯条の行。intake.js の mergeDocs が付ける */
.agree-body .doc-article { display: inline-block; margin-top: .6em; font-size: 17px; font-weight: 700; }
/* 本人の情報（名前・源氏名・日付など）を差し込んだところ。自分の名前で書かれているかを一目で確かめてもらう */
.agree-body mark.merge-hl { background: #fff1a8; color: inherit; padding: 0 2px; border-radius: 3px; }
.agree-error { margin: 0; padding: 10px 14px 0; }

.agree-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #e5e9ed;
  background: #fffdf5;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
}
.agree-check input { margin-top: 3px; width: 20px; height: 20px; flex: none; }

/* 管理画面で見るサイン（2026-10-08 より前に同意されたぶんだけが持つ） */
.signature-image { display: block; max-width: 420px; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* 承認の記録を1つの文で先に出す（2026-10-15〜） */
.approval-card { border-left: 4px solid var(--ok); }
.approval-badge { display: inline-block; margin: 0 0 8px; padding: 2px 10px; border-radius: 999px; background: #e3f2ea; color: var(--ok); font-weight: 700; }
.approval-sentence { font-size: 16px; line-height: 1.9; margin: 0 0 12px; }
.approval-raw { margin-top: 8px; }
.approval-raw summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* 承認の記録（サインの代わり。2026-10-08〜） */
.approval { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.approval dt { color: var(--muted); }
.approval dd { margin: 0; }
.approval .ua { font-size: 12px; word-break: break-all; }

/* 面接フォームの身分証の例 */
.id-list { margin: 4px 0 10px 1.2em; padding: 0; }
.id-list li { margin-bottom: 4px; }

/* 面接のあとにやること */
.next-steps .steps { list-style: none; margin: 0 0 10px; padding: 0; }
.next-steps .steps li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 0; border-bottom: 1px dotted #e0e4e8;
}
.next-steps .steps li:last-child { border-bottom: none; }
.next-steps .mark { width: 1.6em; flex: none; color: #8a9099; font-weight: 700; }
.next-steps li.done .mark { color: #2e7d4f; }
.next-steps li.done .label { color: #6b7280; }
.next-steps .label { flex: 1; }

/* 保存の許可制（2026-11-12） */
.status-wait { color: #a66b00; font-weight: bold; }
.status-ok { color: #1d7a2e; font-weight: bold; }
.status-ng { color: var(--warn); font-weight: bold; }
.request-form { display: inline-block; }
.request-form summary { cursor: pointer; color: inherit; text-decoration: underline; }
.request-form form { margin-top: 6px; }
.request-table td { vertical-align: top; }
.request-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }

/* 在籍の棚卸し（2026-11-12） */
.inventory-table tr.needs-check td { background: #fff8e6; }
.inventory-table input[type="date"] { width: auto; }

/* 担当者に大きく見せる知らせとボタン（面接シートのQR画面。2026-11-13。パソコンに不慣れな人でも目に入るように） */
.big-notice { font-size: 1.15rem; padding: 14px 16px; }
.big-button { font-size: 1.15rem; padding: 12px 22px; }

/* ホームの面接（2026-11-13）。いちばん使う操作なので大きく */
.home-interview { margin-bottom: 20px; }
.start-interview { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.start-interview form { margin: 0; }
.start-button { font-size: 1.2rem; padding: 14px 26px; }
/* 自分の店舗以外の面接ボタン（2026-11-14）。普段は畳んでおく */
.other-stores { margin: 4px 0 8px; }
.other-stores summary { cursor: pointer; color: #555; font-size: 0.95rem; padding: 4px 0; }
.pending-interviews { list-style: none; padding: 0; margin: 8px 0 0; }
.pending-interviews li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; }
/* 押すところだと分かるよう、答えの一覧の「開く」はボタンの形にする */
.pending-interviews a.button { display: inline-block; border: 1px solid var(--accent); border-radius: 6px; padding: 8px 16px; color: var(--accent); background: #fff; text-decoration: none; font-weight: 600; }
.pending-interviews a.button:hover { background: var(--accent); color: #fff; }

/* 表の編集の行の操作（2026-11-13） */
.row-actions { white-space: nowrap; }
.row-actions button { margin: 2px; }
.version-bump { font-weight: 600; }

/* 書類をつくるの空欄（2026-11-13） */
.blank-fields { background: #fff8e6; border: 1px solid #efdca6; border-radius: 6px; padding: 10px 14px; margin: 10px 0; }
.blank-fields-title { margin: 0 0 6px; }
.blank-fields-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 14px; }
.blank-fields-list label { font-weight: 600; }
.blank-fields-list input { width: 100%; font-size: 16px; }

/* hidden を付けた label を本当に隠す（label { display:block } が [hidden] より強かった。2026-11-13） */
label[hidden] { display: none; }

/* fieldset は既定で中身の幅より縮まず、書類をつくるの画面が横にはみ出していた（2026-11-13） */
fieldset { min-width: 0; }
.top-print { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }

/* 面接の人のスマホ（2026-11-13。使い心地の確かめ）: 選ぶ欄を指で押しやすく、写真の欄のボタンを大きく */
body.intake label.checkbox, body.intake label.radio { min-height: 44px; display: flex; align-items: center; gap: 8px; }
body.intake label.checkbox input, body.intake label.radio input { width: 22px; height: 22px; }
body.intake input[type="file"] { font-size: 16px; }
body.intake input[type="file"]::file-selector-button { font-size: 16px; padding: 12px 18px; margin-right: 10px; border-radius: 8px; border: 1px solid var(--accent); background: #fff; color: var(--accent); font-weight: 600; }
body.intake textarea { width: 100%; font-size: 16px; }

/* 確認待ちの年ごとの目次（2026-11-13） */
.year-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.year-chip { display: inline-flex; flex-direction: column; align-items: center; min-width: 88px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: inherit; font-weight: 600; }
.year-chip .count { font-size: 12px; font-weight: 400; color: var(--muted); }
.year-chip.current { border-color: var(--accent); background: var(--accent); color: #fff; }
.year-chip.current .count { color: #fff; }
.year-chip.done { opacity: .6; }

/* 女の子の確認（2026-11-13。/nalu-check）。パソコンに不慣れな人でも迷わないよう、大きなボタンを縦に並べる */
.nalu-check { max-width: 640px; margin: 0 auto; }
.nalu-help ul { margin: 6px 0 0; padding-left: 1.2em; line-height: 1.8; }
.nalu-progress { margin: 12px 0; }
.nalu-progress p { margin: 6px 0 0; }
.nalu-progress-bar { height: 12px; background: #e7eaee; border-radius: 6px; overflow: hidden; }
.nalu-progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); }
.nalu-name { font-size: 1.8rem; font-weight: 700; margin: 0 0 4px; }
.nalu-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.nalu-choices form { margin: 0; }
.nalu-choice { width: 100%; min-height: 56px; font-size: 1.15rem; padding: 12px 16px; border-radius: 10px; border: 2px solid var(--accent); background: #fff; color: var(--accent); font-weight: 700; cursor: pointer; text-align: center; }
.nalu-choice:hover { background: #eef4fb; }
.nalu-choice.chosen { background: var(--accent); color: #fff; }
.nalu-choice.newer { border-color: #b26a00; color: #b26a00; }
.nalu-choice.newer.chosen { background: #b26a00; color: #fff; }
.nalu-choice.unknown { border-color: var(--line); color: var(--muted); font-weight: 400; }
.nalu-former { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.nalu-former input[type="text"] { font-size: 1.1rem; padding: 10px; }
.nalu-choice.former { border-color: #6a4bb2; color: #6a4bb2; }
.nalu-choice.former.chosen { background: #6a4bb2; color: #fff; }
.nalu-results { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nalu-answers { font-size: 13px; color: var(--muted); margin-top: 4px; }
.missing-list .check-col { width: 6em; white-space: nowrap; text-align: center; }
.missing-store { margin-top: 18px; }
@media print {
  body:has(.print-page) .site-header, .print-page .no-print { display: none !important; }
  .missing-store + .missing-store { break-before: page; }
}

/* ---- 2026-11-14 見づらさの直し（お店の人になりきった確認から） ---- */

/* スマホではメニューをたたむ（views/partials/header.ejs）。チェックボックスは見せない */
.menu-toggle { display: none; }
.menu-button { display: none; }
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
  .site-header .brand { flex: 1; font-size: 17px; }
  /* スマホでだけキーボードで届くように（パソコンでは見えないところで止まらないよう display:none） */
  .menu-toggle { display: block; position: absolute; opacity: 0; pointer-events: none; }
  .menu-button {
    display: inline-block; margin: 0; padding: 8px 16px; font-size: 16px; color: var(--ink);
    border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer;
  }
  .menu-toggle:focus-visible + .menu-button { outline: 2px solid var(--accent); outline-offset: 2px; }
  .menu-toggle:checked + .menu-button { background: var(--accent); border-color: var(--accent); color: #fff; }
  .site-header nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 0; }
  .menu-toggle:checked ~ nav { display: flex; }
  .site-header nav a { display: block; padding: 12px 4px; font-size: 17px; border-top: 1px solid var(--line); text-decoration: none; }
  .site-header .logout { order: 4; flex-basis: 100%; justify-content: space-between; }
  .site-header .user { white-space: normal; }
}

/* スマホでは表の細かい列を隠す（書類一覧など） */
@media (max-width: 640px) {
  .hide-sm { display: none; }
}

/* 承認待ちのカード（views/requests/index.ejs） */
.request-cards { display: grid; gap: 12px; }
.request-card { margin: 0; padding: 16px; }
.request-card p { margin: 0 0 8px; overflow-wrap: anywhere; }
.request-card .request-what, .request-card .request-why { font-size: 16px; }
.request-approve { width: 100%; margin: 6px 0 10px; }
.request-reject summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.request-reject form { margin-top: 8px; }

/* 在籍確認の答え（views/check.ejs）。一目で分かるよう大きく */
.check-answer { border-radius: 10px; padding: 16px 18px; margin: 0 0 12px; border: 2px solid var(--line); background: var(--panel); }
.check-answer p { margin: 0; }
.check-answer .check-line { font-size: 22px; line-height: 1.5; margin-bottom: 4px; }
.check-answer.is-in { border-color: #9fd3b6; background: #eef8f2; }
.check-answer.is-in .check-line { color: var(--ok); }
.check-answer.is-out { border-color: #efc2b3; background: #fdf1ec; }
.check-answer.is-out .check-line { color: var(--warn); }
.check-answer.is-unknown { border-color: #efdca6; background: #fff8e6; }

/* ---- 使い方（views/help.ejs。2026-11-14）。パソコンに不慣れな人向けに字を大きく ---- */
.site-header nav a.nav-help { font-weight: 700; }
.tile.tile-help { border-color: #9fb9de; background: #f1f6fd; }
.help { font-size: 17px; }
.help h1 { font-size: 26px; }
.help-lead { font-size: 20px; margin: 4px 0; }
.help-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 18px 0 28px; }
.help-toc a {
  display: block; padding: 14px 16px; border: 2px solid #c9d4e6; border-radius: 10px;
  background: #f4f7fc; text-decoration: none; color: #1d3d6e;
}
.help-toc a strong { display: block; font-size: 18px; }
.help-toc a span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.help-item { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 0 0 22px; scroll-margin-top: 12px; }
.help-item h2 { font-size: 22px; margin: 0 0 2px; }
.help-when { color: var(--muted); margin: 0 0 14px; }
.help-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.help-steps > li { counter-increment: step; position: relative; padding: 2px 0 16px 48px; line-height: 1.85; }
.help-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.help-steps ul { margin: 6px 0 0; padding-left: 1.2em; }
.btn-like {
  display: inline-block; padding: 1px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font-weight: 700; white-space: nowrap; line-height: 1.6;
}
.btn-like.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-like.danger { background: var(--warn); border-color: var(--warn); color: #fff; }
.help-ok { background: #eef8f2; border-left: 6px solid #4a9a72; padding: 10px 14px; margin: 4px 0 0; border-radius: 4px; }
.help-ng { background: #fdf1ec; border-left: 6px solid #c55a3a; padding: 10px 14px; margin: 4px 0 0; border-radius: 4px; }
.help-top { display: inline-block; margin-top: 10px; font-size: 14px; }
.help-trouble { border-color: #e2a08c; background: #fffaf8; }
.help-trouble li { margin-bottom: 8px; line-height: 1.8; }
.help-print { text-align: right; }
.help-print button { font-size: 16px; padding: 10px 18px; }
@media (max-width: 640px) {
  .help-steps > li { padding-left: 42px; }
  .help-item { padding: 14px 14px; }
  .btn-like { white-space: normal; }
}
@media print {
  .site-header, .help-toc, .help-top, .help-print, .help-lead + .muted { display: none; }
  .help { font-size: 13px; }
  .help-item { break-inside: avoid; border-width: 1px; padding: 10px 14px; margin-bottom: 10px; }
  .btn-like.primary, .help-steps > li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- 面接の記録を見やすく（views/interviews/show.ejs。2026-11-14。お店のパソコンで面接中に開く画面） ----
   入力欄は他の画面と同じ大きさに。答えのある欄ははっきり、答えのない欄は薄く（:has と :placeholder-shown で、打てばその場で変わる） */
.iv-row { font-size: 15px; padding: 5px 0; }
.iv-label { font-size: 14px; color: var(--ink); font-weight: 600; }
.iv-row input[type="text"], .iv-row input[type="date"], .iv-row textarea {
  width: 100%; padding: 8px 10px; font: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid #b9c0ca; border-radius: 6px; background: #fff;
}
.iv-row textarea { margin: 0; }
.iv-row input:placeholder-shown, .iv-row textarea:placeholder-shown { background: #f6f7f9; border-style: dashed; border-color: #cfd4db; }
.iv-row ::placeholder { color: #a3a9b1; }
.iv-row:has(input:placeholder-shown, textarea:placeholder-shown) .iv-label,
.iv-row:has(.iv-choices):not(:has(input:checked)) .iv-label,
.iv-row:has(.iv-locked.is-empty) .iv-label { color: #9aa1aa; font-weight: 400; }
.iv-locked { font-weight: 600; }
.iv-locked.is-empty { color: #a3a9b1; font-weight: 400; }
.iv-choices { gap: 6px 18px; }
.iv-choices .radio-inline { font-size: 15px; }
.iv-filter { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; margin: 4px 0 0; cursor: pointer; }
.iv-filter input { width: auto; margin: 0; }
/* 答えのある欄だけ表示する（public/js/interview-filter.js）。★印を付けた時点で空だった欄だけを隠す。
   打っている途中で答えを消しても、その欄はその場で消えない（2026-11-14。CSS の :has で隠すと目の前で消えた） */
.iv-row.is-filtered-out, .iv-group.is-filtered-out { display: none; }
.iv-staff label { color: var(--ink); font-size: 14px; }
.iv-okng { font-size: 15px; }

/* 入店の手続きの、送る前の見直し（views/intake/form.ejs の data-review。2026-11-14。面接の子のスマホ） */
.review-list { margin: 12px 0 16px; border-top: 1px solid var(--line); }
.review-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.review-row dt { grid-column: 1; font-size: 13px; color: var(--muted); }
.review-row dd { grid-column: 1; margin: 0; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.review-row dd.review-empty { color: var(--warn); font-weight: 400; font-size: 15px; }
.review-row .review-fix { grid-column: 2; grid-row: 1 / span 2; font-size: 16px; padding: 8px 4px; }

/* 書類をつくる（views/templates/show.ejs。2026-11-14）。見本を大きく見る・日付の「今日」 */
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 6px; }
.preview-head .paper-pages { margin: 0; }
.compose.is-wide .compose-edit { display: none; }
.compose.is-wide .compose-preview { flex: 1 1 100%; }
.blank-today { margin-left: 6px; }

/* 警察の立入りで名簿をすぐ出す枠（2026-11-14） */
.inspection-card { border: 2px solid var(--warn); }
.inspection-card h2 { color: var(--warn); margin-top: 0; }
.inspection-card label.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; }

/* 女の子の確認の顔の写真（2026-11-14）。候補のボタンの横に出す。保存させない */
.nalu-face-row { display: flex; align-items: center; gap: 12px; }
.nalu-face-row form { flex: 1; }
.nalu-face { width: 120px; height: 120px; border-radius: 8px; object-fit: cover; flex: none;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; pointer-events: auto; }
.nalu-face-note { margin: 8px 0 0; }
@media print { .nalu-face { display: none; } }
/* 面接シートの最初の約束の一言（2026-11-14） */
.intake-promise { background: #e8f5ee; border: 1px solid #b6ddc6; border-radius: 8px; padding: 10px 12px; font-size: 15px; line-height: 1.6; }

/* 直してほしいところ（2026-11-14）。右下に小さく出し、押すと欄が開く */
.feedback-widget { position: fixed; right: 14px; bottom: 14px; z-index: 50; max-width: 340px; }
.feedback-widget summary { list-style: none; cursor: pointer; background: #fff; border: 1px solid #c9c9c9; border-radius: 20px; padding: 8px 14px; font-size: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.12); text-align: right; }
.feedback-widget summary::-webkit-details-marker { display: none; }
.feedback-widget[open] form { background: #fff; border: 1px solid #c9c9c9; border-radius: 8px; padding: 12px; margin-top: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.feedback-widget textarea { width: 100%; }
.feedback-item.done { opacity: .6; }
.feedback-body { white-space: pre-wrap; font-size: 16px; }
@media print { .feedback-widget { display: none; } }
