/* 炭治郎 POS — スマホ前提（幅375pxで組み、広い画面は少し広げるだけ）。指で押しやすい大きさ（最低44px）。
   見た目は HOOPS の管理画面に合わせる：白いカード、角丸、色付きアイコンのタイル。端末の設定でライト/ダークが切り替わる。 */
:root {
  --bg: #f4f3f1; --surface: #ffffff; --raised: #f0eeeb; --line: #e4e0da;
  --fg: #1d1b1f; --muted: #6d675f; --accent: #c8161d; --accent-soft: #fdecec; --btn-red: #c8161d; --btn-green: #17803d;
  --ok: #17803d; --ok-soft: #e7f6ec; --warn: #a15c00; --warn-soft: #fff4e0; --bad: #c8161d; --bad-soft: #fdecec;
  --shadow: 0 1px 2px rgba(20, 16, 12, .06), 0 1px 6px rgba(20, 16, 12, .04);
  --radius: 14px; --tap: 44px; --tabbar: 62px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Khmer", "Khmer Sangam MN", "Khmer OS", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141316; --surface: #1f1d22; --raised: #2a272e; --line: #36323a;
    --fg: #ece7df; --muted: #a8a197; --accent: #f0524d; --accent-soft: #3a1d1f; --btn-red: #c8161d; --btn-green: #1f7a44;
    --ok: #5cc285; --ok-soft: #1b3326; --warn: #f0b44a; --warn-soft: #3a2d14; --bad: #f0524d; --bad-soft: #3a1d1f;
    --shadow: none;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.45 var(--font); }
a { color: inherit; }
h1 { font-size: 1.25rem; margin: 0 0 .75rem; }
h2 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
p { margin: .25rem 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
[hidden] { display: none !important; }

/* ---- 上部バー ---- */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem; padding-top: calc(.5rem + env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--line); }
.bar .brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 700; flex: 1; min-width: 0; }
.bar .brand img { height: 36px; width: auto; border-radius: 8px; background: #fff; padding: 2px 6px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.bar .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .who { color: var(--muted); font-size: .8rem; white-space: nowrap; max-width: 6rem; overflow: hidden; text-overflow: ellipsis; }
main { margin: 0 auto; padding: .9rem .9rem calc(var(--tabbar) + 1.5rem + env(safe-area-inset-bottom)); max-width: 40rem; }

/* ---- 下のタブ（スマホの親指で届く位置） ---- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--tabbar); text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--accent); }
body.has-cart .tabbar { display: none; }

/* ---- ボタン・入力 ---- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--tap); padding: .5rem 1rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  touch-action: manipulation; }
button:active, .btn:active { transform: scale(.97); }
.btn-primary { background: var(--btn-red); border-color: var(--btn-red); color: #fff; }
.btn-ok { background: var(--btn-green); border-color: var(--btn-green); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { min-height: 38px; padding: .25rem .75rem; font-size: .875rem; }
.btn-lg { min-height: 56px; font-size: 1.1rem; }
.btn-block { width: 100%; }
button:disabled { opacity: .45; cursor: not-allowed; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .6rem 0 .25rem; }
input, select, textarea { width: 100%; min-height: var(--tap); padding: .5rem .75rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: 16px; }
input[type=checkbox] { width: 24px; height: 24px; min-height: 0; accent-color: var(--accent); vertical-align: middle; flex: none; }
input:focus, select:focus, textarea:focus, button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 入力欄はスマホでは縦に1列。広い画面だけ横に並べる */
.row { display: flex; flex-direction: column; gap: 0 .6rem; }
.row.inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.row.inline > * { flex: 1 1 8rem; }
.row > .shrink, .row.inline > .shrink { flex: 0 0 auto; }
.row > button, .row > .btn { margin-top: .6rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .6rem; }
.check-row { display: flex; align-items: center; gap: .6rem; color: var(--fg); font-size: 1rem; min-height: var(--tap); margin: .25rem 0; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.head-row h1 { margin: 0; }
.back { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; color: var(--muted); font-size: .9rem; margin-bottom: .25rem; }

/* ---- カード・一覧 ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem; box-shadow: var(--shadow); }
.card > h2:first-child { margin-top: 0; }
.flash { padding: .75rem 1rem; border-radius: 12px; margin-bottom: .9rem; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.errors { padding: .75rem 1rem; border-radius: 12px; margin-bottom: .9rem; background: var(--bad-soft); color: var(--bad); }
.errors ul { margin: 0; padding-left: 1.2rem; }
.tag { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--raised); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.tag-ok { background: var(--ok-soft); color: var(--ok); } .tag-warn { background: var(--warn-soft); color: var(--warn); } .tag-bad { background: var(--bad-soft); color: var(--bad); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .9rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: .8rem; }
/* カードを並べる（スマホは1列） */
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 .9rem; }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }

