:root {
  --theme: #b5462a;
  --bg: #fbf5ee;
  --card: #ffffff;
  --text: #2a1f17;
  --muted: #7a6a5d;
  --line: #efe4d8;
  --veg: #1e8e3e;
  --nonveg: #c62828;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 16px;
}

/* Header */
.hero {
  background-color: var(--theme);
  background-image: linear-gradient(160deg, rgba(255,255,255,.14), rgba(0,0,0,.18));
  color: #fff;
  padding: 18px 16px 14px;
  padding-top: max(18px, env(safe-area-inset-top));
}
.hero-top { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; }
.logo {
  flex: 0 0 58px; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.hero-text { flex: 1; min-width: 0; }
.hero h1 { margin: 0; font-size: 1.3rem; line-height: 1.25; }
.r-alt { margin: 2px 0 0; font-size: .95rem; opacity: .92; }
.r-tagline { margin: 4px 0 0; font-size: .85rem; opacity: .88; }
.r-alt:empty, .r-tagline:empty { display: none; }
.lang-btn {
  flex: 0 0 auto; border: 1.5px solid rgba(255,255,255,.85); background: rgba(255,255,255,.15);
  color: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.search { max-width: 720px; margin: 12px auto 0; }
.search input {
  width: 100%; border: 0; border-radius: 12px; padding: 11px 14px; font: inherit; font-size: 16px;
  background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* Sticky category tabs */
.tabs {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--line);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs:empty { display: none; }
.tab {
  flex: 0 0 auto; border: 1.5px solid var(--line); background: #fff; color: var(--text);
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .9rem; font-weight: 600;
  white-space: nowrap; cursor: pointer;
}
.tab.active { background: var(--theme); border-color: var(--theme); color: #fff; }

/* Menu */
main { max-width: 720px; margin: 0 auto; padding: 6px 12px 20px; }
.cat { scroll-margin-top: 64px; }
.cat-title { font-size: 1.15rem; margin: 20px 4px 10px; color: var(--theme); }
.items { display: grid; gap: 10px; }
@media (min-width: 640px) { .items { grid-template-columns: 1fr 1fr; } }
.item {
  display: flex; gap: 12px; background: var(--card); border-radius: var(--radius);
  padding: 12px; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(60,30,10,.06);
}
.item-text { flex: 1; min-width: 0; }
.item-name { margin: 0; font-size: 1rem; line-height: 1.3; }
.item-desc { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor;
}
.badge.veg { color: var(--veg); }
.badge.nonveg { color: var(--nonveg); }
.badge.veg::before, .badge.nonveg::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}
.badge.spicy { color: #d84315; }
.badge.soldout { color: #fff; background: #6b6b6b; border-color: #6b6b6b; }
.price { margin-top: 8px; font-weight: 700; color: var(--theme); font-size: 1.02rem; }
.item-img {
  flex: 0 0 96px; width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: var(--line);
}
.item.is-soldout { opacity: .6; }
.item.is-soldout .item-img { filter: grayscale(1); }
.item.is-soldout .price { text-decoration: line-through; color: var(--muted); }

.empty, .message { text-align: center; color: var(--muted); padding: 40px 16px; }
.message h2 { color: var(--text); margin: 8px 0; font-size: 1.2rem; }
.message-icon { font-size: 42px; }
.btn-retry, .btn-copy {
  border: 0; background: var(--theme); color: #fff; font: inherit; font-weight: 600;
  padding: 11px 18px; border-radius: 10px; margin-top: 10px; cursor: pointer;
}

/* WiFi */
.wifi {
  background: #fff; border: 1.5px dashed var(--theme); border-radius: var(--radius);
  padding: 16px; margin: 10px 12px 32px;
}
@media (min-width: 744px) { .wifi { max-width: 696px; margin: 10px auto 32px; } }
.wifi h2 { margin: 0 0 10px; font-size: 1.05rem; }
.wifi-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 7px 0;
  border-bottom: 1px solid var(--line); word-break: break-all;
}
.wifi-label { color: var(--muted); flex: 0 0 auto; }
.btn-copy { width: 100%; margin-top: 14px; }

/* Skeleton loading */
.sk {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, #eee3d7 25%, #f7efe6 50%, #eee3d7 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite linear;
}
.hero .sk {
  background: linear-gradient(90deg, rgba(255,255,255,.22) 25%, rgba(255,255,255,.4) 50%, rgba(255,255,255,.22) 75%);
  background-size: 200% 100%;
}
.sk-title { width: 60%; height: 22px; }
.sk-line { height: 12px; margin: 7px 0; }
.w40 { width: 40%; } .w70 { width: 70%; } .w90 { width: 90%; }
.sk-heading { width: 35%; height: 20px; margin: 20px 4px 12px; }
.sk-card {
  display: flex; gap: 12px; background: #fff; border-radius: var(--radius);
  padding: 12px; margin-bottom: 10px; border: 1px solid var(--line);
}
.sk-lines { flex: 1; }
.sk-img { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 150px);
  background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem;
  transition: transform .25s; z-index: 100; max-width: 90vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast.error { background: #b71c1c; }
