/* assets_v1/css/search_page/search_dev_patch.css */

/* Let the real search stylesheet do almost everything */
#app-shell,
#step-container {
  width: 100%;
}

#step-container {
  max-width: none;
  margin: 0;
  overflow: visible;
  scroll-margin-top: var(--tw-sticky-offset, 128px);
}

/* Keep link CTAs behaving like proper buttons */
#continue-to-taste,
#continue-to-results,
#start-over-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* =========================
   STEP SUMMARY — FINAL OVERRIDE
   ========================= */

#step1-summary,
#step12-summary,
.step-summary {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 196, 0, 0.35);
  border-radius: 16px;
  background: rgba(8, 18, 44, 0.72);
  box-shadow: 0 0 18px rgba(255, 140, 0, 0.08);
  box-sizing: border-box;
}

#step1-summary .step-summary__group+.step-summary__group,
#step12-summary .step-summary__group+.step-summary__group,
.step-summary .step-summary__group+.step-summary__group {
  margin-top: 12px;
}

#step1-summary .step-summary__group,
#step12-summary .step-summary__group,
.step-summary .step-summary__group {
  min-width: 0;
}

#step1-summary .step-summary__title,
#step12-summary .step-summary__title,
.step-summary .step-summary__title {
  display: block;
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffc400;
  line-height: 1.2;
}

#step1-summary .step-summary__chips,
#step12-summary .step-summary__chips,
.step-summary .step-summary__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

#step1-summary .step-summary__chips>span,
#step12-summary .step-summary__chips>span,
.step-summary .step-summary__chips>span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f5f7ff;
  font-size: 0.92rem;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#step1-summary .step-summary__chips>span strong,
#step12-summary .step-summary__chips>span strong,
.step-summary .step-summary__chips>span strong {
  color: #ffffff;
  font-weight: 700;
}

#step12-summary .step-summary__chips>span.discover-summary-pill--tastebud,
.step-summary .step-summary__chips>span.discover-summary-pill--tastebud {
  gap: 7px;
  padding: 5px 10px 5px 6px;
}

.discover-summary-pill__number {
  display: inline-flex;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 196, 0, 0.16);
  border: 1px solid rgba(255, 196, 0, 0.36);
  color: #ffc400;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.discover-summary-pill__label {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 196, 0, 0.35);
  color: #fff;
  text-decoration: none;
}

.btn-secondary:hover {
  text-decoration: none;
}

/* Make inline results span the full filters grid width */
#filters-inline-results,
.inline-results-shell {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  display: block;
  margin-top: 20px;
}

/* Give the shell a proper full-width layout */
.inline-results-shell {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 196, 0, 0.18);
  background: rgba(6, 15, 40, 0.82);
  box-sizing: border-box;
}

/* Top / bottom action rows */
.inline-results-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.inline-results-actions--top {
  margin-bottom: 16px;
}

.inline-results-actions--bottom {
  margin-top: 18px;
}

/* Keep continue button clean and centered */
.inline-continue-btn {
  min-width: 180px;
  text-align: center;
}

/* Full-width results list */
#filters-inline-list,
.inline-results-list {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Make inline result cards fill available space */
#filters-inline-list .result-card,
.inline-results-list .result-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Better top row layout inside inline cards */
#filters-inline-list .result-card__top,
.inline-results-list .result-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

/* On bigger screens, allow a comfortable two-column grid if you want it */
@media (min-width: 1100px) {

  #filters-inline-list,
  .inline-results-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* On tablet/mobile, keep it single column */
@media (max-width: 1099px) {

  #filters-inline-list,
  .inline-results-list {
    grid-template-columns: 1fr;
  }
}

.taste-slot {

  transition: transform .2s ease;

}
.btn-orange--xl {
  min-height: 56px;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 14px;
}

.btn-orange--primary {
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.24);
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-orange--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.30);
}

.discover-progress-wrap {
  margin: 1.25rem 0 1rem;
}

.discover-progress {
  padding: 1rem 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(6, 16, 48, 0.72);
  border: 1px solid rgba(255, 184, 0, 0.35);
  backdrop-filter: blur(10px);
}

.discover-progress__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}

.discover-progress__eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5c84c;
}

.discover-progress__count {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.discover-progress__bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
  margin-bottom: 0.95rem;
}

.discover-progress__fill {
  display: block;
  height: 100%;
  width: 33%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
  transition: width 0.28s ease;
}

.discover-progress__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.discover-progress__step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.discover-progress__step.is-active,
.discover-progress__step.is-complete {
  opacity: 1;
}

.discover-progress__step.is-active {
  transform: translateY(-1px);
}

.discover-progress__dot {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  flex-shrink: 0;
}

.discover-progress__step.is-complete .discover-progress__dot,
.discover-progress__step.is-active .discover-progress__dot {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #111827;
  border-color: transparent;
}

.discover-progress__label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.btn-orange--xl {
  min-height: 56px;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 14px;
}

.btn-orange--primary {
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.24);
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-orange--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.30);
}

@media (max-width: 767px) {
  .discover-progress__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .discover-progress__steps {
    grid-template-columns: 1fr;
  }

  .btn-orange--xl {
    width: 100%;
  }
}

.filters-helper {
  font-size: 0.9rem;
  line-height: 1.4;
}

.filter-field__warning {
  margin: 0.55rem 0 0;
  color: #fca5a5;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.debug-select.is-invalid {
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.18);
}

.results-empty-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.results-empty-card__cta {
  text-decoration: none;
}

.results-empty-card__chips-label {
  align-self: center;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.results-empty-card__cta--secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--tw-line-soft);
  border-radius: 999px;
  color: var(--color-text);
  text-decoration: none;
}

@media (max-width: 768px) {
  .filters-helper {
    font-size: 0.82rem;
    line-height: 1.35;
  }
}

/* =====================================================
   Phase 1 polish layer: overrides loaded after search CSS
   ===================================================== */
#step1-summary,
#step12-summary,
.step-summary,
.inline-results-shell,
.discover-progress {
  border-radius: var(--tw-radius-lg, 18px);
  border-color: var(--tw-premium-border, rgba(226, 232, 240, 0.13));
  background: var(--tw-premium-surface, rgba(15, 23, 42, 0.82));
  box-shadow: var(--tw-premium-shadow-soft, 0 12px 28px rgba(0, 0, 0, 0.26));
}

#step1-summary .step-summary__title,
#step12-summary .step-summary__title,
.step-summary .step-summary__title,
.discover-progress__eyebrow {
  color: var(--tw-accent-gold);
  letter-spacing: 0.08em;
}

#step1-summary .step-summary__chips>span,
#step12-summary .step-summary__chips>span,
.step-summary .step-summary__chips>span {
  min-height: 32px;
  border-color: var(--tw-premium-border, rgba(226, 232, 240, 0.13));
  background: rgba(255, 255, 255, 0.055);
  color: var(--color-text);
}

@media (max-width: 380px) {

  #step1-summary,
  #step12-summary,
  .step-summary {
    padding: 12px;
  }

  #step1-summary .step-summary__chips,
  #step12-summary .step-summary__chips,
  .step-summary .step-summary__chips {
    gap: 6px;
  }

  #step1-summary .step-summary__chips>span,
  #step12-summary .step-summary__chips>span,
  .step-summary .step-summary__chips>span {
    width: 100%;
    justify-content: flex-start;
  }
}

.btn-secondary,
.btn-orange.btn-secondary,
#clear-tastes,
#cancel-search-btn,
#start-over-link {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--tw-premium-border, rgba(226, 232, 240, 0.13));
  color: var(--color-text);
  box-shadow: none;
}

.btn-orange--xl {
  min-height: 54px;
  border-radius: 999px;
}

.btn-orange--primary {
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.22);
}

.discover-progress {
  padding: 0.9rem 1rem 1rem;
}

.discover-progress__count,
.discover-progress__label {
  color: var(--color-text);
}

.discover-progress__bar {
  height: 8px;
  background: rgba(148, 163, 184, 0.18);
}

