.sr9z9 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: start;
}
.sr9z9-c {
  position: relative;
  display: block;
  align-self: start;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-brand-100);
  box-shadow: var(--shadow-sm);
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sr9z9-c:hover { transform: translateY(-2px); }
.sr9z9-c img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.sr9z9-c .sr9z9-f {
  display: block;
  width: 100%;
  height: 100%;
}
.sr9z9-cw {
  grid-column: span 2;
  grid-row: span 1;
  aspect-ratio: 2 / 1;
}
.sr9z9-ch {
  grid-column: span 1;
  grid-row: span 2;
  aspect-ratio: 1 / 2;
}
.sr9z9-cb {
  grid-column: span 2;
  grid-row: span 2;
}
@media (min-width: 480px) {
  .sr9z9 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .sr9z9 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; }
}
@media (min-width: 768px) {
  .sr9z9 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sr9z9-c:hover { transform: none; }
}
/* Home strip: one desktop row of uniform wide cells. Declared after the grid
   rules above so it overrides their column counts and cell aspect. */
.sr9z9-s { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sr9z9-s .sr9z9-c { aspect-ratio: 5 / 2; grid-column: span 1; grid-row: span 1; }
@media (min-width: 640px) {
  .sr9z9-s { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .sr9z9-s { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* Phones: a swipeable slider of 2x2 pages. Column flow puts cells 1-4 on the
   first page; the last page snaps to the scroll end, so four banners are always
   in view. static/js/home-strip.js adds the 5 s autoplay. */
@media (max-width: 767px) {
  .sr9z9-s {
    grid-template-columns: none;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 0.5rem) / 2);
    gap: 0.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .sr9z9-s::-webkit-scrollbar { display: none; }
  .sr9z9-s .sr9z9-c:nth-child(4n + 1) { scroll-snap-align: start; scroll-snap-stop: always; }
}
/* Stack: one full-width column (drawer menu slot). Last, so it overrides every
   column count and span above. */
.sr9z9-o { grid-template-columns: minmax(0, 1fr); padding: 0.75rem 1.15rem 1rem; }
.sr9z9-o .sr9z9-c { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 2 / 1; }
/* Band: slim 4:1 cells, one per row on phones, 2 then 4 in a row wider
   (footer slot). Last, so it overrides every column count and span above. */
.sr9z9-r { grid-template-columns: minmax(0, 1fr); }
.sr9z9-r .sr9z9-c { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 1; }
@media (min-width: 768px) {
  .sr9z9-r { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .sr9z9-r { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
