/* ==========================================================================
   SHU BADNA NEKOL — Design System
   Mobile-first. Dark only. IBM Plex Sans Arabic.
   Breakpoints: 600 / 900 / 1200
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #0a0d0c;
  --bg-2: #0d1110;
  --surface: #131817;
  --surface-2: #1a2120;
  --surface-3: #222a29;

  /* Lines */
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #f3f6f5;
  --text-2: #a6b0ad;
  --text-3: #7c8683;
  --text-invert: #05100e;

  /* Brand — teal lifted from the logo */
  --accent: #19a99d;
  --accent-2: #22c0b3;
  --accent-dim: rgba(25, 169, 157, 0.14);
  --accent-line: rgba(25, 169, 157, 0.38);

  /* Cyan highlight ring used by the brand + restaurant logo badges */
  --glow: #35c9ff;
  --glow-ring: rgba(140, 226, 255, 0.95);
  --glow-halo: rgba(53, 201, 255, 0.5);

  /* Semantic */
  --open: #3fbf7f;
  --open-dim: rgba(63, 191, 127, 0.14);
  --closed: #e5654e;
  --closed-dim: rgba(229, 101, 78, 0.14);
  --wa: #25d366;
  --wa-ink: #05100e;
  --danger: #e5544d;
  --danger-dim: rgba(229, 84, 77, 0.14);

  /* Type */
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, -apple-system,
    sans-serif;
  --t-display: 27px;
  --t-h1: 22px;
  --t-h2: 19px;
  --t-h3: 16.5px;
  --t-body: 15.5px;
  --t-sm: 14px;
  --t-xs: 13px;
  --t-2xs: 12px;

  /* Space (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 48px;
  --sp-10: 64px;

  --pad: 16px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Elevation */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-2: 0 10px 30px rgba(0, 0, 0, 0.45);
  --sh-fab: 0 6px 20px rgba(0, 0, 0, 0.5);

  /* Motion — legacy tokens (kept for existing rules) */
  --dur: 150ms;
  --dur-2: 220ms;
  --dur-3: 200ms;
  --dur-4: 400ms;
  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Motion — scale (the system every new rule uses) */
  --m-instant: 90ms; /* press / release / haptic */
  --m-fast: 150ms; /* chips, focus, hover, clear */
  --m-base: 220ms; /* micro entrance, back navigation */
  --m-page: 260ms; /* page enter */
  --m-slow: 420ms; /* card entrance, photo develop, reveals */
  --m-morph: 560ms; /* shared-element photo morph */
  --m-moment: 900ms; /* category food moment (hard cap) */
  --m-stagger: 32ms; /* list cadence, max 6 items */

  --e-out: cubic-bezier(0.16, 1, 0.3, 1); /* entrances, morphs */
  --e-inout: cubic-bezier(0.65, 0, 0.35, 1); /* exits, scene dissolve */
  --e-spring: cubic-bezier(0.34, 1.4, 0.5, 1); /* one-shots only */

  /* Layout */
  --bar-h: 56px;
}

/* --------------------------------------------------------------------------
   2. RESET / BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.65;
  font-weight: 400;
  direction: rtl;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  border-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

p {
  line-height: 1.7;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

[hidden] {
  display: none !important;
}

.is-broken {
  visibility: hidden;
}

/* Photo develop: images start soft and resolve once decoded. Only images the
   JS layer renders carry this class, so a no-JS page keeps its artwork. */
.fade-img {
  opacity: 0;
  transition: opacity var(--dur-4) var(--ease-out);
}

.fade-img.is-loaded {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   3. SHELL / LAYOUT
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.view-page {
  display: none;
}

.view-page.active {
  display: block;
  /* Page transition: opacity + travel. The animation restarts on every
     display toggle, so back-navigation can invert the direction. */
  animation: page-in var(--m-page) var(--e-out) backwards;
}

.view-page.active.is-back {
  animation-name: page-in-back;
  animation-duration: var(--m-base);
}

/* While a View Transition morphs a photo, the entering page must not also
   fade in on top of it (double motion). */
html.vt-running .view-page.active {
  animation: none;
}

/* --- App bar ------------------------------------------------------------ */
.appbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 13, 12, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.appbar-inner {
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.appbar-back {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-inline-start: -8px;
  border-radius: var(--r-sm);
  color: var(--text);
  flex: 0 0 auto;
  transition: background var(--dur) var(--ease);
}

.appbar-back svg {
  width: 22px;
  height: 22px;
}

.appbar-back:active {
  background: var(--surface-2);
}

.appbar-title {
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.appbar-spacer {
  flex: 1;
}

/* --- Main --------------------------------------------------------------- */
.main {
  flex: 1 0 auto;
  padding-block: var(--sp-5) var(--sp-8);
}

/* --- Footer ------------------------------------------------------------- */
.appfoot {
  border-top: 1px solid var(--line);
  padding-block: var(--sp-5);
  /* clears the floating WhatsApp button on small screens */
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  margin-top: auto;
}

.appfoot-inner {
  text-align: center;
}

.appfoot-link {
  display: inline-block;
  font-size: var(--t-2xs);
  color: var(--text-3);
  letter-spacing: 0.02em;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease);
}

.appfoot-link:hover {
  color: var(--text-2);
}

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY HELPERS
   -------------------------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 4px;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.section-title {
  font-size: var(--t-h2);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section-sub {
  font-size: var(--t-xs);
  color: var(--text-3);
  min-width: 0;
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 46px;
  padding: 0 var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--t-body);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease);
  user-select: none;
}

.btn:active {
  transform: scale(0.985);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-invert);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-2);
}

.btn-wa {
  background: var(--wa);
  color: var(--wa-ink);
  font-weight: 700;
}

.btn-wa:hover {
  background: #2ee073;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--text-2);
}

.btn-quiet:hover {
  background: var(--surface);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-dim);
  border-color: rgba(229, 84, 77, 0.34);
  color: #f0897f;
}

.btn-danger:hover {
  background: rgba(229, 84, 77, 0.22);
}

