/* eResonate — rails.css · one framed sideways row (28 Sep 2026)
   ────────────────────────────────────────────────────────────────────────
   The row Explore and the Groups home got in their redesign, written once for
   the rest of the top bar: Livestream first, then Backstage, Creators and
   Games. Explore (.xp-railwrap) and the Groups home (.gh-railwrap) keep their
   own copies; this one matches them to the pixel.

   A section is .rl-rail: a head (.rl-head — a title and one line about it,
   with room on the right for a button) and a row (.rl-row) of upright cards.
   rails.js frames each row: ‹ › buttons where there is a pointer, shown only
   while there is more to see; soft edges on whichever side has more; cards
   that settle into place. A phone swipes the row instead.

   A row can set --rl-col (the card width) and --rl-btn-top (where the buttons
   sit, usually the middle of the card's picture).
   ──────────────────────────────────────────────────────────────────────── */
.rl-rail { margin-top: 34px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.rl-rail[hidden] { display: none; }

.rl-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 10px 20px; flex-wrap: wrap; margin-bottom: 14px;
}
.rl-head[hidden] { display: none; }
.rl-head h2 {
  font-family: 'Outfit', sans-serif; font-weight: 700;
  font-size: 1.35rem; letter-spacing: -.015em; margin: 0 0 3px; color: var(--text);
}
.rl-head p { margin: 0; color: var(--text-muted); font-size: .93rem; max-width: 64ch; }
.rl-head > div:first-child { flex: 1 1 320px; min-width: 0; }   /* the words take the room; the button keeps its line */
.rl-head .btn { flex: none; }

/* one framed row */
.rl-wrap { position: relative; }
.rl-row {
  display: grid; grid-template-columns: none; grid-auto-flow: column;
  grid-auto-columns: var(--rl-col, minmax(210px, 232px));
  gap: 12px; overflow-x: auto; padding: 4px 2px 10px; margin: 0; contain: inline-size;
  scroll-snap-type: x proximity; scroll-padding-inline: 58px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.rl-row[hidden] { display: none; }
.rl-row::-webkit-scrollbar { display: none; }
.rl-row > * { scroll-snap-align: start; min-width: 0; }
.rl-wrap.can-next .rl-row {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
}
.rl-wrap.can-prev .rl-row {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 56px);
          mask-image: linear-gradient(to right, transparent, #000 56px);
}
.rl-wrap.can-prev.can-next .rl-row {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent);
}
.rl-btn {
  position: absolute; top: var(--rl-btn-top, 28px); z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; padding: 0; cursor: pointer;
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform .12s, border-color .12s;
}
.rl-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rl-btn:hover, .rl-btn:focus-visible { border-color: var(--accent); color: var(--accent-text, var(--accent)); transform: scale(1.06); outline: none; }
.rl-btn.prev { left: -10px; }
.rl-btn.next { right: -10px; }
@media (hover: hover) and (pointer: fine) {
  .rl-wrap.can-prev .rl-btn.prev, .rl-wrap.can-next .rl-btn.next { display: flex; }
}

@media (max-width: 640px) {
  .rl-row { grid-auto-columns: var(--rl-col-phone, minmax(170px, 58vw)); scroll-padding-inline: 22px; }
  .rl-wrap.can-next .rl-row {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
  }
  .rl-wrap.can-prev .rl-row {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 26px);
            mask-image: linear-gradient(to right, transparent, #000 26px);
  }
  .rl-wrap.can-prev.can-next .rl-row {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 26px, #000 calc(100% - 26px), transparent);
            mask-image: linear-gradient(to right, transparent, #000 26px, #000 calc(100% - 26px), transparent);
  }
}
