:root {
  --bg: #f6f0e7;
  --bg-2: #fffaf4;
  --paper: #ffffff;
  --cream: #fff8ef;
  --cream-2: #f8f1e8;
  --ink: #171310;
  --ink-mute: #6d6258;
  --ink-soft: #695d53;
  --line: rgba(23, 19, 16, 0.08);
  --line-strong: rgba(23, 19, 16, 0.14);
  --saffron: #f08a1e;
  --saffron-deep: #c66500;
  --green: #18804c;
  --green-soft: #e2f3ea;
  --savings-soft: #edf8f1;
  --danger: #b83e3e;
  --danger-soft: #f9e1e1;
  --radius: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --r-lg: 24px;
  --shadow: 0 14px 40px rgba(23, 19, 16, 0.08);
  --sh-1: 0 14px 36px rgba(23,19,16,.06);
  --font-ar: "Alexandria", system-ui, sans-serif;
  --font-num: "Manrope", "Alexandria", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { direction: rtl; }
body {
  margin: 0;
  background: radial-gradient(circle at top right, rgba(240,138,30,.18), transparent 22rem), var(--bg);
  color: var(--ink);
  font-family: var(--font-ar);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button {
  cursor: pointer;
  border: 0;
  background: none;
}

.page-shell {
  min-height: 100vh;
  padding: 18px;
}

.brand-en {
  display: block;
  font-family: var(--font-num);
  letter-spacing: .18em;
  font-size: 11px;
  font-weight: 800;
  opacity: .7;
}

.brand-ar {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}

.app-frame {
  width: min(100%, 460px);
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 24px 60px rgba(23, 19, 16, 0.14);
  border-radius: 40px;
  overflow: hidden;
  min-height: calc(100vh - 36px);
  position: relative;
  opacity: 0;
  transition: opacity .35s ease;
}

body.app-ready .app-frame {
  opacity: 1;
}

.app-scroll { padding: 16px 16px 110px; }
.status-row {
  display: none;
  justify-content: space-between;
  direction: ltr;
  color: #2b241f;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px 8px;
}

.topbar, .section-head, .row-between, .ai-mini, .result-meta, .price-line, .provider-row, .nav-bar, .admin-grid, .admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar { gap: 12px; }
.logo-chip, .icon-btn, .provider-badge, .metric, .tag, .nav-item, .sheet-chip, .admin-stat, .table-shell, .upload-box, .panel {
  border: 1px solid var(--line);
  background: var(--paper);
}

.topbar--bare {
  justify-content: flex-start;
  padding: 6px 2px 2px;
}

.brand-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-symbol {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.brand-symbol-wrap {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--saffron), #ffb15b);
  box-shadow: 0 10px 24px rgba(240,138,30,.24);
}

.brand-symbol-wrap .brand-symbol {
  width: 31px;
  height: 31px;
}

.brand-lockup--bare {
  display: grid;
  gap: 1px;
}

.brand-lockup--bare .brand-ar {
  margin-top: 1px;
  font-size: 24px;
}

.city-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.city-line--button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.city-line--button .icon-inline {
  color: var(--ink);
}

.icon-inline,
.section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ui-icon {
  display: block;
  flex: 0 0 auto;
}

.logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(23,19,16,.05);
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--saffron), #ffb15b);
  font-weight: 900;
}

.logo-mark--brand {
  padding: 7px;
  background: linear-gradient(135deg, #171310, #3b2b1d);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.logo-mark--brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-lockup {
  display: grid;
  gap: 2px;
}

.logo-chip strong { display:block; font-size: 18px; }
.logo-chip small { color: var(--ink-soft); font-size: 12px; }

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
}

.hero {
  margin-top: 18px;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(145deg, #1d1712, #33271e);
  color: #fff8ef;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 29px;
  line-height: 1.25;
}
.hero p { margin: 0; color: rgba(255,248,239,.82); font-size: 14px; line-height: 1.7; }

.h-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 6px;
  scrollbar-width: none;
}

.h-row::-webkit-scrollbar { display: none; }

.deal-card {
  min-width: 228px;
  width: 228px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}

.deal-card__media {
  height: 124px;
  position: relative;
}

.deal-card__media .food-thumb {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.deal-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}

.deal-body {
  padding: 12px 14px 14px;
}

.deal-caption {
  color: var(--ink-mute);
  font-size: 11px;
  font-weight: 700;
}

.deal-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  margin: 4px 0 12px;
  min-height: 38px;
}

.restaurants-section {
  margin-top: 8px;
}

.restaurant-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 74%);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 8px;
  scrollbar-width: none;
}

.restaurant-rail::-webkit-scrollbar { display: none; }