.btn-sm {
  min-height: 38px;
  padding: 0 var(--sp-3);
  font-size: var(--t-xs);
  border-radius: var(--r-sm);
  gap: 6px;
}

.btn-sm svg {
  width: 15px;
  height: 15px;
}

.btn-lg {
  min-height: 52px;
  font-size: var(--t-h3);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* --------------------------------------------------------------------------
   6. CHIPS / STATUS
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: var(--t-2xs);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.chip-accent {
  background: var(--accent);
  color: var(--text-invert);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: var(--t-2xs);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.status.is-open {
  background: var(--open-dim);
  color: var(--open);
}

.status.is-closed {
  background: var(--closed-dim);
  color: var(--closed);
}

/* --- Rating (sits beside the status chip, never on its own) ------------- */
.rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  line-height: 1;
  white-space: nowrap;
  /* Always reads ★5 — mark first, value second — whatever the page
     direction is. isolate keeps it from bleeding into surrounding RTL. */
  direction: ltr;
  unicode-bidi: isolate;
}

.rating-star {
  color: #f0b429;
  font-size: 13px;
  line-height: 1;
}

.rating--sm .rating-star {
  font-size: 12px;
}

.rating-stars {
  position: relative;
  display: inline-block;
  font-size: 13px;
  letter-spacing: 1.5px;
  line-height: 1;
}

.rating-stars-track {
  color: rgba(255, 255, 255, 0.16);
}

.rating-stars-fill {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  overflow: hidden;
  color: #f0b429;
  letter-spacing: 1.5px;
  pointer-events: none;
  /* Width comes from --fill (set in markup); the sweep itself is a pure
     transform so it stays on the compositor. Grows from the inline-start
     edge — right in RTL, left in LTR. */
  width: var(--fill, 0%);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--m-slow) var(--e-out);
}

[dir="ltr"] .rating-stars-fill {
  transform-origin: left center;
}

.rating.is-shown .rating-stars-fill {
  transform: scaleX(1);
}

.rating-value {
  font-size: var(--t-2xs);
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.rating--sm .rating-stars {
  font-size: 12px;
}

.rating--sm .rating-value {
  font-size: 11px;
}

/* --- Favourite (heart) -------------------------------------------------- */
.fav-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-2);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease),
    transform var(--dur-2) var(--ease);
}

.fav-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  transition: fill var(--dur) var(--ease), transform var(--dur-2) var(--ease);
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.fav-btn:active {
  transform: scale(0.9);
}

.fav-btn.is-active {
  color: #ff6b81;
}

.fav-btn.is-active svg {
  fill: currentColor;
  stroke: currentColor;
}

/* One-shot confirmation when the heart is toggled (added/removed by JS). */
.fav-btn.is-pop {
  animation: fav-pop var(--dur-4) var(--ease-out);
}

.fav-btn.is-pop::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  pointer-events: none;
  animation: fav-ring 420ms var(--ease-out) forwards;
}

/* On top of card artwork: a soft scrim keeps it legible without
   covering the name, status or rating below. */
.restaurant-card > .fav-btn {
  position: absolute;
  inset-block-start: 6px;
  inset-inline-end: 6px;
  z-index: 3;
  background: rgba(5, 9, 8, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
}

.restaurant-card > .fav-btn.is-active {
  color: #ff6b81;
}

/* --------------------------------------------------------------------------
   7. FIELDS / SEARCH
   -------------------------------------------------------------------------- */
.field {
  margin-bottom: var(--sp-4);
}

.field-label {
  display: block;
  font-size: var(--t-xs);
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}

.field-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: var(--t-body);
  line-height: 1.5;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  appearance: none;
}

.field-control::placeholder {
  color: var(--text-3);
}

.field-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.field-control--follow {
  margin-top: 10px;
}

select.field-control {
  padding-inline-end: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6b0ad' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-position: left 14px center;
  background-size: 14px 14px;
  background-repeat: no-repeat;
}

textarea.field-control {
  min-height: 96px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.field-row .field-control {
  min-width: 0;
  padding-inline: 10px;
}

/* two time pickers side by side are too cramped below ~375px */
@media (max-width: 374px) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- Admin star picker -------------------------------------------------- */
.star-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  width: fit-content;
}

.star-picker-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  font-size: 24px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.18);
  transition: color var(--dur) var(--ease), transform var(--dur-2) var(--ease),
    background var(--dur) var(--ease);
}

.star-picker-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.34);
}

.star-picker-btn.is-on {
  color: #f0b429;
}

.star-picker-btn:active {
  transform: scale(0.88);
}

.star-picker-meta {
  font-size: var(--t-2xs);
  color: var(--text-3);
  margin-top: 6px;
}

/* --- Search ------------------------------------------------------------- */
.search-field {
  position: relative;
  margin-bottom: var(--sp-5);
}

.search-icon {
  position: absolute;
  inset-inline-start: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 50px;
  padding: 13px 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: var(--t-body);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  appearance: none;
}

.search-input::placeholder {
  color: var(--text-3);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-clear {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-2);
  background: var(--surface-3);
}

.search-clear svg {
  width: 14px;
  height: 14px;
}

.search-field.has-value .search-clear {
  display: flex;
}

.search-clear:active {
  background: var(--accent-dim);
}

/* --------------------------------------------------------------------------
   8. PANELS
   -------------------------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}

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

.panel-title {
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-subtitle {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--sp-3);
}

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

/* --------------------------------------------------------------------------
   9. STATES: skeleton / empty / error
   -------------------------------------------------------------------------- */
.skel {
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    var(--surface-2) 40%,
    var(--surface) 80%
  );
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}

/* Skeletons mirror the real card geometry (cover ratio + body padding) so the
   list does not jump when Firestore answers. */
.skel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.skel-media {
  width: 100%;
  border-radius: 0;
  flex: 0 0 auto;
}

.skel-body {
  display: flex;
  flex-direction: column;
}

.skel-line {
  height: 11px;
  border-radius: var(--r-pill);
}

.skel-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skel-chip {
  width: 62px;
  height: 22px;
  border-radius: var(--r-pill);
  flex: 0 0 auto;
}

