:root {
  color-scheme: light;
  --bg: #fff8ed;
  --surface: #f8ead7;
  --surface-strong: #f0d9bd;
  --ink: #3a1b13;
  --muted: #856251;
  --brand: #8a2d1c;
  --brand-2: #b84a2f;
  --gold: #d9ae1f;
  --green: #2e9f4d;
  --red: #e51d2a;
  --yellow: #d9cc23;
  --line: rgba(138, 45, 28, .2);
  --shadow: 0 18px 44px rgba(87, 34, 19, .14);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #160b08;
  --surface: #25120d;
  --surface-strong: #32180f;
  --ink: #fff1df;
  --muted: #d4b59f;
  --brand: #e18a63;
  --brand-2: #c95f39;
  --gold: #e2bd38;
  --line: rgba(255, 225, 191, .18);
  --shadow: 0 18px 44px rgba(0, 0, 0, .35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top right, rgba(217, 174, 31, .2), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  background: var(--surface);
}

.hero__stripes {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 18rem),
    linear-gradient(180deg, var(--surface), var(--bg));
}

.hero__content {
  position: relative;
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 30px 18px 28px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: min(520px, 100%);
  margin-bottom: 8px;
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.75rem, 13.5vw, 7.4rem);
  line-height: .82;
  text-shadow: 0 3px 0 var(--surface);
  overflow-wrap: anywhere;
}

.brand-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 4vw, 24px);
  line-height: 1;
  text-align: left;
}

.shell {
  width: min(1120px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 14px 78px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 12px;
  margin: -18px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  max-width: 100%;
  min-width: 0;
}

.search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.search input:focus,
button:focus-visible {
  outline: 3px solid rgba(217, 174, 31, .45);
  outline-offset: 2px;
}

.control-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.segmented {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  min-width: 0;
}

.segmented button {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  background: var(--brand);
  color: #fff7ea;
}

.category-strip {
  min-width: 0;
}

.categories {
  display: flex;
  gap: 8px;
  margin-inline: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: none;
}

.categories.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.categories button {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--brand);
  padding: 0 14px;
  font-size: .86rem;
  font-weight: 900;
  scroll-snap-align: start;
  white-space: nowrap;
}

.categories button.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #35170e;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 2px;
}

.status-row p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 800;
}

.status-row button {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 900;
}

.menu-sections {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.section {
  scroll-margin-top: 230px;
  min-width: 0;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
}

.section__head h2 {
  margin: 0;
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 9vw, 3.2rem);
  line-height: .92;
}

.section__head span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
}

.item-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.menu-item {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, transparent), var(--surface)),
    url("assets/leaf-pattern.svg") right -56px bottom -62px / 180px 180px no-repeat;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(87, 34, 19, .07);
  min-width: 0;
}

.item-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.diet-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 16%, transparent);
}

.diet-dot[data-diet="nonveg"] {
  background: var(--red);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 15%, transparent);
}

.diet-dot[data-diet="egg"] {
  background: var(--yellow);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--yellow) 20%, transparent);
}

.menu-item h3 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.price {
  color: var(--brand);
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.notes,
.description {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notes {
  font-weight: 850;
}

.favorite {
  justify-self: start;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  padding: 0 12px;
  font-size: .84rem;
  font-weight: 900;
}

.favorite.is-active {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 26%, var(--bg));
  color: var(--brand);
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px 18px;
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 8px;
  color: var(--brand);
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

.menu-finale {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 28px 0 4px;
  border-top: 2px solid var(--line);
  padding: 28px 16px 10px;
  text-align: center;
}

.menu-finale img {
  width: 54px;
  height: auto;
}

.menu-finale p {
  max-width: 30rem;
  margin: 0;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.45;
}

.menu-finale strong {
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 6vw, 2.1rem);
  line-height: 1.1;
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff7ea;
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  font-weight: 950;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.theme-float {
  position: fixed;
  right: 16px;
  bottom: 74px;
  z-index: 20;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--brand);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.theme-float:hover {
  transform: translateY(-2px);
  background: var(--brand);
  color: #fff7ea;
}

.theme-float__label {
  position: absolute;
  right: calc(100% + 9px);
  top: 50%;
  transform: translate(6px, -50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand);
  padding: 6px 10px;
  box-shadow: var(--shadow);
  font-size: .74rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .18s ease, transform .18s ease;
}

.theme-float:hover .theme-float__label,
.theme-float:focus-visible .theme-float__label {
  opacity: 1;
  transform: translate(0, -50%);
}

.theme-float__icon {
  width: 22px;
  height: 22px;
  background: currentColor;
  clip-path: path("M12 2a10 10 0 1 0 8.7 14.9A8 8 0 0 1 12 2Z");
}

:root[data-theme="dark"] .theme-float__icon {
  clip-path: path("M12 1.8 14.5 7l5.7.8-4.1 4 1 5.6-5.1-2.7-5.1 2.7 1-5.6-4.1-4 5.7-.8L12 1.8Z");
}

.brand-logo {
  display: block;
  height: auto;
}

.brand-logo[hidden] {
  display: none;
}

.brand-logo--mark {
  width: min(86px, 22vw);
  flex: 0 0 auto;
}

.brand-logo--text {
  width: min(280px, 61vw);
  flex: 0 1 auto;
  min-width: 0;
}

.brand-title:has(.brand-logo--text:not([hidden])) span {
  display: none;
}

@media (min-width: 760px) {
  .hero,
  .hero__content {
    min-height: 260px;
  }

  .hero__content {
    padding: 42px min(7vw, 80px) 40px;
  }

  .brand-logo--mark {
    width: min(126px, 13vw);
  }

  .brand-logo--text {
    width: min(380px, 32vw);
  }

  .shell {
    padding: 22px 24px 96px;
  }

  .toolbar {
    grid-template-columns: minmax(240px, 1.3fr) minmax(420px, 2fr);
    align-items: end;
    margin-top: -34px;
    padding: 16px;
  }

  .search {
    grid-row: auto;
  }

  .categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }

  .category-strip {
    grid-column: 1 / -1;
  }

  .section {
    scroll-margin-top: 170px;
  }

  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1060px) {
  .item-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
