:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #dbe1ea;
  --border-2: #c7d0dd;
  --input: #ffffff;
  --input-border: #c7d0dd;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.1);

  --ok-bg: rgba(34, 197, 94, 0.12);
  --ok: #15803d;

  --err-bg: rgba(239, 68, 68, 0.1);
  --err: #b91c1c;

  --pill-approved-bg: rgba(34, 197, 94, 0.12);
  --pill-approved: #15803d;

  --pill-tentative-bg: rgba(245, 158, 11, 0.14);
  --pill-tentative: #b45309;

  --pill-canceled-bg: rgba(100, 116, 139, 0.14);
  --pill-canceled: #334155;

  --pill-rejected-bg: rgba(239, 68, 68, 0.1);
  --pill-rejected: #b91c1c;
}

body {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}

input,
select,
button,
textarea {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input);
  color: var(--text);
}

button {
  cursor: pointer;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid var(--border-2);
}

button:hover {
  background: #e2e8f0;
}

button:active {
  transform: translateY(0.5px);
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.err {
  color: var(--err);
  background: var(--err-bg);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 12px;
  white-space: pre-wrap;
}

.ok {
  color: var(--ok);
  background: var(--ok-bg);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 12px;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 8px;
  font-size: 13px;
  vertical-align: top;
}

table thead th {
  color: #334155;
  font-weight: 800;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  font-size: 12px;
  font-weight: 800;
  background: #ffffff;
  color: #334155;
}

.pill.approved {
  background: var(--pill-approved-bg);
  color: var(--pill-approved);
  border-color: rgba(34, 197, 94, 0.35);
}

.pill.tentative {
  background: var(--pill-tentative-bg);
  color: var(--pill-tentative);
  border-color: rgba(245, 158, 11, 0.35);
}

.pill.canceled {
  background: var(--pill-canceled-bg);
  color: var(--pill-canceled);
  border-color: rgba(100, 116, 139, 0.35);
}

.pill.rejected {
  background: var(--pill-rejected-bg);
  color: var(--pill-rejected);
  border-color: rgba(239, 68, 68, 0.35);
}

tr.clickable:hover {
  background: rgba(15, 23, 42, 0.04);
}

button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.hidden {
  display: none !important;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
/* =========================
   Tentatives notice banner
   ========================= */
.tentativesNotice {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
}

.tentativesNotice.hidden {
  display: none !important;
}

.tnInner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.tnTitle {
  font-weight: 900;
  font-size: 14px;
}

.tnDesc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.tnRight {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}

.tnLink {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  text-decoration: none;
  color: var(--text);
  background: rgba(234, 179, 8, 0.12); /* subtle “new” tint */
}

.tnLink:hover {
  background: rgba(234, 179, 8, 0.18);
}

.tnDismiss {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-2);
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 720px) {
  .tnInner {
    flex-direction: column;
    align-items: stretch;
  }
  .tnRight {
    justify-content: space-between;
  }
}

/* modal */
.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 9999;
}

.modalOverlay.show {
  display: flex;
}

.modalCard {
  width: min(820px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
  position: relative;
}

.modalClose {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  z-index: 10000;
}

.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 10px;
  font-size: 13px;
}

.kv b {
  color: #334155;
}

#copyMsg {
  padding: 8px 10px;
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.02);
}
/* Make secondary buttons visually lighter without changing HTML */
button#detailClose,
button.modalClose {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border-2);
}

/* Keep inputs full-width nicer on wide rows */
label {
  line-height: 1.2;
}

/* Detail modal: give the application editor area clearer separation */
#appFormWrap,
#appJsonDetails {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.015);
}

#applicationJson {
  background: #ffffff;
}
/* =========================
   Button tone refinements
   ========================= */

/* Base subtle hover for all buttons */
button {
  transition:
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    transform 0.05s ease;
}

