.feed-strip {
  margin: 0 0 1.25rem;
}
.feed-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.feed-strip-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.feed-note {
  color: var(--text-muted, #667);
  font-size: 0.9rem;
}
.feed-more {
  margin-left: auto;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  box-sizing: border-box;
  text-decoration: none;
}
/* Right side of the heading row: "Change" then "Show all" (J-092). */
.feed-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem 1rem;
}
.feed-actions .feed-more {
  margin-left: 0;
}
.feed-change {
  font-size: 0.9rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.feed-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.feed-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.feed-card img {
  display: block;
  width: 100%;
  /* the width/height attributes are only a ratio hint: without height:auto the 180px
     attribute beat aspect-ratio and cropped every poster to 4:3 (J-077, J-112) */
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  /* light placeholder + play glyph (defined in video.css) while a poster loads or fails */
  background: var(--thumb-bg, var(--bg-surface-alt, #e8eef6));
  border-radius: 6px;
}
.feed-card-body {
  display: block;
}
.feed-title {
  display: block;
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* two-line minimum so views lines share a baseline across a row (J-111); not the --list variant */
.feed-card:not(.feed-card--list) .feed-title { min-height: 2.6em; }
.feed-card--list .feed-title { display: block; -webkit-line-clamp: unset; overflow: visible; }
.feed-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--text-muted, #667);
}
.feed-prompt {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
}
.feed-prompt-skip {
  margin-top: 0.5rem;
}
.feed-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

/* Library / home strip on a phone (D-2, J-012): a two-column grid capped at six cards, so no card
   is ever cut by the page edge and there is nothing to swipe. Heading row: title left, Change and
   Show all right, the note on its own line under them. Applies to the app shell too (same width). */
@media (max-width: 640px) {
  .feed-row:not(.feed-row--list) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 0.6rem;
    overflow: visible;
  }
  .feed-row:not(.feed-row--list) .feed-card {
    min-width: 0;
  }
  .feed-row:not(.feed-row--list) .feed-card:nth-child(n + 7) {
    display: none;
  }
  .feed-row:not(.feed-row--list) .feed-title {
    font-size: 0.9rem;
  }
  .feed-strip-head {
    align-items: center;
  }
  .feed-strip-head h2 {
    order: 1;
  }
  .feed-actions {
    order: 2;
  }
  .feed-note {
    order: 3;
    flex: 0 0 100%;
  }
  .feed-more {
    margin-left: 0;
    min-height: 44px;
  }
  .feed-change {
    min-height: 44px;
  }
}

/* Show all page (/modules/video/foryou): vertical pick list */
.feed-strip--list {
  margin-top: 0.5rem;
}
.feed-row--list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
  scroll-snap-type: none;
  padding-bottom: 0;
}
.feed-card--list {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  flex: none;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border, #dde3ec);
  scroll-snap-align: none;
}
.feed-card--list:first-child {
  padding-top: 0.25rem;
}
.feed-card--list img {
  width: 148px;
  flex: 0 0 148px;
  max-width: 42%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 6px;
}
.feed-card--list .feed-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  padding-top: 0.1rem;
}
.feed-card--list .feed-title {
  margin-top: 0;
  font-size: 1rem;
  line-height: 1.35;
}
.feed-card--list .feed-meta {
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

/* App shell + narrow phone: larger tap rows, slightly smaller thumb */
@media (max-width: 800px) {
  .feed-card--list {
    padding: 0.75rem 0;
    gap: 0.7rem;
  }
  .feed-card--list img {
    width: 132px;
    flex-basis: 132px;
  }
  .feed-card--list .feed-title {
    font-size: 0.98rem;
  }
}

body.app-shell .feed-row--list {
  display: flex;
  flex-direction: column;
}
body.app-shell .feed-card--list {
  padding: 0.8rem 0;
  min-height: 72px;
}
body.app-shell .feed-card--list img {
  width: 128px;
  flex-basis: 128px;
}
body.app-shell .feed-card--list .feed-title {
  font-size: 1rem;
}

/* Wide desktop Show all: still a single-column list (easy to scan) */
@media (min-width: 901px) {
  .feed-card--list img {
    width: 200px;
    flex-basis: 200px;
    max-width: none;
  }
  .feed-card--list .feed-title {
    font-size: 1.05rem;
  }
}
