/* =============================================================================
   お客様用 注文画面（モバイルオーダー）・利用規約・プライバシーポリシー
   色はお店ごとのテーマ色（--brand）を1色だけ使い、ほかは白・グレー・黒でまとめる。
   --brand 系の値は order.js が店の設定（themeColor）から上書きする。
   ============================================================================= */
:root {
  --brand: #B5352A;
  --brand-dark: #942b22;
  --brand-text: #9f2f25;
  --brand-soft: #f8ebea;
  --brand-ink: #ffffff;

  --bg: #ffffff;
  --bg-sub: #f4f3f1;
  --ink: #1c1b1a;
  --ink-2: #4a4745;
  --muted: #74706c;
  --line: #e8e6e3;
  --ok: #1f7a46;
  --ok-soft: #e5f3ea;
  --warn: #8a5a00;
  --warn-soft: #fbf1d9;
  --danger: #b42318;
  --line-green: #06c755;
  --line-green-dark: #05a647;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --bar-h: 70px; /* 下部バー（店員呼出・注文履歴・カート）の高さの目安 */
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
body.lock { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

#app { max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
@media (min-width: 700px) {
  body { background: #ecebe8; }
  #app { box-shadow: 0 0 0 1px var(--line); }
}

.i { width: 22px; height: 22px; flex: none; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px;
  border: 0; border-radius: var(--r);
  font-weight: 700; font-size: 16px; line-height: 1.3;
  transition: background .15s, transform .1s, opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.line { background: var(--line-green); color: #fff; }
.btn.line:hover:not(:disabled) { background: var(--line-green-dark); }
.btn.ghost { background: var(--bg-sub); color: var(--ink); }
.btn.outline { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn:disabled { background: var(--bg-sub); color: var(--muted); box-shadow: none; }

.lang-btn {
  flex: none; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg);
  font-size: 12px; font-weight: 700; color: var(--ink-2);
}
.lang-btn .i { width: 15px; height: 15px; }

/* ---------- 読み込み・メッセージ画面 ---------- */
.center-screen {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 32px 24px; text-align: center;
}
.center-inline { display: flex; justify-content: center; padding: 40px 0; }
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.msg-top { position: absolute; top: 14px; right: 14px; }
.msg h1 { font-size: 20px; margin-top: 4px; }
.msg p { margin: 0; color: var(--muted); max-width: 22em; font-size: 14px; }
.msg-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-sub); color: var(--ink-2);
}
.msg-icon .i { width: 30px; height: 30px; }
.msg .shop-logo { width: 64px; height: 64px; }
.msg-store { font-size: 13px; font-weight: 700; color: var(--muted); }
.msg .btn { margin-top: 10px; min-width: 200px; }

/* ---------- お店の表示（表紙・ロゴ） ---------- */
.shop-band { height: 6px; background: var(--brand); }
.shop-cover { aspect-ratio: 16 / 7; max-height: 240px; width: 100%; overflow: hidden; background: var(--bg-sub); }
.shop-cover img { width: 100%; height: 100%; object-fit: cover; }
.shop-logo {
  width: 52px; height: 52px; flex: none;
  border-radius: 12px; object-fit: cover;
  background: var(--bg); border: 1px solid var(--line);
}

.shop-info { padding: 14px 16px 16px; }
.shop-row { display: flex; align-items: center; gap: 12px; }
.shop-info.has-cover.has-logo .shop-row { align-items: flex-end; }
.shop-info.has-cover .shop-logo {
  width: 68px; height: 68px; margin-top: -42px;
  border: 3px solid var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.shop-title { flex: 1; min-width: 0; }
.shop-name { font-size: 19px; font-weight: 800; letter-spacing: .01em; overflow-wrap: anywhere; }
.shop-table {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 2px;
  font-size: 13px; font-weight: 700; color: var(--brand-text);
}
.shop-table .i { width: 15px; height: 15px; }
.shop-tagline { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 12px; padding: 10px 12px;
  border-radius: var(--r); background: var(--brand-soft);
}
.notice-tag {
  flex: none; margin-top: 1px; padding: 0 6px;
  font-size: 11px; font-weight: 800; line-height: 19px; color: var(--brand-text);
  border: 1px solid currentColor; border-radius: 4px; background: var(--bg);
}
.notice p { margin: 0; font-size: 13px; line-height: 1.6; white-space: pre-line; }

/* ---------- 友だち追加ゲート（LINE を使う店） ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.gate-body {
  position: relative; flex: 1; width: 100%; max-width: 420px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 56px 24px 36px;
}
.gate-top { position: absolute; top: 14px; right: 16px; }
.gate-body.has-cover .shop-logo { width: 72px; height: 72px; margin-top: -92px; border: 3px solid var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.gate .shop-logo { width: 64px; height: 64px; margin-bottom: 12px; }
.gate-store { font-size: 14px; font-weight: 700; color: var(--muted); }
.gate h1 { font-size: 22px; font-weight: 800; margin: 14px 0 12px; }
.gate-text { margin: 0; color: var(--ink-2); font-size: 14px; }
.steps {
  list-style: none; width: 100%; margin: 24px 0; padding: 16px 4px;
  display: flex; justify-content: space-between; gap: 6px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--ink-2);
}
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.steps span {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-text); font-weight: 800;
}
.gate .btn.line .i { width: 24px; height: 24px; }
.gate-msg { margin: 14px 0 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.agree { margin: 16px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.agree a { color: var(--ink-2); }

/* ---------- カテゴリタブ ---------- */
.catnav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; padding: 0 6px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; position: relative;
  border: 0; background: none;
  padding: 13px 11px 12px;
  font-size: 14.5px; font-weight: 700; color: var(--muted);
  transition: color .2s;
}
.tab.on { color: var(--ink); }
.tab.on::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: -1px;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--brand);
}

/* ---------- メニュー ---------- */
.menu { padding-bottom: calc(var(--bar-h) + 36px + env(safe-area-inset-bottom)); }
.sec { padding: 22px 16px 6px; }
.sec + .sec { border-top: 8px solid var(--bg-sub); }
.sec-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }

