:root {
  --bg: #faf7f3;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --surface-3: #e8e0d3;
  --text: #1c1712;
  --text-dim: #6b6255;
  --text-faint: #9a9182;
  --border: rgba(28, 23, 18, 0.09);
  --accent: #ff2f7e;
  --accent-ink: #fff7fb;
  --success: #1fa672;
  --danger: #e0344c;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }
[hidden] { display: none !important; }

#app { min-height: 100%; display: flex; flex-direction: column; }

/* ---------- loading / errors ---------- */

.loading-screen, .error-screen {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 24px;
  color: var(--text-dim);
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- initial splash: non-skippable, one single animation timeline ---------- */

.splash-screen {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.45s ease, filter 0.45s ease;
}
.splash-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 42%, rgba(255, 47, 126, 0.10), transparent 70%),
    radial-gradient(80% 60% at 50% 100%, rgba(255, 208, 130, 0.16), transparent 70%);
  filter: blur(30px);
}
/* The logo is the animated SVG itself (a signature-style reveal baked into
   the file) — it draws itself in, so nothing here fades, blurs or scales
   it on top of that; a static image being CSS-animated is exactly what
   this replaced. It only appears once fully preloaded (see splashRing
   below), so its own animation plays smoothly rather than stuttering
   through a still-in-progress download/decode. */
.splash-logo { position: relative; width: min(88vw, 460px); }
.splash-ring { position: relative; width: 56px; height: 56px; animation: splashRingSpin 0.9s linear infinite; }
.splash-ring circle {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 80 200; opacity: 0.85;
}
@keyframes splashRingSpin { to { transform: rotate(360deg); } }
.splash-screen.hide { opacity: 0; filter: blur(10px); pointer-events: none; }

.no-table-card {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 24px; text-align: center; gap: 18px;
}
.no-table-card .brand-mark { width: 220px; height: auto; }
.no-table-card h1 { font-family: var(--font-display); font-size: 1.7rem; margin: 0; }
.no-table-card p { color: var(--text-dim); margin: 0; max-width: 32ch; }
.no-table-card .scan-btn {
  display: inline-flex; align-items: center; gap: 10px; border: none; background: var(--accent);
  color: var(--accent-ink); font-weight: 700; font-size: 0.95rem; padding: 14px 24px; border-radius: 999px;
  cursor: pointer; margin-top: 6px;
}
.no-table-card .scan-btn svg { width: 20px; height: 20px; flex: none; }
.no-table-card .scan-error { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; }
.no-table-card form { display: flex; gap: 8px; margin-top: 8px; }
.no-table-card input {
  width: 90px; text-align: center; font-size: 1.1rem; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.no-table-card button.primary { padding: 12px 20px; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 18px; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; }
.brand img.logo { height: 78px; width: auto; max-width: 100%; flex: none; }
.table-pill {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  flex: none; display: flex; align-items: baseline; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 13px; font-size: 0.74rem; color: var(--text-dim);
}
.table-pill b { color: var(--text); font-size: 0.9rem; font-variant-numeric: tabular-nums; }

.topbar-back-btn {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.topbar-back-btn svg { width: 18px; height: 18px; }

/* A full-width row of its own (rather than overlapping the centered logo)
   so it can never cover the branding, however long the text gets. */
.pending-orders-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent); font-size: 0.78rem; font-weight: 700; padding: 9px 18px; cursor: pointer;
}
.pending-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none;
  animation: pendingPulse 1.6s ease-in-out infinite;
}
@keyframes pendingPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- hours countdown banner ---------- */