button:hover:not([disabled]) {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

/* Primary action hints (very light) */
button[data-act="approve"],
button.approve {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #166534;
}

button[data-act="cancel"],
button.cancel {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #991b1b;
}

/* Keep disabled calm */
button[disabled] {
  box-shadow: none !important;
}

/* =========================
   Modal focus enhancement
   ========================= */

/* Buttons inside modal: slightly higher contrast */
.modalCard button:not([disabled]) {
  background: #eef2f7;
  border-color: #cbd5e1;
}

.modalCard button:hover:not([disabled]) {
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

/* Modal primary actions stand out a bit more */
.modalCard button[data-act="approve"] {
  background: rgba(34, 197, 94, 0.18);
}

.modalCard button[data-act="cancel"] {
  background: rgba(239, 68, 68, 0.18);
}

/* ===== Series bulk buttons ===== */
#seriesActions,
#seriesActionsWrap,
#seriesBulkActions,
#seriesBlock {
  /* どれか存在する想定。存在した要素だけ効く */
}

#seriesActions button,
#seriesActionsWrap button,
#seriesBulkActions button,
#seriesBlock button {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ラッパーが seriesActions の場合（あなたの画面に近い） */
#seriesActions {
  margin-top: 10px;
}

/* ボタン群を“整列させる箱”がある前提で、無くても崩れにくいように */
#seriesActions .seriesBtns,
#seriesActions .btnRow,
#seriesActions .actionsRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* もし .seriesBtns 等が無い場合でも、直下のボタンを並べる */
#seriesActions > button {
  margin: 6px 8px 0 0;
}

/* 見た目：主要アクションのメリハリ（クラスが無くてもIDで当てる） */
#seriesConfirm {
  /* 確定 */
  background: #9f1239;
  color: #fff;
  border: 1px solid #fecdd3;
}
#seriesApprove {
  /* 申込 */
  background: #e7f7ea;
  color: #14532d;
  border: 1px solid #86efac;
}
#seriesTentative {
  /* 仮に戻す */
  background: #eef2ff;
  color: #1e3a8a;
  border: 1px solid #c7d2fe;
}
#seriesCancel {
  /* キャンセル */
  background: #1f2937;
  color: #ffffff;
  border: 1px solid #1f2937;
}

/* 補助：編集一括反映（控えめに） */
#seriesApply {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #d1d5db;
}

/* 無効時 */
#seriesActions button:disabled,
#seriesActionsWrap button:disabled,
#seriesBulkActions button:disabled,
#seriesBlock button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* =========================
         Applicant form alignment
         ========================= */
