:root {
  --bg: #1e1813;
  --card: rgba(255, 255, 255, 0.05);
  --card-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f2f2f2;
  --muted: #a9a9a9;
  --accent: #e8922f;
  --red: #e30613;
  --radius: 14px;
  --thumb: 84px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h, 100px) + 10px); }

body {
  margin: 0;
  background: var(--bg) radial-gradient(80% 40% at 50% 0%, rgba(232, 146, 47, 0.12), transparent 70%) no-repeat;
  color: var(--text);
  font: 400 15px/1.45 "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "locl" 0; /* standard Cyrillic forms, like the printed menu */
}

button { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Sticky top bar: menu button, logo, food/drinks switch, language + category chips */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: max(8px, env(safe-area-inset-top)) 0 8px;
  background:
    linear-gradient(rgba(30, 24, 19, 0.9), rgba(30, 24, 19, 0.96)),
    url("../../img/hall.webp") center 40% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.top-row, .chips-wrap { max-width: 760px; margin: 0 auto; }
.top-row { display: flex; align-items: center; gap: 8px; padding: 0 16px; }
.menu-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.menu-btn svg { width: 22px; height: 22px; color: var(--accent); stroke-width: 2.2; }
.top-home { flex: none; display: flex; color: inherit; text-decoration: none; }
.top-logo { font-family: "Caveat", cursive; font-size: 30px; font-weight: 700; line-height: 1; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }

.groups {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
}
.groups button {
  min-width: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.groups button[aria-pressed="true"] { background: var(--accent); color: #111; }

/* Language: quieter than the food/drinks switch, so the two don't compete. */
.lang {
  flex: none;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.lang button {
  border: 0;
  background: none;
  padding: 0 9px;
  height: 38px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--text); background: var(--card-strong); }

/* Category chips: scroll sideways; faded edges + arrows show there is more. */
.chips-wrap { position: relative; margin-top: 8px; }
.chips {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.chip.active { border-color: var(--accent); color: #111; background: var(--accent); }
[data-show="food"] .chip[data-group="drinks"], [data-show="drinks"] .chip[data-group="food"] { display: none; }
.chips-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: none;
  align-items: center;
  width: 48px;
  padding: 0 6px;
  border: 0;
  cursor: pointer;
}
.chips-arrow svg { width: 20px; height: 20px; stroke-width: 2.6; color: var(--accent); }
.chips-arrow.prev { left: 0; justify-content: flex-start; background: linear-gradient(to right, #1e1813 35%, transparent); }
.chips-arrow.next { right: 0; justify-content: flex-end; background: linear-gradient(to left, #1e1813 35%, transparent); }
.can-prev .prev, .can-next .next { display: flex; }
.searching .chips-wrap { display: none; }

/* Category overview */
.overview { max-width: 760px; margin: 0 auto; padding: 18px 16px 6px; }
.overview h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
/* Lunch menu lives on Facebook */
.lunch { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid rgba(232, 146, 47, 0.45); border-radius: var(--radius); background: rgba(232, 146, 47, 0.1); color: var(--text); text-decoration: none; }
.lunch b { display: block; font-size: 15px; }
.lunch small { display: block; color: var(--muted); font-size: 13px; }
.lunch-icon svg { width: 28px; height: 28px; color: var(--accent); }
.lunch-go { margin-left: auto; font-size: 26px; line-height: 1; color: var(--accent); }

/* "New" badge and the label on sample (stock) photos */
.new-tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #1e1813; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 2px; }
.item-img-wrap { position: relative; grid-row: span 2; width: var(--thumb); height: var(--thumb); }
.item-img-wrap .item-img { display: block; }
.sample-tag { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 1px 4px; border-radius: 6px; background: rgba(0, 0, 0, 0.62); color: #f2f2f2; font-size: 9px; font-weight: 700; line-height: 1.4; text-align: center; white-space: nowrap; overflow: hidden; }
.dish-media { position: relative; }
.dish-media .sample-tag { left: auto; right: 12px; bottom: 12px; padding: 3px 10px; font-size: 12px; }

[hidden] { display: none !important; }

.search {
  position: relative;
  margin: 0 0 16px;
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 46px;
  padding: 0 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font: 500 16px/1 "Manrope", system-ui, sans-serif; /* 16px: no zoom on iOS */
  font-feature-settings: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: var(--card-strong);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.search-empty { margin: 8px 0 0; color: var(--muted); text-align: center; }
.searching .tiles, .searching .menu-group { display: none; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tiles-group {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.tiles-group:first-child { margin-top: 0; }
.tile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 84px;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}
.tile:active { background: var(--card-strong); }
.tile-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tile-name { font-size: 14px; font-weight: 800; line-height: 1.2; hyphens: auto; overflow-wrap: break-word; }
.tile-count { font-size: 12px; color: var(--muted); }
.tile-img, .tile-icon { flex: none; width: 54px; height: 54px; }
.tile-img { object-fit: cover; border-radius: 12px; }
.tile-icon { display: grid; place-items: center; color: var(--accent); }
.tile-icon svg { width: 36px; height: 36px; }

/* Menu */
main { max-width: 760px; margin: 0 auto; padding: 0 16px 24px; }
.loading { text-align: center; color: var(--muted); padding: 48px 0; }

/* Only the chosen group is shown (search shows everything). */
body:not(.searching)[data-show="food"] [data-group="drinks"]:is(.cat, .group-next),
body:not(.searching)[data-show="drinks"] [data-group="food"]:is(.cat, .group-next) { display: none; }
.searching .group-next { display: none; }
.group-next {
  display: block;
  margin: 28px 0 0;
  padding: 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.cat { padding-top: 26px; }
.cat h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.cat h2 svg { width: 26px; height: 26px; }
.cat-note { margin: 0 0 10px; color: var(--muted); font-size: 13px; }

.items { display: grid; gap: 10px; margin-top: 12px; }

.item {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: var(--thumb) 1fr auto;
  gap: 4px 14px;
  align-items: start;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.item:active { background: var(--card-strong); }

/* Items without a photo: a plain row, consecutive ones share one card. */
.list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.item.compact {
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 11px 14px;
  border: 0;
  border-radius: 0;
  background: none;
}
.item.compact + .item.compact { border-top: 1px solid var(--line); }
.item.compact:active { background: var(--card-strong); }
.item.compact .item-name { margin: 0; font-size: 15px; }
.item.compact .item-desc { margin-top: 2px; }
.item-al { display: inline-flex; gap: 4px; margin-left: 2px; vertical-align: 1px; }
.item-al .al { min-width: 18px; height: 18px; font-size: 10px; font-weight: 600; color: var(--muted); }
.item-side { display: grid; justify-items: end; gap: 2px; }
.item-side .item-price { padding-top: 0; }
.item-w { font-size: 12px; color: var(--muted); white-space: nowrap; }

.item-img, .item-ph {
  grid-row: span 2;
  width: var(--thumb);
  height: var(--thumb);
}
.item-img { object-fit: cover; border-radius: 12px; }
.item-ph {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 146, 47, 0.12), rgba(255, 255, 255, 0.03) 70%);
  color: var(--accent);
}
.item-ph svg { width: 38%; height: 38%; opacity: 0.8; }

.item-name { display: block; margin: 2px 0 0; font-size: 16px; font-weight: 700; line-height: 1.25; }
.item-desc { display: block; margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.al {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
}

.item-price { text-align: right; white-space: nowrap; padding-top: 2px; }
.item-price strong { display: block; font-size: 17px; font-weight: 800; color: var(--accent); }
.item-price small { display: block; font-size: 12px; color: var(--muted); }

/* Footer */
.footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
}
.allergens h2 { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.allergens ol {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.allergens li { display: flex; gap: 8px; align-items: center; }
.footer-note { margin-top: 20px; }
.footer a { color: var(--accent); }

/* Dialogs */
dialog { color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }

.sheet {
  width: 100%;
  max-width: 520px;
  margin: auto auto 0;
  padding: 0 0 env(safe-area-inset-bottom);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #1b1b1b;
  max-height: 88vh;
  overflow: auto;
}
.sheet[open] { animation: sheet-up 0.22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--card-strong); font-size: 22px; line-height: 1; cursor: pointer; }
.sheet-list { margin: 0; padding: 4px 8px 12px; list-style: none; }
.sheet-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.sheet-list a:active, .sheet-list a.active { background: var(--card-strong); }
.sheet-list svg { width: 22px; height: 22px; color: var(--accent); }
.sheet-list small { margin-left: auto; color: var(--muted); font-weight: 500; }
.sheet-list .sheet-group {
  padding: 12px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sheet-list .sheet-home { margin-bottom: 6px; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; color: var(--muted); }

.dish {
  width: min(92vw, 480px);
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #1b1b1b;
  overflow: auto;
}
.dish[open] { animation: sheet-up 0.2s ease-out; }
.dish-close { position: absolute; top: 12px; right: 12px; z-index: 1; }
.dish-media {
  display: grid;
  place-items: center;
  padding: 24px 24px 8px;
  background: radial-gradient(circle at 50% 60%, rgba(232, 146, 47, 0.1), transparent 70%);
}
.dish-media { padding: 0; }
.dish-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.dish-media .item-ph { width: 140px; height: 140px; }
.dish-info { padding: 8px 20px 22px; }
.dish-info.no-media { padding-top: 22px; }
.dish-info.no-media h2 { padding-right: 44px; }
.dish-info h2 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.25; }
.dish-desc { margin: 8px 0 0; color: var(--muted); }
.dish-label { margin: 16px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dish-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 14px; }
.dish-weight { color: var(--muted); }
.dish-row .item-price strong { font-size: 22px; }
.dish-allergens { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.dish-allergens li { display: flex; align-items: center; gap: 6px; }

@media (min-width: 600px) {
  :root { --thumb: 110px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
