/* 豊川稲荷 御開帳祈祷受付システム — 共通スタイル */
/* デモ index.html の <style> を外部化（本実装で流用） */

/* ═══════════════════════════════════════
   リセット & CSS変数
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ミニマム配色：クールニュートラル＋赤アクセント（白・黒・赤） */
  --bg:        #f6f7f8;   /* クールな淡グレー */
  --bg-card:   #ffffff;
  --bg-deep:   #ffffff;
  --bg-hover:  #f0f1f3;
  --border:    #e7e9ec;
  --border-mid:#d6d9de;
  --text:      #18181b;
  --text-dim:  #71717a;
  --text-sub:  #52525b;
  --red:       #d33f30;
  --red-light: #e2574a;
  /* アクセント（旧「金」）は赤系、--gold-dim は中立グレー枠線に転用 */
  --gold:      #d33f30;
  --gold-dim:  #cdd1d7;
  --gold-bg:   rgba(211,63,48,0.07);
  --green:     #2e7d32;
  --green-bg:  #e6f4ea;
  --amber:     #c77f0a;
  --amber-bg:  #fbf0d6;
  --blue:      #1565c0;

  /* タッチ向け基準 */
  --touch-min: 56px;    /* 最小タップターゲット */
  --radius:    10px;
  --radius-lg: 14px;
}

html { -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
input {
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
}
/* インラインSVGアイコン（絵文字置換） */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex-shrink: 0; }

/* ═══════════════════════════════════════
   ナビゲーション
═══════════════════════════════════════ */
.nav {
  display: flex;
  align-items: stretch;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 64px;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  margin-right: auto;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-tab {
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: transparent;
  color: var(--text-dim);
  font-size: 16px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  min-width: var(--touch-min);
  white-space: nowrap;
}
.nav-tab:hover  { color: var(--text); background: rgba(0,0,0,0.04); }
.nav-tab:active { background: rgba(0,0,0,0.07); }
.nav-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: var(--gold-bg);
  font-weight: 700;
}

.nav-clock {
  display: flex;
  align-items: center;
  margin-left: 12px;
  font-size: 20px;
  color: var(--text-dim);
  min-width: 60px;
  justify-content: flex-end;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════
   画面切り替え
═══════════════════════════════════════ */
.screen { display: none; }
.screen.active { display: flex; flex-direction: column; min-height: calc(100vh - 64px); }

/* ═══════════════════════════════════════
   ダッシュボード
═══════════════════════════════════════ */
#screen-dashboard { flex-direction: row; }

.dash-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dash-stat-label {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.dash-stat-value { font-size: 40px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.dash-stat-unit  { font-size: 16px; color: var(--text-dim); margin-top: 2px; }
.occupancy-ring  { width: 110px; height: 110px; margin: 4px auto 0; }

.dash-main { flex: 1; padding: 20px 28px; overflow-y: auto; }

.countdown-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.countdown-label { font-size: 15px; color: var(--text-dim); white-space: nowrap; }
.countdown-time  {
  font-size: 44px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  min-width: 100px;
  line-height: 1;
}
.countdown-next  { font-size: 15px; color: var(--text-dim); margin-left: auto; white-space: nowrap; }

.room-grid { display: flex; flex-direction: column; gap: 10px; }

/* ─── 控室一覧ページ ─── */
#screen-rooms { align-items: flex-start; padding: 28px; overflow-y: auto; min-height: calc(100vh - 64px); }
.rooms-page { width: 100%; max-width: 920px; margin: 0 auto; }
.rooms-page-head { margin-bottom: 20px; }
.rooms-page-title { font-size: 22px; font-weight: 700; letter-spacing: 0.01em; }
.rooms-page-sub { font-size: 14px; color: var(--text-dim); margin-top: 4px; }

.room-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: var(--touch-min);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.room-card:hover  { border-color: var(--gold-dim); background: var(--bg-hover); }
.room-card:active { background: var(--bg-hover); }
.room-card.full   { border-color: var(--red); background: rgba(192,57,43,0.06); }
.room-card.warn   { border-color: var(--amber); background: rgba(240,192,64,0.04); }

.room-card-header { display: flex; align-items: center; margin-bottom: 10px; gap: 10px; }
.room-card-name   { font-size: 17px; font-weight: 700; flex: 1; }
.room-card-count  { font-size: 15px; color: var(--text-dim); font-weight: 700; }
.room-badge-full  { background: var(--red); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.room-badge-floor { font-size: 12px; color: var(--text-dim); border: 1px solid var(--border-mid); padding: 2px 8px; border-radius: 20px; }
.room-bar-bg      { width: 100%; height: 14px; background: var(--border); border-radius: 7px; overflow: hidden; }
.room-bar-fill    { height: 100%; border-radius: 7px; transition: width 0.5s ease; background: var(--green); }
.room-bar-fill.warn { background: var(--amber); }
.room-bar-fill.full { background: var(--red); }

/* ═══════════════════════════════════════
   モーダル
═══════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 680px;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-head {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-title { font-size: 20px; font-weight: 700; flex: 1; }
.modal-close {
  width: 48px;
  height: 48px;
  background: var(--bg-hover);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.modal-close:hover  { background: var(--red); color: #fff; }
.modal-close:active { background: var(--red-light); color: #fff; }
.modal-body { padding: 16px 28px 28px; overflow-y: auto; }

.waiting-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  row-gap: 8px;
  min-height: var(--touch-min);
  flex-wrap: wrap;
}
.waiting-ticket { font-size: 18px; font-weight: 700; color: var(--gold); min-width: 64px; flex-shrink: 0; }
.waiting-name-col { flex: 1 1 150px; min-width: 130px; }
.waiting-name   { font-size: 17px; white-space: nowrap; }
.status-badge   { font-size: 13px; padding: 5px 14px; border-radius: 20px; font-weight: 700; white-space: nowrap; }
.status-reserved { background: #eceef2; color: #5b6577; }
.status-waiting  { background: var(--green-bg); color: var(--green); }
.status-called   { background: rgba(192,57,43,0.1); color: var(--red); }
.status-entered  { background: #eceef2;          color: #5b6577; }

/* ステータス変更プルダウン */
.status-select {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  padding: 6px 30px 6px 12px;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  background: var(--bg-card)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.6'/></svg>")
    no-repeat right 10px center;
  color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.status-select:hover { border-color: var(--red); }
.status-select-bulk  { background-color: #fff; }

/* ═══════════════════════════════════════
   受付フロー — 共通
═══════════════════════════════════════ */
#screen-reception {
  align-items: flex-start;
  padding: 24px 28px;
  overflow-y: auto;
}

.reception-container { width: 100%; max-width: 900px; margin: 0 auto; }

/* ステップインジケーター */
.step-indicator { display: flex; margin-bottom: 28px; }
.step-dot {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  padding: 10px 4px;
  border-bottom: 3px solid var(--border);
  transition: all 0.2s;
  white-space: nowrap;
}
.step-dot.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 700; font-size: 15px; }
.step-dot.done   { color: var(--green); border-bottom-color: var(--green); }

.step-panel { display: none; }
.step-panel.active { display: block; }

.step-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gold);
}
.step-sub { font-size: 16px; color: var(--text-dim); margin-bottom: 22px; }

/* ─── Step 1: 顧客照合 ─── */
.search-wrap { position: relative; margin-bottom: 16px; }
.search-input {
  width: 100%;
  padding: 18px 60px 18px 22px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 20px;
  font-family: inherit;
  transition: border-color 0.2s;
  height: var(--touch-min);
}
.search-input:focus { border-color: var(--gold); }
.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--text-dim);
  pointer-events: none;
}

