:root {
  --paper: #ebe3d5;
  --paper-deep: #e1d6c4;
  --ink: #161311;
  --ink-2: #1d1916;
  --ink-3: #2a2420;
  --red: #c9452c;
  --red-deep: #a83620;
  --text: #1b1715;
  --muted: #6e645a;
  --light: #f4ede3;
  --muted-light: #a3988c;

  --sb: 48px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-callig: "Aref Ruqaa", "Alexandria", serif;

  /* Rice-paper grain and fibres, generated with SVG noise */
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .24 0 0 0 0 .18 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='.32'/%3E%3C/svg%3E");
  --tex-fibre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.005' numOctaves='4' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .3 -.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --tex-grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .95 0 0 0 0 .88 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='.09'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
/* Native-feeling taps: no double-tap zoom delay, no accidental text selection on controls */
a, button, .tabbar, .chip, .pill { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
img { -webkit-user-drag: none; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--paper);
  background-image: var(--tex-grain), var(--tex-fibre);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 8px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Surfaces ---------- */
.paper {
  background-color: var(--paper);
  background-image: var(--tex-grain), var(--tex-fibre), radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.35), transparent 60%);
  color: var(--text);
}
.ink {
  background-color: var(--ink);
  background-image: var(--tex-grain-light), radial-gradient(90% 50% at 100% 0%, rgba(201, 69, 44, 0.12), transparent 70%);
  color: var(--light);
}

/* ---------- Logo (restaurant's gold logo; bronze version on paper) ---------- */
.brand-logo { width: auto; height: 56px; }

