/* DishSimply — Airbnb-inspired UI
   Image-forward cards, coral accent, generous whitespace, clean type.
   Text size is driven by [data-text-size] on <html>, scaling the root font. */

:root {
  --rausch: #ef6c02;        /* brand accent (orange) */
  --rausch-dark: #c95a00;
  --ink: #222222;
  --muted: #717171;
  --line: #ebebeb;
  --line-strong: #dddddd;
  --bg: #ffffff;
  --soft: #f7f7f7;
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.12);
  --shadow-pop: 0 8px 28px rgba(0, 0, 0, 0.18);
  --radius: 12px;
  --radius-lg: 16px;
}

html { font-size: 16px; }
html[data-text-size="small"] { font-size: 14px; }
html[data-text-size="medium"] { font-size: 16px; }
html[data-text-size="large"] { font-size: 19px; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 0.3em; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 60;
  transition: box-shadow 0.2s;
}
.app-header .brand { justify-self: start; }
.app-header .tabs { justify-self: center; }
.app-header .header-controls { justify-self: end; }
@media (max-width: 743px) {
  /* Name left, controls right (one row), tabs centered below. */
  .app-header { grid-template-columns: 1fr auto; padding: 0.6rem 1rem; gap: 0.5rem; }
  .app-header .tabs { grid-column: 1 / -1; order: 3; }
  .brand-logo { height: 1.25rem; max-height: 1.4rem; top: 5px; }
  .header-controls { flex-wrap: nowrap; gap: 0.4rem; }
  #language-select,
  #text-size-select {
    padding: 0.35rem 1.5rem 0.35rem 0.6rem;
    font-size: 0.78rem;
    background-position: right 0.55rem center;
  }
}
.app-header.scrolled { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.header-search[hidden] { display: none; }
.brand { display: flex; align-items: center; }
.brand-heading { margin: 0; line-height: 0; display: flex; align-items: center; }
.brand-logo {
  height: 1.5rem;
  max-height: 1.7rem;
  width: auto;
  display: block;
  position: relative;
  top: 12px; /* nudge down to sit level with the tabs/controls */
}
.brand-tagline { margin: 0; color: var(--muted); font-size: 0.8rem; }
.sync-badge {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--soft);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}
.sync-badge.online { color: #0a7d54; background: #e7f7ef; }

/* Airbnb-style centered search pill */
.header-search {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.45rem 0.45rem 0.45rem 1.2rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}
.header-search:hover { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.14); }
.header-search .hs-icon {
  background: var(--rausch);
  color: #fff;
  border-radius: 50%;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.header-controls { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.control { display: flex; flex-direction: column; gap: 0.2rem; border: 0; margin: 0; padding: 0; }
.control-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

#language-select,
#text-size-select {
  -webkit-appearance: none;
  appearance: none;
  padding: 0.5rem 2.2rem 0.5rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
#language-select:hover,
#text-size-select:hover { border-color: var(--ink); }

.seg { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.seg-btn {
  border: 0;
  background: #fff;
  min-width: 2.4rem;
  padding: 0.3rem 0.7rem;
  color: var(--ink);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
}
.seg-btn:last-child { border-right: 0; }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg-btn.size-sm { font-size: 0.78rem; }
.seg-btn.size-md { font-size: 1.02rem; }
.seg-btn.size-lg { font-size: 1.32rem; }

/* ---------- Tabs (in header center, Airbnb nav style) ---------- */
.tabs { display: flex; gap: 1.6rem; align-items: center; }
.tab {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.3rem 0.3rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  border-bottom: 2px solid transparent;
  line-height: 1.1;
}
.tab-icon { font-size: 1.3rem; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Layout ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 1.5rem 2rem 3rem; }
.tab-panel:focus { outline: none; }
.section-title { margin-top: 2rem; font-size: 1.35rem; }
.section-title:first-child { margin-top: 0; }

/* ---------- Hero (landing) ---------- */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.6rem;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.hero-collage {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr;
  gap: 2px;
}
.hero-collage.empty,
.hero-collage:empty {
  background: linear-gradient(135deg, var(--rausch), #ffa552);
}
.hc-tile { background-size: cover; background-position: center; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.6));
}
.hero-content { text-align: center; color: #fff; padding: 3rem 1.5rem; max-width: 700px; }
.hero-title {
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.hero-subtitle {
  font-size: 1.1rem;
  margin: 0 auto 1.6rem;
  max-width: 540px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.hero-search {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.1s, box-shadow 0.1s;
}
.hero-search:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32); }
.hero-search-icon { font-size: 1.1rem; }
.hero-quick { margin-top: 1.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.55rem; }
.hero-quick-label { font-weight: 700; opacity: 0.95; }
.hero-quick-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; }
.hero-chip {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  text-transform: capitalize;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.hero-chip:hover { background: rgba(255, 255, 255, 0.32); }
.hero-stats { margin-top: 1.8rem; display: flex; gap: 2rem; justify-content: center; }
.hstat { font-size: 0.88rem; opacity: 0.95; }
.hstat strong { display: block; font-size: 1.5rem; font-weight: 800; }

/* ---------- Floating segmented search bar (Airbnb) ---------- */
/* Sticks under the header and shrinks into a compact pill as you scroll. */
.searchbar-wrap {
  position: sticky;
  top: calc(var(--header-h, 72px) + 8px);
  max-width: 860px;
  margin: -2.2rem auto 1.8rem;
  z-index: 30;
  transition: max-width 0.28s ease, margin 0.28s ease;
}
.searchbar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  padding: 0.35rem 0.35rem 0.35rem 0;
  transition: padding 0.28s ease, box-shadow 0.2s ease;
}
.searchbar.open { background: var(--soft); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18); }

/* Compact (scrolled) state */
.searchbar-wrap.compact { max-width: 420px; margin-top: 0; }
.searchbar-wrap.compact .searchbar { padding: 0.2rem 0.2rem 0.2rem 0; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13); }
.searchbar-wrap.compact .sb-label { display: none; }
.searchbar-wrap.compact .sb-seg { padding: 0.45rem 1.1rem; }
.searchbar-wrap.compact .sb-value { font-size: 0.84rem; }
.searchbar-wrap.compact .sb-divider { height: 1.4rem; }
.searchbar-wrap.compact .sb-search { width: 2.3rem; height: 2.3rem; font-size: 0.9rem; }
.sb-seg {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.searchbar:not(.open) .sb-seg:hover { background: var(--soft); }
.searchbar.open .sb-seg:hover { background: #ececec; }
.sb-seg.active { background: #fff !important; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.14); }
.sb-label { font-size: 0.7rem; font-weight: 700; color: var(--ink); }
.sb-value { font-size: 0.92rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-value.has { color: var(--ink); font-weight: 500; }
.sb-divider { width: 1px; height: 2rem; background: var(--line); flex: 0 0 auto; }
.searchbar.open .sb-divider { opacity: 0; }
.sb-search {
  flex: 0 0 auto;
  margin-left: auto;
  background: var(--rausch);
  color: #fff;
  border: 0;
  border-radius: 999px;
  width: 3rem;
  height: 3rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sb-search:hover { background: var(--rausch-dark); }

.sb-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.2);
  padding: 1.4rem 1.6rem;
  z-index: 31;
}
.sb-step-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.sb-panel .ingredient-search { margin: 0.6rem 0 0.9rem; }
.sb-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.18); z-index: 25; }

@media (max-width: 743px) {
  .searchbar-wrap { margin-top: -1.4rem; }
  .sb-seg { padding: 0.6rem 1rem; }
  .sb-value { font-size: 0.82rem; }
}

/* ---------- Filter card ---------- */
.filter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-card);
}
.filter-head { display: flex; justify-content: space-between; align-items: center; }
.filter-head h2 { font-size: 1.1rem; }
.link-btn { border: 0; background: none; color: var(--ink); font-weight: 600; padding: 0.2rem; text-decoration: underline; }
.link-btn:hover { color: var(--rausch); }

