/* スタッフ画面（iPad レジ・スマホのハンディ・キッチンモニター）
   型の参考: Figma コミュニティの POS UI キット（左のアイコンのサイドバー・数字のカード・写真の商品グリッド・右の注文パネル）
   色は KO の HP（紙・墨・弁柄） */
:root {
  --bg: #f3eee4;
  --surface: #fffdf8;
  --surface-2: #faf6ee;
  --line: #e4dacb;
  --accent-soft: #f3e6e1;
  --ok-soft: #e1efe4;
  --warn-soft: #f7ebd3;
  --alert-soft: #f8deda;
  --card-shadow: 0 1px 2px rgb(28 24 19 / 0.05), 0 6px 20px rgb(28 24 19 / 0.06);
  --side-w: 92px;
}
body { background: var(--bg); overscroll-behavior: none; }
#app { min-height: 100dvh; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
/* 上の細い帯（音が戻らない時の帯・通信の帯）が出ている間は、帯の下端（--top-bar-h・app.js が入れる）まで画面を下げる。
   帯がキッチン画面の「キッチン・バー・すべて」などを隠さないように（2026-10-27）。帯が無い時は 0 */
#app { padding-top: var(--top-bar-h, 0px); }
/* 画面の中の上の余白に足す安全領域（時計・電池の所）。帯が出ている間は帯がその所を占めるので、帯の分を引いた残りだけ（二重に空けない） */
:root { --safe-top: max(0px, env(safe-area-inset-top, 0px) - var(--top-bar-h, 0px)); }
.toasts { top: calc(12px + var(--top-bar-h, 0px)); }
body.pair-mode #app, body.kds-mode #app { display: block; }
.content { min-width: 0; display: flex; flex-direction: column; }
/* 通知音が止まっている間は、画面全体を覆う幕（2026-10-24 店の声「画面の真ん中にでっかく・音オンじゃないと使えないように」）。
   どこを触っても音がオンになって消える。オンになるまで下の画面は押せない */
