.lookup-heading h1 {
  max-width: 20ch;
  text-wrap: balance;
}
.lookup-heading .intro {
  max-width: 56ch;
}
.lookup-search-panel {
  margin: 20px 0 16px;
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid #e3caba;
  border-radius: 22px;
  background: linear-gradient(125deg, #fff9f1f2, #f6e3d8da);
  box-shadow: inset 0 1px 0 #ffffffbf, 0 6px 22px #9860450c;
}
.lookup-search-panel label {
  display: block;
  margin: 0 0 9px;
  font-weight: 600;
  color: #4c392f;
}
.lookup-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
}
.lookup-lens {
  pointer-events: none;
  position: absolute;
  left: 17px;
  height: 15px;
  width: 15px;
  border: 1.7px solid #775744;
  border-radius: 50%;
}
.lookup-lens::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 1.7px;
  background: #775744;
  bottom: -3px;
  right: -5px;
  transform: rotate(45deg);
}
#foodSearch {
  -webkit-appearance: none;
  appearance: none;
  min-height: 54px;
  padding: 12px 46px 12px 45px;
  border: 1px solid #ae9481;
  border-radius: 13px;
  font-size: 16px;
  background: #fffefb;
}
#foodSearch::-webkit-search-cancel-button { display: none }
#foodSearch:focus-visible {
  border-color: #76563f;
  outline: 2px solid #76563f;
  outline-offset: 2px;
}
#clearLookup {
  position: absolute;
  right: 3px;
  height: 44px;
  min-height: 44px;
  width: 44px;
  padding: 0;
  color: #644939;
  background: transparent;
  font-size: 26px;
}
#lookupExamples, .lookup-tabs, .lookup-question, .lookup-source-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
}
#lookupExamples {
  margin-top: 5px;
  gap: 0 2px;
}
#lookupExamples > span {
  font-size: 13px;
  color: #685343;
  margin-right: 7px;
}
#lookupExamples button {
  min-height: 44px;
  background: transparent;
  border: 0;
  color: #644634;
  font-size: 14px;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #b7967f;
}
#lookupBrowse[hidden], #lookupExamples[hidden], #clearLookup[hidden] { display: none }
.lookup-tabs {
  margin: 6px 0 12px;
  gap: 6px;
}
.lookup-tabs button, .lookup-suggestions button {
  min-height: 44px;
  padding: 8px 14px;
  line-height: 1.2;
  border: 1px solid #d7cabc;
  border-radius: 12px;
  font-size: 14px;
}
.lookup-tabs button.selected {
  background: #72523e;
  color: #fff;
  border-color: #72523e;
}
.lookup-status-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.lookup-status-picker select {
  width: auto;
  max-width: 100%;
  min-height: 44px;
  padding: 7px 28px 7px 12px;
  font-size: 16px;
}
.lookup-summary {
  color: var(--muted);
  font-size: 14px;
  margin: 18px 0 8px;
}
.lookup-grid {
  margin: 0 0 14px;
  align-items: stretch;
}
.lookup-card {
  border: 1px solid #dcd1c5;
  box-shadow: inset 0 1px 0 #fff, 0 4px 16px #76543d06;
}
.lookup-card h3 {
  margin: 15px 0 6px;
  color: #43362c;
}
.lookup-card > p {
  color: #554c42;
  margin: 5px 0 16px;
  line-height: 1.55;
  font-size: 16px;
}
.lookup-meta, .lookup-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
}
.lookup-actions {
  border-top: 1px solid #ece3d8;
  padding-top: 5px;
}
.lookup-actions button, .lookup-actions a, .lookup-source-links a, .lookup-question a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lookup-badge {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 650;
}
.lookup-include { background: #eaf2e6; color: #355638 }
.lookup-prepare, .lookup-limit { background: #f8eed5; color: #634b19 }
.lookup-avoid { background: #f9e6e1; color: #823d34 }
.lookup-ask { background: #eee9f1; color: #5b4661 }
.lookup-kind { font-size: 12px; color: var(--muted) }
.lookup-empty { margin-top: 0 }
.lookup-empty p { overflow-wrap: anywhere }
.lookup-empty h3 { margin-bottom: 6px }
.lookup-empty-note { padding: 12px 0 24px; color: var(--muted) }
.lookup-empty .lookup-question { margin: 10px 0 }
.lookup-source-links { gap: 0 16px }
.lookup-source-links .text-link, .lookup-question .text-link { margin: 0 }
.lookup-suggestions { margin: 18px 0 8px }
.lookup-suggestions > p { font-size: 14px; font-weight: 600; margin-bottom: 6px }
.lookup-more { margin-bottom: 16px }
.lookup-meals summary {
  cursor: pointer;
  font: 23px Georgia, serif;
  color: var(--ink);
  min-height: 44px;
  padding: 8px 0;
}
.lookup-meals .meal-ideas { margin-top: 18px }
.lookup-footnote { color: var(--muted); font-size: 13px; line-height: 1.55 }
@media (max-width: 600px) {
  .lookup-heading h1 { font-size: 34px }
  .lookup-card { padding: 18px }
  .lookup-tabs button { padding: 8px 11px }
}
@media (prefers-reduced-transparency: reduce) {
  .lookup-search-panel, .lookup-card { background: #fffaf4; box-shadow: none }
}