/* ---------- Desktop stage + phone ---------- */
.stage { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.stage-callig { position: absolute; font-family: var(--font-callig); font-weight: 700; color: #1b1714; line-height: 1; white-space: nowrap; }
.stage-callig-a { top: -2vh; left: 3vw; font-size: 30vh; opacity: 0.07; }
.stage-callig-b { top: 12vh; right: 5vw; font-size: 6vh; writing-mode: vertical-rl; opacity: 0.09; }
.stage-vine { position: absolute; top: -1vh; right: 15vw; width: 30vw; height: auto; transform: scaleX(-1); }
.stage-garden { position: absolute; right: -2vw; bottom: 0; width: 50vw; height: 27.5vw; }
.stage-brand { position: absolute; top: 30px; right: 44px; width: auto; height: 74px; }

.device {
  position: relative;
  width: 392px;
  height: min(852px, calc(100vh - 40px));
  border: 11px solid #121010;
  border-radius: 56px;
  background: #121010;
  box-shadow: 0 70px 120px -50px rgba(50, 30, 15, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.5);
  isolation: isolate;
}
.app { position: absolute; inset: 0; overflow: hidden; border-radius: 45px; }

.statusbar {
  position: absolute;
  top: 0;
  inset-inline: 0;
  z-index: 40;
  height: var(--sb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 30px 0 34px;
  direction: ltr;
  font: 600 15px/1 -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  pointer-events: none;
  transition: color 0.4s;
}
.sb-icons { display: flex; align-items: center; gap: 6px; }
.sb-icons svg { height: 12px; width: auto; fill: currentColor; }
.device[data-theme="dark"] .statusbar { color: #fff; }

/* ---------- Screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: calc(var(--sb) + 10px) 20px 118px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(var(--enter, 0px));
  transition: opacity 0.35s ease, transform 0.5s var(--ease), visibility 0s linear 0.5s;
}
.screen::-webkit-scrollbar { display: none; }
.screen.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity 0.35s ease, transform 0.5s var(--ease), visibility 0s; }

/* ---------- Buttons ---------- */
.pill {
  width: 100%;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 26px;
  border-radius: 999px;
  font: 600 15.5px var(--font-display);
  transition: transform 0.2s var(--ease), background-color 0.2s, opacity 0.2s;
}
.pill:active { transform: scale(0.98); }
.pill svg { width: 20px; height: 20px; }
.pill-ink { background: var(--ink); color: var(--light); padding-inline-end: 8px; }
.pill-red { background: var(--red); color: #fff; box-shadow: 0 14px 26px -14px rgba(201, 69, 44, 0.8); }
.pill-red:hover { background: var(--red-deep); }
.pill-outline { border: 1.5px solid rgba(22, 19, 17, 0.75); }
.pill-light { background: rgba(255, 255, 255, 0.08); color: var(--light); border: 1px solid rgba(255, 255, 255, 0.14); }
.pill[disabled] { opacity: 0.45; pointer-events: none; }
.pill-dot {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  transition: transform 0.3s var(--ease);
}
.pill:hover .pill-dot { transform: translateX(-4px); }

.round-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid rgba(22, 19, 17, 0.2);
  transition: border-color 0.2s, background-color 0.2s;
}
.round-btn svg { width: 21px; height: 21px; }
.ink .round-btn { border-color: rgba(255, 255, 255, 0.22); }
.round-btn:hover { border-color: var(--red); }

/* ---------- Welcome ---------- */
.screen-welcome { display: flex; flex-direction: column; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
/* Bakhan = "gardens": a grapevine hangs from the top, an orchard grows beside the tray */
.welcome-art { position: absolute; top: 0; left: -16px; width: 64%; height: 240px; pointer-events: none; }
.w-vine { position: absolute; top: calc(var(--sb) - 6px); left: 0; width: 100%; height: auto; aspect-ratio: 320 / 240; }
.w-garden { position: absolute; right: -26px; bottom: 16%; width: 88%; height: auto; aspect-ratio: 400 / 220; pointer-events: none; }
.welcome-plate img { z-index: 1; }
.welcome-top { position: relative; z-index: 1; }
.welcome-callig { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; margin-top: 14px; }
/* Aref Ruqaa's «ب» tail drops ~0.23em below the baseline; reserve room so it never touches the line below */
.callig-big { padding-bottom: 0.22em; font: 700 clamp(64px, 21vw, 86px)/1.05 var(--font-callig); color: var(--ink); }
.callig-line { margin-top: 2px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
/* The tray takes whatever height is left between the calligraphy and the text, so it never covers them */
.welcome-plate { position: relative; flex: 1 1 auto; min-height: 150px; margin-block: 6px 10px; }
.welcome-plate img {
  position: absolute;
  top: 50%;
  left: 0;
  width: auto;
  height: min(100%, 112vw, 430px);
  max-width: none;
  aspect-ratio: 1;
  translate: -24% -50%;
  filter: drop-shadow(0 34px 34px rgba(50, 30, 15, 0.35));
  animation: spin 90s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }
.welcome-copy { position: relative; z-index: 1; }
.welcome-copy h1 { font: 800 31px/1.25 var(--font-display); }
.welcome-copy p { margin-top: 8px; font-size: 13.5px; line-height: 1.8; color: var(--muted); max-width: 30ch; }
.welcome-copy .pill { margin-top: 24px; }

/* ---------- Menu (paper screen, garden theme) ---------- */
@keyframes rise { from { opacity: 0; translate: 0 14px; } }

.mn-vine { position: absolute; top: calc(var(--sb) - 22px); left: -12px; width: 44%; max-width: 180px; pointer-events: none; }
.mn-vine svg { display: block; width: 100%; height: auto; aspect-ratio: 320 / 240; }

/* RTL: a narrow block sits on the right, leaving the left for the vine */
/* Sticky chips add the scroller's own top padding to their offset, so the menu keeps its top spacing on the header instead */
.screen-menu { padding-top: 0; }
.mn-head { position: relative; z-index: 1; max-width: 62%; margin-top: calc(var(--sb) + 14px); }
.mn-kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px var(--font-display); color: var(--red-deep); }
.mn-kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.mn-title { margin-top: 6px; font: 800 26px/1.35 var(--font-display); }

.mn-search {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin-top: 18px;
  padding-inline: 16px 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(22, 19, 17, 0.08);
  box-shadow: 0 12px 26px -22px rgba(50, 30, 15, 0.7);
  transition: border-color 0.2s, background-color 0.2s;
}
.mn-search:focus-within { border-color: rgba(201, 69, 44, 0.45); background: rgba(255, 255, 255, 0.86); }
.mn-search > svg { width: 19px; height: 19px; color: var(--muted); }
/* 16px stops iPhone Safari from zooming in when the field is tapped */
.mn-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: 500 16px var(--font-body); }
.mn-search input::placeholder { color: #9a8f84; }
.mn-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.mn-clear { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(22, 19, 17, 0.07); color: var(--muted); }
.mn-clear[hidden] { display: none; }
.mn-clear svg { width: 15px; height: 15px; }

/* Featured carousel */
.mn-featured { margin-top: 24px; }
.row-title { font: 700 16px var(--font-display); }
.fcards {
  display: flex;
  gap: 12px;
  margin: 12px -20px 0;
  padding: 4px 20px 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.fcards::-webkit-scrollbar { display: none; }
.fcard {
  position: relative;
  flex: none;
  width: calc(100% - 44px);
  max-width: 340px;
  height: 214px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 26px;
  background: var(--paper-deep);
  scroll-snap-align: start;
  box-shadow: 0 24px 34px -24px rgba(50, 30, 15, 0.8);
}
.fcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; transition: transform 0.8s var(--ease); }
.fcard:hover img { transform: scale(1.04); }
.fcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(14, 10, 8, 0.86), rgba(14, 10, 8, 0.3) 46%, transparent 72%); }
.fcard-hit { position: absolute; inset: 0; z-index: 1; }
.fcard-tag {
  position: absolute;
  z-index: 2;
  top: 14px;
  inset-inline-start: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font: 600 11.5px var(--font-display);
  pointer-events: none;
}
.fcard-tag svg { width: 14px; height: 14px; color: var(--red); }
.fcard-info { position: absolute; z-index: 2; inset-inline: 18px 70px; bottom: 16px; color: #fff; pointer-events: none; }
.fcard-info h3 { font: 800 19px/1.3 var(--font-display); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.fcard-info a { pointer-events: auto; }
.fcard-info p { margin-top: 3px; font: 700 14px var(--font-display); color: #f6cf9f; }
.fcard .add-btn { position: absolute; z-index: 3; bottom: 16px; inset-inline-end: 16px; }
.fdots { display: flex; justify-content: center; gap: 6px; margin-top: -6px; }
.fdots i { width: 6px; height: 6px; border-radius: 99px; background: rgba(22, 19, 17, 0.18); transition: width 0.35s var(--ease), background-color 0.35s; }
.fdots i.is-on { width: 20px; background: var(--red); }

/* Category chips: pinned under the status bar while scrolling */
.mn-chips {
  position: sticky;
  top: var(--sb);
  z-index: 5;
  margin: 14px -20px 0;
  padding: 10px 0;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.mn-chips.is-stuck {
  background-color: rgba(235, 227, 213, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 22px -20px rgba(50, 30, 15, 0.75);
}
.mn-chips.is-stuck::before { content: ""; position: absolute; inset-inline: 0; bottom: 100%; height: var(--sb); background: inherit; -webkit-backdrop-filter: inherit; backdrop-filter: inherit; }
.chips-row { display: flex; gap: 8px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-inline: 13px 16px;
  border-radius: 999px;
  border: 1px solid rgba(22, 19, 17, 0.1);
  background: rgba(255, 255, 255, 0.55);
  font: 600 13.5px var(--font-display);
  white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.chip svg { width: 18px; height: 18px; color: var(--red); transition: color 0.25s; }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--light); }
.chip.is-active svg { color: #f0b48a; }

/* Sections and the photo grid */
.mn-sec { padding-top: 22px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sec-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(201, 69, 44, 0.1); color: var(--red); }
.sec-icon svg { width: 20px; height: 20px; }
.sec-head h3 { font: 800 20px var(--font-display); }
.sec-count { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); }

.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
.dcard { position: relative; min-width: 0; display: flex; flex-direction: column; }
.dcard-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper-deep);
  box-shadow: 0 18px 26px -20px rgba(50, 30, 15, 0.75);
}
.dcard-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; transition: transform 0.7s var(--ease); }
.dcard:hover .dcard-media img { transform: scale(1.05); }
.dcard-hit { position: absolute; inset: 0; z-index: 1; }
.dcard .add-btn { position: absolute; z-index: 2; bottom: 10px; inset-inline-end: 10px; }
.dcard-text { flex: 1; display: flex; flex-direction: column; padding: 11px 4px 0; }
.dcard-name {
  font: 700 14.5px/1.4 var(--font-display);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dcard-desc {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dcard-price { margin-top: auto; padding-top: 6px; font: 800 14px var(--font-display); color: var(--red-deep); }
.dcard--wide { grid-column: 1 / -1; }
.dcard--wide .dcard-media { aspect-ratio: 16 / 9; border-radius: 24px; }
.dcard--wide .dcard-name { font-size: 17px; }
.dcard--wide .dcard-desc { -webkit-line-clamp: 2; }

.dgrid[data-reveal] .dcard { opacity: 0; translate: 0 18px; transition: opacity 0.55s ease var(--d, 0ms), translate 0.7s var(--ease) var(--d, 0ms); }
.dgrid[data-reveal] .dcard.is-in { opacity: 1; translate: none; }

.add-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 10px 18px -8px rgba(201, 69, 44, 0.9);
  transition: transform 0.2s var(--ease), background-color 0.25s;
}
.add-btn svg { width: 18px; height: 18px; }
.add-btn:active { transform: scale(0.88); }
/* Garden green tick after adding */
.add-btn.is-added { background: #3f7a4a; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 10px 18px -8px rgba(63, 122, 74, 0.9); }

.mn-results { padding-top: 22px; }
.mn-results[hidden] { display: none; }
.empty-search { padding: 40px 10px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.9; }

/* ---------- Dish sheet (slides up over the menu) ---------- */
.dish-top { display: flex; align-items: center; justify-content: space-between; }
.fav-btn { color: var(--red); }
.fav-btn svg { transition: transform 0.3s var(--ease); }
.fav-btn.is-on svg { transform: scale(1.12); }

.sheet-layer { position: absolute; inset: 0; z-index: 35; visibility: hidden; pointer-events: none; transition: visibility 0s linear 0.5s; }
.sheet-layer.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 10, 8, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.sheet-layer.is-open .sheet-scrim { opacity: 1; }

.sheet {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  max-height: calc(100% - var(--sb) - 56px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.55);
  transform: translateY(104%);
  transition: transform 0.55s var(--ease);
}
.sheet-layer.is-open .sheet { transform: none; }
.sheet.is-dragging { transition: none; }

.sheet-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.sheet-scroll::-webkit-scrollbar { display: none; }

.sheet-hero { position: relative; height: min(300px, 38vh); overflow: hidden; touch-action: none; cursor: grab; background: var(--paper-deep); }
.sheet-hero img { width: 100%; height: 100%; object-fit: cover; animation: hero-in 0.7s var(--ease) both; }
@keyframes hero-in { from { scale: 1.08; opacity: 0.4; } }
.sheet-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), transparent 32%), linear-gradient(to top, rgba(235, 227, 213, 0.9), transparent 22%);
}
.sheet-grip { position: absolute; z-index: 1; top: 10px; left: 50%; width: 42px; height: 5px; margin-left: -21px; border-radius: 99px; background: rgba(255, 255, 255, 0.85); }
.glass-btn {
  position: absolute;
  z-index: 1;
  top: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.35);
}
.glass-btn svg { width: 20px; height: 20px; }
.sheet-close { left: 16px; }
.sheet-hero .fav-btn { right: 16px; color: var(--red); }

.sheet-body { position: relative; padding: 4px 20px 22px; animation: rise 0.5s var(--ease) both 0.08s; }
.sheet-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: rgba(201, 69, 44, 0.1);
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 600;
}
.sheet-chip svg { width: 15px; height: 15px; }
.sheet-name { margin-top: 10px; font: 800 26px/1.3 var(--font-display); }
.sheet-price { margin-top: 4px; font: 800 21px var(--font-display); color: var(--red); }
.sheet-desc { margin-top: 10px; font-size: 14px; line-height: 1.85; color: var(--muted); }

.sheet-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; }
.sheet-divider::before,
.sheet-divider::after { content: ""; flex: 1; height: 1px; background: rgba(22, 19, 17, 0.12); }
.sheet-divider svg { width: 22px; height: 22px; opacity: 0.55; }
.sheet-label { font: 700 15px var(--font-display); }