.skel-rating {
  width: 52px;
  height: 12px;
  border-radius: var(--r-pill);
  flex: 0 0 auto;
}

/* --- Restaurant card skeleton ------------------------------------------ */
.skel-rc .skel-media {
  aspect-ratio: 16 / 9;
}

.skel-rc .skel-body {
  padding: var(--sp-4);
  gap: 10px;
  min-height: 132px;
}

.skel-rc .skel-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* --- Category card skeleton -------------------------------------------- */
.skel-cat {
  border-radius: var(--r-md);
}

.skel-cat .skel-media {
  aspect-ratio: 4 / 3;
}

.skel-cat .skel-body {
  padding: 11px 12px 12px;
  gap: 7px;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.012);
}

.empty-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--sp-3);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
}

.empty-mark svg {
  width: 26px;
  height: 26px;
}

.empty-title {
  font-size: var(--t-body);
  font-weight: 600;
  margin-bottom: 4px;
}

.empty-text {
  font-size: var(--t-sm);
  color: var(--text-2);
  max-width: 34ch;
  margin-inline: auto;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

/* --------------------------------------------------------------------------
   10. HOME
   -------------------------------------------------------------------------- */
/* --- Homepage atmosphere -------------------------------------------------
   Lit navy base with soft neon blooms (cyan / teal / indigo). Home only
   (body.is-home), so the rest of the app keeps the flat near-black surface. */
body.is-home {
  background-color: #060a14;
  background-image:
    radial-gradient(130% 55% at 50% -12%, rgba(64, 196, 255, 0.3) 0%, rgba(64, 196, 255, 0) 62%),
    radial-gradient(100% 45% at 88% 22%, rgba(25, 169, 157, 0.2) 0%, rgba(25, 169, 157, 0) 66%),
    radial-gradient(90% 40% at 8% 30%, rgba(99, 102, 241, 0.16) 0%, rgba(99, 102, 241, 0) 60%),
    linear-gradient(180deg, #0e2350 0%, #0c1c42 20%, #091430 45%, #060d1e 72%, #04070f 100%);
  background-attachment: fixed;
}

body.is-home .appbar {
  background: rgba(7, 13, 28, 0.78);
}

/* App-bar brand line is centred while the home page is on screen */
body.is-home .appbar-inner {
  justify-content: center;
}

body.is-home .appbar-spacer {
  display: none;
}

body.is-home .appbar-title {
  flex: 1;
  text-align: center;
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-4);
  padding-block: var(--sp-8) var(--sp-7);
  margin-bottom: var(--sp-6);
  border-bottom: 1px solid var(--line);
}

.masthead-logo {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  border: 2px solid var(--glow-ring);
  box-shadow: 0 0 0 3px rgba(4, 10, 18, 0.65), 0 0 22px 5px var(--glow-halo);
}

.masthead-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
}

.masthead-copy {
  min-width: 0;
  max-width: 40ch;
}

.wordmark {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  white-space: nowrap;
}

.wordmark span {
  color: var(--accent-2);
}

.masthead-tagline {
  font-size: var(--t-sm);
  color: var(--text-2);
  margin-top: 10px;
  line-height: 1.6;
}

/* --- Hero ---------------------------------------------------------------- */
.region-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 206px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform var(--dur) var(--ease);
}

.region-card:active {
  transform: scale(0.99);
}

.region-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.region-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 9, 8, 0.95) 0%,
    rgba(5, 9, 8, 0.78) 34%,
    rgba(5, 9, 8, 0.18) 72%,
    rgba(5, 9, 8, 0.02) 100%
  );
}

.region-body {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--sp-4);
}

.region-title {
  font-size: var(--t-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  margin-top: 10px;
  line-height: 1.15;
}

.region-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-sm);
  color: rgba(255, 255, 255, 0.74);
  margin-top: 6px;
}

.region-sub svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

/* --- Quick links --------------------------------------------------------- */
.quicklinks {
  margin-top: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.quicklink {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: 56px;
  padding: var(--sp-3) var(--sp-4);
  text-align: start;
  transition: background var(--dur) var(--ease);
}

.quicklink + .quicklink {
  border-top: 1px solid var(--line);
}

.quicklink:hover {
  background: var(--surface-2);
}

.quicklink:active {
  background: var(--surface-2);
}

.quicklink-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--accent-dim);
  color: var(--accent);
}

.quicklink-icon svg {
  width: 17px;
  height: 17px;
}

.quicklink.is-wa .quicklink-icon {
  background: rgba(37, 211, 102, 0.14);
  color: var(--wa);
}

.quicklink-label {
  flex: 1;
  font-size: var(--t-body);
  font-weight: 500;
  min-width: 0;
}

.quicklink-meta {
  font-size: var(--t-2xs);
  color: var(--text-3);
}

.quicklink-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  flex: 0 0 auto;
}

/* --- Editorial line ------------------------------------------------------ */
.editorial {
  text-align: center;
  font-size: var(--t-body);
  font-weight: 500;
  color: var(--text-2);
  margin-top: var(--sp-6);
  padding-inline: var(--sp-4);
}

/* --- Install panel ------------------------------------------------------- */
.install {
  margin-top: var(--sp-6);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.install-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--sp-3);
}

.install-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.pwa-download-container + .pwa-download-container {
  margin-top: var(--sp-2);
}

.pwa-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  min-height: 46px;
  padding: 10px var(--sp-4);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: var(--t-sm);
  font-weight: 600;
  text-align: center;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.pwa-download-btn:hover {
  background: var(--surface-2);
  border-color: rgba(255, 255, 255, 0.24);
}

.pwa-download-btn:active {
  background: var(--surface-2);
}

.pwa-download-btn svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   11. CATEGORIES
   -------------------------------------------------------------------------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

.category-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  text-align: start;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.category-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.category-card:active {
  transform: scale(0.985);
}

.cat-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}

.cat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}

@media (hover: hover) {
  .category-card:hover .cat-media img {
    transform: scale(1.04);
  }
}

.category-card:active .cat-media img {
  transform: scale(1.04);
}

.cat-body {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 12px 12px;
}

