/* Header/media stay in place; only the reflection text scrolls. */
.story-panel .story-panel-inner {
  display: flex; flex-direction: column; min-height: 0; height: 100%;
  max-height: 100vh; max-height: 100dvh; overflow: hidden !important;
}
.story-panel .story-panel-close { flex: 0 0 auto; align-self: flex-end; float: none; position: relative; top: auto; }
.story-panel .story-panel-header { flex: 0 0 auto; padding: 0 1.25rem .75rem; max-height: 62vh; max-height: 62dvh; overflow-y: auto; }
.story-panel .story-panel-body { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 1.25rem 1.5rem; }
#story-video-player, #reflection-video { display: block; width: 100%; max-height: 34vh !important; max-height: 34dvh !important; object-fit: contain; background: #000; }
.reflection-panel-container { display: flex; flex-direction: column; min-height: 0; height: calc(100vh - 32px); height: calc(100dvh - 32px); overflow: hidden !important; }
.reflection-panel-inner { display: flex; flex-direction: column; min-height: 0; height: 100%; width: 100%; }
.reflection-panel-close { flex: 0 0 auto; }
.reflection-panel-header { flex: 0 0 auto; max-height: 62vh; max-height: 62dvh; overflow-y: auto; }
.reflection-panel-body { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 1rem; }
@media(max-height:500px) { #story-video-player, #reflection-video { max-height: 27vh !important; max-height: 27dvh !important; } .story-panel .story-panel-header, .reflection-panel-header { max-height: 60vh; max-height: 60dvh; } }

/* Compact, aligned controls shared by both reflection viewers. */
.reflection-viewer-toolbar { display:flex; flex:0 0 auto; align-items:center; justify-content:flex-end; gap:.8rem; flex-wrap:wrap; padding:.65rem 1.25rem; }
.story-panel .reflection-viewer-toolbar .story-panel-close, .reflection-viewer-toolbar .reflection-panel-close { position:static; float:none; margin:0; width:auto; min-width:0; min-height:32px; padding:.35rem .7rem; font:600 .8rem/1.2 system-ui,sans-serif; border-radius:999px; }
.reflection-playback-choice { display:inline-flex; align-items:center; gap:.4rem; font:500 .8rem/1.2 system-ui,sans-serif; color:#e5cca0; }
.reflection-playback-choice select { font:inherit; color:#f1d69d; background:#15202d; border:1px solid #786a50; border-radius:999px; padding:.35rem .6rem; }
.story-panel-label, .reflection-panel-label { display:inline-flex; align-items:center; vertical-align:middle; padding:.35rem .7rem; margin:0 .65rem .65rem 0; border:1px solid rgba(231,211,167,.35); border-radius:999px; color:#ddc49a; text-transform:uppercase; letter-spacing:.1em; font:600 .72rem/1.2 system-ui,sans-serif; }
#audio-toggle, #reflection-audio-toggle { vertical-align:middle; margin:0 0 .65rem; }
.reflection-playback-choice[hidden] { display:none; }
