/* Layout and components. Colors and fonts come from css/themes.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Ambient background: warm glow + film grain ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 85% 8%, var(--glow-1), transparent 70%),
    radial-gradient(55vmax 50vmax at 5% 70%, var(--glow-2), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
.ambient::after {
  content: ""; position: absolute; inset: 0; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
[data-theme="light"] .ambient::after { mix-blend-mode: multiply; filter: invert(1); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: clamp(380px, 56vh, 520px);
  display: flex; flex-direction: column;
  color: #fbf4ea;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  transform: scale(1.06); opacity: 0;
  transition: opacity 1s ease, transform 8s ease-out;
}
.hero-bg.loaded { opacity: 1; transform: scale(1); }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: var(--hero-shade); }

.topbar {
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; background: rgba(255, 244, 230, .1);
  border: 1px solid rgba(255, 244, 230, .18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.brand-mark svg { width: 20px; height: 24px; fill: none; stroke: #fbf4ea; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.brand-mark .flame { fill: #f3bf62; stroke: #f3bf62; }
.brand-mark img { width: 26px; height: 26px; object-fit: contain; }
.brand-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 21px; letter-spacing: .02em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  height: 38px; min-width: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; cursor: pointer;
  color: #fbf4ea; background: rgba(255, 244, 230, .1);
  border: 1px solid rgba(255, 244, 230, .18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { background: rgba(255, 244, 230, .18); border-color: rgba(255, 244, 230, .3); }
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.i-sun { display: none; }
[data-theme="light"] .i-sun { display: block; }
[data-theme="light"] .i-moon { display: none; }

.lang-switch {
  display: inline-flex; padding: 3px; gap: 2px; height: 38px; align-items: center;
  background: rgba(255, 244, 230, .1); border: 1px solid rgba(255, 244, 230, .18);
  border-radius: 12px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lang-btn {
  border: 0; background: transparent; cursor: pointer; height: 30px;
  padding: 0 10px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: rgba(251, 244, 234, .65);
  transition: background .2s, color .2s;
}
.lang-btn:hover { color: #fbf4ea; }
.lang-btn[aria-pressed="true"] { background: #fbf4ea; color: #1e1510; }

.hero-content {
  width: 100%; max-width: 760px; margin: auto auto 0;
  padding: 36px var(--gutter) 40px; text-align: center;
}
.status {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; letter-spacing: .01em;
  background: rgba(20, 13, 8, .45); border: 1px solid rgba(255, 244, 230, .16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--closed); flex-shrink: 0; }
.status.is-open .status-dot { background: #7fd49a; box-shadow: 0 0 0 0 rgba(127, 212, 154, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(127, 212, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 212, 154, 0); } }

.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(44px, 9vw, 76px); line-height: 1; letter-spacing: .01em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.hero-tagline {
  margin: 12px auto 26px; max-width: 520px;
  font-size: 16px; line-height: 1.55; color: rgba(251, 244, 234, .82);
}

.search {
  position: relative; max-width: 520px; margin: 0 auto;
}
.search input {
  width: 100%; height: 54px; padding: 0 48px 0 50px;
  border-radius: 16px; border: 1px solid rgba(255, 244, 230, .22);
  background: rgba(255, 248, 238, .14); color: #fbf4ea;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 16px; outline: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: background .25s, border-color .25s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: rgba(251, 244, 234, .62); }
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { background: rgba(255, 248, 238, .22); border-color: var(--accent-strong); box-shadow: 0 0 0 4px rgba(217, 164, 92, .22), 0 10px 30px rgba(0, 0, 0, .25); }
.search-icon {
  position: absolute; left: 17px; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 20px; height: 20px; fill: none; stroke: rgba(251, 244, 234, .8); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.search-clear {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 34px; height: 34px; border-radius: 10px; border: 0; cursor: pointer;
  background: rgba(255, 244, 230, .14); color: #fbf4ea; font-size: 20px; line-height: 1;
}
.search-clear:hover { background: rgba(255, 244, 230, .24); }

/* ---------- Sticky category bar ---------- */
.catbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--catbar-bg);
  backdrop-filter: saturate(1.3) blur(16px); -webkit-backdrop-filter: saturate(1.3) blur(16px);
  transition: box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.catbar.stuck { border-bottom-color: var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.catbar-inner { max-width: var(--max); margin: 0 auto; position: relative; }
.catbar-inner::before, .catbar-inner::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 36px; z-index: 1;
  pointer-events: none; opacity: 0; transition: opacity .2s;
}
.catbar-inner::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.catbar-inner::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.catbar-inner.more-left::before, .catbar-inner.more-right::after { opacity: 1; }

