/* 定食とおばんざい ミトリ堂（デモ）テーブル注文 */
/* 共通部品は ⑭（14-stampcard）のクラス名と CSS のまま。:root の色の値を design.md §1 に替え、行動ボタンの文字色（§1-2）を足した。新しい部品は §15-5 8 のクラス名 */
:root {
  --c-base: #F8F4EC;
  --c-surface: #FFFFFF;
  --c-soft: #EEEBDC;
  --c-new-bg: #F7ECEC;
  --c-main: #5B2433;
  --c-accent: #E3A53A;
  --c-accent-dark: #C98A1E;
  --c-on-accent: #2A1F1C;
  --c-text: #2A1F1C;
  --c-sub: #665650;
  --c-line: #E2D9CB;
  --c-good: #2E6B47;
  --c-good-bg: #E8F0EA;
  --c-off: #4E5257;
  --c-off-bg: #EDEDEA;
  --c-bad: #B3261E;
  --c-bad-bg: #FDEDEB;

  --font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
  --font-head: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", var(--font-body);

  --pad-x: 16px;
  --gap-block: 32px;
  --pad-card: 16px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(42, 31, 28, .06);
  --tabs-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-base);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  word-break: auto-phrase;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, dt { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--c-main); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--c-main); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad-x); }
.sub { font-size: 14px; color: var(--c-sub); line-height: 1.6; }
.sub--13 { font-size: 13px; }
.nw { white-space: nowrap; }
svg { flex: none; }
[tabindex="-1"]:focus { outline: none; }
[tabindex="-1"]:focus-visible { outline: 3px solid var(--c-main); }
.card, .panel, .guest-scene, .ticket, [id$="-h"] { scroll-margin-top: calc(var(--tabs-h) + 8px); }
.pc-only { display: none; }
.intro__lead, .intro__notes, .howto__list, .work-card p, .confirm__body, .notice { text-wrap: pretty; }

/* ---------- TENKA LAB バー（作品例・デモ 共通） ---------- */
.tl-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 40px; padding: 8px 16px; background: #1B2A41; color: #FFFFFF;
  font-family: var(--font-body); font-size: 13px; line-height: 1.5; letter-spacing: .04em;
}
.tl-bar__text { margin: 0; }
.tl-bar strong { font-weight: 700; }
.tl-bar__back {
  flex: none; position: relative; color: #FFFFFF; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}
.tl-bar__back:hover { color: #FFFFFF; text-decoration-thickness: 2px; }
.tl-bar__back::before { content: ""; position: absolute; inset: -15px -8px; }
.tl-bar__back::after { content: "→"; margin-left: 4px; }
.tl-bar__back:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
@media (min-width: 768px) { .tl-bar { padding: 8px 32px; } }

/* ---------- ヘッダー ---------- */
.site-header { padding: 16px 0; border-bottom: 1px solid var(--c-line); }
.brand {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--c-main);
}
.brand__name { font-family: var(--font-head); }
.brand__logo { flex: none; }
.brand__demo {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  background: var(--c-text); color: #fff; border-radius: 4px;
  font-family: var(--font-body); font-size: 12px; font-weight: 700; line-height: 1;
}
.brand__sub { margin-top: 4px; font-size: 14px; color: var(--c-sub); line-height: 1.6; }

main { padding-top: var(--gap-block); padding-bottom: var(--gap-block); }
main > * + * { margin-top: var(--gap-block); }

/* ---------- h1・リード・手順 ---------- */
.page-title { font-size: 22px; font-weight: 700; line-height: 1.4; color: var(--c-main); text-wrap: balance; }
.intro__lead { margin-top: 12px; }
.steps { display: grid; gap: 8px; margin-top: 24px; }
.step a {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 8px;
  color: var(--c-text); text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.5;
}
.step a:hover { border-color: var(--c-main); }
.step__label { word-break: keep-all; overflow-wrap: anywhere; }
.step__num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: var(--c-main); color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
}
.two-tabs { margin-top: 24px; }
.two-tabs__h { font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--c-text); }
.two-tabs__links { margin-top: 4px; }
.two-tabs__links .text-link { font-weight: 700; }
.two-tabs__links svg { flex: none; }
.intro__notes { margin-top: 16px; font-size: 14px; color: var(--c-sub); line-height: 1.6; }

