/* =============================================================
   SO GOOD. — Homemade food marketplace
   Custom theme layer on top of Bootstrap 5.3
   ============================================================= */

/* -------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg-primary: #080b0a;
  --bg-secondary: #101413;
  --bg-card: #141817;
  --bg-elevated: #1a1e1d;

  /* Accent */
  --accent: #ffb800;
  --accent-hover: #e5a600;
  --accent-ink: #1a1200;
  --accent-soft: rgba(255, 184, 0, 0.12);
  --accent-soft-2: rgba(255, 184, 0, 0.2);

  /* Text */
  --text-primary: #f7f7f5;
  --text-secondary: #a6aaa7;
  --text-muted: #7b807d;

  /* Lines & states */
  --border: #292e2c;
  --border-strong: #3b423f;
  --success: #28a66a;
  --success-soft: rgba(40, 166, 106, 0.14);
  --danger: #e5544f;

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 -10px 30px rgba(0, 0, 0, 0.55);
  --shadow-accent: 0 8px 24px rgba(255, 184, 0, 0.22);

  /* Layout metrics. These are the pre-JavaScript fallbacks; app.js overwrites
     them with the bars' measured heights, which already include the safe-area
     padding — so nothing else may add env(safe-area-inset-bottom) on top. */
  --bottom-nav-item-h: 68px;
  --bottom-nav-h: calc(var(--bottom-nav-item-h) + env(safe-area-inset-bottom, 0px));
  --cta-bar-h: 82px;
  --container-max: 1360px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Bootstrap variable overrides */
  --bs-body-bg: var(--bg-primary);
  --bs-body-color: var(--text-primary);
  --bs-body-font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.55;
  --bs-border-color: var(--border);
  --bs-border-radius: var(--r-md);
  --bs-emphasis-color: var(--text-primary);
  --bs-secondary-color: var(--text-secondary);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: var(--accent-hover);
  --bs-focus-ring-color: rgba(255, 184, 0, 0.55);
  --bs-focus-ring-width: 3px;
}

/* -------------------------------------------------------------
   2. Base
   ------------------------------------------------------------- */
* {
  -webkit-tap-highlight-color: rgba(255, 184, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--bs-body-font-family);
  letter-spacing: -0.01em;
  overflow-x: hidden;
  padding-bottom: var(--bottom-nav-h);
}

body.has-cta-bar {
  padding-bottom: calc(var(--bottom-nav-h) + var(--cta-bar-h));
}

@media (min-width: 992px) {
  body,
  body.has-cta-bar {
    padding-bottom: 0;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.875rem); }
h3 { font-size: clamp(1.0625rem, 0.98rem + 0.45vw, 1.375rem); }

p { color: var(--text-secondary); }

a { text-decoration: none; }

/* `height: auto` lets the width/height HTML attributes reserve space during load
   without overriding the aspect-ratio set on gallery, hero and portrait images.
   Components that need a fixed or filled height set it in their own rule. */
img { max-width: 100%; height: auto; }

.container-xxl,
.container { max-width: var(--container-max); }

/* Rows use `g-xl-5` (3rem) gutters from xl up. Bootstrap's negative row margins
   are half the gutter, so the container padding has to grow to match or the row
   pushes 12px past the viewport on screens narrower than --container-max. */
@media (min-width: 1200px) {
  .container-xxl,
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Full-bleed media on phones, normal container padding from md up */
@media (max-width: 767.98px) {
  .bleed-sm { padding-left: 0 !important; padding-right: 0 !important; }
}

/* viewport-fit=cover lets the page run under the notch in landscape, so keep
   text clear of it below the desktop breakpoint. */
@media (max-width: 991.98px) {
  .container,
  .container-xxl {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 1440px) {
  :root { --container-max: 1400px; }
}

/* Focus visibility on dark surfaces */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.35);
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--accent-ink); }

/* Text helpers */
.text-dim { color: var(--text-secondary) !important; }
.text-faint { color: var(--text-muted) !important; }
.text-accent { color: var(--accent) !important; }
.fs-13 { font-size: 0.8125rem; }
.fs-14 { font-size: 0.875rem; }
.fs-15 { font-size: 0.9375rem; }
.fw-600 { font-weight: 600; }
.lh-tight { line-height: 1.25; }

