/* ---------- Tokens ---------- */
:root {
  --plum: #150a26;
  --plum-deep: #0f061c;
  --plum-soft: #2a1d3d;
  --yellow: #facc15;
  --yellow-soft: #fef6d3;
  --cream: #fffaf0;
  --lilac: #c3b3ec;
  --coral: #f08a72;
  --bg: #ffffff;
  --soft: #f5f5f7;
  --ink: #17171c;
  --surface: #ffffff;
  --line: #ececf0;
  --text: #17171c;
  --muted: #8a8a93;
  --green: #16a34a;
  --red: #d25b48;
  --add-green: #318616;
  --add-green-soft: #f7fff9;
  --text-primary: #1f1f1f;
  --text-tertiary: #828282;
  --bar-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Base: behave like a native app ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #eef0f3;
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:active { transform: scale(.97); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

/* On wider screens the app sits in a phone-sized column */
.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}
@media (min-width: 520px) {
  .app { box-shadow: 0 0 40px rgba(20, 20, 30, .12); }
}

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.screen, .view { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateX(14px); } }

/* ---------- Buttons ---------- */
.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--plum);
  box-shadow: 0 6px 20px rgba(250, 204, 21, .35);
  font-size: 16px;
  font-weight: 700;
  transition: transform .1s, opacity .2s;
}
.primary-button:disabled { opacity: .4; }
.text-button { color: var(--ink); font-weight: 700; text-decoration: underline; padding: 8px; }

/* Bottom-docked action area */
.dock {
  flex: 0 0 auto;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}

