:root {
  --bg: #0b0b0f;
  --bg-2: #14141b;
  --card: #1b1b24;
  --card-2: #23232f;
  --line: #2e2e3c;
  --text: #f2f0ea;
  --muted: #9a97a6;
  --gold: #d4af37;
  --gold-soft: #e8cf7a;
  --red: #ff5a6a;
  --amber: #ffb547;
  --green: #4ecb8a;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --nav-h: 64px;
  --head-h: 56px;
  --sidebar-w: 92px;
  --body-glow: #191922;
  --header-bg: rgba(11, 11, 15, 0.82);
  --nav-bg: rgba(15, 15, 20, 0.92);
  --neutral-chip: #202028;
  --warm-card: #201d15;
  --warm-box: #26210f;
  --summary-bg: rgba(255,255,255,.025);
}

html { color-scheme: dark; background: var(--bg); }
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #edf0f5;
  --line: #d7dce5;
  --text: #20242c;
  --muted: #6f7683;
  --gold: #9a7217;
  --gold-soft: #76560d;
  --red: #c83f52;
  --amber: #a85f00;
  --green: #137a4b;
  --shadow: 0 10px 28px rgba(35, 42, 55, 0.13);
  --body-glow: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.9);
  --nav-bg: rgba(255, 255, 255, 0.94);
  --neutral-chip: #edf0f5;
  --warm-card: #fff9e9;
  --warm-box: #fff2cc;
  --summary-bg: rgba(30, 36, 48, .035);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Sans JP", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, var(--body-glow) 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
  padding-top: var(--head-h);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}
h2 { font-size: 20px; margin: 0; font-weight: 700; }
h3.sub-head { font-size: 14px; color: var(--gold-soft); margin: 22px 4px 10px; font-weight: 700; letter-spacing: .04em; }
.muted { color: var(--muted); font-size: 12px; }
.hidden { display: none !important; }

/* ===== Header ===== */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--head-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 40;
  background: var(--header-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 4px; }