.hours-banner {
  text-align: center; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 8px 18px; color: var(--accent-ink); background: var(--accent);
  font-variant-numeric: tabular-nums;
}
.hours-banner.urgent { background: var(--danger); color: #fff; }

/* ---------- careers ---------- */

.careers-footer { text-align: center; padding: 28px 0 12px; }
.careers-footer button {
  background: none; border: none; color: var(--text-faint); font-size: 0.78rem;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px;
}
.careers-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.careers-position {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; text-align: left; transition: border-color 0.15s;
}
.careers-position:active { border-color: var(--accent); }
.careers-position .title { font-weight: 700; }
.careers-position .vacancies {
  flex: none; font-size: 0.74rem; font-weight: 700; color: var(--text-dim);
  background: var(--surface-2); border-radius: 999px; padding: 4px 10px;
}

.pending-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.pending-order-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; text-align: left; transition: border-color 0.15s;
}
.pending-order-row:active { border-color: var(--accent); }
.pending-order-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pending-order-title { font-weight: 700; }
.pending-order-sub { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.pending-order-chevron { flex: none; font-size: 1.3rem; color: var(--text-faint); }

/* ---------- category nav ---------- */

.cat-nav {
  /* top is set inline by JS to the topbar's real measured height, so it
     always sits flush underneath it with no gap — this value is just a
     harmless fallback for the instant before that runs. */
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 98px); z-index: 19;
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}
.cat-chip:active { transform: scale(0.94); }
.cat-chip.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* ---------- menu ---------- */

.menu { flex: 1; padding: 4px 18px 140px; }
.category-section { padding-top: 22px; scroll-margin-top: 180px; }
.category-section h2 { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 12px; font-weight: 600; }

.item-card {
  display: flex; gap: 14px; padding: 14px; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  opacity: 0; transform: translateY(12px);
  animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
.item-card.unavailable { opacity: 0.55; animation: none; filter: grayscale(0.4); }
.item-thumb {
  flex: none; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden;
  background: linear-gradient(145deg, var(--surface-2), var(--surface-3));
  display: flex; align-items: center; justify-content: center;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-thumb svg { width: 30px; height: 30px; color: var(--text-faint); }

.item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item-info .name-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.item-info .name { font-weight: 700; font-size: 0.98rem; }
.item-info .price { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); white-space: nowrap; }
.item-info .desc { font-size: 0.83rem; color: var(--text-dim); line-height: 1.35; }
.item-info .sold-out-tag {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  padding: 3px 9px; border-radius: 999px; margin-top: 2px;
}

.item-controls { display: flex; align-items: center; justify-content: flex-end; margin-top: 4px; }
.add-btn {
  border: none; background: var(--accent); color: var(--accent-ink); font-weight: 700;
  padding: 7px 16px; border-radius: 999px; font-size: 0.83rem; cursor: pointer;
  transition: transform 0.12s;
}
.add-btn:active { transform: scale(0.9); }
.stepper {
  display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 999px; padding: 4px 6px;
  animation: stepperIn 0.25s cubic-bezier(0.3, 0.9, 0.3, 1.3);
}
@keyframes stepperIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.stepper button {
  width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--surface-3); color: var(--text);
  font-size: 1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s;
}
.stepper button:active { transform: scale(0.85); }
.stepper .qty { min-width: 16px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; display: inline-block; animation: qtyPop 0.2s ease; }
@keyframes qtyPop { from { transform: scale(1.35); } to { transform: scale(1); } }

