:root {
  --bg: #060606;
  --surface: rgba(24, 24, 27, 0.85);
  --glass: rgba(12, 12, 14, 0.72);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --paper: #f0e9dc;
  --gold: #d4b872;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  --transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --chrome-fade: opacity 0.4s ease, transform 0.4s ease;
  --stage-padding: clamp(1rem, 2.8vw, 2rem);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow: hidden;
}

.reel-app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
}

/* Header */
.reel-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(0.85rem, 2vw, 1.35rem) clamp(1rem, 2.8vw, 2rem);
  background: linear-gradient(180deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.38) 54%, transparent 100%);
  pointer-events: none;
  transition: var(--chrome-fade);
}

.masthead {
  padding-bottom: 0.55rem;
  padding-right: clamp(1rem, 4vw, 3rem);
  border-bottom: 3px double rgba(240, 233, 220, 0.28);
}

.masthead-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

.masthead h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3.4vw, 2.35rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.05;
  color: var(--paper);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}

.reel-subtitle {
  margin: 0.4rem 0 0;
  font-size: clamp(0.65rem, 1.3vw, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* Share bar — tool-level (masthead) positioning only; the bar styles itself. */
.masthead-share {
  margin-top: 0.7rem;
  pointer-events: auto;
}

/* Month scrubber */
.month-scrubber {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 55vw;
  padding-top: 0.2rem;
  pointer-events: auto;
}

.scrubber-month {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.scrubber-month:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.scrubber-month.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

/* Stage */
.reel-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 18%, rgba(82, 82, 91, 0.28), transparent 36%), var(--bg);
  isolation: isolate;
}

.stage-backdrop {
  position: absolute;
  inset: -5%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.stage-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(34px) saturate(1.15) brightness(0.44);
  opacity: 0.58;
  transform: scale(1.08);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.stage-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.74), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.74)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.54), transparent 28%, rgba(0, 0, 0, 0.68));
}

.slide-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
  will-change: opacity, transform;
}

.slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

/* Directional entrance — the incoming slide drifts in from the travel direction */
.slide.active.enter-next {
  animation: slideInNext 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.slide.active.enter-prev {
  animation: slideInPrev 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInNext {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideInPrev {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.slide-image-wrapper {
  position: relative;
  width: min(calc(100vw - 2rem), 78vh);
  height: min(calc(100vh - 6rem), 78vh);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--stage-padding);
}

.slide-image-wrapper img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.8s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.slide.active .slide-image-wrapper img {
  animation: kenBurns 8s ease-in-out infinite alternate;
}

/* Subtle Ken Burns — keeps text/panels readable */
@keyframes kenBurns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  100% {
    transform: scale(1.02) translate(-0.5%, -0.3%);
  }
}

.slide-info {
  position: absolute;
  bottom: clamp(1rem, 4.5vw, 3rem);
  left: clamp(1rem, 2.8vw, 2rem);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0.7rem 1rem 0.7rem 0.9rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0.5rem;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  max-width: calc(100% - 3rem);
  transition: border-color 0.2s, var(--chrome-fade);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.slide-info:hover {
  border-color: rgba(56, 189, 248, 0.5);
  border-left-color: var(--gold);
}

.slide-date {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  font-weight: 700;
  color: var(--paper);
}

.slide-counter {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

/* Dateline text fades up on each slide change */
.slide-info.flash .slide-date,
.slide-info.flash .slide-counter {
  animation: fadeUp 0.5s ease both;
}

.slide-info.flash .slide-counter {
  animation-delay: 0.08s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Ring mode */
.reel-stage.ring-mode {
  cursor: grab;
}

.reel-stage.ring-mode.dragging {
  cursor: grabbing;
}

.reel-stage.ring-mode .stage-backdrop img {
  filter: blur(38px) saturate(1.22) brightness(0.36);
  opacity: 0.72;
}

.reel-stage.ring-mode .slide-container {
  perspective: 1200px;
  transform-style: preserve-3d;
}

.reel-stage.ring-mode .slide {
  opacity: var(--ring-opacity, 0.45);
  filter: brightness(var(--ring-brightness, 0.58)) saturate(var(--ring-saturation, 0.9));
  pointer-events: auto;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.reel-stage.ring-mode .slide.active {
  opacity: 1;
  filter: brightness(1) saturate(1.05);
}

.reel-stage.ring-mode .slide-image-wrapper {
  width: clamp(240px, 33vw, 450px);
  height: clamp(330px, 50vw, 620px);
  aspect-ratio: auto;
  padding: 0;
}

.reel-stage.ring-mode .slide-image-wrapper img {
  border-radius: 0.45rem;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.76);
  -webkit-user-drag: none;
  user-select: none;
  backface-visibility: hidden;
}

.reel-stage.ring-mode .slide.active .slide-image-wrapper img {
  animation: none;
  outline: 2px solid rgba(56, 189, 248, 0.62);
  outline-offset: 4px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.85), 0 0 44px rgba(56, 189, 248, 0.16);
}

/* Navigation buttons */
.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.2s, var(--chrome-fade);
  opacity: 0.7;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.nav-button:active {
  transform: translateY(-50%) scale(0.95);
}

.nav-button svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: currentColor;
}

.nav-prev {
  left: 1rem;
}

.nav-next {
  right: 1rem;
}

/* Floating pill toolbar */
.reel-toolbar {
  position: absolute;
  left: 50%;
  bottom: clamp(1rem, 3vh, 1.5rem);
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: var(--chrome-fade);
}

.toolbar-divider {
  width: 1px;
  height: 1.4rem;
  background: var(--border);
  margin: 0 0.2rem;
}

.control-button {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.control-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-hover);
}

.control-button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.control-button svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

/* Play button with progress ring */
.play-button {
  width: 3rem;
  height: 3rem;
}

.progress-ring {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

.progress-ring circle {
  fill: none;
  stroke-width: 2.5;
}

.ring-track {
  stroke: rgba(255, 255, 255, 0.12);
}

.ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 131.95;
  stroke-dashoffset: 131.95;
  transform: rotate(-90deg);
  transform-origin: center;
}

.icon-play,
.icon-pause {
  display: none;
}

.reel-toolbar[data-state="playing"] .icon-pause,
.reel-toolbar[data-state="paused"] .icon-play {
  display: block;
}

/* Speed pill */
.speed-pill {
  width: auto;
  min-width: 2.9rem;
  padding: 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.speed-pill:hover {
  color: var(--accent-hover);
}

/* Auto-hide chrome */
.reel-app.chrome-hidden {
  cursor: none;
}

.reel-app.chrome-hidden .reel-header,
.reel-app.chrome-hidden .reel-toolbar,
.reel-app.chrome-hidden .nav-button,
.reel-app.chrome-hidden .slide-info {
  opacity: 0;
  pointer-events: none;
}

.reel-app.chrome-hidden .reel-header {
  transform: translateY(-8px);
}

.reel-app.chrome-hidden .reel-toolbar {
  transform: translateX(-50%) translateY(8px);
}

/* Archive overlay */
.archive-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(6, 6, 6, 0.92);
  backdrop-filter: blur(22px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255, 255, 255, 0.1);
}

.archive-overlay[hidden] {
  display: none;
}

.archive-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(6, 6, 6, 0.96) 60%, rgba(6, 6, 6, 0.7));
  backdrop-filter: blur(14px);
}

