:root {
  --ink: #241f19;
  --ink-soft: #5d554b;
  --ivory: #f3eee4;
  --paper: #fffdf8;
  --line: #d7cdbc;
  --saffron: #d79b2b;
  --saffron-dark: #a96e0d;
  --clay: #9f4938;
  --sage: #53705e;
  --shadow: 0 20px 50px rgba(44, 35, 23, 0.09);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--ivory);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 18%, rgba(215, 155, 43, 0.09), transparent 22rem),
    var(--ivory);
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  position: relative;
  overflow: hidden;
  color: #fffaf0;
  background: var(--ink);
  border-bottom: 5px solid var(--saffron);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: repeating-linear-gradient(45deg, transparent 0 22px, rgba(255,255,255,.045) 22px 23px);
  pointer-events: none;
}

.hero__ornament {
  position: absolute;
  right: max(-90px, calc((100vw - 1260px) / 2));
  top: -150px;
  width: 500px;
  aspect-ratio: 1;
  border: 1px solid rgba(215,155,43,.35);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(215,155,43,.035), 0 0 0 88px rgba(215,155,43,.025);
}

.hero__inner { position: relative; z-index: 1; padding: 76px 0 70px; }

.eyebrow {
  margin: 0 0 12px;
  color: var(--saffron);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.eyebrow--dark { color: var(--saffron-dark); }

h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; }

h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.35rem);
  line-height: .96;
  letter-spacing: -.04em;
}

.hero__copy {
  max-width: 650px;
  margin: 25px 0 0;
  color: rgba(255,250,240,.78);
  font-size: 1.06rem;
  line-height: 1.7;
}

.hero__copy strong { color: #fffaf0; }

.save-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: rgba(255,250,240,.88);
  background: rgba(255,255,255,.06);
  font-size: .88rem;
}

