/* Guest menu (/m/:slug): mobile-first, restaurant logo + accent, 3D sheet with AR. */
body.guest { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); background: var(--bg); }

.venue-head { position: relative; overflow: hidden; padding: calc(env(safe-area-inset-top) + 18px) 20px 30px; text-align: center; }
.venue-head .bg-grid { position: absolute; inset: 0; pointer-events: none; }
.venue-glow { position: absolute; left: 50%; top: -40%; width: 120%; height: 110%; transform: translateX(-50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 72%); pointer-events: none; }
.venue-head > *:not(.bg-grid):not(.venue-glow) { position: relative; }
.venue-top { display: flex; justify-content: space-between; align-items: center; max-width: 960px; margin: 0 auto; }
.venue-top .eyebrow { margin: 0; }
.venue-id { display: grid; justify-items: center; margin-top: 22px; }
.venue-logo { width: 76px; height: 76px; border-radius: 22px; background: var(--panel-2) center / contain no-repeat; border: 1px solid var(--line-2); box-shadow: var(--shadow-3); display: grid; place-items: center; font-weight: 700; font-size: 1.6rem; color: var(--accent); overflow: hidden; margin-bottom: 16px; }
.venue-logo.has-img { background-color: #fff; background-size: 82%; }
.venue-head h1 { font-size: clamp(2rem, 8vw, 3rem); margin: 0 0 8px; letter-spacing: -0.045em; }
.venue-head p { color: var(--muted); margin: 0 auto; max-width: 44ch; font-size: var(--t-base); }
.venue-head p:empty { display: none; }
.hint-3d { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 7px 13px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 9%, transparent); font-size: var(--t-xs); color: var(--fg); }
.hint-3d .i { color: var(--accent); }

.cat-tabs {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-width: none; scroll-behavior: smooth;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a { flex: none; height: 36px; display: inline-flex; align-items: center; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); text-decoration: none; font-size: var(--t-sm); font-weight: 500; transition: all 0.2s; }
.cat-tabs a.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
@media (min-width: 960px) { .cat-tabs { justify-content: center; } }