.archive-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.archive-title h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--paper);
}

.archive-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.archive-header .control-button {
  border-color: var(--border);
}

.archive-months {
  padding: 0 clamp(1rem, 3vw, 2rem) 2rem;
}

.archive-month-title {
  margin: 1.5rem 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.archive-thumb {
  display: block;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
  text-align: center;
}

.archive-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.archive-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

.archive-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.archive-thumb-date {
  display: block;
  padding: 0.35rem 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.archive-thumb.monthly .archive-thumb-date {
  color: #fbbf24;
  font-weight: 700;
}

/* Calendar popover */
.calendar-popover {
  position: absolute;
  left: clamp(1rem, 2.8vw, 2rem);
  bottom: calc(clamp(1rem, 4.5vw, 3rem) + 5.6rem);
  z-index: 30;
  width: min(19rem, calc(100vw - 2rem));
  padding: 0.85rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.calendar-popover[hidden] {
  display: none;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.calendar-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--paper);
}

.calendar-nav {
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.calendar-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-hover);
}

.calendar-nav:disabled {
  opacity: 0.25;
  cursor: default;
  background: transparent;
  color: var(--text);
}

.calendar-nav svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.2rem;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.2rem 0;
}

.calendar-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.calendar-day:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
}

.calendar-day.empty {
  visibility: hidden;
}

.calendar-day:disabled {
  color: rgba(161, 161, 170, 0.4);
  cursor: default;
  background: transparent;
  border-color: transparent;
}

.calendar-day.current {
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}

.calendar-recap {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.45rem;
  border: 1px solid rgba(212, 184, 114, 0.4);
  border-radius: 0.45rem;
  background: rgba(212, 184, 114, 0.1);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.2s;
}

.calendar-recap:hover {
  background: rgba(212, 184, 114, 0.22);
}

.calendar-recap[hidden] {
  display: none;
}

/* Toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: clamp(4.5rem, 9vh, 6rem);
  transform: translateX(-50%) translateY(6px);
  z-index: 45;
  padding: 0.5rem 1rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  font-size: 0.8rem;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Zoom lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 4, 5, 0.94);
  backdrop-filter: blur(10px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  touch-action: none;
}

.lightbox-stage.zoomed {
  cursor: grab;
}

.lightbox-stage.panning {
  cursor: grabbing;
}

.lightbox-stage img {
  max-width: 94%;
  max-height: 94%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 80ms ease-out;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: var(--glass);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}

/* Per-collage share bar — top-left of the zoom view (close button is top-right). */
.lightbox-share {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  pointer-events: auto;
}