.section-title { font-size: 1.0625rem; font-weight: 700; margin: 0; }
@media (min-width: 992px) {
  .section-title { font-size: 1.375rem; }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.link-see-all {
  /* Used on both <a> and <button>, so the button chrome is reset here */
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.link-see-all:hover { color: var(--accent-hover); }

.divider { height: 1px; background: var(--border); border: 0; opacity: 1; margin: var(--sp-5) 0; }

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* -------------------------------------------------------------
   3. Buttons
   ------------------------------------------------------------- */
.btn {
  --bs-btn-border-radius: var(--r-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.12s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-accent:hover,
.btn-accent:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
}

.btn-accent-lg { padding: 0.9rem 1.5rem; font-size: 1rem; border-radius: var(--r-md); min-height: 54px; }

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-ghost:hover { background: #222726; color: var(--text-primary); border-color: var(--border-strong); }

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(255, 184, 0, 0.45);
  border-radius: var(--r-sm);
  min-height: 48px;
  padding: 0.7rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-outline-accent:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.btn-dark-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--r-pill);
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-dark-pill:hover { background: #222726; color: var(--text-primary); }

/* Circular icon button — back / share / favourite */
.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1.125rem;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.icon-btn:hover { background: #262b29; color: var(--text-primary); }
.icon-btn.on-image {
  background: rgba(10, 12, 11, 0.62);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.icon-btn.is-active { color: var(--accent); border-color: rgba(255, 184, 0, 0.5); }
.icon-btn .bi { pointer-events: none; }

/* Round gold add button */
.btn-add {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease), background-color 0.15s var(--ease);
}
.btn-add:hover { background: var(--accent-hover); transform: scale(1.06); }
.btn-add.is-added { background: var(--success); color: #fff; }

/* -------------------------------------------------------------
   4. Panels
   ------------------------------------------------------------- */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.panel-pad { padding: var(--sp-4); }
@media (min-width: 992px) {
  .panel-pad { padding: var(--sp-5); }
}
.surface-2 { background: var(--bg-secondary); }
.surface-3 { background: var(--bg-elevated); }

/* -------------------------------------------------------------
   5. Header + mobile bars
   ------------------------------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(8, 11, 10, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.brand:hover { color: var(--text-primary); }

.location-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  padding: 8px 6px;
  min-height: 44px;
  white-space: nowrap;
}
.location-btn strong { color: var(--text-primary); font-weight: 600; }
.location-btn:hover { color: var(--text-primary); }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav .nav-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  min-height: 44px;
}
.main-nav .nav-link:hover { color: var(--text-primary); background: var(--bg-secondary); }
.main-nav .nav-link.active { color: var(--accent); background: var(--accent-soft); }

/* Between lg and xxl the header has to fit brand, location, search, five nav
   items and two actions — tighten the nav, and drop the location label once the
   inline search appears at xl. */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .main-nav .nav-link { padding-left: 0.6rem; padding-right: 0.6rem; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .app-header .location-btn > span { display: none; }
}

.header-action {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 1.05rem;
}
.header-action:hover { background: var(--bg-elevated); color: var(--text-primary); }
.header-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.625rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg-primary);
}

.mobile-bar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: var(--bg-primary);
  padding: 0.75rem 0 0.5rem;
}
.mobile-bar.is-bordered { border-bottom: 1px solid var(--border); }

.page-titlebar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
}
.page-titlebar h1 { font-size: 1.0625rem; margin: 0; }

/* Offcanvas */
.offcanvas {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-left: 1px solid var(--border);
}
.offcanvas .nav-link {
  color: var(--text-secondary);
  padding: 0.85rem 0.75rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.offcanvas .nav-link:hover { color: var(--text-primary); background: var(--bg-elevated); }
.offcanvas .nav-link.active { color: var(--accent); background: var(--accent-soft); }
.btn-close { filter: invert(1) grayscale(1) brightness(2); }

/* -------------------------------------------------------------
   6. Bottom navigation + sticky CTA bar
   ------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  /* Opaque, not translucent: iOS Safari repaints backdrop-filter on fixed
     elements poorly while the address bar collapses. */
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  /* The second shadow is a solid slab painted below the bar. iOS lags when it
     repositions fixed elements mid-swipe, and this keeps that transient strip
     filled instead of showing the page through a gap. Shadows never affect
     layout or scroll height, so it costs nothing elsewhere. */
  box-shadow: var(--shadow-lg), 0 160px 0 0 var(--bg-secondary);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  /* Promote to its own compositing layer so iOS keeps it pinned while scrolling. */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.bottom-nav a {
  flex: 1 1 0;
  /* Deliberately NOT --bottom-nav-h: app.js writes the bar's measured height
     into that one, and sizing the items from it would feed back into itself. */
  min-height: var(--bottom-nav-item-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 6px 2px;
}
.bottom-nav a .bi { font-size: 1.25rem; }
.bottom-nav a:hover { color: var(--text-primary); }
.bottom-nav a.active,
.bottom-nav a.active:hover { color: var(--accent); }
@media (min-width: 992px) {
  .bottom-nav { display: none; }
}

.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  /* --bottom-nav-h is measured from the rendered bar (safe area included), so
     it must not be added again here. */
  bottom: var(--bottom-nav-h);
  z-index: 1035;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
@media (min-width: 992px) {
  .cta-bar { display: none !important; }
}

/* -------------------------------------------------------------
   7. Search
   ------------------------------------------------------------- */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0 8px 0 14px;
  min-height: 48px;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.search-box:focus-within { border-color: var(--accent); background: var(--bg-elevated); }
.search-box .bi-search { color: var(--text-muted); font-size: 1rem; flex: 0 0 auto; }
.search-box input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-size: 0.875rem;
  padding: 12px 0;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus { outline: none; }
.search-filter-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-xs);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.search-filter-btn:hover { color: var(--accent); border-color: rgba(255, 184, 0, 0.4); }

.search-wrap { position: relative; }
.search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  display: none;
}
.search-suggest.is-open { display: block; }
.search-suggest button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  padding: 11px 12px;
  border-radius: var(--r-xs);
  font-size: 0.875rem;
  text-align: left;
}
.search-suggest button:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* -------------------------------------------------------------
   8. Hero
   ------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: linear-gradient(105deg, var(--accent) 0%, #ffd166 100%);
  color: #17130a;
}
.hero-copy { padding: 1.5rem; max-width: 64%; }
.hero-title {
  font-size: clamp(1.25rem, 1rem + 1.7vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: #17130a;
  margin-bottom: 0.75rem;
}
.hero-sub { color: rgba(23, 19, 10, 0.72); font-weight: 500; }
.hero-img {
  position: absolute;
  right: -20px;
  bottom: -16px;
  width: 46%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-pill);
  border: 6px solid rgba(255, 255, 255, 0.3);
}
.btn-hero {
  background: #12100a;
  color: #fff;
  border-radius: var(--r-pill);
  padding: 0.6rem 1.25rem;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
}
.btn-hero:hover { background: #000; color: #fff; }
.hero-stats { display: none; }

@media (min-width: 768px) {
  .hero-copy { padding: 2rem; }
}

@media (min-width: 992px) {
  .hero { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: stretch; }
  .hero-copy { padding: 3rem; max-width: none; align-self: center; }
  .hero-img {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 360px;
    /* Keeps a portrait crop from stretching the hero row taller than the copy */
    aspect-ratio: 16 / 11;
    border-radius: 0;
    border: 0;
  }
  .hero-stats { display: flex; gap: 2.25rem; margin-top: 1.75rem; }
  .hero-stats strong { display: block; font-size: 1.5rem; font-weight: 800; color: #17130a; line-height: 1.1; }
  .hero-stats span { font-size: 0.8125rem; color: rgba(23, 19, 10, 0.72); font-weight: 600; }
}

/* -------------------------------------------------------------
   9. Horizontal rails
   ------------------------------------------------------------- */
.hscroll {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; }

/* Rails become grids from md up */
@media (min-width: 768px) {
  .hscroll.to-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    gap: var(--sp-4);
  }
  .hscroll.to-grid > * { width: auto !important; }
}
@media (min-width: 992px) {
  .hscroll.to-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .hscroll.to-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); }
}