.menu-list { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.cat { scroll-margin-top: 64px; }
.cat h2 { display: flex; align-items: baseline; gap: 10px; font-size: var(--t-xl); letter-spacing: -0.035em; margin: 34px 2px 14px; }
.cat h2 .n { font: 500 0.6875rem var(--mono); color: var(--subtle); }
.items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

.item { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: inherit; font: inherit; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-1); transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s; -webkit-tap-highlight-color: transparent; }
.item:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.item:active { transform: scale(0.985); }
.item .pic { position: relative; aspect-ratio: 1 / 0.9; background: var(--stage); overflow: hidden; }
.item .pic img { width: 100%; height: 100%; object-fit: cover; }
.item .pic .b3d { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 0.625rem/1 var(--mono); letter-spacing: 0.06em; box-shadow: 0 6px 16px -6px var(--accent); }
.item .pic .b3d .i { width: 13px; height: 13px; stroke-width: 2.2; }
.item-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 13px 14px; flex: 1; }
.item .name { font-weight: 600; font-size: var(--t-sm); line-height: 1.3; letter-spacing: -0.01em; }
.item .desc { color: var(--muted); font-size: var(--t-xs); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.item .price { font-weight: 650; font-size: var(--t-sm); letter-spacing: -0.01em; }
.diets { display: inline-flex; gap: 4px; }
.diets .i { width: 15px; height: 15px; color: var(--good); }
.diets .i.spicy { color: var(--bad); }
.item.off { opacity: 0.55; }
.item .off-tag { position: absolute; right: 8px; top: 8px; z-index: 2; }
@media (min-width: 720px) { .item .name { font-size: var(--t-base); } .item-body { padding: 14px 16px 16px; } }

@media (max-width: 719px) {
  .item.media.wide { grid-column: 1 / -1; flex-direction: row; }
  .item.media.wide .pic { flex: none; width: 46%; aspect-ratio: 1; }
  .item.media.wide .item-body { padding: 14px; }
  .item.media.wide .desc { -webkit-line-clamp: 3; }
}

/* text-only products: a clean row spanning the grid */
.item.text { grid-column: 1 / -1; flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 16px; }
.item.text .item-body { padding: 0; }
.item.text .name { font-size: var(--t-base); }
.item.text .desc { -webkit-line-clamp: 2; font-size: var(--t-sm); }
.item.text .price { font-size: var(--t-base); white-space: nowrap; padding-top: 1px; }
.item.text .foot { margin: 0; padding: 0; }
.item.text .diets { margin-top: 6px; }
.text-dots { flex: 1; align-self: center; height: 1px; margin: 0 4px; background-image: linear-gradient(to right, var(--line-2) 40%, transparent 0); background-size: 6px 1px; min-width: 20px; display: none; }

.made { text-align: center; margin: 48px 0 0; }
.made a { display: inline-flex; align-items: center; gap: 8px; color: var(--subtle); text-decoration: none; font-size: var(--t-xs); padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; }
.made svg { width: 16px; height: 16px; }
.made a:hover { color: var(--fg); }

/* product sheet */
.sheet { width: 100%; max-width: 640px; margin: auto auto 0; border-radius: 26px 26px 0 0; border-bottom: 0; max-height: 96dvh; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet[open] { animation: rise 0.32s var(--ease); }
@media (min-width: 720px) { .sheet { margin: auto; border-radius: 26px; border-bottom: 1px solid var(--line-2); max-height: 92dvh; } }
.sheet .x-btn.floating { position: absolute; right: 14px; top: 14px; z-index: 6; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--panel) 70%, transparent); }
.sheet-stage { height: min(52dvh, 440px); border-bottom: 1px solid var(--line); }
.sheet-stage .label.tl { left: 20px; top: 20px; }
.sheet-stage .label.br { right: 20px; bottom: 16px; display: inline-flex; align-items: center; gap: 6px; }
.sheet-stage .model-slot model-viewer { opacity: 0; transition: opacity 0.5s var(--ease); }
.sheet-stage.model-ready .model-slot model-viewer { opacity: 1; }
.sheet-stage .poster-img { padding: 10%; }
.sheet-loader { position: absolute; left: 50%; bottom: 46px; width: 120px; transform: translateX(-50%); z-index: 3; }
.sheet-stage.model-ready .sheet-loader { display: none; }
.sheet-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 1px solid var(--line); }
.sheet-body { padding: 18px 20px calc(env(safe-area-inset-bottom) + 24px); }
.ar-cta { margin-bottom: 20px; }
.ar-cta .btn { box-shadow: 0 1px 0 rgb(255 255 255 / 0.35) inset, 0 14px 30px -12px var(--accent); }
.ar-note { margin: 8px 0 0; text-align: center; font-size: var(--t-xs); color: var(--subtle); }
.ar-note:empty { display: none; }
.ar-phone { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-2); }
.ar-phone .qr-box { flex: none; width: 108px; padding: 8px; border-radius: 10px; }
.ar-phone b { display: block; margin-bottom: 4px; }
.ar-phone p { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.sheet-title { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.sheet-title h2 { font-size: var(--t-2xl); margin: 0; letter-spacing: -0.04em; }
.sheet-price { font-size: var(--t-xl); font-weight: 650; letter-spacing: -0.03em; white-space: nowrap; }
.sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sheet-tags:empty { display: none; }
.sheet-desc { color: var(--muted); margin: 12px 0 0; }
.sheet-desc:empty { display: none; }
.sheet-block { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.sheet-block .eyebrow { margin-bottom: 8px; }
.sheet-block p { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.allergens { display: flex; flex-wrap: wrap; gap: 6px; }
.allergens span { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, transparent); font-size: var(--t-xs); font-weight: 500; }

.state { display: grid; justify-items: center; text-align: center; padding: 18vh 24px; }
.state .empty-art { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--accent); margin-bottom: 18px; }
.state h2 { font-size: var(--t-2xl); margin-bottom: 8px; }
.state p { color: var(--muted); max-width: 36ch; }

body.embed .venue-head { padding-top: 18px; }

/* ---------- ordering at the table ---------- */
.table-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-2)); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); font-weight: 600; font-size: var(--t-sm); letter-spacing: -0.01em; box-shadow: 0 8px 22px -12px var(--accent); }
.table-chip .i { color: var(--accent); }