.visitor-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.visitor-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  transition: border-color 0.15s, background 0.15s;
  touch-action: manipulation;
}
.visitor-item:active { background: var(--bg-hover); }
.visitor-icon { font-size: 24px; flex-shrink: 0; }
.visitor-info { flex: 1; min-width: 0; }
.visitor-name-jp   { font-size: 20px; font-weight: 700; }
.visitor-name-kana { font-size: 14px; color: var(--text-dim); }
.visitor-meta      { font-size: 14px; color: var(--text-sub); margin-top: 2px; }
.visitor-count     { color: var(--gold); font-weight: 700; }

.btn-select {
  padding: 12px 24px;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  min-height: 48px;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-select:hover  { background: var(--gold); }
.btn-select:active { background: var(--gold); transform: scale(0.97); }

.btn-new-visitor {
  width: 100%;
  padding: 0 20px;
  height: var(--touch-min);
  background: transparent;
  border: 2px dashed var(--border-mid);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 17px;
  text-align: center;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-new-visitor:hover  { border-color: var(--gold-dim); color: var(--text); }
.btn-new-visitor:active { background: var(--bg-card); }

/* 新規登録フォーム */
.new-visitor-form {
  display: none;
  background: var(--bg-card);
  border: 2px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 14px;
}
.new-visitor-form.open { display: block; }
.form-title { font-size: 18px; font-weight: 700; color: var(--gold); margin-bottom: 20px; }
.form-row { margin-bottom: 16px; }
.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.form-label .required { font-size: 12px; color: var(--red); font-weight: 700; }
.form-label .optional { font-size: 12px; color: var(--text-dim); border: 1px solid var(--border-mid); padding: 1px 6px; border-radius: 10px; }
.form-input {
  width: 100%;
  height: var(--touch-min);
  padding: 0 20px;
  background: var(--bg-deep);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 20px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--gold); background: #fffdf9; }
.form-input::placeholder { color: #b3ada1; font-size: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end; }

/* ─── Step 2: 種別選択 ─── */
.ritual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.ritual-btn {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  text-align: center;
  transition: all 0.15s;
  color: var(--text);
  min-height: 90px;
  touch-action: manipulation;
}
.ritual-btn:hover  { border-color: var(--gold-dim); background: var(--bg-hover); }
.ritual-btn:active { transform: scale(0.97); }
.ritual-btn.selected {
  border-color: var(--gold);
  background: var(--gold-bg);
  box-shadow: 0 0 0 1px var(--gold-dim);
}
.ritual-label  { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.ritual-amount { font-size: 22px; color: var(--gold); font-weight: 700; }

.group-size-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  min-height: var(--touch-min);
}
.group-size-label-block { flex: 1; }
.group-size-label { font-size: 17px; }
.group-size-note  { font-size: 14px; color: var(--text-dim); margin-top: 2px; }

/* 受付フローの会計プレビュー */
.reception-fee {
  margin-top: 16px;
  background: var(--gold-bg);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.7;
}
.reception-fee .rcp-fee-hint { color: var(--text-dim); font-size: 14px; }
.reception-fee .rcp-fee-muted { color: var(--text-dim); }
.reception-fee .rcp-fee-total {
  margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--border-mid);
  font-size: 19px; font-weight: 700; color: var(--red);
}
.reception-fee .rcp-fee-note { font-size: 12px; font-weight: 400; color: var(--text-dim); margin-left: 6px; }

.btn-counter {
  width: 56px;
  height: 56px;
  background: var(--bg-hover);
  border: 1.5px solid var(--border-mid);
  border-radius: 50%;
  font-size: 28px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
  touch-action: manipulation;
}
.btn-counter:hover  { background: var(--gold-dim); }
.btn-counter:active { background: var(--gold); transform: scale(0.92); }
.group-size-val { font-size: 32px; font-weight: 700; min-width: 48px; text-align: center; }

/* ─── Step 3: フロアマップ ─── */
.floormap-wrap {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 12px;
  margin-bottom: 16px;
}
.floormap-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-dim);
  align-items: center;
  flex-wrap: wrap;
}
.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}
.floormap-svg { width: 100%; display: block; }