/* -------------------------------------------------------------
   10. Category buttons
   ------------------------------------------------------------- */
.cat-btn {
  background: transparent;
  border: 0;
  padding: 0;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}
.cat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 1.375rem;
  color: var(--accent);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.cat-btn:hover .cat-icon { border-color: rgba(255, 184, 0, 0.45); transform: translateY(-2px); }
.cat-btn.is-active { color: var(--text-primary); }
.cat-btn.is-active .cat-icon {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 184, 0, 0.35) inset;
}
@media (min-width: 768px) {
  .cat-btn { width: auto; }
  .cat-icon { width: 64px; height: 64px; font-size: 1.5rem; }
  .cat-btn { font-size: 0.8125rem; }
}
.cat-row {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.cat-row::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .cat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; gap: var(--sp-4); }
}

/* Sidebar category list (desktop discovery) */
.filter-side { position: sticky; top: 96px; }
.filter-list { display: flex; flex-direction: column; gap: 4px; }
.filter-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.7rem 0.85rem;
  min-height: 46px;
  text-align: left;
}
.filter-list button .bi { color: var(--accent); font-size: 1.05rem; }
.filter-list button:hover { background: var(--bg-elevated); color: var(--text-primary); }
.filter-list button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(255, 184, 0, 0.35);
}