.fly-dot {
  position: fixed; z-index: 100; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ---------- cart bar ---------- */

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 12px 18px calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: transparent;
  display: flex; justify-content: center;
  pointer-events: none;
}
.cart-bar button {
  pointer-events: auto;
  width: 100%; max-width: 480px; border: none; border-radius: var(--radius-md);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.95rem;
  padding: 15px 18px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4); cursor: pointer;
}
.cart-bar .count { background: rgba(0,0,0,0.15); border-radius: 999px; padding: 2px 9px; font-size: 0.78rem; margin-right: 8px; }
.cart-bar .total { font-variant-numeric: tabular-nums; }
.cart-bar button { animation: cartIn 0.3s cubic-bezier(0.3, 0.9, 0.3, 1.25); }
@keyframes cartIn { from { opacity: 0; transform: translateY(16px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.cart-bar.bump button { animation: bump 0.32s ease; }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* ---------- full-page cart / confirm screens ---------- */

.page-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.page-header .back-btn {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.page-header h1 { flex: 1; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0; }
.page-header-sub { flex: none; font-size: 0.78rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.page-content { flex: 1; padding: 18px 18px calc(120px + env(safe-area-inset-bottom, 0px)); animation: fadeUp 0.3s ease; }

.page-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
  padding: 14px 18px calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex; align-items: center; gap: 14px;
}
.page-footer .footer-total { flex: 1; display: flex; flex-direction: column; font-size: 0.78rem; color: var(--text-faint); }
.page-footer .footer-total .amt { font-size: 1.15rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
button.primary.block { flex: none; width: auto; min-width: 180px; }

.paypal-footer { width: 100%; }
.paypal-footer #paypalButtonContainer { width: 100%; }
paypal-basic-card-container, paypal-basic-card-button { display: block; width: 100%; }
.paypal-footer #googlePayButtonContainer { width: 100%; height: 45px; margin-bottom: 8px; }
.paypal-footer #googlePayButtonContainer:empty { display: none; margin: 0; height: 0; }
.paypal-footer #applePayButtonContainer { width: 100%; height: 45px; margin-bottom: 8px; }
.paypal-footer #applePayButtonContainer:empty { display: none; margin: 0; height: 0; }
apple-pay-button { width: 100%; height: 45px; display: block; --apple-pay-button-width: 100%; --apple-pay-button-height: 45px; --apple-pay-button-border-radius: 999px; }
.paypal-error { margin: 8px 0 0; font-size: 0.8rem; color: var(--danger, #d9503f); text-align: center; }

.payment-skeleton { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.skeleton-btn {
  width: 100%; height: 45px; border-radius: 999px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.4s ease infinite;
}
.skeleton-btn.small { max-width: 55%; }
@keyframes skeletonShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-btn { animation: none; }
}

.its-here-btn {
  border: 2px solid var(--accent); background: transparent; color: var(--accent); font-weight: 700; font-size: 0.92rem;
  padding: 12px 24px; border-radius: 999px; cursor: pointer; margin-bottom: 22px;
}
.its-here-btn:active { transform: scale(0.97); }
.its-here-btn:disabled { opacity: 0.6; }

.new-order-btn {
  border: none; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 0.95rem;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent);
  animation: newOrderPulse 2.2s ease-in-out infinite;
}
@keyframes newOrderPulse {
  0%, 100% { box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
  50% { box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 60%, transparent); }
}

.return-to-orders-btn {
  display: block; margin: 12px auto 0; border: none; background: none; color: var(--text-faint);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; padding: 8px;
}

.view-receipt-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-weight: 700; font-size: 0.85rem;
  padding: 11px 22px; border-radius: 999px; cursor: pointer; margin-bottom: 12px;
}

/* ---------- receipt ---------- */

.receipt-sheet {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 22px; max-width: 380px; margin: 0 auto; text-align: center;
}
.receipt-logo { width: 60px; height: auto; margin: 0 auto 8px; }
.receipt-bar-name { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 8px; }
.receipt-meta { font-size: 0.8rem; color: var(--text-dim); margin: 2px 0; }
.receipt-divider { border-top: 1px dashed var(--border); margin: 14px 0; }
.receipt-items { text-align: left; }
.receipt-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.88rem; padding: 4px 0; text-align: left; }
.receipt-row.dim { color: var(--text-dim); font-size: 0.8rem; }
.receipt-row.total { font-weight: 700; font-size: 1rem; color: var(--text); border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.receipt-thanks { font-size: 0.85rem; color: var(--text-dim); margin: 0; font-style: italic; }

@media print {
  .no-print, .testing-banner { display: none !important; }
  body { background: #fff; }
  .receipt-sheet { border: none; box-shadow: none; max-width: 100%; padding: 0; }
}

/* ---------- sheet (cart review) ---------- */

.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 40;
  display: flex; align-items: flex-end;
  animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-height: 88dvh; overflow-y: auto; background: var(--surface);
  border-radius: 20px 20px 0 0; padding: 20px 18px calc(env(safe-area-inset-bottom, 0px) + 20px);
  animation: slideUp 0.38s cubic-bezier(0.2, 0.85, 0.25, 1.05);
}
@keyframes slideUp { from { transform: translateY(60px); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } }
.cart-line { animation: lineIn 0.3s ease backwards; animation-delay: var(--d, 0ms); }
@keyframes lineIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
.sheet-handle { width: 40px; height: 4px; background: var(--surface-3); border-radius: 999px; margin: 0 auto 16px; }
.sheet h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 14px; }

.cart-line { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-line:last-of-type { border-bottom: none; }
.cart-line .line-info { flex: 1; min-width: 0; }
.cart-line .line-name { font-weight: 700; font-size: 0.92rem; }
.cart-line .line-note { font-size: 0.78rem; color: var(--text-dim); }
.cart-line .line-price { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-dim); font-size: 0.85rem; }
.cart-line .remove { background: none; border: none; color: var(--text-faint); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; }

.field-label { font-size: 0.78rem; font-weight: 700; color: var(--text-dim); margin: 16px 0 6px; }
.name-field {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: inherit;
  font-size: 0.92rem;
}
.name-field::placeholder { color: var(--text-faint); }
.help-note.tight { margin: 6px 0 0; }

.note-field {
  width: 100%; margin-top: 14px; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-family: inherit;
  font-size: 0.88rem; resize: vertical; min-height: 54px;
}
.note-field::placeholder { color: var(--text-faint); }

.sheet-total-row {
  display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 12px;
  font-weight: 700; font-size: 1.05rem;
}
.sheet-total-row .amt { font-variant-numeric: tabular-nums; color: var(--accent); }
.help-note { font-size: 0.76rem; color: var(--text-faint); margin: 0 0 14px; line-height: 1.4; }

.confirm-sub { font-size: 0.83rem; color: var(--text-dim); margin: -6px 0 16px; }
.confirm-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.confirm-line { display: flex; justify-content: space-between; font-size: 0.9rem; }
.confirm-breakdown { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 18px; }
.confirm-breakdown .row { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-dim); padding: 4px 0; font-variant-numeric: tabular-nums; }
.confirm-breakdown .row.dim { font-size: 0.78rem; color: var(--text-faint); padding-top: 0; }
.confirm-breakdown .row.total { color: var(--text); font-weight: 700; font-size: 1rem; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; }

.btn-row { display: flex; gap: 10px; }
button.primary {
  flex: 1; border: none; border-radius: var(--radius-md); background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 0.95rem; padding: 15px; cursor: pointer;
}
button.primary:disabled { opacity: 0.55; }
button.ghost {
  border: 1px solid var(--border); background: transparent; color: var(--text-dim);
  border-radius: var(--radius-md); padding: 15px 18px; font-weight: 600; font-size: 0.9rem; cursor: pointer;
}

/* ---------- QR camera scanner ---------- */

.scan-overlay {
  position: fixed; inset: 0; z-index: 250; background: #000;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.scan-overlay video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
  position: relative; width: min(70vw, 260px); aspect-ratio: 1; border-radius: 20px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.5);
  border: 2.5px solid rgba(255, 255, 255, 0.85);
}
.scan-hint {
  position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 60px);
  text-align: center; color: #fff; font-size: 0.92rem; font-weight: 600; padding: 0 30px; margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.scan-close {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 18px); right: 18px;
  width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.15);
  color: #fff; font-size: 1.2rem; cursor: pointer; backdrop-filter: blur(6px);
}

