/* ============================================
   FavDish App - Mobile-First App Styles
   ============================================ */

/* --- Tokens (same as landing) --- */
:root {
  --color-cream: #FFF8F0;
  --color-cream-dark: #F5EBE0;
  --color-warm-white: #FFFCF9;
  --color-orange-50: #FFF7ED;
  --color-orange-100: #FFEDD5;
  --color-orange-200: #FED7AA;
  --color-orange-400: #FB923C;
  --color-orange-500: #F97316;
  --color-orange-600: #EA580C;
  --color-orange-700: #C2410C;
  --color-brown-800: #44403C;
  --color-brown-900: #292524;
  --color-brown-950: #1C1917;
  --color-green-500: #22C55E;
  --color-green-600: #16A34A;
  --color-red-400: #F87171;
  --color-red-500: #EF4444;
  
  --bg-primary: var(--color-cream);
  --bg-secondary: var(--color-warm-white);
  --bg-card: white;
  --text-primary: var(--color-brown-950);
  --text-secondary: var(--color-brown-800);
  --text-muted: #78716C;
  --accent: var(--color-orange-500);
  --accent-dark: var(--color-orange-600);
  --accent-light: var(--color-orange-100);
  
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* App-specific */
  --header-height: 60px;
  --nav-height: 80px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- App Shell --- */
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-secondary);
  position: relative;
}

/* --- App Header --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--space-md);
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header__left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.app-logo {
  font-size: 1.5rem;
}

.app-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.app-header__action {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: background 0.2s;
}

.app-header__action:hover {
  background: var(--color-cream-dark);
}

/* --- App Main --- */
.app-main {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  padding-bottom: calc(var(--nav-height) + var(--space-md));
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: var(--space-xl);
}

.empty-state__icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.empty-state__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.empty-state__text {
  color: var(--text-muted);
  max-width: 250px;
}

/* --- Feed --- */
.feed-header {
  margin-bottom: var(--space-lg);
}

.feed-header__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.feed-header__filters {
  display: flex;
  gap: var(--space-sm);
}

.filter-chip {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: white;
  border: 1px solid var(--color-cream-dark);
  transition: all 0.2s;
}

.filter-chip--active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* --- Dish Card (Feed) --- */
.dish-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.dish-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dish-card:active {
  transform: scale(0.98);
}

.dish-card__image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--color-cream-dark);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dish-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-card__image--placeholder {
  font-size: 2rem;
}

.dish-card__content {
  flex: 1;
  min-width: 0;
}

.dish-card__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-card__restaurant {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.dish-card__rating {
  color: var(--color-orange-400);
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.dish-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dish-card__tags {
  display: flex;
  gap: 4px;
  margin-top: var(--space-xs);
  flex-wrap: wrap;
}

.dish-card__tag {
  font-size: 0.625rem;
  padding: 2px 6px;
  background: var(--color-cream-dark);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

/* --- Bottom Navigation --- */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--nav-height);
  padding-bottom: var(--safe-area-bottom);
  background: white;
  border-top: 1px solid rgba(0,0,0,0.05);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 500px;
  margin: 0 auto;
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.625rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item--active {
  color: var(--accent);
}

.nav-item--add {
  width: 56px;
  height: 56px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md), 0 0 0 4px rgba(249, 115, 22, 0.2);
  margin-top: -20px;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}

.nav-item--add:hover {
  transform: scale(1.05);
}

.nav-item--add:active {
  transform: scale(0.95);
}

.nav-item--add span {
  display: none;
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.is-active {
  opacity: 1;
  visibility: visible;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}

.modal__sheet {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease-out);
}

.modal.is-active .modal__sheet {
  transform: translateY(0);
}

.modal__sheet--full {
  max-height: 95vh;
}

.modal__handle {
  width: 36px;
  height: 4px;
  background: var(--color-cream-dark);
  border-radius: 2px;
  margin: var(--space-sm) auto;
  flex-shrink: 0;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--color-cream-dark);
  flex-shrink: 0;
}

.modal__close {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 500;
  padding: var(--space-sm);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.modal__save {
  padding: var(--space-sm) var(--space-md);
}

.modal__save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Dish Form --- */
.dish-form {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
  padding-bottom: calc(var(--space-xl) + var(--safe-area-bottom));
}

/* Photo Upload */
.photo-upload {
  margin-bottom: var(--space-lg);
}

.photo-upload__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.photo-upload__preview {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--color-cream-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}

.photo-upload__preview:hover {
  transform: scale(0.99);
}

.photo-upload__preview:active {
  transform: scale(0.97);
}

.photo-upload__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-muted);
}

.photo-upload__placeholder svg {
  opacity: 0.5;
}

.photo-upload__placeholder span {
  font-size: 0.875rem;
}

.photo-upload__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.photo-upload--has-image .photo-upload__placeholder {
  display: none;
}

.photo-upload--has-image .photo-upload__preview img {
  display: block;
}

/* Form Groups */
.form-group {
  margin-bottom: var(--space-lg);
  position: relative;
}

.form-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-label__icon {
  font-size: 1rem;
}