.restaurant-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: 1fr auto;
  gap: 10px 12px;
  align-items: center;
  text-align: right;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 22px;
  box-shadow: var(--sh-1);
}

.restaurant-card.active {
  border-color: rgba(240,138,30,.42);
  background: linear-gradient(180deg, #fff8ef, #fff);
  box-shadow: 0 16px 36px rgba(240,138,30,.13);
}

.restaurant-card__logo,
.restaurant-panel__logo {
  border-radius: 18px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 7px;
  color: var(--saffron-deep);
  box-shadow: 0 8px 20px rgba(23,19,16,.08);
}

.restaurant-card__logo {
  width: 58px;
  height: 58px;
}

.restaurant-panel__logo {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  padding: 9px;
}

.restaurant-card__logo img,
.restaurant-panel__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.restaurant-card__copy {
  display: grid;
  gap: 5px;
}

.restaurant-card__copy strong {
  font-size: 17px;
}

.restaurant-card__copy small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.restaurant-card .providers-stack {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.restaurant-detail,
.restaurant-view {
  margin-top: 8px;
}

.restaurant-view[hidden] {
  display: none;
}

.restaurant-panel {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--sh-1);
}

.restaurant-back {
  margin: 14px 14px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--saffron-deep);
  background: #fff4e4;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
}

.restaurant-panel__hero {
  min-height: 158px;
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #1d1712, #3a2819);
}

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

.restaurant-panel__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,19,16,.06), rgba(23,19,16,.78));
  z-index: 1;
}

.restaurant-panel__content {
  position: absolute;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff8ef;
  text-align: right;
}

.restaurant-panel__content h3 {
  margin: 0 0 4px;
  font-size: 26px;
}

.restaurant-panel__content p {
  margin: 0;
  color: rgba(255,248,239,.82);
  font-size: 12px;
  line-height: 1.6;
}

.restaurant-categories {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 14px 4px;
  scrollbar-width: none;
}

.restaurant-categories::-webkit-scrollbar { display: none; }

.restaurant-category {
  border: 1px solid var(--line);
  background: #fff8ef;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.restaurant-category.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.restaurant-items {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.restaurant-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: right;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
}

.restaurant-item .food-thumb {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  font-size: 10px;
}

.restaurant-item__copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.restaurant-item__copy strong {
  font-size: 14px;
  line-height: 1.45;
}

.restaurant-item__copy small {
  color: var(--ink-soft);
  font-size: 11px;
}

.restaurant-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--ink-mute);
  font-size: 11px;
  font-weight: 800;
}

.restaurant-item__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.restaurant-item__price {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--ink);
}

.restaurant-item__price strong {
  font-family: var(--font-num);
  font-size: 16px;
  white-space: nowrap;
}

.restaurant-item__price small {
  color: var(--saffron-deep);
  font-size: 11px;
  font-weight: 900;
}

.old-price {
  color: var(--ink-soft);
  text-decoration: line-through;
  font-family: var(--font-num);
  font-size: 12px;
  margin-inline-start: 6px;
}

.hero small,
.section-head small,
.note,
.trust-note,
.result-meta,
.ai-mini,
.provider-copy small,
.breakdown,
.table-shell table,
.logo-chip small {
  line-height: 1.65;
}

.search-card, .ai-card, .budget-card, .result-card, .admin-card {
  margin-top: 16px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(23,19,16,.07);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 14px 36px rgba(23,19,16,.06);
}

.search-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  border-radius: 18px;
  padding: 15px 16px;
  font-size: 16px;
  outline: 0;
}

.helper-row, .tags-row, .results-list, .provider-list, .sheet-list, .admin-actions {
  display: grid;
  gap: 12px;
}