/* ---------- busy overlay ---------- */

.busy-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 13, 20, 0.78); backdrop-filter: blur(3px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  animation: fadeIn 0.15s ease-out;
}
.busy-spin { position: relative; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center; }
.busy-spin img { width: 52px; height: 52px; }
.busy-ring { position: absolute; inset: 0; width: 92px; height: 92px; animation: busyRotate 1.1s linear infinite; }
.busy-ring circle {
  fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 70 200; transform-origin: 50% 50%;
}
@keyframes busyRotate { to { transform: rotate(360deg); } }
.busy-label { color: var(--text-dim); font-size: 0.85rem; font-weight: 600; }
.busy-overlay.big .busy-spin, .busy-overlay.big .busy-ring { width: 128px; height: 128px; }
.busy-overlay.big .busy-spin img { width: 72px; height: 72px; }
.busy-overlay.big .busy-label { font-size: 1.15rem; max-width: 320px; text-align: center; }

/* ---------- testing mode ---------- */

.testing-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 34px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: #d97706; color: #fff; text-align: center; font-size: 0.74rem; font-weight: 700; padding: 0 14px;
}
body.testing-mode-active .topbar { top: calc(env(safe-area-inset-top, 0px) + 34px); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 90px); transform: translateX(-50%);
  background: var(--surface-3); color: var(--text); padding: 10px 18px; border-radius: 999px;
  font-size: 0.85rem; z-index: 50; box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  animation: toastIn 0.18s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- status screen ---------- */