/* ---------- Welcome ---------- */
.welcome-screen {
  background: radial-gradient(circle at 70% 30%, rgba(139, 92, 246, .22), transparent 45%), linear-gradient(160deg, var(--plum-deep), var(--plum));
  color: var(--cream);
  overflow: hidden;
}
.welcome-body { position: relative; z-index: 1; flex: 1; padding: calc(100px + var(--safe-top)) 24px 0; }
.brand-logo { display: block; width: 250px; max-width: 100%; height: auto; margin: 0 auto; }
.location-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8vh;
  padding: 12px 16px;
  border: 2px solid var(--yellow);
  border-radius: 12px;
  background: rgba(250, 204, 21, .12);
}
.pin-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(240, 138, 114, .15); }
.location-copy { display: flex; flex-direction: column; gap: 2px; }
.location-copy small { color: var(--yellow); font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.location-copy strong { font-size: 17px; }
.qr-label { margin-left: auto; padding-left: 12px; border-left: 1px solid rgba(250, 204, 21, .45); color: var(--lilac); font-size: 9px; letter-spacing: 1.5px; }
.welcome-screen h1 { margin: 32px 0 0; font: 700 3.4rem/.95 Fraunces, serif; letter-spacing: -2px; }
.welcome-screen h1 em { color: var(--yellow); font-style: normal; }
.welcome-copy { max-width: 300px; margin: 16px 0 0; color: var(--lilac); font-size: 15px; line-height: 1.55; }
.welcome-footer .primary-button { box-shadow: none; }
.welcome-footer { position: relative; z-index: 1; padding: 0 24px calc(20px + var(--safe-bottom)); text-align: center; }
.small-note { margin: 12px 0 0; color: var(--lilac); font-size: 12px; }

.welcome-art { position: absolute; right: -18%; bottom: 14%; width: 90%; aspect-ratio: 1; display: grid; place-items: center; opacity: .2; }
.momo-plate { position: relative; width: 80%; aspect-ratio: 1; border-radius: 50%; transform: rotate(-12deg); background: radial-gradient(circle at 50% 54%, #513149 0 56%, #302039 57% 64%, #facc15 65% 66%, transparent 67%), #392240; }
.momo { position: absolute; width: 27%; height: 16%; border-radius: 80% 40% 65% 45%; background: #fff1dc; }
.momo-a { top: 22%; left: 25%; transform: rotate(24deg); }
.momo-b { top: 44%; left: 47%; transform: rotate(-18deg); }
.momo-c { top: 57%; left: 22%; transform: rotate(8deg); }
.momo-d { top: 27%; left: 57%; transform: rotate(50deg); }
.steam { position: absolute; width: 30px; height: 110px; border: 2px solid rgba(255, 250, 240, .5); border-bottom: 0; border-radius: 50%; filter: blur(2px); animation: float 4s ease-in-out infinite; }
.steam-one { top: 0; left: 30%; }
.steam-two { top: -4%; left: 48%; animation-delay: 1s; }
.steam-three { top: 2%; left: 66%; animation-delay: 2s; }
@keyframes float {
  0% { transform: translateY(16px) scaleX(.8); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(-34px) scaleX(1.15); opacity: 0; }
}

/* Welcome animations: staggered entrance, living plate, live dot, button hint */
.welcome-body > *, .welcome-footer { animation: rise .6s cubic-bezier(.2, .7, .3, 1) both; }
.welcome-body > :nth-child(1) { animation-delay: .05s; }
.welcome-body > :nth-child(2) { animation-delay: .18s; }
.welcome-body > :nth-child(3) { animation-delay: .31s; }
.welcome-body > :nth-child(4) { animation-delay: .44s; }
.welcome-footer { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.momo-plate { animation: plate-spin 40s linear infinite; }
@keyframes plate-spin { to { rotate: 360deg; } }
.momo { animation: bob 3s ease-in-out infinite; }
.momo-b { animation-delay: .7s; }
.momo-c { animation-delay: 1.4s; }
.momo-d { animation-delay: 2.1s; }
@keyframes bob { 50% { translate: 0 -5%; } }

.pin-dot { animation: live-pulse 2s ease-out infinite; }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 138, 114, .55); }
  100% { box-shadow: 0 0 0 10px rgba(240, 138, 114, 0); }
}

.welcome-footer .primary-button { position: relative; overflow: hidden; }
.welcome-footer .primary-button::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: shine 4s 1.4s ease-in-out infinite;
}
@keyframes shine { 0% { left: -60%; } 25%, 100% { left: 130%; } }
.welcome-footer .primary-button span { display: inline-block; animation: nudge 4s 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 10%, 30%, 100% { transform: none; } 20% { transform: translateX(5px); } }

@media (prefers-reduced-motion: reduce) {
  .welcome-screen, .welcome-screen *, .welcome-screen *::after { animation: none !important; }
}

/* ---------- App bar ---------- */
.ordering-screen { background: var(--bg); }
.app-bar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 4px;
  height: calc(var(--bar-h) + var(--safe-top));
  padding: var(--safe-top) 6px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.bar-button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.bar-button:active { background: var(--soft); }
.bar-button.invisible { visibility: hidden; }
.bar-title { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; text-align: center; }
.bar-title small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.6px; }
.bar-title strong { overflow: hidden; max-width: 100%; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Views ---------- */
.view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.view-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px; -webkit-overflow-scrolling: touch; }
.view-intro { margin: 4px 4px 14px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.section-label { margin: 20px 4px 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; }
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

/* ---------- Menu ---------- */
.search-row { flex: 0 0 auto; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.menu-search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 12px; background: #ececef; color: #5f5f66; }
.menu-search svg { flex: 0 0 auto; width: 20px; height: 20px; stroke-width: 2; }
.menu-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; text-align: center; }
.menu-search input:focus, .menu-search input:not(:placeholder-shown) { text-align: left; }
.menu-search input::placeholder { color: #6b6b73; font-weight: 500; }

.diet-filters { display: flex; gap: 10px; margin-top: 12px; }
.diet-toggle { display: inline-flex; align-items: center; height: 33px; padding: 0 11px; border: 1px solid #d8d8de; border-radius: 999px; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.diet-switch { position: relative; width: 41px; height: 20px; }
.diet-switch::before { content: ''; position: absolute; top: 5.5px; left: 3px; right: 2px; height: 9px; border-radius: 999px; background: #e4e4e8; transition: background .2s; }
.diet-switch .diet-mark { position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-width: 1.8px; border-radius: 4.5px; transition: transform .2s; }
.diet-switch .diet-mark::after { width: 9px; height: 9px; }
.diet-toggle[aria-pressed="true"] .diet-mark { transform: translateX(21px); }
.diet-toggle.veg[aria-pressed="true"] { border-color: var(--green); }
.diet-toggle.nonveg[aria-pressed="true"] { border-color: var(--red); }
.diet-toggle.veg[aria-pressed="true"] .diet-switch::before { background: var(--green); }
.diet-toggle.nonveg[aria-pressed="true"] .diet-switch::before { background: var(--red); }
.menu-search input::-webkit-search-cancel-button { display: none; }

.menu { flex: 1; display: grid; grid-template-columns: 80px minmax(0, 1fr); min-height: 0; }
.category-rail { overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-right: 1px solid var(--line); scrollbar-width: none; }
.category-rail::-webkit-scrollbar, .menu-main::-webkit-scrollbar { display: none; }
.category-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 12px 4px; color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.category-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--soft); font-size: 24px; line-height: 1; transition: background .2s, transform .2s; }
.category-item.active { color: var(--ink); font-weight: 700; }
.category-item.active::before { content: ''; position: absolute; top: 10px; bottom: 10px; left: 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--yellow); }
.category-item.active .category-icon { background: var(--yellow-soft); transform: scale(1.06); }

.menu-main { overflow-y: auto; overscroll-behavior: contain; background: var(--surface); padding: 12px 8px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.menu-section-title { margin: 0 4px 10px; font-size: 17px; font-weight: 700; }
.menu-section-title small { color: var(--muted); font-size: 12px; font-weight: 500; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.product-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.product-image {
  position: relative;
  height: 112px;
  background: radial-gradient(circle at 60% 40%, #fff 0 18%, transparent 19%), radial-gradient(circle at 42% 60%, #facc15 0 17%, transparent 18%), linear-gradient(135deg, #e4a175, #ca5f50);
}
.product-image.drink { background: radial-gradient(circle at 50% 45%, #fff 0 14%, transparent 15%), linear-gradient(135deg, #f7c873, #e5793f); }
.product-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-image .diet-mark { position: absolute; top: 6px; left: 6px; }
.diet-mark { display: inline-block; position: relative; width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px; background: #fff; }
.diet-mark::after { content: ''; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: currentColor; transform: translate(-50%, -50%); }
.diet-mark.veg { color: var(--green); }
.diet-mark.nonveg { color: var(--red); }
.product-info { flex: 1; display: flex; flex-direction: column; padding: 8px; }
.product-card h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 10px; }
.price { font-size: 14px; font-weight: 700; }
.add-button { height: 32px; padding: 0 14px; border: 1px solid var(--add-green); border-radius: 6px; background: var(--add-green-soft); color: var(--add-green); font-size: 12px; font-weight: 700; }
.stepper { display: flex; align-items: center; height: 32px; border-radius: 6px; background: var(--add-green); color: #fff; font-size: 13px; font-weight: 700; }
.stepper button { width: 28px; height: 100%; color: #fff; font-size: 17px; line-height: 1; }
.stepper span { min-width: 16px; text-align: center; }
.menu-empty { grid-column: 1 / -1; padding: 48px 12px; color: var(--muted); text-align: center; }

/* Cart bar */
.cart-dock { position: relative; z-index: 2; padding-top: 8px; padding-bottom: calc(8px + var(--safe-bottom)); border-top: 0; background: var(--surface); }
.cart-bar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; width: 100%; height: 56px; padding: 0 8px 0 16px; border-radius: 12px; background: var(--yellow); color: var(--plum); box-shadow: 0 6px 20px rgba(250, 204, 21, .35); animation: pop .25s ease-out; }
.cart-bar-info { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.cart-bar-info small { color: rgba(21, 10, 38, .65); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.cart-bar-info strong { font-size: 16px; }
.cart-bar-cta { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 9px; background: var(--plum); color: var(--yellow); font-weight: 700; }
/* Mascot peeking over the cart bar. Temporary: cropped from the logo; swap for a standalone image by replacing the background. */
.cart-mascot { position: absolute; top: -26px; left: 22px; z-index: 0; width: 60px; height: 54px; background: url("../images/momo-steamery-logo.png") -236px 0 / 352px auto no-repeat; animation: peek .45s .1s ease-out both; }
@keyframes peek { from { transform: translateY(30px); } }
@keyframes pop { from { transform: translateY(20px); opacity: 0; } }

/* ---------- Cart ---------- */
.cart-card { padding: 4px 14px; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item .diet-mark { flex: 0 0 auto; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info strong { display: block; color: var(--text-primary); font-size: 15px; font-weight: 400; line-height: 1.35; }
.cart-item-info small { display: block; margin-top: 4px; color: var(--text-primary); font-size: 13px; font-weight: 700; }
.cart-item .stepper { height: 30px; }
.line-total { min-width: 52px; font-size: 15px; color: var(--text-primary); font-weight: 700; text-align: right; }
.add-more { width: 100%; padding: 14px 0; color: var(--ink); font-size: 15px; font-weight: 700; text-align: left; }
.empty-cart { padding: 48px 12px; color: var(--muted); text-align: center; }
.bill-summary { display: grid; gap: 10px; padding: 14px; color: var(--muted); font-size: 15px; }
.bill-summary div { display: flex; justify-content: space-between; }
.bill-total { padding-top: 10px; border-top: 1px dashed var(--line); color: var(--text); font-size: 17px; }
.policy-card { margin-top: 12px; padding: 14px; }
.policy-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--text-primary); font-weight: 700; }
.policy-card p { margin: 0; color: var(--text-tertiary); font-size: 13px; line-height: 1.5; }

/* ---------- Options (service / payment) ---------- */
.option-list { display: grid; gap: 10px; }
.option-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.option-card.selected { border-color: var(--ink); }
.option-card.selected .option-icon { background: var(--surface); }
.option-icon { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; background: var(--soft); font-size: 22px; }
.option-icon.text-icon { color: var(--ink); font-size: 12px; font-weight: 700; }
.option-copy { flex: 1; }
.option-copy strong, .option-copy small { display: block; }
.option-copy strong { font-size: 16px; }
.option-copy small { margin-top: 2px; color: var(--muted); font-size: 13px; }
.radio { flex: 0 0 auto; width: 22px; height: 22px; border: 2px solid #cfccd6; border-radius: 50%; }
.selected .radio { border: 7px solid var(--ink); }
.secure-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Success ---------- */
.success-screen { background: var(--surface); text-align: center; }
.success-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(24px + var(--safe-top)) 24px 24px; }
.success-mark { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 38px; animation: pop .35s ease-out; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.success-screen h2 { margin: 0 0 12px; font: 700 2.6rem/1 Fraunces, serif; letter-spacing: -1px; }
.success-copy { max-width: 300px; margin: 0; color: var(--muted); line-height: 1.55; }
.order-number { margin: 28px 0 12px; padding: 16px 32px; border: 2px dashed var(--line); border-radius: 12px; }
.order-number span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; letter-spacing: 2px; }
.order-number strong { font-size: 26px; letter-spacing: 2px; }
.success-meta { margin: 0; color: var(--muted); font-size: 13px; }
.success-meta strong { color: var(--text); }

/* ---------- Size picker (Half / Full) ---------- */
.add-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.add-options { color: var(--muted); font-size: 9px; font-weight: 600; }
.price small { color: var(--muted); font-size: 10px; font-weight: 500; }

.sheet-backdrop { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: rgba(15, 10, 25, .45); animation: fade .2s ease-out; }
.sheet { width: 100%; max-height: 80%; overflow-y: auto; padding: 18px 16px calc(12px + var(--safe-bottom)); border-radius: 18px 18px 0 0; background: var(--surface); animation: slide-up .25s ease-out; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-head h3 { margin: 0; font-size: 17px; }
.sheet-head small { color: var(--muted); font-size: 12px; }
.sheet-close { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); font-size: 18px; }
.sheet-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sheet-option strong { display: block; font-size: 15px; font-weight: 600; }
.sheet-price { color: var(--text-primary); font-size: 14px; font-weight: 700; }
.sheet .primary-button { margin-top: 14px; }

/* Momo type chips (gravy momos etc.): pick a filling, then a portion */
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.type-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-primary); font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s; }
.type-chip.selected { border-color: var(--ink); background: var(--yellow-soft); }
.type-count { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--add-green); color: #fff; font-size: 11px; font-weight: 700; }
.sheet-hint { margin: 10px 0 4px; padding: 14px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 13px; text-align: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(100%); } }

.cart-item-info em { color: var(--muted); font-size: 13px; font-style: normal; }

/* ---------- Toast ---------- */
.toast { position: absolute; left: 12px; right: 12px; bottom: calc(90px + var(--safe-bottom)); z-index: 30; padding: 12px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.4; text-align: center; animation: pop .25s ease-out; }

/* ---------- Order status ---------- */
.status-screen { background: var(--surface); }
.status-body { flex: 1; overflow-y: auto; padding: 0 16px 16px; }
.status-hero { --glow: var(--yellow-soft); margin: 0 -16px; padding: calc(44px + var(--safe-top)) 24px 22px; border-radius: 0 0 28px 28px; background: radial-gradient(circle at 50% 100px, #fff 0 52px, transparent 110px), linear-gradient(180deg, var(--glow), var(--surface)); text-align: center; animation: rise .5s cubic-bezier(.2, .7, .3, 1) both; }
.status-hero.mood-happy, .status-hero.mood-wink { --glow: #eaf7ee; }
.status-hero.mood-ready { --glow: #fff0b3; }
.status-hero.mood-worried { --glow: #fff1e2; }
.status-hero.mood-sad { --glow: #fdebe7; }
.status-hero h2 { margin: 0 0 8px; font: 700 2rem/1.05 Fraunces, serif; letter-spacing: -.5px; }
.status-hero p { max-width: 320px; margin: 0 auto; color: var(--muted); line-height: 1.5; }
.status-hero .order-number { display: inline-block; min-width: 220px; }
.status-hero p.order-ref { display: inline-block; margin: 0 auto 12px; padding: 5px 12px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 13px; letter-spacing: .5px; }
.status-hero p.order-ref strong { color: var(--text); letter-spacing: 1px; }

/* Mascot: bobs gently; steam while cooking, sparkles when ready */
.mascot { position: relative; width: 120px; height: 112px; margin: 0 auto 14px; }
.mascot svg { display: block; width: 120px; height: 112px; overflow: visible; stroke: none; }
.mascot-body { transform-box: fill-box; transform-origin: 50% 100%; animation: mascot-bob 2.6s ease-in-out infinite; }
.mascot-shadow { transform-box: fill-box; transform-origin: center; animation: mascot-shadow 2.6s ease-in-out infinite; }
.mascot-eyes { transform-box: fill-box; transform-origin: center; animation: blink 4s infinite; }
@keyframes mascot-bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-6px) scale(.98, 1.02); } }
@keyframes mascot-shadow { 50% { transform: scaleX(.8); opacity: .07; } }
@keyframes blink { 0%, 44%, 50%, 100% { transform: none; } 47% { transform: scaleY(.1); } }
.mascot-ready .mascot-body { animation: mascot-hop .9s cubic-bezier(.3, 0, .4, 1) infinite; }
@keyframes mascot-hop { 0%, 100% { transform: translateY(0) scale(1.04, .96); } 40% { transform: translateY(-14px) scale(.97, 1.04); } 70% { transform: translateY(0) scale(1.05, .95); } }
.mascot-sad .mascot-body { animation: mascot-sway 3.2s ease-in-out infinite; }
@keyframes mascot-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.mascot-drop { animation: drop 2.4s ease-in infinite; }
@keyframes drop { 0% { opacity: 0; transform: translateY(-3px); } 20%, 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }
.mascot-steam { position: absolute; top: -26px; width: 14px; height: 40px; border: 2px solid rgba(138, 138, 147, .45); border-color: rgba(138, 138, 147, .45) transparent transparent rgba(138, 138, 147, .45); border-radius: 50%; animation: float 3s ease-in-out infinite; }
.mascot-steam.s1 { left: 40px; }
.mascot-steam.s2 { left: 55px; animation-delay: 1s; }
.mascot-steam.s3 { left: 70px; animation-delay: 2s; }
.mascot-spark { position: absolute; color: #f5b400; font-size: 18px; animation: twinkle 1.4s ease-in-out infinite; }
.mascot-spark.k1 { top: 6px; left: -8px; }
.mascot-spark.k2 { top: -8px; right: -4px; font-size: 14px; animation-delay: .45s; }
.mascot-spark.k3 { bottom: 20px; right: -14px; font-size: 12px; animation-delay: .9s; }
.mascot-sleepy .mascot-body { animation-duration: 4.5s; }
.mascot-z { position: absolute; right: -6px; top: 10px; color: var(--lilac); font: 700 14px 'DM Sans', sans-serif; opacity: 0; animation: snooze 3.6s ease-out infinite; }
.mascot-z.z2 { animation-delay: 1.2s; font-size: 17px; }
.mascot-z.z3 { animation-delay: 2.4s; font-size: 21px; }
@keyframes snooze { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(18px, -38px); } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* Waiting token: three pulsing dots instead of a dashed placeholder */
.token-waiting { background: rgba(255, 255, 255, .7); }
.token-dots { display: flex; justify-content: center; gap: 8px; height: 36px; align-items: center; }
.token-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); animation: dot-pulse 1.2s ease-in-out infinite; }
.token-dots i:nth-child(2) { animation-delay: .2s; }
.token-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot-pulse { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Progress tracker */
.status-steps { display: flex; max-width: 280px; margin: 6px auto 18px; padding: 0; list-style: none; }
.status-steps li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.status-steps li::before { content: ''; position: absolute; top: 8px; right: 50%; width: 100%; height: 3px; background: var(--line); }
.status-steps li:first-child::before { display: none; }
.status-steps span { position: relative; z-index: 1; display: grid; place-items: center; width: 19px; height: 19px; border: 3px solid var(--line); border-radius: 50%; background: var(--surface); }
.status-steps li.done { color: var(--text); }
.status-steps li.done::before, .status-steps li.current::before { background: var(--green); }
.status-steps li.done span { border-color: var(--green); background: var(--green); }
.status-steps li.done span::after { content: ''; width: 5px; height: 8px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.status-steps li.current { color: var(--text); }
.status-steps li.current span { border-color: var(--green); animation: live-pulse-green 1.6s ease-out infinite; }
@keyframes live-pulse-green { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); } 100% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); } }

@media (prefers-reduced-motion: reduce) {
  .status-screen, .status-screen * { animation: none !important; }
}
.receipt { padding: 4px 14px; }
.receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-primary); font-size: 14px; }
.receipt-row:last-child { border-bottom: 0; font-weight: 700; }
.receipt-row em { color: var(--muted); font-style: normal; }
.status-meta { margin: 14px 4px 0; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- Landing (no outlet chosen) ---------- */
.home-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 24px; text-align: center; }
.home-body p { max-width: 280px; margin: 0; color: var(--lilac); font-size: 16px; line-height: 1.5; }
.scanner { position: relative; width: 240px; max-width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.06);
  --c: var(--yellow); background-image:
    linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c)),
    linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c)), linear-gradient(var(--c),var(--c));
  background-repeat: no-repeat;
  background-size: 36px 4px, 4px 36px, 36px 4px, 4px 36px, 36px 4px, 4px 36px, 36px 4px, 4px 36px;
  background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%; }