.helper-row { grid-template-columns: 1fr auto; margin-top: 12px; }
.cta-primary, .cta-secondary {
  border-radius: 16px;
  padding: 13px 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.cta-primary { background: var(--saffron); color: white; }
.cta-secondary { background: #fff4e4; color: var(--saffron-deep); }

.tags-row {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tags-row::-webkit-scrollbar { display: none; }
.tag {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.tag.active { background: var(--ink); color: white; border-color: var(--ink); }

.section-head { margin-top: 22px; margin-bottom: 12px; }
.section-head h2, .section-head h3 { margin: 0; }
.section-head small { color: var(--ink-soft); }

.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.section-title-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #fff4e4;
  color: var(--saffron-deep);
  flex: 0 0 auto;
}

.ai-card {
  background: linear-gradient(180deg, #fff8ef, #fffaf6);
}
.ai-card .bubble {
  background: #fff;
  border: 1px solid rgba(240,138,30,.18);
  color: var(--ink);
  border-radius: 18px;
  padding: 14px;
  line-height: 1.7;
}
.ai-mini { gap: 8px; justify-content: flex-start; color: var(--ink-soft); font-size: 12px; margin-bottom: 10px; }

.budget-card input[type="range"] { width: 100%; accent-color: var(--saffron); }
.budget-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.budget-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
}
.budget-pill.active { background: var(--ink); color: white; border-color: var(--ink); }

.budget-card {
  background: linear-gradient(145deg, #1a1714 0%, #2d2621 100%);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.budget-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  left: -60px;
  top: -40px;
  background: radial-gradient(circle, rgba(240,138,30,.3), rgba(240,138,30,0) 70%);
}

.budget-card .section-head,
.budget-card small,
.budget-card strong,
.budget-card .budget-summary { position: relative; z-index: 1; }

.budget-card .section-head small,
.budget-card .budget-summary {
  color: rgba(255,248,239,.75);
}

.budget-card .budget-pill {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.08);
  color: var(--cream);
}

.budget-card .budget-pill.active {
  background: var(--saffron);
  border-color: var(--saffron);
}

.budget-card input[type="range"] { accent-color: #ffba6b; }

.budget-summary {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.65;
}

.budget-apply-btn {
  width: 100%;
  margin-top: 14px;
}

.nearby-list {
  display: grid;
  gap: 10px;
}

.nearby-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-1);
}

.nearby-row .food-thumb {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.providers-stack {
  display: flex;
  align-items: center;
}

.providers-stack .provider-dot {
  width: 20px;
  height: 20px;
  margin-inline-start: -6px;
  border: 2px solid #fff;
}

.providers-stack .provider-dot:first-child { margin-inline-start: 0; }

.trust-strip {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--cream-2);
  border-radius: 18px;
  border: 1px solid var(--line);
}

.trust-strip__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--paper);
  flex: 0 0 auto;
}

.trust-strip strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}

.trust-strip p {
  margin: 0;
  color: var(--ink-mute);
  font-size: 12px;
  line-height: 1.6;
}