.appGrid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.appGrid .f {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.appGrid .f span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.appGrid .f input,
.appGrid .f textarea {
  width: 100%;
  box-sizing: border-box;
}

.span-12 {
  grid-column: span 12;
}
.span-8 {
  grid-column: span 8;
}
.span-6 {
  grid-column: span 6;
}
.span-4 {
  grid-column: span 4;
}

@media (max-width: 900px) {
  .appGrid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .span-12 {
    grid-column: span 6;
  }
  .span-8 {
    grid-column: span 6;
  }
  .span-6 {
    grid-column: span 6;
  }
  .span-4 {
    grid-column: span 6;
  }
}

/* =========================
         Internal calendar (iQube-like)
         ========================= */
.calHeader {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.calTitle {
  font-weight: 900;
  font-size: 16px;
}
.calCtrls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.calYm {
  font-weight: 900;
  padding: 6px 10px;
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.02);
}

.calGrid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.calDow {
  background: rgba(15, 23, 42, 0.03);
  border-bottom: 1px solid var(--border);
  font-weight: 900;
  color: #334155;
  padding: 10px;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.calCell {
  min-height: 110px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
}
.calCell:nth-child(7n) {
  border-right: none;
}

.calDayHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.calDayNum {
  font-weight: 900;
  font-size: 12px;
  color: #334155;
}
.calDayNum.mutedDay {
  color: #94a3b8;
}
.calBadge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  color: #475569;
  background: rgba(15, 23, 42, 0.02);
}

.calEvents {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.calEvt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: rgba(100, 116, 139, 0.08);
  color: #0f172a;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}
.calEvt:hover {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}
.calEvt .l {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calEvt .room {
  font-weight: 900;
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(148, 163, 184, 0.15);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  flex: 0 0 auto;
}
.calEvt .txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calEvt .t {
  font-variant-numeric: tabular-nums;
  color: #475569;
  flex: 0 0 auto;
}

.calEvt.confirmed {
  background: rgba(242, 128, 204, 0.12);
  border-color: rgba(242, 128, 204, 0.35);
}

.calEvt.approved {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}
.calEvt.tentative {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}
.calEvt.canceled {
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.25);
  opacity: 0.75;
}
.calEvt.rejected {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

.calMore {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px dashed var(--border-2);
  background: rgba(15, 23, 42, 0.02);
  color: #475569;
  cursor: pointer;
  text-align: center;
}

@media (max-width: 900px) {
  .calCell {
    min-height: 96px;
    padding: 7px;
  }
  .calEvt {
    font-size: 12px;
  }
  .calYm {
    width: 100%;
    text-align: center;
  }
}

.calEvt .car {
  font-weight: 900;
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(148, 163, 184, 0.12);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  flex: 0 0 auto;
}

/* ===== 内部カレンダー：バー情報量UP ===== */

/* バー全体：少し小さく、2行を活かす */
.calEvt {
  font-size: 11px;
  line-height: 1.25;
  align-items: flex-start; /* 上詰め */
}

/* 左側：バッジ類は1行目、テキストは2行目へ */
.calEvt .l {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px 6px;
}

/* バッジ（部屋/車）は小さめ */
.calEvt .room,
.calEvt .car {
  font-size: 10px;
  padding: 1px 5px;
}

/* 団体名テキスト：2行まで表示（必ず次の行へ回す） */
.calEvt .txt {
  flex: 1 1 100%; /* ここで改行して2行目に落とす */
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 11px;
  line-height: 1.25;
}

/* 時刻：右側は小さめで固定 */
.calEvt .t {
  font-size: 10px;
  margin-left: 6px;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* カレンダーセルの中でイベントがはみ出さないように */
.calCell {
  overflow: hidden;
}

/* イベント一覧領域は縦に積む＆間隔を一定に */
.calEvents {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}

/* 予約バーは2行表示・小さめ・行間詰め */
.calEvt .txt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
}

/* 右側情報（時間など）は小さめ */
.calEvt .t {
  font-size: 10px;
  opacity: 0.85;
}

/* バッジが上に乗って読めなくなるのを防ぐ */
.calBadge {
  z-index: 2;
}

/* 3件以上でグレー化していたのは「高さ不足」が原因なことが多いので下駄を履かせる */
.calCell {
  padding-bottom: 8px;
}

.calEvt {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 6px;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}
.calEvt .l {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column; /* 2行化 */
  gap: 2px;
}
.calEvt .l .room {
  font-size: 10px;
  opacity: 0.85;
}
.calEvt .l .txt {
  font-size: 11px; /* 小さめ */
  white-space: nowrap; /* まずは崩さず */
  overflow: hidden;
  text-overflow: ellipsis;
}
.calEvt .t {
  font-size: 10px;
  opacity: 0.8;
  white-space: nowrap;
}
.calEvt .car {
  font-size: 12px;
  margin-left: 2px;
}

.portalHeader {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e6e8ee;
}

.phInner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.phBrand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 180px;
}

.phLogo {
  font-weight: 800;
  letter-spacing: 0.04em;
}
.phSub {
  font-size: 12px;
  color: #6b7280;
}

.phNav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.phLink {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  border: 1px solid transparent;
}
.phLink:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.phRight {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.phBtn {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 720px) {
  .phBrand {
    min-width: auto;
  }
  .phSub {
    display: none;
  }
}

.portalHeader {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e6e8ee;
}

.phInner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.phBrand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 180px;
}

.phLogo {
  font-weight: 800;
  letter-spacing: 0.04em;
}
.phSub {
  font-size: 12px;
  color: #6b7280;
}

.phNav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.phLink {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  border: 1px solid transparent;
}
.phLink:hover {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.phRight {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.phBtn {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
}

@media (max-width: 720px) {
  .phBrand {
    min-width: auto;
  }
  .phSub {
    display: none;
  }
}

.setFullDay {
  margin-left: 8px;
}

/* ===== 今日の背景（内部カレンダー） ===== */
.is-today {
  background: rgba(255, 220, 120, 0.35); /* やさしい黄色 */
  box-shadow: inset 0 0 0 2px #f4b400;
}

/* 予約バーがある日でも見えるように */
.is-today .calEvt {
  border-color: #f4b400;
}

/* バー全体の形（画像っぽい丸いカプセル） */
.calEvt {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* 左の縦バッジ（確定/申込/仮/キャンセル） */
.calEvtBadge {
  width: 20px;
  min-width: 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 9px;
  line-height: 1.05;
  letter-spacing: 0.05em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 中身 */
.calEvtMain {
  flex: 1;
  min-width: 0;
  /* reserve space for icons pinned on the right */
  padding-right: 44px;
}

.calEvtTop {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  /* allow the content to shrink without clipping the pinned icon */
  min-width: 0;
  overflow: visible;
}

.calEvtStudio {
  font-weight: 900;
  font-size: 11px;
  flex: 0 0 auto;
}

.calEvtTime {
  font-weight: 900;
  font-size: 10px;
  flex: 0 0 auto;
}

/* Keep the car icon visible even when the bar is narrow */
/* Right-bottom icon rail (🚗 / 🏢 etc.) */
.calEvtIcons {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  z-index: 2;
  pointer-events: none;
}

.calEvtIcon,
.calEvtCar,
.calEvtBiz {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 12px;
  line-height: 1;
}

.calEvtTitle {
  margin-top: 3px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .calEvtMain {
    padding-right: 40px;
  }
  .calEvtIcons {
    right: 6px;
    bottom: 6px;
    gap: 5px;
  }
  .calEvtIcon,
  .calEvtCar,
  .calEvtBiz {
    width: 18px;
    height: 18px;
    font-size: 15px;
  }
}

/* 背景色（部屋ごと） */
.calEvt[data-room="A"] {
  background: #f2a5c8;
}
.calEvt[data-room="B"] {
  background: #a8c7ff;
}
.calEvt[data-room="C"] {
  background: #bde8c7;
}
.calEvt[data-room="D"] {
  background: #ffd3a5;
}

/* 枠色は少し濃くして輪郭を出す（任意） */
.calEvt[data-room="A"] {
  border-color: rgba(198, 53, 130, 0.25);
}
.calEvt[data-room="B"] {
  border-color: rgba(45, 104, 206, 0.25);
}
.calEvt[data-room="C"] {
  border-color: rgba(44, 140, 82, 0.25);
}
.calEvt[data-room="D"] {
  border-color: rgba(190, 110, 25, 0.25);
}

.calEvt[data-status="confirmed"] .calEvtBadge {
  background: #dfe8ff;
}
.calEvt[data-status="approved"] .calEvtBadge {
  background: #fff0cf;
}
.calEvt[data-status="tentative"] .calEvtBadge {
  background: #eeeeee;
}
.calEvt[data-status="canceled"] .calEvtBadge {
  background: #ffd6d6;
}

.calCell.is-closed {
  background: rgba(255, 0, 0, 0.06);
}
.calCell.is-closed .calDayNum::after {
  content: "休";
  margin-left: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #c2410c;
  border: 1px solid rgba(194, 65, 12, 0.35);
  border-radius: 999px;
  padding: 1px 6px;
  background: rgba(251, 146, 60, 0.12);
}

.calClosedMark {
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

/* =========================
   Series bulk buttons layout polish
   ========================= */

/* ボタンが5個でも綺麗に折り返す（キャンセルは1段下に落とす） */
#seriesActions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

#seriesActions button {
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

/* 主要4ボタンは同じ幅感で */
#seriesApply,
#seriesConfirm,
#seriesApprove,
#seriesTentative {
  min-width: 170px;
}

/* 破壊的アクションは単独行 */
#seriesCancel {
  flex-basis: 100%;
  max-width: 340px;
  margin-top: 2px;
}

@media (max-width: 720px) {
  #seriesActions {
    gap: 10px;
  }

  #seriesActions button {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  #seriesCancel {
    max-width: none;
  }
}

/* Ensure the other buttons don’t shrink too much */
#seriesConfirm,
#seriesApprove,
#seriesTentative,
#seriesApply {
  min-width: 170px;
}

@media (max-width: 720px) {
  #seriesActions {
    gap: 10px;
  }
  #seriesConfirm,
  #seriesApprove,
  #seriesTentative,
  #seriesApply,
  #seriesCancel {
    min-width: 0;
    flex: 1 1 100%;
    max-width: none;
  }
}