.discover-progress__dot {
  width: 28px;
  height: 28px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.07);
}

.discover-progress__step.is-complete .discover-progress__dot,
.discover-progress__step.is-active .discover-progress__dot {
  color: #111827;
}

.inline-results-shell {
  padding: clamp(1rem, 2vw, 1.25rem);
}

@media (max-width: 767px) {
  .discover-progress__steps {
    gap: 0.55rem;
  }

  .discover-progress__step {
    min-height: 38px;
  }
}

/* =====================================================
   Sharp-1 precision layer: active discover experience
   ===================================================== */
.tw-panel {
  width: min(100%, var(--tw-shell-max-app, 1040px));
  max-width: var(--tw-shell-max-app, 1040px);
  padding: clamp(0.95rem, 1.6vw, 1.55rem);
  border-radius: var(--tw-ui-radius-card, var(--tw-radius-lg, 14px));
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.045), transparent 38%),
    var(--tw-premium-surface, rgba(15, 23, 42, 0.82));
  border-color: var(--tw-premium-border, rgba(226, 232, 240, 0.16));
  box-shadow: var(--tw-premium-shadow, 0 12px 30px rgba(0, 0, 0, 0.28));
}

.debug-header {
  gap: 0.75rem;
  margin-bottom: var(--tw-section-gap-sm, 0.75rem);
}

.debug-header h1 {
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  line-height: 1.1;
}

/* Combined city + natural-language preference form. */
.combined-search {
  max-width: 760px;
  margin-inline: auto;
}

.combined-search__intro {
  margin-bottom: 1rem;
  text-align: center;
}

.combined-search__intro h2,
.combined-taste h2 {
  margin: 0;
  color: var(--color-text, #f8fafc);
}

.combined-search__intro p,
.combined-taste__examples,
.combined-taste__order-hint {
  color: var(--color-text-muted, #cbd5e1);
}

.combined-search__essentials {
  display: grid;
  gap: 1rem;
}

.combined-taste {
  padding: 1rem;
  border: 1px solid var(--tw-premium-border, rgba(226, 232, 240, 0.13));
  border-radius: 14px;
  background: var(--tw-premium-surface, rgba(15, 23, 42, 0.82));
  box-shadow: var(--tw-premium-shadow-soft, 0 12px 28px rgba(0, 0, 0, 0.26));
}

.combined-taste__examples {
  margin: 0.38rem 0 0.8rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

#taste-row.combined-taste__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
}

#taste-row.combined-taste__row .taste-slot,
#taste-row.combined-taste__row .taste-slot:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem 0.7rem;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

#taste-row.combined-taste__row .taste-slot[hidden] {
  display: none;
}

#taste-row.combined-taste__row .taste-slot::before,
#taste-row.combined-taste__row .taste-slot::after {
  display: none;
}

#taste-row.combined-taste__row .taste-label {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.82rem;
}

#taste-row.combined-taste__row .taste-keyword,
#taste-row.combined-taste__row .taste-slot:first-child .taste-keyword {
  grid-column: 1;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  font-size: 1rem;
}

.combined-taste__remove,
.combined-taste__add {
  border: 0;
  background: transparent;
  color: #67e8f9;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.combined-taste__remove {
  grid-column: 2;
  align-self: center;
  padding: 0.5rem;
  font-size: 0.78rem;
}

.combined-taste__add {
  margin-top: 0.45rem;
  padding: 0.55rem 0;
  text-align: left;
}

.combined-taste__order-hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
}

.combined-search__more {
  margin-top: 1rem;
  border: 1px solid var(--tw-premium-border, rgba(226, 232, 240, 0.13));
  border-radius: 12px;
  background: var(--tw-premium-surface, rgba(15, 23, 42, 0.82));
  box-shadow: var(--tw-premium-shadow-soft, 0 12px 28px rgba(0, 0, 0, 0.26));
}

.combined-search__more > summary {
  padding: 0.85rem 1rem;
  color: #67e8f9;
  font-weight: 800;
  cursor: pointer;
}

[data-theme="light"] .combined-taste,
[data-theme="light"] .combined-search__more {
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(217, 119, 6, 0.07), transparent 52%),
    radial-gradient(120% 160% at 100% 100%, rgba(37, 99, 235, 0.07), transparent 52%),
    var(--tw-premium-surface-strong, #ffffff);
  border-color: var(--tw-premium-border, rgba(15, 23, 42, 0.12));
  box-shadow: var(--tw-premium-shadow-soft, 0 10px 24px rgba(15, 23, 42, 0.09));
}

[data-theme="light"] .combined-taste__add,
[data-theme="light"] .combined-taste__remove,
[data-theme="light"] .combined-search__more > summary {
  color: var(--tw-accent-cyan, #0284c7);
}

.combined-search__optional-grid {
  padding: 0 1rem 1rem;
}

@media (max-width: 768px) {
  .combined-search__more .combined-search__optional-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .combined-search__more .combined-search__optional-grid > .filter-field,
  .combined-search__more .combined-search__optional-grid > .filter-actions,
  .combined-search__more .combined-search__optional-grid > #filters-inline-results {
    grid-column: 1 / -1;
  }

  .combined-search__optional-grid .filter-field > label {
    font-size: 0.78rem;
    line-height: 1.4;
  }
}

.filter-field--recent-only {
  display: flex;
  align-items: center;
}

.filter-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--tw-accent-orange, #d97706);
}

.filter-checkbox span {
  display: grid;
  gap: 0.2rem;
}

.filter-checkbox small {
  color: var(--tw-text-muted, #64748b);
  line-height: 1.4;
}

.combined-search__submit-row {
  max-width: 760px;
  margin: 1rem auto 0;
}

.combined-search__submit-row #continue-to-taste {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

@media (max-width: 640px) {
  .combined-taste {
    padding: 0.85rem;
  }

  #taste-row.combined-taste__row .taste-slot,
  #taste-row.combined-taste__row .taste-slot:first-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .combined-taste__remove {
    grid-column: 1;
    justify-self: start;
    padding: 0.15rem 0 0.35rem;
  }
}

.discover-step-header {
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: var(--tw-section-gap-sm, 0.75rem);
}

.discover-step-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.25rem;
}

.discover-step-heading h1 {
  margin: 0;
}

.discover-greeting {
  margin: 0;
  color: var(--tw-hero-subtext);
  font-size: 0.9rem;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: left;
}

.debug-hero {
  padding: 0.78rem 0.9rem;
  margin-bottom: var(--tw-section-gap-sm, 0.75rem);
}

.debug-hero,
.discover-progress,
.step-summary,
.tw-guidance-card,
.filter-section-intro,
.taste-helper,
.taste-rail,
.taste-inspo,
.results-explainer,
.results-shell,
.result-section-heading,
.result-card {
  border-radius: var(--tw-ui-radius-card, var(--tw-radius-md, 10px));
  border-color: var(--tw-premium-border, rgba(226, 232, 240, 0.16));
  box-shadow: var(--tw-premium-shadow-soft, 0 8px 18px rgba(0, 0, 0, 0.18));
  transition:
    border-color var(--tw-motion-quick, 160ms ease),
    box-shadow var(--tw-motion-quick, 160ms ease),
    transform var(--tw-motion-quick, 160ms ease);
}

.filters-label,
.debug-label,
.badge-pill,
.tw-match-badge,
.taste-chip,
.result-restaurant-name span,
.order-link {
  border-radius: var(--tw-ui-radius-chip, var(--tw-radius-sm, 8px));
}