.order-banner { display: flex; align-items: flex-start; gap: 12px; max-width: 928px; margin: 0 auto 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); font-size: var(--t-sm); }
@media (max-width: 960px) { .order-banner { margin: 0 16px 14px; } }
.order-banner > .i { flex: none; margin-top: 2px; }
.order-banner > span { display: grid; gap: 2px; }
.order-banner > span > span { color: var(--muted); font-size: var(--t-xs); }
.order-banner.on > .i { color: var(--accent); }
.order-banner.closed, .order-banner.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: color-mix(in srgb, var(--warn) 7%, var(--panel)); }
.order-banner.closed > .i, .order-banner.warn > .i { color: var(--warn); }

.add-btn { flex: none; margin-left: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px -8px var(--accent), 0 1px 0 rgb(255 255 255 / 0.3) inset; cursor: pointer; transition: transform 0.15s var(--ease); }
.add-btn .i { width: 17px; height: 17px; stroke-width: 2.4; }
.add-btn b { font-size: 0.8rem; font-weight: 700; }
.add-btn:active { transform: scale(0.9); }
.add-btn.has { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.item .foot .diets + .add-btn, .item .foot .price + .add-btn { margin-left: auto; }
.item.text .foot { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

.avail { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em; }
.avail .i { width: 12px; height: 12px; }
.avail.sold { color: var(--warn); }
.avail.later { color: var(--warn); }
.avail.until { color: var(--muted); font-weight: 500; }

/* product sheet: quantity + add, sticky at the bottom */
.sheet-order { position: sticky; bottom: 0; z-index: 4; display: grid; gap: 10px; padding: 12px 20px calc(env(safe-area-inset-bottom) + 14px); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(16px); }
.sheet-order-row { display: flex; gap: 10px; align-items: center; }
.sheet-order .add-to-cart { flex: 1; }
.sheet-reason { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 9%, var(--panel-2)); color: var(--warn); font-size: var(--t-sm); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; height: 48px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); }
.stepper button { width: 44px; height: 100%; display: grid; place-items: center; border: 0; background: none; color: var(--fg); cursor: pointer; }
.stepper button:disabled { opacity: 0.3; }
.stepper b { min-width: 26px; text-align: center; font-size: var(--t-base); }
.stepper.sm { height: 34px; border-radius: 10px; }
.stepper.sm button { width: 34px; }
.stepper.sm .i { width: 15px; height: 15px; }
.note-input { height: 40px; font-size: var(--t-sm); }
.note-input.sm { height: 34px; margin-top: 8px; }

/* bottom dock: order chip + cart bar */
.cart-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; gap: 8px; justify-items: center; padding: 0 14px calc(env(safe-area-inset-bottom) + 14px); pointer-events: none; }
.cart-dock > * { pointer-events: auto; }
body.has-dock { padding-bottom: calc(env(safe-area-inset-bottom) + 110px); }
body.has-dock .toasts { bottom: calc(env(safe-area-inset-bottom) + 96px); }
.cart-bar { width: min(560px, 100%); height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 18px 0 10px; border: 0; border-radius: 18px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font: 650 var(--t-base) var(--font); cursor: pointer; box-shadow: 0 18px 40px -14px var(--accent), 0 1px 0 rgb(255 255 255 / 0.35) inset; }
.cart-bar .cb-count { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgb(0 0 0 / 0.16); font-size: var(--t-base); }
.cart-bar .cb-label { flex: 1; text-align: left; }
.cart-bar .cb-total { font-variant-numeric: tabular-nums; }
.cart-bar.bump { animation: bump 0.4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.035); } }
.order-chip { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel-3) 92%, transparent); backdrop-filter: blur(14px); color: var(--fg); font: 500 var(--t-sm) var(--font); cursor: pointer; box-shadow: var(--shadow-3); }
.oc-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); animation: pulse 1.8s infinite; }
.order-chip.st-ready .oc-pulse, .order-chip.st-served .oc-pulse { background: var(--good); }
.order-chip.st-rejected .oc-pulse, .order-chip.st-cancelled .oc-pulse { background: var(--bad); animation: none; }

