/* 対面受付（タブレット・接客用）専用スタイル。style.cssのトークン・パーツを流用 */

.c-shell {
  max-width: none; margin: 0; padding: 0 16px 16px;
  min-height: 100dvh; display: flex; flex-direction: column;
}
.c-shell[hidden] { display: none; }

.c-guard {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 15px; color: var(--ink-2);
}
.c-guard[hidden] { display: none; }
.c-guard a { color: var(--accent); font-weight: 700; }

.c-back { align-self: flex-start; margin-bottom: 10px; }

/* ── 予約一覧 ── */
.c-reserve-wrap[hidden] { display: none; }
.reserve-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
  margin-top: 10px;
}
.reserve-card {
  appearance: none; font: inherit; cursor: pointer; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 16px;
}
.reserve-card:hover { border-color: var(--accent); }
.reserve-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.reserve-card .rc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.reserve-card .rc-no { font-weight: 700; color: var(--ink-3); font-size: 12px; }
.reserve-card .rc-start { font-weight: 700; font-size: 15px; }
.reserve-card .rc-status { margin-left: auto; }
.reserve-card .rc-mid { font-size: 14px; font-weight: 600; }
.reserve-card .rc-bottom { font-size: 12px; color: var(--ink-3); margin-top: 4px; min-height: 1em; }
.c-empty { color: var(--ink-3); font-size: 13px; margin-top: 14px; }

/* ── フォーム＋プレビュー（左右分割・タブレット横向き前提） ── */
.c-form-area {
  display: flex; gap: 20px; align-items: flex-start; flex: 1; min-height: 0;
}
.c-form-area[hidden] { display: none; }
.c-left { flex: 1.3; min-width: 0; display: flex; flex-direction: column; }
.c-right {
  flex: 1; min-width: 280px; max-width: 420px;
  position: sticky; top: 8px;
  display: flex; flex-direction: column; gap: 14px;
}
@media (max-width: 860px) {
  .c-form-area { flex-direction: column; }
  .c-right { max-width: none; width: 100%; position: static; }
}

.c-store-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700;
  margin-bottom: 12px;
}
.c-store-chip::before { content: ""; width: 11px; height: 11px; border-radius: 3px; background: var(--c); }

