/* ═══════════════════════════════════════════════════════════════
   LAZY RIVER — page-specific styles
   v0.1 — sits on top of styles.css + chrome.css + room.css
   Re-uses .room-header, .room-body, .room-feature, .room-chat from room.css.
   ═══════════════════════════════════════════════════════════════ */

body.ls-page-river .room-feature {
  position: relative;
  overflow: hidden;
  background: #0a1418;       /* deep water before three.js boots */
  padding: 0;                /* canvas is full-bleed */
  display: flex;
  flex-direction: column;
}

#river-canvas {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 320px;
  outline: none;
  touch-action: none;        /* avoid mobile drag-scroll while using the raft */
  background: linear-gradient(180deg, #1a3242 0%, #0a1418 100%);
}

/* ─── In-3D overlay ─────────────────────────────────────────── */
.river-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;      /* children opt back in */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}

.river-zone-banner {
  pointer-events: auto;
  align-self: flex-start;
  margin: 12px;
  padding: 10px 14px;
  background: rgba(20, 12, 18, 0.78);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: min(400px, calc(100vw - 24px));
  box-sizing: border-box;
  animation: river-zone-fade 220ms ease-out;
}
.river-zone-icon { font-size: 1.6rem; line-height: 1; }
.river-zone-banner .eyebrow { margin: 0 0 2px 0; font-size: 10px; letter-spacing: .12em; }
.river-zone-banner strong { display: block; font-size: 1rem; }
.river-zone-banner .muted { display: block; font-size: 12px; }
@keyframes river-zone-fade {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.river-moment-card {
  pointer-events: auto;
  align-self: flex-start;
  width: min(360px, calc(100vw - 24px));
  margin: 0 12px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid rgba(140, 240, 200, .24);
  background:
    linear-gradient(135deg, rgba(20, 14, 28, .88), rgba(9, 24, 29, .78)),
    rgba(10, 12, 18, .82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: river-zone-fade 220ms ease-out;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
.river-moment-card[hidden] { display: none; }
.river-moment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.river-moment-card .eyebrow { margin: 0; }
.river-moment-card strong {
  font-size: 1.05rem;
  line-height: 1.25;
}
.river-moment-card span { line-height: 1.35; }
.river-moment-stamp {
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 215, 130, .14);
  border: 1px solid rgba(255, 215, 130, .24);
  color: #ffd782;
  font-size: .72rem;
  font-weight: 800;
}
.river-moment-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.river-moment-actions button { min-width: 0; }
.river-passport-strip {
  pointer-events: none;
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(420px, calc(100vw - 24px));
  z-index: 3;
}
.river-passport-strip span {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(12, 14, 20, .68);
  color: rgba(255,255,255,.78);
  font-size: .72rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.river-passport-strip strong {
  color: #8cf0c8;
  font-weight: 900;
}
.river-stamp-toast {
  position: absolute;
  left: 50%;
  top: 26%;
  transform: translateX(-50%);
  z-index: 12;
  pointer-events: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 12, 18, .86);
  border: 1px solid rgba(140, 240, 200, .42);
  color: #8cf0c8;
  font-weight: 900;
  box-shadow: 0 16px 42px rgba(0,0,0,.45);
  animation: river-stamp-toast 1.25s ease forwards;
}
@keyframes river-stamp-toast {
  0% { opacity: 0; transform: translate(-50%, 18px) scale(.9); }
  20% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(1.04); }
}

/* ─── Viewfinder (stays present; brightens when a target is in range) ─── */
.river-viewfinder {
  position: absolute;
  left: 50%; top: 50%;
  width: 220px; height: 220px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.35;
  transition: opacity 200ms ease;
}
.river-viewfinder.active { opacity: 0.95; }
.rvf-svg { width: 100%; height: 100%; }
.rvf-corner {
  fill: none;
  stroke: rgb(255 230 180);
  stroke-width: 2;
  stroke-linecap: round;
}
.rvf-cross {
  fill: none;
  stroke: rgb(255 230 180);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.7;
}
.river-viewfinder.active .rvf-corner,
.river-viewfinder.active .rvf-cross {
  stroke: rgb(140 240 200);
}
.rvf-hint {
  position: absolute;
  bottom: -24px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ─── Capture button (bottom-center, never bottom-corner) ─── */
.river-controls {
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding-bottom: 18px;
  padding-top: 12px;
}
.river-btn {
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  min-height: 56px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 120ms ease, box-shadow 200ms ease;
}
.river-btn:active { transform: scale(0.97); }
.river-btn-photo {
  background: linear-gradient(135deg, #ff9f5a, #f06070);
  color: #1a0a0e;
  box-shadow: 0 4px 18px rgba(240,96,112,0.45);
}
.river-btn-photo .rb-ic { font-size: 1.2rem; }
.river-btn-photo:hover { box-shadow: 0 6px 24px rgba(240,96,112,0.6); }
.river-btn-photo.flash { animation: river-photo-flash 240ms ease-out; }
.river-emote-rail {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,.34);
  border: 1px solid rgba(255,255,255,.16);
}
.river-emote-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  cursor: pointer;
  font-size: 18px;
}
.river-emote-float {
  position: absolute;
  left: 50%;
  bottom: 38%;
  transform: translateX(-50%);
  pointer-events: none;
  font-size: clamp(28px, 4vw, 52px);
  text-shadow: 0 8px 28px rgba(0,0,0,.55);
  animation: river-emote-rise 1.7s ease-out forwards;
  z-index: 9;
}
@keyframes river-emote-rise {
  0% { opacity: 0; transform: translate(-50%, 20px) scale(.7); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -90px) scale(1.18); }
}
@keyframes river-photo-flash {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.8); }
  100% { box-shadow: 0 0 0 24px rgba(255,255,255,0); }
}

