/* スタッフ画面（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); }
body.pair-mode #app, body.kds-mode #app { display: block; }
.content { min-width: 0; display: flex; flex-direction: column; }
.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-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); }
.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: 0; height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-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); }
.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-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::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-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） */
.pos, .pay { display: flex; flex-direction: column; height: 100dvh; 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 { outline: 2px dashed var(--alert); outline-offset: -3px; }
.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; }
.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 { background: var(--paper-warm); color: var(--ink-soft); }
.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; }
.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); }
.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); }
.receipt, .formal { font-size: 13px; line-height: 1.5; color: #000; position: relative; }
.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: 3.6rem; font-weight: 900; color: var(--ok); line-height: 1.1; }

/* 表 */
.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; }

/* レジ締め */
.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-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; }
.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-card { width: 300px; border: 1px solid #000; border-radius: 12px; padding: 18px; text-align: center; background: #fff; color: #000; break-inside: avoid; }
.qr-shop { font-family: var(--font-mincho); font-size: 1.1rem; letter-spacing: 0.06em; }
.qr-table { font-size: 1.8rem; font-weight: 800; margin: 2px 0 8px; }
.qr-img svg { width: 200px; height: 200px; display: block; margin: 0 auto; }
.qr-say { font-size: 0.85rem; margin-top: 8px; }
.qr-say.en { margin-top: 0; 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: 100dvh; }
.kds-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: #000; position: sticky; top: 0; 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)); }
  .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; }
  .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: 1fr; }
  .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; }
  .qr-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10mm; justify-items: center; }
  .qr-card { width: 85mm; border: 0.3mm solid #000; }
  .rc-void { opacity: 1; }
}