/* アコーディオン: 選択中のセクションだけ開く（他は要約だけ表示） */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.acc-section {
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden;
}
.acc-head {
  appearance: none; width: 100%; font: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: none; padding: 16px 18px;
  text-align: left; color: var(--ink);
}
.acc-section.open > .acc-head { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.acc-arrow { color: var(--ink-3); font-size: 12px; width: 12px; flex: none; transition: transform .15s ease; }
.acc-section.open .acc-arrow { transform: rotate(90deg); color: var(--accent); }
.acc-title { font-size: 15px; font-weight: 700; }
.acc-summary {
  margin-left: auto; font-size: 13px; font-weight: 600; color: var(--accent);
  max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-body { display: none; padding: 16px 18px; }
.acc-section.open .acc-body { display: block; }
/* タブレットのタップ精度に配慮し、選択肢ボタンを一回り大きく */
.acc-body .seg button, .acc-body .course-grid button, .acc-body .chiprow button {
  min-height: 44px; font-size: 14px;
}
.acc-body .course-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
/* 複数可OPの「−」は対面(タブレット)ではさらに大きく＋タップ判定を上下いっぱいまで拡張 */
.acc-body .chiprow button .op-minus { width: 34px; height: 34px; font-size: 19px; margin-left: 10px; }
.acc-body .chiprow button .op-minus::after { inset: -11px; }
#c-f-long { margin-top: 8px; }

/* ── 料金プレビュー ── */
.price-preview {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 18px 20px;
}
.pp-label { font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; }
.pp-total { font-size: 34px; font-weight: 700; margin: 4px 0 12px; }
.pp-rows { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.pp-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.pp-row span:last-child { font-weight: 600; color: var(--ink); }

/* 支払い方法（v3.21・FB#3） */
.c-pay { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.c-pay .chiprow button { padding: 9px 16px; }

.c-submit { padding: 16px; font-size: 16px; }
.c-note-hint { text-align: center; font-size: 12px; color: var(--ink-3); margin: 0; }

/* 案内番号（FB#30続報）: 手動採番の店は右下スペースに番号ボタンを展開して選べる */
#c-guide-pick {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 700; cursor: pointer;
}
#c-guide-pick:hover { border-color: var(--accent); color: var(--accent); }
.c-guide-grid:not([hidden]) {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px;
  max-height: 200px; overflow-y: auto; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.c-guide-grid button {
  min-width: 46px; height: 42px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.c-guide-grid button.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
/* 本日1回使われた番号（終了済み=再利用可）: 押せるが「使った跡」が分かる控えめな区別（破線+薄め・2026-07-15） */
.c-guide-grid button.reused { border-style: dashed; opacity: .62; }
.c-guide-grid button.reused.sel { opacity: 1; }
.c-guide-grid button:disabled { opacity: .3; cursor: not-allowed; }

/* ── フロント前リスト（紙のフロント前リストの代替・本日の受付状況・FB#45・v4.61でデザイン修正） ──
   紙は20行=1枚のシート単位で運用されているため、20行固定（空白行込み）のシートをそのまま
   カード化して横に並べる。PC・タブレットとも20行は縮小しないと画面に入りきらないため、
   縮小して詰め込むのでなく下からドロワーで引き上げる方式にした。各シートはhead/body/footの
   3段構成（body だけが縦スクロール）にして、件数・小計（＋割引計）の合計行が常に見える位置に
   固定される＝スクロールしても隠れない（2026-07-21ユーザー指摘） */
#c-app { padding-bottom: 56px; }   /* 折りたたみ時のfl-handleぶんフォームが隠れないように */
.fl-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--surface); border-top: 1.5px solid var(--line);
  border-radius: 16px 16px 0 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, .14);
  display: flex; flex-direction: column; max-height: 86dvh;
}
.fl-handle {
  appearance: none; border: none; background: none; cursor: pointer; font: inherit; color: var(--ink);
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 14px 20px; flex: none;
}
.fl-handle-title { font-weight: 700; font-size: 14px; }
.fl-count { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.fl-handle-arrow { color: var(--ink-3); font-size: 13px; transition: transform .2s ease; }
.fl-drawer.open .fl-handle-arrow { transform: rotate(180deg); }
.fl-body { display: none; padding: 0 20px 18px; flex: 1; min-height: 0; }
.fl-drawer.open .fl-body { display: flex; flex-direction: column; }
.fl-sheets { display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; align-items: stretch; flex: 1; min-height: 0; }
.fl-sheet {
  flex: none; width: 480px; display: flex; flex-direction: column;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
}
.fl-sheet-head {
  flex: none; padding: 10px 14px; font-size: 13px; font-weight: 700; color: var(--ink-2);
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.fl-sheet-body { flex: 1; min-height: 0; overflow-y: auto; }
/* 列幅は内容量に合わせた固定px（table-layout:fixedで崩れ・見切れを防ぐ。2026-07-21指摘対応） */
.fl-sheet table.fl-table { min-width: 0; width: 100%; table-layout: fixed; }
.fl-sheet table.fl-table th, .fl-sheet table.fl-table td { padding: 7px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ヘッダー(th)とデータ(td)で列ごとにtext-alignを揃える（2026-07-21指摘: 割引額/総額は
   ヘッダーが左寄せなのにデータは右寄せ、番号札/分はデータ自体が右寄せですらなかった=不揃いの原因。
   th/td共通のfl-c-*クラスに直接指定して揃える） */
.fl-sheet .fl-c-cast { width: 160px; white-space: normal !important; text-align: left; }
.fl-sheet .fl-c-disc { width: 82px; text-align: right; }
.fl-sheet .fl-c-total { width: 94px; text-align: right; }
.fl-sheet .fl-c-guide { width: 50px; text-align: right; }
.fl-sheet .fl-c-min { width: 66px; text-align: right; }
.fl-sheet table.fl-table td.fl-c-cast { line-height: 1.4; }
.fl-sheet table.fl-table .fl-cont { color: var(--ink-3); }
.fl-sheet table.fl-table .fl-combo { display: inline-block; }
.fl-sheet table.fl-table tr.fl-blank td { color: transparent; cursor: default; }
.fl-sheet table.fl-table tr.fl-blank:hover td { background: none; }
/* 件数・小計・割引計の合計行（2026-07-21指摘: 割引計は割引額の真下、小計は総額の真下に
   来るよう、独立したdivでなくtfootの同じ列（fl-c-*）に乗せる。position:stickyで
   .fl-sheet-bodyを縦スクロールしても最下部に固定表示され続ける） */
.fl-sheet table.fl-table tfoot td {
  position: sticky; bottom: 0; z-index: 1;
  background: var(--surface-2); border-top: 1.5px solid var(--line);
  font-weight: 700; color: var(--ink); white-space: nowrap;
}
@media (max-width: 520px) { .fl-sheet { width: 92vw; } }
