:root {
  color-scheme: light;
  --ink: #1d2322;
  --muted: #66706f;
  --paper: #fffaf2;
  --surface: #ffffff;
  --surface-strong: #f2f7f3;
  --line: #d9dfd6;
  --teal: #0f766e;
  --teal-dark: #0b4f4a;
  --coral: #c94834;
  --gold: #d99a20;
  --shadow: 0 18px 50px rgba(29, 35, 34, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.94), rgba(242, 247, 243, 0.9)),
    repeating-linear-gradient(135deg, rgba(15, 118, 110, 0.05) 0 10px, transparent 10px 20px);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.picker-panel,
.restaurant-card,
.empty-state,
.error-state {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.picker-panel {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 24px;
  border-radius: 8px;
}

.title-block {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.source-line {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.controls {
  display: grid;
  gap: 18px;
}

.meal-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.meal-toggle legend,
.genre-control span,
.field-control span {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.meal-toggle label {
  position: relative;
  min-width: 0;
}

.meal-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.meal-toggle span {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.meal-toggle input:checked + span {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.meal-toggle input:focus-visible + span,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-link:focus-visible,
.inline-link:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(217, 154, 32, 0.45);
  outline-offset: 2px;
}

.genre-control,
.field-control {
  display: grid;
  gap: 8px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

input::placeholder {
  color: #98a09f;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  background: var(--coral);
  color: #ffffff;
}

.primary-button:hover {
  background: #ad3828;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.result-panel {
  min-width: 0;
}

.empty-state,
.error-state {
  display: grid;
  min-height: 520px;
  place-items: center;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.empty-state p,
.error-state {
  color: var(--muted);
  font-size: 1.1rem;
}

.error-state {
  color: #8b1f1a;
  background: #fff4f2;
  border-color: #efb0a9;
}

.restaurant-card {
  display: grid;
  grid-template-columns: minmax(220px, 36%) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 8px;
}

.image-frame {
  min-height: 100%;
  background: var(--surface-strong);
}

.image-frame img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

.restaurant-content {
  min-width: 0;
  padding: 26px;
}

.restaurant-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.meal-pill {
  justify-self: start;
  margin-bottom: 0;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--teal-dark);
  padding: 5px 10px;
  font-size: 0.86rem;
  font-weight: 850;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.google-rating-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
  margin-bottom: 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.35;
}

.google-rating-score {
  color: var(--gold);
}

.google-rating-count {
  color: var(--ink);
}

.google-rating-source {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.google-rating-line.is-unavailable {
  color: var(--muted);
  font-weight: 750;
}

.restaurant-meta,
.muted,
.price-note,
.course-note,
.item-description {
  color: var(--muted);
}

.restaurant-meta {
  margin-bottom: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  border: 1px solid rgba(201, 72, 52, 0.22);
  border-radius: 999px;
  background: #fff2ef;
  color: #7f2a1f;
  padding: 5px 10px;
  font-size: 0.86rem;
  font-weight: 800;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.details-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 12px;
}

dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 800;
}

.hours-text {
  display: grid;
  gap: 3px;
  line-height: 1.35;
}

.hours-source {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.hours-line {
  font-size: 0.95rem;
  font-weight: 800;
}

.inline-link {
  color: var(--teal-dark);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.price-note {
  margin-bottom: 18px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.secondary-button {
  background: var(--teal);
  color: #ffffff;
}

.secondary-button:hover {
  background: var(--teal-dark);
}

.text-link {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.menu-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.menu-block {
  display: grid;
  gap: 18px;
}

.menu-block + .menu-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.menu-price {
  margin-bottom: 0;
  color: var(--coral);
  font-size: 1rem;
  text-transform: uppercase;
}

.course-block {
  display: grid;
  gap: 8px;
}

.course-title {
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--teal-dark);
}

.course-note {
  margin-bottom: 0;
  font-size: 0.94rem;
}

.item-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-item {
  display: grid;
  gap: 3px;
  border-left: 3px solid rgba(217, 154, 32, 0.55);
  padding-left: 10px;
}

.item-name {
  font-weight: 850;
}

.item-description {
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .picker-panel {
    position: static;
  }

  .restaurant-card {
    grid-template-columns: 1fr;
  }

  .image-frame img {
    min-height: 260px;
    max-height: 360px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0;
    gap: 10px;
  }

  .picker-panel,
  .restaurant-content {
    padding: 18px;
  }

  .filter-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .secondary-button,
  .text-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