/* -------------------------------------------------------------
   11. Cook + food cards
   ------------------------------------------------------------- */
.cook-card {
  width: 168px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: block;
  color: inherit;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.cook-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.cook-card .media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.cook-card .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cook-card .body { padding: 0.75rem; }
.cook-card .name { font-size: 0.875rem; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.cook-card .meta { font-size: 0.75rem; color: var(--text-secondary); margin: 0; }
@media (min-width: 576px) { .cook-card { width: 200px; } }
@media (min-width: 768px) { .cook-card { width: auto; } .cook-card .body { padding: 1rem; } .cook-card .name { font-size: 1rem; } }

.rating-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(8, 11, 10, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-pill);
  padding: 4px 9px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
}
.rating-chip .bi { color: var(--accent); font-size: 0.75rem; }

.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}
.rating .bi { color: var(--accent); }
.rating small { color: var(--text-secondary); font-weight: 500; }

.food-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: block;
  color: inherit;
  width: 180px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.food-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.food-card .media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.food-card .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.food-card .body { padding: 0.75rem; }
.food-card .title { font-size: 0.875rem; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.food-card .price { color: var(--accent); font-weight: 700; font-size: 0.9375rem; }
@media (min-width: 576px) { .food-card { width: 220px; } }
@media (min-width: 768px) { .food-card { width: auto; } .food-card .body { padding: 1rem; } .food-card .title { font-size: 1rem; } }

/* Compact dish row (cook menu, order items) */
.dish-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: inherit;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.dish-row:hover { border-color: var(--border-strong); background: var(--bg-elevated); color: inherit; }
.dish-row .thumb {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: var(--r-sm);
  object-fit: cover;
}
.dish-row .info { min-width: 0; flex: 1 1 auto; }
.dish-row .info h3 { font-size: 0.9375rem; margin: 0 0 4px; line-height: 1.3; }
.dish-row .price { color: var(--accent); font-weight: 700; }
@media (min-width: 768px) {
  .dish-row { padding: var(--sp-4); }
  .dish-row .thumb { width: 88px; height: 88px; }
}

/* -------------------------------------------------------------
   12. Badges & chips
   ------------------------------------------------------------- */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 184, 0, 0.4);
  color: var(--accent);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.chip-success { background: var(--success-soft); border-color: rgba(40, 166, 106, 0.35); color: var(--success); }
.chip-accent { background: var(--accent-soft); border-color: rgba(255, 184, 0, 0.35); color: var(--accent); }
.dot-sep { color: var(--text-muted); padding: 0 2px; }

/* -------------------------------------------------------------
   13. Cook profile
   ------------------------------------------------------------- */