.sound-bar { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px; border: 0; background: rgb(28 24 19 / 0.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #fff; text-align: center; touch-action: manipulation; }
.sound-bar.hidden { display: none; }
.sound-bar-icon { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--bengara); box-shadow: 0 0 0 14px rgb(124 58 45 / 0.35), 0 0 0 30px rgb(124 58 45 / 0.15); animation: sound-pulse 1.6s ease-in-out infinite; }
.sound-bar-title { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 900; letter-spacing: 0.04em; line-height: 1.3; }
.sound-bar-sub { max-width: 34em; font-size: 0.95rem; font-weight: 700; opacity: 0.8; line-height: 1.6; }
@keyframes sound-pulse { 50% { transform: scale(1.08); } }
/* タップしても音が戻らない時は、全画面をやめて上の細い帯（下の画面は押せる・帯を押せば試し直す） */
.sound-bar.compact { inset: env(safe-area-inset-top, 0px) 0 auto 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px; background: var(--alert); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sound-bar.compact .sound-bar-icon { width: 32px; height: 32px; box-shadow: none; animation: none; background: rgb(255 255 255 / 0.2); }
.sound-bar.compact .sound-bar-icon svg { width: 20px; height: 20px; }
.sound-bar.compact .sound-bar-title { font-size: 0.95rem; }
.sound-bar.compact .sound-bar-sub { display: none; }
.sound-bar.compact.hidden { display: none; }
/* 注文の情報を受け取れない時の帯（画面の上・押せる所をふさがない） */
.net-bar { position: fixed; top: var(--net-bar-top, 0px); left: 0; right: 0; z-index: 190; padding: calc(8px + var(--net-bar-safe, env(safe-area-inset-top, 0px))) 16px 8px; background: #b42318; color: #fff; font-weight: 800; font-size: 0.95rem; text-align: center; line-height: 1.4; pointer-events: none; }
.net-bar.hidden { display: none; }
/* レジ（PassPRNT）をホーム画面のアプリで開いている時の帯（画面の中・上）。印刷の後は Safari が開くので、レジは Safari で使う（2026-10-26） */
.safari-bar { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-top)) 14px 8px; background: #fff1d6; color: #5c3b00; border-bottom: 1px solid #f0c36d; font-weight: 700; font-size: 0.9rem; line-height: 1.45; }
.safari-bar > span { flex: 1; min-width: 0; }
.demo-bar { background: #e3eefc; color: #12345a; border-bottom-color: #9cbbe6; }
.pair-demo { display: grid; gap: 8px; justify-items: center; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.85rem; color: var(--ink-soft); }
.pair-demo p { margin: 0; }
.safari-bar .btn { flex: none; }
.safari-bar.hidden { display: none; }
.safari-steps { margin: 6px 0 0; padding-left: 1.4em; display: grid; gap: 6px; text-align: left; font-size: 0.9rem; line-height: 1.5; }
.pair-pp { width: 100%; display: grid; gap: 6px; text-align: left; padding: 12px 14px; border-radius: 14px; background: #fff1d6; color: #3d2a00; font-size: 0.88rem; line-height: 1.5; }
.pair-pp p { margin: 0; }
.pair-pp-steps summary { cursor: pointer; font-weight: 800; color: var(--brand, #7a2e1f); padding: 4px 0; }
.printer-where { display: grid; gap: 4px; }
.main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ic-wrap { display: inline-flex; line-height: 0; flex: none; }
.strong { font-weight: 800; }
.big { font-size: 1.4rem; font-weight: 800; }
.break { word-break: break-all; }
.center { text-align: center; }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 60px; color: var(--ink-soft); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--bengara); animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ボタン（base.css に足す） */
.btn { border-radius: 12px; border-color: var(--line); background: var(--surface); }
.btn-primary { background: var(--bengara); border-color: var(--bengara); box-shadow: 0 6px 16px rgb(124 58 45 / 0.22); }
.btn-dark { background: var(--sumi); border-color: var(--sumi); }
.btn-danger { background: var(--alert); border-color: var(--alert); } /* 上の .btn が base.css の赤を消していた（白地に白い文字で読めなかった） */
.btn-soft-ok { background: var(--ok-soft); border-color: #cfe3d4; color: var(--ok); }
.btn-price { margin-left: auto; padding-left: 14px; opacity: 0.95; }
.btn-lg .btn-price { font-size: 1.05rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; color: var(--ink); text-decoration: none; flex: none; }
.link-btn { border: 0; background: none; color: var(--ink-soft); font-weight: 700; font-size: 0.85rem; text-decoration: underline; }
.x { border: 0; background: transparent; color: var(--ink-faint); padding: 4px; border-radius: 6px; display: inline-grid; place-items: center; vertical-align: middle; }
.x:hover { background: var(--paper-warm); color: var(--ink); }
.x:disabled { opacity: 0.3; cursor: default; background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-weight: 700; font-size: 0.9rem; white-space: nowrap; color: var(--ink); }
.chip.on { background: var(--sumi); border-color: var(--sumi); color: #fff; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--paper-warm); color: var(--ink-soft); margin-left: 6px; white-space: nowrap; }
.tag-alert { background: var(--alert); color: #fff; }
.tag-warn { background: var(--warn-soft); color: #7a4f0e; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); flex-wrap: wrap; padding: 3px; gap: 2px; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 8px 14px; font-weight: 700; color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; border-radius: 9px; }
.seg-btn.on { background: var(--sumi); color: #fff; }
.seg-wide { display: flex; width: 100%; }
.seg-wide .seg-btn { flex: 1; justify-content: center; padding: 12px; }
.badge { position: absolute; top: 4px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ok); color: #fff; font-size: 0.72rem; font-weight: 800; line-height: 20px; text-align: center; }
.badge.alert { background: var(--alert); }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.input { border-color: var(--line); background: var(--surface); border-radius: 12px; }
.input.short { width: 7em; }
.input.date { width: auto; }
.input.time { width: 7.5em; }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field.center { justify-items: center; }
.field > label { font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); }
.field.row > label { margin-right: auto; }
.hint { font-size: 0.8rem; color: var(--ink-faint); }
.check { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.check input, .pm-list input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--bengara); flex: none; }

.counter { display: inline-flex; align-items: center; gap: 2px; border-radius: 999px; background: var(--paper-warm); padding: 3px; flex: none; }
.counter-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); display: grid; place-items: center; color: var(--ink); box-shadow: 0 1px 2px rgb(28 24 19 / 0.08); }
.counter-btn:disabled { opacity: 0.35; }
.counter-val { min-width: 2.2em; text-align: center; font-weight: 800; }
.counter.big .counter-btn { width: 52px; height: 52px; }
.counter.big .counter-val { font-size: 1.6rem; min-width: 2.6em; }

/* シート・ダイアログ */
.sheet-panel { background: var(--surface); }
.dialog h3 { margin: 0; font-size: 1.15rem; }
.dialog-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.dialog-head p { margin: 2px 0 0; }
.dialog-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--bengara); display: grid; place-items: center; flex: none; }
.dialog-thumb { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; flex: none; font-size: 1.6rem; }
.dialog-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.dialog.center { text-align: center; display: grid; justify-items: center; gap: 8px; }
.quick-guests { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.action { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 800; text-align: left; color: var(--ink); }
.action .ic-wrap { color: var(--bengara); }
.action.danger { color: var(--alert); }
.action.danger .ic-wrap { color: var(--alert); }
.list-btn { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 56px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; color: var(--ink); text-decoration: none; }
.list-btn.on { border-color: var(--sumi); }
.list-btn.alert { background: var(--alert-soft); border-color: #efc0b9; color: var(--alert); }
.list-btn.danger { color: var(--alert); }
.list-end { margin-left: auto; }
.menu-list { display: grid; gap: 4px; }
.menu-head { display: flex; gap: 10px; align-items: center; font-weight: 800; font-size: 1.05rem; }
.sheet-title { font-size: 1.1rem; margin: 0 0 12px; }

/* 端末の登録（パスワードなし） */
body.pair-mode { background: radial-gradient(120% 90% at 80% 0%, #3a2e24 0%, var(--sumi) 60%); }
.pair { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.pair-card { width: min(100%, 440px); background: var(--surface); border-radius: 28px; padding: 28px 24px 24px; display: grid; justify-items: center; gap: 10px; text-align: center; box-shadow: 0 30px 80px rgb(0 0 0 / 0.35); }
.pair-brand { font-family: var(--font-mincho); font-size: 1.5rem; letter-spacing: 0.06em; }
.pair-icon { width: 68px; height: 68px; border-radius: 22px; background: var(--accent-soft); color: var(--bengara); display: grid; place-items: center; margin: 6px 0 2px; }
.pair-card h1 { font-size: 1.2rem; margin: 0; }
.pair-lead { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.pair-or { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-size: 0.82rem; font-weight: 700; margin-top: 6px; }
.pair-or::before, .pair-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pair-boxes { display: flex; gap: 8px; }
.pair-box { width: 44px; height: 54px; border-radius: 12px; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; background: var(--surface-2); }
.pair-box.cur { border-color: var(--bengara); box-shadow: 0 0 0 3px rgb(124 58 45 / 0.15); }
.pair-keys { width: 100%; }
.pair-keys .pad-key { min-height: 54px; background: var(--surface-2); }
.pair-hint { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 0.8rem; color: var(--ink-soft); background: var(--paper-warm); border-radius: 12px; padding: 10px 12px; margin: 6px 0 0; }
.pair-qr { background: #fff; padding: 10px; border-radius: 18px; box-shadow: var(--card-shadow); margin: 6px 0; }
.pair-qr svg { display: block; width: 240px; height: 240px; }
.pair-qr.expired { width: 260px; height: 260px; display: grid; place-items: center; color: var(--ink-faint); }
.pair-code { font-size: 2.2rem; font-weight: 900; letter-spacing: 0.12em; }
.waiting { display: flex; gap: 8px; align-items: center; color: var(--ink-soft); font-weight: 700; }
.done-mark { width: 76px; height: 76px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 8px auto; box-shadow: 0 0 0 10px var(--ok-soft); }

/* 左のサイドバー（iPad・パソコン） */
.side { position: sticky; top: var(--top-bar-h, 0px); height: calc(100dvh - var(--top-bar-h, 0px)); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: calc(12px + var(--safe-top)) 8px 12px; background: var(--sumi); color: #d8d2c6; z-index: 30; }
.side-brand { width: 52px; height: 52px; border-radius: 16px; background: var(--bengara); color: #fff; display: grid; place-items: center; text-decoration: none; font-family: var(--font-mincho); font-size: 1.25rem; margin-bottom: 8px; box-shadow: 0 6px 16px rgb(124 58 45 / 0.35); }
.side-nav { display: grid; gap: 4px; width: 100%; }
.side-link { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 14px; color: #bdb6aa; text-decoration: none; font-size: 0.72rem; font-weight: 700; }
.side-link:hover { color: #fff; background: rgb(255 255 255 / 0.06); }
.side-link.on { background: rgb(255 255 255 / 0.12); color: #fff; }
.side-link.on::before { content: ''; position: absolute; left: -8px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--bengara); }
.side-foot { margin-top: auto; display: grid; gap: 8px; justify-items: center; width: 100%; }
.side-call { position: relative; width: 52px; height: 52px; border-radius: 16px; border: 0; background: var(--alert); color: #fff; display: grid; place-items: center; animation: pulse 1.4s infinite; }
.side-call-n { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: #fff; color: var(--alert); font-size: 0.75rem; font-weight: 900; display: grid; place-items: center; }
@keyframes pulse { 50% { opacity: 0.7; } }
.side-me { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 8px 2px; border-radius: 14px; border: 0; background: rgb(255 255 255 / 0.06); color: #f0ebe0; font-size: 0.7rem; font-weight: 700; }
.side-me-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px rgb(183 121 31 / 0.25); }
.conn.on { background: #6fcf8a; box-shadow: 0 0 0 3px rgb(111 207 138 / 0.2); }
.admin-tag { background: var(--bengara); border-radius: 6px; padding: 1px 6px; font-size: 0.66rem; color: #fff; }
.tabbar { display: none; }

/* ページ */
.page { padding: 20px 24px 48px; max-width: 1360px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 1.6rem; letter-spacing: 0.02em; }
.page-sub { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.9rem; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page-title { font-size: 1.15rem; margin: 6px 0 12px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 26px 0 10px; color: var(--ink-soft); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.toolbar .page-title { margin: 0 8px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--card-shadow); }
.card h3 { font-size: 0.95rem; margin: 2px 0 12px; color: var(--ink-soft); }
.card h3:not(:first-child) { margin-top: 18px; }
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 12px; }
.card-title .ic-wrap { color: var(--bengara); }
.card-title:not(:first-child) { margin-top: 18px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.notice { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: var(--paper-warm); color: var(--ink); text-decoration: none; margin-bottom: 14px; font-weight: 700; }
.notice-alert { background: var(--alert-soft); color: var(--alert); }
.notice-link { margin-left: auto; font-weight: 800; color: inherit; text-decoration: underline; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--ink-soft); display: grid; justify-items: center; gap: 6px; }
.empty-icon { width: 80px; height: 80px; border-radius: 24px; background: var(--paper-warm); color: var(--ink-faint); display: grid; place-items: center; }
.muted { color: var(--ink-soft); }
.tnum { font-variant-numeric: tabular-nums; }
.empty-line { display: flex; align-items: center; gap: 10px; color: var(--ok); }
.thumb.noimg { display: grid; place-items: center; font-size: 1.4rem; }

/* テーブル一覧 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--paper-warm); color: var(--ink-soft); flex: none; }
.stat-value { font-size: 1.5rem; font-weight: 900; line-height: 1.1; }
.stat-label { font-size: 0.8rem; color: var(--ink-soft); font-weight: 700; }
.stat.warn .stat-icon { background: var(--warn-soft); color: var(--warn); }
.stat.ok .stat-icon { background: var(--ok-soft); color: var(--ok); }
.stat.alert .stat-icon { background: var(--alert-soft); color: var(--alert); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.l-free i { border: 1.5px dashed var(--ink-faint); }
.l-seated i { background: var(--bengara); }
.l-cooking i { background: var(--warn); }
.l-ready i { background: var(--ok); }
.l-calling i { background: var(--alert); }
.l-served i { background: var(--sumi); }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.tcard { position: relative; display: grid; gap: 6px; align-content: start; min-height: 150px; padding: 16px 16px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); text-align: left; color: var(--ink); box-shadow: var(--card-shadow); overflow: hidden; }
.tcard::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--bengara); }
.tcard.free { background: transparent; border: 1.5px dashed #cfc3ae; box-shadow: none; }
.tcard.free::before { display: none; }
.tcard.st-cooking::before { background: var(--warn); }
.tcard.st-ready::before { background: var(--ok); }
.tcard.st-served::before { background: var(--sumi); }
.tcard.st-calling { border-color: var(--alert); box-shadow: 0 0 0 3px rgb(179 38 30 / 0.15); }
.tcard.st-calling::before { background: var(--alert); }
.tcard.takeout.st-seated::before { background: var(--sumi); } /* 持ち帰りも、注文のあとは卓と同じ状態の色（調理中・提供待ち・提供済み） */
.tcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tcard-name { font-weight: 900; font-size: 1.35rem; }
.tcard-name.small-name { font-size: 1rem; }
.tcard-plus { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-soft); }
.tcard-meta { display: flex; align-items: center; gap: 5px; font-size: 0.85rem; color: var(--ink-soft); font-weight: 700; flex-wrap: wrap; }
.tcard-meta .ic-wrap:not(:first-child) { margin-left: 8px; }
.tcard-area { margin-left: 6px; background: var(--paper-warm); border-radius: 6px; padding: 0 6px; font-size: 0.75rem; }
.tcard-state { margin-top: auto; font-weight: 800; color: var(--ink-faint); }
.tcard-badge { font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--bengara); white-space: nowrap; }
.b-cooking { background: var(--warn-soft); color: #7a4f0e; }
.b-ready { background: var(--ok-soft); color: var(--ok); }
.b-served { background: var(--paper-warm); color: var(--ink); }
.b-calling { background: var(--alert); color: #fff; }
.b-takeout { background: var(--paper-warm); color: var(--ink-soft); }
.tcard-total { font-size: 1.35rem; font-weight: 900; margin-top: 2px; }
.tcard-foot { display: flex; gap: 6px; align-items: center; font-size: 0.8rem; color: var(--ink-faint); font-weight: 700; margin-top: auto; }
.mini { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-weight: 800; }
.mini.warn { background: var(--warn-soft); color: #7a4f0e; }
.mini.ok { background: var(--ok-soft); color: var(--ok); }
.loose { margin-top: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pick-cell { display: grid; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; }
.pick-cell.busy { background: var(--paper-warm); }
.pick-cell span { font-size: 0.8rem; color: var(--ink-soft); }

/* 注文（POS） */
/* --safari-bar-h: 上の「Safari で開いて」の帯の高さ（app.js が入れる。帯の無い端末は 0） */
.pos, .pay { display: flex; flex-direction: column; height: calc(100dvh - var(--safari-bar-h, 0px) - var(--top-bar-h, 0px)); min-height: 0; }
.pos-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pos-title { display: grid; line-height: 1.15; margin: 0 8px 0 4px; }
.pos-title-sub { font-size: 0.72rem; font-weight: 800; color: var(--ink-faint); letter-spacing: 0.04em; }
.pos-title strong { font-size: 1.35rem; }
.pos-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
@media (max-width: 900px) { .pos-body { grid-template-columns: minmax(0, 1fr) 320px; } .pay-body { grid-template-columns: minmax(0, 1fr) 340px; } .pgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
.pos-body.closed { grid-template-columns: minmax(0, 560px); justify-content: center; }
.pane { min-height: 0; }
.pos-menu { overflow: auto; padding: 16px 18px 28px; }
.pos-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-faint); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; color: var(--ink); }
.pos-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.pos-cats::-webkit-scrollbar { display: none; }
.pos-cat { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 800; color: var(--ink-soft); }
.pos-cat small { min-width: 22px; height: 22px; border-radius: 11px; background: var(--paper-warm); display: grid; place-items: center; font-size: 0.72rem; color: var(--ink-soft); padding: 0 6px; }
.pos-cat.on { background: var(--sumi); border-color: var(--sumi); color: #fff; }
.pos-cat.on small { background: rgb(255 255 255 / 0.18); color: #fff; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; padding: 8px; border-radius: 18px; border: 1.5px solid transparent; background: var(--surface); box-shadow: var(--card-shadow); text-align: left; color: var(--ink); }
.pcard:active { transform: scale(0.98); }
.pcard.picked { border-color: var(--bengara); }
.pcard-media { position: relative; border-radius: 12px; overflow: hidden; }
.pcard-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-warm); }
.noimg { display: grid; place-items: center; background: linear-gradient(135deg, #efe6d6 0%, #e4d7c2 100%); color: rgb(124 58 45 / 0.6); font-family: var(--font-mincho); font-size: 2rem; }
.pcard-flag { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(28 24 19 / 0.55); color: #fff; font-weight: 900; letter-spacing: 0.08em; }
.pcard-n { position: absolute; top: 8px; right: 8px; min-width: 30px; height: 30px; border-radius: 15px; background: var(--bengara); color: #fff; font-weight: 900; display: grid; place-items: center; padding: 0 8px; box-shadow: 0 4px 10px rgb(124 58 45 / 0.35); }
.pcard-body { display: grid; gap: 4px; padding: 8px 4px 2px; flex: 1; }
.pcard-name { font-weight: 800; line-height: 1.3; font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.pcard-price { font-weight: 800; color: var(--ink-soft); }
.pcard-opt { font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--paper-warm); color: var(--ink-soft); }
.pcard-add { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--bengara); }
.pcard.sold { opacity: 0.6; }
.sold-mode .pcard, .sold-mode .pbtn { outline: 2px dashed var(--alert); outline-offset: -3px; }
/* 注文画面の品: カテゴリごとのまとまり（2026-10-24）。写真の品はカード、写真のない品は文字だけのボタン */
.pmenu { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.pgroup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pgroup-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.95rem; font-weight: 900; color: var(--ink); letter-spacing: 0.02em; }
.pgroup-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pgroup-title small { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--paper-warm); color: var(--ink-soft); font-size: 0.72rem; display: grid; place-items: center; }
.pbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pbtn { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 76px; padding: 11px 12px 10px; border-radius: 14px; border: 1.5px solid var(--line); border-left: 4px solid var(--bengara); background: var(--surface); box-shadow: var(--card-shadow); text-align: left; color: var(--ink); }
.pbtn:active { transform: scale(0.98); background: var(--accent-soft); }
.pbtn.picked { border-color: var(--bengara); background: var(--accent-soft); }
.pbtn-name { font-weight: 800; font-size: 0.95rem; line-height: 1.3; padding-right: 26px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pbtn-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pbtn-price { font-weight: 800; color: var(--ink-soft); }
.pbtn-sold { font-size: 0.75rem; font-weight: 900; color: var(--alert); }
.pbtn.sold { opacity: 0.55; border-left-color: var(--ink-faint); }
.pbtn-n { position: absolute; top: 8px; right: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--bengara); color: #fff; font-weight: 900; font-size: 0.8rem; display: grid; place-items: center; }
.opt-group { margin-bottom: 14px; }
.opt-head { display: flex; align-items: center; font-weight: 800; margin-bottom: 8px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.opt-btn { display: grid; gap: 2px; min-height: 56px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 800; text-align: left; color: var(--ink); }
.opt-btn small { color: var(--ink-soft); font-weight: 700; }
.opt-btn.on { background: var(--accent-soft); border-color: var(--bengara); color: var(--bengara-deep); }

.pos-panel { display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); min-height: 0; }
.panel-scroll { flex: 1; overflow: auto; padding: 14px 16px; }
.panel-block { border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); padding: 10px 12px; margin-bottom: 12px; }
.panel-block.pending { background: #fff; border: 1.5px solid var(--bengara); box-shadow: 0 8px 22px rgb(124 58 45 / 0.12); }
.panel-title { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.dot.warn { background: var(--warn); }
.dot.ok { background: var(--ok); }
.pline { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pline:last-of-type { border-bottom: 0; }
.line-thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; font-size: 1.2rem; }
.pline-main { flex: 1; min-width: 0; display: grid; border: 0; background: none; text-align: left; padding: 0; color: inherit; }
.pline-name { font-weight: 800; }
.pline-sub { font-size: 0.8rem; color: var(--ink-soft); }
.pline-price { font-weight: 800; font-size: 0.9rem; }
.panel-block .btn-block { margin-top: 10px; }
.panel-empty { display: grid; justify-items: center; gap: 4px; color: var(--ink-faint); padding: 40px 10px; text-align: center; }
.panel-empty p { margin: 0; }
.sline { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 4px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; color: inherit; }
.sline-qty { min-width: 1.6em; font-weight: 900; font-size: 1.05rem; }
.sline-main { flex: 1; min-width: 0; display: grid; }
.sline-name { font-weight: 700; }
.sline-sub { font-size: 0.78rem; color: var(--ink-soft); }
.sline-amt { min-width: 5em; text-align: right; font-weight: 700; }
.sline.st-cancelled { opacity: 0.45; text-decoration: line-through; }
.sline { cursor: pointer; }
.sline-main { min-width: 6em; }
.sline-state { display: flex; margin-top: 2px; }
.sline-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
/* 品ごとの「提供済み」ボタン（指で押しやすい大きさ） */
.serve-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 0.85rem; white-space: nowrap; }
.serve-btn:active { background: var(--ok); color: #fff; }
.serve-line .serve-do { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: 12px; background: var(--ok); color: #fff; font-weight: 800; font-size: 0.85rem; white-space: nowrap; }
.st { font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st-queued { background: var(--warn-soft); color: #7a4f0e; }
.st-done { background: var(--ok-soft); color: var(--ok); }
.st-served:not(.tcard) { background: var(--paper-warm); color: var(--ink-soft); } /* 卓カード（tcard st-served）には当てない */
.st-cancelled { background: #eee; color: var(--ink-faint); }
.panel-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.panel-foot .btn-block { margin-top: 10px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; }
.sum-row.total { font-size: 1.4rem; font-weight: 900; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.sum-row.total.ok { color: var(--ok); }
.sum-row.total.ng, td.ng { color: var(--alert); }
.sum-row.disc, .disc { color: var(--bengara); }
.sum-row.muted { color: var(--ink-soft); }
.split-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tabs-mobile { display: none; }
.only-mobile, .fab.only-mobile { display: none; }
.fab { position: fixed; left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border: 0; border-radius: 16px; background: var(--bengara); color: #fff; font-weight: 800; box-shadow: 0 12px 28px rgb(124 58 45 / 0.35); }

/* 会計 */
.pay-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }
.pay-bill { overflow: auto; padding: 18px; }
.pay-side { overflow: auto; padding: 18px; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.bill-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bill-amt { min-width: 7em; text-align: right; font-weight: 800; }
/* 品の行を押すと値段を変えられる（2026-10-27）。押せることが分かるよう、右端に鉛筆と押した時の色 */
.bill-line[role='button'] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bill-line[role='button']:active { background: var(--accent-soft); }
.bill-edit { display: inline-flex; color: var(--ink-soft); flex: none; }
.price-note { display: flex; align-items: center; gap: 4px; color: var(--bengara); }
/* 伝票の欄が狭い時（iPad 縦の会計＝欄の中身 250px ほど）は、写真を外して品名と金額に幅を回す（鉛筆を足したら欄からはみ出した・2026-10-27） */
.pay-bill { container-type: inline-size; }
@container (max-width: 360px) {
  .bill-line { gap: 8px; }
  .bill-line .line-thumb { display: none; }
  .bill-line > .grow { min-width: 0; }
  .bill-amt { min-width: 0; }
}
.bill-sum { margin-top: 12px; }
.due { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 10px; padding: 18px 20px; border-radius: 20px; background: var(--sumi); color: #fff; box-shadow: 0 12px 30px rgb(28 24 19 / 0.25); }
.due span:first-child { font-weight: 700; opacity: 0.85; }
.due strong { font-size: 2.6rem; line-height: 1; grid-row: span 2; }
.due-sub { font-size: 0.82rem; opacity: 0.7; }
.tenders { display: grid; gap: 6px; }
.tender { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tender-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--paper-warm); display: grid; place-items: center; color: var(--ink-soft); }
.change { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 18px; border-radius: 16px; background: var(--ok-soft); color: var(--ok); font-weight: 800; }
.change strong { font-size: 2rem; }
.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.method-btn { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 800; font-size: 1.02rem; text-align: left; color: var(--ink); box-shadow: var(--card-shadow); }
.method-btn:active { border-color: var(--bengara); }
.method-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--paper-warm); color: var(--ink); display: grid; place-items: center; flex: none; }
.method-btn.cash .method-icon { background: var(--accent-soft); color: var(--bengara); }
.checkout-btn { min-height: 64px; font-size: 1.15rem; }
.keypad { border-radius: 20px; border: 1.5px solid var(--line); padding: 14px; display: grid; gap: 10px; background: var(--surface-2); }
.keypad-head { display: flex; align-items: center; gap: 10px; }
.keypad-head .icon-btn { width: 36px; height: 36px; }
.keypad-value { font-size: 2.4rem; font-weight: 900; text-align: right; padding: 4px 6px; border-bottom: 2px solid var(--line); }
.keypad-change { text-align: right; font-weight: 800; color: var(--ink-soft); }
.keypad-change.ok { color: var(--ok); font-size: 1.15rem; }
.keypad-change.ng { color: var(--alert); }
.keypad-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.keypad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad-keys .pad-key { min-height: 58px; display: grid; place-items: center; background: var(--surface); }
/* お釣りの行は1行の高さに固定（長い文・大きい字に変わってもテンキーが動かない。入りきらない分は …） */
.keypad-change { height: 30px; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keypad-change.ok { line-height: 30px; }
/* iPad 横・パソコン: テンキーを開いている間は右の欄を1画面に固定（スクロールしない）。キーは残りの高さいっぱいに伸び縮みする */
@media (min-width: 761px) {
  .pay-side.keying { overflow: hidden; gap: 10px; padding: 14px 16px; }
  .pay-side.keying .pay-note { display: none; }
  .pay-side.keying .due { padding: 10px 16px; }
  .pay-side.keying .due strong { font-size: 2rem; }
  .pay-side.keying .tender { padding: 6px 10px; }
  .pay-side.keying .tender-icon { width: 28px; height: 28px; }
  .pay-side.keying .change { padding: 8px 14px; }
  .pay-side.keying .change strong { font-size: 1.5rem; }
  .pay-side.keying .keypad { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
  .pay-side.keying .keypad-value { font-size: 2.1rem; padding: 0 6px; }
  .pay-side.keying .keypad-quick { flex: none; gap: 6px; }
  .pay-side.keying .keypad-quick .chip { height: 34px; padding: 0 10px; }
  /* 先に入れた支払い（割り勘・組み合わせ払い）が多くても、テンキーを押し出さない */
  .pay-side.keying .tenders { flex: none; max-height: 96px; overflow-y: auto; }
  .pay-side.keying .due, .pay-side.keying .change { flex: none; }
  .pay-side.keying .keypad > .btn { flex: none; }
}
/* 背の高い画面（iPad 縦・パソコン・iPad 横でタブ列なし）: テンキーは中身の高さのまま（下に空箱を作らない）。万一はみ出したら欄の中だけスクロール */
@media (min-width: 761px) and (min-height: 761px) {
  .pay-side.keying { overflow-y: auto; }
}
/* 背の低い横画面（Safari のタブ列が出ている iPad など）: テンキー以外を詰めて、キー4段が必ず収まるように */
@media (min-width: 761px) and (max-height: 760px) {
  .pay-side.keying { gap: 8px; padding: 10px 14px; }
  .pay-side.keying .due { padding: 8px 14px; }
  .pay-side.keying .due strong { font-size: 1.7rem; }
  .pay-side.keying .tenders { max-height: 46px; gap: 4px; }
  .pay-side.keying .tender { padding: 4px 10px; }
  /* テンキーは残りの高さいっぱいに伸び縮み（キーは 36px より小さくしない） */
  .pay-side.keying .keypad { flex: 1; gap: 6px; padding: 10px; }
  .pay-side.keying .keypad-value { font-size: 1.8rem; }
  .pay-side.keying .keypad-quick .chip { height: 30px; }
  .pay-side.keying .keypad-keys { flex: 1; min-height: 0; gap: 6px; grid-auto-rows: minmax(36px, 1fr); }
  .pay-side.keying .keypad-keys .pad-key { min-height: 36px; font-size: 1.35rem; }
}
.split-even { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0; }
.split-result { display: grid; justify-items: center; padding: 14px; border-radius: 16px; background: var(--paper-warm); }
.split-result strong { font-size: 2rem; }

/* レシート */
.receipt-wrap { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 20px; align-items: start; }
.receipt-actions { display: grid; gap: 10px; align-content: start; max-width: 360px; }
.receipt-preview { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--card-shadow); }
/* 売上の日計レシート（レジ締め・2026-10-26）: 画面で見せてから刷る。長いので見せる所だけスクロール */
.day-report-sheet .receipt-preview { max-width: 380px; margin: 0 auto 12px; max-height: min(62vh, 640px); overflow: auto; }
.day-report .rc-sub.strong { font-weight: 800; margin-top: 4px; }
.day-actions { white-space: nowrap; display: flex; gap: 6px; }
/* API の鍵（設定 → 端末・2026-10-26）: 長い鍵・使い方の例は折り返す（スマホ幅で横にはみ出さない） */
.api-key-value, .api-example { white-space: pre-wrap; word-break: break-all; margin: 6px 0; padding: 10px 12px; background: var(--surface-2, #f4efe6); border-radius: 10px; font-size: 0.9rem; }
.api-key-value { font-weight: 800; user-select: all; -webkit-user-select: all; }
.api-key-row { padding: 8px 0; border-top: 1px solid var(--line); }
.api-doc code { font-size: 0.85rem; }
.receipt, .formal { font-size: 13px; line-height: 1.5; color: #000; position: relative; }
.rc-logo { text-align: center; margin: 2px 0; }
.rc-logo img { width: 72px; height: auto; display: inline-block; }
.rc-title { text-align: center; font-size: 0.9em; margin: 2px 0; }
.rc-msg { text-align: center; margin: 8px 0 2px; font-weight: 700; }
.rc-en { font-weight: 400; font-size: 0.9em; }
.rc-footer { margin-top: 4px; }
.rc-bottom { margin-top: 6px; }
.rc-qr { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rc-qr-img { flex: none; }
.rc-qr-img svg { width: 96px; height: 96px; display: block; }
.rc-qr-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rc-shop { font-size: 1.2rem; font-weight: 800; text-align: center; }
.rc-center { text-align: center; }
.rc-row { display: flex; justify-content: space-between; gap: 8px; }
.rc-sub { padding-left: 1em; font-size: 0.9em; color: #333; }
.rc-total { font-size: 1.15rem; font-weight: 800; }
.rc-rule { border-top: 1px dashed #000; margin: 6px 0; }
.rc-void { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); border: 3px solid var(--alert); color: var(--alert); font-size: 1.6rem; font-weight: 900; padding: 4px 14px; opacity: 0.8; }
.fm-title { font-size: 1.4rem; font-weight: 800; text-align: center; letter-spacing: 0.4em; margin-bottom: 8px; }
.fm-to { border-bottom: 1px solid #000; margin: 12px 0 8px; font-size: 1.05rem; }
.fm-name { display: inline-block; min-width: 12em; }
.fm-amount { font-size: 1.6rem; font-weight: 800; text-align: center; border: 2px solid #000; padding: 6px; margin: 8px 0; }
.fm-stamp { width: 70px; height: 70px; border: 1px dashed #000; display: grid; place-items: center; font-size: 0.75rem; margin-top: 8px; }
.done-panel { text-align: center; padding: 22px; border-radius: 20px; background: var(--ok-soft); margin-bottom: 16px; }
.done-label { font-weight: 800; color: var(--ok); }
.done-change { font-size: clamp(2.4rem, 13vw, 3.6rem); font-weight: 900; overflow-wrap: anywhere; color: var(--ok); line-height: 1.1; }
/* お釣りを見たまま押すボタン（ドロワー・レシート・領収書） */
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 14px 0 6px; }
.done-actions .btn { min-width: 9em; }

/* 表 */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { font-size: 0.78rem; color: var(--ink-soft); font-weight: 800; background: var(--surface-2); }
.tbl td.num { text-align: right; }
.tbl-click tbody tr { cursor: pointer; }
.tbl-click tbody tr:hover { background: var(--surface-2); }
.tbl tr.void td { color: var(--ink-faint); text-decoration: line-through; }
/* 精算の記録（day.js）: 入りきらない時は表の中だけ横に動かす（画面ごと横に動かない）。
   幅 1000px 以下（iPad 縦・iPad mini 縦・スマホ）は「数えた現金」「あるはずの現金」「精算（日時）」を隠し、横の余白を詰めて画面に収める
   （過不足は残す。数えた現金は売上レシートに出る）。日付・金額・見出しは折り返さない（メモだけ折り返す）。
   iPad 縦で売上 7桁・過不足 6桁の日でも収まる。スマホは表の中だけ横に動く（2026-10-27 全画面テストで 921px > 820px・レビュー） */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; }
@media (max-width: 1000px) {
  .tbl-days th:nth-child(4), .tbl-days td:nth-child(4), .tbl-days th:nth-child(5), .tbl-days td:nth-child(5), .tbl-days th:nth-child(7), .tbl-days td:nth-child(7) { display: none; }
  .tbl-days th, .tbl-days td { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
  .tbl-days td:nth-child(8) { white-space: normal; min-width: 4em; }
}

/* レジ締め */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: var(--card-shadow); }
.kpi-label { font-size: 0.8rem; color: var(--ink-soft); font-weight: 700; }
.kpi-value { font-size: 1.45rem; font-weight: 900; }
.day > .btn-lg { margin: 4px 0 20px; }
.moves { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.denoms { display: grid; gap: 6px; }
.denom { display: grid; grid-template-columns: 6.5em auto auto 1fr; gap: 10px; align-items: center; }
.denom-sum { text-align: right; }

/* 売上 */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi2 { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; box-shadow: var(--card-shadow); display: grid; gap: 6px; }
.kpi2-top { display: flex; align-items: center; gap: 10px; }
.kpi2-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--bengara); display: grid; place-items: center; }
.kpi2-label { font-weight: 800; color: var(--ink-soft); font-size: 0.88rem; }
.kpi2-value { font-size: 1.9rem; font-weight: 900; }
.kpi2-delta { font-size: 0.8rem; font-weight: 700; color: var(--ink-faint); }
.kpi2-delta.up { color: var(--ok); }
.kpi2-delta.down { color: var(--alert); }
.dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.dash .card { margin-bottom: 0; }
.chart svg { width: 100%; height: 180px; display: block; }
.ch-bar { fill: var(--bengara); }
.ch-bar:hover { fill: var(--bengara-deep); }
.ch-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.ch-label { font-size: 11px; fill: var(--ink-faint); font-family: var(--font); }
.donut { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.donut-svg { flex: none; }
.donut-legend { flex: 1; min-width: 160px; display: grid; gap: 6px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ratio { display: flex; align-items: baseline; gap: 10px; }
.ratio strong { font-size: 2rem; }
.ratio-bar { height: 10px; border-radius: 5px; background: var(--paper-warm); overflow: hidden; margin: 6px 0 4px; }
.ratio-bar span { display: block; height: 100%; background: var(--bengara); border-radius: 5px; }
.rank { display: grid; gap: 4px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-warm); font-weight: 900; font-size: 0.85rem; flex: none; }
.rank-no.top { background: var(--bengara); color: #fff; }
.rank-bar { height: 6px; border-radius: 3px; background: var(--paper-warm); margin-top: 6px; overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: var(--warn); border-radius: 3px; }

/* 提供 */
.call-list { display: grid; gap: 8px; margin-bottom: 18px; }
.call-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 2px solid var(--alert); box-shadow: var(--card-shadow); }
.serve-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
/* ホールの「届ける順」（serve.js・2026-10-26）: 受けた順の注文を1枚ずつ。
   1画面にたくさん入るよう詰める（和田「ボタンがでかすぎて見にくい・1画面で見やすく」）: 品は1行・✓ は丸いボタン・「まとめて」は見出しの右 */
.page.hall { padding-top: 8px; }
.hall-bar { position: sticky; top: var(--top-bar-h, 0px); z-index: 5; display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 6px 0; background: var(--bg); }
.hall-bar .seg { flex: 1; display: grid; grid-template-columns: 1fr 1fr; padding: 2px; }
.hall-bar .seg-btn { justify-content: center; min-height: 34px; padding: 4px 8px; font-size: 0.85rem; }
.hall-nocall { flex: none; font-size: 0.72rem; color: var(--ink-faint); }
.hall .call-list { margin-bottom: 8px; }
.hall-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 8px; align-items: start; }
.hall-card { display: grid; gap: 2px; min-width: 0; padding: 6px 10px 3px; border: 1.5px solid var(--line); border-left-width: 5px; border-radius: 12px; background: var(--surface); }
.hall-card.warn { border-color: var(--warn); }
.hall-card.alert { border-color: var(--alert); }
.hall-head { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.hall-seq { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--sumi); color: #fff; font-size: 0.75rem; font-weight: 900; }
.hall-place { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.hall-mins { flex: none; font-size: 0.9rem; font-weight: 900; color: var(--ink-soft); }
.hall-mins.warn { color: var(--warn); }
.hall-mins.alert { color: var(--alert); }
.hall-all { flex: none; display: inline-flex; align-items: center; gap: 3px; min-height: 30px; padding: 0 9px; border: 1.5px solid var(--ok); border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.hall-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--ink-faint); }
.hall-paid { padding: 0 6px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); font-weight: 800; }
.hall-ready { color: var(--ok); }
.hall-lines { display: grid; }
.hl-line { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 3px 0; border-top: 1px solid var(--line); }
.hl-qty { flex: none; width: 1.3em; text-align: center; font-size: 1rem; font-weight: 900; }
.hl-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.hl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.hl-name { font-size: 0.95rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.hl-st { flex: none; padding: 1px 6px; border-radius: 999px; font-size: 0.68rem; font-weight: 800; line-height: 1.4; }
.hl-st-ready { background: var(--ok); color: #fff; }
.hl-st-cooking { background: var(--paper-warm); color: var(--ink-soft); }
.hl-st-served { color: var(--ink-faint); }
.hl-timing { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--bengara); color: #fff; font-size: 0.7rem; font-weight: 900; }
.hl-sub { font-size: 0.72rem; font-weight: 700; color: var(--ink-faint); overflow-wrap: anywhere; }
.hl-note { margin-left: 4px; padding: 0 5px; border-radius: 4px; background: #fff3c4; color: var(--ink); }
.hl-served .hl-name, .hl-served .hl-qty { color: var(--ink-faint); text-decoration: line-through; }
.hl-do { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--ok); color: #fff; }
.hl-do-soft { background: transparent; color: var(--ok); border: 1.5px solid var(--ok); }
.hl-done-mark { flex: none; display: grid; place-items: center; width: 36px; color: var(--ink-faint); }
.hall-all:disabled, .hl-do:disabled { opacity: 0.5; }
.hall-more { margin: 2px 0 4px; font-size: 0.72rem; color: var(--ink-faint); }
/* キッチン画面でも「食前」「食後」を札で目立たせる */
.kl-timing { display: inline-block; justify-self: start; padding: 1px 8px; border-radius: 6px; background: var(--bengara); color: #fff; font-weight: 900; }
.serve-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--card-shadow); }
.serve-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 1.15rem; }
.serve-line { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 6px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; font-weight: 700; color: inherit; }

/* 設定 */
.tabs-line { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line-item { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; color: var(--ink-soft); text-decoration: none; font-weight: 800; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs-line-item.on { color: var(--ink); border-bottom-color: var(--bengara); }
.tabs-line-item.on .ic-wrap { color: var(--bengara); }
.admin-menu { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-cats { display: grid; gap: 4px; position: sticky; top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: var(--card-shadow); }
.admin-cat { display: flex; align-items: center; border-radius: 12px; }
.admin-cat.on { background: var(--sumi); }
.admin-cat.on .admin-cat-name, .admin-cat.on .x { color: #fff; }
.admin-cat-name { border: 0; background: transparent; text-align: left; padding: 10px; font-weight: 800; color: var(--ink); }
.admin-item-list { display: grid; gap: 8px; }
.admin-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.admin-item.sold { background: #ece7de; }
.admin-item-main { border: 0; background: transparent; text-align: left; display: grid; gap: 4px; padding: 0; color: inherit; }
.admin-item-main .tag { margin-left: 0; }
.admin-item-main { min-width: 0; }
.admin-item-main .row { flex-wrap: wrap; row-gap: 4px; }
/* iPad など指で触る端末: 並べ替えの ⤒↑↓ を押しやすい大きさに（2026-10-21 店の声「iPad から順番を変えたい」） */
@media (any-pointer: coarse) {
  .admin-cat .x, .admin-item .x { min-width: 40px; min-height: 40px; font-size: 1.15rem; }
  .admin-cat .x[title="一番上へ"], .admin-item .x[title="一番上へ"] { margin-right: 6px; }
  .admin-cat-name { flex: 1; min-width: 0; }
  /* 品の行: 幅が足りない時は 販売中・⤒↑↓ を次の行へ（縦の iPad で品名と札が潰れない） */
  .admin-item { flex-wrap: wrap; }
  .admin-item-main { flex: 1 1 180px; }
}
@media (any-pointer: coarse) and (min-width: 700px) {
  .admin-menu { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (any-pointer: coarse) and (min-width: 1100px) {
  .admin-menu { grid-template-columns: 340px minmax(0, 1fr); }
}
.thumb { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; flex: none; }
.thumb.empty { background: var(--paper-warm); }
.form-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 22px; }
.photo-field { display: grid; gap: 8px; }
.photo-preview { width: 100%; max-width: 260px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.photo-empty { width: 100%; max-width: 260px; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--paper-warm); display: grid; place-items: center; color: var(--ink-faint); }
.photo-preview.wide, .photo-empty.wide { max-width: 360px; aspect-ratio: 16 / 7; }
.check-list { display: grid; gap: 2px; max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; background: var(--surface); }
.windows { display: grid; gap: 8px; }
.window { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.days { display: flex; gap: 2px; }
.day-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 0.85rem; }
.day-btn.on { background: var(--sumi); color: #fff; border-color: var(--sumi); }
.pm-list { display: grid; gap: 6px; }
.pm-list .row { flex-wrap: nowrap; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 14px 0; z-index: 2; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.device-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--card-shadow); }
.device-card.me { border-color: var(--bengara); }
.device-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--paper-warm); display: grid; place-items: center; color: var(--ink-soft); flex: none; }
.qr-preview .qr-card { margin: 0 auto 10px; }
/* QR の札: 横10cm×縦7cm（左に QR・右に店名とテーブル名） */
.qr-card { box-sizing: border-box; width: 100mm; max-width: 100%; height: 70mm; display: flex; align-items: center; gap: 5mm; padding: 6mm 7mm; border: 1px solid #000; border-radius: 12px; background: #fff; color: #000; break-inside: avoid; }
.qr-img { flex: none; }
.qr-img svg { width: 38mm; height: 38mm; display: block; }
.qr-text { flex: 1; min-width: 0; text-align: left; }
.qr-shop { font-family: var(--font-mincho); font-size: 11pt; letter-spacing: 0.06em; }
.qr-table { font-size: 22pt; font-weight: 800; line-height: 1.15; margin: 1mm 0 3mm; overflow-wrap: anywhere; }
.qr-say { font-size: 8pt; line-height: 1.45; white-space: pre-line; }
.qr-say.en { margin-top: 1mm; color: #444; }

/* キッチンモニター（暗い画面） */
body.kds-mode { background: #121010; color: #f0ebe0; }
body.kds-mode .side, body.kds-mode .tabbar { display: none; }
.kds { display: flex; flex-direction: column; min-height: calc(100dvh - var(--top-bar-h, 0px)); }
.kds-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: calc(10px + var(--safe-top)) 14px 10px; background: #000; position: sticky; top: var(--top-bar-h, 0px); z-index: 5; }
.kds-back { color: #f0ebe0; text-decoration: none; font-size: 1.4rem; padding: 0 8px; }
.seg-dark { background: transparent; border-color: #444; }
.seg-dark .seg-btn { color: #bbb; }
.seg-dark .seg-btn.on { background: #f0ebe0; color: #000; }
.kds-count { font-weight: 800; }
.kds-btn { border: 1px solid #444; background: #1e1b18; color: #f0ebe0; border-radius: 10px; padding: 9px 14px; font-weight: 800; }
.kds-btn.warn { background: var(--warn); color: #000; border-color: var(--warn); }
.kds-clock { font-size: 1.3rem; font-weight: 900; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; padding: 12px; align-items: start; }
.kds-empty { margin: auto; color: #777; font-size: 1.4rem; }
.kt { background: #f6f2e9; color: #1c1813; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; border: 3px solid transparent; box-shadow: 0 10px 24px rgb(0 0 0 / 0.4); }
.kt.fresh { border-color: #6fcf8a; animation: pulse 1s 4; }
.kt-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; background: #2b2622; color: #fff; }
.kt.warn .kt-head { background: var(--warn); color: #000; }
.kt.alert .kt-head { background: var(--alert); color: #fff; }
.kt-where { font-size: 1.4rem; font-weight: 900; }
.kt-no { opacity: 0.85; }
.kt-time { font-size: 1.3rem; font-weight: 900; }
.kt-meta { display: flex; gap: 6px; align-items: center; padding: 5px 12px; font-size: 0.8rem; color: #585045; background: #ebe4d6; }
.kt-flag { font-weight: 800; background: var(--sumi); color: #fff; padding: 0 6px; border-radius: 4px; }
.kt-flag.ok { background: var(--ok); }
.kt-lines { display: grid; }
.kl { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 0; border-bottom: 1px solid #ddd3c3; background: transparent; text-align: left; color: inherit; }
.kl:active { background: #ebe4d6; }
.kl-qty { min-width: 1.6em; font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.kl-body { display: grid; gap: 2px; }
.kl-name { font-size: 1.18rem; font-weight: 800; line-height: 1.25; }
.kl-st { font-size: 0.72rem; font-weight: 800; color: #585045; }
.kl-opts { font-size: 0.95rem; font-weight: 700; color: var(--bengara-deep); }
.kl-note { font-size: 0.95rem; font-weight: 800; background: #fff1c2; padding: 0 4px; border-radius: 4px; }
.kl-cancel { font-weight: 900; color: var(--alert); }
.kl-done, .kl-served { opacity: 0.4; text-decoration: line-through; }
.kl-cancelled { color: var(--alert); text-decoration: line-through; }
.kt-done { border: 0; background: var(--sumi); color: #fff; font-weight: 900; font-size: 1.05rem; padding: 16px; }
.kt-done:active { background: #000; }
.kds-recent .recent-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* スマホ（ハンディ）・iPad mini 縦まで。iPad の縦（820px〜）は左のサイドバーのまま */
@media (max-width: 760px) {
  #app { display: block; }
  .side { display: none; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around; background: var(--sumi); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tab-link { position: relative; flex: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: #a9a196; text-decoration: none; font-size: 0.7rem; font-weight: 700; border-radius: 12px; }
  .tab-link.on { color: #fff; background: rgb(255 255 255 / 0.1); }
  .tab-link .badge { top: 0; right: calc(50% - 26px); }
  body:not(.kds-mode):not(.pair-mode) .main { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .page { padding: 14px 12px 40px; }
  .page-head h1 { font-size: 1.35rem; }
  .page-actions { margin-left: 0; width: 100%; }
  .page-actions .btn { flex: 1; }
  .stats { display: flex; overflow-x: auto; gap: 8px; margin: 0 -12px 14px; padding: 2px 12px 6px; scrollbar-width: none; }
  .stats::-webkit-scrollbar { display: none; }
  .stat { flex: none; min-width: 148px; padding: 10px 12px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-value { font-size: 1.2rem; }
  .tgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tcard { min-height: 132px; padding: 14px 12px 12px; }
  .pos, .pay { height: calc(100dvh - 70px - env(safe-area-inset-bottom) - var(--safari-bar-h, 0px) - var(--top-bar-h, 0px)); }
  .pos-head { padding: 8px 10px; gap: 6px; }
  .pos-head .chip { height: 34px; padding: 0 10px; font-size: 0.82rem; }
  .pos-head .btn-sm { padding: 4px 10px; }
  .pos-title strong { font-size: 1.15rem; }
  .pos-body, .pay-body { grid-template-columns: 1fr; }
  .tabs-mobile { display: flex; border-bottom: 1px solid var(--line); background: var(--surface); }
  .tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; padding: 11px; font-weight: 800; color: var(--ink-soft); border-bottom: 3px solid transparent; }
  .tab.on { color: var(--ink); border-bottom-color: var(--bengara); }
  .pane { display: none; }
  .pane.show { display: flex; }
  .pos-menu.pane.show { display: block; }
  .pos-panel { border-left: 0; }
  .pos-menu { padding: 12px 12px 90px; }
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pbtns { grid-template-columns: repeat(2, 1fr); }
  .sticky-save { bottom: calc(70px + env(safe-area-inset-bottom)); }
  /* 表は横にスクロール（画面の幅からはみ出さない） */
  .tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl th, .tbl td { white-space: nowrap; }
  .only-mobile, .fab.only-mobile { display: flex; }
  .pay-body { overflow: auto; }
  .pay-bill { overflow: visible; padding: 12px; }
  .pay-side { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .receipt-wrap { grid-template-columns: 1fr; }
  .admin-menu { grid-template-columns: minmax(0, 1fr); } /* 品の札が多くても列が画面の幅を超えない */
  /* スマホ幅: 品の行は 販売中・⤒↑↓ を次の行へ（大きくしたボタンが画面の外に出ない） */
  .admin-item { flex-wrap: wrap; }
  .admin-item-main { flex: 1 1 160px; }
  .admin-cats { position: static; }
  .dash { grid-template-columns: 1fr; }
  .denom { grid-template-columns: 5.5em auto 1fr; }
  .denom .btn { display: none; }
}

/* 印刷 */
@media print {
  .print-receipt .receipt, .print-receipt .formal { font-size: 12px; }
  /* 2列×4段 = 200×280mm（余白 5mm の A4 にちょうど入る）。隣り合う札の線を点線にして切り線にする */
  .qr-sheet { display: grid; grid-template-columns: repeat(2, 100mm); grid-auto-rows: 70mm; justify-content: center; }
  .qr-sheet .qr-card { border: 0.2mm dashed #999; border-radius: 0; }
  .rc-void { opacity: 1; }
}

/* この端末のレシートプリンター（設定 → 端末） */
.printer-card { max-width: 760px; margin-top: 14px; }
.printer-card .stack { display: grid; gap: 2px; margin-bottom: 8px; }
.printer-card .row .check { padding: 4px 0; }

/* 1席ずつのリセット（設定 → 店の設定 → ミスった時のリセット・2026-10-26） */
.btn.btn-danger-outline { background: #fff; color: var(--alert); border-color: var(--alert); }
.reset-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; margin: 12px 0; }
.reset-row { align-items: center; gap: 12px; }
.reset-row .grow { min-width: 0; }
.reset-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reset-row .btn { flex: none; }

@media (max-width: 760px) {
  /* ===== スマホ（760px 以下）を詰める・2026-10-26（提供画面の詰め方にそろえる） =====
     staff.css の最後に別の @media (max-width: 760px) として足す前提。既存のスマホ用ルール（672-724 行）より後ろなので、同じ強さのセレクタは上書きする。
     iPad・パソコン（761px 以上）には効かない。 */

  /* ===== 1. 下のタブ（全画面共通）: 高さを 56px に決め、変数にする ===== */
  /* 下の .main・.pos/.pay・.sticky-save・.fab の位置もこの変数にそろえる（今は 70px / 76px の決め打ち） */
  :root { --tabbar-h: 56px; }
  .tabbar { height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  /* タブ1つ: アイコンと文字を上下中央に寄せる（タブの名前なので補足の字の大きさ 0.72rem） */
  .tab-link { align-content: center; gap: 1px; padding: 2px; font-size: 0.72rem; line-height: 1.2; border-radius: 10px; }
  /* タブのアイコン: 22px → 20px */
  .tab-link .ic { width: 20px; height: 20px; }
  /* タブの数字バッジ: 小さいアイコンに合わせる（字は下限の 0.72rem） */
  .tab-link .badge { top: 1px; right: calc(50% - 24px); min-width: 18px; height: 18px; padding: 0 5px; line-height: 18px; font-size: 0.72rem; }
  body:not(.kds-mode):not(.pair-mode) .main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .pos, .pay { height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-bottom) - var(--safari-bar-h, 0px) - var(--top-bar-h, 0px)); }
  .sticky-save { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  /* 「未送信 N点を確かめて送る」の高さの位置（横の位置は 4. 伝票画面で決める） */
  .fab { bottom: calc(var(--tabbar-h) + 6px + env(safe-area-inset-bottom)); }

  /* ===== 2. テーブル一覧（tables.js）・取引一覧（receipts.js） ===== */
  /* 見出し: 「テーブル」と日付・営業中を1行に並べる（売上・設定・レジ締めの見出しも同じ形になる） */
  .page-head { gap: 8px; margin-bottom: 10px; }
  .page-head > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
  .page-head h1 { font-size: 1.2rem; line-height: 1.2; }
  .page-sub { margin: 0; }
  /* 上のボタン（QR注文・持ち帰り・物販）: 横に2つ並ぶのはそのまま、高さを 44px → 36px に */
  .page-actions { gap: 6px; }
  .page-actions .btn { min-height: 36px; padding: 4px 10px; border-radius: 10px; font-size: 0.9rem; gap: 4px; }
  /* 呼び出し・お会計の帯（テーブル一覧の a 要素だけ）: 余白を詰める */
  a.notice { gap: 8px; padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; font-size: 0.9rem; }
  /* 数字のカード: アイコンを小さい丸にし、数字と言葉を1行に（高さ 約62px → 約36px） */
  .stats { gap: 6px; margin-bottom: 8px; padding-top: 0; padding-bottom: 2px; }
  .stat { min-width: 0; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; box-shadow: none; }
  .stat-icon { width: 28px; height: 28px; border-radius: 50%; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat > div { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
  .stat-value { font-size: 1.1rem; }
  .stat-label { font-size: 0.8rem; }
  /* 凡例は1行（はみ出す分は横にずらして見る）、「すべて／1階／座敷」はその下に横幅いっぱいで均等に */
  .toolbar:has(> .legend) { gap: 6px; margin-bottom: 8px; }
  .legend { flex: 1 1 100%; flex-wrap: nowrap; gap: 10px; overflow-x: auto; scrollbar-width: none; font-size: 0.78rem; }
  .legend::-webkit-scrollbar { display: none; }
  .legend-item { flex: none; gap: 4px; }
  .legend-item i { width: 10px; height: 10px; border-radius: 3px; }
  /* 凡例と切り替えの間の伸びる空白は、折り返すと空の行になるので消す */
  .legend + .grow { display: none; }
  .legend ~ .seg { flex: 1 1 100%; display: flex; flex-wrap: nowrap; padding: 2px; }
  .legend ~ .seg .seg-btn { flex: 1; justify-content: center; min-height: 32px; padding: 4px 8px; }
  /* 席のカード（共通）: 余白・角丸・影を詰め、最小の高さをなくす。2列はそのまま */
  .tgrid { gap: 8px; }
  .tcard { min-height: 0; gap: 2px; padding: 10px 10px 8px; border-radius: 12px; box-shadow: 0 1px 2px rgb(28 24 19 / 0.06); }
  .tcard::before { height: 4px; }
  .tcard-top { gap: 6px; min-height: 28px; }
  /* 席名は太字のまま。長い名前は折れても枠からはみ出さない */
  .tcard-name { min-width: 0; font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
  .tcard-name.small-name { font-size: 0.95rem; }
  /* ＋は飾り（カード全体が押せるボタン）なので小さく */
  .tcard-plus { flex: none; width: 28px; height: 28px; }
  .tcard-plus svg { width: 16px; height: 16px; }
  .tcard-badge { flex: none; padding: 2px 7px; }
  /* 人数・経過時間は大事な数字なので 0.9rem に上げる */
  .tcard-meta { gap: 4px; font-size: 0.9rem; line-height: 1.4; }
  .tcard-total { font-size: 1.25rem; line-height: 1.2; margin-top: 0; }
  .tcard-foot { margin-top: 0; }
  /* 使用中・持ち帰りのカード: 金額（左・太字）と点数・調理中・提供待ち（右）を同じ行に。4段 → 3段 */
  .tcard:not(.free) { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .tcard:not(.free) .tcard-top, .tcard:not(.free) .tcard-meta { grid-column: 1 / -1; }
  .tcard:not(.free) .tcard-foot { justify-content: flex-end; flex-wrap: wrap; row-gap: 2px; }
  /* 空席のカード: 席数・場所と「空席」を同じ行に。3段 → 2段 */
  .tcard.free { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .tcard.free .tcard-top { grid-column: 1 / -1; }
  .tcard.free .tcard-state { margin-top: 0; font-size: 0.9rem; }
  /* 「持ち帰り・テーブルなし」の見出し: 上の余白 26px → 14px */
  .loose { margin-top: 4px; }
  .loose .section-title { margin: 14px 0 6px; font-size: 0.95rem; }
  /* 取引一覧・売上の日付入力: 高さ 44px → 36px（文字は 16px のまま＝iPhone で触った時に拡大されない） */
  .toolbar > .input.date { min-height: 36px; padding: 2px 10px; }
  /* 取引一覧の件数・合計金額は右寄せの太字で目立たせる（売上の画面には当たらない） */
  .toolbar > .input.date + .muted { margin-left: auto; font-weight: 800; color: var(--ink); }
  /* 取引一覧の表: 横スクロールをやめて画面の幅に収める（既存の .tbl の display: block を戻す） */
  .tbl.tbl-click { display: table; border-radius: 12px; }
  .tbl-click th, .tbl-click td { padding: 8px; }
  .tbl-click th:first-child, .tbl-click td:first-child { padding-left: 12px; }
  /* 表の見出しは補足の字（0.75rem） */
  .tbl-click th { padding-top: 6px; padding-bottom: 6px; font-size: 0.75rem; }
  .tbl-click td { font-size: 0.95rem; line-height: 1.4; }
  /* 席・支払いは長い時に折り返す（「クレジットカード」が切れない） */
  .tbl-click td:nth-child(2), .tbl-click td:nth-child(4) { white-space: normal; }
  /* 人数・レシート番号の列はスマホでは出さない（行を押すとレシートの画面で見られる） */
  .tbl-click th:nth-child(n+6), .tbl-click td:nth-child(n+6) { display: none; }

  /* ===== 3. 伝票画面（session.js）と会計画面（checkout.js）の上の帯 ===== */
  /* 伝票（.pos）と会計（.pay）で別々の値になっていたので1つにそろえる（同じ .pos-head を使うため。画面を行き来しても帯の高さが変わらない） */
  .pos .pos-head, .pay .pos-head { padding: 6px 10px; gap: 4px 6px; }
  /* 戻るボタン: 44px → 36px */
  .pos .pos-head .icon-btn, .pay .pos-head .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
  .pos .pos-title, .pay .pos-title { margin: 0 2px; }
  /* 席名は太字で目立たせる */
  .pos .pos-title strong, .pay .pos-title strong { font-size: 1.2rem; font-weight: 900; }
  /* 人数・経過分・店内のチップ: 高さ 34px → 32px（押せる大きさは守る） */
  .pos .pos-head .chip, .pay .pos-head .chip { height: 32px; padding: 0 9px; gap: 4px; font-size: 0.88rem; }
  /* お客さま用 QR・値引き・操作: 高さ 32px */
  .pos .pos-head .btn-sm { min-height: 32px; padding: 0 9px; gap: 4px; font-size: 0.88rem; border-radius: 10px; }
  /* 会計済み・合算済みのお知らせ帯: 画面の幅いっぱいの細い帯に */
  .pos > .notice { margin: 0; padding: 8px 12px; border-radius: 0; font-size: 0.9rem; }

  /* ===== 4. 伝票画面（session.js）: メニュー ===== */
  /* メニュー/伝票のタブ: 高さ 約50px → 約40px */
  .pos .tabs-mobile .tab { padding: 7px 8px; gap: 5px; font-size: 0.95rem; }
  /* メニュー欄の外側の余白（下は「未送信」ボタンに隠れない分だけ残す） */
  .pos .pos-menu { padding: 8px 10px 72px; }
  /* 検索欄と売切設定: 高さ 44px → 38px（入力の文字は 16px のまま） */
  .pos .pos-tools { gap: 6px; margin-bottom: 8px; }
  .pos .search-box { height: 38px; padding: 0 10px; gap: 6px; border-radius: 10px; }
  .pos .pos-tools .btn-sm { min-height: 38px; padding: 0 10px; gap: 4px; font-size: 0.88rem; border-radius: 10px; }
  /* カテゴリの札: 高さ 44px → 34px */
  .pos .pos-cats { gap: 6px; padding-bottom: 2px; margin-bottom: 8px; }
  .pos .pos-cat { height: 34px; padding: 0 11px; gap: 6px; font-size: 0.9rem; border-radius: 10px; }
  /* カテゴリの品数（補足の字は下限の 0.72rem のまま） */
  .pos .pos-cat small { min-width: 20px; height: 20px; font-size: 0.72rem; }
  /* 売切設定中のお知らせを小さく */
  .pos .pos-menu .notice { padding: 8px 10px; margin-bottom: 8px; font-size: 0.88rem; }
  /* カテゴリの間・品の間の空きを詰める */
  .pos .pmenu { gap: 14px; }
  .pos .pgroup { gap: 6px; }
  .pos .pgroup-title { font-size: 0.9rem; }
  .pos .pgrid, .pos .pbtns { gap: 6px; }
  /* 写真ありの品: 縦長のカード → 横1行（左に 48px の小さい写真・右に品名と金額）。1枚 約190px → 約64px */
  .pos .pcard { flex-direction: row; align-items: center; gap: 8px; min-height: 60px; padding: 6px 8px 6px 6px; border-radius: 12px; border-color: var(--line); box-shadow: none; }
  /* 上で枠の色を変えたので、選んだ品の弁柄の枠を付け直す */
  .pos .pcard.picked { border-color: var(--bengara); background: var(--accent-soft); }
  .pos .pcard-media { flex: none; width: 48px; overflow: visible; }
  .pos .pcard-img { aspect-ratio: 1 / 1; border-radius: 8px; }
  .pos .pcard-media .noimg { font-size: 1.2rem; }
  /* 売り切れの幕を小さい写真に合わせる（字は下限の 0.72rem） */
  .pos .pcard-flag { border-radius: 8px; font-size: 0.72rem; letter-spacing: 0; }
  /* 入れた数の丸は写真の右上の角に少しはみ出させる */
  .pos .pcard-n { top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; font-size: 0.78rem; }
  .pos .pcard-body { flex: 1; min-width: 0; align-self: stretch; gap: 2px; padding: 0; }
  .pos .pcard-name { font-size: 0.92rem; line-height: 1.25; }
  /* 金額は墨の色で太字（薄い灰色をやめて目立たせる） */
  .pos .pcard-price, .pos .pbtn-price { color: var(--ink); font-size: 0.92rem; font-weight: 800; }
  .pos .pcard-opt { padding: 1px 6px; font-size: 0.72rem; }
  /* ＋は飾り（カード全体が押せるボタン） */
  .pos .pcard-add { width: 24px; height: 24px; }
  /* 写真なしの品のボタン: 高さ 76px → 60px（写真ありの行とそろえる） */
  .pos .pbtn { min-height: 60px; gap: 2px; padding: 6px 10px 6px 9px; border-radius: 12px; box-shadow: none; }
  .pos .pbtn-name { font-size: 0.92rem; line-height: 1.25; }
  .pos .pbtn-n { top: 5px; right: 5px; min-width: 22px; height: 22px; padding: 0 6px; font-size: 0.78rem; }
  /* 「未送信 N点を確かめて送る」: 横幅いっぱい 54px → 右下の丸い札（44px） */
  .pos .fab { left: auto; right: 12px; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 0.95rem; box-shadow: 0 6px 16px rgb(124 58 45 / 0.35); }

  /* ===== 5. 伝票画面（session.js）: 伝票タブ ===== */
  .pos .panel-scroll { padding: 8px 10px; }
  .pos .panel-block { padding: 2px 10px; margin-bottom: 8px; border-radius: 12px; }
  .pos .panel-title { min-height: 32px; margin-bottom: 0; gap: 6px; font-size: 0.95rem; }
  .pos .panel-empty { padding: 24px 10px; }
  /* 送った品の行: 1品1行（数量・品名と状態・金額・✓ の丸）。1品 約90px → 約46px */
  .pos .sline { gap: 8px; min-height: 46px; padding: 5px 4px; }
  .pos .sline-qty { min-width: 1.3em; text-align: center; font-size: 1rem; }
  /* 品名と状態の札を同じ行に並べ、メモ・オプションは次の行へ */
  .pos .sline-main { display: flex; flex-wrap: wrap; align-items: center; gap: 1px 6px; min-width: 0; }
  .pos .sline-name { font-size: 0.95rem; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
  .pos .sline-state { order: 2; margin-top: 0; }
  .pos .sline-sub { order: 3; flex-basis: 100%; font-size: 0.85rem; line-height: 1.3; }
  /* 金額と ✓ を縦積み → 横並びに */
  .pos .sline-right { flex-direction: row; align-items: center; gap: 8px; }
  .pos .sline-amt { min-width: 0; font-size: 0.95rem; font-weight: 800; }
  /* 「提供済み」: 文字付きの 40px の札 → 36px の丸い ✓（提供画面と同じ形。文字は字の大きさ 0 で隠し、title は残る） */
  .pos .serve-btn { width: 36px; height: 36px; min-height: 36px; padding: 0; gap: 0; justify-content: center; border-radius: 50%; font-size: 0; }
  /* 提供待ち（調理済み）の品は ✓ を塗りつぶして「今運ぶ品」と分かるように */
  .pos .sline.st-done .serve-btn { background: var(--ok); color: #fff; }
  /* 未送信の品: 写真 46px → 36px、−/+ 38px → 32px */
  .pos .pline { gap: 8px; padding: 5px 0; }
  .pos .line-thumb { width: 36px; height: 36px; border-radius: 8px; font-size: 1rem; }
  .pos .pline-name { font-size: 0.95rem; line-height: 1.3; }
  .pos .pline-sub { font-size: 0.85rem; }
  .pos .pline-price { font-size: 0.9rem; }
  .pos .pline .counter-btn { width: 32px; height: 32px; }
  .pos .pline .counter-val { min-width: 1.8em; }
  .pos .panel-block.pending { padding: 4px 10px 10px; box-shadow: 0 3px 10px rgb(124 58 45 / 0.12); }
  /* 「キッチンに送る ¥xxx」: 56px → 44px */
  .pos .panel-block .btn-block { min-height: 44px; margin-top: 8px; font-size: 1rem; }
  /* 下の合計欄: 小計の1行＋「合計 ¥xxx ｜ 会計へ」の1行。下のタブが安全領域を受け持つので、ここの安全領域の余白はやめる */
  .pos .panel-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 6px 12px 8px; }
  .pos .panel-foot .sum-row { grid-column: 1 / -1; padding: 1px 0; font-size: 0.9rem; }
  /* 合計は太字 1.25rem で左の列に（点線の区切りは横の会計ボタンと合わないので外す） */
  .pos .panel-foot .sum-row.total { grid-column: 1; margin-top: 0; padding: 0; border-top: 0; font-size: 1.25rem; }
  /* 会計へ: 横幅いっぱい 56px → 右の列の 44px。未送信がある時の長い文言は2行に折り返す */
  .pos .panel-foot .btn-block { grid-column: 2; width: auto; max-width: 50vw; min-height: 44px; margin-top: 0; padding: 6px 18px; font-size: 1rem; line-height: 1.25; white-space: normal; }

  /* ===== 6. 会計画面（checkout.js） ===== */
  /* 伝票と割引の欄: 外側の余白を詰める */
  .pay-bill { padding: 8px; }
  /* カード: 余白・角丸・影を詰める（提供画面のカードにそろえる） */
  .pay-bill .card { padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; box-shadow: none; }
  .pay-bill .card-title { margin-bottom: 4px; gap: 6px; font-size: 0.95rem; }
  /* 伝票の品: 1品1行で低く。写真は小さく（46px → 32px） */
  .bill-line { gap: 8px; padding: 6px 0; }
  .bill-line .line-thumb { width: 32px; height: 32px; border-radius: 8px; font-size: 0.95rem; }
  .bill-line > .grow { min-width: 0; }
  .bill-line .strong { font-size: 0.95rem; line-height: 1.3; }
  /* 金額の列: 幅を 7em → 5em（品名に幅を回す） */
  .bill-amt { min-width: 5em; font-size: 0.95rem; }
  /* 小計・合計: 行の間を詰める。合計は大きく太字のまま */
  .bill-sum { margin-top: 4px; }
  .pay-bill .sum-row { padding: 2px 0; }
  .pay-bill .sum-row.total { font-size: 1.3rem; margin-top: 4px; padding-top: 6px; }
  /* 割引・割り勘・個別会計の丸ボタン: 38px → 34px */
  .pay-bill .chip-row { gap: 6px; }
  .pay-bill .chip-row .chip { height: 34px; padding: 0 11px; gap: 4px; font-size: 0.9rem; }
  /* 支払いの欄 */
  .pay-side { padding: 10px 8px 12px; gap: 8px; }
  /* お支払い残り: 金額は大きく残し、帯の余白・角丸・影を詰める */
  .due { padding: 10px 14px; border-radius: 12px; box-shadow: none; }
  .due strong { font-size: 2.1rem; }
  /* 入れた支払いの行 */
  .tender { padding: 6px 10px; gap: 8px; border-radius: 10px; }
  .tender-icon { width: 28px; height: 28px; border-radius: 8px; }
  /* お釣り（会計前）: 金額は太字で残す */
  .change { padding: 8px 14px; border-radius: 12px; }
  .change strong { font-size: 1.7rem; }
  /* 支払い方法: 72px → 48px、影なし。2列のまま */
  .method-grid { gap: 6px; }
  .method-btn { min-height: 48px; padding: 6px 10px; gap: 8px; border-radius: 12px; box-shadow: none; font-size: 0.95rem; }
  .method-icon { width: 32px; height: 32px; border-radius: 10px; }
  .method-icon svg { width: 20px; height: 20px; }
  /* 会計を確定する: 64px → 48px（主な操作なので横幅いっぱいは残す） */
  .pay-side .checkout-btn { min-height: 48px; font-size: 1rem; }
  .pay-side .btn-primary { box-shadow: none; }
  /* 決済端末の注意書き: テンキーを開いている間は隠す（iPad と同じ） */
  .pay-note { margin: 0; }
  .pay-side.keying .pay-note { display: none; }
  /* テンキー: キー 58px → 46px（押せる大きさは残す） */
  .keypad { padding: 10px; gap: 6px; border-radius: 14px; }
  .keypad-head .icon-btn { width: 34px; height: 34px; }
  .keypad-value { font-size: 1.9rem; padding: 0 4px; }
  .keypad-change, .keypad-change.ok { height: 26px; line-height: 26px; }
  .keypad-change.ok { font-size: 1.05rem; }
  .keypad-quick .chip { height: 34px; padding: 0 10px; }
  .keypad-keys { gap: 6px; }
  .keypad-keys .pad-key { min-height: 46px; border-radius: 10px; font-size: 1.35rem; }
  /* お預かりを入れる: 56px → 46px */
  .keypad > .btn-lg { min-height: 46px; font-size: 1rem; }

  /* ===== 7. 会計後の画面（receipts.js の詳細） ===== */
  .receipt-page { padding: 8px 8px 24px; }
  .receipt-page .toolbar { gap: 6px; margin-bottom: 8px; }
  .receipt-page .toolbar .page-title { font-size: 1rem; }
  /* お釣りの欄: 余白・角丸を詰める。お釣りの金額は大きく残す */
  .done-panel { padding: 12px 12px 10px; border-radius: 14px; margin-bottom: 8px; }
  .done-change { font-size: 2.6rem; }
  .done-panel .notice { padding: 8px 10px; margin: 6px 0; border-radius: 10px; font-size: 0.9rem; text-align: left; }
  .done-panel > .small { line-height: 1.45; }
  /* ドロワー・レシート・領収書: 縦に1つずつ（56px）→ 2列（40px）。ドロワー（主な操作）だけ1段使う */
  .done-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 8px 0 6px; }
  .done-actions .btn { min-width: 0; min-height: 40px; padding: 6px 10px; font-size: 0.95rem; box-shadow: none; }
  .done-actions .btn-primary { grid-column: 1 / -1; }
  /* 次へ・元の伝票・取り消すを、長いレシートの上に出す（スクロールせずに押せる） */
  .receipt-wrap { gap: 8px; }
  .receipt-actions { order: -1; max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .receipt-actions .btn { min-height: 40px; padding: 6px 10px; font-size: 0.95rem; box-shadow: none; }
  .receipt-actions .btn-primary { grid-column: 1 / -1; }
  .receipt-actions > p { grid-column: 1 / -1; margin: 0; }
  /* レシートの見本: 枠の余白と影を詰める（見本の中の字の大きさは変えない） */
  .receipt-page .receipt-preview { padding: 12px; border-radius: 10px; box-shadow: none; }

  /* ===== 8. 提供（serve.js・基準）: 呼び出し行だけ詰める前の形なので、下のカードにそろえる ===== */
  .hall .call-list { gap: 6px; }
  /* 呼び出し行: 余白・枠・角丸・影を軽く（赤い枠は残す） */
  .hall .call-row { gap: 8px; padding: 6px 8px 6px 12px; border-width: 1.5px; border-radius: 12px; box-shadow: none; }
  /* 呼び出し行の席名: 太字で目立たせる */
  .hall .call-row strong { font-size: 1.05rem; font-weight: 900; }
  /* 会計へ・伝票・対応済み: 押せる 32px は守り、幅と影を詰める */
  .hall .call-row .btn-sm { min-height: 32px; padding: 0 10px; border-radius: 10px; font-size: 0.85rem; }
  .hall .call-row .btn-primary { box-shadow: none; }
  /* 「まだ運んでいない品はありません」の札 */
  .hall .card { margin-bottom: 8px; padding: 10px 12px; border-radius: 12px; }

  /* ===== 9. キッチン（kds.js）: 上の黒いバー（2段のまま薄くする） ===== */
  .kds-bar { gap: 6px 8px; padding: calc(6px + var(--safe-top)) 10px 6px; }
  /* ← 戻る: 押せる範囲を 36px 角に広げる */
  .kds-back { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; padding: 0; font-size: 1.25rem; }
  /* 持ち場の切替: ← の横いっぱいに等分 */
  .kds-bar .seg { flex: 1 1 calc(100% - 50px); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; }
  .kds-bar .seg-btn { justify-content: center; min-height: 32px; padding: 4px 8px; font-size: 0.85rem; }
  .kds-count { font-size: 0.9rem; }
  /* 「完了 n」「音を有効にする」: 高さ 32px */
  .kds-btn { min-height: 32px; padding: 4px 12px; border-radius: 8px; font-size: 0.85rem; }
  .kds-clock { font-size: 1.1rem; }

  /* ===== 10. キッチン（kds.js）: 伝票カード ===== */
  .kds-grid { gap: 8px; padding: 8px; }
  /* 伝票: 角丸・枠・影を軽く（新着の緑枠は 2px で残る） */
  .kt { border-width: 2px; border-radius: 12px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.35); }
  .kt-head { align-items: center; gap: 6px; padding: 5px 10px; }
  /* 席名: 1.4rem → 1.15rem（太字・長い名前は折り返す） */
  .kt-where { min-width: 0; font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
  .kt-no { font-size: 0.85rem; }
  /* 経過時間: 大事な数字なので席名と同じ大きさで残す */
  .kt-time { font-size: 1.15rem; }
  /* 時刻・受けた所・会計済の帯（補足の字 0.75rem） */
  .kt-meta { flex-wrap: wrap; gap: 4px 6px; padding: 2px 10px; font-size: 0.75rem; }
  /* 品の行（押すと完了）: 押せる高さ 40px は守る */
  .kl { align-items: baseline; gap: 8px; min-height: 40px; padding: 6px 10px; }
  .kl-qty { min-width: 1.4em; font-size: 1.2rem; line-height: 1.3; }
  /* 品名・持ち場・食前食後・オプション・メモを縦3段から横並び（入りきらなければ折り返す）に */
  .kl-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .kl-name { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
  .kl-timing { padding: 0 6px; font-size: 0.8rem; }
  .kl-opts, .kl-note { font-size: 0.9rem; }
  /* 「すべて完了」: 横幅いっぱいの黒い帯（約56px）→ 右下の丸いボタン（高さ 34px） */
  .kt-done { align-self: flex-end; min-height: 34px; margin: 6px 8px 8px; padding: 0 16px; border-radius: 999px; font-size: 0.9rem; }

  /* ===== 11. 画面の上の安全領域（点検 2026-10-26）: ホーム画面のアプリでは時計・電池の所まで描かれるので、その分を空ける ===== */
  .pos .pos-head, .pay .pos-head { padding-top: calc(6px + var(--safe-top)); }
  .page { padding-top: calc(14px + var(--safe-top)); }
  .page.hall { padding-top: calc(8px + var(--safe-top)); }
  .receipt-page { padding-top: calc(8px + var(--safe-top)); }
  .hall-bar { top: calc(var(--safe-top) + var(--top-bar-h, 0px)); }
  .toasts { top: calc(12px + var(--safe-top) + var(--top-bar-h, 0px)); }

  /* ===== 12. 押す対象を 32px 以上に（点検 2026-10-26） ===== */
  .hall-all { min-height: 32px; }
  .panel-title .link-btn { min-height: 32px; padding: 0 8px; }
  .tender .x, .disc .x { min-width: 36px; min-height: 36px; }
}