.save-note__dot { width: 8px; height: 8px; border-radius: 50%; background: #84bb8c; box-shadow: 0 0 0 4px rgba(132,187,140,.14); }

.main { padding: 52px 0 90px; }

.progress-card {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(240px, 1fr);
  gap: 8px 36px;
  align-items: center;
  padding: 28px 32px;
  border: 1px solid var(--line);
  background: rgba(255,253,248,.76);
}

.progress-card h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #ddd4c5; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--saffron), #e4b965); transition: width .35s ease; }
.progress-message { grid-column: 2; margin: 2px 0 0; color: var(--ink-soft); font-size: .86rem; }

.filters {
  display: flex;
  gap: 9px;
  margin: 30px 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar { display: none; }
.filter { flex: 0 0 auto; padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: transparent; cursor: pointer; }
.filter span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 5px; padding: 0 6px; border-radius: 999px; background: rgba(36,31,25,.07); font-size: .76rem; }
.filter:hover, .filter:focus-visible { border-color: var(--ink); color: var(--ink); }
.filter.is-active { border-color: var(--ink); color: #fff; background: var(--ink); }
.filter.is-active span { background: rgba(255,255,255,.14); }

.dish-list { display: grid; gap: 28px; }
.section-heading { display: flex; align-items: center; gap: 18px; margin: 30px 0 -4px; }
.section-heading:first-child { margin-top: 6px; }
.section-heading h2 { flex: 0 0 auto; margin: 0; font-size: 1.35rem; }
.section-heading::after { content: ""; width: 100%; height: 1px; background: var(--line); }

.dish-card {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(310px, .98fr);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.dish-card:nth-of-type(even) .dish-photo { order: 2; }
.dish-card[hidden] { display: none; }

.dish-photo {
  position: relative;
  min-height: 370px;
  overflow: hidden;
  background: #d8d0c3;
}

.dish-photo img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .6s ease; }
.dish-card:hover .dish-photo img { transform: scale(1.018); }
.dish-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 28%; background: linear-gradient(transparent, rgba(0,0,0,.28)); pointer-events: none; }
.dish-number { position: absolute; z-index: 1; top: 18px; left: 18px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: #fff; background: rgba(30,26,21,.74); backdrop-filter: blur(8px); font-size: .78rem; }

.dish-photo--empty {
  display: grid;
  place-items: center;
  padding: 40px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(215,155,43,.1), transparent 55%),
    #e5ddd0;
}

.dish-photo--empty::after { display: none; }
.empty-mark { width: 90px; height: 90px; margin: 0 auto 22px; opacity: .55; }
.empty-copy strong { display: block; margin-bottom: 5px; font-family: "Playfair Display", Georgia, serif; font-size: 1.35rem; }
.empty-copy span { color: var(--ink-soft); font-size: .9rem; }

.dish-content { display: flex; flex-direction: column; padding: clamp(28px, 4vw, 48px); }
.dish-kicker { margin: 0 0 12px; color: var(--saffron-dark); font-size: .73rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.dish-content h3 { margin: 0; font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.03; letter-spacing: -.03em; }
.dish-question { margin: 20px 0 18px; color: var(--ink-soft); line-height: 1.55; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #bfb4a3;
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.choice:hover, .choice:focus-visible { border-color: var(--ink); }
.choice.is-selected[data-choice="yes"] { border-color: var(--sage); color: #fff; background: var(--sage); }
.choice.is-selected[data-choice="no"] { border-color: var(--clay); color: #fff; background: var(--clay); }
.choice:disabled { opacity: .38; cursor: not-allowed; }
.choice svg, .upload-button svg { width: 18px; height: 18px; flex: 0 0 auto; }

.upload-wrap { grid-column: 1 / -1; }
.upload-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 51px;
  padding: 10px 14px;
  border: 0;
  border-radius: 2px;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
}
.upload-button:hover, .upload-button:focus-visible { background: #3a3229; }
.upload-button.is-uploading { cursor: progress; opacity: .74; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.card-status { display: flex; align-items: center; min-height: 24px; margin: 13px 0 0; color: var(--ink-soft); font-size: .8rem; }
.card-status::before { content: ""; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #b5aa9b; }
.card-status.is-saving::before { background: var(--saffron); animation: pulse .9s infinite alternate; }
.card-status.is-saved::before { background: var(--sage); }
.card-status.is-error { color: var(--clay); }
.card-status.is-error::before { background: var(--clay); }

.replacement-badge { position: absolute; z-index: 2; left: 18px; bottom: 18px; padding: 8px 11px; border-radius: 999px; color: #fff; background: rgba(83,112,94,.94); font-size: .76rem; box-shadow: 0 6px 20px rgba(0,0,0,.18); }

.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: min(390px, calc(100% - 44px)); padding: 13px 17px; border-radius: 3px; color: #fff; background: var(--ink); box-shadow: 0 16px 35px rgba(0,0,0,.22); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.footer { padding: 55px 0; color: rgba(255,250,240,.64); background: var(--ink); text-align: center; font-size: .86rem; }
.footer__mark { margin: 0 0 10px; color: var(--saffron); font-family: "Playfair Display", Georgia, serif; font-size: 1.25rem; letter-spacing: .18em; }
.footer p:last-child { margin: 0; }

@keyframes pulse { to { transform: scale(1.55); opacity: .5; } }

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 600px); }
  .hero__inner { padding: 54px 0 50px; }
  .hero__ornament { width: 340px; right: -210px; top: -100px; }
  .hero__copy { margin-top: 20px; font-size: .96rem; }
  .save-note { align-items: flex-start; border-radius: 3px; line-height: 1.4; }
  .save-note__dot { margin-top: 4px; }
  .main { padding-top: 28px; }
  .progress-card { grid-template-columns: 1fr; gap: 17px; padding: 22px; }
  .progress-message { grid-column: 1; margin-top: -9px; }
  .filters { margin-top: 22px; }
  .dish-list { gap: 18px; }
  .section-heading { margin-top: 25px; }
  .dish-card { grid-template-columns: 1fr; min-height: 0; }
  .dish-card:nth-of-type(even) .dish-photo { order: initial; }
  .dish-photo { min-height: 0; aspect-ratio: 4 / 3; }
  .dish-content { padding: 27px 22px 23px; }
  .dish-content h3 { font-size: clamp(2rem, 10vw, 2.65rem); }
  .dish-question { margin: 15px 0; }
  .choices { margin-top: 7px; }
  .choice { min-height: 52px; }
  .upload-button { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