.tabs-scroll {
  display: flex; gap: 8px; padding: 12px var(--gutter);
  overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; cursor: pointer;
  height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--chip-bg);
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.tab:hover { color: var(--ink); border-color: var(--accent); }
.tab:active { transform: scale(.96); }
.tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tab-count { font-size: 12px; opacity: .65; font-weight: 500; }

/* ---------- Menu grid ---------- */
.menu { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 150px; }
.menu { padding-top: 18px; }
.results-line { margin: -4px 2px 14px; font-size: 14px; color: var(--ink-mute); }
.results-line:empty { margin: 0; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s, background .35s;
  animation: card-in .5s cubic-bezier(.2, .8, .2, 1) both;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); background: var(--surface-hover); }
.card:active { transform: translateY(-2px) scale(.99); }
.card:focus-within { border-color: var(--accent); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }

.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); }
.card-media img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .5s ease;
}
.card-media img.loaded { opacity: 1; }
.card:hover .card-media img { transform: scale(1.07); }
.card-media::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(0deg, rgba(0, 0, 0, .28), transparent); pointer-events: none;
}

.badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 8px; border-radius: 999px;
  background: var(--badge-bg); color: var(--badge-ink);
  border: 1px solid var(--badge-line);
  backdrop-filter: blur(10px) saturate(1.4); -webkit-backdrop-filter: blur(10px) saturate(1.4);
  font-size: 12px; font-weight: 600; letter-spacing: .01em; line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.badge svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; gap: 6px; }
.card-title {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: 21px; line-height: 1.18; letter-spacing: .005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(2 * 1.18em);
}
:lang(ka) .card-title { font-size: 17.5px; line-height: 1.3; min-height: calc(2 * 1.3em); }
.card-link {
  all: unset; cursor: pointer;
}
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.card-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.card-desc {
  margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(2 * 1.5em);
}
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-price { font-size: 18px; font-weight: 700; color: var(--accent-strong); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
[data-theme="light"] .card-price { color: var(--accent); }
.diet-icons { display: flex; gap: 5px; }
.diet-ico {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--chip-bg); border: 1px solid var(--line);
}
.diet-ico svg { width: 14px; height: 14px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.diet-ico.spicy svg, .chip.spicy svg { stroke: var(--spicy); }
.diet-ico.veg svg, .chip.veg svg { stroke: var(--veg); }
.diet-ico.gf svg, .chip.gf svg { stroke: var(--gf); }

.empty { text-align: center; padding: 56px 16px 24px; color: var(--ink-mute); }
.empty svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; opacity: .6; }
.empty p { margin: 10px 0 0; font-size: 15px; }
.menu-note { text-align: center; color: var(--ink-mute); font-size: 13px; margin: 40px auto 0; max-width: 520px; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: var(--gutter); }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: var(--overlay);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade .25s ease;
}
.modal.closing .modal-backdrop { animation: fade-out .22s ease forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.icon-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface-solid); color: var(--ink);
  font-size: 22px; line-height: 1; display: grid; place-items: center;
  transition: transform .2s, background .2s;
}
.icon-close:hover { transform: rotate(90deg); }
.icon-close.on-photo { background: rgba(20, 13, 8, .5); color: #fff; border-color: rgba(255, 255, 255, .25); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Dish sheet */
.sheet {
  position: relative; width: min(560px, 100%); max-height: calc(100dvh - 2 * var(--gutter));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface-solid); color: var(--ink);
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .45);
  animation: sheet-in .38s cubic-bezier(.2, .9, .25, 1.05);
}
.sheet:focus { outline: none; }
.modal.closing .sheet { animation: sheet-out .22s ease forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(16px) scale(.98); } }
.sheet-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.sheet-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 32%; background: linear-gradient(0deg, var(--surface-solid), transparent); pointer-events: none; }
.sheet-media .badge { top: 14px; left: 14px; z-index: 2; }

/* Photo gallery: native swipe with scroll snap */
.gallery {
  display: flex; width: 100%; height: 100%;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 0; }
