:root {
  /* grey-forward palette matching the original G.O.A.T. app */
  --bg: #151517; --surface: #202023; --line: #ffffff; --muted: #a3a3a3;
  --accent: #c8a06a; --accent-ink: #0d0d0d; --danger: #d9534f; --ok: #5ca66a;
  --bar: #2c2c2e;
  --radius: 14px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--line); font-family: var(--font); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 460px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 14px) calc(env(safe-area-inset-right) + 20px)
           calc(env(safe-area-inset-bottom) + 96px) calc(env(safe-area-inset-left) + 20px); }
/* Top bar: centered page title with gold underline; cart pill right (original app style) */
.topbar { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; min-height: 52px; padding: 4px 0; }
.topbar-side { display: flex; }
.topbar-side.right { justify-content: flex-end; }
.topbar-title { font-size: 19px; font-weight: 700; text-align: center; position: relative; padding-bottom: 7px; }
.topbar-title::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 44px; height: 3px; border-radius: 2px; background: var(--accent); }
.cart-pill { position: relative; width: auto; margin: 0; padding: 9px 14px; border-radius: 999px;
  background: rgba(30,30,32,.85); border: 1px solid #3a3a3c; }
.cart-pill img { width: 20px; height: 20px; display: block; filter: brightness(1.6); }
/* centered goat logo over the hero (every screen, like the original) */
.hero-logo { position: fixed; top: 19vh; left: 0; right: 0; max-width: 460px; margin: 0 auto;
  display: flex; justify-content: center; z-index: -1; opacity: 0; transition: opacity .35s ease; pointer-events: none;
  mix-blend-mode: screen; }
.hero-logo img { width: 130px; height: auto; }
body.tall-hero .hero-logo { top: 30vh; }
body.show-hero .hero-logo { opacity: 1; }
.hero-spacer { height: 30vh; }
.hero-spacer.small { height: 22vh; }
/* Home: greeting + two gold CTAs */
.home-hi { text-align: center; font-size: 30px; font-weight: 800; margin-top: 5vh; }
.home-editname { text-align: center; margin: 2px 0 14px; }
.linklike { width: auto; margin: 0; padding: 2px 6px; border: none; background: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; }
.cta { border-radius: 999px; }
.cta-or { text-align: center; color: var(--muted); margin: 10px 0; }
/* Rewards: gold points banner */
.pts-banner { background: var(--accent); color: #fff; border-radius: 14px; text-align: center; padding: 20px 16px; }
.pts-banner .pb-label { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.pts-banner .pb-big { font-size: 42px; font-weight: 600; line-height: 1.1; }
.pb-next { text-align: center; font-weight: 700; font-size: 16px; margin: 12px 0 2px; }
.pb-next:empty { display: none; }
.pb-next.ready { color: var(--ok); }
.pb-life { margin-bottom: 6px; }
.pb-rules { color: var(--muted); font-size: 13.5px; white-space: pre-line; text-align: center; margin-top: 12px; }
/* Pickup time chooser */
.pickup-when { margin: 8px 0 2px; }
.pw-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.pw-row { display: flex; gap: 8px; }
.pw-row select { flex: 1; padding: 12px 10px; border-radius: 10px; border: 1px solid #333; background: #1a1a1d; color: var(--line); font-size: 15px; }
.pw-row input[type="time"] { width: 130px; margin: 0; }
/* Name editor drop-in on the Card tab */
.name-card { padding: 14px 16px; }
.name-prompt { text-align: left; margin: 0 0 10px; }
.name-edit-row { display: flex; gap: 8px; align-items: stretch; }
.name-edit-row input { margin: 0; }
.name-save { width: auto; margin: 0; padding: 0 18px; white-space: nowrap; }
.card { background: var(--surface); border: 1px solid #262626; border-radius: var(--radius); padding: 16px; margin: 10px 0; }
button { width: 100%; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; color: var(--line); font-size: 17px; font-weight: 600; cursor: pointer; margin-top: 10px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button:disabled { opacity: .4; }
input { width: 100%; padding: 14px; border-radius: 10px; border: 1px solid #333; background: #1a1a1d; color: var(--line); font-size: 17px; margin: 6px 0; }
.muted { color: var(--muted); text-align: center; font-size: 14px; white-space: pre-line; }
/* Transient toast pill near the top so it's easy to spot */
.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 14px); z-index: 30;
  max-width: 92%; display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  background: #241c14; border: 1px solid var(--accent); border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55); animation: toastIn .22s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast-text { font-size: 14px; font-weight: 600; white-space: nowrap; }
.toast-link { color: var(--accent); font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.app-saying { text-align: center; color: var(--muted); font-size: 13px; font-style: italic;
  padding: 18px 16px 8px; min-height: 20px; transition: opacity .4s ease; }
.field-label { display: block; font-size: 14px; color: var(--line); margin: 12px 0 2px; }
.field-label .opt { color: var(--muted); font-weight: 400; }
.msg { color: var(--accent); text-align: center; font-size: 14px; min-height: 18px; }
.hidden { display: none !important; }

/* Points card */
.points { text-align: center; }
.points .ptsbig { font-size: 52px; font-weight: 800; line-height: 1; color: var(--accent); }
.points .of { color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-top: 3px; }
.points .lifetime { color: var(--muted); font-size: 13px; margin-top: 6px; }
.points .next-reward { font-size: 14px; margin-top: 8px; color: var(--accent); font-weight: 600; }
.points .next-reward:empty { display: none; }
.points .next-reward.ready { color: var(--ok); }

/* Rewards / tiers */
.rewards-h { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
.tier { padding: 12px 0; border-bottom: 1px solid #262626; }
.tier:last-child { border-bottom: none; }
.tier-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tier-label { font-weight: 600; font-size: 15px; }
.tier-status { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tier.ready .tier-status { color: var(--accent); font-weight: 700; }
.tier .bar { height: 6px; border-radius: 999px; background: #262626; margin-top: 10px; overflow: hidden; }
.tier .bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }

/* Category chip nav (Order tab) */
.cat-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; margin: 0 -2px 2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-chip { width: auto; flex: 0 0 auto; margin: 0; padding: 8px 16px; border-radius: 999px;
  border: 1px solid #3a3a3c; background: #1a1a1d; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.cat-chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Checkout summary (subtotal / GST / total + pay options) */
.checkout-summary { margin: 6px 0 2px; padding-top: 10px; border-top: 1px solid #262626; }
.co-row { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; font-size: 15px; }
.co-row.co-total { font-size: 17px; font-weight: 700; padding-top: 8px; }
.co-row.co-total span:last-child { color: var(--accent); }
.co-row .co-label { color: var(--muted); }
.co-pay { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.co-pay .pay-now { display: block; text-align: center; text-decoration: none; }
.co-hint { color: var(--muted); font-size: 12.5px; text-align: center; margin: 8px 0 0; }

/* Menu */
.menu-card { padding: 16px 20px; }
.menu-cat { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; font-weight: 700; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 0; margin: 0; border-bottom: 1px solid #262626; }
.menu-item-img { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 10px; object-fit: cover; background: #262626; }
.menu-item:last-child { border-bottom: none; }
.menu-item-body { flex: 1; min-width: 0; padding: 0; margin: 0; border: none; border-radius: 0; background: transparent; color: var(--line); font-size: 15px; font-weight: 500; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.menu-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.menu-item-price { color: var(--muted); font-weight: 600; white-space: nowrap; }
.menu-item-desc { color: var(--muted); font-size: 13px; font-weight: 400; }
.fav { width: 40px; flex: 0 0 40px; padding: 6px 0; margin: 0; border: none; border-radius: 8px; background: transparent; color: #4a4a4a; font-size: 20px; line-height: 1; }
.fav.on { color: var(--danger); }

/* Promotions / daily baking feed (home) */
.promo-card { padding: 16px 20px; }
.promo-card .promo-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; color: var(--line); }
.promo-card img { width: 100%; height: auto; border-radius: 10px; display: block; margin: 8px 0; }
.promo-card .promo-body { color: var(--muted); font-size: 14px; margin: 0; white-space: pre-line; text-align: left; }
.baking-item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid #262626; }
.baking-item:last-child { border-bottom: none; padding-bottom: 0; }
.baking-item-name { font-weight: 600; font-size: 15px; }
.baking-item-note { color: var(--muted); font-size: 13px; text-align: right; }

/* My QR */
.qrbox { background: #fff; border-radius: var(--radius); padding: 18px; display: flex; justify-content: center; }
.qrbox img { width: 100%; height: auto; image-rendering: pixelated; }

/* Store */
.store-row { padding: 12px 0; border-bottom: 1px solid #262626; }
.store-row a { color: var(--accent); text-decoration: none; }

/* Menu add button */
.menu-add { width: auto; flex: 0 0 auto; padding: 7px 14px; margin: 0; font-size: 13px; font-weight: 700; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }

/* Modifier picker */
.mod-picker { padding: 4px 0 14px; margin: 0 0 8px; border-bottom: 1px solid #262626; }
.mod-group { padding: 8px 0; }
.mod-group-name { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 6px; display: flex; align-items: baseline; gap: 8px; }
.mod-req { font-size: 10px; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
.mod-opt { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; color: var(--line); cursor: pointer; }
.mod-opt input { width: auto; flex: 0 0 auto; margin: 0; accent-color: var(--accent); }
.mod-opt-name { flex: 1; min-width: 0; }
.mod-opt-delta { color: var(--muted); font-weight: 600; white-space: nowrap; }
.mod-add { width: 100%; flex: none; margin-top: 8px; border-radius: var(--radius); }

/* Cart */
.cart-row { padding: 12px 0; border-bottom: 1px solid #262626; }
.cart-mods { color: var(--muted); font-size: 13px; margin-top: 4px; }
.cart-row:last-of-type { border-bottom: none; }
.cart-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cart-name { font-weight: 600; font-size: 15px; }
.cart-line-total { color: var(--muted); font-weight: 600; white-space: nowrap; }
.cart-ctrl { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.stepper { width: 34px; flex: 0 0 34px; height: 34px; padding: 0; margin: 0; border-radius: 8px; border: 1px solid #333; background: #1a1a1d; color: var(--line); font-size: 18px; line-height: 1; }
.cart-qty { min-width: 22px; text-align: center; font-weight: 700; }
.cart-note { margin: 6px 0 0; font-size: 14px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; font-size: 17px; font-weight: 700; }
.cart-total #cartTotal { color: var(--accent); }

/* My Orders */
.order-row { padding: 12px 0; border-bottom: 1px solid #262626; }
.order-row:last-of-type { border-bottom: none; }
.order-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.order-badge { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #262626; color: var(--muted); }
.order-badge.status-ready, .order-badge.status-completed { background: rgba(92,166,106,.18); color: var(--ok); }
.order-badge.status-received, .order-badge.status-preparing { background: rgba(200,160,106,.18); color: var(--accent); }
.order-badge.status-cancelled { background: rgba(217,83,79,.18); color: var(--danger); }
.order-total { font-weight: 700; }
.order-hint { color: var(--line); font-size: 13px; margin-top: 4px; }
/* 3-step order progress */
.order-steps { display: flex; gap: 6px; margin: 8px 0 2px; }
.order-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.order-step-dot { width: 12px; height: 12px; border-radius: 999px; background: #333; z-index: 1; }
.order-step::before { content: ''; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: #333; }
.order-step:first-child::before { display: none; }
.order-step.on .order-step-dot { background: var(--ok); }
.order-step.on::before { background: var(--ok); }
.order-step.current .order-step-dot { box-shadow: 0 0 0 3px rgba(92,166,106,.3); }
.order-step-label { font-size: 11px; color: var(--muted); }
.order-step.current .order-step-label { color: var(--line); font-weight: 700; }
.order-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* Order-placed confirmation banner */
.order-confirm { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 12px;
  background: rgba(92,166,106,.14); border: 1px solid rgba(92,166,106,.5); border-radius: 14px; }
.oc-check { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px; background: var(--ok);
  color: #0d0d0d; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.oc-text { display: flex; flex-direction: column; }
.oc-text strong { font-size: 16px; }
.oc-text span { color: var(--muted); font-size: 13px; margin-top: 2px; }
.order-lines { margin-top: 10px; padding-top: 8px; border-top: 1px solid #1f1f1f; }
.order-line { padding: 6px 0; }
.order-line-main { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.order-line-name { font-size: 14px; font-weight: 600; }
.order-line-price { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.order-line-mods { color: var(--muted); font-size: 12px; margin-top: 2px; }
.order-line-note { color: var(--muted); font-size: 12px; font-style: italic; margin-top: 2px; }

/* Cart count badge on tab */
.cart-badge { display: inline-block; min-width: 17px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; vertical-align: middle; }

/* Tab bar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 460px; margin: 0 auto; display: flex; background: var(--bar); border-top: 1px solid #3a3a3c; padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 4px; border: none; border-radius: 0; margin: 0; padding: 9px 0 10px; font-size: 11px; letter-spacing: 0.4px; font-weight: 600; color: var(--muted); position: relative; }
.tabbar button.active { color: var(--accent); }
.tab-ic { width: 22px; height: 22px; background: var(--muted);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.tabbar button.active .tab-ic { background: var(--accent); }

/* Hero coffee backdrop (from the original G.O.A.T. app) — shown on onboarding + Card tab */
.hero-bg { position: fixed; top: 0; left: 0; right: 0; max-width: 460px; margin: 0 auto; height: 38vh; z-index: -1; pointer-events: none;
  background: url('assets/hero.jpg') center top / cover no-repeat; opacity: 0; transition: opacity .35s ease; }
.hero-bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,21,23,.30) 0%, rgba(21,21,23,.62) 55%, var(--bg) 100%); }
body.show-hero .hero-bg { opacity: 1; }
body.tall-hero .hero-bg { height: 46vh; }
body.show-hero .brand-mark img { mix-blend-mode: screen; } /* hide the logo's black box over the photo */
body.show-hero .card.points { background: rgba(18,14,10,.68); backdrop-filter: blur(10px); border-color: rgba(255,255,255,.10); }
body.show-hero #ob.card { background: rgba(18,14,10,.72); backdrop-filter: blur(10px); border-color: rgba(255,255,255,.10); }

/* Onboarding method toggle (Phone / Email) */
.ob-method-toggle { display: flex; gap: 0; margin-bottom: 18px; border: 1px solid #333; border-radius: var(--radius); overflow: hidden; }
.ob-method-btn { flex: 1; padding: 11px 0; margin: 0; border: none; border-radius: 0; background: transparent; color: var(--muted); font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.ob-method-btn.active { background: var(--accent); color: var(--accent-ink); }
.ob-method-btn:not(.active):hover { background: #1f1f1f; color: var(--line); }

/* Onboarding mode toggle (Sign up / Log in) */
.ob-mode-toggle { display: flex; gap: 0; margin-bottom: 14px; border: 1px solid #333; border-radius: 10px; overflow: hidden; }
.ob-mode-btn { flex: 1; padding: 9px 0; margin: 0; border: none; border-radius: 0; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.ob-mode-btn.active { background: #262626; color: var(--line); }
.ob-mode-btn:not(.active):hover { background: #1a1a1a; color: var(--muted); }

/* "More sign-in options" note */
.ob-more-options { color: #555; font-size: 12px; text-align: center; margin: 14px 0 0; }