/* when an English name follows, tighten the gap — the label owns it instead */
.cat-body:has(+ .cat-en) {
  padding-bottom: 6px;
}

.cat-name {
  flex: 1;
  min-width: 0;
  font-size: var(--t-body);
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-arrow {
  width: 15px;
  height: 15px;
  color: var(--text-3);
  flex: 0 0 auto;
}

.cat-en {
  padding: 0 12px 12px;
  /* pins the English label to the card bottom so a row of cards aligns */
  margin-top: auto;
  font-size: var(--t-2xs);
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   12. RESTAURANTS LIST
   -------------------------------------------------------------------------- */
.cat-strip {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
}

.cat-strip-img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-2);
}

.cat-strip-label {
  font-size: var(--t-2xs);
  color: var(--text-3);
  line-height: 1.4;
}

.cat-strip-copy {
  flex: 1;
  min-width: 0;
}

.cat-strip-title {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restaurants-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.restaurant-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  text-align: start;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.restaurant-card:hover {
  border-color: var(--line-strong);
}

.restaurant-card:active {
  transform: scale(0.985);
}

.rc-media {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}

/* Monoline cutlery sits under the photo: it is the pre-load placeholder and,
   if the image never loads, the broken-image fallback. */
.rc-media::before,
.cat-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: center / 46px 46px no-repeat
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6b0ad' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><path d='M4 3v5a2 2 0 0 0 4 0V3'/><path d='M6 3v5'/><path d='M6 10v11'/><path d='M18 21V3'/><path d='M18 3c-2.2 1.2-3.4 3.4-3.4 5.8S16.4 12.6 18 13'/></svg>");
  opacity: 0.16;
  pointer-events: none;
}

.rc-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--dur-4) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
  will-change: transform;
}

/* The photo is the interaction: a small zoom on hover (pointer devices only)
   and on press. Never a scale-up of the whole card. */
@media (hover: hover) {
  .restaurant-card:hover .rc-cover {
    transform: scale(1.03);
  }
}

.restaurant-card:active .rc-cover {
  transform: scale(1.03);
}

.rc-media.is-brand {
  display: grid;
  place-items: center;
  background: var(--surface-2);
}

.rc-brand {
  width: 84px;
  height: 84px;
  object-fit: contain;
  opacity: 0.95;
}

/* Logo + name lockup, centred on the cover */
.rc-badge {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-inline: var(--sp-3);
  z-index: 2;
  pointer-events: none;
}

.rc-badge .rc-name {
  flex: none;
  max-width: 100%;
  text-align: center;
  font-size: var(--t-h3);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: rgba(4, 8, 12, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.rc-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: #0a0d0c;
  border: 2px solid var(--glow-ring);
  box-shadow: 0 0 0 3px rgba(4, 10, 18, 0.6), 0 0 18px 4px var(--glow-halo);
}

.rc-media::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(to top, rgba(5, 9, 8, 0.6), transparent);
  pointer-events: none;
}

.rc-media.is-brand::after {
  display: none;
}

.restaurant-card.is-closed .rc-cover {
  filter: grayscale(0.55) brightness(0.6);
}

.rc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
}

.rc-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px var(--sp-3);
  margin-bottom: 5px;
}

.rc-desc {
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  /* pins the meta row to the bottom so cards in a row line up */
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: var(--t-2xs);
  color: var(--text-3);
}

.rc-meta svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.rc-meta-time {
  flex: 1;
  min-width: 0;
}

.rc-meta-arrow {
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   13. PROFILE
   -------------------------------------------------------------------------- */
.profile-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* No cover photo → the image drops out and the flat panel holds the frame. */
.profile-cover.is-empty img {
  display: none;
}

/* The photo stays the hero, so save + rating share one frosted chip in the
   corner instead of making the picture carry a scrim. Tucked opposite the
   back arrow so the two controls never compete. */
.cover-actions {
  position: absolute;
  inset-block-start: 12px;
  /* Physical `left`, not a logical inset: the chip carries direction:ltr for
     its own contents, which would otherwise flip this to the right edge and
     stack it under the back arrow. */
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  /* Heart first, then ★5 — reads the same in every language. */
  direction: ltr;
  border-radius: 999px;
  background: rgba(6, 16, 14, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.fav-btn--cover {
  width: 34px;
  height: 34px;
}

.fav-btn--cover:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Rating sits on the photo, so it reads in white, not page ink. */
.cover-actions .profile-rating {
  display: inline-flex;
  align-items: center;
  padding-inline: 3px 9px;
}

.cover-actions .rating-star {
  font-size: 14px;
}

.cover-actions .rating-value {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
}

.profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-5);
}

/* Small disc, sitting below the cover — never on top of the photo. */
.profile-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

/* Logos often ship with white padding around the artwork — the zoom
   crops it so the badge reads as a full circle. */
.profile-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.3);
}

.profile-title {
  font-size: var(--t-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.profile-desc {
  font-size: var(--t-sm);
  color: var(--text-2);
  margin-top: var(--sp-2);
  line-height: 1.65;
  text-align: center;
  overflow-wrap: anywhere;
}

.profile-identity {
  min-width: 0;
  width: 100%;
}

.profile-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: 8px;
}

.profile-badges .fav-btn {
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.profile-badges .fav-btn:hover {
  background: var(--surface-3);
}

.profile-rating {
  display: inline-flex;
  align-items: center;
}

.profile-gallery {
  min-width: 0;
  margin-bottom: var(--sp-6);
}

.profile-cta {
  margin-bottom: var(--sp-6);
}

.profile-cta .btn-block {
  margin-bottom: var(--sp-2);
}

.profile-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}

.profile-cta-row .btn {
  min-height: 48px;
  font-size: var(--t-sm);
}

.profile-cta-row.is-single {
  grid-template-columns: minmax(0, 1fr);
}

/* --- Gallery ------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  cursor: zoom-in;
  padding: 0;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-2) var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   14. AUTH / LOGIN
   -------------------------------------------------------------------------- */
.auth {
  max-width: 420px;
  margin-inline: auto;
}

.auth-head {
  text-align: center;
  margin-bottom: var(--sp-5);
}

.auth-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto var(--sp-3);
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--accent-dim);
  color: var(--accent);
}

