:root {
  --food-ink: var(--ink);
  --food-muted: var(--muted);
}

.page-food {
  position: relative;
}

.page-food::before {
  content: none;
}

.page-food.food-ready .content-card {
  animation: weekly-rise 0.7s ease both;
}

.page-food .hero {
  margin-bottom: 34px;
}

/* Remove the outer gradient "card" wrapper so the chart reads cleaner. */
.page-food .content-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.page-food .content-card:hover {
  transform: none;
  box-shadow: none;
}

.page-food .food-item {
  box-shadow: 0 18px 60px rgba(23, 19, 16, 0.10);
}

.page-food .food-list {
  margin-top: 0;
  gap: 10px;
}

.page-food .food-bars {
  margin-top: 6px;
  gap: 10px;
}

.page-food #FoodSubtitle .caution {
  margin-left: 10px;
  vertical-align: middle;
  white-space: nowrap;
}

.page-food #FoodSubtitle .caution-trigger {
  width: 24px;
  height: 24px;
  font-size: 13px;
}

.page-food .food-head {
  justify-content: flex-end;
}

/* Bars: text-only labels, tight alignment, % label hugs the bar end. */
.page-food .bar-row {
  grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
  gap: 3px;
}

.page-food .bar-label {
  justify-content: flex-end;
  text-align: right;
  gap: 0;
}

.page-food .bar-label::before {
  content: none;
  display: none;
}

.page-food .bar-value {
  position: absolute;
  top: 50%;
  left: 0;
  right: auto;
  transform: translate(0%, -50%);
  white-space: nowrap;
  text-shadow: none;
  pointer-events: none;
}

@media (max-width: 640px) {
  /* Mobile: label above bar, with tighter padding/margins. */
  .page-food .food-item {
    padding: 12px 12px 10px;
  }

  .page-food .food-bars {
    gap: 22px;
  }

  .page-food .bar-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .page-food .bar-track {
    height: 28px;
    border-radius: 10px;
  }

  .page-food .bar-fill {
    border-radius: 10px;
  }

  .page-food .bar-label {
    font-size: 0.84rem;
    justify-content: flex-start;
    text-align: left;
  }

  .page-food .bar-value {
    font-size: 0.84rem;
  }
}

.page-food #FoodResult:empty::before {
  content: "Pick a food using the search bar above.";
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(225, 214, 203, 0.95);
  color: rgba(31, 26, 23, 0.72);
  background: rgba(255, 255, 255, 0.55);
}