.hero-meta .cities span {
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero-meta .pill {
  border-radius: var(--tw-ui-radius-chip, var(--tw-radius-sm, 8px));
  box-shadow: none;
}

.discover-progress-wrap {
  margin: var(--tw-section-gap-sm, 0.75rem) 0 var(--tw-section-gap-sm, 0.75rem);
}

.discover-progress {
  padding: 0.72rem 0.82rem;
}

.discover-progress__top {
  margin-bottom: 0.55rem;
}

.discover-progress__bar {
  height: 6px;
  margin-bottom: 0.7rem;
}

.discover-progress__dot {
  width: 24px;
  height: 24px;
  font-size: 0.78rem;
}

.discover-progress__label,
.discover-progress__count {
  font-size: 0.78rem;
}

.filters-helper {
  margin-bottom: 0.75rem;
  font-size: 0.86rem;
}

.tw-guidance-card,
.filter-section-intro {
  padding: var(--tw-ui-card-pad-md, 0.82rem);
}

.tw-guidance-card__body,
.filter-section-intro p {
  font-size: 0.84rem;
  line-height: 1.42;
}

.filters-section-card {
  margin-bottom: var(--tw-section-gap-xs, 0.55rem);
  padding-block: 0.68rem;
}

.filter-section-intro {
  padding-block: 0.68rem;
}

.filters-section-card .filters-section-title,
.filter-section-intro .filters-section-title {
  margin-bottom: 0;
}

.filters-section-title {
  margin: 0 0 0.3rem;
  color: var(--tw-accent-gold, #facc15);
  font-size: clamp(1rem, 2vw, 1.16rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.filters-section-helper {
  margin: 0;
  color: var(--tw-helper-text, rgba(226, 232, 240, 0.78));
  font-size: 0.9rem;
  line-height: 1.42;
}

.filters-grid {
  gap: var(--tw-section-gap-sm, 0.75rem);
}

.filter-field.filter-field--city-main label {
  font-size: 0.78rem;
}

.filters-grid > .filter-field--restaurant:has(#restaurant-input) {
  grid-column: auto;
}

@media (min-width: 769px) {
  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-grid > .filter-field--city,
  .filters-grid > .filter-field--restaurant:has(#restaurant-input) {
    grid-column: auto;
  }

  .filters-grid > .filter-section-intro,
  .filters-grid > .filter-actions,
  .filters-grid > #filters-inline-results {
    grid-column: 1 / -1;
  }
}

.filters-grid > .filter-field--city.filter-field--city-main,
.filters-grid > .filter-field--restaurant:has(#restaurant-input) {
  grid-column: 1 / -1;
}

.filter-field,
.filter-field--focus {
  padding: var(--tw-ui-card-pad-sm, 0.68rem);
  border-radius: var(--tw-ui-radius-card, var(--tw-radius-md, 10px));
  box-shadow: none;
}

.filter-field label,
.filter-field--focus label {
  margin-bottom: 0.34rem;
  font-size: 0.72rem;
}

.debug-input,
.debug-select {
  min-height: 42px;
  border-radius: var(--tw-ui-radius-chip, var(--tw-radius-sm, 8px));
}

.restaurant-clear-btn {
  align-self: flex-start;
  margin-top: 0.35rem;
  max-width: 100%;
}

.restaurant-advanced__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 42px;
  padding: 0.58rem 0.72rem;
  border: 1px solid var(--tw-input-border, rgba(148, 163, 184, 0.26));
  border-radius: var(--tw-ui-radius-chip, var(--tw-radius-sm, 8px));
  background: rgba(255, 255, 255, 0.045);
  color: var(--tw-text-main, #f8fafc);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.restaurant-advanced__toggle:hover,
.restaurant-advanced__toggle:focus-visible {
  border-color: rgba(34, 211, 238, 0.46);
  background: rgba(34, 211, 238, 0.08);
  outline: none;
}

.restaurant-advanced__indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 1.45rem;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.12);
  color: var(--tw-accent-gold, #facc15);
  font-weight: 900;
  line-height: 1;
}

.restaurant-advanced__panel {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.65rem;
}

.restaurant-advanced__panel[hidden] {
  display: none;
}

.search-actions {
  gap: var(--tw-ui-gap-sm, 0.55rem);
  margin-top: var(--tw-section-gap-xs, 0.45rem);
}

.filters-grid > .filter-actions {
  margin-top: 0;
}

.filters-grid > .filter-actions:has(> #category-menu-field.is-hidden),
.filters-grid > .filter-actions:has(> .restaurant-actions-row > #full-menu-field.is-hidden):has(> .restaurant-actions-row > #view-restaurant-field.is-hidden) {
  display: none;
}

.btn-orange {
  min-height: var(--tw-ui-control-min-height, 40px);
  padding: var(--tw-ui-control-pad-y, 0.58rem) var(--tw-ui-control-pad-x, 0.9rem);
  border-radius: var(--tw-ui-radius-control, var(--tw-radius-md, 10px));
  box-shadow: none;
  font-size: 0.87rem;
  letter-spacing: 0.02em;
}

#continue-to-taste,
#continue-to-results,
.inline-continue-btn,
.btn-orange--primary {
  min-height: var(--tw-ui-control-min-height-lg, 46px);
  border-radius: var(--tw-ui-radius-control, var(--tw-radius-md, 10px));
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.2);
  font-weight: 800;
}

.btn-secondary,
.btn-orange.btn-secondary,
#clear-tastes,
#cancel-search-btn,
#start-over-link {
  background: rgba(255, 255, 255, 0.045);
}

#shuffle-tastes,
#show-synth-results {
  background: rgba(34, 211, 238, 0.085);
  border-color: rgba(34, 211, 238, 0.2);
}

.taste-header-row {
  gap: var(--tw-section-gap-md, 1rem);
}

.taste-helper {
  padding: 0.78rem 0.85rem;
}

.taste-helper-title {
  margin: 0 0 0.36rem;
  color: var(--tw-accent-gold, #facc15);
  font-size: clamp(1rem, 2vw, 1.16rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.taste-helper p {
  color: var(--tw-helper-text, rgba(226, 232, 240, 0.78));
  font-size: 0.9rem;
  line-height: 1.42;
}

.taste-order-card {
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--tw-premium-border, rgba(226, 232, 240, 0.13));
  border-radius: var(--tw-ui-radius-card, var(--tw-radius-md, 10px));
  background: rgba(34, 211, 238, 0.06);
}

.taste-order-card p {
  margin: 0 0 0.46rem;
  color: var(--color-text, #f8fafc);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.taste-order-example {
  display: grid;
  gap: 0.18rem;
  color: var(--tw-helper-text, rgba(226, 232, 240, 0.78));
  font-size: 0.84rem;
  line-height: 1.38;
}

.taste-order-example strong {
  color: var(--tw-accent-gold, #facc15);
}

.taste-rail,
.results-shell,
.inline-results-shell {
  padding: clamp(0.82rem, 1.5vw, 1rem);
  scroll-margin-top: var(--tw-sticky-offset, 128px);
}

#taste-row {
  gap: 0.6rem;
}

.taste-slot,
#taste-row .taste-slot:first-child {
  min-height: 58px;
  padding: 0.68rem 0.78rem;
  border-radius: var(--tw-ui-radius-card, var(--tw-radius-md, 10px));
  box-shadow: none;
}

#taste-row .taste-slot:first-child {
  min-height: 66px;
}

#taste-row .taste-slot:nth-child(2) {
  margin-top: 0;
}

#taste-row .taste-slot:nth-child(2)::before {
  display: none;
}

.taste-inspo {
  padding: 0.75rem 0.82rem;
}

.taste-chip {
  min-height: var(--tw-ui-chip-min-height, 32px);
  padding: var(--tw-ui-chip-pad-y, 0.34rem) var(--tw-ui-chip-pad-x, 0.58rem);
  box-shadow: none;
}

.results-explainer {
  padding: 0.82rem 0.88rem;
}

.results-explainer__title {
  font-size: 0.98rem;
}

.results-explainer__list {
  gap: 0.34rem;
}

.result-section-heading {
  padding: 0.8rem 0.85rem;
  margin-top: 0.85rem;
}

.result-card {
  padding: var(--tw-ui-card-pad-lg, 0.95rem);
  margin-bottom: 0.72rem;
  background: var(--tw-premium-surface-strong, rgba(15, 23, 42, 0.94));
  scroll-margin-top: var(--tw-sticky-offset, 128px);
}

