/* SUB91 customer app styles.
   Brand colours are taken from the logo: green, cheese yellow, bun orange. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/fonts/plus-jakarta-sans.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

/* ---------- Colours (light) ---------- */
:root {
  --green: #277D3D;
  --green-deep: #17552A;
  --yellow: #FCBE00;
  --orange: #F09337;
  --brown: #98500F;

  --bg: #FFF8EA;
  --surface: #FFFFFF;
  --surface-2: #FFEFCB;
  --stub: #FFF6DD; /* coupon stub under the tear line */
  --ink: #14231A;
  --muted: #5B6A5F;
  --line: #EBDDBF;
  --accent: #277D3D;
  --nonveg: #A8321F;
  --shadow: 0 1px 2px rgba(60, 40, 0, .06), 0 10px 28px -12px rgba(60, 40, 0, .22);
  --glass: rgba(255, 248, 234, .82);

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --radius: 22px;
  color-scheme: light;
}

/* ---------- Colours (dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C140F;
    --surface: #162119;
    --surface-2: #1F2E23;
    --stub: #1B2A20;
    --ink: #F3F6EC;
    --muted: #9CAB9F;
    --line: #2A3B2F;
    --accent: #5FC57D;
    --nonveg: #F0806C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 30px -14px rgba(0, 0, 0, .7);
    --glass: rgba(12, 20, 15, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C140F;
  --surface: #162119;
  --surface-2: #1F2E23;
  --stub: #1B2A20;
  --ink: #F3F6EC;
  --muted: #9CAB9F;
  --line: #2A3B2F;
  --accent: #5FC57D;
  --nonveg: #F0806C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 30px -14px rgba(0, 0, 0, .7);
  --glass: rgba(12, 20, 15, .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
img { max-width: 100%; display: block; }
svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 10px; }
.noscript { padding: 40px 20px; text-align: center; }

html, body { overflow-x: clip; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}
.brand { display: flex; align-items: center; min-height: 48px; }
.brand img { height: 50px; width: auto; margin-left: -3px; /* the picture has a little empty space on each side */ transition: transform .5s var(--spring); }
.brand:active img { transform: scale(.94) rotate(-2deg); }
/* Dark theme uses the white-lettered logo. */
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark { display: block; }
}
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .3s var(--spring), background-color .3s;
}
.icon-btn:active { transform: scale(.9); }
.top-actions { display: flex; align-items: center; gap: 10px; }
#bell-btn { position: relative; }
#bell-btn > span { display: grid; place-items: center; }
/* How many notifications are unread. */
.bell-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  display: grid; place-items: center;
  background: #D92D20; color: #fff; font: 800 11px/1 var(--body);
  box-shadow: 0 0 0 2px var(--bg);
  animation: pop .45s var(--spring);
}
.icon-btn.on { background: var(--green); color: #fff; }

/* ---------- Page area ---------- */
main { padding: 8px 16px calc(120px + env(safe-area-inset-bottom, 0px)); outline: none; }
.page-title { font: 800 30px/1.05 var(--display); letter-spacing: -.02em; margin: 14px 2px 4px; }
.page-sub { color: var(--muted); margin: 0 2px 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.section-head h2 { font: 800 21px/1.1 var(--display); letter-spacing: -.01em; }
.section-head span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* Content appears at once, with no entrance animation (November 2026).
   Motion is kept for what the customer does and for the home banner. */

/* ---------- Hero cards (rotating banners at the top of the home screen) ---------- */
/* Cards waiting their turn sit off to one side. The deck clips them at the
   screen edges so they can never make the page wider than the phone. The
   extra room at the bottom keeps the card's shadow from being cut off. */
.hero-deck { margin: 6px -16px -22px; padding: 0 16px 22px; overflow: hidden; }
/* All cards sit in the same grid cell, so the deck is as tall as the tallest card. */
.hero-slides { display: grid; touch-action: pan-y; }
.hero {
  grid-area: 1 / 1;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: flex-start;
  min-height: 210px; padding: 20px 20px 20px;
  border-radius: 28px;
  background: var(--hero-bg); color: var(--hero-ink);
  box-shadow: 0 22px 40px -22px var(--hero-shadow);
  /* A waiting card rests to the right, smaller and tilted. */
  opacity: 0; visibility: hidden;
  transform: translateX(48px) scale(.9) rotate(2.5deg);
  transition: transform .8s var(--spring), opacity .45s var(--ease), visibility 0s .8s;
}
.hero.is-active { opacity: 1; visibility: visible; transform: none; z-index: 1; transition-delay: 0s; }
/* The card that was just showing swings away to the left. */
.hero.is-leaving { transform: translateX(-60px) scale(.88) rotate(-4deg); }

/* Colour styles. Each sets the card's own palette. */
.hero.tone-green {
  --hero-bg: radial-gradient(120% 120% at 0% 0%, #2F9249 0%, var(--green) 45%, var(--green-deep) 100%);
  --hero-ink: #fff; --hero-soft: rgba(255, 255, 255, .86); --hero-hi: var(--yellow); --hero-chip: rgba(255, 255, 255, .14);
  --hero-shadow: rgba(23, 85, 42, .8); --bun: var(--orange); --seed: var(--brown); --cheese: var(--yellow); --btn-bg: #fff; --btn-ink: #14231A;
}
.hero.tone-yellow {
  --hero-bg: radial-gradient(120% 120% at 0% 0%, #FFDC5C 0%, var(--yellow) 50%, #F0A400 100%);
  --hero-ink: #1B1500; --hero-soft: rgba(27, 21, 0, .78); --hero-hi: var(--green-deep); --hero-chip: rgba(255, 255, 255, .5);
  --hero-shadow: rgba(190, 130, 0, .75); --bun: var(--orange); --seed: var(--brown); --cheese: var(--green); --btn-bg: #1B1500; --btn-ink: #fff;
}
.hero.tone-orange {
  --hero-bg: radial-gradient(120% 120% at 0% 0%, #FFB868 0%, var(--orange) 50%, #D8701A 100%);
  --hero-ink: #2A1300; --hero-soft: rgba(42, 19, 0, .8); --hero-hi: #fff; --hero-chip: rgba(255, 255, 255, .36);
  --hero-shadow: rgba(180, 90, 10, .75); --bun: var(--yellow); --seed: var(--brown); --cheese: var(--green-deep); --btn-bg: #2A1300; --btn-ink: #fff;
}
.hero.tone-dark {
  --hero-bg: radial-gradient(120% 120% at 0% 0%, #2A4232 0%, #14231A 55%, #0A120D 100%);
  --hero-ink: #fff; --hero-soft: rgba(255, 255, 255, .8); --hero-hi: var(--yellow); --hero-chip: rgba(255, 255, 255, .12);
  --hero-shadow: rgba(0, 0, 0, .6); --bun: var(--orange); --seed: var(--brown); --cheese: var(--yellow); --btn-bg: var(--yellow); --btn-ink: #1B1500;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px;
  background: var(--hero-chip);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hero-hi); position: relative; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--hero-hi); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { to { transform: scale(3.2); opacity: 0; } }
.hero-title { font: 800 clamp(29px, 8.8vw, 38px)/1 var(--display); letter-spacing: -.03em; margin: 12px 0 8px; max-width: 11ch; text-wrap: balance; }
.hero-title em { font-style: normal; color: var(--hero-hi); display: block; }
.hero p { color: var(--hero-soft); max-width: 25ch; font-size: 14.5px; }
.hero .btn { margin-top: 14px; min-height: 44px; background: var(--btn-bg); color: var(--btn-ink); }

/* When a card arrives, its words rise in one after another. */
.hero.is-active .hero-eyebrow, .hero.is-active .hero-title, .hero.is-active p, .hero.is-active .btn { animation: hero-rise .65s var(--ease) both; }
.hero.is-active .hero-eyebrow { animation-delay: .12s; }
.hero.is-active .hero-title { animation-delay: .2s; }
.hero.is-active p { animation-delay: .3s; }
.hero.is-active .btn { animation-delay: .4s; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } }

/* Decorative shapes borrowed from the logo: bun, cheese triangle, sesame seeds. */
.hero-bun {
  position: absolute; z-index: -1; right: -46px; top: 26px;
  width: 190px; height: 104px; border-radius: 95px 95px 16px 16px;
  background: var(--bun); transform: rotate(-14deg);
}
.hero-bun::before, .hero-bun::after {
  content: ''; position: absolute; width: 9px; height: 13px; border-radius: 50%; background: var(--seed);
  box-shadow: 26px -8px 0 var(--seed), 52px 6px 0 var(--seed), 18px 22px 0 var(--seed);
}
.hero-bun::before { left: 30px; top: 30px; }
.hero-bun::after { left: 96px; top: 22px; }
.hero-cheese {
  position: absolute; z-index: -1; right: 34px; bottom: -14px;
  width: 92px; height: 78px; background: var(--cheese);
  clip-path: polygon(0 0, 100% 0, 68% 100%);
}
.hero-ring {
  position: absolute; z-index: -2; left: -70px; bottom: -110px;
  width: 240px; height: 240px; border-radius: 50%;
  border: 34px solid rgba(255, 255, 255, .07);
}
/* The bun drops in from the corner and the cheese pops up, then both float gently. */
.hero.is-active .hero-bun { animation: bun-in .85s var(--spring) both, float 7s ease-in-out .85s infinite; }
.hero.is-active .hero-cheese { animation: cheese-in .7s var(--spring) .18s both, float 6s ease-in-out .9s infinite; }
@keyframes bun-in { from { opacity: 0; transform: translate(70px, -50px) rotate(24deg); } }
@keyframes cheese-in { from { opacity: 0; transform: translateY(80px) rotate(28deg); } }
@media (max-width: 420px) {
  .hero-bun { width: 150px; height: 82px; top: 10px; right: -44px; transform: rotate(-8deg); }
  .hero-cheese { width: 70px; height: 60px; right: 22px; }
}
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Dots under the deck. The current one stretches into a bar that fills over 3 seconds. */
.hero-dots { display: flex; justify-content: center; align-items: center; gap: 2px; margin-top: 8px; }
.hero-dots button { padding: 10px 4px; }
.hero-dots span { display: block; width: 8px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; transition: width .5s var(--spring); }
.hero-dots i { display: block; width: 0; height: 100%; border-radius: 99px; background: var(--accent); }
.hero-dots .on span { width: 34px; }
.hero-dots .on i { animation: dot-fill 3s linear forwards; }
.hero-deck.no-auto .hero-dots .on i { animation: none; width: 100%; }
@keyframes dot-fill { to { width: 100%; } }

/* ---------- "Add to home screen" card ---------- */
.install-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 40px 10px 10px; position: relative; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.install-card img { flex: none; width: 42px; height: 42px; border-radius: 12px; }
.install-card div { flex: 1; min-width: 0; line-height: 1.3; }
.install-card b { display: block; font-size: 14.5px; }
.install-card small { color: var(--muted); font-size: 12.5px; }
.install-card .btn { flex: none; min-height: 42px; padding: 0 14px; }
.install-close { position: absolute; top: 0; right: 0; width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.install-close svg { width: 16px; height: 16px; }
.install-card.no-close { padding-right: 12px; margin-top: 0; }
.install-steps { flex-basis: 100%; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }

.test-note { margin-top: 16px; padding: 12px 14px; border-radius: 16px; border: 2px dashed var(--orange); color: var(--ink); font-size: 13px; line-height: 1.45; }
.test-note b { display: block; }

/* ---------- "Turn on offer alerts" card ---------- */
.alerts-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 40px 10px 10px; position: relative; border-radius: 20px; background: var(--yellow); color: #1B1500; box-shadow: var(--shadow); }
.alerts-card .bell { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .55); animation: ring 2.4s var(--ease) 1s 2; transform-origin: 50% 10%; }
.alerts-card div { flex: 1; min-width: 0; line-height: 1.3; }
.alerts-card b { display: block; font-size: 14.5px; }
.alerts-card small { font-size: 12.5px; opacity: .8; }
.alerts-card .btn { flex: none; min-height: 42px; padding: 0 14px; background: #1B1500; color: #fff; }
.alerts-card .install-close { color: #1B1500; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } 50% { transform: rotate(-6deg); } }
.alerts-note { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* ---------- "You are offline" page ---------- */
.offline-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.offline-page img { width: 170px; height: auto; margin-bottom: 20px; }
.offline-page .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .offline-page .logo-light { display: none; }
  :root:not([data-theme="light"]) .offline-page .logo-dark { display: block; }
}
:root[data-theme="dark"] .offline-page .logo-light { display: none; }
:root[data-theme="dark"] .offline-page .logo-dark { display: block; }

/* ---------- Plain information pages (e.g. /delete-account) ---------- */
.info-page {
  max-width: 560px; margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(32px + env(safe-area-inset-bottom, 0px));
}
.info-logo { display: inline-block; }
.info-logo img { width: 120px; height: auto; }
.info-logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .info-logo .logo-light { display: none; }
  :root:not([data-theme="light"]) .info-logo .logo-dark { display: block; }
}
:root[data-theme="dark"] .info-logo .logo-light { display: none; }
:root[data-theme="dark"] .info-logo .logo-dark { display: block; }
.info-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px; }
.info-card h2 { font: 700 19px/1.2 var(--display); margin: 0 0 8px; }
.info-card p, .info-card li { color: var(--muted); }
.info-card p { margin: 8px 0 0; }
.info-card ul, .info-card ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.info-card a:not(.btn) { color: var(--accent); text-decoration: underline; }
.info-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.info-foot { text-align: center; margin-top: 18px; }
.info-foot a { color: var(--muted); text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Offer cards (coupon style) ---------- */
.offers { display: grid; gap: 18px; }
.offer {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .35s var(--ease);
}
.offer:active { transform: scale(.985); }

.offer-art {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 150px; padding: 16px 18px 18px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  background: var(--tone); color: var(--on-tone);
}
.tone-0 { --tone: var(--yellow); --on-tone: #1B1500; --blob: rgba(255, 255, 255, .34); --shape: var(--green); }
.tone-1 { --tone: var(--green); --on-tone: #fff; --blob: rgba(255, 255, 255, .1); --shape: var(--yellow); }
.tone-2 { --tone: var(--orange); --on-tone: #2A1300; --blob: rgba(255, 255, 255, .26); --shape: var(--green-deep); }
.offer-art::before {
  content: ''; position: absolute; z-index: -1; right: -60px; top: -70px;
  width: 210px; height: 210px; border-radius: 50%; background: var(--blob);
  transition: transform .9s var(--ease);
}
.offer-art::after {
  content: ''; position: absolute; z-index: -1; right: 26px; bottom: -10px;
  width: 58px; height: 50px; background: var(--shape);
  clip-path: polygon(0 0, 100% 0, 68% 100%);
  transition: transform .9s var(--spring);
}
/* An offer with a picture shows the WHOLE picture at its own shape (wide,
   square or tall), never cropped, with nothing on top of it. Below it one row
   holds the tag and title on the left and the heart (save) on the right. */
.offer-art.has-img { display: block; min-height: 0; padding: 0; gap: 0; background: var(--surface); color: var(--ink); }
.offer-art.has-img::before, .offer-art.has-img::after { display: none; }
.offer-art img { display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: var(--surface-2); }
.offer-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px 0; }
.offer-head > div { flex: 1; min-width: 0; display: grid; justify-items: start; gap: 6px; padding-top: 4px; }
.offer-head .offer-title { max-width: none; font-size: 22px; line-height: 1.1; }
.offer-head .tag { background: var(--surface-2); color: var(--ink); }
.offer-head .save-btn { margin: 0; background: var(--surface-2); color: var(--ink); }
.offer-head .save-btn.on { color: #D6312B; }
.offer-head + .offer-body { padding-top: 8px; }
.offer-body > .save-btn { float: right; margin: -4px -6px 6px 12px; background: var(--surface-2); color: var(--ink); }
.offer-body > .save-btn.on { color: #D6312B; }
.offer-meta { clear: both; }

.offer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tag {
  display: inline-block; padding: 5px 11px; border-radius: 99px;
  background: rgba(255, 255, 255, .9); color: #14231A;
  font-size: 12.5px; font-weight: 800; line-height: 1.3;
}
.save-btn {
  width: 44px; height: 44px; margin: -4px -6px -4px auto; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .9); color: #14231A;
  transition: transform .3s var(--spring);
}
.save-btn:active { transform: scale(.85); }
.save-btn.on { color: #D6312B; }
.save-btn.on svg { fill: currentColor; }
.save-btn.pop svg { animation: pop .5s var(--spring); }
@keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.offer-title { font: 800 27px/1.02 var(--display); letter-spacing: -.02em; max-width: 12ch; text-wrap: balance; }

.offer-body { padding: 16px 18px 4px; }
.offer-desc { color: var(--muted); }
.offer-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.offer-meta span { display: inline-flex; align-items: center; gap: 6px; }
.offer-meta svg { width: 16px; height: 16px; }
.offer-meta .urgent { color: var(--nonveg); }

/* Dashed tear line with a notch cut out of each side, like a paper coupon. */
.tear { position: relative; margin: 16px 18px 0; border-top: 2px dashed var(--line); }
.tear::before, .tear::after {
  content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); transition: background-color .4s var(--ease);
}
.tear::before { left: -29px; }
.tear::after { right: -29px; }

/* The coupon stub below the tear line: a tinted strip with the code large,
   like the part of a paper coupon you hand over at the counter. */
.coupon { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 18px; background: var(--stub); }
.coupon small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.code { display: block; font: 800 25px/1.15 var(--display); letter-spacing: .05em; color: var(--accent); word-break: break-all; }
.coupon.no-code .code { font-size: 18px; letter-spacing: 0; color: var(--ink); word-break: normal; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 99px;
  background: var(--green); color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap;
  transition: transform .25s var(--spring), background-color .3s var(--ease), color .3s;
}
.btn:active { transform: scale(.94); }
.btn svg { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.btn.soft { background: var(--surface-2); color: var(--ink); }
.btn.yellow { background: var(--yellow); color: #1B1500; }
.btn.done { background: var(--ink); color: var(--bg); }
.btn.done svg { animation: pop .45s var(--spring); }

/* ---------- Generic card and rows ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.stack { display: grid; gap: 14px; }
.stack > :empty { display: none; }
.card h3 { font: 800 18px/1.2 var(--display); }
.card p { color: var(--muted); margin-top: 4px; }
.card .btn { margin-top: 14px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row:first-of-type { padding-top: 10px; }
.row b { display: block; }
.row small { color: var(--muted); }

/* ---------- Stores ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: 18px; padding: 0 16px;
  box-shadow: var(--shadow); border: 2px solid transparent;
  transition: border-color .3s var(--ease);
}
.search:focus-within { border-color: var(--green); }
.search svg { color: var(--muted); }
.search input {
  flex: 1; min-width: 0; height: 54px; border: 0; outline: 0; background: none;
  color: var(--ink); font: 600 16px var(--body);
}
.search input::placeholder { color: var(--muted); font-weight: 500; }
.locate-row { margin: 12px 0 4px; }
.stores { display: grid; gap: 14px; }
.store-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.distance { flex: none; padding: 4px 10px; border-radius: 99px; background: var(--yellow); color: #1B1500; font-size: 12px; font-weight: 800; }
.store-lines { margin-top: 8px; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.store-lines span { display: flex; gap: 8px; align-items: flex-start; }
.store-lines svg { width: 16px; height: 16px; margin-top: 3px; }
.store-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.store-actions .btn { margin-top: 0; }
/* A store without a phone number has only Directions: let it use the full width. */
.store-actions .btn:only-child, .store-actions .btn.wide { grid-column: 1 / -1; }
/* "Order on Zomato": a quieter link under the two main buttons. */
.store-order { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin: 6px 0 -8px; font-weight: 800; font-size: 14px; color: var(--accent); }
.store-order svg { width: 16px; height: 16px; }

/* ---------- Menu ---------- */
.menu-bar {
  position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 10;
  margin: 0 -16px 6px; padding: 8px 16px 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 99px; background: var(--surface-2); }
.seg button {
  min-height: 40px; border-radius: 99px; font-weight: 700; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--muted); transition: background-color .3s var(--ease), color .3s, transform .25s var(--spring);
}
.seg button:active { transform: scale(.95); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.seg svg { width: 17px; height: 17px; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 0 14px; border-radius: 99px;
  border: 1.5px solid var(--line); font-weight: 700; font-size: 13px; white-space: nowrap;
  transition: background-color .3s, border-color .3s, transform .25s var(--spring);
}
.chip:active { transform: scale(.94); background: var(--surface-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip svg { width: 15px; height: 15px; margin: 0 6px -3px 0; }
.chip.on svg { fill: currentColor; }
.offer-chips { margin: -4px -16px 14px; }
.menu-cat { scroll-margin-top: 190px; }
.menu-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.menu-item b { font-weight: 700; }
.menu-item small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.menu-name { display: flex; gap: 10px; align-items: flex-start; }
.price { font: 800 17px/1.4 var(--display); white-space: nowrap; }
/* Indian veg / non-veg mark: a square outline with a dot. */
.mark { flex: none; width: 16px; height: 16px; margin-top: 3px; border: 2px solid var(--accent); border-radius: 4px; display: grid; place-items: center; }
.mark::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.mark.nonveg { border-color: var(--nonveg); }
.mark.nonveg::after { background: var(--nonveg); }
.menu-desc { color: var(--muted); font-size: 13.5px; margin: -6px 2px 12px; }
/* Two-price sections: both prices sit in fixed columns under small headings. */
.prices.two, .price-heads { display: grid; grid-template-columns: 62px 62px; gap: 8px; text-align: right; flex: none; }
.price-heads { margin-left: auto; width: fit-content; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.2; padding-bottom: 4px; align-items: end; }
.prices.two .price { font-size: 16px; }
/* ---------- Floating "Menu" button with a quick list of sections ---------- */
.menu-fab {
  position: fixed; z-index: 26;
  /* Stays inside the phone-width column on wide screens. */
  right: max(16px, calc(50% - 224px));
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  min-height: 50px; padding: 0 20px; border-radius: 99px;
  background: var(--ink); color: var(--bg);
  font-weight: 800; font-size: 14px; letter-spacing: .02em;
  box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .55);
  animation: fab-in .5s var(--spring) .3s backwards;
  transition: transform .3s var(--spring), background-color .3s var(--ease);
}
.menu-fab[hidden] { display: none; }
.menu-fab:active { transform: scale(.93); }
.menu-fab span { display: inline-flex; align-items: center; gap: 8px; }
.menu-fab svg { width: 18px; height: 18px; stroke-width: 2.4; }
.menu-fab .fab-close, .menu-fab.open .fab-open { display: none; }
.menu-fab.open .fab-close { display: inline-flex; }
.menu-fab.open { background: var(--green); color: #fff; }
@keyframes fab-in { from { opacity: 0; transform: translateY(20px) scale(.8); } }

.menu-sheet { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.menu-sheet.open { pointer-events: auto; }
.menu-sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .3s var(--ease); }
.menu-sheet.open .menu-sheet-backdrop { opacity: 1; }
.menu-sheet-card {
  position: absolute;
  right: max(16px, calc(50% - 224px));
  bottom: calc(158px + env(safe-area-inset-bottom, 0px));
  width: min(300px, calc(100% - 32px));
  max-height: min(60vh, 460px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px; border-radius: 22px;
  background: var(--surface); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .6);
  /* Grows out of the button's corner. */
  transform-origin: bottom right; transform: scale(.6) translateY(20px); opacity: 0; visibility: hidden;
  transition: transform .35s var(--spring), opacity .2s var(--ease), visibility 0s .35s;
}
.menu-sheet.open .menu-sheet-card { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.menu-sheet-card button {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 14px;
  font-weight: 700; font-size: 15px; text-align: left;
  transition: background-color .2s var(--ease);
}
.menu-sheet-card button:hover, .menu-sheet-card button:active { background: var(--surface-2); }
.menu-sheet-card button b { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }

.fineprint { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* ---------- Sign-up form and signed-in profile ---------- */
.form label { display: block; font-weight: 700; font-size: 13.5px; margin: 16px 0 6px; }
.form label:first-child { margin-top: 0; }
.form .optional { color: var(--muted); font-weight: 500; }
.form input:not([type="checkbox"]), .phone-field {
  width: 100%; min-height: 52px; padding: 0 14px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--bg); color: var(--ink); font: 600 16px var(--body);
  transition: border-color .3s var(--ease);
}
.form input:focus, .phone-field:focus-within { outline: 0; border-color: var(--green); }
.phone-field { display: flex; align-items: center; gap: 10px; padding-right: 0; }
.phone-field span { color: var(--muted); font-weight: 700; }
.phone-field input:not([type="checkbox"]) { border: 0; padding: 0 14px 0 0; min-height: 48px; background: none; border-radius: 0; }
.form .consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-weight: 500; font-size: 14px; cursor: pointer; }
.form .consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green); }
.form-error { color: var(--nonveg); font-weight: 700; margin-top: 14px; }
.form-note { color: var(--muted); font-size: 12.5px; margin-top: 14px; }
.form-note a { color: var(--accent); font-weight: 700; text-decoration: underline; }
[hidden] { display: none !important; }
.card.join { background: var(--surface-2); box-shadow: none; }
.who { display: flex; align-items: center; gap: 14px; }
.who p { margin-top: 2px; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font: 800 22px var(--display); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row small { display: block; color: var(--muted); font-size: 13px; }
.switch-row.plain { margin: 0; padding: 0; border: 0; }
/* A sliding on/off switch drawn over an ordinary checkbox. */
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; margin: 0; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background-color .3s var(--ease); }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); transition: transform .35s var(--spring); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.link-danger { display: block; margin: 16px auto 0; min-height: 44px; padding: 0 12px; color: var(--nonveg); font-weight: 700; font-size: 14px; text-decoration: underline; }

/* ---------- Loyalty points card ---------- */
.points-label { color: var(--muted); font-weight: 700; font-size: 13px; }
.points-big { font: 800 56px/1 var(--display); letter-spacing: -.03em; color: var(--accent); margin: 2px 0 6px; }
.points-card h4 { font: 800 15px/1.2 var(--display); margin: 18px 0 4px; }
.reward { padding: 12px 0; border-bottom: 1px solid var(--line); }
.reward:last-of-type { border-bottom: 0; }
.reward-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.reward-top span { flex: none; font-weight: 800; color: var(--accent); font-size: 13.5px; }
.reward small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 2px; }
.meter i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--green); transition: width .9s var(--ease); }
.row b.plus { color: var(--accent); }
.row b.minus { color: var(--nonveg); }

/* ---------- Notifications list ---------- */
.alert-list { display: grid; gap: 12px; }
.alert-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.alert-item.new { box-shadow: var(--shadow), inset 4px 0 0 var(--yellow); }
.alert-item .bell { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.alert-item .bell svg { width: 20px; height: 20px; }
.alert-item > div { min-width: 0; flex: 1; }
.alert-item h3 { font: 800 16.5px/1.25 var(--display); overflow-wrap: anywhere; }
.alert-item h3 em { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 3px 7px; border-radius: 8px; background: var(--yellow); color: #1b1b1b; font: 800 10.5px/1 var(--body); font-style: normal; text-transform: uppercase; letter-spacing: .04em; }
.alert-item p { margin-top: 4px; overflow-wrap: anywhere; }
.alert-item small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.alert-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-bottom: -10px; font-weight: 800; color: var(--accent); }
.alert-link svg { width: 16px; height: 16px; }

/* ---------- Empty, error and loading states ---------- */
.empty { text-align: center; padding: 34px 20px; }
.empty .bubble { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.empty .bubble svg { width: 30px; height: 30px; }
.empty h3 { font: 800 19px/1.2 var(--display); }
.empty p { color: var(--muted); margin-top: 4px; }
.empty .btn { margin-top: 16px; }
.skeleton {
  height: 150px; border-radius: var(--radius); margin-bottom: 14px;
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 300% 100%; animation: shimmer 1.4s linear infinite;
}
.skeleton.tall { height: 260px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Bottom navigation ---------- */
.tabbar {
  position: fixed; z-index: 30;
  left: 50%; translate: -50% 0;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 28px), 452px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px; border-radius: 26px;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .35);
}
.tabbar a {
  position: relative; z-index: 1; min-height: 54px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 11px; transition: color .3s var(--ease);
}
.tabbar a b { font-weight: 700; }
.tabbar a svg { transition: transform .45s var(--spring); }
.tabbar a.on { color: #fff; }
.tabbar a.on svg { transform: translateY(-1px) scale(1.12); }
.tabbar a:active svg { transform: scale(.85); }
/* The green pill that slides under the active tab. --i is the tab number. */
.tabbar-pill {
  position: absolute; top: 6px; bottom: 6px; left: 6px;
  width: calc((100% - 12px) / 4); border-radius: 20px;
  background: var(--green); box-shadow: 0 8px 18px -8px rgba(23, 85, 42, .9);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .5s var(--spring), opacity .3s;
}
.tabbar-pill.off { opacity: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 40; left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 40px);
  padding: 11px 18px; border-radius: 99px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; text-align: center;
  opacity: 0; transform: translate(-50%, 18px) scale(.94); pointer-events: none;
  transition: opacity .3s var(--ease), transform .45s var(--spring);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- People who ask their phone for less motion ---------- */
/* ---------- "Your points were used" popup (uses the welcome sheet's frame) ---------- */
.points-used-icon { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.points-used-icon svg { width: 26px; height: 26px; }
.points-used-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.points-used-list li { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); line-height: 1.4; }
.points-used-list small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
#points-used .welcome-card > p { margin: 0 0 14px; color: var(--ink); }

/* ---------- First-open welcome screen ---------- */
.welcome-sheet { position: fixed; inset: 0; z-index: 40; }
.welcome-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .3s var(--ease); }
.welcome-sheet.open .welcome-backdrop { opacity: 1; }
.welcome-card {
  position: absolute; left: 50%; bottom: 0; width: min(480px, 100%); transform: translate(-50%, 100%);
  padding: 24px 20px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0;
  background: var(--surface); box-shadow: 0 -18px 50px -18px rgba(0, 0, 0, .55); text-align: center;
  transition: transform .4s var(--spring);
}
.welcome-sheet.open .welcome-card { transform: translate(-50%, 0); }
.welcome-card img { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 10px; display: block; }
.welcome-card h2 { font: 800 23px/1.15 var(--display); letter-spacing: -.02em; }
.welcome-card > p { color: var(--muted); margin: 6px 0 16px; }
.welcome-steps { display: grid; gap: 10px; text-align: left; }
.welcome-steps .btn { min-height: 50px; }
.welcome-done { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 16px; background: var(--surface-2); font-weight: 800; color: var(--accent); }
.welcome-how { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-size: 13.5px; line-height: 1.45; }
.welcome-how b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.welcome-later { margin-top: 10px; min-height: 44px; padding: 0 18px; border: 0; background: none; color: var(--muted); font: 700 14.5px var(--body); text-decoration: underline; }
.welcome-card small { display: block; color: var(--muted); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; }
}
