/* Photo river reel (.rr-). Owned by river.js. */
.rr {
  --rr-gap: 6px;
  --rr-w: 0;
  overflow: hidden; background: #07070a;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}

/* The river: three columns, each a track of repeated sets moved with translate3d. */
.rr-stage {
  position: absolute; inset: 0; z-index: 1;
  display: flex; gap: var(--rr-gap); padding: 0 var(--rr-gap);
  touch-action: pan-y; cursor: pointer; outline: none;
  transform-origin: 50% 50%;
  transition: filter 500ms var(--ease-out);
}
.rr-stage:focus-visible { box-shadow: inset 0 0 0 3px #fff; }
.rr.is-warp .rr-stage {
  transform: scale(calc(1 + var(--rr-w) * 0.07), calc(1 + var(--rr-w) * 0.16));
  filter: blur(calc(var(--rr-w) * 1.6px)) saturate(calc(1 + var(--rr-w) * 0.45)) brightness(calc(1 + var(--rr-w) * 0.08));
  transition: none;
}
.rr-col { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; }
.rr-track, .rr-set { display: flex; flex-direction: column; gap: var(--rr-gap); }
.rr-track { will-change: transform; }
.rr-item {
  position: relative; flex: none;
  aspect-ratio: var(--ar, 1);
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #1c1c24, #121218);
  transition: opacity 250ms, transform 250ms var(--ease-out);
}
.rr-img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  -webkit-user-drag: none; pointer-events: none;
  opacity: 0; transition: opacity 400ms;
}
.rr-img[src] { opacity: 1; }
.rr-item.is-out { opacity: 0; transform: scale(0.92); }

/* Overlays: legibility shade, warp vignette, title, hint. */
.rr-shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 18%),
    linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 30%);
}
.rr-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 75% 60% at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.85) 100%);
  opacity: var(--rr-w);
}
.rr-title {
  position: absolute; z-index: 3; top: var(--g-safe-top, 64px); left: 16px; right: var(--g-safe-right, 64px);
  margin: 0 auto; width: fit-content; max-width: calc(100% - 16px - var(--g-safe-right, 64px));
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 600 15px/1.3 var(--font-serif); font-style: italic; color: #fff; text-align: center;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); pointer-events: none;
  transition: opacity 300ms;
}
.rr.is-caught .rr-title { opacity: 0; }
.rr-hint {
  position: absolute; z-index: 3; left: 16px; right: var(--g-safe-right, 64px);
  bottom: calc(var(--g-safe-bottom, 92px) + 36px);
  width: fit-content; max-width: calc(100% - 16px - var(--g-safe-right, 64px));
  margin: 0 auto; display: flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 10px; border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 700; line-height: 1.25; color: #fff;
  pointer-events: none;
  transition: opacity 400ms, transform 400ms var(--ease-out);
}
.rr-hint.is-gone { opacity: 0; transform: translateY(10px); }
.rr-hint-dot { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; }
.rr-hint-dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #fff;
  animation: rr-press 1.6s ease-in-out infinite;
}
@keyframes rr-press { 0%, 100% { transform: scale(0.45); opacity: 0.55; } 40%, 70% { transform: scale(1); opacity: 1; } }

/* Caught photo: the river dims and the card floats in the middle. */
.rr-dim {
  position: absolute; inset: 0; z-index: 4;
  background: rgba(5, 5, 10, 0.6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; cursor: pointer;
  transition: opacity 350ms var(--ease-out);
}
.rr.is-caught .rr-dim { opacity: 1; pointer-events: auto; }
.rr-card {
  position: absolute; z-index: 5; margin: 0;
  border-radius: 18px; overflow: hidden; background: #111;
  transform-origin: 0 0; transform: rotate(-1.5deg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.92);
  cursor: pointer; will-change: transform;
}
.rr-card-img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }

.rr-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--g-muted, #aaa); }

@media (prefers-reduced-motion: reduce) {
  .rr-stage, .rr-item, .rr-hint, .rr-dim { transition: none; }
  .rr-hint-dot::after { animation: none; transform: none; opacity: 1; }
}
