:root {
  --page: #f5f4ef;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #74746e;
  --line: #1d1d1b;
  --olive: #6f7d38;
  --olive-dark: #4e5b25;
  --shadow: 0 18px 40px rgba(29, 29, 27, 0.08);
}

@font-face {
  font-family: "Circe";
  src: url("/assets/fonts/CirceLight.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Circe";
  src: url("/assets/fonts/Circe.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Circe";
  src: url("/assets/fonts/CirceBold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: "Circe", Arial, Helvetica, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0, rgba(245, 244, 239, 0.98) 280px),
    var(--page);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 18px 18px 12px;
}

.site-header--admin {
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(96px, 28vw);
  min-height: 86px;
}

.brand__logo {
  display: block;
  width: 100%;
  max-height: 106px;
  height: auto;
  object-fit: contain;
}

.site-header__note {
  margin: 0;
  color: var(--olive-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.menu-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 14px 34px;
}

.category-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 -14px 20px;
  padding: 10px 14px 12px;
  background: rgba(245, 244, 239, 0.94);
  border-block: 1px solid rgba(17, 17, 17, 0.08);
  backdrop-filter: blur(14px);
}

.category-tabs::-webkit-scrollbar {
  height: 0;
}

.category-tab {
  flex: 0 0 auto;
  min-width: 94px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.category-tab.is-active {
  border-color: var(--olive);
  background: var(--olive);
  color: #ffffff;
}

.category-view {
  display: grid;
  gap: 18px;
}

.category-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  width: min(940px, 100%);
  margin: 0 auto;
}

.category-heading h1 {
  margin: 0;
  font-family: "Circe", Arial, Helvetica, sans-serif;
  font-size: clamp(30px, 7vw, 54px);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
}

.category-heading span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 18px;
}

.dish-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(17, 17, 17, 0.46);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.dish-card__photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e8e6dc;
  border-radius: 16px;
}

.dish-card__photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-card__photo img.is-hidden {
  display: none;
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(111, 125, 56, 0.12), rgba(255, 255, 255, 0.64)),
    #e8e6dc;
  text-align: center;
}

.photo-fallback span {
  color: var(--olive-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.photo-fallback strong {
  width: min(100%, 260px);
  max-width: calc(100% - 24px);
  color: rgba(17, 17, 17, 0.66);
  font-family: "Circe", Arial, Helvetica, sans-serif;
  font-size: clamp(20px, 5.6vw, 30px);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.dish-card__body {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.dish-card__title {
  margin: 0;
  font-family: "Circe", Arial, Helvetica, sans-serif;
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 700;
  line-height: 0.98;
  text-transform: uppercase;
  hyphens: auto;
  overflow-wrap: break-word;
}

.dish-card--title-medium .dish-card__title {
  font-size: clamp(21px, 5.5vw, 28px);
}

.dish-card--title-compact .dish-card__title {
  font-size: clamp(18px, 5vw, 23px);
}

.dish-card__composition {
  display: block;
  min-height: 18px;
  margin: 0;
  color: #292925;
  font-size: 12px;
  font-weight: 300;
  font-style: normal;
  line-height: 1.32;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.dish-card__weight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(111, 125, 56, 0.32);
  border-radius: 999px;
  color: var(--olive-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.nutrition {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.nutrition__item {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  padding: 13px 6px 12px;
  text-align: center;
}

.nutrition__item + .nutrition__item {
  border-left: 1px solid rgba(17, 17, 17, 0.5);
}

.nutrition__mark {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.nutrition__label {
  color: #4c4c48;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.nutrition__value {
  font-size: clamp(18px, 5vw, 25px);
  line-height: 1;
}

.nutrition__amount {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  white-space: nowrap;
}

.nutrition__unit {
  color: #4c4c48;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.dish-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 24px;
  color: var(--ink);
  font-family: "Circe", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
}

.state-message {
  width: min(580px, 100%);
  margin: 44px auto;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 14px 38px;
}

.admin-auth {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  margin: 24px auto;
  padding: 18px;
  background: var(--paper);
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 8px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-list,
.editor {
  background: var(--paper);
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-list {
  position: sticky;
  top: 12px;
  overflow: hidden;
}

.admin-list__tabs {
  display: flex;
  gap: 7px;
  padding: 10px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
}

.admin-list__items {
  display: grid;
  max-height: 68vh;
  overflow: auto;
}

.admin-item {
  min-height: 48px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.admin-item.is-active {
  background: rgba(111, 125, 56, 0.14);
  color: var(--olive-dark);
  font-weight: 800;
}

.editor {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.editor__media {
  width: min(320px, 100%);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e8e6dc;
  border-radius: 8px;
}

.editor__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.file-field input {
  padding: 8px;
}

.button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.button--dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-status {
  min-height: 20px;
  margin: 0;
  color: var(--olive-dark);
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 16px;
  }

  .category-tabs {
    width: min(310px, 100%);
    margin: 0 auto 20px;
    padding-inline: 8px;
  }

  .category-tab {
    min-width: 88px;
    padding-inline: 12px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    width: min(500px, 100%);
    margin: 0 auto;
  }

  .dish-card {
    padding: 18px;
    border-radius: 22px;
  }

  .category-heading h1 {
    font-size: 34px;
  }

  .photo-fallback strong {
    font-size: 21px;
  }

  .admin-workspace {
    grid-template-columns: 1fr;
  }

  .admin-list {
    position: static;
  }

  .admin-list__items {
    max-height: 260px;
  }

  .editor__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1020px) {
  .menu-shell {
    padding-inline: 22px;
  }

  .cards-grid {
    gap: 22px;
  }
}