.auth-mark svg {
  width: 22px;
  height: 22px;
}

.auth-title {
  font-size: var(--t-h1);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-sub {
  font-size: var(--t-sm);
  color: var(--text-3);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   15. ADMIN
   -------------------------------------------------------------------------- */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
}

.admin-col {
  min-width: 0;
}

.admin-col .panel:last-child {
  margin-bottom: 0;
}

.admin-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.admin-actions .btn {
  flex: 1;
  min-width: 0;
  padding-inline: var(--sp-3);
  font-size: var(--t-sm);
}

.admin-list {
  display: flex;
  flex-direction: column;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--line);
}

.admin-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-row:first-child {
  padding-top: 0;
}

.admin-row-main {
  flex: 1;
  min-width: 0;
}

.admin-row-title {
  display: block;
  font-size: var(--t-sm);
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.admin-row-sub {
  display: block;
  font-size: var(--t-2xs);
  color: var(--text-3);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.admin-list-note {
  font-size: var(--t-xs);
  color: var(--text-3);
  text-align: center;
  padding-block: var(--sp-4);
}

/* --- Uploads ------------------------------------------------------------- */
input[type="file"] {
  width: 100%;
  font-size: var(--t-xs);
  color: var(--text-2);
}

input[type="file"]::file-selector-button {
  margin-inline-end: 10px;
  padding: 9px 14px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--t-xs);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: var(--surface-3);
}

.upload-help-text {
  font-size: var(--t-2xs);
  color: var(--text-3);
  margin-top: 6px;
}

.image-upload-preview {
  display: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin-top: 10px;
  border: 1px solid var(--accent-line);
}

.gallery-upload-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.gallery-upload-preview img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   16. FAB
   -------------------------------------------------------------------------- */
.floating-whatsapp {
  position: fixed;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wa);
  color: var(--wa-ink);
  box-shadow: var(--sh-fab);
  z-index: 55;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}

.floating-whatsapp:active {
  transform: scale(0.94);
}

.floating-whatsapp svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

/* --------------------------------------------------------------------------
   17. MODALS (install + iOS guide)
   -------------------------------------------------------------------------- */
.ios-modal-overlay,
.pwa-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(3, 6, 5, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ios-modal-overlay[style*="flex"],
.pwa-modal-overlay[style*="flex"] {
  display: flex;
}

.ios-modal-content,
.pwa-modal-content {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px 20px 0 0;
  padding: var(--sp-5) var(--sp-4)
    calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
  color: var(--text);
  box-shadow: var(--sh-2);
  animation: sheet-up var(--dur-2) var(--ease);
}

.ios-modal-content h3,
.pwa-modal-content h3 {
  font-size: var(--t-h3);
  font-weight: 600;
  text-align: center;
  padding-inline: 56px;
  margin-bottom: var(--sp-4);
}

.pwa-modal-content p {
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: var(--sp-5);
}

.ios-close-btn {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 20px;
  line-height: 1;
}

.ios-close-btn:active {
  background: var(--surface-3);
}

.ios-steps-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding-bottom: var(--sp-2);
}

.ios-step-card {
  text-align: center;
}

.ios-step-card p {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.ios-step-card img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.ios-done-btn {
  width: 100%;
  min-height: 50px;
  margin-top: var(--sp-4);
  background: var(--accent);
  color: var(--text-invert);
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: var(--t-body);
}

.ios-done-btn:active {
  background: var(--accent-2);
}

.pwa-modal-actions {
  display: flex;
  gap: var(--sp-2);
}

.pwa-install-confirm {
  flex: 1;
  min-height: 48px;
  background: var(--accent);
  color: var(--text-invert);
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: var(--t-sm);
}

.pwa-install-cancel {
  flex: 1;
  min-height: 48px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: var(--t-sm);
}

/* --------------------------------------------------------------------------
   18. TOAST + DIALOG
   -------------------------------------------------------------------------- */
.toast-stack {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  width: calc(100% - 32px);
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--text);
  white-space: pre-line;
  pointer-events: auto;
  animation: toast-in var(--dur-2) var(--ease);
}

.toast.is-out {
  animation: toast-out var(--dur) var(--ease) forwards;
}

.toast-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
  margin-top: 7px;
}

.toast.is-success .toast-mark {
  background: var(--open);
}

.toast.is-error .toast-mark {
  background: var(--closed);
}