.store-name { font-family: "Cormorant Garamond", "Noto Sans JP", serif; font-size: 23px; font-weight: 700; color: var(--gold); letter-spacing: .03em; padding: 0; border: none; }
.brand-tag { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
/* 旧ブランド(timecard が demo 準拠で使用中のため残置) */
.brand-mark { font-family: "Cormorant Garamond", serif; font-size: 24px; font-weight: 600; color: var(--gold); letter-spacing: .06em; }
.brand-sub { font-size: 11px; color: var(--muted); margin-right: 8px; }
/* システム警告(ディスク逼迫など)。POSトップに常時表示・目立たせる */
.sys-alert { background: linear-gradient(90deg, #7a1220, #a01829); color: #fff; padding: 10px 18px; text-align: center; font-size: 13.5px; font-weight: 600; letter-spacing: .01em; border-bottom: 2px solid #d43a4f; box-shadow: 0 2px 8px rgba(160,24,41,.35); }
.sys-alert b { color: #ffe08a; }

/* マニュアル撮影用: ?bare=1 で案内バナー等を隠す */
body.bare .banner, body.bare .training-bar, body.bare .conn-badge, body.bare .mode-toggle, body.bare .mode-badge, body.bare .sys-alert { display: none !important; }
.header-right { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.mode-toggle {
  min-height: 32px; display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(91,118,255,.55);
  background: rgba(91,118,255,.12); color: #aebcff; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
}
.mode-toggle:hover { border-color: #879bff; }
body.training-mode .mode-toggle { color: #fff; background: #526fe8; border-color: #7f94ff; }
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle:focus-visible, .nav-btn:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-toggle-icon { width: 14px; color: var(--gold); font-size: 15px; line-height: 1; }
.today { font-size: 12px; color: var(--muted); }
.conn-badge { font-size: 10px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.conn-badge.online { color: var(--green); border-color: rgba(78,203,138,.4); }
.conn-badge.local { color: var(--amber); border-color: rgba(255,181,71,.4); }
.conn-badge.training { color: #aebcff; border-color: rgba(135,155,255,.55); background: rgba(91,118,255,.1); }

/* ===== Training mode ===== */
.training-bar {
  position: fixed; top: var(--head-h); left: 0; right: 0; z-index: 39;
  min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 8px 14px; background: #3857ca; color: #fff; border-bottom: 1px solid #8ea0f4;
  box-shadow: 0 4px 16px rgba(26,43,111,.24); font-size: 12px; line-height: 1.4;
}
.training-bar button {
  flex: 0 0 auto; border: 1px solid rgba(255,255,255,.65); border-radius: 999px;
  padding: 5px 10px; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
}
body.training-mode { padding-top: calc(var(--head-h) + 44px); }
.mode-badge {
  display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px;
  color: #fff; background: #526fe8; border: 1px solid #8ea0f4; font-size: 10px; font-weight: 900; white-space: nowrap;
}
@media (max-width: 640px) {
  .training-bar { justify-content: space-between; gap: 8px; }
  .training-bar span { font-size: 10px; }
  .training-bar span b { display: block; font-size: 11px; }
  .header-right { gap: 6px; }
  .mode-toggle, .theme-toggle { padding: 5px 8px; }
}

/* ===== Banner ===== */
.banner {
  margin: 10px 12px 0; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,181,71,.12); border: 1px solid rgba(255,181,71,.35);
  color: var(--amber); font-size: 12px; line-height: 1.5;
}

/* ===== Views ===== */
.view { padding: 16px 12px 8px; max-width: 720px; margin: 0 auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }

/* ===== Floor / tables ===== */
/* 営業中に「次に何をするか」だけを先頭へ出す */
.floor-assist { margin-bottom: 12px; }
.assist-panel { background: linear-gradient(135deg, rgba(91,118,255,.14), rgba(91,118,255,.04)); border: 1px solid rgba(135,155,255,.35); border-radius: 14px; padding: 10px; }
.assist-panel.clear { background: rgba(78,203,138,.06); border-color: rgba(78,203,138,.28); }
.assist-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.assist-title { font-size: 13px; font-weight: 800; }
.assist-summary { font-size: 11px; color: var(--muted); }
.assist-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.assist-task { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-align: left; cursor: pointer; font-family: inherit; }
.assist-task.urgent { border-color: rgba(255,90,106,.45); background: rgba(255,90,106,.09); }
.assist-task.warn { border-color: rgba(255,181,71,.42); background: rgba(255,181,71,.08); }
.assist-task.info { border-color: rgba(135,155,255,.35); }
.assist-task .at-ico { font-size: 17px; flex: 0 0 auto; }
.assist-task .at-copy { min-width: 0; }
.assist-task .at-main { font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assist-task .at-sub { font-size: 10px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assist-clear { color: var(--green); font-size: 12px; font-weight: 700; }
@media (max-width: 520px) { .assist-list { grid-template-columns: 1fr; } }

/* ===== フロア: 当日P&L KPI ===== */
.floor-kpi { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 12px; }
.floor-kpi .fk { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; text-align: center; }
.floor-kpi .fk.hl { border-color: rgba(212,175,55,.5); background: linear-gradient(135deg, rgba(212,175,55,.14), rgba(212,175,55,.03)); }
.floor-kpi .fk-l { font-size: 10px; color: var(--muted); }
.floor-kpi .fk-v { font-size: 14px; font-weight: 800; color: var(--gold-soft); margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .floor-kpi { grid-template-columns: repeat(4, 1fr); } }

/* ===== フロア: キャスト状況ボード ===== */
.cast-board { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cb-group { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.cb-h { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.cb-h .cb-n { color: var(--muted); font-weight: 500; margin-left: 4px; }
.cb-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-chip { display: flex; flex-direction: column; background: var(--card-2); border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; min-width: 78px; }
.cb-chip.busy { border-color: rgba(127,216,168,.35); }
.cb-chip.wait { border-color: rgba(240,165,60,.4); background: rgba(240,165,60,.08); }
.cb-chip.sched { border-color: var(--line); opacity: .85; }
.cb-chip { cursor: pointer; }
.cb-chip .cb-name { font-size: 13px; font-weight: 700; }
.cb-b { font-size: 9px; font-weight: 800; color: #1a1509; border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.cb-b.hon { background: #e6c35c; }
.cb-b.jonai { background: #7fb0e6; }
.cb-b.free { background: #6fb98a; }
.nom-tag { font-size: 10px; font-weight: 800; border-radius: 5px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.nom-tag.nom-hon { background: rgba(230,195,92,.22); color: #e6c35c; border: 1px solid rgba(230,195,92,.5); }
.nom-tag.nom-jonai { background: rgba(127,176,230,.2); color: #7fb0e6; border: 1px solid rgba(127,176,230,.5); }
.nom-tag.nom-free { background: rgba(111,185,138,.2); color: #6fb98a; border: 1px solid rgba(111,185,138,.5); }
.cust-nick { font-size: 13px; font-weight: 700; color: var(--gold, #e6c35c); margin-left: 4px; }
.cb-chip .cb-sub { font-size: 10px; color: var(--muted); margin-top: 1px; }
.cb-pm.up b { color: var(--green); }
.cb-pm.dn b { color: var(--red); }
.cb-empty { font-size: 11px; color: var(--muted); padding: 4px; }

.table-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .table-grid:not(.plan) { grid-template-columns: repeat(3, 1fr); } }
/* 間取り図どおりの配置(実店舗の席表) */
.table-grid.plan {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(96px, auto);
  gap: 10px;
  background:
    linear-gradient(rgba(212,175,55,.05), rgba(212,175,55,.05));
  border: 1px dashed var(--line); border-radius: 16px; padding: 12px;
  position: relative;
}
.table-grid.plan::before {
  content: "▤ 席表（間取り準拠）"; position: absolute; top: 6px; left: 12px;
  font-size: 10px; color: var(--muted); letter-spacing: .04em;
}
.table-grid.plan .table-card { min-height: 84px; padding: 10px 12px; margin-top: 0; }
.table-grid.plan .table-card.is-box { background: linear-gradient(160deg, var(--warm-box), var(--card)); border-color: rgba(212,175,55,.4); }
.table-grid.plan { padding-top: 26px; }
@media (max-width: 520px) { .table-grid.plan { gap: 6px; } .table-grid.plan .table-card { min-height: 70px; padding: 7px 8px; } }
.table-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; min-height: 108px; cursor: pointer; position: relative;
  transition: transform .08s ease, border-color .2s;
}
.table-card:active { transform: scale(.97); }
.table-card.occupied { border-color: rgba(212,175,55,.5); background: linear-gradient(160deg, var(--warm-card), var(--card)); }
.table-card .t-no { font-size: 13px; color: var(--muted); font-weight: 700; }
.table-card .t-state { position: absolute; top: 12px; right: 12px; font-size: 10px; padding: 2px 8px; border-radius: 999px; }
.t-state.empty { background: var(--neutral-chip); color: var(--muted); }
.t-state.busy { background: rgba(212,175,55,.18); color: var(--gold-soft); }
.table-card .t-guest { font-size: 20px; font-weight: 800; margin-top: 8px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-card .t-guest.hon { color: var(--red); }   /* 本指名キャストは赤 */
.table-card .t-cust { font-size: 13px; color: var(--gold-soft); margin-top: 2px; min-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-card .t-cast { font-size: 12px; color: var(--gold-soft); margin-top: 2px; }
.table-card .t-context { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-card .t-meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; }
.table-card .t-amount { font-weight: 700; color: var(--text); }
.table-card .t-time { color: var(--muted); }
.table-card.empty-card { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.table-card.empty-card .plus { font-size: 22px; color: var(--gold); text-align: center; }
.table-card.empty-card .empty-label { color: var(--muted); font-size: 10px; font-weight: 700; margin-top: 3px; text-align: center; }
.t-set { margin-top: 8px; font-size: 11px; color: var(--muted); }
.t-set.warn { color: var(--amber); font-weight: 700; }
.t-set.over { color: var(--red); font-weight: 700; }
.t-box { font-size: 9px; font-weight: 800; color: #1a1509; background: var(--gold); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.t-call { margin-top: 6px; font-size: 11px; font-weight: 800; color: var(--gold); animation: callPulse 1.2s ease-in-out infinite; }
@keyframes callPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ===== Search + chips ===== */
.search {
  width: 100%; padding: 12px 14px; border-radius: 12px; margin-bottom: 12px;
  background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 15px;
}
.search::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 6px; margin-bottom: 8px; }   /* 折り返して全員見えるように(見切れ防止) */
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--card); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
}
.chip.active { background: var(--gold); color: #1a1509; border-color: var(--gold); }

/* ===== Customer list ===== */
.customer-list { display: flex; flex-direction: column; gap: 10px; }
.cust-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  cursor: pointer; transition: transform .08s ease;
}
.cust-card:active { transform: scale(.99); }
.cust-top { display: flex; align-items: center; justify-content: space-between; }
.cust-name { font-size: 16px; font-weight: 700; }
.cust-name .kana { font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.cust-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cust-badges { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.badge.cast { background: rgba(212,175,55,.14); color: var(--gold-soft); }
.badge.visits { background: var(--neutral-chip); color: var(--muted); }
.badge.urikake { background: rgba(255,90,106,.14); color: var(--red); }
.badge.bottle-red { background: rgba(255,90,106,.14); color: var(--red); }
.badge.bottle-amber { background: rgba(255,181,71,.14); color: var(--amber); }
.badge.spend { background: rgba(78,203,138,.11); color: var(--green); }

/* ===== KPI ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
}
.kpi .k-label { font-size: 12px; color: var(--muted); }
.kpi .k-value { font-size: 26px; font-weight: 900; margin-top: 6px; color: var(--gold-soft); }
.kpi .k-value small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }

/* ===== Rank / alerts / recent ===== */
.rank-list, .bottle-alert, .recent-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row, .alert-row, .recent-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px;
}
.rank-row .r-left { display: flex; align-items: center; gap: 10px; }
.rank-row .r-no { width: 22px; height: 22px; border-radius: 50%; background: var(--card-2); color: var(--gold-soft); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.rank-row .r-no.top { background: var(--gold); color: #1a1509; }
.alert-row .a-info { font-size: 12px; }
.alert-row .a-days { font-size: 12px; font-weight: 700; }
.a-days.red { color: var(--red); } .a-days.amber { color: var(--amber); }
.recent-row .rc-amt { font-weight: 700; color: var(--gold-soft); }
.recent-row[data-arch] { cursor: pointer; }
.pay-tag { font-size: 10px; padding: 2px 7px; border-radius: 999px; margin-left: 8px; }
.pay-cash { background: var(--neutral-chip); color: var(--muted); }
.pay-card { background: rgba(120,160,255,.15); color: #9db4ff; }
.pay-urikake { background: rgba(255,90,106,.14); color: var(--red); }

/* ===== Bottom nav ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h);
  display: flex; z-index: 40; background: var(--nav-bg); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-btn {
  flex: 1; background: none; border: none; color: var(--muted); font-size: 11px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
}
.nav-btn .nav-ico { font-size: 20px; filter: grayscale(1) opacity(.6); }
.nav-btn.active { color: var(--gold); }
.nav-btn.active .nav-ico { filter: none; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6);
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 560px) { .modal-overlay { align-items: center; } }
.modal {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow); padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: slideUp .22s ease;
}
@media (min-width: 560px) { .modal { border-radius: 20px; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-close { background: var(--card); border: 1px solid var(--line); color: var(--muted); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.modal .field { margin-bottom: 14px; }
.modal .field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.flow-step { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 11px; margin: -4px 0 14px; }
.flow-step b { color: var(--gold-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field-input { width: 100%; padding: 11px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 14px; }
.field-input:focus, .search:focus, .amount-input:focus { outline: 2px solid rgba(212,175,55,.35); border-color: var(--gold); }
.pick-list.compact { max-height: 170px; }
.selection-help { font-size: 10px; color: var(--muted); margin-top: -3px; }
.slip-summary { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--summary-bg); margin-bottom: 12px; }
.slip-summary span { font-size: 11px; color: var(--muted); }
.slip-summary b { color: var(--text); }
.slip-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.slip-actions .btn { margin: 0; min-height: 48px; }
.slip-actions .wide { grid-column: 1 / -1; }
.cust-insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 8px 0 12px; }
.cust-insight { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 8px; text-align: center; }
.cust-insight .ci-l { font-size: 9px; color: var(--muted); }
.cust-insight .ci-v { font-size: 14px; color: var(--gold-soft); font-weight: 800; margin-top: 2px; }
.contact-hint { padding: 11px 12px; border-radius: 11px; background: rgba(212,175,55,.08); border: 1px solid rgba(212,175,55,.26); margin-bottom: 10px; }
.contact-hint .ch-title { color: var(--gold-soft); font-size: 11px; font-weight: 800; margin-bottom: 4px; }
.contact-hint .ch-body { color: var(--text); font-size: 13px; line-height: 1.6; }
@media (max-width: 420px) { .form-grid { grid-template-columns: 1fr; } .cust-insights { grid-template-columns: 1fr 1fr; } }
.detail-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-row .dl { color: var(--muted); }
.stars { color: var(--gold); letter-spacing: 2px; }

/* Bottle rows in detail */
.bottle-row { display: flex; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.bottle-row .b-exp { font-size: 12px; font-weight: 700; }
.b-exp.red { color: var(--red); } .b-exp.amber { color: var(--amber); } .b-exp.green { color: var(--green); }

/* Slip / accounting */
.slip-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.slip-item { display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding: 8px 10px; background: var(--card); border-radius: 8px; }
.slip-item > span:first-child { min-width: 0; }
.item-cast { display: block; color: var(--gold-soft); font-size: 10px; margin-top: 3px; border: 0; background: transparent; padding: 0; font-family: inherit; text-align: left; cursor: pointer; }
.item-cast.missing { color: var(--red); font-weight: 700; }
.si-void { border: 0; background: transparent; color: var(--red); font: inherit; font-size: 11px; cursor: pointer; padding: 4px; }
.preflight { display: grid; gap: 3px; margin: 10px 0; padding: 10px 12px; border-radius: 10px; font-size: 11px; border: 1px solid var(--line); }
.preflight b { font-size: 12px; }
.preflight.danger { color: #ffd7dc; background: rgba(255,90,106,.10); border-color: rgba(255,90,106,.35); }
.preflight.warn { color: #ffe5bd; background: rgba(240,165,60,.10); border-color: rgba(240,165,60,.35); }
.cast-target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 14px 0; }
.cast-target { min-height: 72px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-family: inherit; cursor: pointer; }
.cast-target:hover, .cast-target:focus-visible { border-color: var(--gold); }
.audit-list { display: grid; gap: 0; margin: 4px 0 14px; max-height: 55vh; overflow-y: auto; }
.audit-row { display: flex; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.audit-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
.audit-copy { display: grid; gap: 3px; min-width: 0; }
.audit-copy b { font-size: 13px; font-weight: 600; }
.audit-copy small { color: var(--muted); font-size: 10px; }
.slip-item .si-sub { display: block; color: var(--muted); font-size: 9px; text-align: right; }
.slip-item .si-x { color: var(--red); cursor: pointer; padding: 0 6px; font-weight: 700; }
.slip-total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.slip-total .st-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 3px 0; }
.slip-total .st-row.grand { font-size: 19px; color: var(--gold-soft); font-weight: 900; padding-top: 8px; }

/* Menu picker */
.menu-cats { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 4px; }
.menu-cat { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; font-size: 12px; background: var(--card); border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.menu-cat.active { background: var(--gold); color: #1a1509; border-color: var(--gold); }
.menu-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.menu-pick { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: left; cursor: pointer; color: var(--text); }
.menu-pick .mp-name { font-size: 13px; font-weight: 700; }
.menu-pick .mp-price { font-size: 12px; color: var(--gold-soft); margin-top: 3px; }

/* 黒服用 注文カート(卓上パネル panel.html と同型のキオスクUI) */
.modal.order-modal { max-width: 920px; height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.order-modal .modal-head { margin-bottom: 10px; flex: 0 0 auto; }
.om-target { flex: 0 0 auto; padding: 8px 10px; border: 1px solid rgba(212,175,55,.3); border-radius: 10px; background: rgba(212,175,55,.07); margin-bottom: 8px; transition: outline-color .2s; }
.om-target.flash { outline: 2px solid var(--gold); }
.om-target-l { display: block; font-size: 10px; color: var(--gold-soft); font-weight: 800; margin-bottom: 6px; }
.om-cats { flex: 0 0 auto; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.om-cat { flex: 0 0 auto; padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 700; background: var(--card); border: 1px solid var(--line); color: var(--muted); cursor: pointer; font-family: inherit; white-space: nowrap; }
.om-cat.active { background: var(--gold); color: #1a1509; border-color: var(--gold); }
.om-body { flex: 1; min-height: 0; display: grid; grid-template-rows: 1fr auto; gap: 8px; }
.om-items { overflow-y: auto; align-content: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 2px; }
.om-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 11px; text-align: left; cursor: pointer; color: var(--text); font-family: inherit; }
.om-item:active, .om-item:focus-visible { border-color: var(--gold); }
/* 卓にキャストが1人もいない時のキャスト必須品(キャストドリンク・シャンパン・指名)。
   押せる見た目のまま無反応だと「注文が壊れている」に見えるので、選べないことを見た目で示す。 */
.om-item.locked { opacity: .42; border-style: dashed; cursor: not-allowed; }
.om-item.locked .pr { color: var(--muted); }
.mp-lock { font-size: 9px; font-weight: 800; color: #fff; background: #a04040; border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.menu-pick.locked { opacity: .42; border-style: dashed; cursor: not-allowed; }
.om-item .n { display: block; font-size: 13px; font-weight: 700; line-height: 1.35; }
.om-item .pr { display: block; color: var(--gold-soft); font-weight: 800; margin-top: 6px; font-size: 13px; }
.om-cart { border-top: 1px solid var(--line); padding-top: 6px; max-height: 30vh; overflow-y: auto; }
.om-cart-h { font-size: 11px; color: var(--muted); font-weight: 800; margin-bottom: 2px; }
.om-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.om-row .cn { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; }
.om-row .cq { display: flex; align-items: center; gap: 8px; }
.om-row .cq button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; }
.om-row .cq span { min-width: 18px; text-align: center; font-weight: 800; }
.om-row .cp { min-width: 72px; text-align: right; font-weight: 700; color: var(--gold-soft); font-size: 13px; }
.om-empty { padding: 10px 0; font-size: 12px; }
.om-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.om-foot .btn { margin: 0; width: auto; }
.om-foot .om-tot { flex: 1; text-align: right; font-weight: 800; font-size: 16px; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.om-foot #omSend { padding: 14px 26px; }
@media (min-width: 700px) {
  .om-body { grid-template-rows: none; grid-template-columns: 1fr 300px; }
  .om-cart { border-top: 0; border-left: 1px solid var(--line); padding: 0 0 0 12px; max-height: none; }
}

/* Buttons */
.btn { display: block; width: 100%; padding: 14px; border-radius: 12px; border: none; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 8px; font-family: inherit; }
.btn-gold { background: var(--gold); color: #1a1509; }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: rgba(255,90,106,.14); color: var(--red); border: 1px solid rgba(255,90,106,.3); }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { margin-top: 0; }

/* Select list (customer/cast pick) */
.pick-list { max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.pick-row { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.pick-row.selected { border-color: var(--gold); background: rgba(212,175,55,.1); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; }
.seg button.active { background: var(--gold); color: #1a1509; border-color: var(--gold); }

/* ===== Head tools / mini buttons ===== */
.head-tools { display: flex; gap: 10px; align-items: center; }
.mini-btn { padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.mini-btn.gold { background: var(--gold); color: #1a1509; border-color: var(--gold); }

/* ===== Punch (勤怠) ===== */
.punch-list { display: flex; flex-direction: column; gap: 8px; }
.punch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
/* 名前の右隣に「日毎明細」、その下にステータス */
.punch-row .pr-left { display: flex; align-items: center; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; min-width: 0; }
.punch-row .pr-left .pr-status { flex-basis: 100%; }
.punch-row .pr-name { font-weight: 700; font-size: 15px; }
.punch-row .daily-btn { flex: 0 0 auto; margin-left: 0; }
.pr-status { font-size: 11px; color: var(--muted); }
.pr-status.working { color: var(--green); font-weight: 700; }
.punch-row .pr-btns { display: flex; gap: 6px; }
.pbtn { padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-weight: 700; font-size: 12px; cursor: pointer; font-family: inherit; }
.pbtn.in { background: var(--gold); color: #1a1509; border-color: var(--gold); }
.pbtn.out { background: rgba(255,90,106,.14); color: var(--red); border-color: rgba(255,90,106,.3); }

/* ===== 金額入力 ===== */
.amount-input { width: 100%; padding: 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 20px; font-weight: 700; text-align: right; font-family: inherit; }

/* ===== 変動品目チップ / 金額編集 ===== */
.mp-var { font-size: 9px; font-weight: 800; color: #1a1509; background: var(--gold); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.si-price { border-bottom: 1px dashed var(--gold); cursor: pointer; }

/* ===== 分割会計 ===== */
.split-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.split-row .sm { flex: 0 0 60px; font-weight: 700; font-size: 14px; }
.split-row .amount-input.sp { flex: 1; font-size: 17px; padding: 9px 11px; }
.split-row .sc { flex: 0 0 auto; font-size: 11px; white-space: nowrap; }

/* ===== QRカード ===== */
.qr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qr-card { background: #fff; color: #111; border: 1px solid #d9dde4; border-radius: 12px; padding: 10px; text-align: center; }
.qr-card .qt { font-weight: 800; font-size: 13px; }
.qr-card .qq { display: flex; justify-content: center; margin: 6px 0; }
.qr-card .qq img, .qr-card .qq canvas, .qr-card .qq table { margin: 0 auto; }
.qr-card .qi { font-size: 9px; color: #333; font-weight: 700; margin-top: 2px; }
.qr-card .qu { font-size: 8px; color: #666; word-break: break-all; }
.qr-print-head { display: none; }
.qr-print-btn { margin-bottom: 12px; }
.qr-print-btn:disabled { cursor: wait; opacity: .55; }

/* ===== 締めシミュレーター ===== */
.sim-cta {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 16px; border-radius: 16px; margin-bottom: 14px; text-align: left;
  border: 1px solid rgba(212, 175, 55, .45);
  background: linear-gradient(135deg, rgba(212, 175, 55, .18), rgba(212, 175, 55, .05));
  color: var(--text); cursor: pointer; font-family: inherit;
}
.sim-cta .s-ico { font-size: 26px; }
.sim-cta b { font-size: 16px; color: var(--gold-soft); }
.sim-cta small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.5; }
.sim-cta .s-arrow { margin-left: auto; color: var(--gold); font-size: 24px; font-weight: 700; }
.sim-cta.geppo { border-color: rgba(33, 115, 70, .5); background: linear-gradient(135deg, rgba(33, 115, 70, .22), rgba(33, 115, 70, .06)); margin-top: -4px; }
.sim-cta.geppo b { color: #6fb98a; }
.sim-cta.geppo .s-arrow { color: #6fb98a; }
.sales-actions, .sales-panels { display: grid; grid-template-columns: 1fr; }
.sales-panel .sub-head { margin-top: 22px; }

.xlsfile { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; }
.xlsfile .xicon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; background: #217346; color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.xlsfile .xname { font-weight: 800; font-size: 13px; }
.xlsfile .xmeta { color: var(--muted); font-size: 10.5px; }

.xls-tabs { display: flex; gap: 3px; margin-top: 14px; overflow-x: auto; }
.xls-tabs button {
  padding: 8px 13px; border: 1px solid #cdd5dd; border-bottom: none; border-radius: 8px 8px 0 0;
  background: #dfe5eb; color: #556; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.xls-tabs button.active { background: #fff; color: #217346; }
.xls-sheet { background: #fff; border: 1px solid #cdd5dd; border-radius: 0 10px 10px 10px; overflow: auto; max-height: 300px; }
.xls-sheet table { border-collapse: collapse; width: 100%; font-size: 11px; color: #222; }
.xls-sheet td { border: 1px solid #e4e9ee; padding: 5px 8px; white-space: nowrap; background: #fff; }
.xls-sheet tr:first-child td { background: #217346; color: #fff; font-weight: 700; border-color: #1c5f3a; position: sticky; top: 0; }
.xls-sheet td.num { text-align: right; font-variant-numeric: tabular-nums; }
.xls-dl {
  width: 100%; margin-top: 12px; padding: 15px; border: none; border-radius: 12px;
  background: #217346; color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; font-family: inherit;
}
.xls-dl:active { background: #1a5c38; }

/* ===== 給与テーブル ===== */
.pay-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 4px 0; }
.pay-table th, .pay-table td { border-bottom: 1px solid var(--line); padding: 7px 4px; text-align: right; white-space: nowrap; }
.pay-table th:first-child, .pay-table td:first-child { text-align: left; }
.pay-table th { color: var(--muted); font-weight: 500; font-size: 11px; }

/* ===== 女子給 日毎明細（受領書「日報(原本)」1人分の再現） ===== */
.gp-slip { max-width: 340px; margin: 4px auto 0; border: 1.5px solid #999; background: #fff; color: #16161a; font-size: 13px; line-height: 1.3; border-radius: 4px; overflow: hidden; }
.gp-head { display: flex; align-items: stretch; border-bottom: 1px solid #999; }
.gp-name { flex: 0 0 46%; background: #b7ecf3; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; padding: 12px 6px; border-right: 1px solid #999; color: #0f3b42; }
.gp-total { flex: 1; display: flex; align-items: center; justify-content: flex-end; padding: 6px 14px; font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.gp-sec { padding: 6px 10px; border-bottom: 1px solid #999; }
.gp-trow { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.gp-trow .lb { color: #555; }
.gp-trow .ci { background: #cdeff5; border: 1px solid #8ecdd8; padding: 2px 8px; min-width: 54px; text-align: center; font-weight: 600; }
.gp-trow .tl { color: #666; }
.gp-trow .pr { margin-left: auto; color: #333; }
.gp-trow .amt { margin-left: auto; background: #d6d6f2; border: 1px solid #a9a9d4; padding: 2px 12px; font-weight: 700; }
.gp-bhead { display: flex; justify-content: space-between; padding: 4px 10px; font-weight: 700; border-bottom: 1px solid #999; background: #f3f3f6; }
.gp-grid { display: grid; grid-template-columns: 42px 34px 46px 24px 1fr 22px; }
.gp-grid > div { border-right: 1px solid #cfcfd6; border-bottom: 1px solid #cfcfd6; padding: 3px 4px; min-height: 25px; display: flex; align-items: center; justify-content: center; text-align: center; }
.gp-grid .c-rate { font-weight: 700; }
.gp-grid .c-eq { color: #888; }
.gp-grid .c-qty { background: #ececf8; }
.gp-grid .c-amt { justify-content: flex-end; background: #d6d6f2; font-weight: 600; }
.gp-grid .c-mark { font-weight: 800; color: #444; border-right: none; }
.gp-grid .c-lbl2 { grid-column: 1 / 3; font-weight: 700; }
.gp-grid .c-ab { grid-column: 1 / 4; justify-content: flex-start; padding-left: 10px; font-weight: 700; }
.gp-grid .c-yellow { background: #fdf0b0; }
.gp-grid .c-pink { background: #f8d5cb; }
.gp-foot { padding: 8px 10px; }
.gp-frow { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.gp-frow .fl { font-weight: 700; }
.gp-frow .amt { background: #d6d6f2; border: 1px solid #a9a9d4; padding: 2px 10px; font-weight: 700; }
.gp-frow.gp-calc .amt.sm { font-size: 12px; padding: 1px 6px; }
.gp-frow.gp-calc .amt.big { margin-left: auto; font-size: 16px; }
.gp-frow.gp-lbls { color: #666; font-size: 11px; }
.gp-frow.gp-lbls .gp-gross { background: #eee; border: 1px solid #ccc; padding: 1px 8px; }
.gp-frow.gp-deduct { color: #8a2b2b; border-top: 1px dashed #ccc; padding-top: 6px; margin-top: 2px; }

/* Toast */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #1a1509; padding: 12px 20px; border-radius: 999px; font-weight: 700;
  font-size: 14px; z-index: 80; box-shadow: var(--shadow); animation: toastIn .2s ease;
}
.toast.error {
  background: var(--red, #e5484d); color: #fff;
  box-shadow: 0 6px 24px rgba(229, 72, 77, .45);
  border: 1px solid rgba(255, 255, 255, .25); font-size: 15px;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; }
/* 過去の日報 年→月→日 ドリルダウン */
.closes-nav { margin-bottom: 8px; }
.closes-nav + .closes-nav { margin-top: -2px; }
.closes-days { margin-top: 6px; }
/* スライド時給テーブル(設定) */
.slide-tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 4px; }
.slide-tier-row { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.slide-tier-row input { width: 82px; }

/* ===== Light theme refinements ===== */
html[data-theme="light"] .preflight.danger { color: #8f2635; }
html[data-theme="light"] .preflight.warn { color: #7a4808; }
html[data-theme="light"] .pay-card { color: #355baf; }
html[data-theme="light"] .nom-tag.nom-hon { color: #76560d; }
html[data-theme="light"] .nom-tag.nom-jonai { color: #315d91; }
html[data-theme="light"] .nom-tag.nom-free { color: #2d7148; }

@media (max-width: 480px) {
  .theme-toggle { width: 34px; padding: 0; }
  .theme-toggle span:last-child, .today { display: none; }
  .store-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ===== Desktop POS layout ===== */
@media (min-width: 960px) {
  body { padding-left: var(--sidebar-w); padding-bottom: 0; }
  .app-header { left: var(--sidebar-w); padding: 0 28px; }
  .banner { margin: 12px 28px 0; }
  .view { max-width: 1280px; padding: 24px 28px 48px; }
  .section-head { margin-bottom: 18px; }
  .bottom-nav {
    top: 0; right: auto; width: var(--sidebar-w); height: 100dvh;
    flex-direction: column; gap: 8px; padding: calc(var(--head-h) + 14px) 8px 18px;
    border-top: 0; border-right: 1px solid var(--line);
  }
  .nav-btn {
    flex: 0 0 76px; width: 100%; border-radius: 14px; border-left: 3px solid transparent;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
  }
  .nav-btn:hover { background: var(--card); color: var(--text); }
  .nav-btn.active { background: rgba(212,175,55,.10); border-left-color: var(--gold); }
  .nav-btn .nav-ico { font-size: 22px; }
  .assist-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cast-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .table-grid.plan { grid-auto-rows: minmax(112px, auto); gap: 14px; padding: 30px 16px 16px; }
  .table-grid.plan .table-card { min-height: 104px; padding: 13px 14px; }
  .customer-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .punch-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sales-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .sales-actions .sim-cta { min-height: 88px; margin: 0 0 16px; }
  .sales-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; align-items: start; }
  .sales-panel .sub-head { margin-top: 24px; }
  .toast { bottom: 24px; }
}

/* 印刷・PDFはインクを使い過ぎないライト配色に固定 */
@page { size: A4 portrait; margin: 10mm; }
@media print {
  :root {
    --bg: #ffffff; --bg-2: #ffffff; --card: #ffffff; --card-2: #f4f4f4;
    --line: #cfd3d9; --text: #111111; --muted: #555b64; --gold: #76560d; --gold-soft: #604709;
    --header-bg: #ffffff; --nav-bg: #ffffff; --neutral-chip: #f2f3f5;
    --warm-card: #fffdf7; --warm-box: #fff8df; --body-glow: #ffffff; --shadow: none;
  }
  html, body { background: #ffffff !important; color: #111111; }
  body { padding: 0 !important; }
  .app-header { position: static; height: auto; padding: 10px 0; background: #ffffff; }
  .bottom-nav, .theme-toggle, .conn-badge, .banner { display: none !important; }
  .view { max-width: none; padding: 16px 0; }
  .table-card, .cust-card, .kpi, .rank-row, .alert-row, .recent-row, .punch-row { box-shadow: none; break-inside: avoid; }

  body.qr-printing > :not(#modalOverlay) { display: none !important; }
  body.qr-printing #modalOverlay {
    display: block !important; position: static; inset: auto; background: #fff !important;
  }
  body.qr-printing #modalOverlay .modal {
    display: block; width: 100%; max-width: none; max-height: none; overflow: visible;
    padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff;
  }
  body.qr-printing #modalOverlay .modal > * { display: none !important; }
  body.qr-printing #modalOverlay .modal > .qr-print-sheet { display: block !important; }
  body.qr-printing .qr-print-head {
    display: flex !important; align-items: baseline; gap: 10px; margin-bottom: 5mm;
    padding-bottom: 3mm; border-bottom: 2px solid #9a7217; color: #111;
  }
  body.qr-printing .qr-print-head b { color: #76560d; font-family: Georgia, serif; font-size: 17pt; }
  body.qr-printing .qr-print-head span { font-size: 14pt; font-weight: 800; }
  body.qr-printing .qr-print-head small { margin-left: auto; color: #555; font-size: 7pt; }
  body.qr-printing .qr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
  body.qr-printing .qr-card {
    min-height: 47mm; display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 1px dashed #777; border-radius: 0; padding: 3mm; break-inside: avoid; page-break-inside: avoid;
  }
  body.qr-printing .qr-card .qt { font-size: 13pt; }
  body.qr-printing .qr-card .qq { margin: 1.5mm 0; }
  body.qr-printing .qr-card .qq img, body.qr-printing .qr-card .qq canvas, body.qr-printing .qr-card .qq table {
    width: 27mm !important; height: 27mm !important;
  }
  body.qr-printing .qr-card .qi { font-size: 7.5pt; }
  body.qr-printing .qr-card .qu { font-size: 5.5pt; }
}

/* ===== 2026-07-15 客先修正依頼バッチ ===== */
/* 前料金(セット料金前受け) */
.prepaid-banner { padding: 9px 12px; border-radius: 10px; background: rgba(74,222,128,.10); border: 1px solid rgba(74,222,128,.35); color: var(--green); font-size: 12px; margin-bottom: 10px; }
.t-prepaid { margin-top: 4px; font-size: 10px; font-weight: 800; color: var(--green); }
.prepaid-toggle { display: block; width: 100%; padding: 12px; border-radius: 12px; border: 1px dashed var(--line); background: var(--card); color: var(--text); font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; text-align: left; }
.prepaid-toggle.on { border: 1px solid rgba(74,222,128,.5); background: rgba(74,222,128,.08); color: var(--green); }
.prepaid-amount-row { margin-top: 8px; }
.prepaid-amount-row label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }

/* 税込/税別 */
.tax-badge { font-size: 9px; font-weight: 800; color: var(--green); border: 1px solid rgba(74,222,128,.45); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.tax-toggle { margin-left: 6px; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card-2); color: var(--muted); cursor: pointer; font-family: inherit; vertical-align: middle; }
.tax-toggle.incl { color: var(--green); border-color: rgba(74,222,128,.5); background: rgba(74,222,128,.08); }

/* 会計前ダブルチェック(レ点2つ) */
.paycheck { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--card); }
.paycheck-title { font-size: 11px; color: var(--muted); font-weight: 800; margin-bottom: 8px; }
.pchk { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; margin-bottom: 6px; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; text-align: left; background: rgba(255,90,106,.08); border: 1px solid rgba(255,90,106,.4); color: var(--red); }
.pchk:last-child { margin-bottom: 0; }
.pchk .pchk-mark { flex: 0 0 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 15px; font-weight: 900; background: rgba(255,90,106,.15); }
.pchk.ok { background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.5); color: var(--green); }
.pchk.ok .pchk-mark { background: rgba(74,222,128,.18); }

/* 給与明細ビューア(受領書式) */
.payslip { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--card); }
.ps-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--gold); padding-bottom: 8px; margin-bottom: 4px; }
.ps-pay { font-size: 22px; font-weight: 900; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.ps-sec { font-size: 10px; font-weight: 800; color: var(--muted); margin: 10px 0 2px; letter-spacing: .08em; }
.ps-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.ps-row span:last-child { font-variant-numeric: tabular-nums; }
.ps-row.ps-strong { font-weight: 800; }
.ps-total { color: var(--gold-soft); font-size: 16px; }
.ps-sign { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* 案内所管理 */
.agency-table-wrap { overflow-x: auto; }
.agency-table .muted-row td { color: var(--muted); }
.agency-table .total-row td { font-weight: 800; border-top: 2px solid var(--gold); color: var(--gold-soft); }
.agency-add { display: flex; gap: 8px; margin-bottom: 12px; }
.agency-add .field-input { flex: 1; }
.agency-add .btn { width: auto; margin: 0; padding: 11px 18px; }

/* ===== 2026-07-15 第2バッチ: 紙伝票・出勤申請・検索コンボ ===== */
/* 出勤申請(店長確認待ち) */
.pr-status.pending { color: var(--amber); }
.pbtn.confirm { background: rgba(74,222,128,.14); color: var(--green); border: 1px solid rgba(74,222,128,.4); }

/* 伝票モーダル(ワイド) */
.modal.slip-modal { max-width: 900px; }
.slip-body { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 4px; }
@media (min-width: 700px) { .slip-body { grid-template-columns: minmax(0, 1fr) 260px; } }
.slip-side { display: flex; flex-direction: column; min-width: 0; }
.side-label { font-size: 11px; color: var(--muted); margin-bottom: 5px; display: block; }

/* お会計票(紙) — テーマに関わらず紙は白 */
.kaikei {
  --kk: #2b6cb8;               /* 伝票の青 */
  background: #ffffff; color: #1c2733; border: 2px solid var(--kk); border-radius: 8px;
  padding: 12px 12px 10px; min-width: 0;
  font-feature-settings: "tnum";
}
.kk-head { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--kk); }
.kk-title { font-size: 19px; font-weight: 900; letter-spacing: .35em; }
.kk-dot { width: 22px; height: 14px; border: 2px solid var(--kk); border-radius: 5px; background: var(--kk); opacity: .85; }
.kk-sub { display: flex; align-items: baseline; gap: 8px; font-size: 13px; margin: 8px 2px 6px; color: #1c2733; }
.kk-sub b { font-size: 16px; }
.kk-count { margin-left: auto; font-size: 11px; color: #64748b; }
.kk-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.kk-table th, .kk-table td { border: 1px solid var(--kk); padding: 6px 6px; font-size: 13px; }
.kk-table th { color: var(--kk); font-size: 11px; font-weight: 700; text-align: center; padding: 4px 2px; line-height: 1.2; }
.kk-table th.kk-th-name { width: 34%; }
.kk-table th:nth-child(2) { width: 16%; }
.kk-table th:nth-child(3), .kk-table th:nth-child(4) { width: 17%; }
.kk-table th:nth-child(5) { width: 9%; }
.kk-table th:nth-child(6) { width: 7%; }
.kk-name { font-weight: 700; word-break: break-all; }
.kk-name .item-cast { color: #2b6cb8; }
.kk-name .item-cast.missing { color: #d33; }
.kk-back { display: inline-block; font-size: 9px; font-weight: 800; color: #8a6d1a; background: #f5e7bd; border-radius: 4px; padding: 1px 4px; vertical-align: middle; }
.kk-qty { text-align: center; white-space: nowrap; }
.kk-tally { font-weight: 900; letter-spacing: .06em; }
.kk-qty small { color: #94a3b8; font-size: 9px; margin-left: 3px; }
.kk-num { text-align: right; cursor: pointer; font-variant-numeric: tabular-nums; }
.kk-num:hover { background: #eef4fb; }
.kk-tax { text-align: center; color: #0a7d40; font-weight: 800; font-size: 11px; }
.kk-x { text-align: center; padding: 0 !important; }
.kk-void { border: 0; background: transparent; color: #d33; font-size: 15px; font-weight: 800; cursor: pointer; padding: 4px 7px; }
.kk-empty td { height: 27px; }
.kk-bottom { margin-top: 10px; }
.kk-total { display: flex; align-items: center; justify-content: space-between; border: 2px solid var(--kk); border-radius: 6px; background: #e8f0fa; padding: 7px 12px; }
.kk-total span { color: var(--kk); font-size: 12px; font-weight: 800; }
.kk-total b { font-size: 19px; font-variant-numeric: tabular-nums; }
.kk-meta { display: flex; gap: 16px; font-size: 11px; color: #475569; margin-top: 7px; padding: 0 2px; }
.kk-meta b { color: #1c2733; }

/* 検索コンボ(案内所・キャスト) */
.combo { position: relative; }
.combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  max-height: 220px; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow);
}
.combo-opt { padding: 10px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line); }
.combo-opt:last-child { border-bottom: 0; }
.combo-opt:hover { background: rgba(212,175,55,.1); }
.combo-opt.clear { color: var(--red); }
.combo-opt.muted { color: var(--muted); cursor: default; }

/* ===== Excelプレビュー: 元の「シュガー店舗管理表」配色(Excel2003パレット) ===== */
.xls-sheet.excelish { background: #fff; }
.xls-sheet.excelish table { color: #111; }
.xls-sheet.excelish td { border: 1px solid #a8b4c0; background: #fff; color: #111; }
.xls-sheet.excelish td.x-label { background: #CCFFFF; font-weight: 600; }   /* シアン=ラベル */
.xls-sheet.excelish td.x-val { background: #CCCCFF; }                        /* ラベンダー=数値 */
.xls-sheet.excelish td.x-key { background: #FFFF00; font-weight: 800; }      /* 黄=重要計 */
.xls-sheet.excelish tr:first-child td.x-band,
.xls-sheet.excelish tr:first-child td { background: #FFCC00; font-weight: 800; color: #1c2733; border-color: #a8842a; }
.xls-sheet.excelish.big { max-height: 62vh; }
.xls-sheet.excelish.big table { font-size: 12.5px; }
.xls-sheet.excelish.big td { padding: 6px 9px; }
#sheetView .xls-sheet { border-radius: 0 10px 10px 10px; }

/* ===== 2026-07-17 第4バッチ: フロア再設計・未定/待合室・来店フロー ===== */
/* フロアツールバー(＋新規/タイトル/ツール) */
.floor-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.floor-toolbar .floor-title { font-size: 20px; font-weight: 800; }
.floor-toolbar .head-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.new-party-btn { padding: 9px 18px; border-radius: 12px; border: none; background: var(--gold); color: #1a1509; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.new-party-btn:active { transform: scale(.96); }

/* フロアをスクリーンにフィット(卓グリッドが残り高さを埋める) */
#view-floor.view { display: flex; flex-direction: column; height: calc(100vh - var(--nav-h) - 8px); min-height: 0; }
body.training-mode #view-floor.view { height: calc(100vh - var(--nav-h) - 46px); }
#view-floor .floor-assist { flex: 0 0 auto; }
/* スクロール一切なし: 4行を画面高に均等割りして全卓を1画面に収める */
#view-floor .table-grid.plan { flex: 1 1 auto; min-height: 0; overflow: hidden; grid-template-rows: repeat(4, 1fr); grid-auto-rows: 1fr; }
#view-floor .table-grid.plan .table-card { overflow: hidden; }

/* 未定/待合室ゾーン */
.table-card.zone-card { cursor: pointer; background: rgba(120,140,200,.08); border: 1px solid rgba(140,160,220,.35); display: flex; flex-direction: column; }
.table-card.zone-card.zone-waiting { background: rgba(120,200,160,.08); border-color: rgba(120,200,160,.35); }
.zone-head { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.zone-head .zone-ico { font-size: 15px; }
.zone-head .zone-count { margin-left: auto; background: var(--card-2); border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.zone-list { margin-top: 6px; display: grid; grid-template-rows: repeat(3, auto); grid-auto-flow: column; grid-auto-columns: minmax(72px, 1fr); gap: 3px 8px; align-content: start; }
.table-grid.plan .zone-card { min-height: 84px; height: auto; align-self: start; }   /* 3行分に伸びるよう高さ固定を解除 */
.zone-row { font-size: 12px; padding: 3px 7px; background: var(--card); border-radius: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-empty { font-size: 11px; color: var(--muted); }
.zone-more { font-size: 11px; color: var(--gold-soft); font-weight: 700; }

/* 来店登録: 金額ライン(人数×金額→合計+パターン) */
.party-modal .amount-line { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.amount-line .al-cell { display: flex; flex-direction: column; gap: 3px; }
.amount-line .al-cell label { font-size: 10px; color: var(--muted); }
.amount-line .al-cell .field-input { width: 90px; }
.amount-line .al-op { font-size: 18px; font-weight: 800; color: var(--muted); padding-bottom: 8px; }
.amount-line .al-total { min-width: 100px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); font-weight: 800; color: var(--gold-soft); text-align: right; font-variant-numeric: tabular-nums; }
.amount-line .al-pattern { width: auto; margin: 0 0 0 auto; padding: 10px 16px; }

/* ゾーン管理: partyの行アクション */
.party-row { display: flex; align-items: center; justify-content: space-between; }
.party-actions { display: flex; gap: 5px; flex: 0 0 auto; }
.mini-btn.danger { color: var(--red); border-color: rgba(255,90,106,.4); }

/* 紙伝票: キャスト見出し行(女の子名)・本指名は赤 */
.kk-castrow td { background: #eef4fb !important; font-weight: 800; color: #1c2733; border-top: 2px solid var(--kk) !important; }
.kk-castrow.hon td { color: #c62828; }
.kk-hontag { font-size: 9px; font-weight: 800; color: #fff; background: #c62828; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.kk-tax { font-size: 10px; color: #475569; }

/* キャスト選択 */
.cast-select-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.cast-select-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); flex-wrap: wrap; }
.cast-select-row.on { border-color: var(--gold); background: rgba(212,175,55,.08); }
.csr-name { flex: 1; min-width: 120px; text-align: left; background: none; border: 0; color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.csr-nom { flex: 0 0 auto; }
.csr-nom button { font-size: 11px; padding: 5px 10px; }
.kk-castrow.common td { color: #64748b; font-weight: 700; background: #f1f5f9 !important; }
.daily-btn { margin-left: 8px; font-size: 10px; padding: 3px 9px; vertical-align: middle; }
.rate-in { text-align: right; }

/* キャストページ */
.cast-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cast-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.cast-card:active { transform: scale(.98); }
.cc-top { display: flex; align-items: center; gap: 8px; }
.cc-name { font-size: 16px; font-weight: 800; }
.cc-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cc-meta { font-size: 11px; color: var(--gold-soft); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 黒服用 注文リスト(提供チェック) */
.order-list-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ol-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.ol-card.all-served { opacity: .6; }
.ol-head { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ol-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.ol-item.served .ol-name { color: var(--muted); text-decoration: line-through; }
.ol-name { font-size: 13px; }
.ol-btn { flex: 0 0 auto; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--gold); background: rgba(212,175,55,.12); color: var(--gold-soft); font: inherit; font-weight: 800; font-size: 12px; cursor: pointer; }
.ol-btn.done { border-color: rgba(78,203,138,.5); background: rgba(78,203,138,.12); color: var(--green); }

/* ボトムナビ7項目対応(小型化) */
.bottom-nav .nav-btn { font-size: 10px; }
.bottom-nav .nav-btn .nav-ico { font-size: 18px; }

/* ===== 目視検査の修正(2026-07-17) ===== */
/* 占有卓(1マス)は情報が多いので余白・文字を最小化し、1行高に全項目収める(スクロール/クリップ防止) */
.table-grid.plan .table-card { padding: 8px 11px; }
.table-grid.plan .table-card .t-no { font-size: 11px; }
.table-grid.plan .table-card .t-state { top: 8px; right: 9px; font-size: 9px; padding: 2px 7px; }
.table-grid.plan .table-card .t-guest { margin-top: 3px; font-size: 17px; }
.table-grid.plan .table-card .t-cust { margin-top: 0; font-size: 11px; min-height: 0; }
.table-grid.plan .table-card .t-context { margin-top: 1px; font-size: 10px; }
.table-grid.plan .table-card .t-meta { margin-top: 2px; font-size: 11px; }
.table-grid.plan .table-card .t-set, .table-grid.plan .table-card .t-prepaid, .table-grid.plan .table-card .t-call { margin-top: 1px; font-size: 9.5px; }

/* ⚙ 設定ページ */
.set-block { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.set-cell { display: flex; flex-direction: column; gap: 4px; }
.set-cell label { font-size: 11px; color: var(--muted); }
.set-cell .field-input { text-align: right; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row span { font-size: 13px; }
.set-row .field-input { text-align: right; }

/* ===== R2(契約後レビュー第2弾): 卓マス遍歴・待機キャスト・会計票 済/セット見出し・30分打刻 ===== */
/* 卓マスのキャスト遍歴(順番・在席/離席・指名区分) */
.t-casts { display: flex; flex-direction: column; gap: 1px; margin: 2px 0; overflow: hidden; }
.t-cast-line { font-size: 11px; line-height: 1.4; color: var(--text); display: flex; gap: 5px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cast-line .tcl-tag { font-size: 9px; padding: 0 5px; border-radius: 7px; background: var(--card-2, rgba(255,255,255,.08)); color: var(--muted); flex-shrink: 0; }
.t-cast-line.hon { color: var(--red); font-weight: 700; }
.t-cast-line.hon .tcl-tag { background: rgba(233, 69, 96, .16); color: var(--red); }
.t-cast-line.jonai .tcl-tag { background: rgba(96, 150, 233, .18); color: #6ea8ff; }
.t-cast-line.left { color: var(--muted); text-decoration: line-through; opacity: .65; }
.t-cast-line.more { color: var(--muted); font-size: 10px; }
.t-due { font-weight: 800; color: var(--gold); }
/* 待機キャストカード(旧: 待合室)。±=出勤キャスト−接客中の客数 */
.zone-standby .stand-diff { font-weight: 800; font-size: 12.5px; padding: 1px 9px; border-radius: 999px; background: var(--card-2, rgba(255,255,255,.08)); color: var(--muted); }
.zone-standby .stand-diff.plus { color: var(--green); background: rgba(57, 217, 138, .14); }
.zone-standby .stand-diff.minus { color: var(--red); background: rgba(233, 69, 96, .14); }
/* 伝票モーダルのキャスト遍歴ストリップ */
.cast-hist { font-size: 11.5px; color: var(--muted); margin: 2px 2px 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.cast-hist .ch-on { color: var(--text); font-weight: 600; }
.cast-hist .ch-left { text-decoration: line-through; opacity: .7; }
.cast-hist .ch-arrow { opacity: .45; }
/* お会計票: キャスト見出し横のセット表記(タップで金額編集・×で取消) */
.kk-hset { margin-left: 10px; font-weight: 700; font-size: 11px; background: #fffbe6; border: 1px solid #e6d795; border-radius: 6px; padding: 1px 7px; color: #5a4a12; cursor: pointer; white-space: nowrap; }
.kk-hset .kk-hx { margin-left: 6px; }
/* お会計票: 提供済み(✓)列 */
.kk-served { text-align: center; color: #15803d; font-weight: 800; font-size: 11px; }
.kk-served .kk-served-na { color: #b6c2cd; font-weight: 400; }
/* 30分刻み打刻の時刻選択 */
.punch-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.punch-times .pt-opt { padding: 13px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font-weight: 800; font-size: 16px; cursor: pointer; font-variant-numeric: tabular-nums; }
.punch-times .pt-opt.active { border-color: var(--gold); background: rgba(212, 175, 55, .14); color: var(--gold); }
/* QR動作テスト行・客単価セレクタ */
.qr-test-row { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; flex-wrap: wrap; }
.al-unit-sel { min-width: 96px; }

/* ④ 伝票見出し: 主役は日報番号、卓番号は補助として控えめに出す */
.mh-tbl { font-size: .8em; font-weight: 500; color: var(--gold-soft); opacity: .85; }

/* ─────────────────────────────────────────────
   キャストの磁石（フロアの待機キャスト）
   現場のホワイトボードで使っている黄色い丸磁石に見た目を寄せる。
   掴んで卓へ運ぶ操作を、今までと同じ手つきでできるようにするため。
   ───────────────────────────────────────────── */
.cast-magnet {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 62px; height: 34px; margin: 3px 4px 3px 0; padding: 0 10px;
  border-radius: 17px; background: #f5d372; color: #3a2f12;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid #d8b447;
  box-shadow: 0 1px 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.5);
  cursor: grab; user-select: none; touch-action: none;
}
.cast-magnet:active { cursor: grabbing; }
.cast-magnet.picked { opacity: .35; }

/* 掴んでいる間、指の先についてくる分身 */
.cast-magnet.ghost {
  position: fixed; z-index: 9999; pointer-events: none;
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 6px 16px rgba(0,0,0,.45);
  opacity: .95;
}

/* 磁石を置ける卓を光らせる */
.table-card.drop-on {
  outline: 3px solid var(--gold, #c9a86a);
  outline-offset: -3px;
  filter: brightness(1.12);
}
