:root {
  --navy: #1f3a5f;
  --bg: #f4f5f7;
  --card: #fff;
  --line: #e2e5ea;
  --text: #1f2933;
  --muted: #6b7280;
  --sun: #dc2626;
  --sat: #2563eb;
  --ok: #0f766e;
  --warn: #b45309;
  --full: #9ca3af;
  --tel: #7c3aed;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
button, input, select, textarea { font: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff;
  padding: 10px 16px;
}
.topbar h1 { font-size: 18px; margin: 0; }
.user-btn {
  background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 16px;
  padding: 6px 12px; font-size: 14px;
}

main { max-width: 640px; margin: 0 auto; padding: 12px 12px 24px; }
body.wide main { max-width: 1280px; } /* 全体予定表はパソコンでは広く使う */

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; text-align: center; padding: 14px 4px; color: var(--muted);
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.tabbar a.active { color: var(--navy); box-shadow: inset 0 3px 0 var(--navy); }

.card { background: var(--card); border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.card h2 { font-size: 15px; margin: 0 0 10px; color: var(--navy); }
.muted { color: var(--muted); font-size: 13px; }

.btn {
  display: inline-block; border: 0; border-radius: 8px; padding: 10px 14px;
  background: var(--navy); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.tel { background: var(--tel); }
.btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.danger { background: #fff; color: var(--sun); border: 1px solid #f3c4c4; }
.btn.small { padding: 6px 10px; font-size: 14px; }
.btn.block { display: block; width: 100%; }
.btn:disabled { background: var(--line); color: var(--muted); cursor: default; }

/* ---- ログイン・メニュー ---- */
.login { margin-top: 24px; }
.menu { display: grid; gap: 8px; }
.temp-pw {
  font-family: ui-monospace, Consolas, monospace; font-size: 28px; font-weight: 700; letter-spacing: .1em;
  text-align: center; background: var(--bg); border-radius: 8px; padding: 12px; user-select: all;
}

/* ---- 月間カレンダー ---- */
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.month-head h2 { margin: 0; font-size: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.cal .dow.sun { color: var(--sun); }
.cal .dow.sat { color: var(--sat); }
.day {
  position: relative; min-height: 72px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 4px; display: flex; flex-direction: column; cursor: pointer; text-align: left;
  color: inherit; font: inherit;
}
.day.empty { visibility: hidden; }
.day.past { opacity: .5; }
.day.today { border: 2px solid var(--navy); }
.day .num { font-size: 14px; font-weight: 700; }
.day.sun .num { color: var(--sun); }
.day.sat .num { color: var(--sat); }

/* 本人の情報（上段）：勤務区分と登録済みマーク */
.day .personal { display: flex; gap: 2px; align-items: center; margin-top: 2px; min-height: 18px; flex-wrap: wrap; }
.shift-badge {
  display: inline-block; font-size: 11px; font-weight: 700; color: #fff;
  border-radius: 4px; padding: 0 4px; line-height: 17px;
}
.duty-mark {
  display: inline-block; font-size: 11px; font-weight: 700; color: #7c2d12; background: #fed7aa;
  border-radius: 4px; padding: 0 3px; line-height: 17px;
}
.reg-mark {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--ok);
  border: 1px solid var(--ok); border-radius: 4px; padding: 0 3px; line-height: 15px;
}

/* 会社全体の空き状況（下段）：本人情報と区別するため帯で表示 */
.day .company {
  margin-top: auto; font-size: 10px; text-align: center; border-radius: 4px; padding: 1px 0;
  background: #ecfdf5; color: var(--ok);
}
.day .company.some { background: #fffbeb; color: var(--warn); }
.day .company.all { background: #f3f4f6; color: var(--muted); }

.legend { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.legend .row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.legend .label { font-weight: 700; color: var(--text); min-width: 4.5em; }
.legend .company { font-size: 11px; border-radius: 4px; padding: 1px 6px; background: #ecfdf5; color: var(--ok); }
.legend .company.some { background: #fffbeb; color: var(--warn); }
.legend .company.all { background: #f3f4f6; color: var(--muted); }

/* ---- 日別画面 ---- */
.back { color: var(--navy); text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 8px; }
.day-title { font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.my-shift { display: flex; align-items: center; gap: 8px; }
.my-shift .shift-badge { font-size: 14px; line-height: 24px; padding: 0 10px; }

.slot { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.slot:first-of-type { border-top: 0; }
.slot .info { flex: 1; min-width: 0; }
.slot .time { font-weight: 700; }
.slot .count { font-size: 13px; margin-top: 2px; }
.slot .count .full { color: var(--sun); font-weight: 700; }
.slot .count .open { color: var(--ok); font-weight: 700; }
.slot .count .tel { color: var(--tel); }
.slot .names { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; }
.dots i.on { background: var(--navy); }
.tag { display: inline-block; font-size: 11px; border-radius: 4px; padding: 1px 5px; font-weight: 700; }
.tag.tel { background: #ede9fe; color: var(--tel); }
.tag.done { background: #ccfbf1; color: var(--ok); }

/* ---- 予定一覧 ---- */
.item { padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .when { font-weight: 700; }
.item .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 14px; margin-top: 4px; }
.tag.resp { background: #e0f2fe; color: #0369a1; }
.item .what { margin: 4px 0 8px; white-space: pre-wrap; word-break: break-word; }
.item .actions { display: flex; gap: 8px; }
.empty-msg { color: var(--muted); text-align: center; padding: 20px 0; }

/* ---- 管理 ---- */
.admin-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-tools input { padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.admin-day { margin-top: 12px; }
.admin-day h3 { font-size: 15px; margin: 0 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--navy); }
table.admin { width: 100%; border-collapse: collapse; font-size: 13px; }
table.admin th, table.admin td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.admin th { white-space: nowrap; color: var(--muted); font-weight: 600; width: 7.5em; }

.sf-month { font-size: 15px; margin: 14px 0 4px; padding-bottom: 4px; border-bottom: 2px solid var(--navy); }
.audit-item { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.audit-head { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.tag.del { background: #fee2e2; color: var(--sun); }
.backup-row { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; margin-bottom: 8px; }
.backup-dir { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }
.backup-row .open { color: var(--ok); font-weight: 700; }
.backup-row .full { color: var(--sun); font-weight: 700; }

/* ---- みんなの予定 ---- */
table.ev { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13px; }
table.ev th, table.ev td { border: 1px solid var(--line); padding: 6px; vertical-align: middle; height: 34px; }
table.ev thead th { background: #fdf3d7; font-weight: 700; text-align: left; white-space: nowrap; }
table.ev .ev-slot, table.ev .ev-tel { background: #dcefdc; text-align: center; font-weight: 700; width: 5.5em; }
table.ev tr.ev-first > * { border-top: 2px solid #374151; }
table.ev .ev-what { white-space: pre-wrap; word-break: break-word; min-width: 16em; }
.pill { display: inline-block; border-radius: 10px; padding: 1px 8px; background: #fde2e2; color: #9f1239; font-weight: 600; white-space: nowrap; }
.pill.me { background: var(--navy); color: #fff; }
.pill.none { background: #fff7ed; color: var(--warn); box-shadow: inset 0 0 0 1px #fdba74; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }

/* イベント一覧 */
table.ev-events { min-width: 720px; }
table.ev-events thead th { text-align: center; }
/* 日付と時間は横にずらしても見えるよう左に固定 */
table.ev-events .ev-date { background: #fdf3d7; text-align: center; white-space: nowrap; width: 3.5em; min-width: 3.5em; position: sticky; left: 0; z-index: 1; }
table.ev-events .ev-time { background: #f9fafb; white-space: nowrap; width: 3.5em; min-width: 3.5em; position: sticky; left: 3.5em; z-index: 1; }
table.ev-events td { width: 18%; }
/* 予約が1件でもある時間の行（ほかの店舗も含めて色を変え、同じ時間に重ねないよう目立たせる） */
table.ev-events tr.ev-used td { background: #ffe4e6; }
table.ev-events tr.ev-used .ev-time { background: #fb7185; color: #fff; }
.ev-used-mark { font-size: 10px; font-weight: 700; }
table.ev-events tr td.ev-booked { background: #fecdd3; }
table.ev-events td.ev-hit { box-shadow: inset 0 0 0 3px var(--sun); }
.ev-entry + .ev-entry { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); }
.ev-entry small { color: var(--muted); }
.ev-who { font-size: 11px; color: var(--muted); }
.ev-click { cursor: pointer; border-radius: 4px; margin: -2px; padding: 2px; }
.ev-click:hover, .ev-click:focus { background: rgba(220, 38, 38, .12); outline: 1px dashed var(--sun); }

/* ---- 全体予定表 ---- */
.board-card { padding-left: 8px; padding-right: 8px; }
.board-scroll { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; -webkit-overflow-scrolling: touch; }
.board { min-width: 1000px; font-size: 12px; }
.b-row { display: flex; border-top: 1px solid var(--line); }
.b-row:first-child { border-top: 0; }
.b-name, .b-place {
  position: sticky; z-index: 2; flex: none; display: flex; align-items: center; justify-content: center;
  background: #fff; border-right: 1px solid var(--line); font-weight: 700;
}
.b-name { left: 0; width: 52px; }
.b-place { left: 52px; width: 48px; font-size: 11px; }
.b-track, .b-hours {
  position: relative; flex: 1;
  background-image: repeating-linear-gradient(to right, #eef0f3 0, #eef0f3 1px, transparent 1px, transparent calc(100% / 20));
}
.b-hours { height: 22px; }
.b-hours span { position: absolute; top: 4px; padding-left: 3px; color: var(--muted); }
.bar {
  position: absolute; height: 22px; border: 0; border-radius: 4px; padding: 0 4px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; text-align: left; font: inherit; font-size: 12px; line-height: 22px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
button.bar { cursor: pointer; }
.bar small { font-size: 10px; opacity: .85; }
.bar.plain { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 16px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.venue-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }

/* ---- モーダル ---- */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.sheet {
  background: #fff; width: 100%; max-width: 640px; border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 90vh; overflow-y: auto;
}
.sheet h2 { margin: 0 0 12px; font-size: 17px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.note { font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #ede9fe; color: var(--tel); margin-bottom: 12px; }
.note.error { background: #fee2e2; color: var(--sun); }
.sheet .actions { display: flex; gap: 8px; }
.confirm-msg { margin: 4px 0 16px; line-height: 1.6; }
.sheet .actions .btn { flex: 1; }

.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 14px; z-index: 30;
  max-width: calc(100% - 32px);
}

/* 式場・霊安室の使用状況 */
table.fc { border-collapse: collapse; font-size: 14px; min-width: 100%; }
table.fc th, table.fc td { border: 1px solid var(--line); padding: 4px 6px; height: 40px; }
table.fc thead th { position: sticky; top: 0; z-index: 2; text-align: center; white-space: nowrap; font-weight: 700; min-width: 6.5em; font-size: 15px; }
table.fc thead th small { font-size: 12px; }
table.fc .fc-time { position: sticky; left: 0; z-index: 1; background: #f9fafb; text-align: right; white-space: nowrap; width: 3.5em; min-width: 3.5em; font-weight: 700; font-size: 15px; vertical-align: top; }
table.fc thead .fc-time { z-index: 3; }
table.fc tr.fc-hour > * { border-top: 1.5px solid #9ca3af; }
table.fc td.fc-hall { background: #f3f4f6; }
table.fc td.fc-used { background: #fecdd3; vertical-align: top; }
table.fc td[data-free-room] { cursor: pointer; }
table.fc td[data-free-room]:hover { background: #e0f2fe; }
.fc-entry { line-height: 1.3; padding: 1px 0; }
.fc-entry + .fc-entry { border-top: 1px dashed #9ca3af; }
.fc-click { cursor: pointer; }
.fc-click:hover { text-decoration: underline; }
.tag.fc-対面, .fc-entry.fc-対面 b { color: #be185d; }
.tag.fc-納棺, .fc-entry.fc-納棺 b { color: #1d4ed8; }
.fc-up-date { font-weight: 700; margin-top: 10px; border-bottom: 1px solid var(--line); }
.fc-up { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.fc-up-time { font-weight: 700; margin-right: 4px; }
.tag.fc-対面 { background: #fce7f3; }
.tag.fc-納棺 { background: #dbeafe; }
/* 式場別（1週間） */
table.fc-week thead th { min-width: 4.5em; }
table.fc-week thead tr.fc-sub th { top: 40px; }
table.fc .fc-day { background: #fdf3d7; color: #111827; }
table.fc .fc-day.fc-sat { background: #dbeafe; }
table.fc .fc-day.fc-sun { background: #fee2e2; }
table.fc .fc-day.fc-today { box-shadow: inset 0 -3px 0 var(--navy); }
table.fc .fc-daystart { border-left: 2px solid #374151; }
table.fc-week .fc-entry { font-size: 12px; }
.fc-mode { display: flex; gap: 8px; margin-bottom: 8px; }
.fc-mode > * { flex: 1; text-align: center; }
.fc-mode > .on { background: var(--navy); color: #fff; border-color: var(--navy); }
.fc-stores { display: flex; gap: 4px; margin-bottom: 8px; }
.fc-store { flex: 1 1 0; min-width: 0; padding: 10px 2px; font-size: 14px; white-space: nowrap; font-weight: 700; border: 2px solid var(--line); border-radius: 8px; background: #fff; color: #111827; cursor: pointer; }
.fc-store.on { box-shadow: 0 0 0 2px var(--navy); }
/* 式場：日程表の通夜・葬儀は紫、生花飾りは緑 */
table.fc td.fc-used:has(.fc-sheet) { background: #e9d5ff; }
/* 生花飾りは店舗の色と重ならない茶色系。通夜・葬儀と同じ欄に並ぶときも、生花飾りの部分だけこの色にする */
table.fc td.fc-used:has(.fc-生花飾り):not(:has(.fc-sheet)) { background: #ead7bd; }
.fc-entry.fc-生花飾り { background: #ead7bd; border-radius: 4px; padding: 2px 4px; margin: 2px -2px; }
.fc-entry.fc-通夜 b, .fc-entry.fc-葬儀 b { color: #6b21a8; }
.tag.fc-生花飾り { background: #ead7bd; }
.tag.fc-生花飾り, .fc-entry.fc-生花飾り b { color: #7c2d12; }
.fc-who { display: inline-block; font-size: 11px; font-weight: 700; color: #7c2d12; border: 1px solid #c2a27a; border-radius: 4px; padding: 0 4px; background: #fff8ef; }

/* カレンダー：自分の予定を小さく、休みは赤く塗る */
.day .num { display: flex; align-items: center; gap: 3px; }
.day .num .duty-mark { font-size: 9px; line-height: 14px; padding: 0 2px; white-space: nowrap; }
.day .cal-items { display: flex; flex-direction: column; gap: 1px; margin: 2px 0; min-width: 0; }
.day .cal-item { font-size: 10px; line-height: 1.25; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; background: #eef2f8; border-radius: 3px; padding: 0 2px; }
.day.off { background: #fecaca; border-color: #f87171; }
.day.off .cal-item { background: #fff; }
.off-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: #fecaca; border: 1px solid #f87171; vertical-align: middle; }
.day { min-width: 0; overflow: hidden; }
.day .company { white-space: nowrap; overflow: hidden; text-overflow: clip; }
/* 店舗の予定（来客・清掃・業者など）は藍色系。店舗の色・他の予約の色と重ならない */
table.fc td.fc-used:has(.fc-t-店舗) { background: #e0e7ff; }
.fc-entry.fc-t-店舗 b { color: #3730a3; }
.tag.fc-来客, .tag.fc-清掃, .tag.fc-業者, .tag.fc-その他 { background: #e0e7ff; color: #3730a3; }
.fc-memo { font-size: 11px; color: #374151; }
/* 全体予定：式場・霊安室の行と、画像用の見出し */
.b-title { font-size: 14px; font-weight: 700; padding: 6px 8px; }
.b-row.b-store-first { border-top: 3px solid #374151; }
.b-row.b-store .b-name { font-weight: 700; }
.bar.fc-b-sheet { background: #e9d5ff; color: #4c1d95; }
.bar.fc-b-flower { background: #ead7bd; color: #7c2d12; }
.bar.fc-b-room { background: #fecdd3; color: #9f1239; }
/* 全体予定：管理者が手で入れた予定（灰色・点線の枠）。人の行の空いているところは押せる */
.bar.b-manual { background: #e5e7eb; color: #111827; border: 1px dashed #6b7280; }
.b-track[data-member] { cursor: copy; }
/* 式場・霊安室の日にち別：パソコンは横表記、スマホは縦表記 */
.fc-view-wide { display: none; }
@media (min-width: 768px) {
  .fc-view-wide { display: block; }
  .fc-view-narrow { display: none; }
}
.fc-h { min-width: 900px; font-size: 13px; }
.fc-h-row { display: flex; border-top: 1px solid var(--line); }
.fc-h-row.fc-h-newstore { border-top: 2px solid #374151; }
.fc-h-headrow { border-top: 0; }
.fc-h-label { position: sticky; left: 0; z-index: 2; flex: 0 0 118px; display: flex; align-items: center; gap: 4px; padding: 2px 6px; box-sizing: border-box; font-weight: 700; white-space: nowrap; background: #f9fafb; }
.fc-h-label small { font-size: 11px; font-weight: 700; }
.fc-h-hours { position: relative; flex: 1; height: 24px; background: #f9fafb; }
.fc-h-hours span { position: absolute; top: 4px; padding-left: 3px; font-weight: 700; }
.fc-h-track { position: relative; flex: 1; display: grid; min-width: 0; }
.fc-h-row.fc-hall .fc-h-track { background: #f3f4f6; }
.fc-h-cell { border-left: 1px solid #eef0f3; }
.fc-h-cell.fc-h-hour { border-left: 1px solid #9ca3af; }
.fc-h-cell[data-free-room] { cursor: pointer; }
.fc-h-cell[data-free-room]:hover { background: #e0f2fe; }
.fc-h-bar { position: absolute; z-index: 1; height: 44px; box-sizing: border-box; overflow: hidden; padding: 2px 4px; border-radius: 4px; font-size: 12px; line-height: 1.25; word-break: break-all; background: #fecdd3; }
.fc-h-bar b { color: #9f1239; }
.fc-h-bar.fc-sheet { background: #e9d5ff; }
.fc-h-bar.fc-sheet b { color: #6b21a8; }
.fc-h-bar.fc-生花飾り { background: #ead7bd; }
.fc-h-bar.fc-生花飾り b { color: #7c2d12; }
.fc-h-bar.fc-t-店舗 { background: #e0e7ff; }
.fc-h-bar.fc-t-店舗 b { color: #3730a3; }
.fc-h-when { color: #4b5563; font-size: 11px; }
/* カレンダーの大きい表示：文字と枠を大きく、予定は省略せず全部出す */
.cal-size { margin: 4px 0 8px; }
.cal.cal-big { gap: 4px; }
.cal.cal-big .dow { font-size: 15px; font-weight: 700; }
.cal.cal-big .day { min-height: 118px; padding: 5px 3px; }
.cal.cal-big .day .num { font-size: 19px; flex-wrap: wrap; }
.cal.cal-big .day .num .duty-mark { font-size: 12px; line-height: 17px; }
.cal.cal-big .day .cal-items { gap: 3px; margin: 4px 0; }
.cal.cal-big .day .cal-item { display: block; font-size: 13px; line-height: 1.3; padding: 1px 2px; -webkit-line-clamp: unset; overflow: visible; }
.cal.cal-big .day .company { font-size: 11px; padding: 2px 0; }
@media (min-width: 768px) {
  .cal.cal-big .day { min-height: 140px; padding: 7px; }
  .cal.cal-big .day .num { font-size: 22px; }
  .cal.cal-big .day .num .duty-mark { font-size: 13px; }
  .cal.cal-big .day .cal-item { font-size: 15px; }
  .cal.cal-big .day .company { font-size: 12px; }
}

/* 店舗IDの最初のメニュー（受付メニューと同じ見た目） */
.home-menu { display: grid; gap: 14px; }
.home-menu a { display: block; text-decoration: none; color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 22px 16px; text-align: center; }
.home-menu a:active { background: #eef2f8; }
.home-menu b { display: block; font-size: 20px; margin-bottom: 4px; }
.home-menu span { color: #4b5563; font-size: 13px; }

/* カレンダー「特大」（大きく表示をさらに大きく。1日の幅を広げ、入りきらない曜日は横にスクロール） */
.cal-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cal-scroll-note { font-size: 12px; margin: 6px 0 0; }
.cal.cal-huge { gap: 4px; grid-template-columns: repeat(7, minmax(128px, 1fr)); }
.cal.cal-huge .dow { font-size: 17px; }
.cal.cal-huge .day { min-height: 150px; padding: 6px; }
.cal.cal-huge .day .num { font-size: 24px; }
.cal.cal-huge .day .num .duty-mark { font-size: 14px; line-height: 19px; }
.cal.cal-huge .day .cal-item { font-size: 17px; line-height: 1.3; padding: 2px 4px; }
.cal.cal-huge .day .company { font-size: 12px; }
@media (min-width: 768px) {
  .cal.cal-huge { gap: 6px; grid-template-columns: repeat(7, minmax(165px, 1fr)); }
  .cal.cal-huge .dow { font-size: 19px; }
  .cal.cal-huge .day { min-height: 180px; padding: 8px; }
  .cal.cal-huge .day .num { font-size: 28px; }
  .cal.cal-huge .day .num .duty-mark { font-size: 16px; line-height: 22px; }
  .cal.cal-huge .day .cal-item { font-size: 20px; }
  .cal.cal-huge .day .company { font-size: 14px; }
}

/* 全体予定表：自宅に行く予定は塗りつぶしでなく、方面の色の下線 */
.board .bar.b-home { background: #fff; color: #111; border: 1px solid #d1d5db; border-bottom: 5px solid var(--home); }
.chip.chip-home { border-bottom: 4px solid var(--home); }
.c-place { margin: 4px 0; font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* 予定の場所：式場 / 自宅 の選択ボタン */
.choice-row { display: flex; gap: 8px; }
.choice-btn { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-weight: 700; cursor: pointer; background: #fff; }
.choice-btn input { display: none; }
.choice-btn:has(input:checked) { border: 2px solid var(--navy); background: #eef2f8; }

/* 全体予定表：勤務地・休みの欄は押すと選べる。この日だけ変えた欄は点線で囲む */
.b-place.b-place-edit { cursor: pointer; }
.b-place.b-place-edit:hover { outline: 2px solid var(--navy); outline-offset: -2px; }
.b-place.b-place-changed { outline: 2px dashed #111827; outline-offset: -3px; }
.b-place-select { position: absolute; left: 0; top: 0; z-index: 5; width: 130px; font-size: 13px; padding: 4px; }

/* カレンダー：自分で変えた勤務の印と、勤務を選ぶボタン */
.shift-own { display: inline-block; margin-left: 2px; padding: 0 3px; border: 1px dashed #111827; border-radius: 3px; font-size: 10px; line-height: 14px; font-weight: 700; color: #111827; background: #fff; }
.cal.cal-big .shift-own { font-size: 12px; line-height: 17px; }
.cal.cal-huge .shift-own { font-size: 14px; line-height: 19px; }
.day { -webkit-touch-callout: none; user-select: none; }
.shift-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin: 10px 0; }

/* 月のシフト表（管理者） */
.sg { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.sg th, .sg td { border: 1px solid var(--line); padding: 0; text-align: center; }
.sg thead th { position: sticky; top: 0; background: #f9fafb; font-weight: 700; min-width: 30px; padding: 2px 0; }
.sg thead th.sun { color: var(--sun); }
.sg thead th.sat { color: var(--sat); }
.sg thead th.sg-today { background: #fde68a; }
.sg .sg-name { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 56px; padding: 0 4px; text-align: left; white-space: nowrap; }
.sg-cell { position: relative; width: 100%; min-width: 30px; height: 30px; border: 0; background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; }
.sg-cell small { font-size: 9px; margin-left: 1px; }
.sg-cell:hover { outline: 2px solid var(--navy); outline-offset: -2px; }
.sg-cell.sg-changed { outline: 2px dashed #111827; outline-offset: -3px; }
.sg-select { position: absolute; left: 0; top: 0; z-index: 5; width: 150px; font-size: 13px; padding: 4px; }
.sg-legend { display: inline-block; min-width: 18px; padding: 0 3px; margin-right: 2px; border: 1px solid transparent; border-radius: 3px; font-weight: 700; text-align: center; }

/* 朝TEL時間決定の枠・チェックの行 */
.slot.slot-untimed { background: #fffbeb; }
.check-line { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check-line input { width: auto; margin-top: 3px; }