/* ---------- カード ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line); border-top: 4px solid var(--c-main);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--pad-card); min-width: 0;
}
.card__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px;
  margin-bottom: 16px;
}
.card__head h2 { font-size: 18px; line-height: 1.4; color: var(--c-main); }
.card__link { margin-top: 24px; font-size: 14px; }

/* ---------- ボタン ---------- */
.btn-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 0 32px; border: 0; border-radius: 26px;
  background: var(--c-accent); color: #fff; font-size: 16px; font-weight: 700; line-height: 1.3; cursor: pointer;
}
.btn-main:hover, .btn-main:active { background: var(--c-accent-dark); }
/* §1-2 行動ボタンの文字は墨。山吹の面と背景の比が低いので、葡萄茶の枠と下の影で形を見せる */
.btn-main, .site-footer .btn { color: var(--c-on-accent); border: 2px solid var(--c-main); box-shadow: 0 2px 0 var(--c-main); }
.btn-sub {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 20px; border: 2px solid var(--c-main); border-radius: 24px;
  background: var(--c-surface); color: var(--c-main); font-size: 15px; font-weight: 700; line-height: 1.3; cursor: pointer;
}
.btn-sub:hover { background: var(--c-soft); }
[aria-disabled="true"].btn-main, [aria-disabled="true"].btn-sub {
  background: var(--c-off-bg); color: var(--c-off); border-color: var(--c-off); box-shadow: none; cursor: not-allowed;
}
.btn-sm {
  position: relative; min-height: 40px; padding: 0 14px; border-width: 1.5px; border-radius: 20px;
  font-size: 14px; gap: 2px; white-space: nowrap;
}
.btn-sm::before { content: ""; position: absolute; inset: -5px -2px; }
.btn-danger { border-color: var(--c-bad); color: var(--c-bad); }
.btn-danger:hover { background: var(--c-bad-bg); }
[aria-disabled="true"].btn-danger { border-color: var(--c-off-bg); }
.text-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px;
  color: var(--c-main); font-size: 15px; text-decoration: underline; text-underline-offset: 3px;
}
.text-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 48px; padding: 0 8px;
  border: 0; background: none; color: var(--c-main); font-size: 15px; font-weight: 700; line-height: 1.3;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap;
}
.dot-list li { position: relative; padding-left: 1em; }
.dot-list li::before { content: "・"; position: absolute; left: 0; }

/* ---------- 上の数字（.summary） ---------- */
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.summary__box {
  min-width: 0; min-height: 96px; padding: 12px 16px; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: 12px; display: flex; flex-direction: column;
}
.summary__box.is-on { box-shadow: inset 4px 0 0 var(--c-main); }
.summary__label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--c-sub); }
.summary__val { margin-top: 4px; line-height: 1.2; }
.summary__n { font-size: 28px; font-weight: 700; }
.summary__unit { margin-left: 4px; font-size: 15px; font-weight: 700; }
.summary__note { margin-top: auto; padding-top: 4px; font-size: 15px; font-weight: 700; line-height: 1.4; }

/* ---------- タブ ---------- */
.tabs {
  position: sticky; top: 0; z-index: 20; display: flex; gap: 4px;
  background: var(--c-base); border-bottom: 1px solid var(--c-line);
}
.tabs__tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap;
  min-height: 52px; padding: 4px 6px; border: 0; border-radius: 8px 8px 0 0; background: transparent;
  color: var(--c-sub); font-size: 14px; font-weight: 700; line-height: 1.3; text-align: center; cursor: pointer;
  box-shadow: inset 0 -4px 0 transparent;
}
.tabs__tab:hover { background: var(--c-soft); }
.tabs__tab[aria-selected="true"] { color: var(--c-main); background: var(--c-surface); box-shadow: inset 0 -4px 0 var(--c-main); }
.tabs__tab:focus-visible { outline-offset: -3px; }
.tabs__badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--c-main); color: #FFFFFF; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
}
.panel { padding-top: 24px; }
.panel > * + * { margin-top: 24px; }