.status-screen {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: 40px 24px; text-align: center; gap: 6px;
}
.status-screen .check-host { position: relative; margin-bottom: 18px; }
.status-screen .big-check {
  position: relative; z-index: 1;
  width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
  animation: checkPop 0.5s cubic-bezier(0.25, 0.9, 0.3, 1.3);
}
@keyframes checkPop { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
.status-screen .big-check svg polyline {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: drawCheck 0.4s 0.35s ease forwards;
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.confetti-piece {
  position: absolute; top: 50%; left: 50%; width: 6px; height: 10px; border-radius: 2px;
  opacity: 0; animation: confettiBurst 1s cubic-bezier(0.15, 0.7, 0.25, 1) 0.15s forwards;
}
@keyframes confettiBurst {
  0%   { transform: translate(-50%, -50%) rotate(0deg) scale(0.6); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--r)) scale(1); opacity: 0; }
}
.status-screen h1 {
  font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 4px;
  opacity: 0; animation: fadeUp 0.4s 0.15s ease forwards;
}
.status-screen .sub {
  color: var(--text-dim); margin: 0 0 30px;
  opacity: 0; animation: fadeUp 0.4s 0.25s ease forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.progress-track { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 0; margin-bottom: 30px; }
.progress-step { display: flex; align-items: center; gap: 14px; text-align: left; padding: 10px 0; }
.progress-step .dot {
  width: 26px; height: 26px; border-radius: 50%; flex: none; border: 2px solid var(--surface-3);
  background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 0.75rem;
  color: var(--text-faint); transition: all 0.2s;
}
.progress-step .label { color: var(--text-faint); font-weight: 600; font-size: 0.92rem; transition: color 0.2s; }
.progress-step.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); animation: dotPop 0.35s cubic-bezier(0.3, 0.9, 0.3, 1.4); }
.progress-step.active .dot { border-color: var(--accent); color: var(--accent); animation: dotPulse 1.6s ease-in-out infinite; }
@keyframes dotPop { 0% { transform: scale(0.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes dotPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); } }
.progress-step.done .label, .progress-step.active .label { color: var(--text); }
.progress-line { width: 2px; height: 20px; background: var(--surface-3); margin-left: 13px; position: relative; overflow: hidden; }
.progress-line::after {
  content: ''; position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top;
  transition: transform 0.4s ease;
}
.progress-line.done::after { transform: scaleY(1); }

.status-screen .order-summary {
  width: 100%; max-width: 360px; text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 20px;
}
.status-screen .order-summary .row { display: flex; justify-content: space-between; font-size: 0.85rem; padding: 5px 0; color: var(--text-dim); }
.status-screen .order-summary .row.total { color: var(--text); font-weight: 700; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }

.status-screen .cancelled { color: var(--danger); font-weight: 700; }

@media (min-width: 560px) {
  .menu { max-width: 560px; margin: 0 auto; }
  .topbar, .cat-nav { padding-left: max(18px, calc(50% - 280px)); padding-right: max(18px, calc(50% - 280px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