.form-label__optional {
  font-weight: 400;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  font-size: 1rem;
  border: 2px solid var(--color-cream-dark);
  border-radius: var(--radius-md);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input__action {
  position: absolute;
  right: var(--space-sm);
  top: calc(var(--space-lg) + var(--space-sm) + 8px);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.form-input__action:hover {
  background: var(--color-cream-dark);
  color: var(--accent);
}

.form-textarea {
  width: 100%;
  padding: var(--space-md);
  font-size: 1rem;
  border: 2px solid var(--color-cream-dark);
  border-radius: var(--radius-md);
  background: white;
  resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

/* Rating Select */
.rating-select {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.rating-star {
  font-size: 2rem;
  color: var(--color-cream-dark);
  transition: color 0.15s, transform 0.15s var(--ease-spring);
  padding: 4px;
}

.rating-star:hover {
  transform: scale(1.1);
}

.rating-star.is-active {
  color: var(--color-orange-400);
}

.rating-star.is-hovered {
  color: var(--color-orange-300);
}

.rating-label {
  margin-left: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Tag Select */
.tag-select {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag-chip {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  background: white;
  border: 2px solid var(--color-cream-dark);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.tag-chip:hover {
  border-color: var(--color-orange-200);
}

.tag-chip.is-active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Price Select */
.price-select {
  display: flex;
  gap: var(--space-sm);
}

.price-chip {
  flex: 1;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  background: white;
  border: 2px solid var(--color-cream-dark);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.price-chip:hover {
  border-color: var(--color-orange-200);
}

.price-chip.is-active {
  background: var(--color-green-500);
  border-color: var(--color-green-500);
  color: white;
}

/* --- Buttons (shared) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: var(--accent-dark);
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* --- Detail View --- */
.detail-view {
  padding: var(--space-md);
}

.detail-view__image {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--color-cream-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.detail-view__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-view__header {
  margin-bottom: var(--space-lg);
}

.detail-view__name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
}

.detail-view__restaurant {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.detail-view__rating {
  font-size: 1.25rem;
  color: var(--color-orange-400);
  letter-spacing: 2px;
}

.detail-view__section {
  margin-bottom: var(--space-lg);
}

.detail-view__section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.detail-view__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.detail-view__notes {
  color: var(--text-secondary);
  line-height: 1.6;
}

.detail-view__actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding-bottom: calc(var(--space-xl) + var(--safe-area-bottom));
}

.detail-view__actions .btn {
  flex: 1;
}

.btn--outline {
  background: white;
  border: 2px solid var(--color-cream-dark);
  color: var(--text-secondary);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--danger {
  background: var(--color-red-500);
  color: white;
}

.btn--danger:hover {
  background: var(--color-red-400);
}

/* --- Search Bar --- */
.search-bar {
  position: relative;
  margin-bottom: var(--space-md);
}

.search-bar__icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar__input {
  width: 100%;
  padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) * 2 + 20px);
  font-size: 1rem;
  border: 2px solid var(--color-cream-dark);
  border-radius: var(--radius-lg);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.search-bar__input::placeholder {
  color: var(--text-muted);
}

.search-bar__clear {
  position: absolute;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-cream-dark);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.search-bar__clear:hover {
  background: var(--color-orange-200);
  color: var(--accent-dark);
}

/* --- Filter Bar --- */
.filter-bar {
  margin-bottom: var(--space-md);
  margin-left: calc(var(--space-md) * -1);
  margin-right: calc(var(--space-md) * -1);
  padding: 0 var(--space-md);
}

.filter-bar__scroll {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-bar__scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip--dropdown {
  position: relative;
}

.filter-chip--dropdown::after {
  content: '';
}

/* --- Active Filters --- */
.active-filters {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-light);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.active-filters__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.active-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  flex: 1;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.active-filter__remove {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--color-cream-dark);
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.active-filter__remove:hover {
  background: var(--color-red-400);
  color: white;
}

.active-filters__clear {
  font-size: 0.75rem;
  color: var(--accent-dark);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  transition: background 0.2s;
}

.active-filters__clear:hover {
  background: rgba(255,255,255,0.5);
}

/* --- Stats Bar --- */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding: 0 var(--space-xs);
}

.stats-bar__count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stats-bar__sort {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.stats-bar__sort:hover {
  background: var(--color-cream-dark);
}

/* --- Filter Dropdowns --- */
.filter-dropdown {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 500px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-lg);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease-out);
}

.filter-dropdown.is-active {
  transform: translateY(0);
}

.filter-dropdown__header {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-cream-dark);
}

.filter-dropdown__option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-cream-dark);
}

.filter-dropdown__option:last-child {
  border-bottom: none;
}

.filter-dropdown__option input[type="checkbox"],
.filter-dropdown__option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

/* --- No Results --- */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.no-results__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.no-results__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.no-results__text {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* --- Dropdown Backdrop --- */
.dropdown-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.dropdown-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

/* --- Compare View --- */
.compare-view {
  padding-bottom: var(--space-xl);
}

.compare-header {
  margin-bottom: var(--space-xl);
}

.compare-header__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
}

.compare-header__subtitle {
  color: var(--text-muted);
}

/* Compare Search */
.compare-search {
  position: relative;
  margin-bottom: var(--space-xl);
}

.compare-search__input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-size: 1rem;
  border: 2px solid var(--color-cream-dark);
  border-radius: var(--radius-lg);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.compare-search__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.compare-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.compare-suggestions.is-active {
  display: block;
}

.compare-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--color-cream-dark);
}

.compare-suggestion:last-child {
  border-bottom: none;
}

.compare-suggestion:hover {
  background: var(--color-cream);
}

.compare-suggestion__name {
  font-weight: 500;
}

.compare-suggestion__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--color-cream-dark);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Compare Categories */
.compare-categories__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.compare-categories__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.category-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.category-card__emoji {
  font-size: 1.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-cream);
  border-radius: var(--radius-md);
}

