/* Recipe grid, recipe cards, star display and the empty state. */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column; gap: 8px;
  border-left-width: 5px;
  border-left-style: solid;
}
.card:hover { border-color: var(--ink-faint); }
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  margin: 0;
  line-height: 1.25;
}
.card .phase-dots { display: flex; align-items: center; gap: 6px; }
.card .phase-dots span {
  width: 9px; height: 9px; border-radius: 50%;
}
.card .phase-dots .phase-name {
  width: auto; height: auto; border-radius: 0;
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
}
.card .meta {
  font-size: 12.5px; color: var(--ink-faint);
}
.card .tags {
  font-size: 12.5px; color: var(--ink-soft);
}
.card .rating-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-soft);
  margin-top: auto;
  padding-top: 6px;
}
.stars { color: var(--phase-remission); letter-spacing: 1px; font-size: 14px; }
.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  color: var(--ink-soft);
}
.empty-state .big { font-family: var(--serif); font-size: 20px; color: var(--ink); margin-bottom: 6px; }

/* Recipe photo: full-bleed across the top of the card. */
.card { overflow: hidden; }
.card .card-photo {
  display: block;
  width: calc(100% + 32px);
  margin: -16px -16px 2px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-sunk);
}

/* Home screen shelves: a heading row, then cards scrolling sideways. The
   track bleeds into the .app side padding so cards run to the screen edge
   on a phone, while the first card still lines up with the content. */
.recipes { margin-top: 22px; }
.recipes > .grid { margin-top: 0; }
.shelf + .shelf { margin-top: 26px; }
.shelf-head {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 10px;
}
.shelf-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  margin: 0;
}
.shelf-count { font-size: 13px; color: var(--ink-faint); }
.shelf-more { margin-left: auto; }
.shelf-track {
  display: flex; gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 20px;
  margin: 0 -20px;
  padding: 2px 20px 8px;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.shelf-track > .card {
  flex: 0 0 260px;
  scroll-snap-align: start;
}
@media (max-width: 520px) {
  .shelf-track > .card { flex-basis: 78%; }
}
