/* Guest layout. Colours, fonts and radii come from /theme.css tokens only. Mobile-first. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
body.has-sheet { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-muted); }
.small { font-size: 14px; }
.boot { padding: 48px 20px; text-align: center; color: var(--text-muted); }

.menu, .status { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
.menu.has-bar { padding-bottom: 120px; }

/* header */
.top { padding: 22px 0 10px; }
.top__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 8vw, 42px); line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
.tagline { margin: 6px 0 0; color: var(--text-muted); font-size: 16px; }
.table-chip { display: inline-block; margin: 12px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: 15px; }
.lang { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; flex: none; background: var(--surface); }
.lang button { border: 0; background: transparent; min-width: 44px; min-height: 40px; font-weight: 600; font-size: 14px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--surface); }

/* notices */
.notice { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 15px; font-weight: 500; }
.notice svg { flex: none; margin-top: 1px; }
.notice--test { background: var(--accent-soft); color: var(--accent-hover); justify-content: center; font-weight: 700; letter-spacing: .02em; }
.alert { margin: 10px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.order-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--text); color: var(--surface); text-decoration: none; font-weight: 600; }
.order-banner__no { font-size: 22px; font-family: var(--font-display); }
.order-banner__go { margin-left: auto; text-decoration: underline; font-weight: 500; }

/* category nav */
.cats { position: sticky; top: 0; z-index: 5; margin: 6px -16px 0; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.cats__track { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; }
.cats__track::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 9px 16px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 15px; white-space: nowrap; }
.cats a.is-active { background: var(--text); color: var(--surface); border-color: var(--text); }

/* items */
.cat { scroll-margin-top: 72px; padding-top: 18px; }
.cat__title { font-family: var(--font-display); font-weight: 600; font-size: 28px; margin: 8px 0 12px; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.item { display: grid; grid-template-columns: 1fr; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item__photo { aspect-ratio: 2 / 1; background: var(--surface-2); }
.item__photo img { width: 100%; height: 100%; object-fit: cover; }
.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ph-ink); padding: 12px; text-align: center; }
.ph span { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.15; max-width: 90%; }
.ph--cup { background: var(--ph-cup); } .ph--egg { background: var(--ph-egg); } .ph--croissant { background: var(--ph-croissant); }
.ph--plate { background: var(--ph-plate); } .ph--glass { background: var(--ph-glass); } .ph--bowl { background: var(--ph-bowl); }
.ph--leaf { background: var(--ph-leaf); } .ph--cake { background: var(--ph-cake); } .ph--wine { background: var(--ph-wine); } .ph--star { background: var(--ph-star); }
.item__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.item__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.item__name { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; }
.item__price { margin: 0; font-weight: 700; font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item__desc { margin: 0; color: var(--text-muted); font-size: 16px; }
.item__codes { margin: 0; color: var(--text-muted); font-size: 13px; }
.item__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.item__foot:not(:has(.btn, .stepper, .badge)) { display: none; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 700; }
.badge--out { background: var(--surface-2); color: var(--text-muted); }
.item.is-soldout .item__photo, .item.is-soldout .item__name, .item.is-soldout .item__price, .item.is-soldout .item__desc { opacity: .55; filter: grayscale(.7); }

@media (min-width: 560px) {
  .item { grid-template-columns: 180px 1fr; }
  .item__photo { aspect-ratio: auto; min-height: 100%; }
  .ph span { font-size: 17px; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn--add { background: var(--accent); color: var(--accent-contrast); padding: 8px 18px; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; flex: none; }
.link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; color: var(--text); text-decoration: underline; cursor: pointer; font-weight: 600; min-height: 44px; }
.stepper { display: inline-flex; align-items: center; border-radius: 999px; background: var(--accent-soft); }
.stepper button { width: 48px; height: 48px; border: 0; border-radius: 999px; background: transparent; color: var(--accent-hover); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.stepper button:disabled { opacity: .4; }
.stepper output { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper--sm button { width: 44px; height: 44px; }

/* cart bar */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.cartbar__btn { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 688px; margin: 0 auto; min-height: 60px; padding: 8px 10px 8px 18px; border: 0; border-radius: 999px; background: var(--text); color: var(--surface); box-shadow: var(--shadow); cursor: pointer; font-weight: 700; }
.cartbar__count { display: inline-flex; align-items: center; gap: 8px; }
.cartbar__total { margin-left: auto; font-variant-numeric: tabular-nums; }
.cartbar__cta { background: var(--accent); color: var(--accent-contrast); padding: 10px 16px; border-radius: 999px; }

/* sheet */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(30, 20, 12, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 720px; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.sheet__head h2 { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.sheet__body { overflow-y: auto; padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); }
.lines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.line { background: var(--surface); border-radius: var(--radius-sm); padding: 12px; }
.line__main { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.line__name { margin: 0; font-weight: 700; }
.line__warn { margin: 0; color: var(--danger); font-weight: 700; font-size: 14px; }
.line.is-gone .line__name { text-decoration: line-through; }
.line p.muted { margin: 0; font-size: 15px; }
.line__note input, .field textarea { width: 100%; margin-top: 8px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.field { display: block; margin: 8px 0; font-weight: 600; }
.checkout__total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0; font-size: 20px; }
.checkout .btn--block { margin-top: 4px; min-height: 56px; font-size: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.legend { display: grid; grid-template-columns: 44px 1fr; gap: 6px 10px; margin: 0 0 12px; }
.legend dt { font-weight: 800; }
.legend dd { margin: 0; }

/* footer */
.foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.foot p { margin: 4px 0; }
.foot__links { display: flex; gap: 16px; }
.foot__links a { color: var(--text-muted); }
.foot__demo { font-weight: 700; }

/* status */
.status__top { display: flex; align-items: center; gap: 12px; padding: 16px 0 6px; }
.status__place { margin: 0; flex: 1; font-weight: 600; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket { margin: 12px 0; padding: 26px 20px 22px; text-align: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 8px solid var(--accent); }
.ticket.is-ready { border-top-color: var(--ok); background: var(--ok-soft); }
.ticket.is-bad { border-top-color: var(--text-muted); }
.ticket__label { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: 14px; font-weight: 700; color: var(--text-muted); }
.ticket__no { margin: 0; font-family: var(--font-display); font-size: clamp(96px, 34vw, 150px); line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.ticket__amount { margin: 8px 0; font-size: 44px; font-weight: 800; }
.ticket__status { margin: 8px 0 0; font-size: 24px; font-weight: 800; }
.ticket.is-ready .ticket__status { color: var(--ok); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 22px 0 0; padding: 0; font-size: 12px; color: var(--text-muted); }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.steps__dot { width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.steps li.done .steps__dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.current { color: var(--text); font-weight: 700; }
.steps li.current .steps__dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) { .steps li.current .steps__dot { animation: none; } html { scroll-behavior: auto; } }
.status__line { margin: 10px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 600; }
.status__keep { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; color: var(--text-muted); font-size: 15px; }
.status__keep svg { flex: none; }
.status__actions { display: grid; gap: 10px; margin: 14px 0; }
.summary { margin: 16px 0; background: var(--surface); border-radius: var(--radius-sm); padding: 4px 14px; }
.summary summary { cursor: pointer; padding: 12px 0; font-weight: 700; min-height: 44px; }
.summary ul { list-style: none; margin: 0 0 10px; padding: 0; }
.summary li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); }
.summary small { display: block; color: var(--text-muted); }
