/* Public menu — mobile first, light/dark, no external fonts (fast on 3G). */
:root {
  --accent: #e8590c;
  --bg: #f7f5f2;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #6b645d;
  --line: #e7e2dc;
  --ok: #15803d;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 4px 16px rgba(28, 25, 23, .06);
  --fs: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210; --surface: #1f1c19; --text: #f3efe9; --muted: #a8a097; --line: #34302b;
    --ok: #4ade80; --bad: #f87171; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
html.qm-large { --fs: 19px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body.qm { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs)/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; padding-bottom: 96px; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
[hidden] { display: none !important; }
.qm-skip { position: absolute; left: -9999px; }
.qm-skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }

.qm-cover { height: 188px; background: center/cover no-repeat, var(--accent); position: relative; }
.qm-cover--plain { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); height: 128px; }
.qm-cover__tools { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; display: flex; gap: 8px; }
.qm-iconbtn { width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgba(0,0,0,.45); color: #fff; font-weight: 700; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }

.qm-wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.qm-profile { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: -40px; position: relative; padding: 48px 16px 16px; text-align: center; }
.qm-logo { position: absolute; top: -36px; left: 50%; transform: translateX(-50%); width: 72px; height: 72px; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); border: 3px solid var(--surface); }
.qm-logo img { width: 100%; height: 100%; object-fit: cover; }
.qm-logo span { display: grid; place-items: center; height: 100%; font-size: 30px; font-weight: 800; color: #fff; background: var(--accent); }
.qm-profile h1 { font-size: 1.4em; }
.qm-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin: 6px 0 0; color: var(--muted); font-size: .88em; }
.qm-open { font-weight: 600; }
.qm-open.is-open { color: var(--ok); }
.qm-open.is-closed { color: var(--bad); }
.qm-tagline { margin: 8px 0 0; color: var(--muted); }
.qm-table { margin: 12px auto 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 700; }
.qm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.qm-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: .9em; background: var(--surface); }

.qm-notice { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: .92em; }
.qm-state { background: var(--surface); border-radius: var(--radius); margin-top: 16px; padding: 24px 16px; text-align: center; }
.qm-state p { color: var(--muted); }

.qm-tabs { display: flex; gap: 4px; margin: 16px 0 8px; background: var(--surface); padding: 4px; border-radius: 12px; box-shadow: var(--shadow); }
.qm-tabs button { flex: 1; border: 0; background: none; padding: 10px 8px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
.qm-tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }

