/* DARK THEME TEST — Warm charcoal / Olive / Soft gold, 2026-10-28.
   Separate override: theme.css and theme-light-ivory.css remain intact.
   The six requested colors also cover equivalent legacy surface/text tokens
   so the app does not retain navy panels beside the new warm backgrounds.
   Each declaration records the exact baseline → test value. Artwork, media
   white/black, Scripture prose, functional states, layout and type are retained.
   Compare: python3 tools/compare_theme.py public/theme-dark-olive.css
*/
:root {
  /* Added decoration only; the requested page background stays #121311. */
  --preview-backdrop-graphic: #1E1C19; /* Warm charcoal circle; test changed #1B1C19 → #1E1C19. */
  /* Page backgrounds */
  --theme-page-background-rgb: 18, 19, 17; /* #080B11 → #121311 */
  --theme-base-background-rgb: 18, 19, 17; /* #050506 → #121311 */
  --theme-reader-background-rgb: 18, 19, 17; /* #0C1119 → #121311 */
  --theme-base-browse-page-bottom-nav-background-rgb: 18, 19, 17; /* #08080A → #121311 */
  /* Panels and sheets */
  --theme-panel-background-rgb: 29, 32, 28; /* #101722 → #1D201C */
  --theme-sheet-background-rgb: 29, 32, 28; /* #121923 → #1D201C */
  --theme-base-panel-rgb: 29, 32, 28; /* #111114 → #1D201C */
  --theme-base-player-panel-rgb: 29, 32, 28; /* #101012 → #1D201C */
  --theme-prayer-history-background-rgb: 29, 32, 28; /* #111923 → #1D201C */
  --theme-player-note-background-rgb: 29, 32, 28; /* #121C28 → #1D201C */
  --theme-routine-card-background-rgb: 29, 32, 28; /* #18212A → #1D201C */
  /* Raised controls */
  --theme-raised-surface-rgb: 42, 47, 40; /* #182231 → #2A2F28 */
  --theme-menu-background-rgb: 42, 47, 40; /* #1B2633 → #2A2F28 */
  --theme-input-background-rgb: 42, 47, 40; /* #1A222C → #2A2F28 */
  --theme-control-gradient-start-rgb: 42, 47, 40; /* #283341 → #2A2F28 */
  --theme-base-surface-rgb: 42, 47, 40; /* #1A1A1F → #2A2F28 */
  --theme-base-button-background-rgb: 42, 47, 40; /* #202025 → #2A2F28 */
  --theme-base-input-background-rgb: 42, 47, 40; /* #1B1B20 → #2A2F28 */
  --theme-base-panel-button-rgb: 42, 47, 40; /* #25252A → #2A2F28 */
  --theme-player-note-input-rgb: 42, 47, 40; /* #1B2635 → #2A2F28 */
  --theme-chapter-button-background-rgb: 42, 47, 40; /* #253341 → #2A2F28 */
  --theme-verse-action-background-rgb: 53, 58, 50; /* #253243 → #353A32; distinct verse-action tiles. */
  --theme-toast-background-rgb: 42, 47, 40; /* #263342 → #2A2F28 */
  --theme-card-placeholder-rgb: 42, 47, 40; /* #172331 → #2A2F28 */
  --theme-base-vote-background-rgb: 42, 47, 40; /* #17171B → #2A2F28 */
  --theme-base-social-secondary-background-rgb: 42, 47, 40; /* #1C1C21 → #2A2F28 */
  /* Main interface text */
  --theme-text-primary-rgb: 243, 237, 227; /* #F7F7F8 → #F3EDE3 */
  --theme-text-strong-rgb: 243, 237, 227; /* #FFFFFF → #F3EDE3 */
  --theme-language-option-text-rgb: 243, 237, 227; /* #E5E7E8 → #F3EDE3 */
  --theme-chapter-close-text-rgb: 243, 237, 227; /* #D8D9D9 → #F3EDE3 */
  --theme-book-title-rgb: 243, 237, 227; /* #C8C5CD → #F3EDE3 */
  /* Soft gold */
  --theme-accent-gold-soft-rgb: 223, 197, 149; /* #E8C89F → #DFC595 */
  --theme-navigation-active-rgb: 223, 197, 149; /* #F4D9AF → #DFC595 */
  /* Secondary interface text */
  --theme-text-secondary-rgb: 181, 183, 174; /* #AEB5B7 → #B5B7AE */
  --theme-text-muted-rgb: 181, 183, 174; /* #8F8F98 → #B5B7AE */
  --theme-profile-text-muted-rgb: 181, 183, 174; /* #9BA5B2 → #B5B7AE */
  --theme-tab-inactive-rgb: 181, 183, 174; /* #9299A3 → #B5B7AE */
  --theme-navigation-desktop-rgb: 181, 183, 174; /* #8C8C95 → #B5B7AE */
  --theme-navigation-mobile-rgb: 181, 183, 174; /* #62626A → #B5B7AE */
  --theme-note-timestamp-rgb: 181, 183, 174; /* #97A0AA → #B5B7AE */
  --theme-reader-footer-rgb: 181, 183, 174; /* #A3AAB2 → #B5B7AE */
  --theme-artifact-caption-rgb: 181, 183, 174; /* #AEB5BF → #B5B7AE */
  --theme-history-text-rgb: 181, 183, 174; /* #A9ADB3 → #B5B7AE */
  --theme-episode-reference-muted-rgb: 181, 183, 174; /* #A6ABB4 → #B5B7AE */
}

/* Match the light-theme circle geometry, fixed position and header slice exactly.
   Only its color differs; other tabs and playback remain undecorated. */
/* Fixed decoration uses its own layer rather than background-attachment: fixed
   (unreliable on iOS). Width-based sizes stay stable as mobile toolbars move.
   The opaque sticky header paints the same viewport-aligned slice of the circle.
   Isolation contains the negative layer without changing fixed positioning. */
body.videos-page .videos-catalogue {
  --preview-graphic-radius: clamp(200px, 55.814vw, 240px);
  --preview-graphic-x: clamp(70px, 20.931vw, 90px);
  --preview-graphic-y: 112px;
  --preview-graphic-left: 0px;
  --preview-graphic-height: calc(var(--preview-graphic-radius) + var(--preview-graphic-y) + 1px);
  --preview-graphic-image: radial-gradient(circle var(--preview-graphic-radius) at var(--preview-graphic-x) var(--preview-graphic-y),
    var(--preview-backdrop-graphic) calc(100% - 1px), transparent 100%);
  position: relative;
  isolation: isolate;
  background-image: none;
}
body.videos-page .videos-catalogue::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0 0 auto var(--preview-graphic-left);
  height: var(--preview-graphic-height);
  pointer-events: none;
  background-image: var(--preview-graphic-image);
  background-repeat: no-repeat;
}
body.videos-page .videos-heading.social-header {
  background-color: var(--theme-page-background);
  background-image: var(--preview-graphic-image);
  background-repeat: no-repeat;
  background-size: 100% var(--preview-graphic-height);
  background-position: left top;
}
@media (min-width: 680px) {
  body.videos-page .videos-catalogue {
    --preview-graphic-radius: clamp(260px, 23.612vw, 340px);
    --preview-graphic-x: clamp(180px, 18.056vw, 260px);
    --preview-graphic-y: 165px;
    --preview-graphic-left: 188px; /* Match the existing desktop sidebar. */
  }
}