/* =========================
   Applicant form: checkbox alignment (駐車場 / 弊社利用)
   =========================

   NOTE:
   :has() を使わず、HTML側にクラスを付けて安定させる。
   （Safari/Chrome で確実に効く）

   推奨HTML:
     <div class="f span-4 chkField">
       <span>駐車場</span>
       <label class="chkLabel">
         <input id="parkingUse" type="checkbox" />
         <span>利用あり</span>
       </label>
     </div>

     <div class="f span-4 chkField">
       <span>&nbsp;</span>
       <label class="chkLabel">
         <input id="internalUse" type="checkbox" />
         <span>弊社利用</span>
       </label>
     </div>
*/

/* チェックボックス系フィールドは中央寄せ（列の中で綺麗に見える） */
.chkField {
  align-items: center;
}

/* 見出し（駐車場 等）は左寄せのまま、幅だけ揃える */
.chkField > span {
  width: 100%;
  margin: 0;
  margin-bottom: 4px;
  text-align: left;
}

/* label を“横並び・同じ高さ”に固定 */
.chkLabel {
  width: 100%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px;
  gap: 10px;
  padding: 0;
  margin: 0;
}

/* row クラスが付いていても崩さない */
.chkLabel.row {
  flex-wrap: nowrap;
  align-items: center;
}