/* ---------- 状態の札（§1-3） ---------- */
.state-tag {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px;
  font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: middle; border-radius: 4px;
  font-family: var(--font-body);
}
.state-tag--new { background: var(--c-main); color: #FFFFFF; }
.state-tag--cooking { background: #FFFFFF; color: var(--c-main); border: 1.5px dashed var(--c-main); border-radius: 12px; }
.state-tag--served { background: var(--c-good-bg); color: var(--c-good); }
.state-tag--soldout { background: var(--c-off-bg); color: var(--c-off); border: 1.5px dotted var(--c-off); }
.state-tag--late { background: #FFFFFF; color: var(--c-text); border: 1px solid var(--c-text); border-radius: 12px; }
.state-tag--new :focus-visible { outline-color: #FFFFFF; }

/* ---------- 案内の文（上限・品切れ） ---------- */
.notice { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--c-text); }
.notice svg { margin-top: 2px; color: var(--c-main); }

/* ---------- お客様の画面（§6） ---------- */
.guest-frame { min-width: 0; }
.g-demo { font-size: 13px; color: var(--c-sub); line-height: 1.5; }
.g-shop { margin-top: 4px; font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--c-main); }
.guest-scene { margin-top: 16px; }
.guest-scene > * + * { margin-top: 12px; }
.g-h { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--c-main); }
.g-sub { font-size: 16px; font-weight: 700; line-height: 1.5; }
.g-wide { width: 100%; }
.g-none { font-size: 16px; color: var(--c-sub); line-height: 1.6; }
.g-note { margin-top: 12px; }

.table-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.table-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
  height: 96px; padding: 0; border: 2px solid var(--c-main); border-radius: 12px; background: #FFFFFF; color: var(--c-main); cursor: pointer;
}
.table-btn:hover, .table-btn:focus-visible { background: var(--c-soft); }
.table-btn__n { font-size: 16px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.table-btn__d { font-size: 32px; }
.table-btn__s { font-size: 13px; color: var(--c-sub); line-height: 1.2; }

.g-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.g-head .text-btn { flex: none; }
.g-hist-btn { width: 100%; }

.cat-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.cat-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 48px; padding: 4px 8px;
  border: 0; border-radius: 8px; background: var(--c-soft); color: var(--c-main); font-size: 15px; font-weight: 700; line-height: 1.3; cursor: pointer;
}
.cat-tab[aria-selected="true"] { background: var(--c-main); color: #FFFFFF; }
.cat-tab[aria-selected="true"]:focus-visible { outline-color: var(--c-main); }
.cat-tab__n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: #FFFFFF; color: var(--c-main); font-size: 13px; font-weight: 700; line-height: 1; border: 1px solid var(--c-main);
}
.cat-panel { margin-top: 20px; }
.cat-panel__h { font-family: var(--font-head); font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--c-main); }
.cat-panel__note { margin-top: 2px; }
.dishes { margin-top: 12px; }
.dishes > * + * { margin-top: 12px; }