.search-actions--footer {
  margin-top: var(--tw-section-gap-md, 1rem);
}

.result-card--best-match,
.result-card--strong,
.result-card--close,
.result-card--similar,
.result-card--broad,
.result-card--close-alternative {
  border-left-width: 2px;
}

.result-card .tw-match {
  padding: 0.6rem 0.64rem;
  border-radius: var(--tw-ui-radius-chip, var(--tw-radius-sm, 8px));
}

.result-meta-row {
  margin-top: 0.62rem;
  padding-top: 0.58rem;
}

.result-card .order-link {
  min-height: var(--tw-ui-control-min-height, 40px);
  box-shadow: none;
}

@media (max-width: 767px) {
  .discover-progress__top {
    flex-direction: row;
    align-items: center;
  }

  .discover-progress__steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .discover-progress__step {
    min-height: 32px;
    gap: 0.28rem;
  }

  .discover-progress__label {
    font-size: 0.68rem;
  }
}

@media (max-width: 640px) {
  #step-container,
  .taste-rail,
  .results-shell,
  .inline-results-shell,
  .result-card {
    scroll-margin-top: var(--tw-sticky-offset-mobile, 180px);
  }

  .tw-panel {
    padding: var(--tw-ui-card-pad-md, 0.82rem);
    border-radius: var(--tw-ui-radius-card, 12px);
  }

  .debug-header,
  .debug-hero,
  .discover-progress-wrap {
    margin-bottom: 0.62rem;
  }

  .debug-hero {
    padding: 0.68rem 0.72rem;
  }

  .filters-grid {
    gap: var(--tw-section-gap-xs, 0.55rem);
  }

  .filter-field,
  .filter-field--focus,
  .tw-guidance-card,
  .filter-section-intro,
  .taste-helper,
  .taste-rail,
  .results-explainer,
  .results-shell {
    padding: 0.68rem;
  }

  .debug-input,
  .debug-select,
  .btn-orange {
    min-height: 44px;
  }

  .result-card {
    padding: 0.82rem;
  }
}

/* =====================================================
   Phase 1 mobile-first cleanup: active discover pages
   ===================================================== */
@media (max-width: 768px) {
  .tw-panel,
  #app-shell,
  #step-container,
  .filters-grid,
  .taste-rail,
  .results-shell,
  .inline-results-shell,
  .result-card {
    min-width: 0;
    max-width: 100%;
  }

  .debug-header {
    flex-direction: column;
    align-items: stretch;
  }

  .debug-header h1,
  .hero-meta .cities span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

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

  .filters-grid > .filter-field,
  .filters-grid > .filter-actions,
  .filters-grid > #filters-inline-results {
    grid-column: 1 / -1;
  }

  .filters-grid > .filter-field--diet,
  .filters-grid > .filter-field--item-type {
    grid-column: span 6;
  }

  .filter-field--diet label,
  .filter-field--item-type label {
    font-size: 0.66rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .filter-actions,
  .restaurant-actions-row,
  .results-empty-card__actions {
    width: 100%;
  }

  .search-actions {
    align-items: stretch;
  }

  .search-actions .btn-orange,
  .search-actions a.btn-orange,
  .inline-continue-btn,
  .results-empty-card__cta {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .taste-chip {
    min-width: 0;
    white-space: normal;
  }

  .result-card-actions,
  .result-card .result-item-order,
  .result-card .order-link {
    width: 100%;
  }
}

/* =====================================================
   TasteBud laptop containment: MacBook and smaller desktop
   ===================================================== */
#taste-section,
.taste-header-row,
.taste-helper,
.taste-rail,
#taste-row,
#taste-row .taste-slot,
.taste-inspo,
.taste-inspo__chips {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#taste-row .taste-slot {
  flex: 0 1 auto;
  align-self: stretch;
}

.taste-slot-actions {
  margin-top: 0.1rem;
}

#taste-section .search-actions .btn-orange,
#taste-section .search-actions a.btn-orange,
.search-actions--primary #continue-to-results {
  max-width: 100%;
  box-sizing: border-box;
}

#taste-section {
  display: grid;
  gap: var(--tw-section-gap-sm, 0.75rem);
}

.taste-form-instruction {
  margin: 0 0 var(--tw-section-gap-sm, 0.75rem);
  color: var(--tw-helper-text, rgba(226, 232, 240, 0.78));
  font-size: 0.92rem;
  line-height: 1.4;
}

.taste-helper,
.taste-rail,
.taste-inspo {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.taste-inspo__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.taste-chip {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.taste-keyword {
  width: 100%;
  min-width: 0;
}

@media (max-width: 1440px) {
  body:has(#taste-section) .tw-main {
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  }

  body:has(#taste-section) .tw-panel {
    overflow: visible;
  }

  .taste-header-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--tw-section-gap-md, 1rem);
  }

  .taste-helper {
    width: 100%;
  }

  .taste-rail {
    display: grid;
    gap: var(--tw-section-gap-xs, 0.55rem);
  }

  #taste-row {
    overflow: visible;
  }

  #taste-row .taste-slot,
  #taste-row .taste-slot:first-child {
    grid-template-columns: minmax(2.3rem, auto) minmax(0, 1fr);
    row-gap: 0.45rem;
    align-items: center;
    height: auto;
    padding-right: 3.85rem;
  }

  #taste-row .taste-slot:nth-child(2) {
    margin-top: 0;
  }

  #taste-row .taste-slot:nth-child(2)::before {
    display: none;
  }

  .taste-keyword {
    grid-column: 1 / -1;
  }

  .taste-lock-btn {
    top: auto;
    bottom: 0.76rem;
    transform: none;
  }

  .taste-lock-btn:active {
    transform: scale(0.96);
  }

  #taste-section .search-actions {
    align-items: stretch;
    gap: 0.7rem;
  }

  #taste-section .search-actions .btn-orange,
  #taste-section .search-actions a.btn-orange {
    flex: 1 1 13rem;
    min-width: min(100%, 13rem);
    white-space: normal;
    text-align: center;
  }

  .search-actions--primary {
    justify-content: stretch;
    margin-top: var(--tw-section-gap-md, 1rem);
  }

  .search-actions--primary #continue-to-results {
    flex: 1 1 18rem;
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 1180px) {
  body:has(#taste-section) .page-shell {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  }

  .taste-rail__intro span {
    flex: 1 1 14rem;
    min-width: min(100%, 14rem);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #taste-section .search-actions .btn-orange,
  #taste-section .search-actions a.btn-orange {
    width: 100%;
    flex-basis: 100%;
  }

  #taste-section .search-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .taste-inspo__chips {
    gap: 0.5rem;
  }
}

/* =====================================================
   Patron soft CTA prompt
   ===================================================== */