.toast.is-info .toast-mark {
  background: var(--accent);
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(3, 6, 5, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dialog {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-2);
  animation: dialog-in var(--dur-2) var(--ease);
}

.dialog-title {
  font-size: var(--t-h3);
  font-weight: 600;
  margin-bottom: 6px;
}

.dialog-msg {
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.7;
  white-space: pre-line;
  margin-bottom: var(--sp-5);
}

.dialog-actions {
  display: flex;
  gap: var(--sp-2);
}

.dialog-actions .btn {
  flex: 1;
}

/* --------------------------------------------------------------------------
   19. LIGHTBOX
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 97;
  background: rgba(4, 7, 6, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  animation: fade-in var(--dur) var(--ease);
}

.lightbox-img {
  max-width: 100%;
  max-height: 82dvh;
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: var(--sh-2);
}

.lightbox-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  inset-inline-end: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-nav svg {
  width: 20px;
  height: 20px;
}

.lightbox-prev {
  inset-inline-start: 14px;
}

.lightbox-next {
  inset-inline-end: 14px;
}

.lightbox-count {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--t-2xs);
  color: rgba(255, 255, 255, 0.66);
  letter-spacing: 0.08em;
}

body.no-scroll {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   20. MOTION
   -------------------------------------------------------------------------- */
@keyframes shimmer {
  0% {
    background-position: 150% 0;
  }
  100% {
    background-position: -150% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes dialog-in {
  from {
    transform: scale(0.97);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes toast-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  to {
    transform: translateY(8px);
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Page change: opacity + travel. `backwards` so the final frame is dropped
   and press states keep working afterwards. */
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes page-in-back {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Card entrance: first six cards only, 24ms apart, set by --i in JS. */
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.stagger-in {
  animation: card-in var(--m-slow) var(--e-out) backwards;
  animation-delay: calc(var(--i, 0) * var(--m-stagger));
}

@keyframes fav-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes fav-ring {
  from {
    transform: scale(1);
    opacity: 0.5;
  }
  to {
    transform: scale(1.75);
    opacity: 0;
  }
}

/* View Transitions: the tapped photo travels into the hero/cover, everything
   else crossfades fast underneath. */
::view-transition-group(*) {
  animation-duration: var(--dur-4);
  animation-timing-function: var(--ease-out);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 140ms;
}

/* ==========================================================================
   MOTION SYSTEM v2 — reveals, launch splash, home rail, category food moments
   ========================================================================== */

/* --- App-bar title crossfade (toggled by showPage) ---------------------- */
.appbar-title.is-swap {
  animation: title-swap var(--m-base) var(--e-out) both;
}

@keyframes title-swap {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* --- Scroll / entrance reveals (added + observed by JS) ------------------ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}

.reveal.is-in {
  animation: reveal-in var(--m-slow) var(--e-out) both;
  animation-delay: calc(var(--ri, 0) * 70ms);
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Home launch choreography (body.is-entering, removed after ~1.4s) ---- */
#pageHome .masthead {
  --ha: 1;
}
#pageHome .home-top {
  --ha: 2;
}
#pageHome .home-cats {
  --ha: 3;
}
#pageHome .install {
  --ha: 4;
}

body.is-entering #pageHome .masthead,
body.is-entering #pageHome .home-top,
body.is-entering #pageHome .home-cats,
body.is-entering #pageHome .install {
  animation: rise-in 560ms var(--e-out) backwards;
  animation-delay: calc(var(--ha, 0) * 90ms);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* --- Launch splash ------------------------------------------------------ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--sp-5);
  background: var(--bg);
  text-align: center;
  padding: var(--sp-6);
}

.splash-mark {
  position: relative;
  width: 108px;
  height: 108px;
}

.splash-rim {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 154px;
  height: 154px;
  transform: translate(-50%, -50%) rotate(-90deg);
  fill: none;
  stroke: var(--glow-ring);
  stroke-width: 1.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: rim-draw 700ms var(--e-out) 80ms both;
}

@keyframes rim-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.splash-logo {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 30px;
  overflow: hidden;
  background: #000;
  border: 2px solid var(--glow-ring);
  box-shadow: 0 0 0 3px rgba(4, 10, 18, 0.65), 0 0 26px 6px var(--glow-halo);
  animation: splash-mark-in 560ms var(--e-out) 60ms both;
}

@keyframes splash-mark-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
}

.splash-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
}

/* one shot of light across the mark */
.splash-gleam {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 32%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 68%
  );
  transform: translateX(-140%);
  animation: gleam 540ms var(--e-out) 360ms both;
  pointer-events: none;
}

@keyframes gleam {
  to {
    transform: translateX(140%);
  }
}

.splash-word {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.2;
  white-space: nowrap;
  animation: splash-word 600ms var(--e-out) 280ms both;
}

.splash-word span {
  color: var(--accent-2);
}

@keyframes splash-word {
  from {
    opacity: 0;
    letter-spacing: 0.32em;
    transform: translateY(6px);
  }
}

.splash-tag {
  font-size: var(--t-sm);
  color: var(--text-3);
  animation: fade-in 440ms var(--e-out) 420ms both;
}

.splash.is-leaving {
  animation: splash-out 380ms var(--e-inout) both;
}

@keyframes splash-out {
  to {
    opacity: 0;
    transform: scale(1.04);
  }
}

/* --- Home: broken hero image falls back to the brand mark --------------- */
.region-img.is-broken {
  display: none;
}

.region-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: center / 72px 72px no-repeat
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6b0ad' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><path d='M4 3v5a2 2 0 0 0 4 0V3'/><path d='M6 3v5'/><path d='M6 10v11'/><path d='M18 21V3'/><path d='M18 3c-2.2 1.2-3.4 3.4-3.4 5.8S16.4 12.6 18 13'/></svg>");
  opacity: 0.2;
  pointer-events: none;
}

/* --- Home: category rail (food discovery above the fold) ---------------- */
.home-cats {
  margin-bottom: var(--sp-6);
}

.home-cats .section-head {
  margin-bottom: var(--sp-3);
}

.home-cats-rail {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-inline: calc(var(--pad) * -1);
  padding-inline: var(--pad);
}

.home-cats-rail::-webkit-scrollbar {
  display: none;
}

.homecat {
  position: relative;
  flex: 0 0 auto;
  width: 126px;
  padding: 0;
  appearance: none;
  font: inherit;
  color: inherit;
  scroll-snap-align: start;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-align: start;
  cursor: pointer;
  transition: transform var(--m-fast) var(--e-out),
    border-color var(--m-fast) var(--ease);
}

.homecat:active {
  transform: scale(0.97);
}

.homecat-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--surface-3);
  overflow: hidden;
}

.homecat-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: center / 40px 40px no-repeat
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a6b0ad' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'><path d='M4 3v5a2 2 0 0 0 4 0V3'/><path d='M6 3v5'/><path d='M6 10v11'/><path d='M18 21V3'/><path d='M18 3c-2.2 1.2-3.4 3.4-3.4 5.8S16.4 12.6 18 13'/></svg>");
  opacity: 0.18;
}

.homecat-media img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--m-base) var(--e-out);
}

.homecat-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(4, 8, 12, 0.94) 6%,
    rgba(4, 8, 12, 0.45) 42%,
    transparent 72%
  );
}

@media (hover: hover) {
  .homecat:hover .homecat-media img {
    transform: scale(1.05);
  }
}