.ingredient-search {
  width: 100%;
  margin: 0.8rem 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ingredient-search:focus { outline: none; border-color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  color: var(--ink);
  text-transform: capitalize;
  font-weight: 500;
  transition: border-color 0.12s, background 0.12s, transform 0.05s;
}
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip[aria-pressed="true"]::before { content: "✓ "; }

.diet-filter { margin: 1rem 0 0.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.diet-title { font-size: 1rem; margin-bottom: 0.1rem; }
.diet-filter .muted { margin: 0 0 0.6rem; font-size: 0.85rem; }
.diet-filter .chip { text-transform: none; }

/* ---------- Horizontal carousel rows (Airbnb home sections) ---------- */
.rowsec { margin-bottom: 2.2rem; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.row-title { font-size: 1.35rem; margin: 0; }
.row-nav { display: flex; gap: 0.45rem; }
.row-arrow {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.row-arrow:hover { border-color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.row-track {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}
.row-track::-webkit-scrollbar { height: 6px; }
.row-track::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.row-track .dish-card { flex: 0 0 230px; width: 230px; scroll-snap-align: start; }

/* ---------- Card grid (Airbnb listings) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem 1.2rem;
  margin-top: 1rem;
}

.dish-card {
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.dish-card.clickable { cursor: pointer; }

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 20 / 19;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.dish-card.clickable:hover .card-media img { transform: scale(1.045); }
.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(160deg, #ffe6cc, #fff5ea);
}

/* "Top rated" badge (Airbnb's "Guest favorite") */
.fav-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* Heart favorite overlay */
.heart {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  padding: 4px;
  line-height: 0;
}
.heart svg { width: 26px; height: 26px; display: block; transition: transform 0.1s; }
.heart svg path { fill: rgba(0, 0, 0, 0.5); stroke: #fff; stroke-width: 2; }
.heart:hover svg { transform: scale(1.1); }
.heart[aria-pressed="true"] svg path { fill: var(--rausch); }

.card-info { display: flex; flex-direction: column; gap: 0.15rem; }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.dish-name { font-size: 1rem; font-weight: 600; margin: 0; }
.rating { font-size: 0.9rem; white-space: nowrap; font-weight: 500; display: inline-flex; align-items: center; gap: 0.2rem; }
.rating .star { color: var(--ink); }
.rating .ic-like { color: var(--rausch); }
.rating-new { color: var(--muted); font-weight: 500; }
.card-sub { margin: 0; color: var(--muted); font-size: 0.9rem; }
.card-sub.bold { color: var(--ink); font-weight: 600; }

.dish-diets { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
.diet-badge {
  font-size: 0.7rem;
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-weight: 600;
}

.suggest-line {
  background: #fff3e6;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  color: var(--rausch-dark);
  margin-top: 0.2rem;
}

.restore-btn {
  align-self: flex-start;
  margin-top: 0.3rem;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-weight: 600;
}
.restore-btn:hover { border-color: var(--ink); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

.disliked-area { margin-top: 2.5rem; }

/* ---------- Modal (Airbnb detail sheet) ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.modal-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: calc(100% - 2rem);
  max-height: 92vh;
  overflow-y: auto;
  padding: 0 0 1.5rem;
  box-shadow: var(--shadow-pop);
  -webkit-overflow-scrolling: touch;
}
.modal-card.swipe-reset { transition: transform 0.25s ease; }
.modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  border: 0;
  background: #fff;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 0.95rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.modal-close:hover { background: var(--soft); }
.modal-share {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  border: 0;
  background: #fff;
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.modal-share svg { width: 1.05rem; height: 1.05rem; }
.modal-share:hover { background: var(--soft); }
[dir="rtl"] .modal-share { right: auto; left: 1rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-media {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(160deg, #ffe6cc, #fff5ea);
}

/* Photo-grid gallery (Airbnb's multi-photo header) */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 6px;
  height: 320px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-side { display: grid; gap: 6px; grid-auto-rows: 1fr; }
.gallery-single { height: 320px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.gallery-single img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-pad { padding: 1.4rem 1.8rem 0; }
.modal-title { font-size: 1.8rem; margin-bottom: 0.2rem; }
.modal-sub { color: var(--muted); margin: 0 0 0.4rem; }
.rating-line { font-weight: 600; margin-bottom: 1rem; }

/* Airbnb-style rating / review bar */
.rating-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0.9rem 0.5rem;
  margin: 1rem 0 1.3rem;
  text-align: center;
}
.rb-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; padding: 0 0.3rem; }
.rb-num { font-size: 1.15rem; font-weight: 800; }
.rb-num .star { font-size: 0.9rem; }
.rb-label { font-size: 0.72rem; color: var(--muted); }
.rb-laurel { font-size: 1.2rem; }
.rb-div { width: 1px; background: var(--line); }

/* Sticky bottom action bar (Airbnb's "Reserve" bar) */
.modal-actionbar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.13);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.8rem;
  margin-top: 1.2rem;
}
.ab-left { display: flex; flex-direction: column; }
.ab-rating { font-weight: 700; }
.ab-sub { font-size: 0.8rem; color: var(--muted); }
.ab-save {
  border: 0;
  background: var(--rausch);
  color: #fff;
  border-radius: 10px;
  padding: 0.8rem 1.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.ab-save:hover { background: var(--rausch-dark); }
.ab-save[aria-pressed="true"] { background: #fff; color: var(--rausch); border: 1px solid var(--rausch); }

.modal-diets { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }

.modal-section { border-top: 1px solid var(--line); padding-top: 1.3rem; margin-top: 1.3rem; }
.modal-section h3 { font-size: 1.2rem; margin-bottom: 0.8rem; }

/* Servings stepper */
.servings-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.servings-stepper { display: inline-flex; align-items: center; gap: 0.9rem; }
.step-btn {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-btn:hover:not(:disabled) { border-color: var(--ink); }
.step-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.servings-count { min-width: 5.5rem; text-align: center; font-weight: 600; }

/* Ingredients table */
.ingredients-table { width: 100%; border-collapse: collapse; }
.ingredients-table td {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ingredients-table tr:last-child td { border-bottom: 0; }
.ing-name { font-weight: 500; }
.ing-amount { text-align: right; color: var(--muted); white-space: nowrap; padding-left: 1rem; }

/* Nutrition facts (estimated, scales with servings) */
.nutri-tag {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  background: var(--soft);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  vertical-align: middle;
}
.nutrition-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.nutri {
  background: var(--soft);
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.nutri-val { font-size: 1.25rem; font-weight: 700; }
.nutri-key { font-size: 0.78rem; color: var(--muted); }
.nutri-foot { margin: 0.7rem 0 0; font-size: 0.82rem; }

.steps-list { padding-left: 1.4rem; display: flex; flex-direction: column; gap: 0.7rem; margin: 0; }
.steps-list li { padding-left: 0.3rem; }
.steps-list li::marker { font-weight: 700; color: var(--rausch); }

.modal-source { margin: 1rem 0 0; }
.modal-source a { color: var(--ink); font-weight: 600; text-decoration: underline; }
.modal-source a:hover { color: var(--rausch); }

.feedback-row { display: flex; gap: 0.7rem; }
.feedback-btn {
  flex: 1;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  padding: 0.8rem;
  font-weight: 600;
}
.feedback-btn:hover { border-color: var(--ink); }
.feedback-btn.like[aria-pressed="true"] { background: #0a7d54; color: #fff; border-color: #0a7d54; }
.feedback-btn.dislike[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Save button inside modal */
.icon-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn.fav[aria-pressed="true"] { color: var(--rausch); border-color: var(--rausch); }

.comment-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.comment-form input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 0.95rem;
}
.comment-form input:focus { outline: none; border-color: var(--ink); }
.comment-form button {
  border: 0;
  background: var(--rausch);
  color: #fff;
  border-radius: 10px;
  padding: 0 1.3rem;
  font-weight: 600;
}
.comment-form button:hover { background: var(--rausch-dark); }
.comment { border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
.comment:last-child { border-bottom: 0; }
.comment-meta { font-size: 0.78rem; color: var(--muted); }
.comment-text { margin: 0.2rem 0 0; }

/* ---------- Footer ---------- */
.app-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

/* ---------- Inline icons ---------- */
.ic { width: 1em; height: 1em; vertical-align: -0.15em; flex: 0 0 auto; }
.tab-icon { width: 1.4rem; height: 1.4rem; }
.ph-icon { width: 3.2rem; height: 3.2rem; color: var(--rausch); opacity: 0.6; }
.ic-like { color: var(--rausch); }
.sb-search svg { width: 1.2rem; height: 1.2rem; }
.rb-laurel .ic { width: 1.4rem; height: 1.4rem; color: var(--rausch); }
.feedback-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.ab-save { display: inline-flex; align-items: center; gap: 0.4rem; }
.card-sub.bold { display: flex; align-items: center; gap: 0.3rem; }
.suggest-line { display: flex; align-items: center; gap: 0.3rem; }
.sync-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 3px; vertical-align: middle; }
.sync-badge.online .sync-dot { background: #0a7d54; }

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

/* Right-to-left (Arabic) */
[dir="rtl"] .ing-amount { text-align: left; padding-left: 0; padding-right: 1rem; }
[dir="rtl"] .modal-close { left: auto; right: 1rem; }
[dir="rtl"] .heart { right: auto; left: 10px; }
[dir="rtl"] .steps-list { padding-left: 0; padding-right: 1.4rem; }

@media (max-width: 743px) {
  .nutrition-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 340px; }
  .hero-title { font-size: 1.95rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-collage { grid-template-columns: repeat(4, 1fr); }
  .hero-stats { gap: 1.2rem; }
  .gallery { grid-template-columns: 1fr; height: 240px; }
  .g-side { display: none; }
  .gallery-single { height: 240px; }
  .header-search { display: none; }
  .app-header { padding: 0.8rem 1.2rem; }
  .tabs { padding: 0 1.2rem; gap: 1.2rem; top: 60px; }
  main { padding: 1.2rem 1.2rem 2.5rem; }
  .modal-media { height: 240px; }
  .modal-pad { padding: 1.2rem 1.2rem 0; }
}