/* cart sheet */
.cart-sheet { padding: 0; }
.cart-sheet[open] { display: flex; flex-direction: column; }
.cart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 20px 14px; border-bottom: 1px solid var(--line); }
.cart-head .eyebrow { margin-bottom: 6px; color: var(--accent); }
.cart-head h2 { margin: 0; font-size: var(--t-2xl); letter-spacing: -0.04em; }
.cart-lines { padding: 6px 20px; overflow-y: auto; }
.cl { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cl:last-child { border-bottom: 0; }
.cl.blocked .cl-pic, .cl.blocked .cl-top b { opacity: 0.55; }
.cl-pic { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--stage) center / cover; display: grid; place-items: center; color: var(--subtle); }
.cl-main { min-width: 0; }
.cl-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cl-top b { font-weight: 600; font-size: var(--t-base); letter-spacing: -0.01em; }
.cl-top .mono { font-size: var(--t-sm); white-space: nowrap; }
.cl-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.cart-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 0; color: var(--subtle); text-align: center; }
.cart-foot { display: grid; gap: 12px; padding: 14px 20px calc(env(safe-area-inset-bottom) + 18px); border-top: 1px solid var(--line); background: var(--panel); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-md); }
.cart-total b { font-size: var(--t-2xl); letter-spacing: -0.04em; font-weight: 650; }
.pay-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; color: var(--muted); font-size: var(--t-sm); }
.pay-note .i { color: var(--accent); }
#send-order:disabled { opacity: 0.45; }

/* order status */
.status-sheet { padding: 0; }
.st-hero { display: grid; justify-items: center; text-align: center; padding: 38px 24px 18px; background: radial-gradient(90% 80% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.st-ring { position: relative; width: 92px; height: 92px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, var(--panel-2)); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); }
.st-ring::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); animation: spin 1.4s linear infinite; }
.st-ring .i { width: 38px; height: 38px; stroke-width: 1.6; }
.status-sheet[data-state="served"] .st-ring::after, .status-sheet[data-state="rejected"] .st-ring::after, .status-sheet[data-state="cancelled"] .st-ring::after { display: none; }
.status-sheet[data-state="ready"] .st-ring, .status-sheet[data-state="served"] .st-ring { color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--panel-2)); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.status-sheet[data-state="ready"] .st-ring::after { border-top-color: var(--good); }
.status-sheet[data-state="rejected"] .st-ring, .status-sheet[data-state="cancelled"] .st-ring { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel-2)); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.status-sheet[data-state="ready"] .st-hero, .status-sheet[data-state="served"] .st-hero { background: radial-gradient(90% 80% at 50% 0%, color-mix(in srgb, var(--good) 14%, transparent), transparent 70%); }
.st-hero .eyebrow { margin-bottom: 8px; }
.st-hero h2 { font-size: clamp(1.8rem, 7vw, 2.3rem); margin: 0 0 6px; letter-spacing: -0.045em; }
.st-hero p { color: var(--muted); margin: 0; max-width: 34ch; }
.st-steps { list-style: none; margin: 8px 20px 0; padding: 6px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.st-steps li { position: relative; display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; color: var(--subtle); font-size: var(--t-sm); }
.st-steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 34px; bottom: -8px; width: 2px; background: var(--line-2); }
.st-steps li.done:not(:last-child)::after { background: var(--accent); }
.st-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); background: var(--panel); z-index: 1; }
.st-dot .i { width: 13px; height: 13px; stroke-width: 3; }
.st-steps li.done { color: var(--fg); }
.st-steps li.done .st-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.st-steps li.cur .st-name { font-weight: 650; }
.st-steps li.cur .st-dot { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.st-steps li.bad .st-dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.st-summary { margin: 16px 20px 0; }
.st-summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--t-sm); }
.st-summary li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; }
.st-summary .q { color: var(--accent); }
.st-summary em { display: block; font-style: normal; color: var(--warn); font-size: var(--t-xs); }
.st-total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 10px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.st-total b { font-size: var(--t-xl); letter-spacing: -0.03em; }
.st-actions { display: flex; justify-content: space-between; gap: 10px; padding: 16px 20px calc(env(safe-area-inset-bottom) + 20px); }
.st-actions .btn-primary { margin-left: auto; }
