:root {
  --bg: #f7f1e8;
  --bg-deep: #ead9bc;
  --panel: rgba(255, 250, 243, 0.92);
  --panel-strong: rgba(255, 252, 247, 0.98);
  --text: #24160d;
  --muted: #735848;
  --line: rgba(36, 22, 13, 0.12);
  --accent: #c95b2f;
  --accent-strong: #8d3412;
  --shadow: 0 24px 60px rgba(99, 59, 28, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 154, 83, 0.22), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(129, 168, 118, 0.18), transparent 22rem),
    linear-gradient(180deg, #fcf8f1 0%, var(--bg) 55%, var(--bg-deep) 100%);
}

body.modal-open {
  overflow: hidden;
}

.page-shell {
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.top-bar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.78);
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 32px rgba(99, 59, 28, 0.1);
}

.hero,
.panel {
  border: 1px solid rgba(36, 22, 13, 0.08);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  padding: 2rem;
  margin-bottom: 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(201, 91, 47, 0.16), transparent 18rem),
    linear-gradient(135deg, rgba(255, 251, 246, 0.96), rgba(244, 225, 203, 0.9));
}

.hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 0.95;
}

.hero-copy {
  margin: 0.9rem 0 0;
  max-width: 46rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.layout {
  display: block;
}

.panel {
  padding: 1.3rem;
  border-radius: var(--radius-lg);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-heading h2 {
  font-size: 1.7rem;
}

.panel-heading p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.dish-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
}

input[type="text"],
textarea,
input[type="file"] {
  width: 100%;
  border: 1px solid rgba(36, 22, 13, 0.14);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
}

input[type="text"],
textarea {
  padding: 0.95rem 1rem;
}

input[type="file"] {
  padding: 0.8rem;
}

textarea {
  resize: vertical;
  min-height: 132px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(201, 91, 47, 0.48);
  box-shadow: 0 0 0 4px rgba(201, 91, 47, 0.12);
}

.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.75rem;
}

.form-status {
  min-height: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-status.error {
  color: #b42318;
}

.form-status.success {
  color: #0f8a5f;
}

.upload-tile {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(36, 22, 13, 0.1);
  background: rgba(255, 255, 255, 0.55);
}

.upload-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.submit-button,
.ghost-button,
.chip-button {
  border: none;
  cursor: pointer;
  font: inherit;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #e28443);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(201, 91, 47, 0.28);
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.hero-button {
  flex-shrink: 0;
}

.ghost-button {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent-strong);
  border: 1px solid rgba(36, 22, 13, 0.12);
  font-weight: 700;
}

.gallery-panel {
  min-height: 420px;
}

.gallery-heading {
  align-items: center;
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.dish-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(36, 22, 13, 0.1);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 32px rgba(99, 59, 28, 0.08);
}

.dish-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(201, 91, 47, 0.16), rgba(129, 168, 118, 0.18)),
    #f6ecde;
  cursor: zoom-in;
}

.dish-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: rgba(36, 22, 13, 0.7);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.dish-body {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.dish-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.dish-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.dish-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.dish-meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.chip-button {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(201, 91, 47, 0.12);
  color: var(--accent-strong);
  font-weight: 800;
}

.empty-state {
  display: none;
  padding: 2.5rem 1rem;
  color: var(--muted);
  text-align: center;
  font-size: 1rem;
}

.empty-state.visible {
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 1rem;
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 22, 13, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.35rem;
  border: 1px solid rgba(36, 22, 13, 0.08);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-heading {
  align-items: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: stretch;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 13, 8, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
}

.lightbox-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 3rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-weight: 800;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

@media (max-width: 920px) {
  .hero-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