.scanner video { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: cover; border-radius: 14px; opacity: 0; transition: opacity .3s; }
.scanner.live video { opacity: 1; }
.scanner-line { position: absolute; left: 16px; right: 16px; top: 16px; height: 2px; background: var(--yellow); box-shadow: 0 0 12px var(--yellow); opacity: 0; }
.scanner.live .scanner-line { opacity: 1; animation: scan-sweep 2s ease-in-out infinite alternate; }
.scanner.found .scanner-line { animation: none; opacity: 0; }
@keyframes scan-sweep { to { top: calc(100% - 18px); } }
.scanner-start { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--plum); font: 700 15px 'DM Sans', sans-serif; cursor: pointer; }
.scanner.live .scanner-start { display: none; }

/* ---------- Token + WhatsApp bill (order status) ---------- */
.token-number { border-color: var(--yellow); background: var(--yellow-soft); }
.token-number strong { font-size: 40px; letter-spacing: 1px; }
.bill-card { margin-top: 8px; padding: 14px; }
.bill-card label { display: block; margin-bottom: 10px; color: var(--text-primary); font-size: 14px; }
.phone-row { display: flex; align-items: center; height: 46px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.phone-row:focus-within { border-color: var(--add-green); }
.phone-prefix { padding: 0 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.phone-row input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 15px; -webkit-user-select: text; user-select: text; }
.phone-row button { height: 100%; padding: 0 18px; background: var(--add-green); color: #fff; font-weight: 700; }
.field-error { margin: 6px 0 0; color: var(--red); font-size: 12px; }
.bill-download { display: flex; align-items: center; gap: 12px; color: var(--text-primary); text-decoration: none; }
.bill-download strong { display: block; font-size: 15px; }
.bill-download small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.bill-icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; background: var(--add-green); color: #fff; font-size: 18px; font-weight: 700; }
.bill-pending { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ---------- Ordering paused (switched off in MSERP) ---------- */
.paused-card { width: 100%; max-width: 360px; padding: 26px 22px 24px; border-radius: 20px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(195, 179, 236, .18); animation: rise .5s cubic-bezier(.2, .7, .3, 1) both; }
.paused-card small { color: var(--yellow); font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.paused-card h1 { margin: 6px 0 10px; color: var(--cream); font: 700 1.8rem/1.1 Fraunces, serif; letter-spacing: -.5px; }
.home-body .paused-card p { max-width: none; font-size: 15px; }

/* ---------- Recent orders (home + welcome) ---------- */
.recent-orders { width: 100%; max-width: 360px; text-align: left; }
.recent-orders h2 { margin: 0 0 10px; color: #fff; font-size: 15px; font-weight: 700; }
.recent-order { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.recent-order strong { display: block; font-size: 14px; }
.recent-order small { display: block; margin-top: 2px; color: var(--lilac); font-size: 12px; }
.recent-order-status { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; background: var(--yellow); color: var(--plum); font-size: 11px; font-weight: 700; }
.recent-orders-note { margin: 6px 0 0; color: var(--lilac); font-size: 11px; text-align: center; }
.recent-orders-link { display: inline-block; margin-top: 14px; color: var(--yellow); font-size: 14px; font-weight: 700; text-decoration: none; }