.category-card__info {
  flex: 1;
  min-width: 0;
}

.category-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-card__count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Compare Results */
.compare-results__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.compare-results__back {
  color: var(--accent);
  font-weight: 500;
  padding: var(--space-xs) 0;
}

.compare-results__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  flex: 1;
}

.compare-results__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.compare-stat {
  text-align: center;
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-md);
}

.compare-stat__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.compare-stat__label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.compare-results__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Ranked Dish Card */
.ranked-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.ranked-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ranked-card--gold {
  border: 2px solid #FFD700;
  background: linear-gradient(135deg, #FFFBEB 0%, white 100%);
}

.ranked-card--silver {
  border: 2px solid #C0C0C0;
}

.ranked-card--bronze {
  border: 2px solid #CD7F32;
}

.ranked-card__rank {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.ranked-card--gold .ranked-card__rank {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.ranked-card--silver .ranked-card__rank {
  background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
}

.ranked-card--bronze .ranked-card__rank {
  background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
}

.ranked-card__image {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  background: var(--color-cream-dark);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ranked-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranked-card__content {
  flex: 1;
  min-width: 0;
}

.ranked-card__restaurant {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranked-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.ranked-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ranked-card__rating {
  color: var(--color-orange-400);
  font-size: 0.875rem;
}

.ranked-card__price {
  font-size: 0.75rem;
  color: var(--color-green-600);
  font-weight: 600;
}

/* Compare Empty */
.compare-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.compare-empty__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.compare-empty__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.compare-empty__text {
  color: var(--text-muted);
}

/* --- Profile View --- */
.profile-view {
  padding-bottom: var(--space-xl);
}

.profile-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg, var(--color-orange-400) 0%, var(--color-orange-600) 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.profile-avatar__emoji {
  font-size: 2.5rem;
}

.profile-header__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.profile-header__subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Profile Stats */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.profile-stat {
  text-align: center;
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-stat__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.profile-stat__label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Profile Sections */
.profile-section {
  margin-bottom: var(--space-xl);
}

.profile-section__title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

/* Taste DNA */
.taste-dna {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.dna-trait {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
}

.dna-trait__emoji {
  font-size: 1.25rem;
}

.dna-trait__label {
  font-weight: 500;
}

.dna-trait--primary {
  background: linear-gradient(135deg, var(--color-orange-50) 0%, var(--color-orange-100) 100%);
  border: 2px solid var(--color-orange-200);
}

/* Cuisine Bars */
.cuisine-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.cuisine-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.cuisine-bar__emoji {
  font-size: 1.5rem;
  width: 32px;
  text-align: center;
}

.cuisine-bar__info {
  flex: 1;
  min-width: 0;
}

.cuisine-bar__name {
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.cuisine-bar__track {
  height: 8px;
  background: var(--color-cream-dark);
  border-radius: 4px;
  overflow: hidden;
}

.cuisine-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-orange-400) 0%, var(--color-orange-500) 100%);
  border-radius: 4px;
  transition: width 0.5s var(--ease-out);
}

.cuisine-bar__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* Favorites List */
.favorites-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.favorite-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}

.favorite-item:hover {
  transform: translateX(4px);
}

.favorite-item__rank {
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-item:first-child .favorite-item__rank {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.favorite-item__info {
  flex: 1;
  min-width: 0;
}

.favorite-item__name {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favorite-item__restaurant {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.favorite-item__rating {
  color: var(--color-orange-400);
  font-size: 0.875rem;
}

/* Patterns Grid */
.patterns-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.pattern-card {
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.pattern-card__icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.pattern-card__value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.pattern-card__label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag-bubble {
  padding: var(--space-sm) var(--space-md);
  background: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.tag-bubble:hover {
  transform: scale(1.05);
}

.tag-bubble--large {
  font-size: 1rem;
  padding: var(--space-md) var(--space-lg);
  background: var(--accent-light);
  font-weight: 500;
}

.tag-bubble--medium {
  font-size: 0.9375rem;
}

/* Profile Actions */
.profile-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.profile-actions .btn {
  flex: 1;
}

/* Profile Empty */
.profile-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.profile-empty__icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.profile-empty__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.profile-empty__text {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}