.patron-soft-cta {
  position: fixed;
  inset: 0;
  z-index: 4600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: rgba(2, 6, 23, 0.64);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.patron-soft-cta[hidden] {
  display: none;
}

.patron-soft-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.patron-soft-cta__dialog {
  position: relative;
  width: min(100%, 460px);
  max-height: min(88vh, 620px);
  overflow-y: auto;
  padding: clamp(1rem, 2.4vw, 1.35rem);
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: var(--tw-ui-radius-card, 12px);
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.08), transparent 42%),
    var(--tw-premium-surface-strong, rgba(15, 23, 42, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  color: var(--color-text, #f8fafc);
  transform: translateY(8px) scale(0.98);
  transition: transform 180ms ease;
}

.patron-soft-cta.is-visible .patron-soft-cta__dialog {
  transform: translateY(0) scale(1);
}

.patron-soft-cta__dialog:focus {
  outline: none;
}

.patron-soft-cta__dialog:focus-visible {
  outline: 2px solid var(--tw-focus-ring, #facc15);
  outline-offset: 3px;
}

.patron-soft-cta__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: var(--tw-ui-radius-control, 10px);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.patron-soft-cta__close:hover,
.patron-soft-cta__close:focus-visible {
  border-color: rgba(250, 204, 21, 0.55);
  background: rgba(250, 204, 21, 0.12);
}

.patron-soft-cta__eyebrow {
  margin: 0 2.75rem 0.45rem 0;
  color: var(--tw-accent-gold, #facc15);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patron-soft-cta__title {
  margin: 0 2.75rem 0.65rem 0;
  color: var(--color-text, #f8fafc);
  font-size: clamp(1.25rem, 4.8vw, 1.55rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.patron-soft-cta__body {
  margin: 0;
  color: var(--color-muted, #cbd5e1);
  font-size: 0.96rem;
  line-height: 1.5;
}

.patron-soft-cta__usage {
  margin: 0.9rem 0 0;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--tw-ui-radius-chip, 10px);
  background: rgba(34, 211, 238, 0.08);
  color: var(--color-text, #f8fafc);
  font-size: 0.9rem;
  font-weight: 700;
}

.patron-soft-cta__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.patron-soft-cta__button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.9rem;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: var(--tw-ui-radius-control, 10px);
  color: var(--color-text, #f8fafc);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.patron-soft-cta__button--primary {
  grid-column: 1 / -1;
  border-color: transparent;
  background: var(--tw-btn-primary-bg, linear-gradient(135deg, #f97316, #facc15));
  color: var(--tw-btn-primary-text, #111827);
}

.patron-soft-cta__button--secondary,
.patron-soft-cta__button--ghost {
  background: rgba(255, 255, 255, 0.055);
}

.patron-soft-cta__button:hover,
.patron-soft-cta__button:focus-visible {
  border-color: rgba(250, 204, 21, 0.5);
  text-decoration: none;
}

[data-theme="light"] .patron-soft-cta {
  background: rgba(15, 23, 42, 0.38);
}

[data-theme="light"] .patron-soft-cta__dialog {
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.08), transparent 42%),
    #ffffff;
  color: #0f172a;
}

[data-theme="light"] .patron-soft-cta__body {
  color: #475569;
}

@media (max-width: 520px) {
  .patron-soft-cta {
    align-items: flex-end;
    padding: 0.75rem;
  }

  .patron-soft-cta__dialog {
    width: 100%;
    max-height: 86vh;
  }

  .patron-soft-cta__button {
    width: 100%;
  }
}

/* =====================================================
   Patron hard search gate
   ===================================================== */
.patron-hard-gate {
  position: fixed;
  inset: 0;
  z-index: 4700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: rgba(2, 6, 23, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.patron-hard-gate[hidden] {
  display: none;
}

.patron-hard-gate.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.patron-hard-gate__dialog {
  width: min(100%, 480px);
  max-height: min(88vh, 620px);
  overflow-y: auto;
  padding: clamp(1.05rem, 2.6vw, 1.45rem);
  border: 1px solid rgba(250, 204, 21, 0.26);
  border-radius: var(--tw-ui-radius-card, 12px);
  background:
    linear-gradient(145deg, rgba(250, 204, 21, 0.1), transparent 46%),
    var(--tw-premium-surface-strong, rgba(15, 23, 42, 0.98));
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.48);
  color: var(--color-text, #f8fafc);
  transform: translateY(8px) scale(0.98);
  transition: transform 180ms ease;
}

.patron-hard-gate.is-visible .patron-hard-gate__dialog {
  transform: translateY(0) scale(1);
}

.patron-hard-gate__dialog:focus {
  outline: none;
}

.patron-hard-gate__dialog:focus-visible {
  outline: 2px solid var(--tw-focus-ring, #facc15);
  outline-offset: 3px;
}

.patron-hard-gate__eyebrow {
  margin: 0 0 0.45rem;
  color: var(--tw-accent-gold, #facc15);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patron-hard-gate__title {
  margin: 0 0 0.7rem;
  color: var(--color-text, #f8fafc);
  font-size: clamp(1.25rem, 4.8vw, 1.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.patron-hard-gate__body {
  margin: 0;
  color: var(--color-muted, #cbd5e1);
  font-size: 0.97rem;
  line-height: 1.5;
}

.patron-hard-gate__usage {
  margin: 0.95rem 0 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: var(--tw-ui-radius-chip, 10px);
  background: rgba(250, 204, 21, 0.1);
  color: var(--color-text, #f8fafc);
  font-size: 0.9rem;
  font-weight: 800;
}

.patron-hard-gate__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}

.patron-hard-gate__button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.92rem;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: var(--tw-ui-radius-control, 10px);
  color: var(--color-text, #f8fafc);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.patron-hard-gate__button--primary {
  border-color: transparent;
  background: var(--tw-btn-primary-bg, linear-gradient(135deg, #f97316, #facc15));
  color: var(--tw-btn-primary-text, #111827);
}

.patron-hard-gate__button--secondary {
  background: rgba(255, 255, 255, 0.055);
}

.patron-hard-gate__button:hover,
.patron-hard-gate__button:focus-visible {
  border-color: rgba(250, 204, 21, 0.5);
  text-decoration: none;
}

[data-theme="light"] .patron-hard-gate {
  background: rgba(15, 23, 42, 0.42);
}

[data-theme="light"] .patron-hard-gate__dialog {
  background:
    linear-gradient(145deg, rgba(249, 115, 22, 0.08), transparent 42%),
    #ffffff;
  color: #0f172a;
}

[data-theme="light"] .patron-hard-gate__body {
  color: #475569;
}

@media (max-width: 520px) {
  .patron-hard-gate {
    align-items: flex-end;
    padding: 0.75rem;
  }

  .patron-hard-gate__dialog {
    width: 100%;
    max-height: 86vh;
  }

  .patron-hard-gate__actions {
    grid-template-columns: 1fr;
  }

  .patron-hard-gate__button {
    width: 100%;
  }
}

@media (max-width: 1440px) {
  #taste-row .taste-slot,
  #taste-row .taste-slot:first-child {
    padding-right: 0.78rem;
  }
}

/* Compact Step 2 summary inside the progress card */
.discover-progress .discover-progress-summary,
.discover-progress #step1-summary {
  margin: 0.68rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.landing-preselection-notice,
.landing-preselection-warning {
  margin: 0.68rem 0 0;
  padding: 0.75rem;
  border: 1px solid rgba(34, 211, 238, 0.55);
  border-radius: 12px;
  background: rgba(8, 47, 73, 0.42);
  color: var(--color-text, #f8fafc);
}

.landing-preselection-warning {
  margin-bottom: 1rem;
  border-color: rgba(250, 204, 21, 0.6);
}

.landing-preselection-notice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.landing-preselection-notice__actions .btn-orange {
  min-height: 40px;
}

.discover-progress .step-summary__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.discover-progress .step-summary__title {
  flex: 0 0 auto;
  margin: 0;
  color: #facc15;
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: none;
}

.discover-progress .step-summary__chips {
  flex: 1 1 14rem;
  gap: 0.34rem;
}

.discover-progress .step-summary__chips > span {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.22rem;
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  min-height: 24px;
  padding: 0.18rem 0.48rem;
  border-color: rgba(250, 204, 21, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 0.74rem;
  line-height: 1.2;
  white-space: nowrap;
}

.discover-progress .step-summary__chips > .selected-filter-chip {
  color: #f8fafc;
}

.discover-progress .selected-filter-chip-label {
  flex: 0 0 auto;
  color: #facc15;
  font-weight: 800;
}

.discover-progress .selected-filter-chip-value {
  min-width: 0;
  overflow: hidden;
  color: #f8fafc;
  text-overflow: ellipsis;
}

[data-theme="light"] .discover-progress .step-summary__title {
  color: #0f172a;
}

[data-theme="light"] .discover-progress .step-summary__chips > .selected-filter-chip {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.86);
  color: #0f172a;
}

[data-theme="light"] .discover-progress .selected-filter-chip-label {
  color: #92400e;
}

[data-theme="light"] .discover-progress .selected-filter-chip-value {
  color: #0f172a;
}

/* Compact TasteBud rows after removing instructional cards */
.taste-rail {
  padding: clamp(0.68rem, 1.2vw, 0.86rem);
}

.taste-form-instruction {
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.3;
}

.taste-secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(5.8rem, auto)) minmax(12rem, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 0.45rem;
  margin: 0 0 0.55rem;
}

.taste-secondary-actions .btn-orange,
.taste-secondary-actions a.btn-orange {
  min-height: 34px;
  padding: 0.42rem 0.68rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(226, 232, 240, 0.16);
  color: var(--color-text, #f8fafc);
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.taste-secondary-actions #shuffle-tastes,
.taste-secondary-actions #clear-tastes {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.2);
}

.taste-secondary-actions #continue-to-results {
  justify-self: stretch;
  min-height: 40px;
  background: linear-gradient(135deg, #f97316, #facc15);
  border-color: rgba(250, 204, 21, 0.36);
  color: #111827;
  font-size: 0.86rem;
  font-weight: 900;
}

#taste-row {
  gap: 0.5rem;
}

#taste-row .taste-slot,
#taste-row .taste-slot:first-child {
  grid-template-columns: 2.15rem minmax(5.8rem, 0.22fr) minmax(0, 1fr) auto;
  gap: 0.48rem;
  min-height: 0;
  padding: 0.5rem 0.58rem;
}

#taste-row .taste-slot:first-child {
  grid-template-columns: 2.25rem minmax(6.8rem, 0.24fr) minmax(0, 1fr) auto;
  min-height: 0;
  padding: 0.58rem 0.64rem;
}

.taste-priority,
#taste-row .taste-slot:first-child .taste-priority {
  width: 2rem;
  height: 2rem;
  font-size: 0.78rem;
}

.taste-label {
  font-size: 0.66rem;
  line-height: 1.12;
  letter-spacing: 0.045em;
}

#taste-row .taste-slot:first-child .taste-label::after {
  margin-left: 0.28rem;
  padding: 0.08rem 0.28rem;
  font-size: 0.54rem;
}

.taste-keyword,
#taste-row .taste-slot:first-child .taste-keyword {
  min-height: 40px;
  padding-right: 0.7rem;
}

.taste-slot-actions {
  gap: 0.28rem;
}

.taste-move-btn,
.taste-slot-actions .taste-lock-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 9px;
}

.taste-move-btn {
  font-size: 1.05rem;
}

.taste-slot-actions .taste-lock-btn .seal {
  width: 21px;
  height: 21px;
}

.taste-move-btn:disabled {
  display: none;
}

@media (max-width: 768px) {
  .discover-progress .step-summary__group {
    display: grid;
    gap: 0.35rem;
  }

  .discover-progress .step-summary__chips {
    flex: none;
  }

  .discover-progress .step-summary__chips > span {
    max-width: 100%;
  }

  .taste-secondary-actions {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: stretch;
  }

  .taste-secondary-actions .btn-orange,
  .taste-secondary-actions a.btn-orange {
    min-width: 0;
  }

  .taste-secondary-actions .btn-secondary,
  .taste-secondary-actions #shuffle-tastes,
  .taste-secondary-actions #clear-tastes {
    grid-column: span 4;
    padding-inline: 0.35rem;
  }

  .taste-secondary-actions #continue-to-results {
    grid-column: 1 / -1;
  }

  #taste-row .taste-slot,
  #taste-row .taste-slot:first-child {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    row-gap: 0.36rem;
    padding: 0.52rem;
  }

  .taste-label {
    grid-column: 2 / 3;
  }

  .taste-keyword,
  #taste-row .taste-slot:first-child .taste-keyword {
    grid-column: 1 / -1;
  }

  .taste-slot-actions {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }
}

/* Step 2 mobile compact mode */
@media (max-width: 640px) {
  body:has(#taste-section) .tw-panel {
    padding: 0.56rem;
  }

  body:has(#taste-section) .debug-header {
    margin-bottom: 0.38rem;
  }

  body:has(#taste-section) .discover-progress-wrap {
    margin: 0.42rem 0 0.42rem;
  }

  body:has(#taste-section) .discover-progress {
    padding: 0.5rem 0.56rem;
    border-radius: 10px;
  }

  body:has(#taste-section) .discover-progress__top {
    margin-bottom: 0.36rem;
  }

  body:has(#taste-section) .discover-progress__bar {
    height: 4px;
    margin-bottom: 0.44rem;
  }

  body:has(#taste-section) .discover-progress__dot {
    width: 20px;
    height: 20px;
    font-size: 0.68rem;
  }

  body:has(#taste-section) .discover-progress__step {
    min-height: 26px;
  }

  body:has(#taste-section) .discover-progress__label,
  body:has(#taste-section) .discover-progress__count {
    font-size: 0.66rem;
  }

  .discover-progress .discover-progress-summary,
  .discover-progress #step1-summary {
    margin-top: 0.44rem;
  }

  .discover-progress .step-summary__group {
    gap: 0.28rem;
  }

  .discover-progress .step-summary__title {
    font-size: 0.64rem;
  }

  .discover-progress .step-summary__chips {
    gap: 0.26rem;
  }

  .discover-progress .step-summary__chips > span {
    min-height: 22px;
    padding: 0.14rem 0.36rem;
    font-size: 0.68rem;
    white-space: normal;
  }

  #taste-section {
    gap: 0.42rem;
  }

  .taste-rail {
    padding: 0.42rem;
    border-radius: 10px;
  }

  .taste-form-instruction {
    margin-bottom: 0.36rem;
    font-size: 0.8rem;
    line-height: 1.25;
  }

  .taste-secondary-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.38rem;
    margin-bottom: 0.42rem;
  }

  .taste-secondary-actions .btn-secondary,
  .taste-secondary-actions #shuffle-tastes,
  .taste-secondary-actions #clear-tastes {
    grid-column: auto;
    min-height: 38px;
    width: 100%;
    padding: 0.34rem 0.24rem;
    font-size: 0.72rem;
  }

  .taste-secondary-actions #continue-to-results {
    grid-column: 1 / -1;
    min-height: 40px;
    width: 100%;
    padding: 0.46rem 0.58rem;
    font-size: 0.82rem;
  }

  #taste-row {
    gap: 0.38rem;
  }

  #taste-row .taste-slot,
  #taste-row .taste-slot:first-child {
    grid-template-columns: 1.85rem minmax(0, 1fr) auto;
    gap: 0.32rem;
    row-gap: 0.28rem;
    padding: 0.38rem 0.42rem;
    border-radius: 9px;
  }

  .taste-priority,
  #taste-row .taste-slot:first-child .taste-priority {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.68rem;
  }

  .taste-label {
    font-size: 0.6rem;
    line-height: 1.1;
    letter-spacing: 0.035em;
  }

  #taste-row .taste-slot:first-child .taste-label::after {
    margin-left: 0.2rem;
    padding: 0.06rem 0.22rem;
    font-size: 0.48rem;
  }

  .taste-keyword,
  #taste-row .taste-slot:first-child .taste-keyword {
    min-height: 38px;
    padding: 0.42rem 0.56rem;
    font-size: 0.86rem;
  }

  .taste-slot-actions {
    gap: 0.2rem;
    margin-top: 0;
    justify-content: flex-end;
    width: auto;
  }

  .taste-move-btn,
  .taste-slot-actions .taste-lock-btn {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 34px;
    min-height: 34px;
    border-radius: 8px;
  }

  .taste-move-btn {
    font-size: 0.92rem;
  }

  .taste-slot-actions .taste-lock-btn .seal {
    width: 18px;
    height: 18px;
  }
}