.homecat-copy {
  position: absolute;
  inset-inline: 10px;
  bottom: 9px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.homecat-name {
  font-size: var(--t-sm);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homecat-en {
  font-size: var(--t-2xs);
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* sits on the far end of the row so the fixed WhatsApp button never lands
   on top of it */
.home-saved-empty {
  margin-top: var(--sp-3);
  font-size: var(--t-xs);
  line-height: 1.75;
  color: var(--text-3);
}

.home-cats-more {
  display: flex;
  width: fit-content;
  margin-inline-start: auto;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-3);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--accent-2);
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
}

.home-cats-more svg {
  width: 15px;
  height: 15px;
  transition: transform var(--m-fast) var(--e-out);
}

.home-cats-more:active svg {
  transform: translateX(-4px);
}

/* ==========================================================================
   CATEGORY FOOD MOMENT — the signature scene
   ========================================================================== */
.moment {
  position: fixed;
  inset: 0;
  z-index: 420;
  --moment-dur: 900ms;
}

.moment.is-short {
  --moment-dur: 520ms;
}

.moment-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 12, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
  animation: scrim-life var(--moment-dur) linear both;
}

@keyframes scrim-life {
  0%,
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.moment-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 42%,
    var(--food-soft) 0%,
    transparent 64%
  );
  animation: veil-life var(--moment-dur) var(--e-out) both;
}

@keyframes veil-life {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }
  24% {
    opacity: 1;
    transform: scale(1);
  }
  66% {
    opacity: 0.7;
    transform: scale(1.04);
  }
  80% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* the real category photograph, flown out of the tapped card. It keeps full
   opacity for the whole scene — the artwork's plate covers it while the
   illustration performs, so the reveal is a clean dissolve. */
.moment-disc {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(56vw, 236px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  background: var(--surface-2);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.62);
  opacity: 1;
}

.moment-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-disc::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1.5px solid var(--food);
  opacity: 0.6;
  animation: rim-in calc(var(--moment-dur) * 0.578) var(--e-out) 34% both;
}

@keyframes rim-in {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
}

/* Landing: the accent rim and the cinematic shadow stand down so the photo
   settles onto the hero thumbnail with nothing left over it. */
.moment.is-docking .moment-disc::after {
  animation: none;
  opacity: 0;
  transition: opacity 200ms linear;
}

/* the drawn food — owns the scene until the photograph takes over */
.moment-art {
  position: absolute;
  inset-inline: 0;
  top: 44%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  justify-content: center;
  color: var(--food);
}

/* The plate is opaque almost immediately — long before the photograph lands
   — so the two never ghost through each other. It then dissolves on exactly
   the same beat as the drawing, handing the scene back to the photo. */
.moment-art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: calc(min(56vw, 236px) + 6px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(6, 10, 9, 0.985);
  box-shadow: 0 0 44px 14px rgba(6, 10, 9, 0.55);
  animation: plate-life var(--moment-dur) linear both;
}

@keyframes plate-life {
  0% {
    opacity: 0;
  }
  9%,
  64% {
    opacity: 1;
  }
  80%,
  100% {
    opacity: 0;
  }
}

.moment-art svg {
  position: relative;
  width: min(64vw, 264px);
  height: min(64vw, 264px);
  overflow: visible;
  animation: art-pop var(--moment-dur) var(--e-out) both,
    art-life var(--moment-dur) linear both;
}

@keyframes art-life {
  0%,
  8% {
    opacity: 0;
  }
  20%,
  64% {
    opacity: 1;
  }
  80%,
  100% {
    opacity: 0;
  }
}

@keyframes art-pop {
  0%,
  10% {
    transform: scale(0.84) rotate(-8deg);
  }
  40% {
    transform: scale(1) rotate(1.2deg);
  }
  52% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.03) rotate(0deg);
  }
}

.moment-title {
  position: absolute;
  z-index: 4;
  inset-inline: 0;
  top: calc(44% + min(31vw, 132px) + 30px);
  padding-inline: var(--sp-6);
  text-align: center;
  animation: title-life var(--moment-dur) var(--e-out) both;
}