/* Brief full-canvas white flash when a photo is captured */
.shutter-flash::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.6);
  z-index: 10;
  pointer-events: none;
  animation: river-shutter 220ms ease-out;
}
@keyframes river-shutter {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* ─── Branch-vote overlay ─── */
.river-branch-overlay {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 18, 0.55);
  backdrop-filter: blur(2px);
  z-index: 5;
}
.river-branch-overlay[hidden] { display: none; }
.rb-card {
  background: rgba(20, 12, 18, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 22px;
  max-width: 540px;
  width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.rb-card h2 { margin: 4px 0 10px 0; font-size: 1.4rem; }
.rb-choices {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}
.rb-choice {
  flex: 1 1 0;
  min-width: 140px;
  min-height: 80px;
  border: 2px solid rgba(255,255,255,0.18);
  background: rgba(40, 30, 36, 0.6);
  color: inherit;
  font-family: inherit;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  transition: border-color 120ms, background 120ms;
}
.rb-choice:hover { background: rgba(80, 60, 70, 0.6); }
.rb-choice.voted { border-color: rgb(140, 240, 200); background: rgba(40, 90, 70, 0.6); }
.rbc-ic { font-size: 1.6rem; line-height: 1; }
.rbc-lbl { font-weight: 600; }
.rbc-tally {
  font-size: 12px;
  opacity: 0.7;
  background: rgba(255,255,255,0.08);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ─── LS-Tool tabs strip below the canvas ─── */
.river-ls-tools {
  flex: 0 0 auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(10, 8, 12, 0.85);
  padding: 8px 12px 12px;
  z-index: 3;
  position: relative;
  max-height: 38vh;
  overflow-y: auto;
}
.river-ls-tools .ls-tools-strip {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.river-ls-tools .ls-tab {
  border: 0;
  background: rgba(255,255,255,0.05);
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.river-ls-tools .ls-tab.active { background: rgba(140, 240, 200, 0.18); }
.river-ls-tools .ls-tab-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  font-size: 11px;
}
.river-ls-tools .ls-pane { display: none; }
.river-ls-tools .ls-pane.active { display: block; }

/* Photos list */
.river-photos { list-style: none; padding: 0; margin: 0; }
.river-photos-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.river-photos li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 4px;
  font-size: 13px;
}
.river-photos li .rp-icon { font-size: 1.2rem; }
.river-photos li .rp-by { font-weight: 600; }
.river-photos li .rp-zone { opacity: 0.7; font-size: 11px; }
.river-photos li .rp-time { margin-left: auto; opacity: 0.5; font-size: 11px; }
.river-photos li .rp-remove {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 2px 6px;
}
.river-photos li .rp-remove:hover { color: #f06070; }
.river-photos.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.river-photos.gallery li {
  display: grid;
  min-height: 108px;
  align-content: end;
  background:
    radial-gradient(circle at 50% 20%, rgba(120,220,255,.20), transparent 42%),
    rgba(255,255,255,.06);
}
.river-photos.gallery li .rp-icon { font-size: 2rem; }
.river-photos.gallery li .rp-time { margin-left: 0; }

/* Branches log */
.river-branches { list-style: none; padding: 0; margin: 0; }
.river-branches li {
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  margin-bottom: 4px;
  font-size: 13px;
}
.river-branches li.locked { background: rgba(80, 200, 140, 0.12); }

/* Zones list (debug-y but useful) */
.river-zone-list { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.river-zone-list li {
  padding: 4px 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.river-zone-list li .rz-t { opacity: 0.5; font-family: monospace; }
.river-zone-list li.visited { color: rgb(140 240 200); }
.river-zone-list li.current { font-weight: 600; background: rgba(255, 230, 180, 0.08); border-radius: 6px; }
.river-moments-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.river-moments-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  font-size: .82rem;
}
.river-moments-list .rm-ic { font-size: 1.1rem; }
.river-moments-list .rm-title { font-weight: 800; }
.river-moments-list .rm-kind {
  color: rgba(255,255,255,.55);
  font-size: .72rem;
}
.river-moments-list .rm-time {
  color: rgba(255,255,255,.45);
  font-size: .72rem;
  white-space: nowrap;
}

/* ─── Header tweaks ─── */
body.ls-page-river .room-header { background: rgba(10, 14, 18, 0.85); }
#river-photo-pill { background: rgba(255, 159, 90, 0.18); border-color: rgba(255, 159, 90, 0.4); }
#river-progress {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── VR MODE OVERRIDES ─── */
body.vr-mode .rvf-corner,
body.vr-mode .rvf-cross { stroke-width: 4; }
body.vr-mode .river-viewfinder { width: 280px; height: 280px; }
body.vr-mode .rvf-hint { font-size: 16px; bottom: -32px; }

body.vr-mode .river-btn-photo {
  min-height: 72px;
  padding: 18px 30px;
  font-size: 16px;
}
body.vr-mode .river-btn-photo .rb-ic { font-size: 1.6rem; }

body.vr-mode .rb-choice {
  min-height: 110px;
  font-size: 22px;
  padding: 18px;
}
body.vr-mode .rbc-ic { font-size: 2.2rem; }

body.vr-mode .river-zone-banner { padding: 14px 18px; }
body.vr-mode .river-zone-banner strong { font-size: 1.2rem; }
body.vr-mode .river-zone-banner .muted { font-size: 14px; }

body.vr-mode .river-ls-tools .ls-tab { font-size: 16px; padding: 12px 18px; }
body.vr-mode .river-photos li { font-size: 16px; padding: 10px 12px; }

/* ─── Mobile narrow: stack chat below the canvas ─── */
@media (max-width: 720px) {
  body.ls-page-river .room-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  body.ls-page-river .room-chat {
    max-height: 40vh;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .river-ls-tools { max-height: 32vh; }
  .river-zone-banner {
    padding: 8px 10px;
    gap: 8px;
  }
  .river-zone-icon { font-size: 1.1rem; }
  .river-zone-banner strong { font-size: .9rem; }
  .river-zone-banner .muted { display: none; }
  .river-moment-card {
    width: min(340px, calc(100vw - 24px));
    max-height: 190px;
    overflow: auto;
    margin-top: 4px;
    padding: 10px 12px;
    gap: 6px;
  }
  .river-moment-card strong { font-size: .94rem; }
  .river-moment-card span { font-size: .78rem; }
  #river-moment-copy {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .river-passport-strip {
    top: auto;
    right: 8px;
    bottom: 72px;
    max-width: calc(100vw - 16px);
  }
  .river-passport-strip span { font-size: .66rem; padding: 4px 7px; }
  .river-controls {
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding-bottom: 8px;
  }
  .river-btn { min-height: 46px; padding: 10px 16px; }
  .river-moment-actions { grid-template-columns: 1fr 1fr; }
  .river-moment-actions button { min-height: 38px; padding: 8px 10px; }
  .river-emote-rail { display: none; }
}


/* 2026-05-06 — Phase 18 step 2: River POV picker (Follow / First / Side /
   Bird's eye / Cinema). Mounted by river.js into .river-controls. */
.river-pov-picker {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin: 0 6px;
  flex-wrap: wrap;
}
.river-pov-picker .rpv-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.78);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.river-pov-picker .rpv-chip:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.river-pov-picker .rpv-chip.is-active {
  background: rgba(255, 215, 130, .22);
  color: #ffd782;
  border-color: rgba(255, 215, 130, .55);
}
@media (max-width: 540px){
  .river-pov-picker .rpv-chip { padding: 4px 8px; font-size: .62rem; }
}