.dish { padding: 12px; background: #FFFFFF; border: 1px solid var(--c-line); border-radius: 12px; min-width: 0; }
.dish__top { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.dish__art {
  position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 12px; color: var(--c-main);
}
.dish__art[data-cat="t"] { background: #E6D3AE; }
.dish__art[data-cat="k"] { background: #C9D5AC; }
.dish__art[data-cat="g"] { background: #E8C3B4; }
.dish__art[data-cat="d"] { background: #C6CEDB; }
.dish.is-soldout .dish__art { background: var(--c-off-bg); color: var(--c-off); }
.dish__ban { position: absolute; top: -4px; right: -4px; background: #FFFFFF; border-radius: 50%; color: var(--c-off); }
.dish__body { min-width: 0; }
.dish__name { font-size: 17px; font-weight: 700; line-height: 1.4; }
.dish__name .state-tag { margin-left: 6px; }
.dish__note { margin-top: 2px; font-size: 14px; color: var(--c-sub); line-height: 1.6; }
.dish__off { margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--c-off); line-height: 1.5; }
.dish__price { font-size: 18px; font-weight: 700; line-height: 1.2; white-space: nowrap; padding-top: 2px; }
.dish__price small, .yen-u { font-size: 15px; font-weight: 700; }
.dish .qty:first-of-type { margin-top: 8px; }
.qty { display: grid; grid-template-columns: minmax(0, 1fr) 48px 40px 48px; gap: 4px; align-items: center; min-height: 48px; }
.qty + .qty { margin-top: 4px; }
.qty__label { font-size: 15px; font-weight: 700; line-height: 1.3; }
.qty__sub { display: block; font-size: 13px; font-weight: 400; color: var(--c-sub); }
.qty__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0;
  border: 2px solid var(--c-main); border-radius: 24px; background: #FFFFFF; color: var(--c-main); cursor: pointer;
}
.qty__btn:hover { background: var(--c-soft); }
.qty__btn[aria-disabled="true"] { border-color: var(--c-off); background: var(--c-off-bg); color: var(--c-off); cursor: not-allowed; }
.qty__num { display: block; text-align: center; font-size: 20px; font-weight: 700; line-height: 1; }

.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: calc(72px + env(safe-area-inset-bottom)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #FFFFFF; border-top: 1px solid var(--c-line); box-shadow: 0 -2px 8px rgba(42, 31, 28, .08);
}
.cartbar__sum { min-width: 0; line-height: 1.2; }
.cartbar__n { font-size: 15px; font-weight: 700; }
.cartbar__total { font-size: 22px; font-weight: 700; white-space: nowrap; }
.cartbar__tax { font-size: 13px; font-weight: 400; color: var(--c-sub); }
.cartbar__empty { font-size: 15px; color: var(--c-sub); line-height: 1.4; }
.cartbar__go { flex: none; width: 160px; padding: 0 12px; white-space: nowrap; gap: 6px; }
body.has-cartbar { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
body.has-cartbar .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

.cart-list { margin-top: 16px; border-top: 1px solid var(--c-line); }
.cart-row { padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.cart-row.is-soldout { padding: 12px 8px; background: var(--c-off-bg); }
.cart-row__name { font-size: 17px; font-weight: 700; line-height: 1.4; }
.cart-row__name .state-tag { margin-left: 6px; }
.cart-row__r2 { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; gap: 8px; align-items: center; margin-top: 4px; }
.cart-row__unit { font-size: 14px; color: var(--c-sub); line-height: 1.4; }
.cart-row__qty { display: grid; grid-template-columns: 48px 32px 48px; gap: 2px; align-items: center; }
.cart-row__sub { font-size: 16px; font-weight: 700; text-align: right; white-space: nowrap; }
.cart-row__off { font-size: 14px; font-weight: 700; color: var(--c-off); line-height: 1.4; text-align: right; }
.cart-row.is-soldout .cart-row__r2 { grid-template-columns: minmax(0, 1fr) auto; }

.total-box { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-top: 16px; padding: 16px; background: var(--c-soft); border-radius: 8px; }
.total-box__l { font-size: 16px; font-weight: 700; line-height: 1.4; }
.total-box__v { font-size: 28px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.total-box__tax { font-size: 13px; font-weight: 400; color: var(--c-sub); }
.total-box__s { flex-basis: 100%; font-size: 13px; color: var(--c-sub); line-height: 1.5; }
.btn-order { margin-top: 16px; min-height: 64px; border-radius: 32px; font-size: 18px; }

.g-done { margin-top: 0; padding: 16px; border-radius: 8px; }
.g-done__t { display: flex; align-items: center; gap: 8px; color: var(--c-good); }
.g-done__t h2 { font-family: var(--font-head); font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--c-text); }
.g-done__no { margin-top: 8px; font-size: 28px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; }
.g-done__table { margin-top: 4px; font-size: 16px; font-weight: 700; line-height: 1.5; }
.done-list { margin-top: 16px; }
.done-list li, .done-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; font-size: 16px; line-height: 1.5; border-bottom: 1px solid var(--c-line); }
.done-list li > :last-child { flex: none; font-weight: 700; white-space: nowrap; }
.done-total { border-bottom: 0; font-size: 18px; font-weight: 700; }

.history > li + li { margin-top: 8px; }
.h-order { padding: 12px 16px; background: #FFFFFF; border: 1px solid var(--c-line); border-radius: 12px; }
.h-order__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.h-order__no { font-size: 16px; font-weight: 700; line-height: 1.5; }
.h-order__at { margin-left: auto; font-size: 13px; color: var(--c-sub); }
.h-order__items { margin-top: 6px; }
.h-order__items li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; font-size: 15px; line-height: 1.5; }
.h-order__items li > :last-child { flex: none; font-weight: 700; white-space: nowrap; }
.h-order__items .state-tag { margin-left: 6px; }

.demo-howto { margin-top: 24px; padding: 16px; background: var(--c-soft); border-radius: 12px; }
.demo-howto h3 { font-size: 16px; font-weight: 700; color: var(--c-main); line-height: 1.5; }
.howto__list { margin-top: 8px; font-size: 15px; line-height: 1.7; }
.howto__list li { position: relative; padding-left: 16px; }
.howto__list li + li { margin-top: 4px; }
.howto__list li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--c-main); }
.demo-howto .two-tabs__links { margin-top: 8px; }
.howto__note { margin-top: 8px; }

/* ---------- 厨房・ホールの画面（§8） ---------- */
.k-note { font-size: 14px; color: var(--c-sub); line-height: 1.6; }
.panel > .k-note + .summary { margin-top: 12px; }
.new-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px;
  background: var(--c-new-bg); box-shadow: inset 4px 0 0 var(--c-main); border-radius: 8px;
}
.new-banner.is-in { animation: fade-in 200ms ease-out both; }
.new-banner__bell { color: var(--c-main); }
.new-banner__t { flex: 1 1 200px; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
.new-banner__ops { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.kitchen__left > * + *, .kitchen__side > * + * { margin-top: 24px; }
.kitchen__side { margin-top: 24px; }
.k-none { font-size: 16px; color: var(--c-sub); line-height: 1.6; }
.k-lead { margin: -8px 0 12px; }
.tickets > * + * { margin-top: 16px; }
.ticket {
  padding: 16px; background: #FFFFFF; border: 1px solid var(--c-line); border-radius: 12px;
  box-shadow: inset 6px 0 0 var(--c-sub); padding-left: 22px;
}
.ticket[data-state="new"] { background: var(--c-new-bg); box-shadow: inset 6px 0 0 var(--c-main); }
.ticket.is-in { animation: fade-in 200ms ease-out both; }
.ticket__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ticket__table { font-size: 24px; font-weight: 700; line-height: 1.2; color: var(--c-main); white-space: nowrap; }
.ticket__no { margin-left: auto; font-size: 15px; font-weight: 700; white-space: nowrap; }
.ticket__time { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 14px; color: var(--c-sub); line-height: 1.4; }
.ticket__el { font-size: 15px; font-weight: 700; color: var(--c-text); }
.ticket__items { margin-top: 12px; border-top: 1px solid var(--c-line); }
.ticket__item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name qty" "op op"; gap: 4px 12px; align-items: center;
  min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--c-line);
}
.ticket__name { grid-area: name; font-size: 18px; font-weight: 700; line-height: 1.4; }
.ticket__name .state-tag { margin-left: 6px; }
.ticket__qty { grid-area: qty; font-size: 20px; font-weight: 700; white-space: nowrap; }
.ticket__op { grid-area: op; justify-self: end; }
.ticket__item.is-served .ticket__name, .ticket__item.is-served .ticket__qty { color: var(--c-sub); }
.ticket__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.ticket__foot .btn-main { width: auto; flex: 1 1 220px; }
.ticket__sum { font-size: 14px; line-height: 1.4; white-space: nowrap; }
.ticket__sum strong { font-size: 16px; }

.served-list { background: #FFFFFF; border: 1px solid var(--c-line); border-radius: 12px; }
.served-list > summary {
  display: flex; align-items: center; min-height: 56px; padding: 0 16px; font-size: 16px; font-weight: 700; line-height: 1.4; cursor: pointer; color: var(--c-main);
}
.served-list > summary::before { content: ""; flex: none; width: 0; height: 0; margin-right: 10px; border-left: 7px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.served-list[open] > summary::before { transform: rotate(90deg); }
.served-list__ul { padding: 0 16px 8px; }
.served-row { padding: 12px 0; border-top: 1px solid var(--c-line); }
.served-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 15px; line-height: 1.5; }
.served-row__head strong { font-weight: 700; }
.served-row__sum { margin-left: auto; font-weight: 700; white-space: nowrap; }
.served-row__items li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; line-height: 1.4; }
.served-row__none { font-size: 14px; color: var(--c-sub); }

.table-sum { display: none; width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.table-sum .c-t { width: 72px; }
.table-sum .c-n { width: 56px; }
.table-sum .c-w { width: 72px; }
.table-sum .c-op { width: 112px; }
.table-sum thead th { height: 48px; padding: 4px 8px; background: var(--c-soft); color: var(--c-sub); font-size: 13px; font-weight: 700; line-height: 1.3; text-align: left; white-space: nowrap; }
.table-sum th[scope="row"], .table-sum td { height: 56px; padding: 4px 8px; border-bottom: 1px solid var(--c-line); font-size: 15px; line-height: 1.4; text-align: left; vertical-align: middle; white-space: nowrap; }
.table-sum th[scope="row"] { font-size: 16px; font-weight: 700; }
.table-sum .num { text-align: right; }
.table-sum td.num { font-size: 16px; font-weight: 700; }
.table-sum .op { text-align: center; }
.table-cards > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.table-cards__r1 { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 16px; line-height: 1.5; }
.table-cards__r1 strong { font-weight: 700; }
.table-cards__r2 { font-size: 14px; color: var(--c-sub); }
.closed-line { margin-top: 16px; font-size: 14px; font-weight: 700; line-height: 1.6; }

.soldout-list h3 { margin-top: 16px; font-size: 15px; font-weight: 700; line-height: 1.5; }
.soldout-list h3:first-child { margin-top: 0; }
.soldout-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 4px 0; border-bottom: 1px solid var(--c-line); }
.soldout-row__name { min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.4; }
.soldout-row__name .state-tag { margin-left: 6px; }

/* ---------- 見本に戻す ---------- */
.reset-btn { width: 100%; }

/* ---------- 実際のお仕事では ---------- */
.work-boxes { display: grid; gap: 16px; margin-top: 24px; }
.work-box { padding: 20px; background: var(--c-base); border: 1px solid var(--c-line); border-radius: 8px; }
.work-box svg { color: var(--c-main); }
.work-box h3 { margin-top: 8px; font-size: 16px; line-height: 1.5; }
.work-box .dot-list { margin-top: 8px; font-size: 15px; line-height: 1.7; }
.work-safe { margin-top: 16px; font-size: 15px; line-height: 1.7; }

/* ---------- 確認の窓 ---------- */
.confirm {
  width: min(480px, calc(100% - 32px)); max-width: none; padding: 24px; border: 0; border-top: 4px solid var(--c-main);
  border-radius: 12px; background: #FFFFFF; color: var(--c-text);
}
.confirm::backdrop { background: rgba(42, 31, 28, .5); }
.confirm__title { font-size: 18px; font-weight: 700; color: var(--c-main); line-height: 1.4; }
.confirm__body { margin-top: 12px; font-size: 15px; line-height: 1.7; }
.confirm__ops { display: grid; gap: 8px; margin-top: 24px; }
.confirm__cancel {
  min-height: 48px; padding: 0 16px; border: 0; background: none; color: var(--c-main);
  font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ---------- 知らせ ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(480px, calc(100% - 32px));
  padding: 12px 16px; background: var(--c-text); color: #fff; border-radius: 8px; font-size: 15px; line-height: 1.5;
}
.toast.is-in { animation: toast-in 200ms ease-out both; }
@keyframes toast-in { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--c-text); color: var(--c-base); font-size: 15px; line-height: 1.8;
  padding: 48px 16px; text-align: center;
}
.site-footer p + p { margin-top: 16px; }
.site-footer :focus-visible { outline-color: #FFFFFF; }
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; max-width: 100%; min-height: 52px;
  margin: 0 auto; border-radius: 26px; background: var(--c-accent); color: #fff;
  font-size: 16px; font-weight: 700; text-decoration: none;
}
.btn:hover, .btn:active { background: var(--c-accent-dark); }
.copy { font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .toast.is-in, .new-banner.is-in, .ticket.is-in { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 〜399px：カートのボタンを少し狭く ---------- */
@media (max-width: 399px) {
  .cartbar__go { width: 148px; padding: 0 8px; }
}
/* 〜374px：品名（最長 ノンアルコールビール 10字）を1行に収めるため、品の札の列の間を 12px → 8px（impl_note 参照） */
@media (max-width: 374px) {
  .dish__top { column-gap: 8px; }
}

/* ---------- 768px 以上 ---------- */
@media (min-width: 768px) {
  :root { --pad-x: 32px; --gap-block: 48px; --pad-card: 24px; }
  .sp-only { display: none; }
  .pc-only { display: inline; }
  .site-header { padding: 24px 0; }
  .brand { font-size: 22px; }
  .page-title { font-size: 28px; }
  .card__head h2 { font-size: 20px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 12px 24px; }
  .step a { min-height: 56px; }
  .intro__lead, .intro__notes { max-width: 40em; }
  .summary { gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary__box { padding: 16px 20px; }
  .summary__label { font-size: 14px; }
  .summary__n { font-size: 32px; }
  .tabs { justify-content: flex-start; }
  .tabs__tab { flex: none; padding: 0 16px; font-size: 16px; flex-wrap: nowrap; gap: 6px; }

  .guest-frame {
    max-width: 420px; margin: 0 auto; padding: 16px; background: #FFFFFF;
    border: 1px solid var(--c-line); border-radius: 20px; box-shadow: 0 2px 8px rgba(42, 31, 28, .08);
  }
  .demo-howto { max-width: 420px; margin-left: auto; margin-right: auto; }
  .g-h { font-size: 24px; }
  .cat-panel__h { font-size: 20px; }
  .cartbar {
    position: sticky; left: auto; right: auto; bottom: 16px; margin-top: 16px; min-height: 72px; padding: 12px 16px;
    border: 1px solid var(--c-line); border-radius: 12px;
  }
  body.has-cartbar { padding-bottom: 0; }
  body.has-cartbar .toast { bottom: 24px; }
  .total-box__v { font-size: 32px; }
  .g-done__no { font-size: 32px; }

  .ticket { padding: 20px 20px 20px 26px; }
  .ticket__table { font-size: 28px; }
  .ticket__item { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name qty op"; }
  .table-sum { display: table; }
  .table-cards { display: none; }

  .reset-btn { width: 240px; }
  .confirm__ops { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
  .work-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .btn { width: 280px; }
}

/* ---------- 1024px 以上 ---------- */
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .step { position: relative; }
  .step + .step::before {
    content: ""; position: absolute; left: -20px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 4l4 4-4 4' fill='none' stroke='%23665650' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
  }
  .guest-wrap { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 48px; align-items: start; }
  .guest-frame { margin: 0; }
  .demo-howto { margin: 0; max-width: none; position: sticky; top: calc(var(--tabs-h) + 16px); padding: 24px; }

  .kitchen__main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
  .kitchen__side { margin-top: 0; }
  /* 右の列 360px（内側 約310px）に5列を入れるため、列の幅と内側を詰める（impl_note 参照） */
  .table-sum .c-t { width: 60px; }
  .table-sum .c-n { width: 44px; }
  .table-sum .c-w { width: 52px; }
  .table-sum .c-op { width: 84px; }
  .table-sum thead th { padding: 4px; font-size: 12px; }
  .table-sum th[scope="row"], .table-sum td { padding: 4px; }
  .table-sum td.op .btn-sm { padding: 0 10px; }
}
