:root {
  color: #231f20;
  background: #fffaf2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

#app {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 14px 42px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0 12px;
  background: rgba(255, 250, 242, 0.94);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 3px;
  color: #8b3d2d;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 2.3rem;
}

.language {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #dccfc1;
  border-radius: 8px;
}

.language button {
  min-width: 48px;
  border: 0;
  padding: 10px 12px;
  background: #fff;
}

.language .active {
  background: #0d4f45;
  color: #fff;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 16px;
}

.category-pills a {
  flex: 0 0 auto;
  color: #231f20;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #e5d8c8;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 700;
}

.notice {
  display: grid;
  gap: 3px;
  margin: 0 0 24px;
  padding: 12px 14px;
  color: #123d36;
  background: #dcefe7;
  border: 1px solid #bddacc;
  border-radius: 8px;
}

.notice span {
  color: #37534e;
}

.category {
  padding-top: 18px;
}

.category h2 {
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.items {
  display: grid;
  gap: 12px;
}

.item {
  display: grid;
  grid-template-columns: 96px 1fr;
  min-height: 116px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 8px;
}

.item img,
.image-fallback {
  width: 96px;
  height: 100%;
  min-height: 116px;
  object-fit: cover;
  background: #8b3d2d;
  color: #fff;
}

.image-fallback {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.item-body {
  padding: 12px;
}

.item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-heading h3 {
  margin-bottom: 5px;
  font-size: 1rem;
}

.item-heading span {
  flex: 0 0 auto;
  color: #fff;
  background: #9d1f1f;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.item-body p {
  margin-bottom: 9px;
  color: #6b5d52;
  line-height: 1.35;
}

.allergens {
  font-size: 0.85rem;
}

.variants {
  display: grid;
  gap: 6px;
}

.variant {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid #f0e6d8;
}

.variant span {
  color: #423a36;
}

.variant strong {
  white-space: nowrap;
}

.sold-out {
  opacity: 0.58;
}

.admin-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  color: #0d4f45;
  font-weight: 800;
  text-decoration: none;
}

.admin-link {
  margin-top: 26px;
}

.admin-panel {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 2px solid #e8d9c8;
}

.admin-panel h2 {
  margin-bottom: 6px;
}

.admin-panel p {
  color: #6b5d52;
}

.upload,
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #0d4f45;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.upload input {
  display: none;
}

.password-field {
  display: grid;
  gap: 6px;
  max-width: 360px;
  margin-top: 12px;
  color: #514740;
  font-size: 0.88rem;
  font-weight: 750;
}

.password-field input {
  min-height: 44px;
  border: 1px solid #d8c9b7;
  border-radius: 8px;
  padding: 10px;
  background: #fffdf9;
  color: #231f20;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.metric {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 10px;
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 8px;
}

.metric strong {
  font-size: 1.35rem;
}

.metric span {
  color: #6b5d52;
  font-size: 0.8rem;
}

.changed-list {
  padding: 10px;
  background: #fff6df;
  border-radius: 8px;
}

.editor-list {
  display: grid;
  gap: 12px;
}

.editor-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 8px;
}

.editor-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.editor-title strong,
.editor-title span {
  display: block;
}

.editor-title span {
  margin-top: 3px;
  color: #6b5d52;
  font-size: 0.86rem;
  line-height: 1.35;
}

.editor-card label,
.editor-card fieldset {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #514740;
  font-size: 0.88rem;
  font-weight: 750;
}

.editor-card textarea,
.editor-card input[type="number"],
.editor-card select {
  width: 100%;
  border: 1px solid #d8c9b7;
  border-radius: 8px;
  padding: 10px;
  background: #fffdf9;
  color: #231f20;
}

.editor-card textarea {
  resize: vertical;
}

.editor-card fieldset {
  border: 1px solid #eadfce;
  border-radius: 8px;
  padding: 10px;
}

.editor-card legend {
  padding: 0 5px;
}

.allergen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.allergen-grid label,
.switch {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.switch {
  white-space: nowrap;
}

.editor-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
}

@media (min-width: 720px) {
  #app {
    padding-top: 26px;
  }

  .items {
    grid-template-columns: 1fr 1fr;
  }

  .item {
    grid-template-columns: 122px 1fr;
  }

  .item img,
  .image-fallback {
    width: 122px;
  }

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

@media (max-width: 420px) {
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .editor-title {
    display: grid;
  }

  .editor-row {
    grid-template-columns: 1fr;
  }
}