.tastebud-shuffle-row {
  display: flex;
  justify-content: flex-start;
  gap: 0.45rem;
  max-width: 100%;
  margin: 0 0 0.5rem;
}

.tastebud-bottom-actions {
  display: grid;
  grid-template-columns: auto minmax(12rem, 1fr);
  align-items: stretch;
  gap: 0.45rem;
  max-width: 100%;
  margin: 0.55rem 0 0;
}

.taste-rail .taste-order-status {
  margin: 0.24rem 0 0;
}

.taste-rail .taste-order-status:empty {
  display: none;
}

.tastebud-bottom-secondary-row,
.tastebud-submit-row {
  display: grid;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.tastebud-bottom-secondary-row {
  grid-template-columns: repeat(2, minmax(5.8rem, auto));
  justify-content: start;
}

.tastebud-submit-row {
  grid-template-columns: minmax(0, 1fr);
}

.tastebud-shuffle-row #shuffle-tastes,
.tastebud-bottom-secondary-row .btn-orange,
.tastebud-bottom-secondary-row a.btn-orange {
  min-width: 0;
  min-height: 34px;
  padding: 0.42rem 0.68rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(226, 232, 240, 0.16);
  color: var(--color-text, #f8fafc);
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tastebud-shuffle-row #shuffle-tastes,
.tastebud-bottom-secondary-row #clear-tastes {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.2);
}

.tastebud-submit-row #continue-to-results {
  justify-self: stretch;
  width: 100%;
  min-height: 40px;
  background: linear-gradient(135deg, #f97316, #facc15);
  border-color: rgba(250, 204, 21, 0.36);
  color: #111827;
  font-size: 0.86rem;
  font-weight: 900;
}

@media (max-width: 767.98px) {
  .tastebud-shuffle-row {
    margin-bottom: 0.38rem;
  }

  .tastebud-shuffle-row #shuffle-tastes {
    min-height: 38px;
    padding: 0.34rem 0.72rem;
    font-size: 0.72rem;
  }

  .tastebud-bottom-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.38rem;
    margin-top: 0.42rem;
  }

  .tastebud-bottom-secondary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 0.38rem;
  }

  .tastebud-bottom-secondary-row .btn-orange,
  .tastebud-bottom-secondary-row a.btn-orange {
    min-height: 38px;
    width: 100%;
    padding: 0.34rem 0.35rem;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tastebud-submit-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .tastebud-submit-row #continue-to-results {
    min-height: 40px;
    padding: 0.46rem 0.58rem;
    font-size: 0.82rem;
    white-space: normal;
  }
}