.cover {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--bg-secondary);
}
.cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 11, 10, 0.55) 0%, rgba(8, 11, 10, 0) 35%, rgba(8, 11, 10, 0.9) 100%);
}
.cover-actions {
  position: absolute;
  inset: 12px 12px auto 12px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
@media (min-width: 768px) { .cover { aspect-ratio: 21 / 9; border-radius: var(--r-xl); } }
@media (min-width: 1200px) { .cover { aspect-ratio: 32 / 9; } }

.avatar {
  border-radius: var(--r-pill);
  object-fit: cover;
  border: 3px solid var(--bg-primary);
  background: var(--bg-elevated);
}
.avatar-xl { width: 88px; height: 88px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-sm { width: 36px; height: 36px; }
@media (min-width: 992px) { .avatar-xl { width: 132px; height: 132px; border-width: 5px; } }

.profile-head { position: relative; margin-top: -46px; z-index: 4; }
@media (min-width: 992px) { .profile-head { margin-top: -70px; } }

.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.stat-tile strong { display: block; font-size: 0.9375rem; font-weight: 700; line-height: 1.25; }
.stat-tile span { font-size: 0.6875rem; color: var(--text-secondary); }
@media (min-width: 768px) {
  .stat-tiles { gap: var(--sp-3); }
  .stat-tile { padding: 1rem; }
  .stat-tile strong { font-size: 1.125rem; }
  .stat-tile span { font-size: 0.75rem; }
}

/* Tabs */
.profile-tabs {
  display: flex;
  gap: var(--sp-4);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tabs .nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 0.25rem;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  min-height: 48px;
}
.profile-tabs .nav-link:hover { color: var(--text-primary); }
.profile-tabs .nav-link.active { color: var(--accent); border-bottom-color: var(--accent); background: transparent; }

.bio-text { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; margin: 0; }
.bio-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bio-clamp.is-open { -webkit-line-clamp: unset; display: block; }
.read-toggle {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 8px 0;
  min-height: 44px;
}
.read-toggle:hover { color: var(--accent-hover); }

.availability-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 184, 0, 0.35);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Sticky desktop sidebar */
.sticky-side { position: sticky; top: 96px; }

/* -------------------------------------------------------------
   14. Food details
   ------------------------------------------------------------- */
.food-hero { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.food-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.food-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, rgba(8, 11, 10, 0) 0%, var(--bg-primary) 100%);
}
@media (min-width: 992px) {
  .food-hero { aspect-ratio: 4 / 3.2; border-radius: var(--r-xl); }
  .food-hero::after { display: none; }
}

.gallery-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.gallery-strip img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.price-tag { color: var(--accent); font-weight: 800; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); white-space: nowrap; }

.allergen-list { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.allergen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 62px;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.allergen-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.125rem;
}

.detail-list { display: flex; flex-direction: column; }
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.detail-row:last-child { border-bottom: 0; }
.detail-row .label { display: inline-flex; align-items: center; gap: 10px; color: var(--text-secondary); }
.detail-row .label .bi { color: var(--accent); font-size: 1rem; }
.detail-row .value { font-weight: 600; text-align: right; }

/* Delivery selector */
.delivery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.delivery-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  min-height: 60px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.delivery-option .bi { font-size: 1.05rem; }
.delivery-option .opt-price { margin-left: auto; font-weight: 700; color: var(--text-primary); font-size: 0.8125rem; }
.delivery-option:hover { border-color: var(--border-strong); }
.delivery-option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.delivery-option.is-selected .opt-price { color: var(--accent); }
.delivery-option input { position: absolute; opacity: 0; pointer-events: none; }
.delivery-option:focus-within { box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.35); }

/* Quantity selector */
.qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 4px;
}
.qty button {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1.125rem;
  display: grid;
  place-items: center;
}
.qty button:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.qty output { min-width: 44px; text-align: center; font-weight: 700; font-size: 1rem; }

/* -------------------------------------------------------------
   15. Verification
   ------------------------------------------------------------- */
.verify-shell { max-width: 760px; margin-inline: auto; }
.step-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  color: var(--text-primary);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.step-card:hover { border-color: var(--border-strong); background: var(--bg-elevated); }
.step-card.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.step-card .step-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 184, 0, 0.35);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}
.step-card h3 { font-size: 0.9375rem; margin: 0 0 4px; }
.step-card p { font-size: 0.8125rem; margin: 0; }
.step-status {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: center;
  font-size: 1.25rem;
  color: var(--text-muted);
}
.step-card.is-selected .step-status { color: var(--accent); }
.step-card.is-done .step-icon { background: var(--success-soft); border-color: rgba(40, 166, 106, 0.4); color: var(--success); }
.step-card.is-done .step-status { color: var(--success); }