.gallery img {
  flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover;
  scroll-snap-align: start; scroll-snap-stop: always;
  opacity: 0; transition: opacity .4s ease;
}
.gallery img.loaded { opacity: 1; }
.gal-nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(16, 10, 6, .62); color: #fff; border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
  opacity: .9; transition: opacity .25s, background .2s, transform .2s;
}
.gal-nav:active { transform: translateY(-50%) scale(.92); }
.gal-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gal-nav.prev { left: 12px; }
.gal-nav.next { right: 12px; }
.gal-nav:hover { background: rgba(16, 10, 6, .82); opacity: 1; }
.gal-nav:disabled { opacity: 0 !important; pointer-events: none; }
.sheet-media:hover .gal-nav, .gal-nav:focus-visible { opacity: 1; }
/* Photo position indicator: a dark glass pill so it reads on any photo and any theme */
.gal-dots {
  position: absolute; left: 50%; bottom: 18px; z-index: 3; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; pointer-events: none;
  padding: 7px 11px; border-radius: 999px;
  background: rgba(16, 10, 6, .62);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.gal-dots span {
  width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .45);
  transition: width .3s ease, background .3s;
}
.gal-dots span.on { width: 24px; background: #f2c27a; }
.gal-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gallery-multi .sheet-media::after { height: 26%; }
.sheet-body { padding: 4px 24px 24px; }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sheet-head h3 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.12; }
:lang(ka) .sheet-head h3 { font-size: 24px; line-height: 1.3; }
.sheet-price { font-size: 22px; font-weight: 700; color: var(--accent-strong); white-space: nowrap; }
[data-theme="light"] .sheet-price { color: var(--accent); }
.sheet-desc { margin: 10px 0 18px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }
.facts { margin: 0 0 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.facts div { padding: 8px 14px; border-radius: 12px; background: var(--chip-bg); border: 1px solid var(--line); }
.facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; }
.diet-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.diet-row:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 9px; border-radius: 999px;
  background: var(--chip-bg); border: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 600;
}
.chip svg { width: 15px; height: 15px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sheet-sub { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); font-weight: 600; }
.allergen-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.allergen-list li { padding: 5px 11px; border-radius: 8px; font-size: 13px; background: var(--accent-soft); color: var(--ink); }
.allergen-list li.none { background: var(--chip-bg); color: var(--ink-soft); }
.sheet-note { margin: 0; font-size: 12.5px; color: var(--ink-mute); }