.lightbox-hint {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.4rem 0.9rem;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 0.72rem;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap;
}

/* The main collage invites a zoom */
.slide.active .slide-image-wrapper img {
  cursor: zoom-in;
}

.reel-stage.ring-mode .slide:not(.active) .slide-image-wrapper img {
  cursor: inherit;
}
/* Front card on the wheel is clickable → blow up in the lightbox */
.reel-stage.ring-mode .slide.active .slide-image-wrapper img {
  cursor: zoom-in;
}

/* Explicit "view larger" button — only shown on the front card in ring mode. */
.reel-stage.ring-mode .slide-image-wrapper { position: relative; }
.ring-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 12, 18, 0.72);
  color: #fff;
  cursor: zoom-in;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  transition: background 0.15s, transform 0.12s;
}
.ring-zoom:hover { background: rgba(22, 26, 38, 0.92); transform: scale(1.07); }
.reel-stage.ring-mode .slide.active .ring-zoom { display: inline-flex; }

/* Loading state */
.reel-stage::before {
  content: "Loading…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1rem;
  z-index: 1;
  pointer-events: none;
}

.reel-stage:has(.slide)::before,
.reel-stage.loaded::before {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .reel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }

  .masthead {
    padding-bottom: 0.4rem;
    padding-right: 0;
  }

  .masthead-kicker {
    display: none;
  }

  /* The masthead share bar overlays the collage and crowds the month scrubber on
     phones. Hide it here — the persistent bottom toolbar's share button (and the
     lightbox's per-collage share) still cover sharing. */
  .masthead-share {
    display: none;
  }

  .month-scrubber {
    max-width: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -1rem;
    padding: 0.2rem 1rem 0.35rem;
  }

  .slide-info {
    bottom: 5rem;
    left: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
  }

  .nav-button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .nav-prev {
    left: 0.5rem;
  }

  .nav-next {
    right: 0.5rem;
  }

  .slide-image-wrapper {
    width: min(calc(100vw - 1rem), 72vh);
    height: min(calc(100vh - 10rem), 72vh);
    padding: 0.75rem;
  }

  .reel-stage.ring-mode .slide-image-wrapper {
    width: clamp(188px, 52vw, 275px);
    height: clamp(252px, 70vw, 376px);
  }

  .archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
  }

  .calendar-popover {
    bottom: 10rem;
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .reel-toolbar {
    gap: 0.2rem;
    padding: 0.35rem 0.45rem;
  }

  .control-button {
    width: 2.25rem;
    height: 2.25rem;
  }

  .play-button {
    width: 2.6rem;
    height: 2.6rem;
  }

  .speed-pill {
    min-width: 2.5rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }

  .lightbox-hint {
    display: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slide.active .slide-image-wrapper img {
    animation: none;
  }

  .slide,
  .slide.active.enter-next,
  .slide.active.enter-prev,
  .slide-info.flash .slide-date,
  .slide-info.flash .slide-counter {
    transition: none;
    animation: none;
  }

  .stage-backdrop img {
    transition: none;
  }

  .reel-header,
  .reel-toolbar,
  .nav-button,
  .slide-info {
    transition: none;
  }
}

/* ---- Section switcher (Daily Reel | Weekly Briefings) ------------------- */
/* Pinned top-right, always visible — kept OUTSIDE .reel-header so it survives
   the chrome auto-hide. Mirrors the Newsroom bar's switcher so every surface
   (this standalone page, the briefings page, and the Newsroom shell) shows the
   same top-right switcher. Hidden when embedded (the shell bar covers it). */
.cross-switch {
  position: fixed;
  top: clamp(0.6rem, 1.6vw, 1.1rem);
  right: clamp(0.6rem, 1.6vw, 1.25rem);
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(240, 233, 220, 0.2);
  border-radius: 999px;
  background: rgba(6, 6, 6, 0.78);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.7);
}
.cross-switch[hidden] { display: none; }
.cross-seg {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted, #a1a1aa);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.cross-seg svg { width: 14px; height: 14px; }
.cross-seg:not(.is-active):hover { color: var(--paper, #f4f4f5); background: rgba(255, 255, 255, 0.06); }
.cross-seg.is-active {
  color: var(--paper, #f4f4f5);
  background: color-mix(in srgb, var(--accent, #38bdf8) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, #38bdf8) 45%, transparent);
  cursor: default;
}
.cross-seg.is-active svg { color: var(--accent, #38bdf8); }

/* When the chrome is visible, the month scrubber shares the top edge — reserve
   room on its right so its month pills never slide under the pinned switcher. */
.reel-header .month-scrubber { padding-right: 15rem; }
@media (max-width: 720px) {
  .cross-seg span { display: none; }        /* icon-only on narrow screens */
  .cross-seg { padding: 0.4rem 0.5rem; }
  .reel-header .month-scrubber { padding-right: 5.5rem; }
}