/* Keep combined-form layout authoritative over legacy TasteBud rules above. */
#taste-row.combined-taste__row .taste-slot,
#taste-row.combined-taste__row .taste-slot:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

#taste-row.combined-taste__row .taste-slot[hidden] {
  display: none;
}

#taste-row.combined-taste__row .taste-slot::before,
#taste-row.combined-taste__row .taste-slot::after {
  display: none;
}

#taste-row.combined-taste__row .taste-keyword,
#taste-row.combined-taste__row .taste-slot:first-child .taste-keyword {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  font-size: 1rem;
}

.taste-input-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

#taste-row:not(.combined-taste__row) .taste-input-row {
  grid-column: 3;
}

#taste-row.combined-taste__row .taste-input-row {
  grid-column: 1;
}

.taste-input-row .taste-keyword,
#taste-row .taste-slot:first-child .taste-input-row .taste-keyword {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.tastebud-input-wrap {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

#taste-row .taste-slot .tastebud-input-wrap .taste-keyword {
  padding-right: 46px;
}

.tastebud-clear-button {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tw-text-muted, #cbd5e1);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tastebud-clear-button[hidden] {
  display: none;
}

.results-account-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 1.25rem 0 0;
  padding: 1.15rem;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.13), rgba(249, 115, 22, 0.08));
}

.results-account-invite h2,
.results-account-invite p { margin: 0; }
.results-account-invite h2 { margin-bottom: 0.35rem; font-size: clamp(1.05rem, 2vw, 1.25rem); }
.results-account-invite__eyebrow { color: var(--tw-accent-cyan); font-size: 0.75rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.results-account-invite__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.results-account-invite__error { grid-column: 1 / -1; color: var(--tw-error); font-weight: 700; }
.results-account-invite__error[hidden] { display: none; }

@media (max-width: 680px) {
  .results-account-invite { grid-template-columns: 1fr; }
  .results-account-invite__actions > * { flex: 1 1 100%; justify-content: center; text-align: center; }
}

.tastebud-suggestion-select {
  flex: 0 0 7.5rem;
  width: 7.5rem;
  min-width: 0;
  min-height: 44px;
  padding: 0 0.55rem;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 10px;
  background: var(--tw-surface, #0f172a);
  color: var(--tw-text-main, #f8fafc);
  font: inherit;
  cursor: pointer;
}

.tastebud-suggestion-select:focus-visible {
  outline: 2px solid var(--tw-focus-ring, #22d3ee);
  outline-offset: 2px;
}

.tastebud-shuffle-button {
  display: inline-grid;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.08);
  color: var(--tw-accent-cyan, #22d3ee);
  cursor: pointer;
}

.tastebud-shuffle-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tastebud-shuffle-button:hover {
  border-color: rgba(34, 211, 238, 0.58);
  background: rgba(34, 211, 238, 0.14);
}

.tastebud-shuffle-button:focus-visible {
  outline: 2px solid var(--tw-focus-ring, #22d3ee);
  outline-offset: 2px;
}

@media (max-width: 1440px) {
  #taste-row:not(.combined-taste__row) .taste-input-row {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .taste-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 0.4rem;
  }

  .tastebud-input-wrap,
  #taste-row.combined-taste__row .taste-input-row {
    grid-column: 1 / -1;
  }

  #taste-row .taste-slot .taste-input-row .taste-keyword {
    min-height: 48px;
    font-size: 1rem;
  }

  #taste-row.combined-taste__row .taste-label {
    grid-column: 1;
  }

  #taste-row.combined-taste__row .combined-taste__remove {
    grid-row: 1;
  }

  .tastebud-shuffle-button {
    flex-basis: 44px;
  }

  .tastebud-suggestion-select {
    width: 100%;
    padding-inline: 0.35rem;
    font-size: 1rem;
  }
}

/* Simplified Results: put the diner's request and first recommendation first. */
.results-search-context {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.45rem;
}