.result-card { padding: 14px; }
.result-top {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: center;
}
.food-thumb {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  color: white;
  display: grid;
  place-items: end start;
  padding: 10px;
  font-weight: 800;
  font-size: 12px;
  isolation: isolate;
}
.food-thumb.has-photo { background: #ddd; }
.food-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.food-thumb__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,19,16,.06), rgba(23,19,16,.7));
  z-index: 1;
}
.thumb-logo {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  padding: 5px;
  box-shadow: 0 6px 18px rgba(23,19,16,.12);
}
.thumb-logo img,
.restaurant-badge__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.food-thumb__label {
  position: relative;
  z-index: 2;
}
.food-thumb.broast-gradient { background: linear-gradient(135deg, #ffb24f, #d35400); }
.food-thumb.shawarma-gradient { background: linear-gradient(135deg, #5a2d1a, #d08d45); }
.food-thumb.burger-gradient { background: linear-gradient(135deg, #43311e, #9e5b2c); }
.food-thumb.pizza-gradient { background: linear-gradient(135deg, #d94721, #ffb03b); }
.food-thumb.coffee-gradient { background: linear-gradient(135deg, #4b3326, #a2785f); }
.food-thumb.food-gradient { background: linear-gradient(135deg, #4f433b, #a78d78); }

.restaurant-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}

.restaurant-badge__logo {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(23,19,16,.08);
  flex: 0 0 auto;
}

.result-title { margin: 0 0 4px; font-size: 18px; }
.result-meta { justify-content: flex-start; gap: 10px; flex-wrap: wrap; color: var(--ink-soft); font-size: 12px; }
.metric { border-radius: 999px; padding: 5px 10px; }
.metric svg { margin-inline-start: 0; }

.cheapest-strip {
  margin-top: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--savings-soft);
  border-radius: 16px;
  color: var(--ink);
  border: 1px solid rgba(31,138,74,.08);
}

.provider-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}

.result-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.price-box {
  margin-top: 14px;
  border-radius: 18px;
  background: #fff7ec;
  border: 1px solid rgba(240,138,30,.16);
  padding: 12px;
}
.price-line { gap: 10px; }
.total-price {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 900;
}
.total-price small { font-size: 12px; color: var(--ink-soft); font-family: var(--font-ar); }

.provider-badge {
  border-radius: 12px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.provider-dot {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-family: var(--font-num);
  color: #fff;
  overflow: hidden;
  background: #fff;
}

.provider-dot--logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.savings-chip, .trust-note, .sheet-chip {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}
.savings-chip { background: var(--green-soft); color: var(--green); }
.trust-note { background: #f2efe9; color: var(--ink-soft); display: inline-block; margin-top: 10px; }

.card-actions { display: flex; gap: 10px; margin-top: 14px; }
.card-actions button { flex: 1; }

.nav-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  width: auto;
  max-width: 428px;
  margin-inline: auto;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: rgba(23,19,16,.96);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 34px rgba(23,19,16,.22);
  border-radius: 26px;
  padding: 10px 8px 8px;
  gap: 8px;
  z-index: 35;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.nav-item {
  flex: 1;
  padding: 4px 6px 8px;
  border-radius: 18px;
  text-align: center;
  color: rgba(255,248,239,.72);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  border-color: transparent;
}
.nav-icon {
  width: 40px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.nav-item.active { color: #fff; }
.nav-item.active .nav-icon { background: var(--saffron); color: #fff; }

.sheet, .modal {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  margin: 0 auto;
  width: min(100%, 460px);
  background: #fff;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -12px 40px rgba(23,19,16,.18);
  transform: translateY(108%);
  transition: transform .25s ease;
  max-height: 82vh;
  overflow: auto;
  padding: 18px 18px 30px;
}
.sheet.show, .modal.show { transform: translateY(0); }
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(23,19,16,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 40;
}
.scrim.show { opacity: 1; pointer-events: auto; }
.grabber { width: 48px; height: 6px; border-radius: 999px; background: #e8e0d7; margin: 0 auto 16px; }
.sheet-list { margin-top: 16px; }
.provider-row {
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.provider-row.best { border-color: rgba(24,128,76,.28); background: #f8fffb; }
.provider-copy { flex: 1; }
.provider-copy strong { display: block; margin-bottom: 2px; }
.provider-copy small { color: var(--ink-soft); }
.breakdown { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
.sheet-chip { background: #fff7ec; color: var(--saffron-deep); }

.modal h3, .sheet h3 { margin: 6px 0; }
.sheet-cover {
  margin: 0 0 14px;
}

.sheet-cover .food-thumb {
  width: 100%;
  height: 160px;
  border-radius: 22px;
}

.chat-shell {
  display: grid;
  gap: 12px;
}

.chat-messages {
  display: grid;
  gap: 10px;
  max-height: 48vh;
  overflow-y: auto;
  padding-inline-end: 2px;
}

.chat-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.7;
  font-size: 14px;
  white-space: pre-wrap;
}

.chat-bubble--assistant {
  background: #fff7ec;
  border: 1px solid rgba(240,138,30,.18);
  justify-self: start;
}

.chat-bubble--user {
  background: #171310;
  color: #fff;
  justify-self: end;
}

.chat-bubble--typing {
  color: var(--ink-soft);
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.chat-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  outline: 0;
}

.summary-box {
  background: #faf6f0;
  border-radius: 18px;
  padding: 14px;
  margin-top: 12px;
}
.summary-box .row-between { margin-bottom: 8px; }

.admin-shell { width: min(1100px, 100%); margin: 0 auto; }
.admin-head { margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.admin-grid { align-items: stretch; gap: 16px; flex-wrap: wrap; }
.admin-stat {
  flex: 1;
  min-width: 220px;
  padding: 18px;
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(23,19,16,.04);
}
.admin-stat strong { font-size: 28px; font-family: var(--font-num); display: block; }
.admin-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-top: 16px; }
.upload-box, .table-shell, .panel {
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(23,19,16,.04);
}
.upload-box textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.table-shell table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-shell th, .table-shell td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.note { color: var(--ink-soft); font-size: 13px; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  html, body { min-height: 100dvh; }
  .page-shell { padding: 0; min-height: 100dvh; }
  .app-frame {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
  }
  .app-scroll {
    padding: 12px 16px calc(128px + env(safe-area-inset-bottom, 0px));
  }
  .brand-ar { font-size: 26px; }
  .brand-lockup--bare .brand-ar { font-size: 22px; }
  .result-top { grid-template-columns: 88px 1fr; }
  .food-thumb { width: 88px; height: 88px; }
  .nearby-row { grid-template-columns: 64px 1fr auto; }
  .nearby-row .food-thumb { width: 64px; height: 64px; }
  .restaurant-rail { grid-auto-columns: minmax(208px, 82%); }
  .restaurant-item { grid-template-columns: 62px 1fr auto; gap: 10px; }
  .restaurant-item .food-thumb { width: 62px; height: 62px; }
  .nav-bar {
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }
  .sheet, .modal {
    width: 100%;
    max-height: 86dvh;
    border-radius: 24px 24px 0 0;
  }
}