.suggest { display: flex; gap: 12px; margin: 12px -20px 0; padding: 0 20px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.suggest::-webkit-scrollbar { display: none; }
.sg { flex: none; width: 132px; scroll-snap-align: start; }
.sg-link { display: block; height: 112px; overflow: hidden; border-radius: 18px; background: var(--paper-deep); }
.sg-link img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.sg-link:active img { transform: scale(1.05); }
.sg-name {
  margin-top: 8px;
  min-height: 2.7em;
  font: 600 13px/1.35 var(--font-display);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sg-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; font: 700 12.5px var(--font-display); color: var(--red-deep); }
.sg-add { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; }
.sg-add svg { width: 15px; height: 15px; }

.sheet-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(22, 19, 17, 0.08);
  background: rgba(235, 227, 213, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.sheet-bar { container-type: inline-size; }
.sheet-bar .pill { flex: 1; min-width: 0; height: 54px; padding-inline: 20px; font-size: 15px; white-space: nowrap; }
.lbl-short { display: none; }
/* Narrow phones: short label so the button never wraps */
@container (max-width: 390px) {
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
}
.qty-pill { flex: none; height: 54px; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: var(--ink); color: #fff; }
.qty-pill button { width: 38px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.qty-pill button svg { width: 17px; height: 17px; }
.qty-pill output { min-width: 18px; text-align: center; font: 700 17px var(--font-display); }

/* ---------- Generic page pieces ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.page-head h2 { font: 800 26px/1.3 var(--font-display); }
.page-head .count { margin-inline-start: auto; font-size: 13px; color: var(--muted); }
.section-title { margin-top: 26px; font: 700 15px var(--font-display); }
.card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(22, 19, 17, 0.08);
}

.cart-list { display: grid; gap: 12px; margin-top: 18px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 12px; padding: 10px; }
.ci-img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; }
.ci-name { font: 700 14px/1.4 var(--font-display); }
.ci-price { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--red); }
.ci-side { display: grid; justify-items: end; gap: 8px; }
.qty-mini { display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: 999px; background: var(--ink); color: #fff; }
.qty-mini button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.qty-mini button svg { width: 15px; height: 15px; }
.qty-mini output { min-width: 14px; text-align: center; font: 700 14px var(--font-display); }
.remove-btn { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.remove-btn svg { width: 14px; height: 14px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 18px; background: rgba(22, 19, 17, 0.07); }
.seg button { height: 46px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 14px; font: 600 13px var(--font-display); white-space: nowrap; color: var(--muted); transition: background 0.25s, color 0.25s; }
.seg button svg { width: 19px; height: 19px; }
.seg button.is-on { background: var(--ink); color: #fff; }

.summary { margin-top: 20px; padding: 18px; border-radius: 24px; display: grid; gap: 10px; font-size: 14px; }
.summary .row { display: flex; justify-content: space-between; color: var(--muted-light); }
.summary .row b { color: var(--light); font: 600 14px var(--font-display); }
.summary .total { margin-top: 4px; padding-top: 12px; border-top: 1px dashed rgba(255, 255, 255, 0.18); color: var(--light); font: 700 16px var(--font-display); }
.summary .total b { color: #fff; font-size: 18px; }
.summary + .pill { margin-top: 18px; }
.checkout-form .pill { margin-top: 16px; }
.checkout-form .seg { margin-top: 18px; }

.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(22, 19, 17, 0.14);
  background: rgba(255, 255, 255, 0.55);
  font: 500 16px var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.field textarea { min-height: 84px; resize: none; }
.field input:focus, .field textarea:focus { border-color: var(--red); background: rgba(255, 255, 255, 0.8); }
.field input[dir="ltr"] { text-align: right; }
.field .err { display: none; font-size: 12px; color: var(--red-deep); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field.has-error .err { display: block; }

.pay-opts { display: grid; gap: 10px; margin-top: 12px; }
.pay { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1.5px solid rgba(22, 19, 17, 0.12); background: rgba(255, 255, 255, 0.4); }
.pay svg { width: 22px; height: 22px; }
.pay span { flex: 1; font-weight: 600; font-size: 14px; }
.pay small { font-size: 11.5px; color: var(--muted); }
.pay.is-on { border-color: var(--ink); background: rgba(255, 255, 255, 0.7); }
.pay.is-on::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 5px solid var(--red); }
.pay.is-off { opacity: 0.5; }

.loc-card { display: grid; gap: 12px; padding: 12px; }
.loc-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; }
.loc-btn b { display: block; font: 700 14.5px var(--font-display); }
.loc-btn small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.loc-icon { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 15px; background: var(--red); color: #fff; box-shadow: 0 10px 20px -10px rgba(201, 69, 44, 0.9); }
.loc-icon svg { width: 22px; height: 22px; }
.loc-map {
  display: block;
  width: 100%;
  height: 160px;
  border: 0;
  border-radius: 16px;
  background: var(--paper-deep);
  filter: sepia(0.25) saturate(0.85) contrast(0.95);
}
.loc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.loc-ok { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.loc-ok svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--red); color: #fff; }
.loc-ok small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.loc-actions { display: flex; gap: 6px; }
.loc-err { font-size: 12.5px; line-height: 1.7; color: var(--red-deep); }
.chip-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  padding-inline: 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(22, 19, 17, 0.2);
  font: 600 12.5px var(--font-display);
  white-space: nowrap;
}
.chip-btn:hover { border-color: var(--red); color: var(--red); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(22, 19, 17, 0.15); border-top-color: var(--red); animation: rot 0.8s linear infinite; }
@keyframes rot { to { rotate: 360deg; } }

.place { display: grid; gap: 12px; padding: 12px; }
.place-row { display: flex; align-items: center; gap: 12px; }
.place-row > svg { width: 22px; height: 22px; color: var(--red); }
.place-row > span { flex: 1; min-width: 0; }
.place-row b { display: block; font: 700 14px var(--font-display); }
.place-row small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.place-row .go { width: 18px; height: 18px; color: var(--muted); }
a.place-row { margin-top: 12px; }
.card.place { margin-top: 12px; }

.guest-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 12px 14px; font-size: 13px; }
.guest-note a { color: var(--red); font-weight: 600; white-space: nowrap; }
.demo-note { margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: rgba(201, 69, 44, 0.1); color: #8f2f1d; font-size: 12px; line-height: 1.7; }

.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 10px 10px; }
.empty-art { position: relative; width: 150px; height: 120px; color: var(--ink); }
.empty-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.empty-art .e-icon { inset: 30px 45px; width: 60px; height: 60px; color: #fff; }
.empty h3 { margin-top: 8px; font: 700 19px var(--font-display); }
.empty p { color: var(--muted); font-size: 13.5px; max-width: 28ch; }
.empty .pill { margin-top: 14px; }

/* ---------- Order tracking ---------- */
.track-hero { display: grid; justify-items: center; text-align: center; margin-top: 18px; }
.track-badge { position: relative; width: 104px; height: 104px; display: grid; place-items: center; color: #fff; }
.track-badge > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; }
.track-badge .check { position: relative; width: 44px; height: 44px; animation: pop 0.6s var(--ease) both 0.2s; }
@keyframes pop { from { scale: 0; } }
.track-hero h2 { margin-top: 14px; font: 800 24px var(--font-display); }
.track-hero p { margin-top: 4px; color: var(--muted); font-size: 13.5px; }
.order-no { margin-top: 10px; display: inline-flex; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: #fff; direction: ltr; font: 600 13px var(--font-display); }
.eta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding: 14px; font-weight: 600; font-size: 14px; }
.eta svg { width: 20px; height: 20px; color: var(--red); }

.track { list-style: none; margin: 20px 0 0; padding: 0; }
.track li { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.track li:last-child { padding-bottom: 0; }
.track li::before {
  content: "";
  position: absolute;
  top: 26px;
  bottom: 0;
  inset-inline-start: 12px;
  width: 2px;
  background: rgba(22, 19, 17, 0.12);
}
.track li:last-child::before { display: none; }
.track li.is-done::before { background: var(--red); }
.t-dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(22, 19, 17, 0.2);
  background: var(--paper);
  color: #fff;
}
.t-dot svg { width: 14px; height: 14px; opacity: 0; }
.track li.is-done .t-dot { background: var(--red); border-color: var(--red); }
.track li.is-done .t-dot svg { opacity: 1; }
.track li.is-now .t-dot { border-color: var(--red); }
.track li.is-now .t-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--red); animation: ping 1.6s ease-out infinite; }
@keyframes ping { from { opacity: 0.8; scale: 0.7; } to { opacity: 0; scale: 1.4; } }
.t-text b { display: block; font: 700 14.5px var(--font-display); }
.t-text small { color: var(--muted); font-size: 12.5px; }
.track li.is-pending .t-text { opacity: 0.5; }

.order-items { margin-top: 18px; display: grid; gap: 8px; font-size: 13.5px; }
.order-items .row { display: flex; justify-content: space-between; gap: 10px; }
.order-items .row span:first-child { color: var(--muted); }
.order-items .row.total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed rgba(22, 19, 17, 0.2); font-weight: 700; }
.order-items .row.total span:first-child { color: var(--text); }
.btn-row { display: grid; gap: 10px; margin-top: 20px; }

.past-orders { display: grid; gap: 10px; margin-top: 16px; }
.past { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.past b { font: 700 14px var(--font-display); direction: ltr; }
.past small { display: block; color: var(--muted); font-size: 12px; }
.status-chip { padding: 5px 10px; border-radius: 999px; background: rgba(201, 69, 44, 0.12); color: var(--red-deep); font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-chip.done { background: rgba(22, 19, 17, 0.08); color: var(--muted); }

/* ---------- Visit ---------- */
/* Same garden as the home screen, as a picture above the details */
.map-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(22, 19, 17, 0.1);
  background-color: var(--paper-deep);
  background-image: var(--tex-grain), radial-gradient(90% 70% at 85% 100%, rgba(255, 255, 255, 0.45), transparent 70%);
  box-shadow: 0 20px 40px -28px rgba(50, 30, 15, 0.5);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.map-card:active { transform: scale(0.985); }
.map-card .mc-art { position: relative; display: block; height: 150px; overflow: hidden; border-bottom: 1px solid rgba(22, 19, 17, 0.08); }
.map-card .mc-vine { position: absolute; top: -12px; left: -14px; width: 58%; max-width: 230px; height: auto; aspect-ratio: 320 / 240; }
.map-card .mc-garden { position: absolute; right: -4%; bottom: -6px; width: 74%; max-width: 330px; height: auto; aspect-ratio: 400 / 220; opacity: 0.9; }
.map-card .mc-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 16px; background: rgba(255, 255, 255, 0.35); }
.map-card .mc-body b { display: block; font: 700 18px var(--font-display); }
.map-card .mc-body small { display: block; margin-top: 4px; direction: ltr; text-align: right; color: var(--muted); font-size: 13px; }
.map-card .mc-go { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; }
.map-card .mc-go svg { width: 22px; height: 22px; transform: rotate(45deg); }
.map-card .mc-pin { position: absolute; top: 34px; right: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(22, 19, 17, 0.08); font-size: 12px; font-weight: 600; }
.map-card .mc-pin svg { width: 15px; height: 15px; color: var(--red); }

.phone-list { display: grid; gap: 10px; margin-top: 12px; }
.phone-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; }
.phone-row b { direction: ltr; font: 700 18px var(--font-display); letter-spacing: 0.03em; }
.phone-row .go { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--red); color: #fff; }
.phone-row .go svg { width: 19px; height: 19px; }

.gallery { display: flex; gap: 12px; margin: 12px -20px 0; padding: 0 20px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 168px; height: 210px; border-radius: 20px; object-fit: cover; scroll-snap-align: start; }

/* ---------- Account ---------- */
.acc-hero { display: grid; justify-items: center; text-align: center; margin-top: 24px; }
.acc-logo { width: 220px; height: auto; }
.acc-hero h2 { margin-top: 18px; font: 800 24px var(--font-display); }
.acc-hero p { margin-top: 6px; color: var(--muted); font-size: 13.5px; max-width: 30ch; line-height: 1.8; }
.acc-actions { display: grid; gap: 12px; margin-top: 26px; }
.text-link { justify-self: center; margin-top: 4px; padding: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.perks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.perks li svg { width: 20px; height: 20px; color: var(--red); }
.soon { margin-inline-start: auto; padding: 3px 9px; border-radius: 999px; background: rgba(22, 19, 17, 0.08); font-size: 11px; color: var(--muted); }

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute;
  inset-inline: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 30;
  height: 66px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: 24px;
  background-color: rgba(22, 19, 17, 0.97);
  background-image: var(--tex-grain-light);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6);
  transition: transform 0.45s var(--ease), opacity 0.3s;
}
.tabbar.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #8b8177; font: 600 10.5px var(--font-body); transition: color 0.25s; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.is-active { color: #fff; }
.tabbar a.is-active svg { color: var(--red); }
.tab-cart-icon { position: relative; display: grid; }
.badge {
  position: absolute;
  top: -7px;
  inset-inline-end: -11px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding-inline: 5px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--red);
  color: #fff;
  font: 700 10px/1 var(--font-display);
}
.badge[hidden] { display: none; }
.badge.bump { animation: bump 0.5s var(--ease); }
@keyframes bump { 40% { scale: 1.45; } }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  top: calc(var(--sb) + 8px);
  inset-inline: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.6);
  translate: 0 -160%;
  opacity: 0;
  transition: translate 0.45s var(--ease), opacity 0.3s;
  pointer-events: none;
}
.toast.show { translate: 0 0; opacity: 1; }
.toast svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--red); }

/* ---------- Phones: the app is the whole screen ---------- */
@media (max-width: 520px), (max-height: 600px) {
  :root { --sb: max(env(safe-area-inset-top), 10px); }
  body { display: block; overflow: hidden; }
  .stage, .statusbar { display: none; }
  .device { width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .app { border-radius: 0; }
}

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