/* QR card */
.modal-card {
  position: relative; width: min(360px, 100%);
  background: var(--surface-solid); color: var(--ink);
  border: 1px solid var(--line); border-radius: 24px; padding: 30px 24px 24px;
  text-align: center; box-shadow: 0 40px 90px rgba(0, 0, 0, .45);
  animation: sheet-in .32s cubic-bezier(.2, .9, .25, 1.05);
}
.modal-card:focus { outline: none; }
.modal-card h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1.2; }
:lang(ka) .modal-card h2 { font-size: 20px; line-height: 1.35; }
.modal-sub { margin: 6px 0 18px; color: var(--ink-soft); font-size: 14px; }
.qr-box { width: 228px; height: 228px; margin: 0 auto; padding: 14px; background: #fff; border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.qr-box canvas, .qr-box img { width: 100% !important; height: 100% !important; }
.qr-url { margin: 14px 0 14px; font-size: 13px; color: var(--ink-mute); word-break: break-all; }
.primary-btn {
  border: 0; cursor: pointer; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: 12px;
  transition: background .2s, transform .2s;
}
.primary-btn:hover { background: var(--accent-strong); }
.primary-btn:active { transform: scale(.97); }

/* ---------- Rating card ---------- */
.rate-card {
  position: fixed; z-index: 40; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%); opacity: 0;
  width: max-content; max-width: calc(100% - 2 * var(--gutter));
  display: flex; align-items: center; gap: 16px;
  padding: 10px 52px 10px 22px; border-radius: 999px;
  background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  transition: transform .55s cubic-bezier(.2, .9, .3, 1.1), opacity .3s;
}
.rate-card[hidden] { display: none; }
.rate-card.show { transform: translate(-50%, 0); opacity: 1; }
.rate-top { display: flex; align-items: center; gap: 14px; }
.rate-text { margin: 0; font-size: 15.5px; font-weight: 500; white-space: nowrap; }
.rate-stars { display: flex; gap: 2px; color: #f2b01e; font-size: 20px; line-height: 1; }
.rate-stars span { animation: star .5s ease both; }
.rate-card.show .rate-stars span:nth-child(1) { animation-delay: .25s; }
.rate-card.show .rate-stars span:nth-child(2) { animation-delay: .32s; }
.rate-card.show .rate-stars span:nth-child(3) { animation-delay: .39s; }
.rate-card.show .rate-stars span:nth-child(4) { animation-delay: .46s; }
.rate-card.show .rate-stars span:nth-child(5) { animation-delay: .53s; }
@keyframes star { from { opacity: 0; transform: scale(.4) rotate(-20deg); } }
.rate-button {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-size: 14px; font-weight: 600; padding: 10px 16px; border-radius: 999px; white-space: nowrap;
  transition: background .2s;
}
.rate-button:hover { background: var(--accent-strong); }
.rate-button .pin { width: 15px; height: 20px; }
.icon-close.small { width: 30px; height: 30px; font-size: 19px; top: 50%; right: 10px; transform: translateY(-50%); }
.icon-close.small:hover { transform: translateY(-50%) rotate(90deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .theme-name, .qr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .icon-btn { padding: 0; width: 38px; }
}
@media (max-width: 640px) {
  :root { --radius: 16px; }
  .hero { min-height: 0; }
  .topbar { padding: 12px var(--gutter); gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-name { font-size: 18px; }
  .top-actions { gap: 6px; }
  .icon-btn, .lang-switch { height: 36px; }
  .icon-btn { width: 36px; min-width: 36px; }
  .lang-btn { height: 28px; padding: 0 8px; font-size: 12.5px; }
  .hero-content { padding: 30px var(--gutter) 26px; }
  .status { font-size: 12.5px; margin-bottom: 10px; }
  .hero-tagline { font-size: 14.5px; margin: 10px auto 20px; }
  .search input { height: 50px; font-size: 16px; border-radius: 14px; }

  .tabs-scroll { padding: 10px var(--gutter); gap: 7px; }
  .tab { height: 36px; padding: 0 15px; font-size: 14px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 10px 11px 12px; gap: 4px; }
  .card-title { font-size: 17px; }
  :lang(ka) .card-title { font-size: 14.5px; }
  .card-desc { font-size: 12.5px; }
  .card-price { font-size: 15.5px; }
  .diet-ico { width: 22px; height: 22px; }
  .diet-ico svg { width: 12px; height: 12px; }
  .badge { top: 7px; left: 7px; font-size: 10.5px; padding: 4px 8px 4px 6px; gap: 4px; }
  .badge svg { width: 12px; height: 12px; }

  /* Dish details become a bottom sheet */
  .dish-modal { padding: 0; place-items: end center; }
  .sheet {
    width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; border-bottom: 0;
    animation: sheet-up .4s cubic-bezier(.2, .9, .25, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal.closing .sheet { animation: sheet-down .25s ease forwards; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  @keyframes sheet-down { to { transform: translateY(100%); } }
  .sheet-body { padding: 2px 18px 22px; }
  .sheet-head h3 { font-size: 26px; }
  :lang(ka) .sheet-head h3 { font-size: 20px; }

  .rate-card {
    flex-direction: column; align-items: stretch; border-radius: 18px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: calc(100% - 2 * var(--gutter)); padding: 12px 12px 12px 16px; gap: 10px;
  }
  .rate-top { flex-direction: column; align-items: flex-start; gap: 3px; padding-right: 34px; }
  .rate-text { font-size: 14.5px; white-space: normal; line-height: 1.3; }
  .rate-stars { font-size: 16px; }
  .rate-button { justify-content: center; padding: 9px 14px; font-size: 13.5px; }
  .icon-close.small { top: 10px; right: 10px; transform: none; }
  .icon-close.small:hover { transform: rotate(90deg); }
}
@media (max-width: 460px) {
  .brand-name { display: none; }
  .lang-btn { padding: 0 7px; }
}
@media (hover: none) {
  /* Touch: keep a small arrow as a swipe hint */
  .gal-nav { width: 36px; height: 36px; }
  .gal-nav svg { width: 16px; height: 16px; }
}

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