/* 2列の明細（品名と金額）。スマホでも崩れない */
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .55rem .25rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 .75rem; }

/* 一覧表（table.stack）：スマホでは1行を1枚のカードにして、列名を左に出す。横スクロールなし */
table.stack tr.head { display: none; }
table.stack tr { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); }
table.stack tr:last-child { border-bottom: 0; }
table.stack td { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; border: 0; text-align: right; }
table.stack td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; text-align: left; flex: none; }
table.stack td:first-child { display: block; text-align: left; font-weight: 600; font-size: 1rem; padding-bottom: .3rem; }
table.stack td:first-child::before { content: none; }
table.stack td[data-label=""]::before { content: none; }
table.stack td.num { justify-content: space-between; }
table.stack td input { max-width: 10rem; }
table.stack tr.group th { display: block; padding: .9rem 0 .2rem; color: var(--accent); border: 0; }

/* ---- ホーム（タイル） ---- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; min-height: 6.25rem; padding: .9rem .5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); text-decoration: none; text-align: center; font-weight: 700; }
.tile:active { transform: scale(.97); }
.tile.wide { grid-column: span 2; flex-direction: row; justify-content: flex-start; gap: .9rem; padding: 1rem 1.1rem; text-align: left; }
.tile .ico { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 999px; flex: none; }
.tile .ico svg { width: 25px; height: 25px; }
.tile small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }
.c-red .ico { background: #fdecec; color: #c8161d; } .c-green .ico { background: #e7f6ec; color: #17803d; }
.c-indigo .ico { background: #eceefd; color: #4338ca; } .c-amber .ico { background: #fff4e0; color: #b45309; }
.c-sky .ico { background: #e6f4fb; color: #0369a1; } .c-gray .ico { background: #efeeec; color: #57534e; }
@media (prefers-color-scheme: dark) {
  .c-red .ico { background: #3a1d1f; color: #f87171; } .c-green .ico { background: #1b3326; color: #5cc285; }
  .c-indigo .ico { background: #25264a; color: #a5b4fc; } .c-amber .ico { background: #3a2d14; color: #fbbf24; }
  .c-sky .ico { background: #14303f; color: #7dd3fc; } .c-gray .ico { background: #2a272e; color: #d6d3d1; }
}
.section-label { font-size: .8rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin: 1.25rem 0 .5rem; }

/* ---- ログイン ---- */
.login { max-width: 24rem; margin: 1.5rem auto; }
.staff-list { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.staff-list label { margin: 0; }
.staff-list input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.staff-list span { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: .5rem;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 600; text-align: center; box-shadow: var(--shadow); }
.staff-list input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.staff-list input:focus-visible + span { outline: 2px solid var(--accent); }
.pin { font-size: 1.6rem; letter-spacing: .5em; text-align: center; }
/* 言語の切り替え（ヘッダー右上） */
.lang { position: relative; }
.lang summary { list-style: none; gap: .3rem; padding: .25rem .6rem; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 18px; height: 18px; }
.lang-menu { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 50; min-width: 9.5rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .15); }
.lang-menu a { display: flex; align-items: center; min-height: var(--tap); padding: 0 .8rem; border-radius: 8px; text-decoration: none; font-weight: 600; }
.lang-menu a.on { background: var(--raised); color: var(--accent); }
.login-top { display: flex; justify-content: flex-end; }