.results-search-context__request {
  color: var(--color-text, #f8fafc);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 850;
  line-height: 1.12;
}

.results-search-context__scope {
  margin-top: 0.18rem;
  color: var(--color-text-muted, #cbd5e1);
  font-size: 1rem;
}

.results-search-form {
  margin-bottom: 0.35rem;
}

.results-search-actions {
  justify-content: flex-start;
  margin: 0;
}

.results-search-actions .results-lifecycle-control {
  display: none;
}

.results-search-actions #refine-search-link {
  min-height: 0;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.results-shell {
  padding-top: 0.5rem;
}

.result-section-heading {
  padding: 0;
  margin: 1.15rem 0 0.55rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.result-section-heading--top {
  margin-top: 0.35rem;
}

.result-section-heading__label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-card:first-of-type,
.result-section-heading--top + .result-card {
  border-color: rgba(34, 211, 238, 0.58);
  background: linear-gradient(145deg, rgba(8, 47, 73, 0.38), rgba(15, 23, 42, 0.96));
}

[data-theme="light"] .result-card--best-match,
[data-theme="light"] .result-section-heading--top + .result-card {
  border-color: rgba(13, 148, 136, 0.34);
  background:
    linear-gradient(145deg, rgba(217, 119, 6, 0.1), rgba(2, 132, 199, 0.035)),
    rgba(239, 232, 219, 0.78);
  box-shadow: 0 12px 28px rgba(120, 83, 45, 0.12);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .result-card--best-match .result-restaurant-price,
[data-theme="light"] .result-section-heading--top + .result-card .result-restaurant-price {
  color: var(--tw-text-main, #0f172a);
}

[data-theme="light"] .result-card--best-match .tw-match-line,
[data-theme="light"] .result-section-heading--top + .result-card .tw-match-line {
  color: var(--tw-accent-cyan, #0284c7);
}

.result-title-row {
  display: block;
}

.result-title {
  display: inline-block;
  padding-right: 2.5rem;
  color: inherit;
  font-size: clamp(1.08rem, 2.4vw, 1.35rem);
  text-decoration: none;
}

.city-featured-tastebud {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin: .7rem 0 1rem;
  padding: .65rem .8rem;
  border: 1px solid rgba(234, 145, 0, .35);
  border-radius: .8rem;
  background: rgba(255, 184, 0, .08);
}

.city-featured-tastebud[hidden] { display: none; }
.city-featured-tastebud span { color: var(--text-muted, #5c6470); }
.city-featured-tastebud button { padding: .45rem .8rem; }

a.result-title:hover { text-decoration: underline; }
a.result-title:focus-visible { outline: 2px solid var(--tw-accent-cyan, #22d3ee); outline-offset: 3px; }

.result-restaurant-line {
  margin-top: 0.24rem;
  color: var(--color-text-muted, #cbd5e1);
  font-size: 0.9rem;
  font-weight: 700;
}

.result-restaurant-price {
  color: #f8fafc;
}

.result-cuisine-types {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  margin-top: 0.5rem;
  max-width: 100%;
}

.result-cuisine-type {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 1.55rem;
  padding: 0.16rem 0.55rem;
  border: 1px solid rgba(250, 204, 21, 0.34);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.09);
  color: #fef3c7;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

[data-theme="light"] .result-cuisine-type {
  border-color: rgba(180, 83, 9, 0.24);
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.result-context-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.62rem;
}

.result-restaurant-events-link {
  display: inline-flex;
  margin-top: 0.32rem;
  color: var(--color-text-muted, #cbd5e1);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.result-restaurant-events-link:hover,
.result-restaurant-events-link:focus-visible {
  text-decoration: underline;
}

.result-context-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.18rem 0.58rem;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.09);
  color: #cffafe;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.2;
}

[data-theme="light"] .result-context-badge {
  border-color: rgba(2, 132, 199, 0.25);
  background: rgba(2, 132, 199, 0.08);
  color: #075985;
}

.result-desc {
  display: -webkit-box;
  margin-top: 0.65rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.tw-match-line {
  margin-top: 0.62rem;
  color: #a5f3fc;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.4;
}

.result-meta-row {
  justify-content: flex-end;
  border-top-color: rgba(148, 163, 184, 0.14);
}

.result-card-actions {
  margin-left: auto;
}

.result-share-button {
  min-height: 38px;
  padding: .38rem .82rem;
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: .55rem;
  background: rgba(34, 211, 238, .08);
  color: var(--color-text, #f8fafc);
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}

[data-theme="light"] .result-share-button {
  color: var(--tw-text, #1f2937);
}

/* Light-mode result surfaces use the warm khaki family instead of white. */
[data-theme="light"] .result-card,
[data-theme="light"] .results-empty-card,
[data-theme="light"] .tw-mobile-pick-card {
  background:
    linear-gradient(145deg, rgba(217, 119, 6, 0.07), rgba(2, 132, 199, 0.025)),
    #efe8db;
  border-color: rgba(120, 83, 45, 0.2);
  box-shadow: 0 10px 26px rgba(120, 83, 45, 0.11);
}

[data-theme="light"] .result-card .result-restaurant-price {
  color: var(--tw-text-muted, #475569);
}

[data-theme="light"] .result-card .tw-match-line {
  color: var(--tw-accent-cyan, #0284c7);
}

@media (max-width: 640px) {
  .results-search-context {
    display: block;
  }

  .results-search-actions .btn-orange,
  .results-search-actions a.btn-orange {
    width: auto;
    min-height: 36px;
    text-align: left;
  }

  .results-shell {
    padding: 0.4rem 0;
  }

  .result-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .result-card-actions > :only-child {
    grid-column: 1 / -1;
  }
}

/* Result-card decision hierarchy: one outcome first, preservation second. */
.result-card-actions {
  align-items: center;
  justify-content: flex-start;
  margin-left: 0;
}

.result-card .result-action {
  min-height: 44px;
}

.result-card .result-action--primary {
  border-color: transparent;
  background: var(--tw-btn-primary-bg, linear-gradient(135deg, #f97316, #facc15));
  color: var(--tw-btn-primary-text, #111827);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.2);
}

.result-card .result-action--secondary {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.1);
}

.result-card .result-action--tertiary {
  border-color: rgba(148, 163, 184, 0.24);
  background: transparent;
  color: var(--color-text-muted, #cbd5e1);
}

.result-card .result-action--restaurant-menu {
  border-color: #67e8f9;
  background: #155e75;
  color: #f8fafc;
}

.result-card .tw-favorite-toggle--result {
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0.5rem 0.82rem;
  border-radius: 0.55rem;
  gap: 0.42rem;
  box-shadow: none;
  color: var(--color-text, #f8fafc);
  font-size: 0.78rem;
  font-weight: 800;
}

.tw-favorite-toggle--result .tw-favorite-toggle__label {
  line-height: 1;
}

.result-card .tw-favorite-toggle--result.is-active {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(34, 211, 238, 0.18);
}

[data-theme="light"] .result-card .result-action--secondary,
[data-theme="light"] .result-card .tw-favorite-toggle--result {
  color: var(--tw-text, #1f2937);
}

[data-theme="light"] .result-card .result-action--tertiary {
  color: var(--tw-text-muted, #475569);
}

[data-theme="light"] .result-card .result-action--restaurant-menu {
  border-color: #0369a1;
  background: #e0f2fe;
  color: #0c4a6e;
}

@media (max-width: 640px) {
  .result-card-actions > .result-action--primary {
    grid-column: 1 / -1;
  }

  .result-card .result-action,
  .result-card .tw-favorite-toggle--result {
    width: 100%;
    justify-content: center;
  }
}
/* Explicit product preferences share the existing result action controls. */
.tw-item-feedback { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; align-items: center; }
.tw-item-feedback .result-action {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 44px;
  min-width: 72px;
  padding: .5rem .85rem;
  border: 1px solid #94a3b8;
  border-radius: .55rem;
  background: #172033;
  color: #f8fafc;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
}
.tw-item-feedback .result-action:hover { background: #263449; }
.tw-item-feedback .result-action[aria-pressed="true"] {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #111827;
}
.tw-item-feedback .result-action[aria-pressed="true"]::before { content: "\2713"; }
.tw-item-feedback .result-action:focus-visible {
  outline: 3px solid #67e8f9;
  outline-offset: 3px;
}
.tw-item-feedback .result-action:disabled { opacity: 1; cursor: wait; }
[data-theme="light"] .tw-item-feedback .result-action {
  background: #fff;
  border-color: #64748b;
  color: #0f172a;
}
[data-theme="light"] .tw-item-feedback .result-action:hover { background: #e2e8f0; }
[data-theme="light"] .tw-item-feedback .result-action[aria-pressed="true"] {
  background: #7c2d12;
  border-color: #7c2d12;
  color: #fff;
}
[data-theme="light"] .tw-item-feedback .result-action:focus-visible { outline-color: #075985; }
[data-for-you] select { max-width: 100%; min-height: 44px; margin: .75rem; }
[data-for-you] #for-you-refresh { min-height: 44px; margin: .5rem 0; }
.discovery-entry-gate {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.discovery-entry-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.45;
}

.discovery-entry-terms input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.discovery-entry-status {
  min-height: 1.25em;
  margin: 0;
  color: var(--tw-text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.discovery-entry-status.is-error {
  color: var(--tw-danger, #b42318);
}

.restaurant-discover {
  display: grid;
  gap: 1rem;
}

.restaurant-discover__identity {
  padding: 1rem;
  border: 1px solid var(--tw-border, #cbd5e1);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--tw-surface, #fff) 92%, #f59e0b 8%);
}

.restaurant-discover__eyebrow,
.restaurant-discover__scope,
.restaurant-discover__address {
  margin: 0.25rem 0;
}

.restaurant-discover__eyebrow {
  color: var(--tw-accent-strong, #9a3412);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.restaurant-discover__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

@media (max-width: 640px) {
  .restaurant-discover__identity {
    padding: 0.8rem;
  }

  .restaurant-discover__actions > * {
    flex: 1 1 100%;
    min-height: 44px;
  }

}