.qm-search input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 1em; color: var(--text); }
.qm-cats { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; background: var(--bg); scrollbar-width: none; }
.qm-cats::-webkit-scrollbar { display: none; }
.qm-cats a { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .88em; white-space: nowrap; }
.qm-cats a.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.qm-cat h2 { font-size: 1.1em; margin: 18px 0 8px; }
.qm-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.qm-item { display: flex; gap: 12px; padding: 14px; border-top: 1px solid var(--line); cursor: default; }
.qm-item:first-child { border-top: 0; }
.qm-item.is-orderable { cursor: pointer; }
.qm-item.is-orderable:active { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.qm-item__body { flex: 1; min-width: 0; }
.qm-item h3 { font-size: 1em; font-weight: 650; }
.qm-desc { margin: 4px 0 0; color: var(--muted); font-size: .88em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qm-price { margin: 6px 0 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.qm-price strong { color: var(--accent); }
.qm-price s { color: var(--muted); font-size: .85em; }
.qm-out { font-size: .78em; font-weight: 700; color: var(--bad); }
.qm-item.is-out { opacity: .55; }
.qm-item__img { position: relative; flex: 0 0 96px; }
.qm-item__img img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--line); }
.qm-ai { position: absolute; left: 4px; bottom: 4px; font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; }
.qm-add { position: absolute; right: -4px; bottom: -4px; width: 32px; height: 32px; border-radius: 999px; border: 2px solid var(--surface); background: var(--accent); color: #fff; font-size: 22px; line-height: 1; display: grid; place-items: center; }
.qm-add--inline { position: relative; right: auto; bottom: auto; margin-left: auto; flex: 0 0 auto; align-self: flex-end; }
.qm-qty-badge { position: absolute; left: -6px; top: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.qm-tags { margin: 4px 0 0; display: flex; gap: 4px; flex-wrap: wrap; }
.qm-tag { font-size: .72em; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.qm-tag--veg { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.qm-tag--spicy { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.qm-empty { text-align: center; color: var(--muted); padding: 24px 0; }

.qm-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-top: 16px; }
.qm-card h2 { font-size: 1.1em; margin-bottom: 10px; }
.qm-card h3 { font-size: 1em; margin: 14px 0 6px; }
.qm-about p:first-child { margin-top: 0; }
.qm-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.qm-dl dt { color: var(--muted); }
.qm-dl dd { margin: 0; word-break: break-word; }
.qm-hours { width: 100%; border-collapse: collapse; font-size: .92em; }
.qm-hours th, .qm-hours td { text-align: left; padding: 4px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.qm-hours th { color: var(--muted); width: 40%; }
.qm-muted { color: var(--muted); }
.qm-link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.qm-wifi p { margin: 4px 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.qm-vietqr { display: grid; gap: 12px; justify-items: center; text-align: left; }
.qm-vietqr .qm-dl { width: 100%; }
.qm-qrbox { width: 220px; max-width: 70vw; aspect-ratio: 1; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--line); }
.qm-qrbox img { width: 100%; height: 100%; image-rendering: pixelated; }
.qm-hint { font-size: .85em; color: var(--muted); margin: 0; }
.qm-wallet { margin: 16px 0 0; text-align: center; }
.qm-wallet img { width: 220px; max-width: 70vw; margin: 0 auto; border-radius: 12px; border: 1px solid var(--line); }
.qm-wallet figcaption { margin-top: 6px; color: var(--muted); font-size: .9em; }
.qm-footer { text-align: center; color: var(--muted); font-size: .85em; padding: 24px 0 8px; }
.qm-footer p { margin: 6px 0; }

.qm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; }
.qm-btn:disabled { opacity: .55; cursor: not-allowed; }
.qm-btn--ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.qm-btn--soft { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.qm-btn--block { width: 100%; }

.qm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.qm-bar__inner { max-width: 680px; margin: 0 auto; display: flex; gap: 8px; }
.qm-bar .qm-btn { flex: 1; min-height: 50px; }
.qm-bar .qm-btn--soft { flex: 0 0 auto; }
.qm-cartbtn { justify-content: space-between !important; }
.qm-cartbtn span:first-child { background: rgba(255,255,255,.22); border-radius: 8px; padding: 2px 8px; }

.qm-sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.qm-sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.qm-sheet__panel { position: relative; width: 100%; max-width: 680px; max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation: qm-up .18s ease-out; }
@keyframes qm-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qm-sheet__panel { animation: none; } }
.qm-sheet__close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--bg); font-size: 22px; cursor: pointer; }
.qm-sheet h2 { font-size: 1.2em; padding-right: 40px; }
.qm-sheet__img { max-width: none; width: calc(100% + 32px); margin: -20px -16px 14px; aspect-ratio: 16/10; object-fit: cover; border-radius: 20px 20px 0 0; }
.qm-group { margin-top: 16px; }
.qm-group__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.qm-group__head b { font-size: .95em; }
.qm-group__head small { color: var(--muted); }
.qm-req { color: var(--bad); font-weight: 600; }
.qm-opt { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.qm-opt input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.qm-opt span { flex: 1; }
.qm-opt em { font-style: normal; color: var(--muted); font-size: .9em; }
.qm-field { display: grid; gap: 6px; margin-top: 14px; }
.qm-field label { font-weight: 600; font-size: .92em; }
.qm-field input, .qm-field textarea, .qm-field select { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 10px 12px; font-size: 1em; font-family: inherit; }
.qm-row { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.qm-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; }
.qm-stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--accent); }
.qm-stepper output { min-width: 32px; text-align: center; font-weight: 700; }
.qm-lines { list-style: none; padding: 0; margin: 12px 0; }
.qm-lines li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.qm-lines .qm-lines__main { flex: 1; min-width: 0; }
.qm-lines small { display: block; color: var(--muted); }
.qm-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1em; margin: 12px 0; }
.qm-status { display: flex; gap: 6px; margin: 14px 0; }
.qm-status span { flex: 1; text-align: center; font-size: .78em; padding: 8px 4px; border-radius: 8px; background: var(--bg); color: var(--muted); }
.qm-status span.is-done { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-weight: 700; }
.qm-status span.is-now { background: var(--accent); color: #fff; font-weight: 700; }
.qm-bignum { font-size: 2.2em; font-weight: 800; color: var(--accent); text-align: center; margin: 4px 0; }
.qm-stars { display: flex; gap: 4px; }
.qm-stars button { border: 0; background: none; font-size: 30px; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; }
.qm-stars button.is-on { color: #f59e0b; }
.qm-review { padding: 12px 0; border-bottom: 1px solid var(--line); }
.qm-review:last-child { border-bottom: 0; }
.qm-review__head { display: flex; justify-content: space-between; gap: 8px; }
.qm-review p { margin: 6px 0 0; }
.qm-review__reply { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 6px; font-size: .92em; }
.qm-badge { font-size: .75em; color: var(--ok); font-weight: 600; }
.qm-toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .92em; max-width: 90vw; box-shadow: var(--shadow); }
.qm-error { color: var(--bad); font-weight: 600; margin: 10px 0 0; }