@keyframes title-life {
  0%,
  28% {
    opacity: 0;
    transform: translateY(18px);
  }
  46%,
  82% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.moment-title-ar {
  display: block;
  font-size: clamp(25px, 8vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.moment-title-en {
  display: block;
  margin-top: 5px;
  font-size: var(--t-2xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-3);
}

.moment.is-skip .moment-scrim,
.moment.is-skip .moment-veil,
.moment.is-skip .moment-art,
.moment.is-skip .moment-title,
.moment.is-skip .moment-disc {
  animation: none;
  opacity: 0;
  transition: opacity 140ms linear;
}

/* --- Food illustration: roles shared by every artwork ------------------- */
.fa {
  overflow: visible;
}

.fa .o {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
}
.fa .n {
  fill: none;
  stroke: rgba(246, 248, 247, 0.5);
  stroke-width: 3;
}
.fa .of {
  fill: currentColor;
  fill-opacity: 0.16;
  stroke: currentColor;
  stroke-width: 3.4;
}
.fa .f {
  fill: currentColor;
  fill-opacity: 0.16;
}
.fa .f2 {
  fill: currentColor;
  fill-opacity: 0.36;
}
.fa .d {
  fill: currentColor;
  fill-opacity: 0.5;
}
.fa .s {
  fill: currentColor;
}
.fa .w {
  fill: #f4f7f6;
  fill-opacity: 0.92;
}
.fa .sh {
  fill: rgba(0, 0, 0, 0.5);
}
.fa .o,
.fa .n,
.fa .of {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Every art timing is a fraction of --moment-dur, so the illustration and the
   scene it lives in can never drift apart. (Base scene = 900ms.)
   Everything must be fully assembled by ~54% of the scene — the last 20% is
   reserved for dissolving the drawing away and handing over to the photo. */

/* stepped rise — the workhorse (index via inline --si) */
.moment-art .fa-step {
  animation: fa-rise calc(var(--moment-dur) * 0.3) var(--e-out) both;
  animation-delay: calc(
    var(--moment-dur) * (0.11 + var(--si, 0) * 0.048)
  );
}

@keyframes fa-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

/* horizontal arrival (RTL: enters from the right) */
.moment-art .fa-slide {
  animation: fa-slide calc(var(--moment-dur) * 0.3) var(--e-out) both;
  animation-delay: calc(
    var(--moment-dur) * (0.12 + var(--si, 0) * 0.052)
  );
}

@keyframes fa-slide {
  from {
    opacity: 0;
    transform: translateX(34px);
  }
}

/* small detail popping last
   (fill-box: without it the scale resolves against the viewBox origin and
   every detail flies in from a diagonal instead of popping where it sits) */
.moment-art .fa-pop {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: fa-pop calc(var(--moment-dur) * 0.24) var(--e-out) both;
  animation-delay: calc(
    var(--moment-dur) * (0.22 + var(--si, 0) * 0.042)
  );
}

@keyframes fa-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
}

/* outline drawing itself */
.moment-art .fa-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: fa-draw calc(var(--moment-dur) * 0.36) var(--e-out)
    calc(var(--moment-dur) * 0.1) both;
}

@keyframes fa-draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* wash of colour fading in behind an outline */
.moment-art .fa-shade {
  animation: fa-shade calc(var(--moment-dur) * 0.3) var(--e-out)
    calc(var(--moment-dur) * 0.13) both;
}

@keyframes fa-shade {
  from {
    opacity: 0;
  }
}

/* liquid rising in a glass / cup */
.moment-art .fa-liquid {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: fa-fill calc(var(--moment-dur) * 0.33) var(--e-out)
    calc(var(--moment-dur) * 0.15) both;
}

@keyframes fa-fill {
  from {
    transform: scaleY(0);
  }
}

/* whole-body settle for a single hero shape — rotates about its own centre,
   never about the corner of the drawing */
.moment-art .fa-tilt {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: fa-tilt calc(var(--moment-dur) * 0.36) var(--e-out)
    calc(var(--moment-dur) * 0.1) both;
}

@keyframes fa-tilt {
  from {
    opacity: 0;
    transform: rotate(-7deg) translateY(-8px);
  }
  60% {
    transform: rotate(1.6deg) translateY(0);
  }
}

/* pizza: the slice lifts out and stays slightly proud */
.moment-art .fa-wedge {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: fa-wedge calc(var(--moment-dur) * 0.33) var(--e-out)
    calc(var(--moment-dur) * 0.15) both;
}

@keyframes fa-wedge {
  from {
    opacity: 0;
    transform: none;
  }
  45% {
    opacity: 1;
    transform: translate(12px, -10px) rotate(5deg);
  }
  to {
    opacity: 1;
    transform: translate(7px, -6px) rotate(3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    /* without this, `backwards` fills keep staggered cards at opacity 0 for
       their full delay and they still pop in one by one */
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   21. TABLET — 600px
   -------------------------------------------------------------------------- */
@media (min-width: 600px) {
  :root {
    --pad: 24px;
    --t-display: 30px;
    --t-h1: 24px;
    --t-h2: 20px;
  }

  .shell {
    max-width: 768px;
  }

  .appfoot {
    padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  }

  .main {
    padding-block: var(--sp-6) var(--sp-9);
  }

  .region-card {
    min-height: 280px;
  }

  .region-body {
    padding: var(--sp-5);
  }

  .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-4);
  }

  .restaurants-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-4);
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-3);
  }

  .profile-head {
    align-items: center;
  }

  .profile-logo {
    width: 72px;
    height: 72px;
  }

  .profile-cover {
    aspect-ratio: 21 / 9;
  }

  .ios-modal-overlay,
  .pwa-modal-overlay {
    align-items: center;
    padding: var(--sp-4);
  }

  .ios-modal-content,
  .pwa-modal-content {
    border-radius: var(--r-lg);
    max-width: 440px;
    padding-bottom: var(--sp-5);
  }

  .ios-close-btn {
    top: 16px;
  }

  .install-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2);
  }

  .pwa-download-container + .pwa-download-container {
    margin-top: 0;
  }
}

/* --------------------------------------------------------------------------
   22. DESKTOP — 900px
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  :root {
    --pad: 32px;
  }

  .shell {
    max-width: 1120px;
  }

  .masthead {
    padding-bottom: var(--sp-6);
    margin-bottom: var(--sp-6);
  }

  .wordmark {
    font-size: 19px;
  }

  /* Home: hero + quick links side by side */
  .home-top {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    gap: var(--sp-6);
    align-items: stretch;
  }

  .home-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-5);
    min-width: 0;
  }

  .home-side .quicklinks {
    margin-top: 0;
  }

  .home-side .editorial {
    margin-top: 0;
    text-align: start;
    padding-inline: 0;
    font-size: var(--t-h3);
    font-weight: 600;
    color: var(--text-2);
  }

  .region-card {
    min-height: 340px;
    height: 100%;
  }

  .quicklink {
    min-height: 64px;
  }

  .install {
    margin-top: var(--sp-7);
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    align-items: center;
    gap: var(--sp-5);
  }

  .install-title {
    margin-bottom: 0;
  }

  /* Categories */
  .categories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-4);
  }

  .restaurants-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-5);
  }

  /* Profile: cover + details columns */
  .profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--sp-6);
    align-items: start;
  }

  .profile-cover {
    aspect-ratio: 21 / 9;
    margin-bottom: var(--sp-5);
  }

  .profile-gallery {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .profile-cta {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: calc(var(--bar-h) + var(--sp-5));
    margin-bottom: 0;
  }

  .profile-layout.is-single {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-layout.is-single .profile-cta {
    grid-column: 1;
    max-width: 460px;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* Admin: two columns */
  .admin-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: var(--sp-5);
    align-items: start;
  }

  .admin-col-side {
    position: sticky;
    top: calc(var(--bar-h) + var(--sp-5));
  }

  .panel {
    padding: var(--sp-6);
  }

  .toast-stack {
    bottom: 24px;
  }

  .floating-whatsapp {
    bottom: 24px;
    right: 24px;
  }
}

/* --------------------------------------------------------------------------
   23. LARGE DESKTOP — 1200px
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
  :root {
    --t-display: 34px;
  }

  .region-card {
    min-height: 380px;
  }

  .restaurants-grid {
    gap: var(--sp-5);
  }
}