/* checkbox の見た目を安定 */
.chkLabel input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #334155;
  flex: 0 0 auto;
}

/* ラベル文字 */
.chkLabel span {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
}

.calEvtCar {
  margin: 0;
}


/* ===== Modal separators & section titles (detail modal) ===== */

/* separators: ブロックの分離を強くする */
.modalCard hr.sepSingle,
.modalCard .sepSingle{
  border: none;
  border-top: 1px solid rgba(15, 23, 42, 0.14);
  margin: 26px 0;
}

.modalCard hr.sepDouble,
.modalCard .sepDouble{
  border: none;
  border-top: 3px double rgba(15, 23, 42, 0.22);
  margin: 32px 0;
}

/* section title typography: 「本気っぽい」見出し感 */
.modalCard .sectionTitle{
  display: inline-block;
  font-weight: 900;
  letter-spacing: 0.6px;
  font-size: 14px;
  color: rgba(15, 23, 42, 0.92);
  padding: 2px 0;
}

.modalCard .sectionMeta{
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.72);
}

/* ID行も“見出しの下のメタ行”に寄せる */
.modalCard .seriesMeta .seriesId{
  margin-top: 2px;
}

/* =========================
   Detail modal: section spacing normalization
   ========================= */

/* 共通：セクションブロック（見出し＋中身） */
.modalCard .sectionBlock {
  margin-top: 0;
}

/* セクション見出し直後の余白を統一 */
.modalCard .sectionTitle {
  display: block;
  margin: 0 0 8px;
  line-height: 1.25;
}

/* 見出しの補足（ID行など） */
.modalCard .sectionMeta {
  margin: 2px 0 0;
  line-height: 1.25;
}

/* 見出し直後の“ボタン群／入力群”の行を統一 */
.modalCard .sectionRow {
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* 行の下に入る補足文との間隔 */
.modalCard .sectionRow + .muted {
  margin-top: 6px;
}

/* セパレータ前後の空きも統一（既存値より少しだけ整える） */
.modalCard hr.sepSingle,
.modalCard .sepSingle {
  margin: 28px 0;
}

.modalCard hr.sepDouble,
.modalCard .sepDouble {
  margin: 32px 0;
}