/* ---- 卓一覧 ---- */
.tables { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.tbl { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.tbl.busy { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent), var(--shadow); }
.tbl .top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tbl h2 { margin: 0; font-size: 1.15rem; }
.tbl .meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; color: var(--muted); font-size: .875rem; margin-top: .2rem; }
.tbl .total { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tbl form { margin-top: .6rem; display: flex; gap: .5rem; }
.tbl form input { flex: 1; min-width: 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }

/* ---- 時間料金 ---- */
.play { display: flex; align-items: center; gap: .75rem; }
.play .clock { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.play .what { flex: 1; min-width: 0; }
.split { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem .8rem; margin-top: .6rem; border-radius: 10px; background: var(--raised); }
.split b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* ---- 注文画面 ---- */
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .35rem 0 .5rem; margin: 0 -.9rem .5rem; padding-left: .9rem; padding-right: .9rem;
  position: sticky; top: calc(47px + env(safe-area-inset-top)); background: var(--bg); z-index: 5; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs .btn { flex: 0 0 auto; border-radius: 999px; min-height: 40px; }
.tabs button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tabs .btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.subnav { position: static; margin-top: -.25rem; }
.menu { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.menu button { flex-direction: column; align-items: flex-start; justify-content: flex-start; text-align: left; min-height: 78px; padding: .6rem .75rem; font-weight: 600; box-shadow: var(--shadow); }
.menu button small { color: var(--muted); font-weight: 400; }
.menu button .in-cart { margin-left: .25rem; color: var(--accent); }
.menu button.sold-out { opacity: .4; text-decoration: line-through; }
.cart { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom)); }
.cart-inner { max-width: 40rem; margin: 0 auto; }
.cart-lines { max-height: 40vh; overflow-y: auto; margin-bottom: .5rem; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: .25rem .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.cart-line input { min-height: 38px; padding: .25rem .5rem; font-size: 16px; grid-column: 1 / -1; }
.stepper { display: flex; align-items: center; gap: .25rem; }
.stepper button { min-height: 40px; width: 40px; padding: 0; }
.stepper b { min-width: 1.6rem; text-align: center; }
.lines .line { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.lines .line:last-of-type { border-bottom: 0; }
.lines .line .what { flex: 1; min-width: 0; }
.lines .line.cancelled .what { text-decoration: line-through; color: var(--muted); }
.totals { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding-top: .7rem; border-top: 1px solid var(--line); margin-top: .25rem; }
.totals b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
details.act summary { list-style: none; cursor: pointer; }
details.act summary::-webkit-details-marker { display: none; }
details.act[open] { flex-basis: 100%; }
details.act form { margin-top: .5rem; }
details > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ---- 会計・レシート ---- */
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .5rem 0 .25rem; }
.pay-methods button { min-height: 68px; font-size: 1.1rem; background: var(--btn-green); border-color: var(--btn-green); color: #fff; }
details.more { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .25rem; }
details.more > summary { color: var(--muted); font-weight: 600; font-size: .95rem; }
details.more[open] > summary { color: var(--fg); }
.pay-total { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.receipt { max-width: 22rem; margin: 0 auto; background: #fff; color: #111; padding: 1rem; border-radius: 8px; font-size: .9rem; box-shadow: var(--shadow); }
.receipt table td, .receipt table th { border-color: #ddd; padding: .2rem 0; background: none; color: #111; }
.receipt .muted { color: #555; }
.sticky-pay { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + .5rem); }
@media print {
  .bar, .tabbar, .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
  .receipt { border-radius: 0; padding: 0; box-shadow: none; }
}

/* ---- 広い画面（タブレット・PC）は少し広げるだけ ---- */
@media (max-width: 26rem) { .bar .who { display: none; } }
@media (min-width: 48rem) {
  main { max-width: 52rem; padding-left: 1.25rem; padding-right: 1.25rem; }
  .tabs { margin-left: -1.25rem; margin-right: -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; }
  .row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .row > * { flex: 1 1 10rem; }
  .row > button, .row > .btn { margin-top: 0; }
  .tables { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile.wide { grid-column: span 4; }
  .menu { grid-template-columns: repeat(3, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
}

/* お客様用（QR 注文）：下のタブなし */
body.guest main { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
.guest-hero { text-align: center; padding: 1.5rem 0 1rem; }
.guest-hero img { max-width: 240px; height: auto; }
.guest-hero h1 { margin: .75rem 0 .25rem; }
/* QR コード（管理・印刷） */
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.qr-card { text-align: center; background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; break-inside: avoid; }
.qr-card svg { width: 100%; height: auto; display: block; }
.qr-card h2 { margin: .25rem 0 0; font-size: 1.1rem; color: #111; }
.qr-card p { margin: 0; font-size: .8rem; color: #555; }
.qr-card .url { word-break: break-all; font-size: .65rem; color: #777; }
@media print {
  .bar, .tabbar, .no-print, .flash { display: none !important; }
  main { max-width: none; padding: 0; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); gap: 8mm; }
  .qr-card { border: 1px dashed #999; box-shadow: none; }
}

/* 提供済みの切り替え（伝票の各行の左） */
.serve-form { flex: none; }
.serve-btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; border: 2px solid var(--warn); background: var(--surface); color: transparent; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.serve-btn svg { width: 24px; height: 24px; }
.serve-btn[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
span.serve-btn { width: 28px; height: 28px; min-height: 28px; }
.lines .line.unserved { background: var(--warn-soft); margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
.lines .line.served .what b { color: var(--muted); }
.lines .line { align-items: center; }

/* お客様用メニュー：カテゴリごとに縦に並べる。写真があれば左に */
.g-cat { margin: 1.25rem 0 .5rem; font-size: 1.15rem; }
.g-menu { display: grid; gap: .6rem; }
.g-item { display: flex; gap: .75rem; align-items: center; width: 100%; text-align: left; padding: .6rem; min-height: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font: inherit; color: inherit; }
.g-item img, .g-item .noimg { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; background: var(--raised); }
.g-item .noimg { display: flex; align-items: center; justify-content: center; }
.g-item .noimg { background: #fff; border: 1px solid var(--line); }
.g-item .noimg img { width: 72px; height: auto; opacity: .5; background: none; border-radius: 0; }
.g-item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.g-item .txt b { font-size: 1rem; }
.g-item .txt small { color: var(--muted); }
.g-item .price { font-weight: 700; font-variant-numeric: tabular-nums; }
.g-item .plus { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.g-item .in-cart { color: var(--accent); font-weight: 700; margin-left: .25rem; }
.g-item.sold-out { opacity: .45; }
.g-item.sold-out .plus { background: var(--muted); }

/* ロゴ（白地の横長ロゴ。ダークモードでは白い札にのせる） */
.logo-full { display: block; margin: 0 auto; width: 240px; max-width: 70%; height: auto; border-radius: 16px; background: #fff; padding: 8px 10px; }

/* 在庫：作り置きセット */
.set-row { padding: .8rem 1rem; }
.set-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.set-count { text-align: right; white-space: nowrap; }
.set-count b { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.set-count span { margin-left: .25rem; color: var(--muted); font-size: .85rem; }
.set-count.bad b { color: var(--bad); } .set-count.warn b { color: var(--warn); }
.set-form { display: flex; gap: .5rem; margin-top: .6rem; }
.set-form input { flex: 1; min-width: 0; }

/* 確認のモーダル */
dialog.modal { border: 0; border-radius: var(--radius); padding: 1.25rem; width: min(92vw, 24rem); background: var(--surface); color: var(--fg); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
dialog.modal::backdrop { background: rgba(0,0,0,.45); }
dialog.modal p { margin: 0 0 1rem; font-size: 1.05rem; line-height: 1.5; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
/* 自動更新・通知 */
.live-banner { position: fixed; left: .9rem; right: .9rem; bottom: calc(var(--tabbar) + .75rem + env(safe-area-inset-bottom)); z-index: 45; max-width: 40rem; margin: 0 auto; }
body.has-cart .live-banner { bottom: auto; top: 4.5rem; }
.notify-toggle { margin-bottom: .75rem; }
.notify-toggle p { margin: 0; text-align: center; cursor: pointer; }
.notify-toggle .row-btns { display: flex; gap: .5rem; justify-content: center; margin-top: .4rem; }

/* お客様の画面：準備中 / 提供済み */
.g-state { color: var(--warn); font-weight: 600; }
.line.served .g-state { color: var(--ok); }

/* 操作ログ */
.log-row { display: grid; grid-template-columns: 3.2rem 1fr; gap: .15rem .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.log-row:first-child { border-top: 0; }
.log-row time { color: var(--muted); font-variant-numeric: tabular-nums; }
.log-row .who { font-weight: 600; }
.log-filter { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.log-filter label { flex: 1 1 8rem; }