.privacy-note {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.privacy-note .bi { color: var(--accent); font-size: 0.9375rem; flex: 0 0 auto; }

.why-item { display: flex; align-items: flex-start; gap: 10px; padding: 0.5rem 0; font-size: 0.875rem; color: var(--text-secondary); }
.why-item .bi { color: var(--success); font-size: 1.05rem; flex: 0 0 auto; margin-top: 1px; }

.shield-art {
  width: 100%;
  max-width: 220px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: var(--r-xl);
  background: radial-gradient(circle at 50% 40%, rgba(255, 184, 0, 0.22), rgba(255, 184, 0, 0) 62%);
}
.shield-art .bi { font-size: 5.5rem; color: var(--accent); }
@media (min-width: 992px) { .shield-art { max-width: 280px; } .shield-art .bi { font-size: 7rem; } }

.progress-thin {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-thin span { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width 0.35s var(--ease); }

/* -------------------------------------------------------------
   16. About cook / editorial
   ------------------------------------------------------------- */
.editorial p { font-size: 0.9375rem; line-height: 1.7; }
.pull-quote {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--text-primary);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  font-style: italic;
}
.portrait {
  width: 100%;
  border-radius: var(--r-lg);
  object-fit: cover;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
}
/* In the mobile/tablet reading flow the portrait sits inside the story rather
   than in the sidebar, so it is capped and centred instead of full-bleed. */
@media (max-width: 991.98px) {
  .portrait { display: block; max-width: 340px; margin-inline: auto; }
}
.certificate {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
}
.certificate img {
  width: 108px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: #fff;
}
.cert-seal {
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8125rem;
  border: 2px solid var(--bg-card);
}
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  height: 100%;
}
.review-card p { font-size: 0.8125rem; margin: 0; line-height: 1.6; }

/* -------------------------------------------------------------
   17. Order tracking
   ------------------------------------------------------------- */
.tracker { display: flex; align-items: flex-start; }
.tracker-step { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; min-width: 0; }
.tracker-dot {
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-size: 0.9375rem;
  position: relative;
  z-index: 2;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.tracker-label { font-size: 0.6875rem; font-weight: 600; color: var(--text-muted); text-align: center; line-height: 1.25; }
.tracker-step::before {
  content: "";
  position: absolute;
  top: 17px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.tracker-step:first-child::before { display: none; }
.tracker-step.is-done .tracker-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tracker-step.is-done .tracker-label { color: var(--text-secondary); }
.tracker-step.is-done::before { background: var(--accent); }
.tracker-step.is-current .tracker-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 5px rgba(255, 184, 0, 0.16);
}
.tracker-step.is-current .tracker-label { color: var(--accent); font-weight: 700; }
@media (min-width: 768px) {
  .tracker-dot { width: 42px; height: 42px; font-size: 1.0625rem; }
  .tracker-label { font-size: 0.8125rem; }
  .tracker-step::before { top: 21px; }
}

.order-line {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.order-line:last-of-type { border-bottom: 0; }
.order-line img { width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover; flex: 0 0 auto; }
.order-line .qty-tag { font-size: 0.75rem; color: var(--text-secondary); }

.totals-row { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: 0.875rem; padding: 6px 0; color: var(--text-secondary); }
.totals-row.total { font-size: 1.0625rem; font-weight: 700; color: var(--text-primary); padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }

.status-strip {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 184, 0, 0.3);
  border-radius: var(--r-md);
  padding: var(--sp-4);
}
.status-strip .bi { font-size: 1.75rem; color: var(--accent); }

.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    linear-gradient(0deg, rgba(255, 184, 0, 0.05), rgba(255, 184, 0, 0.05)),
    repeating-linear-gradient(0deg, #14211c 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, #14211c 0 1px, transparent 1px 34px),
    var(--bg-elevated);
}
.map-embed::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 46%, rgba(255, 184, 0, 0.18) 46.5%, rgba(255, 184, 0, 0.18) 48%, transparent 48.5%),
    linear-gradient(20deg, transparent 62%, rgba(166, 170, 167, 0.12) 62.4%, rgba(166, 170, 167, 0.12) 63.6%, transparent 64%);
}
.map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-accent);
}

/* -------------------------------------------------------------
   18. Footer
   ------------------------------------------------------------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-7);
  padding: var(--sp-6) 0 var(--sp-5);
}
.site-footer h4 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.85rem; }
.site-footer a { color: var(--text-secondary); font-size: 0.875rem; display: inline-block; padding: 5px 0; }
.site-footer a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  padding: 0;
}
.footer-social a:hover { color: var(--accent); border-color: rgba(255, 184, 0, 0.4); }
@media (max-width: 991.98px) {
  .site-footer { padding-bottom: var(--sp-5); }
}

/* -------------------------------------------------------------
   19. Toast feedback
   ------------------------------------------------------------- */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-h) + var(--cta-bar-h) + 16px);
  /* keeps clear of both fixed bars; both custom properties already include the safe area */
  transform: translate(-50%, 12px);
  z-index: 1080;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  max-width: calc(100vw - 32px);
}
.app-toast .bi { color: var(--success); font-size: 1.05rem; }
.app-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 992px) {
  .app-toast { bottom: 28px; }
}

/* -------------------------------------------------------------
   20. Motion preferences
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