.row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.row:last-child { border-bottom: 0; }
.row:active { background: var(--bg-sub); box-shadow: 0 0 0 16px var(--bg-sub); clip-path: inset(0 -16px); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.tag {
  display: inline-block; margin-bottom: 5px; padding: 1px 6px;
  font-size: 11px; font-weight: 800; line-height: 1.6;
  color: var(--brand-text); background: var(--brand-soft); border-radius: 4px;
}
.row-name { font-size: 15.5px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.row-desc {
  margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-price { margin-top: 7px; font-size: 15px; font-weight: 700; }
.row-price small, .rc-price small { font-size: 12px; font-weight: 600; color: var(--muted); }
.so {
  margin-left: 8px; padding: 1px 6px; border-radius: 4px; vertical-align: 1px;
  font-size: 11px; font-weight: 800; color: #fff; background: #6f6b67;
}
.row-side { position: relative; flex: none; width: 104px; height: 104px; border-radius: var(--r); background: var(--bg-sub); }
.row-side img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.row-side.noimg { width: auto; height: auto; background: none; align-self: center; }
.row.soldout { cursor: default; }
.row.soldout .row-name, .row.soldout .row-price { color: var(--muted); }
.row.soldout img { filter: grayscale(1); opacity: .5; }

/* 「＋」ボタン */
.add {
  position: absolute; right: -6px; bottom: -6px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
.row-side.noimg .add { position: relative; right: auto; bottom: auto; box-shadow: none; border-width: 1.5px; }
.add .i { width: 20px; height: 20px; stroke-width: 2.4; }
.add.pop { animation: pop .35s ease-out; }
@keyframes pop { 40% { transform: scale(1.18); } }
.incart {
  position: absolute; top: -7px; right: -7px;
  min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink);
  font-size: 11.5px; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 2px var(--bg);
}

/* おすすめ（横スクロール） */
.rc-list {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 8px -16px 0; padding: 4px 16px 16px; scrollbar-width: none;
}
.rc-list::-webkit-scrollbar { display: none; }
.rc { flex: none; width: 150px; scroll-snap-align: start; scroll-margin-left: 16px; cursor: pointer; }
.rc-img { position: relative; aspect-ratio: 1; border-radius: var(--r); background: var(--bg-sub); }
.rc-img img, .rc-img .noimg { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
.rc-img .tag { position: absolute; top: 7px; left: 7px; margin: 0; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.rc-img .add { right: 7px; bottom: 7px; }
.rc-so {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--r);
  background: rgba(28, 27, 26, .45); color: #fff; font-weight: 800; font-size: 14px;
}
.rc.soldout img { filter: grayscale(1); }
.rc-name {
  overflow-wrap: anywhere;
  margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-price { margin-top: 2px; font-size: 14px; font-weight: 600; }
.noimg { display: grid; place-items: center; color: #c4bfba; background: var(--bg-sub); }
.noimg .i { width: 36%; height: 36%; stroke-width: 1.4; }

.empty { text-align: center; color: var(--muted); padding: 40px 12px; margin: 0; }
.menu-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 28px 0 0; padding: 0 16px; }
.menu-agree { margin: 8px 0 0; padding: 0 20px; text-align: center; font-size: 12px; line-height: 1.7; color: var(--muted); }
.menu-agree a { color: var(--ink-2); }

/* ---------- 下部バー ---------- */
.bar {
  position: fixed; left: 50%; bottom: 0; z-index: 30;
  width: 100%; max-width: 640px; transform: translateX(-50%);
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.bar-row { display: flex; gap: 8px; align-items: center; }
.bar-btn {
  flex: none; width: 62px; height: 50px; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; border-radius: var(--r); background: var(--bg-sub);
  font-size: 10.5px; font-weight: 700; line-height: 1.2; color: var(--ink-2);
}
.bar-btn .i { width: 20px; height: 20px; }
.bar-btn span { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-cart {
  flex: 1; min-width: 0; height: 50px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  border: 0; border-radius: var(--r);
  background: var(--brand); color: var(--brand-ink);
  font-weight: 700; font-size: 15.5px;
}
.bar-cart:disabled { background: var(--bg-sub); color: var(--muted); justify-content: center; }
.cart-count {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .24); font-size: 13px; font-weight: 800;
}
.cart-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-cart:disabled .cart-label { flex: none; }
.cart-total { font-size: 16px; font-weight: 800; }

/* ---------- ボトムシート ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 18, 16, .48); opacity: 0; transition: opacity .25s; }
.sheet {
  position: relative; width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: var(--r-lg) var(--r-lg) 0 0;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--bg-sub); color: var(--ink);
}
.sheet-close .i { width: 20px; height: 20px; }
.sheet-head { padding: 16px 56px 13px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 17px; font-weight: 800; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.sheet-foot {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}
.note { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }

/* ダイアログ（中央表示） */
.sheet-wrap.dialog { align-items: center; padding: 20px; }
.sheet-wrap.dialog .sheet {
  max-width: 360px; border-radius: var(--r-lg);
  transform: scale(.96); opacity: 0;
  transition: transform .2s, opacity .2s;
}
.sheet-wrap.dialog.open .sheet { transform: none; opacity: 1; }
.sheet-wrap.dialog .sheet-close { display: none; }
.sheet-wrap.dialog .sheet-body { padding: 26px 22px 8px; text-align: center; }
.sheet-wrap.dialog .sheet-foot { flex-direction: row; border-top: 0; padding-bottom: 20px; }
.sheet-wrap.dialog .sheet-foot .btn { flex: 1; padding: 0 12px; }
.dlg-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.dlg-text { margin: 0; color: var(--ink-2); font-size: 14px; }
.done-icon {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ok-soft); color: var(--ok);
}
.done-icon .i { width: 32px; height: 32px; stroke-width: 2.6; }
.done-icon.warn { background: var(--warn-soft); color: var(--warn); }
.sheet-wrap.done .sheet-foot { flex-direction: column-reverse; }
/* ダイアログのいちばん上の卓名（どの卓への操作か） */
.dlg-table {
  display: inline-flex; align-items: center; gap: 5px; margin: 0 auto 10px; padding: 4px 12px;
  border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-text); font-size: 14px; font-weight: 800;
}
.dlg-table .i { width: 16px; height: 16px; }
/* ダイアログの中の目立たせる一文（定員を超える・あとから足した物は未注文 など） */
.dlg-warn {
  display: flex; align-items: flex-start; gap: 6px; margin: 12px 0 0; padding: 10px 12px;
  border-radius: var(--r); background: var(--warn-soft); color: var(--warn);
  font-size: 13.5px; font-weight: 700; text-align: left;
}
.dlg-warn .i { width: 17px; height: 17px; flex: none; margin-top: 1px; }

/* 商品詳細 */
.sheet-wrap.item .sheet-close { background: rgba(255, 255, 255, .94); box-shadow: 0 0 0 1px var(--line); }
.item-hero { aspect-ratio: 4 / 3; max-height: 46vh; width: 100%; background: var(--bg-sub); }
.item-hero img { width: 100%; height: 100%; object-fit: cover; }
.item-main { padding: 18px 18px 6px; }
.sheet-wrap.item.no-hero .item-main { padding-top: 22px; padding-right: 60px; }
.item-name { font-size: 21px; font-weight: 800; overflow-wrap: anywhere; }
.item-desc { overflow-wrap: anywhere; margin: 8px 0 0; color: var(--ink-2); font-size: 14px; white-space: pre-wrap; }
.item-base { margin-top: 10px; font-size: 19px; font-weight: 800; }
.item-base small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 6px; }

.opt { border: 0; margin: 14px 0 0; padding: 0; border-top: 8px solid var(--bg-sub); }
.opt legend {
  float: left; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 18px 4px;
}
.opt legend + * { clear: both; }
.opt-title { font-weight: 800; font-size: 15.5px; }
.opt-req { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 4px; }
.opt-req.single { background: var(--ink); color: #fff; }
.opt-req.multi { background: var(--bg-sub); color: var(--ink-2); }
/* 必須のオプション：選んでいないものを目立たせる */
.opt.need .opt-title { color: var(--brand-text); }
.opt.need .opt-req.single { background: var(--brand); color: var(--brand-ink); }
.opt-row {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; margin: 0 18px; padding: 6px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.opt-row:last-child { border-bottom: 0; }
.opt-row input { position: absolute; opacity: 0; pointer-events: none; }
.opt-mark {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 2px solid #c9c4bf; display: grid; place-items: center;
  transition: border-color .15s, background .15s;
}
.opt-row input[type="checkbox"] + .opt-mark { border-radius: 5px; }
.opt-row input:checked + .opt-mark { border-color: var(--brand); background: var(--brand); }
.opt-row input:checked + .opt-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-ink); }
.opt-row input[type="checkbox"]:checked + .opt-mark::after {
  width: 10px; height: 5px; border-radius: 0; background: none;
  border-left: 2.5px solid var(--brand-ink); border-bottom: 2.5px solid var(--brand-ink);
  transform: rotate(-45deg) translate(1px, -1px);
}
.opt-row input:focus-visible + .opt-mark { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt-name { flex: 1; font-weight: 600; }
.opt-row.on .opt-name { font-weight: 700; }
.opt-price { color: var(--muted); font-size: 14px; font-weight: 600; }

.sheet-wrap.item .sheet-foot { flex-direction: row; align-items: center; gap: 12px; }
.qty { display: flex; align-items: center; gap: 2px; }
.qty-btn {
  width: 42px; height: 42px; border-radius: 50%; padding: 0;
  display: grid; place-items: center;
  border: 1.5px solid var(--line); background: var(--bg);
}
.qty-btn:disabled { opacity: .35; }
.qty-btn.sm { width: 34px; height: 34px; }
.qty-btn.sm .i { width: 18px; height: 18px; }
.qty-num { min-width: 32px; text-align: center; font-size: 18px; font-weight: 800; }
.add-btn { flex: 1; justify-content: space-between; padding: 0 20px; }
.add-btn span:last-child { font-size: 17px; }
.sheet-wrap.item .add-btn:disabled { justify-content: center; padding: 6px 12px; font-size: 14px; line-height: 1.25; text-align: center; }

/* カート */
.cart-table {
  display: flex; align-items: center; gap: 6px; padding: 10px 16px;
  background: var(--brand-soft); color: var(--brand-text); font-size: 14.5px; font-weight: 800;
  border-bottom: 1px solid var(--line);
}
.cart-table .i { width: 17px; height: 17px; flex: none; }
.cl { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cl-img { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; flex: none; background: var(--bg-sub); }
.cl-img img, .cl-img .noimg { width: 100%; height: 100%; object-fit: cover; }
.cl-info { flex: 1; min-width: 0; }
.cl-name { font-weight: 700; font-size: 15px; line-height: 1.4; }
.cl-opt { font-size: 12px; color: var(--muted); }
.cl-price { font-size: 14px; font-weight: 700; margin-top: 2px; }
.cl-price small { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.cl-ng { font-size: 12px; color: var(--danger); font-weight: 700; }
.cl.ng .cl-img { filter: grayscale(1); opacity: .6; }
.cl-qty { display: flex; align-items: center; gap: 2px; }
.cl-qty .qty-num { min-width: 26px; font-size: 16px; }
.sum-row { display: flex; align-items: baseline; justify-content: space-between; font-weight: 700; }
.sum-row small { margin-left: 8px; color: var(--muted); font-weight: 600; font-size: 12px; }
.sum-row strong { font-size: 22px; font-weight: 800; }

/* 注文履歴・お会計 */
.ho { padding: 14px 16px 6px; border-bottom: 8px solid var(--bg-sub); }
.ho-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.ho-head small { margin-left: 6px; font-weight: 600; }
.ho-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; font-weight: 600; }
.hi {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; column-gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.ho-head + .hi { border-top: 0; }
.hi-name { font-weight: 600; grid-column: 1; }
.hi-name small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.hi-qty { color: var(--muted); font-size: 14px; }
.hi-price { font-weight: 700; text-align: right; min-width: 70px; }
.hi .st { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
.hi.cancelled .hi-name, .hi.cancelled .hi-price { text-decoration: line-through; color: var(--muted); }
.st { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; }
.st-pending { background: var(--warn-soft); color: var(--warn); }
.st-served { background: var(--ok-soft); color: var(--ok); }
.st-cancelled { background: var(--bg-sub); color: var(--muted); }
.h-legal { padding: 4px 16px 20px; }
/* 合計の内訳（お通し・ご注文） */
.bill-break { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-2); }
.bill-break div { display: flex; justify-content: space-between; gap: 12px; }

.split { margin: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); scroll-margin-top: 12px; }
.split-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.split-title .i { width: 20px; height: 20px; color: var(--brand-text); }
.split-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.split-lbl { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper-num { min-width: 52px; text-align: center; font-size: 20px; font-weight: 800; }
.stepper-num small { font-size: 13px; font-weight: 700; margin-left: 2px; }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--bg-sub); }
.seg button {
  min-width: 58px; height: 34px; padding: 0 10px;
  border: 0; border-radius: 7px; background: none;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.seg button.on { background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.split-result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px; padding: 14px 16px; border-radius: var(--r); background: var(--brand-soft);
}
.split-per { font-size: 14px; font-weight: 700; color: var(--brand-text); }
.split-amounts { text-align: right; }
.split-amounts div { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
.split-amounts strong { font-size: 24px; font-weight: 800; }
.split-amounts div + div strong { font-size: 18px; }
.split-amounts span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.split .note { margin-top: 10px; text-align: left; }

.link-btn {
  align-self: flex-end; margin: -6px 0 0;
  display: inline-flex; align-items: center; gap: 4px;
  border: 0; background: none; padding: 2px 0;
  font-size: 13px; font-weight: 700; color: var(--brand-text);
}
.link-btn .i { width: 16px; height: 16px; }

/* ---------- 人数を選んで開始・スタッフのご案内を待つ ---------- */
.start { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.start-body {
  position: relative; flex: 1; width: 100%; max-width: 420px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 56px 22px 32px;
}
.start-body.has-cover .shop-logo { width: 72px; height: 72px; margin-top: -92px; border: 3px solid var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.start .shop-logo { width: 64px; height: 64px; margin-bottom: 12px; }
.start-table { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--brand-text); }
.start-table .i { width: 15px; height: 15px; }
.start h1 { font-size: 21px; font-weight: 800; margin: 16px 0 8px; }
.start-step { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 20px 0; }
.qty-btn.lg { width: 60px; height: 60px; border-width: 2px; }
.qty-btn.lg .i { width: 26px; height: 26px; }
.start-num { min-width: 84px; display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.start-num strong { font-size: 52px; font-weight: 800; line-height: 1; }
.start-num span { font-size: 18px; font-weight: 700; color: var(--ink-2); }
/* 人数：最初は「－名」（まだ選んでいない） */
.start-num.unset strong { color: #b5b0ab; }
/* お通し（席料）の金額 */
.start-fee {
  width: 100%; margin-bottom: 14px; padding: 12px; border-radius: var(--r); background: var(--brand-soft);
  font-size: 15px; font-weight: 800; color: var(--brand-text);
}
.start .note { margin-top: 12px; }
.start .agree { margin-top: 18px; }
/* スタッフのご案内を待つ */
.wait-icon {
  width: 60px; height: 60px; margin-top: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-sub); color: var(--ink-2);
}
.wait-icon .i { width: 30px; height: 30px; }
.wait h1 { margin-top: 14px; }
.wait-text { margin: 0 0 24px; font-size: 14px; color: var(--ink-2); }

/* ---------- 言語の選択 ---------- */
.lang-list { display: flex; flex-direction: column; padding: 6px 16px 16px; }
.lang-opt {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 54px; padding: 0 6px;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  font-size: 16.5px; font-weight: 700; text-align: left;
}
.lang-opt:last-child { border-bottom: 0; }
.lang-opt.on { color: var(--brand-text); }
.lang-opt .i { width: 20px; height: 20px; }

/* ---------- 利用規約・プライバシーポリシー ---------- */
.legal-page { background: var(--bg); }
.legal-page .legal-hdr, .legal-page .legal-body, .legal-page .legal-foot { max-width: 720px; margin: 0 auto; }
.legal-hdr { padding: 28px 20px 8px; }
.legal-hdr .store { display: block; font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.legal-hdr h1 { font-size: 22px; }
.legal-body { padding: 8px 20px 24px; font-size: 14.5px; line-height: 1.8; }
.legal-body h2 { font-size: 16px; margin: 26px 0 8px; padding-left: 10px; border-left: 4px solid var(--brand); }
.legal-body p { margin: 0 0 10px; }
.legal-body ol { margin: 0 0 10px; padding-left: 1.6em; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--brand-text); }
/* 見出しの番号（店によって隠す条・節があっても、番号が飛ばないように数える） */
.legal-body.jo, .legal-body.num { counter-reset: sec; }
.legal-body.jo h2, .legal-body.num h2 { counter-increment: sec; }
.legal-body.jo h2::before { content: "第" counter(sec) "条（"; }
.legal-body.jo h2::after { content: "）"; }
.legal-body.num h2::before { content: counter(sec) ". "; }
.legal-lead { color: var(--ink); }
.legal-meta {
  display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px;
  margin: 28px 0 0; padding: 16px; border-radius: var(--r); background: var(--bg-sub);
}
.legal-meta dt { color: var(--muted); font-weight: 700; }
.legal-meta dd { margin: 0; white-space: pre-line; }
[data-legal].unset { color: var(--danger); font-weight: 700; }
.legal-foot { padding: 0 20px 40px; text-align: center; font-size: 13px; }
.legal-foot a { color: var(--muted); }
.sheet-wrap.legal .sheet-body { padding: 4px 4px 12px; }
.sheet-wrap.legal .legal-body { padding: 8px 16px 16px; }
.legal-note { margin: 12px 16px 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--bg-sub); font-size: 13px; color: var(--ink-2); }
.legal-links { margin: 10px 0 0; text-align: center; font-size: 12px; }
.legal-links a { color: var(--muted); text-decoration: underline; margin: 0 6px; }

/* ---------- トースト ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 80;
  width: max-content; max-width: calc(100% - 32px);
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  background: rgba(28, 27, 26, .94); color: #fff;
  padding: 11px 16px; border-radius: var(--r);
  font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
  transition: opacity .2s, transform .2s;
}
.toast.above-bar { bottom: calc(var(--bar-h) + 14px + env(safe-area-inset-bottom)); }
.toast.at-top { top: calc(14px + env(safe-area-inset-top)); bottom: auto; transform: translate(-50%, -8px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