.room-area {
  cursor: pointer;
}
.room-area rect.room-rect { transition: filter 0.12s; }
.room-area:active rect.room-rect { filter: brightness(1.4) !important; }
.room-area.selected rect.room-rect { stroke: #c0392b !important; stroke-width: 3.5 !important; filter: brightness(0.97); }
.room-area.room-full { cursor: not-allowed; opacity: 0.55; }

.selected-room-panel {
  background: var(--gold-bg);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 72px;
}
.selected-room-panel.empty {
  border-color: var(--border);
  background: transparent;
}
.selected-room-info { flex: 1; }
.selected-room-name { font-size: 22px; font-weight: 700; }
.selected-room-meta { font-size: 15px; color: var(--text-dim); margin-top: 2px; }
.selected-ticket-no { font-size: 32px; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; }

/* ─── Step 4: 整理券（サーマルレシート風・細幅縦長） ─── */
.ticket-preview {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px dashed #b5ab98;
  border-radius: 4px;
  width: 320px;
  max-width: 100%;
  margin: 0 auto 24px;
  padding: 26px 28px 22px;
  font-family: 'Noto Serif JP', serif;
  text-align: center;
  box-shadow: 0 6px 22px rgba(0,0,0,0.14);
}
.ticket-header        { font-size: 15px; color: #1a1a1a; font-weight: 700; letter-spacing: 0.14em; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed #d8d0c2; }
.ticket-visitor-name  { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.ticket-no-label      { font-size: 13px; color: #777; letter-spacing: 0.1em; margin-bottom: 2px; }
.ticket-number-display{ font-size: 60px; font-weight: 700; color: #c0392b; letter-spacing: 0.08em; margin-bottom: 18px; line-height: 1; }
.ticket-field         { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; padding: 9px 0; border-top: 1px dashed #d8d0c2; }
.ticket-field-label   { color: #777; font-size: 13px; white-space: nowrap; }
.ticket-field-val     { font-weight: 700; text-align: right; }
.ticket-foot          { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #d8d0c2; font-size: 12px; color: #888; line-height: 1.6; }

/* ═══════════════════════════════════════
   共通ボタン
═══════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--touch-min);
  padding: 0 36px;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-primary:hover    { background: var(--gold); }
.btn-primary:active   { background: var(--gold); transform: scale(0.96); }
.btn-primary:disabled { background: #e4ddce; color: #aaa295; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--touch-min);
  padding: 0 28px;
  background: transparent;
  border: 2px solid var(--border-mid);
  color: var(--text-dim);
  border-radius: var(--radius);
  font-size: 17px;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover  { border-color: var(--text-sub); color: var(--text); }
.btn-secondary:active { background: var(--bg-card); transform: scale(0.96); }

.btn-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--touch-min);
  padding: 0 32px;
  background: var(--red);
  color: #fff;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  transition: background 0.15s, transform 0.1s;
  gap: 8px;
  white-space: nowrap;
}
.btn-print:hover  { background: var(--red-light); }
.btn-print:active { transform: scale(0.96); }

.step-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  justify-content: flex-end;
}

/* ═══════════════════════════════════════
   来場者案内板（管理画面カラーに統一：ライトテーマ）
═══════════════════════════════════════ */
/* 1440px程度の横長モニターで、スクロールなし・1画面完結 */
#screen-display {
  background: var(--bg);
  justify-content: center;
  align-items: center;
  height: calc(100vh - 64px);
  min-height: 0;
  overflow: hidden;
  padding: 32px 40px;
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
}
/* 案内板は受付でスタンドアロン常時表示：ヘッダー（ナビ）を隠して全画面化 */
body:has(#screen-display.active) .nav { display: none; }
body:has(#screen-display.active) #screen-display { height: 100vh; }
.display-inner {
  width: 100%;
  height: 100%;
  max-width: 1320px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 24px;
}
/* 共通カード */
.disp-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
  box-shadow: 0 1px 3px rgba(24,24,27,0.04);
  min-height: 0;
  overflow: hidden;
}
.disp-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border);
}

/* ① 次のご祈祷まで（上段・横幅いっぱいのヒーロー） */
.disp-card-countdown {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.display-countdown-label {
  font-size: 22px;
  color: var(--text-dim);
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}
.display-countdown-time {
  font-size: clamp(72px, 9vh, 108px);
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  letter-spacing: 0.02em;
}

/* ② 次回ご案内予定の整理券番号 */
.display-next-section { }
.display-next-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  text-align: left;
}
.display-next-row:first-child { border-top: none; padding-top: 0; }
.display-next-room {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-sub);
  min-width: 200px;
  padding-top: 6px;
  flex-shrink: 0;
}
.display-next-tickets {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.display-ticket-badge {
  /* 館内モニターで遠くからでも読めるよう、画面サイズに応じて拡大（連番まとめで件数は少ないため大きくできる） */
  font-size: clamp(26px, 2.6vw, 46px);
  font-weight: 700;
  color: var(--red);
  background: var(--gold-bg);
  border: 2px solid var(--red);
  border-radius: 12px;
  padding: 8px 26px;
  letter-spacing: 0.06em;
  line-height: 1.35;
}
.display-ticket-badge.called {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}
.display-no-waiting {
  font-size: 18px;
  color: var(--text-dim);
  text-align: center;
  padding: 12px 0;
}

/* 窓口受付：御祈祷者ブロック（複数人） */
.rcp-part {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
}
.rcp-part-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 8px;
}

/* 呼出済み一覧（連番まとめ表示） */
.display-called-done {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.display-ticket-badge.done {
  color: var(--text-dim);
  background: #f3f0ea;
  border: 2px solid var(--border);
  font-size: clamp(24px, 2.4vw, 42px);
  font-weight: 600;
}

/* ═══════════════════════════════════════
   受付モード切替（個人 / 団体）
═══════════════════════════════════════ */
.reception-mode-toggle {
  display: flex;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 5px;
  margin-bottom: 24px;
  gap: 5px;
}
.mode-btn {
  flex: 1;
  height: 52px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dim);
  background: transparent;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}
.mode-btn:hover  { background: var(--bg-hover); color: var(--text); }
.mode-btn:active { transform: scale(0.97); }
.mode-btn.active { background: var(--red); color: #fff; }
.mode-btn.active.is-group { background: #e6f4ea; color: var(--green); border: 1.5px solid var(--green); }

/* 団体フォーム */
.group-form {
  background: var(--bg-card);
  border: 2px solid #2a5a30;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
}
.group-form-title { font-size: 18px; font-weight: 700; color: var(--green); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.group-note-bar {
  background: rgba(192,57,43,0.07);
  border: 1px solid rgba(192,57,43,0.3);
  border-left: 4px solid var(--red);
  color: #8a2318;
  font-size: 14px;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  line-height: 1.7;
}
.group-note-bar strong { color: var(--red); }
.headcount-row { display: flex; align-items: center; gap: 16px; }
.headcount-input { max-width: 180px; }
.headcount-unit  { font-size: 18px; color: var(--text-dim); }

/* 団体整理券 */
.ticket-group-badge {
  display: inline-block;
  background: #e6f4ea;
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 12px;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

/* ─── モーダル：フィルタバー ─── */
.modal-filter-bar { display:flex; gap:6px; padding:10px 0 12px; border-bottom:1px solid var(--border); margin-bottom:4px; flex-wrap:wrap; }
.modal-filter-btn {
  padding: 5px 13px; border-radius: 20px; font-size: 13px; font-family: inherit;
  cursor: pointer; border: 1.5px solid var(--border); background: transparent;
  color: var(--text-dim); transition: all 0.12s; touch-action: manipulation;
}
.modal-filter-btn:hover  { border-color:var(--border-mid); color:var(--text); }
.modal-filter-btn.active { border-color:var(--gold); background:var(--gold-bg); color:var(--gold); font-weight:700; }

/* ─── モーダル：一括操作バー ─── */
.modal-bulk-bar {
  display:flex; align-items:center; gap:8px; padding:10px 14px;
  background:rgba(201,164,74,0.07); border:1px solid var(--gold-dim);
  border-radius:8px; margin-bottom:8px; flex-wrap:wrap;
}
.modal-bulk-count { font-size:14px; color:var(--gold); font-weight:700; margin-right:4px; flex-shrink:0; }

/* ─── モーダル：全選択行 ─── */
.modal-select-all { display:flex; align-items:center; padding:8px 2px 6px; border-bottom:1px solid var(--border); margin-bottom:2px; }
.modal-checkbox-wrap { display:flex; align-items:center; cursor:pointer; touch-action:manipulation; gap:8px; }
.modal-checkbox {
  width:22px; height:22px; cursor:pointer; flex-shrink:0;
  /* グローバルの input{appearance:none} を打ち消してネイティブ描画を復活 */
  -webkit-appearance: checkbox; appearance: checkbox;
  accent-color: var(--red);
  margin: 0;
}

/* ─── 待機アイテム：よみがな ─── */
.waiting-kana { font-size:12px; color:var(--text-dim); margin-top:1px; letter-spacing:0.03em; }

/* モーダル：ステータス区切り */
.modal-section-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 12px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* ─── 時間帯別一覧パネル ─── */
.session-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.session-panel-head {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.session-panel-label { font-size: 14px; color: var(--text-dim); white-space: nowrap; letter-spacing: 0.05em; }
.session-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.session-tab {
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  transition: all 0.12s;
  touch-action: manipulation;
  white-space: nowrap;
}
.session-tab:hover  { border-color: var(--border-mid); color: var(--text); }
.session-tab.active { border-color: var(--gold); background: var(--gold-bg); color: var(--gold); font-weight: 700; }
.session-tab.is-next { border-color: #2e7d32; color: var(--green); }
.session-tab.is-next.active { background: var(--green-bg); border-color: var(--green); }

.session-body { padding: 14px 20px 16px; }
.session-body-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.session-body-title { font-size: 17px; font-weight: 700; flex: 1; }
.session-body-count { font-size: 14px; color: var(--text-dim); white-space: nowrap; }
.session-print-btn {
  padding: 7px 16px;
  background: rgba(201,164,74,0.1);
  border: 1.5px solid var(--gold-dim);
  border-radius: 8px;
  color: var(--gold);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
  touch-action: manipulation;
  white-space: nowrap;
}
.session-print-btn:hover  { background: rgba(201,164,74,0.22); }
.session-print-btn:active { transform: scale(0.97); }

.session-person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.session-person-row:last-child { border-bottom: none; }
.session-person-row.is-done { opacity: 0.5; }
.session-ticket { font-size: 14px; font-weight: 700; color: var(--gold); min-width: 64px; }
.session-name-col { flex: 1; }
.session-name { font-size: 16px; font-weight: 700; }
.session-kana { font-size: 12px; color: var(--text-dim); }
.session-pcount { font-size: 13px; color: var(--text-dim); white-space: nowrap; min-width: 36px; text-align: right; }
.session-room-col { font-size: 12px; color: var(--text-dim); min-width: 120px; text-align: right; white-space: nowrap; }
.session-empty { color: var(--text-dim); font-size: 15px; padding: 4px 0; }

/* ─── セッション：一括操作・全選択 ─── */
.session-bulk-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(201,164,74,0.07);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.session-bulk-count { font-size:14px; color:var(--gold); font-weight:700; margin-right:4px; flex-shrink:0; }
.session-select-all {
  display: flex; align-items: center;
  padding: 8px 2px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.session-person-row { flex-wrap: wrap; }

/* ─── モーダル：セッションバッジ ─── */
.session-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-mid);
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.session-badge.is-next { border-color: #2e7d32; color: var(--green); background: var(--green-bg); }

/* ─── 祈祷中ステータス ─── */
.status-praying { background: rgba(192,57,43,0.12); color: #c0392b; }

/* ─── 本殿パネル ─── */
.honden-panel {
  background: #fff;
  border: 1.5px solid rgba(192,57,43,0.35);
  border-left: 4px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 20px;
}
.honden-header { display: flex; align-items: center; gap: 14px; margin-bottom: 0; }
.honden-header.has-entries { margin-bottom: 14px; }
.honden-title { font-size: 18px; font-weight: 700; color: #c0392b; }
.honden-count {
  font-size: 14px;
  background: rgba(192,57,43,0.12);
  color: #c0392b;
  border: 1px solid #9a2318;
  border-radius: 20px;
  padding: 2px 12px;
}
.honden-print-btn {
  margin-left: auto;
  padding: 8px 18px;
  background: rgba(192,57,43,0.10);
  border: 1.5px solid #9a2318;
  border-radius: 8px;
  color: #c0392b;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  touch-action: manipulation;
  white-space: nowrap;
}
.honden-print-btn:hover  { background: rgba(192,57,43,0.18); }
.honden-print-btn:active { transform: scale(0.97); }
.honden-person-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(108,52,131,0.35);
}
.honden-person-row:last-child { border-bottom: none; }
.honden-ticket { font-size: 15px; font-weight: 700; color: #c0392b; min-width: 64px; }
.honden-name-block { flex: 1; }
.honden-name { font-size: 18px; font-weight: 700; }
.honden-kana { font-size: 13px; color: var(--text-dim); }
.honden-room { font-size: 13px; color: var(--text-dim); white-space: nowrap; }
.honden-empty { font-size: 15px; color: var(--text-dim); }
.voice-note { font-size: 12px; color: var(--text-dim); margin-top: 8px; line-height: 1.6; }

/* ─── モーダル：ステータス変更ボタン ─── */
.waiting-item.is-called { background: rgba(192,57,43,0.06); border-radius: 6px; padding: 10px 6px; }
.waiting-item.is-called .waiting-ticket { color: var(--red); font-size: 16px; }
.waiting-item.is-called .waiting-name   { font-size: 16px; }
.status-btns { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.btn-status {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid;
  transition: all 0.12s;
  white-space: nowrap;
  touch-action: manipulation;
  min-height: 38px;
}
.btn-status:active { transform: scale(0.94); }
.btn-s-waiting { border-color: var(--green);  color: var(--green);  background: var(--green-bg); }
.btn-s-waiting:hover  { background: rgba(46,204,113,0.2); }
.btn-s-called  { border-color: var(--amber);  color: var(--amber);  background: var(--amber-bg); }
.btn-s-called:hover   { background: rgba(240,192,64,0.25); }
.btn-s-praying { border-color: #9a2318;       color: #c0392b;       background: rgba(192,57,43,0.10); }
.btn-s-praying:hover  { background: rgba(192,57,43,0.18); }
.btn-s-completed { border-color: var(--blue);   color: var(--blue);   background: #1a2a3a; }
.btn-s-completed:hover  { background: rgba(93,173,226,0.2); }

/* ─── アナウンス（読み上げ）ボタン ─── */
.btn-announce {
  border-color: #1976d2;
  color: #64b5f6;
  background: rgba(25,118,210,0.15);
}
.btn-announce:hover { background: rgba(25,118,210,0.32); }
.btn-announce:disabled { opacity: 0.5; cursor: not-allowed; }

/* 読み上げ中の対象者ハイライト（パルス） */
@keyframes announcePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(25,118,210,0.55); background: rgba(25,118,210,0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(25,118,210,0);    background: rgba(25,118,210,0.32); }
}
.is-announcing {
  animation: announcePulse 1.1s ease-in-out infinite;
  border-radius: 6px;
}

/* ═══════════════════════════════════════
   顧客管理画面
═══════════════════════════════════════ */
#screen-customers { padding: 28px 32px; overflow-y: auto; align-items: flex-start; }
.customers-container { width: 100%; max-width: 860px; margin: 0 auto; }
.customers-header { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.customers-title { font-size: 24px; font-weight: 700; color: var(--gold); flex: 1; }
.customers-count-badge {
  font-size: 14px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 14px;
}
.btn-add-customer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 22px; height: var(--touch-min);
  background: var(--red); color: #fff;
  border-radius: var(--radius); font-size: 16px; font-weight: 700;
  font-family: inherit; cursor: pointer; border: none; white-space: nowrap;
  transition: background 0.15s; touch-action: manipulation;
}
.btn-add-customer:hover  { background: var(--gold); }
.btn-add-customer:active { transform: scale(0.97); }

.customer-add-form {
  display: none; background: var(--bg-card);
  border: 2px solid var(--gold-dim); border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 24px;
}
.customer-add-form.open { display: block; }

.customer-search-wrap { display: flex; gap: 12px; margin-bottom: 20px; }
.customer-search-input {
  flex: 1; padding: 0 22px; height: var(--touch-min);
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 18px;
  font-family: inherit; transition: border-color 0.2s;
}
.customer-search-input:focus { border-color: var(--gold); }

.customer-list { display: flex; flex-direction: column; gap: 8px; }
.customer-item {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px 22px;
  display: flex; align-items: center; gap: 16px; min-height: 60px;
  transition: border-color 0.15s;
}
.customer-item:hover { border-color: var(--border-mid); }
.customer-icon { font-size: 20px; flex-shrink: 0; color: var(--text-dim); }
.customer-info { flex: 1; min-width: 0; }
.customer-name-jp   { font-size: 18px; font-weight: 700; }
.customer-name-kana { font-size: 13px; color: var(--text-dim); }
.customer-phone     { font-size: 13px; color: var(--text-sub); margin-top: 2px; }
.customer-visits-col { text-align: right; min-width: 72px; }
.customer-visit-num   { font-size: 22px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.customer-visit-label { font-size: 12px; color: var(--text-dim); }

/* ═══════════════════════════════════════
   ユーザー画面（スマホシミュレータ）
═══════════════════════════════════════ */
#screen-user {
  background: #0a0a0a;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 20px;
  overflow-y: auto;
  min-height: calc(100vh - 64px);
}
.user-pane {
  width: 100%;
  max-width: 980px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  justify-content: center;
}
.user-pane-left {
  flex: 1;
  max-width: 480px;
  padding-top: 40px;
  color: var(--text);
}
.user-pane-left h2 { font-size: 22px; color: var(--gold); margin-bottom: 12px; letter-spacing: 0.06em; }
.user-pane-left p  { font-size: 14px; color: var(--text-dim); line-height: 1.8; margin-bottom: 14px; }
.user-pane-left ul { padding-left: 22px; font-size: 13px; color: var(--text-sub); line-height: 1.9; }
.user-pane-left li::marker { color: var(--gold-dim); }

.phone-frame {
  width: 375px;
  height: 812px;
  background: #000;
  border-radius: 40px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 8px #1a1a1a, 0 0 0 10px #2a2a2a;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  padding: 28px 0 18px;
}
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 22px;
  background: #000;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 5;
}
.phone-screen {
  display: none;
  background: #faf7f0;
  color: #1a1a1a;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow-y: auto;
  font-family: 'Noto Serif JP', serif;
  padding: 18px 18px 24px;
}
.phone-screen.active { display: block; }
.phone-header { font-size: 14px; color: #888; text-align: center; letter-spacing: 0.1em; padding-bottom: 10px; border-bottom: 1px solid #e0ddd8; margin-bottom: 16px; }
.phone-title  { font-size: 20px; font-weight: 700; color: #c0392b; text-align: center; margin-bottom: 6px; }
.phone-sub    { font-size: 12px; color: #666; text-align: center; margin-bottom: 18px; }

.phone-btn-big {
  display: block;
  width: 100%;
  padding: 18px;
  background: #c0392b;
  color: #fff;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  margin-bottom: 12px;
  border: none;
  letter-spacing: 0.04em;
  min-height: 56px;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.phone-btn-big:active { transform: scale(0.97); }
.phone-btn-big.outline {
  background: #fff;
  color: #c0392b;
  border: 2px solid #c0392b;
}
.phone-btn-big.gold { background: #b8953f; }
.phone-btn-sub {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #888;
  border: 1.5px solid #d0cdc8;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 6px;
  cursor: pointer;
  min-height: 44px;
}
.phone-btn-sub:active { background: #f0ede8; }

.phone-list { display: flex; flex-direction: column; gap: 10px; }
.phone-card {
  background: #fff;
  border: 1.5px solid #e0ddd8;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: 56px;
}
.phone-card:active { background: #f5f1e8; border-color: #b8953f; }
.phone-card.selected { border-color: #c0392b; background: #fdf2f0; }
.phone-card-main { flex: 1; }
.phone-card-title { font-size: 15px; font-weight: 700; }
.phone-card-meta  { font-size: 12px; color: #888; margin-top: 2px; }
.phone-card-amt   { font-size: 15px; font-weight: 700; color: #c0392b; }

.phone-pct-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.pct-low  { background: #e0f4e1; color: #1e8449; border: 1px solid #58d68d; }
.pct-mid  { background: #fef5d4; color: #b7740c; border: 1px solid #f4d03f; }
.pct-high { background: #fadbd8; color: #a93226; border: 1px solid #ec7063; }

/* ─── 混雑% 表示（受付ダッシュ＋公開ディスプレイ） ─── */
.pct-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.pct-badge .pct-num   { font-size: 13px; font-weight: 800; }
.pct-badge .pct-label { font-size: 11px; font-weight: 600; opacity: 0.85; }

.congestion-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  margin-bottom: 14px;
}
.cc-title  { font-size: 14px; color: var(--text-dim); letter-spacing: 0.06em; white-space: nowrap; }
.cc-pct    { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: 0.02em; }
.cc-label  { font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
.cc-bar-bg { flex: 1; height: 12px; background: var(--border); border-radius: 6px; overflow: hidden; min-width: 120px; }
.cc-bar-fl { height: 100%; border-radius: 6px; transition: width 0.5s ease; }
.cc-pct.is-low,   .cc-label.is-low   { color: #4caf50; }
.cc-pct.is-mid,   .cc-label.is-mid   { color: #f9a825; }
.cc-pct.is-high,  .cc-label.is-high  { color: #e53935; }
.cc-bar-fl.is-low  { background: #4caf50; }
.cc-bar-fl.is-mid  { background: #f9a825; }
.cc-bar-fl.is-high { background: #e53935; }

/* ─── 案内板：現在の混雑状況セクション（ライトテーマ） ─── */
.disp-cong-overall {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
}
.disp-cong-pct   { font-size: 60px; font-weight: 800; line-height: 1; letter-spacing: 0.02em; }
.disp-cong-label { font-size: 26px; font-weight: 700; }
.disp-cong-pct.is-low,   .disp-cong-label.is-low   { color: var(--green); }
.disp-cong-pct.is-mid,   .disp-cong-label.is-mid   { color: var(--amber); }
.disp-cong-pct.is-high,  .disp-cong-label.is-high  { color: var(--red); }

.disp-cong-bars { display: flex; flex-direction: column; gap: 12px; }
.disp-cong-row  { display: flex; align-items: center; gap: 16px; font-size: 16px; }
.disp-cong-time { min-width: 64px; color: var(--text-dim); text-align: right; font-weight: 500; }
.disp-cong-bg   { flex: 1; height: 18px; background: var(--bg-hover); border-radius: 9px; overflow: hidden; }
.disp-cong-fl   { height: 100%; border-radius: 9px; transition: width 0.5s ease; }
.disp-cong-fl.is-low  { background: var(--green); }
.disp-cong-fl.is-mid  { background: var(--amber); }
.disp-cong-fl.is-high { background: var(--red); }
.disp-cong-num  { min-width: 52px; text-align: right; color: var(--text); font-weight: 700; }

/* ─── セッションタブ：%バッジ ─── */
.session-tab .pct-badge { padding: 1px 7px; font-size: 10px; margin-left: 4px; }
.session-tab .pct-badge .pct-num { font-size: 11px; }

.phone-form-row { margin-bottom: 14px; }
.phone-form-label { font-size: 12px; color: #666; margin-bottom: 6px; letter-spacing: 0.05em; display: block; }
.phone-form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d0cdc8;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
  min-height: 48px;
}
.phone-form-input:focus { border-color: #c0392b; outline: none; }

.phone-counter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid #e0ddd8;
  border-radius: 8px;
  padding: 8px 12px;
}
.phone-counter-btn {
  width: 40px;
  height: 40px;
  background: #f0ede8;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  color: #1a1a1a;
  cursor: pointer;
  flex-shrink: 0;
}
.phone-counter-btn:active { background: #b8953f; color: #fff; }
.phone-counter-val { flex: 1; text-align: center; font-size: 22px; font-weight: 700; }

.phone-confirm-block {
  background: #fff;
  border: 1.5px solid #e0ddd8;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.phone-confirm-row { display: flex; padding: 6px 0; border-bottom: 1px dashed #ebe7e0; }
.phone-confirm-row:last-child { border-bottom: none; }
.phone-confirm-label { width: 90px; color: #888; font-size: 13px; }
.phone-confirm-val { flex: 1; font-size: 14px; font-weight: 700; }
.phone-confirm-total { margin-top: 4px; padding-top: 10px; border-top: 1.5px solid #e0ddd8; }
.phone-confirm-total .phone-confirm-val { font-size: 17px; color: #c0392b; }

/* お客様情報フォームの会計プレビュー */
.phone-fee-preview {
  background: #faf6ee;
  border: 1.5px solid #ece3d0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #6b6459;
  line-height: 1.7;
}
.phone-fee-preview .fee-muted { color: #a49b8b; }
.phone-fee-preview .fee-total {
  margin-top: 6px; padding-top: 8px; border-top: 1px dashed #d8cfbb;
  font-size: 16px; font-weight: 700; color: #c0392b;
}
.phone-fee-preview .fee-note { font-size: 11px; font-weight: 400; color: #a49b8b; margin-left: 4px; }

/* 完了画面：確認メール内容プレビュー */
.phone-mail-preview {
  text-align: left;
  background: #fff;
  border: 1.5px solid #e0ddd8;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.phone-mail-preview .pmp-title {
  font-size: 13px; font-weight: 700; color: #1565c0;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed #ebe7e0;
}
.phone-mail-preview .pmp-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 3px 0; }
.phone-mail-preview .pmp-row span { color: #888; flex-shrink: 0; }
.phone-mail-preview .pmp-row b { text-align: right; }
.phone-mail-preview .pmp-row small { font-size: 11px; font-weight: 400; color: #a49b8b; }

.phone-done-icon { text-align: center; font-size: 60px; margin: 20px 0 12px; }
.phone-done-no  { font-size: 36px; color: #c0392b; font-weight: 700; text-align: center; letter-spacing: 0.08em; margin-bottom: 8px; }
.phone-done-msg { font-size: 13px; color: #666; text-align: center; line-height: 1.8; margin-bottom: 24px; }

.phone-mypage-item {
  background: #fff;
  border: 1.5px solid #e0ddd8;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.phone-mypage-item.is-called {
  border-color: #f0c040;
  background: #fffaeb;
  box-shadow: 0 0 0 2px rgba(240,192,64,0.3);
}
.phone-mypage-no { font-size: 22px; font-weight: 700; color: #c0392b; letter-spacing: 0.06em; }
.phone-mypage-meta { font-size: 12px; color: #888; margin-top: 2px; }
.phone-mypage-status {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  margin-top: 8px;
}
.pms-reserved { background: #eceef2; color: #5b6577; }
.pms-waiting  { background: #e0f4e1; color: #1e8449; }
.pms-called   { background: #fbe3e0; color: #c0392b; }
.phone-mypage-callmsg {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef5d4;
  border-left: 3px solid #f0c040;
  font-size: 12px;
  color: #7c5c10;
  font-weight: 700;
}

/* 内訳カード（受付ダッシュボード上部） */
.source-breakdown-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 14px 22px;
  margin-bottom: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.sb-item { display: flex; align-items: center; gap: 8px; padding: 4px 12px; }
.sb-icon { font-size: 18px; }
.sb-label { font-size: 13px; color: var(--text-dim); letter-spacing: 0.04em; }
.sb-val   { font-size: 22px; font-weight: 700; color: var(--gold); margin: 0 4px; }
.sb-unit  { font-size: 13px; color: var(--text-dim); }
.sb-divider { width: 1px; height: 28px; background: var(--border); }
.sb-mailbtn {
  margin-left: auto;
  padding: 0 18px;
  height: 44px;
  background: rgba(93,173,226,0.12);
  border: 1.5px solid #2a567a;
  border-radius: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.sb-mailbtn:hover { background: rgba(93,173,226,0.22); }
.sb-mailbtn:active { transform: scale(0.97); }

/* メール送信ログモーダル */
.maillog-item {
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.maillog-item:last-child { border-bottom: none; }
.maillog-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.maillog-time { font-size: 12px; color: var(--text-dim); }
.maillog-ticket { font-size: 13px; font-weight: 700; color: var(--gold); }
.maillog-name { font-size: 14px; font-weight: 700; }
.maillog-email { font-size: 12px; color: var(--text-sub); }
.maillog-subj { font-size: 13px; color: var(--text); margin-top: 4px; font-weight: 700; }
.maillog-body { font-size: 12px; color: var(--text-dim); line-height: 1.6; margin-top: 2px; white-space: pre-wrap; }

/* スマホ予約バッジ（受付側） */
.source-badge-smartphone {
  display: inline-block;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(93,173,226,0.18);
  color: var(--blue);
  border: 1px solid #2a567a;
  margin-left: 4px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════
   印刷
═══════════════════════════════════════ */
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
}
#print-area { display: none; }

/* ── 本実装で追加：チェックボックス/ラジオのネイティブ描画を復活 ──
   グローバルの input{-webkit-appearance:none} がチェックボックスを不可視化するため打ち消す。 */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: auto;
  cursor: pointer;
  accent-color: var(--red);
}
