:root {
  --bg: #F6E3D3;
  --bg-soft: #FBF1E7;
  --card: #FEFAF5;
  --ink: #2B211B;
  --ink-soft: #6E5E51;
  --ink-faint: #A7927F;
  --gold: #BD8B3B;
  --gold-deep: #9C7128;
  --line: #E9D2BA;
  --shadow: 0 10px 30px -12px rgba(60, 36, 16, 0.28);
  --shadow-sm: 0 4px 14px -6px rgba(60, 36, 16, 0.22);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --topbar-h: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(48px + var(--safe-top)) 24px 40px;
  overflow: hidden;
  background: linear-gradient(180deg, #F9EBDD 0%, var(--bg) 78%);
  text-align: center;
}

.hero__art {
  position: absolute;
  left: 50%;
  bottom: -8%;
  transform: translateX(-50%);
  width: min(760px, 190%);
  opacity: 0.16;
  pointer-events: none;
  filter: saturate(0.6);
}

.hero__inner { position: relative; max-width: 640px; margin: 0 auto; }

.hero__eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
}

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 12vw, 64px);
  letter-spacing: 0.02em;
  color: var(--ink);
}

.hero__tagline {
  margin: 6px 0 20px;
  color: var(--ink-soft);
  font-size: 16px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
}

.status-pill, .birthday-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8fae6b;
  box-shadow: 0 0 0 3px rgba(143, 174, 107, 0.25);
}

.status-pill[data-open="false"] .status-dot {
  background: #c1594a;
  box-shadow: 0 0 0 3px rgba(193, 89, 74, 0.22);
}

.hero__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active { transform: scale(0.96); }

.btn--primary {
  background: var(--ink);
  color: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

/* ---------- Search ---------- */

.searchbar-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  padding: 10px 16px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.searchbar-wrap.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 18px -14px rgba(60,36,16,0.4);
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 999px;
  padding: 11px 16px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
  margin: 0 auto;
}

.searchbar__icon { color: var(--ink-faint); flex-shrink: 0; }

.searchbar input {
  border: none;
  outline: none;
  background: none;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  width: 100%;
}

.searchbar input::placeholder { color: var(--ink-faint); }

.searchbar__clear {
  color: var(--ink-faint);
  font-size: 14px;
  padding: 4px;
}

/* ---------- Category nav ---------- */

.catnav {
  position: sticky;
  top: 52px;
  z-index: 29;
  background: var(--bg);
  padding-bottom: 10px;
}

.catnav__scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 16px 4px;
  scrollbar-width: none;
}
.catnav__scroll::-webkit-scrollbar { display: none; }

.catpill {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  scroll-snap-align: start;
}

.catpill.is-active {
  background: var(--ink);
  color: var(--bg-soft);
}

.catpill:not(.is-active):active { border-color: var(--gold); }

/* ---------- Menu sections ---------- */

#menu-root { max-width: 980px; margin: 0 auto; padding: 8px 16px 40px; }

.menu-section { padding-top: 26px; scroll-margin-top: 108px; }

.menu-section__title {
  font-family: var(--serif);
  font-size: 26px;
  margin: 0 0 4px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.menu-section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  transform: translateY(-6px);
}

.menu-section__hint {
  margin: 0 0 16px;
  color: var(--ink-faint);
  font-size: 13.5px;
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 620px) {
  .dish-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .dish-grid { grid-template-columns: repeat(4, 1fr); }
}

.dish-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: left;
  display: flex;
  flex-direction: column;
  animation: rise 0.4s ease both;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dish-card:active { transform: scale(0.97); }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dish-card__photo {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  overflow: hidden;
}

.dish-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-card__photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 13px;
}

.dish-card__body {
  padding: 10px 12px 12px;
  border-left: 3px solid var(--gold);
  margin: 10px 10px 10px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dish-card__name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.28;
  padding-left: 10px;
}

.dish-card__row {
  padding-left: 10px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.dish-card__price {
  font-weight: 800;
  color: var(--ink);
  font-size: 15px;
  white-space: nowrap;
}

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}
.empty-state p { margin: 4px 0; }
.empty-state__hint { font-size: 13px; color: var(--ink-faint); }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  background: var(--ink);
  color: #EFE2D3;
  padding: 44px 24px calc(120px + var(--safe-bottom));
  text-align: center;
  overflow: hidden;
}
.site-footer__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  filter: invert(1) saturate(0);
}
.site-footer__inner { position: relative; }
.site-footer__title { font-family: var(--serif); font-size: 28px; margin: 0 0 10px; }
.site-footer p { margin: 4px 0; font-size: 14px; opacity: 0.85; }
.site-footer__insta { color: #E3B872; font-weight: 600; }

/* ---------- Floating action bar ---------- */

.fab-bar {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 40;
}

.fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.fab:active { transform: scale(0.92); }
.fab--top {
  background: var(--ink);
  color: var(--bg-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fab--top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Dish modal ---------- */

.dish-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
}

.dish-modal[hidden] { display: none; }

.dish-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 6, 0.55);
  animation: fade-in 0.2s ease both;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.dish-modal__sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  max-height: 88vh;
  overflow-y: auto;
  animation: slide-up 0.28s cubic-bezier(.2,.9,.3,1) both;
  padding-bottom: var(--safe-bottom);
}

@media (min-width: 640px) {
  .dish-modal { align-items: center; }
  .dish-modal__sheet { border-radius: 24px; max-height: 84vh; }
}

@keyframes slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.dish-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  z-index: 2;
  font-size: 15px;
}

.dish-modal__media {
  aspect-ratio: 16/10;
  background: var(--bg-soft);
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}
.dish-modal__media img { width: 100%; height: 100%; object-fit: cover; }

.dish-modal__body { padding: 20px 22px 26px; }
.dish-modal__body h3 { font-family: var(--serif); font-size: 24px; margin: 0 0 8px; }
.dish-modal__desc { color: var(--ink-soft); font-size: 14.5px; line-height: 1.5; margin: 0 0 16px; }
.dish-modal__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
}
.dish-modal__price { font-family: var(--serif); font-size: 24px; color: var(--ink); font-weight: 700; }

/* ---------- Install hint ---------- */

.install-hint {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + var(--safe-bottom));
  z-index: 39;
  background: var(--ink);
  color: var(--bg-soft);
  border-radius: 16px;
  padding: 14px 44px 14px 16px;
  box-shadow: var(--shadow);
  font-size: 13.5px;
  animation: rise 0.3s ease both;
}
.install-hint p { margin: 0; }
.install-hint button {
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--bg-soft);
  opacity: 0.7;
}

@media (min-width: 640px) {
  .install-hint { left: auto; width: 320px; }
}

/* ---------- misc ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dish-card, .install-hint, .dish-modal__backdrop, .dish-modal__sheet { animation: none; }
}
