    body { 
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
      /* iPhone + Android safe area support */
      padding-left: env(safe-area-inset-left);
      padding-right: env(safe-area-inset-right);
      padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* ── Global theme wiring ── */
    body { background: var(--bg); color: var(--text); transition: background 0.25s, color 0.25s; }

    .modern-card {
      background-color: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 20px;
    }

    /* Base .movie-card box model lives here; transition/hover/animation are consolidated
       in one place below (search "CONSOLIDATED movie-card") to avoid scattered overrides. */
    .movie-card {
      border: 1px solid var(--border);
      overflow: hidden;
      background: var(--card-bg2);
    }
    .rec-card {
      border-color: #7f1d1d;
      padding: 10px;
    }

    .section-header {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: #71717a;
    }

    .search-input {
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      font-size: 16px; /* Prevents iOS zoom on focus */
    }
    .search-input:focus {
      border-color: rgb(99, 102, 241);
      box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
    }

    .quick-chip {
      transition: all 0.1s ease;
      font-weight: 500;
      min-height: 40px;
      display: inline-flex;
      align-items: center;
    }
    .quick-chip:active {
      transform: scale(0.95);
    }

    /* Chatbot quick replies polish */
    #curator-quick-replies button {
      padding: 2px 8px;
      font-size: 9px;
      border-radius: 9999px;
      background: #111113;
      border-color: #3f3f46;
      color: #a1a1aa;
      transition: all 0.1s ease;
    }
    #curator-quick-replies button:hover {
      background: #27272a;
      color: #fff;
      border-color: #52525b;
    }

    .accordion-header {
      transition: background-color 0.1s ease;
    }
    .accordion-header:hover {
      background-color: #27272a;
    }

    /* Better touch behavior for iPhone + Android */
    button, .quick-chip, summary {
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      -webkit-user-select: none;
    }

    /* Prevent pull-to-refresh on some browsers */
    .no-pull-refresh {
      overscroll-behavior: contain;
    }

    /* ── Keyboard accessibility: visible focus ring for every interactive element ──
       Several elements set outline-none / outline:none for mouse-click polish; this
       restores a clear indicator specifically for keyboard navigation (:focus-visible
       only fires for keyboard/programmatic focus, not mouse clicks, so it doesn't
       reintroduce the "ring on every click" look that prompted outline-none originally). */
    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible,
    summary:focus-visible,
    [tabindex]:focus-visible {
      outline: 2px solid rgba(var(--accent), 0.9) !important;
      outline-offset: 2px !important;
      border-radius: inherit;
    }

    /* ── Theme variables ── */
    :root {
      --accent: 99, 102, 241;
      --bg:        #09090b;
      --bg2:       #111113;
      --bg3:       #18181b;
      --bg4:       #27272a;
      --border:    #3f3f46;
      --border2:   #27272a;
      --text:      #fafafa;
      --text2:     #e4e4e7;
      --text3:     #a1a1aa;
      --text4:     #71717a;
      --card-bg:   #18181b;
      --card-bg2:  linear-gradient(145deg,#18181b,#111113);
      --nav-bg:    rgba(9,9,11,0.92);
      --input-bg:  #09090b;
      --chip-bg:   #111113;
      --chip-border: #3f3f46;
      --lib-bg:    #111113;
      --lib-border: #27272a;
      --modal-bg:  #18181b;
      --curator-bg: #18181b;
      --curator-user-bg: #27272a;
      --skeleton:  #27272a;
      --skeleton2: #3f3f46;
    }
    html.light {
      --bg:        #f5f0ea;
      --bg2:       #fdf8f2;
      --bg3:       #f9f4ed;
      --bg4:       #ede5d8;
      --border:    #d6c9b8;
      --border2:   #e8ddd0;
      --text:      #1c120a;
      --text2:     #2c1a0e;
      --text3:     #6b4c2a;
      --text4:     #9a7a55;
      --card-bg:   #fdf8f2;
      --card-bg2:  linear-gradient(145deg,#fdf8f2,#f5f0ea);
      --nav-bg:    rgba(253,248,242,0.95);
      --input-bg:  #fffaf4;
      --chip-bg:   #f5f0ea;
      --chip-border: #d6c9b8;
      --lib-bg:    #fdf8f2;
      --lib-border: #e8ddd0;
      --modal-bg:  #fdf8f2;
      --curator-bg: #fdf8f2;
      --curator-user-bg: #ede5d8;
      --skeleton:  #ede5d8;
      --skeleton2: #d6c9b8;
    }

    /* Cool blue-violet highlights around availability "tables" with smooth animations */
    .provider-table {
      border: 1px solid rgba(var(--accent), 0.25);
      box-shadow: 0 0 0 1px rgba(var(--accent), 0.08);
      transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .provider-table:hover {
      border-color: rgba(var(--accent), 0.5);
      box-shadow: 0 0 0 1px rgba(var(--accent), 0.22);
    }

    /* Animated blue-violet treatment for Streaming sections */
    .provider-table.streaming {
      border-color: rgba(var(--accent), 0.38);
      background: linear-gradient(150deg, rgba(var(--accent), 0.04), transparent);
    }
    .provider-table.streaming:hover {
      border-color: rgba(var(--accent), 0.6);
      box-shadow: 0 0 0 1px rgba(var(--accent), 0.32),
                  0 0 12px rgba(var(--accent), 0.18);
    }

    /* Subtle animated glow on streaming tables (single pulse on hover, not a continuous loop) */
    .provider-table.streaming:hover {
      animation: streaming-glow 0.6s ease-in-out 1;
    }

    @keyframes streaming-glow {
      0%, 100% {
        box-shadow: 0 0 0 1px rgba(var(--accent), 0.32),
                    0 0 12px rgba(var(--accent), 0.18);
      }
      50% {
        box-shadow: 0 0 0 1px rgba(var(--accent), 0.42),
                    0 0 22px rgba(var(--accent), 0.28);
      }
    }

    /* CONSOLIDATED movie-card: transition/animation/padding for the base state.
       Hover styling (transform + final box-shadow/border-color) lives in the single
       .movie-card:hover rule further down — search "red glow on hover" — so there is
       only one rule winning at runtime instead of several !important overrides stacked
       across the file. */
    .movie-card {
      transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                  box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                  border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
      animation: card-enter 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
      padding: 1.25rem; /* slightly more breathing room */
      overflow: hidden;
    }

    @keyframes card-enter {
      from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    /* Blue-violet accent on active filter chips - with pop animation */
    .filter-chip-active {
      background-color: rgba(var(--accent), 0.92);
      border-color: rgb(var(--accent));
      color: white;
      font-weight: 600;
      transform: scale(1.02);
      transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), 
                  background-color 0.2s ease,
                  border-color 0.2s ease;
    }
    .filter-chip-active:active {
      transform: scale(0.98);
    }

    /* Horror Roki accents: blood-red for nightmares, danger, watched actions */
    .horror-accent {
      color: #f87171;
    }
    .btn-nightmare {
      background-color: #991b1b;
      color: white;
    }
    .btn-nightmare:hover { background-color: #b91c1c; }
    .btn-nightmare:active { background-color: #7f1d1d; }

    /* .mood-chip styles removed (mood filter buttons removed from recommendations) */

    .library-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      background: #111113;
      border: 1px solid #27272a;
      border-radius: 12px;
      overflow: hidden;
    }

    .curator-msg {
      background: linear-gradient(135deg, #18181b, #141218);
      border: 1px solid rgba(147,51,234,0.18);
      padding: 11px 14px;
      border-radius: 18px;
      margin-bottom: 5px;
      max-width: 84%;
      box-shadow: 0 2px 12px rgba(0,0,0,0.3);
      opacity: 0;
      transform: translateY(6px);
      animation: curator-msg-in 0.22s ease forwards;
      position: relative;
      font-size: 14px;
      line-height: 1.55;
    }
    .curator-msg.user {
      background: linear-gradient(135deg, #1f1b2e, #1a1525);
      margin-left: auto;
      border-color: rgba(147,51,234,0.32);
      max-width: 75%;
      font-size: 14px;
    }
    .curator-msg .curator-avatar {
      vertical-align: middle;
      margin-right: 4px;
    }
    .curator-msg:not(.user)::before {
      content: '';
      position: absolute;
      left: -1px;
      top: 10px;
      width: 3px;
      height: 18px;
      background: linear-gradient(#b91c1c, #7f1d1d);
      border-radius: 2px;
    }
    @keyframes curator-msg-in {
      to { opacity: 1; transform: translateY(0); }
    }
    .curator-typing {
      font-style: italic;
      opacity: 0.7;
      padding: 6px 12px;
    }
    .curator-avatar {
      width: 22px; height: 22px;
      border-radius: 999px;
      background: linear-gradient(145deg, #7f1d1d, #450a0a);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      margin-right: 6px;
      flex-shrink: 0;
    }
    /* Better distinction: Curator messages have a subtle left accent */
    .curator-msg:not(.user) {
      border-left: 3px solid #b91c1c;
      padding-left: 10px;
    }

    /* Swipe gesture visual feedback for library items on mobile */
    .library-item {
      transition: transform 0.2s ease, background 0.2s ease;
      touch-action: pan-y;
    }

    /* Poster loading states */
    .poster-wrap {
      position: relative;
      background: #27272a;
      border-radius: 8px;
      overflow: hidden;
    }
    .poster-wrap img {
      transition: opacity 0.3s ease;
    }
    .poster-wrap.loading::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, #27272a 25%, #3f3f46 50%, #27272a 75%);
      background-size: 200% 100%;
      animation: poster-shimmer 1.2s infinite;
    }
    @keyframes poster-shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    .library-item.swiping {
      transition: none;
    }

    .suggested-card {
      background: #111113;
      border: 1px solid #3f3f46;
      border-radius: 14px;
      padding: 8px 10px;
      margin-top: 8px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }

    .personal-tab {
      padding: 7px 12px;
      font-size: 13px;
      border-bottom: 3px solid transparent;
      color: #a1a1aa;
      white-space: nowrap;
      transition: all 0.1s ease;
      background: #18181b;
      border-radius: 8px 8px 0 0;
      margin-right: 2px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .personal-tab:hover {
      color: #fff;
      background: #27272a;
    }
    .personal-tab.active {
      color: #fff;
      border-bottom-color: #b91c1c;
      font-weight: 600;
      background: #111113;
    }
    /* Count badge pill inside tab buttons */
    .personal-tab span[id$="-count"] {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      font-weight: 700;
      min-width: 18px;
      height: 15px;
      padding: 0 5px;
      border-radius: 9999px;
      background: rgba(255,255,255,0.06);
      color: #52525b;
      line-height: 1;
      border: 1px solid rgba(255,255,255,0.07);
      letter-spacing: 0.02em;
    }
    .personal-tab.active {
      background: linear-gradient(135deg, rgba(185,28,28,0.75), rgba(99,102,241,0.65)) !important;
      color: #fff !important;
      border-color: rgba(185,28,28,0.6) !important;
      box-shadow: 0 0 0 1px rgba(185,28,28,0.4), 0 2px 8px rgba(185,28,28,0.25) !important;
      font-weight: 700 !important;
    }
    .personal-tab.active span[id$="-count"] {
      background: rgba(255,255,255,0.18);
      color: #fff;
      border-color: rgba(255,255,255,0.15);
    }

    .personal-pane {
      min-height: 140px;
      background: #111113;
      border: 1px solid #3f3f46;
      border-radius: 0 8px 8px 8px;
      padding: 12px;
      margin-top: -1px; /* seamless with tab bar */
    }

    /* Larger fonts for readability on live site - easier on the eyes */
    body {
      font-size: 17px;
      line-height: 1.45;
    }
    .library-item,
    .curator-msg,
    #curator-input,
    .suggested-card {
      font-size: 16px;
    }
    .text-xs {
      font-size: 14px !important;
    }
    .text-sm {
      font-size: 15px !important;
    }
    .text-[10px], .text-[11px], .text-[9px] {
      font-size: 13px !important;
    }
    .text-[13px] {
      font-size: 16px !important;
    }
    input, button, .movie-card {
      font-size: 16px;
    }
    /* Top section larger fonts */
    .top-header h1 {
      font-size: 3.75rem;
    }
    .top-header p {
      font-size: 16px;
    }

    /* Filter collapse chevrons are mobile-only; hidden on desktop where filters always show */
    .filter-chevron { display: none; }
    .recs-filter-chevron { display: none; }

    /* Mobile friendliness: tighten for phones (iPhone SE, Android small screens) - but keep fonts larger for eyes */
    @media (max-width: 640px) {
      .max-w-screen-2xl { max-width: 100%; }

      /* Hide redundant nav tab links on mobile — tab bar below handles navigation */
      #nav-foryou, #nav-curator, #nav-browse, #nav-watched { display: none !important; }

      /* Browse filter: stack rating + decade vertically */
      #rating-decade-row { grid-template-columns: 1fr !important; }

      /* Browse filter: collapse genre/rating/decade chips behind the FILTER header
         on mobile so they don't add clutter. Tap "Filter" to expand. */
      .filter-chevron { display: inline-block !important; transition: transform 0.2s ease; }
      #section-discover.filters-collapsed #filter-body { display: none !important; }
      #section-discover.filters-collapsed .filter-chevron { transform: rotate(-90deg); }

      /* Recs action row (Refresh Pool / More Recs / Surprise Me / Found Footage /
         Recompute): these are primary actions, not secondary filter chips, so on
         mobile let them wrap onto multiple lines instead of horizontal-scrolling —
         a hard mid-word cutoff at the screen edge with no scroll affordance read as
         a layout bug ("Surp…" with the rest of the row invisible and undiscoverable). */
      .recs-header-row { flex-wrap: wrap; row-gap: 8px; }
      .recs-header-row .recs-chip-scroll {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        flex-basis: 100%;
      }

      /* For You recs: collapse the genre filter chips behind a "Genre" toggle on
         mobile so they don't take a big block above the recommendations. */
      .recs-filter-toggle { display: inline-flex !important; }
      .recs-filter-chevron { display: inline-block !important; transition: transform 0.2s ease; }
      #recs-filter-wrap.recs-filter-collapsed #recs-genre-chips { display: none !important; }
      #recs-filter-wrap.recs-filter-collapsed .recs-filter-chevron { transform: rotate(-90deg); }

      /* Curator: use more of the screen for the chat on mobile */
      #curator-chat-full { max-height: calc(100vh - 110px) !important; }
      /* Slimmer header so the chat starts higher; keep the mood tag on one line */
      #curator-chat-full > div:first-child { padding: 9px 12px !important; gap: 9px !important; }
      #curator-chat-full > div:first-child > span:first-child { width: 30px !important; height: 30px !important; font-size: 15px !important; }
      #curator-mood { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }

      /* QUICK PROMPTS deck stays collapsed by default (toggle controls it). When
         opened (JS sets display:grid) render it as a horizontal-scroll pill row
         so it stays a single compact line instead of a tall 2x2 block. */
      .curator-prompt-deck[style*="grid"] {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 6px !important;
        padding: 8px 10px !important;
        scrollbar-width: none;
      }
      .curator-prompt-deck::-webkit-scrollbar { display: none; }
      .curator-prompt-card {
        flex: 0 0 auto !important;
        min-height: 0 !important;
        padding: 7px 13px !important;
        border-radius: 9999px !important;
      }
      .curator-prompt-card .prompt-copy { display: none !important; }
      .curator-prompt-card .prompt-title { margin-bottom: 0 !important; font-size: 12px !important; }

      /* Browse results: single column, horizontal card layout */
      #results { grid-template-columns: 1fr !important; gap: 12px !important; }
      .movie-card-v2 { padding: 12px !important; }
      .movie-card-v2 > div { flex-direction: row !important; gap: 12px !important; align-items: flex-start !important; }
      .movie-card-v2 img { width: 104px !important; height: 156px !important; flex-shrink: 0 !important; }
      /* The poster's wrapper div (added for the library-status badge overlay) is
         w-full below the sm breakpoint by design for the stacked mobile layout —
         but this block forces the row layout instead, so without this override the
         wrapper stays full-width and squeezes the text column (title/badges/action
         buttons) down to 0 width. */
      .movie-card-v2 .search-card-poster { width: 104px !important; flex-shrink: 0 !important; }
      .movie-card-v2 .font-semibold { font-size: 14px !important; }
      .movie-card-v2 .flex-1 { padding-top: 0 !important; }
      /* Compact action buttons so all 4 fit on one row beside the poster */
      .movie-card-v2 .mt-2.flex button {
        font-size: 11px !important;
        padding: 5px 9px !important;
        border-radius: 10px !important;
      }

      /* Tab bar: shrink font so "My Library" fits without clipping */
      .main-tab-btn { font-size: 11px !important; padding: 8px 6px !important; gap: 3px !important; }
      .tab-icon { font-size: 13px !important; }

      /* Library grid: single column on mobile so cards have full width */
      #to-watch-content, #watched-content, #disliked-content {
        grid-template-columns: 1fr !important;
      }

      /* Shrink gap between main tab bar and content so library fills more screen */
      .main-tab-bar { margin-bottom: 8px !important; }

      /* When Library tab is active, hide the main tab bar entirely — nav is in the sticky header */
      body.library-open .main-tab-bar { display: none !important; }

      /* Hide stats bar in library — count info is already on the tab labels */
      #personal-stats { display: none !important; }

      /* Recs header — hide subtitle blurb, tighten padding */
      .recs-section-header + div { display: none !important; }
      #panel-foryou .mb-4 > .flex.items-center.justify-between { margin-bottom: 6px !important; padding: 0 2px !important; }

      /* Remove the card-box look from the library container — edge to edge feel */
      #personal-content {
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        border-radius: 0 !important;
      }

      /* Header */
      .top-header h1 { font-size: 2.5rem !important; letter-spacing: -1.5px; }
      .top-header p { font-size: 14px !important; }
      
      /* Tabs - more compact scrollable */
      .personal-tab {
        padding: 5px 9px !important;
        font-size: 13px !important;
        margin-right: 1px;
      }
      .personal-pane { padding: 6px; min-height: 130px; }

      /* Aggressively eliminate gap: the toggle is now a tiny ▾ symbol in the bar (no wrapping, no "sits below"), lists content starts immediately under the bar */
      #personal-tabs-bar {
        padding: 2px 3px !important;
      }
      #personal-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
      }
      .personal-pane {
        padding: 1px 2px !important;
        min-height: 60px !important;
      }
      .personal-pane > div {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
      }
      #to-watch-content, #watched-content, #disliked-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        padding: 0 !important;
        margin-top: 0 !important;
        border: none !important;
        max-height: none !important;
        overflow: visible !important;
      }
      #to-watch-content .library-item,
      #watched-content .library-item,
      #disliked-content .library-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 8px 10px !important;
        font-size: 14px !important;
      }
      #to-watch-content .poster-wrap,
      #watched-content .poster-wrap,
      #disliked-content .poster-wrap,
      #to-watch-content .library-item > div[class*="w-"],
      #watched-content .library-item > div[class*="w-"],
      #disliked-content .library-item > div[class*="w-"] {
        width: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        height: 90px !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
        border-radius: 8px !important;
      }
      #to-watch-content .poster-wrap img,
      #watched-content .poster-wrap img,
      #disliked-content .poster-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
      }
      #to-watch-content .library-item button,
      #watched-content .library-item button,
      #disliked-content .library-item button {
        min-height: 0 !important;
        font-size: 12px !important;
        padding: 3px 8px !important;
      }

      /* Tiny compact toggle (symbol only) */
      #lists-toggle {
        font-size: 11px !important;
        padding: 0 4px !important;
        margin-left: 0.125rem !important;
        min-height: 22px !important;
      }

      /* Hide the sub-label rows ("Upcoming nightmares", "Watched library...", "Disliked...") on mobile.
         This is the last source of random vertical space above the actual listed movies.
         The 🎲 Random button (in the To Watch row) will remain as a tiny control right above the list. */
      .personal-pane > div.text-xs.text-zinc-500:not(.flex) {
        display: none !important;
      }
      .personal-pane > div.flex.justify-between > div:first-child {
        display: none !important; /* hide the text label, keep the random button */
      }
      
      /* Curator input */
      #curator-input { font-size: 16px !important; }
      .curator-msg { padding: 6px 9px; font-size: 13px; max-width: 85%; }
      /* Quick replies: wrap onto multiple lines on mobile instead of horizontal-
         scrolling — a nowrap row here got cut off mid-word at the screen edge with
         no scroll affordance, reading as a layout bug rather than a hidden row. */
      #curator-quick-replies {
        gap: 5px !important;
        margin-top: 6px !important;
        flex-wrap: wrap !important;
      }
      #curator-quick-replies button {
        padding: 4px 11px !important;
        font-size: 11px !important;
        min-height: 0 !important;
        line-height: 1.3 !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
      }
      #curator-status {
        font-size: 8px !important;
        margin-top: 2px !important;
      }
      /* Inline rating bar — compact on mobile regardless of context */
      .inline-rating-bar button {
        min-height: 0 !important;
        font-size: 13px !important;
        padding: 4px 10px !important;
        line-height: 1.3 !important;
      }
      
      /* Recommended header buttons */
      .mb-2 > .flex.items-center.justify-between button {
        font-size: 11px !important;
        padding-left: 9px !important;
        padding-right: 9px !important;
        padding-top: 3px !important;
        padding-bottom: 3px !important;
      }
      
      /* Mood chips removed */
      
      /* Search / Discover */
      .search-input { font-size: 16px; }
      #discover-sort, .inline-flex button { font-size: 12px !important; }
      
      /* Results cards (search/discover) - expanded for easier viewing */
      .movie-card { padding: 16px !important; }
      .movie-card .flex.gap-4, .movie-card .flex.gap-5 { gap: 16px; }
      /* Allow responsive poster sizes from template for expanded cards on mobile */
      /* .movie-card img { width: 80px !important; height: 120px !important; } */
      
      /* Action buttons row - expanded */
      .mt-2.flex.gap-2 > button,
      .mt-3.flex.gap-2 > button,
      .mt-3.flex.gap-2 > button {
        font-size: 13px !important;
        padding: 6px 10px !important;
      }
      
      /* Recs grid — poster layout, compact padding */
      #recs-grid .movie-card { padding: 10px !important; }
      
      /* Modal */
      #detail-modal .p-4 { padding: 14px; }
      #detail-modal .text-xl { font-size: 1.2rem; }
      
      /* General */
      .text-lg { font-size: 16px !important; }
      button, input { min-height: 38px; font-size: 15px; }

      /* Make titles larger and more readable in cards on mobile */
      .movie-card .font-semibold { font-size: 16px !important; line-height: 1.3 !important; }
      .movie-card .text-base, .movie-card .text-lg, .movie-card .text-xl { font-size: 16px !important; }
      .movie-card .text-sm, .movie-card .text-xs { font-size: 14px !important; }

      /* Aggressively remove gap between rating and decade filters in Discover (mobile) */
      .grid.grid-cols-1.sm\\:grid-cols-2 {
        gap: 0 !important;
      }
      .grid.grid-cols-1.sm\\:grid-cols-2 > div > div.text-\\[8px\\] {
        margin-bottom: 0 !important;
        line-height: 1 !important;
      }
      /* Discover chip overrides for mobile */
      #genre-chips, #rating-chips, #decade-chips {
        gap: 4px !important;
        justify-content: flex-start !important;
      }
      #genre-chips button, #rating-chips button, #decade-chips button {
        font-size: 12px !important;
        padding: 3px 10px !important;
      }
    }

    /* Toast notifications - clean, contained, horror themed */
    #toast-container {
      position: fixed;
      bottom: calc(16px + env(safe-area-inset-bottom));
      left: 50%;
      transform: translateX(-50%);
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 8px;
      pointer-events: none;
      max-width: 90vw;
    }
    .toast {
      pointer-events: auto;
      background: #18181b;
      border: 1px solid #3f3f46;
      color: #e4e4e7;
      padding: 10px 16px;
      border-radius: 9999px;
      font-size: 14px;
      box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
      display: flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
      animation: toast-in 0.2s ease forwards;
      max-width: 320px;
    }
    .toast.success { border-color: #4ade80; }
    .toast.error { border-color: #f87171; }
    .toast.info { border-color: #60a5fa; }
    @keyframes toast-in {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .toast.out {
      animation: toast-out 0.15s ease forwards;
    }
    @keyframes toast-out {
      to { opacity: 0; transform: translateY(8px); }
    }

    /* ═══════════════════════════════════════════
       VISUAL EFFECTS & COLOR — Horror Roki 2.0
    ═══════════════════════════════════════════ */

    /* Film grain texture overlay on body */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 0;
      opacity: 0.04;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
      background-repeat: repeat;
      background-size: 200px 200px;
    }

    /* Hero atmospheric glow — crimson radial behind the headline */
    .hero-glow {
      position: relative;
    }
    .hero-glow::before {
      content: '';
      position: absolute;
      top: -60px;
      left: -80px;
      width: 500px;
      height: 300px;
      background: radial-gradient(ellipse at 30% 50%, rgba(185,28,28,0.18) 0%, rgba(127,29,29,0.08) 45%, transparent 70%);
      pointer-events: none;
      z-index: 0;
      filter: blur(30px);
    }
    .hero-glow > * { position: relative; z-index: 1; }

    /* Nightmare word glow */
    .nightmare-word {
      color: #f87171;
      text-shadow: 0 0 20px rgba(248,113,113,0.5), 0 0 40px rgba(185,28,28,0.3);
    }

    /* Red/violet glow on search input focus */
    .search-input {
      transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    }
    .search-input:focus {
      border-color: rgba(185, 28, 28, 0.8) !important;
      box-shadow:
        0 0 0 3px rgba(185, 28, 28, 0.18),
        0 0 16px rgba(185, 28, 28, 0.12),
        0 0 0 1.5px rgba(99, 102, 241, 0.15),
        inset 0 1px 3px rgba(0,0,0,0.4) !important;
    }

    /* Curator chat — deeper cinematic background + red edge glow */
    #curator-chat {
      box-shadow: 0 0 0 1px rgba(185,28,28,0.2), 0 0 30px rgba(185,28,28,0.08), inset 0 0 60px rgba(0,0,0,0.4) !important;
      border-color: rgba(185,28,28,0.25) !important;
    }

    /* Discover panel — gradient background + red left accent border */
    .discover-panel {
      background: linear-gradient(160deg, #18181b 0%, #1a1012 100%) !important;
      border-color: rgba(185,28,28,0.2) !important;
      border-left: 3px solid #b91c1c !important;
      box-shadow: 0 0 20px rgba(185,28,28,0.05) !important;
      padding-left: 14px !important;
    }
    .discover-panel-header {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .discover-panel-header::before {
      content: '';
      display: inline-block;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #b91c1c;
      box-shadow: 0 0 6px rgba(185,28,28,0.7);
      flex-shrink: 0;
    }

    /* Active filter chips — red glow pulse */
    .filter-chip-active {
      background: linear-gradient(135deg, rgba(185,28,28,0.9), rgba(99,102,241,0.85)) !important;
      border-color: #b91c1c !important;
      box-shadow: 0 0 10px rgba(185,28,28,0.4), 0 0 20px rgba(185,28,28,0.15) !important;
      color: white !important;
    }

    /* Browse button — gradient + glow */
    .browse-btn {
      background: linear-gradient(135deg, #4f46e5, #6d28d9) !important;
      box-shadow: 0 0 12px rgba(99,102,241,0.3) !important;
      transition: all 0.2s ease !important;
    }
    .browse-btn:hover {
      box-shadow: 0 0 20px rgba(99,102,241,0.5) !important;
      transform: translateY(-1px) !important;
    }
    .search-panel {
      background:
        radial-gradient(circle at top right, rgba(185,28,28,0.12), transparent 36%),
        linear-gradient(160deg, #111113 0%, #09090b 100%) !important;
      border-color: rgba(185,28,28,0.18) !important;
    }
    .search-action-btn {
      min-height: 42px;
      border-radius: 9999px;
      background: linear-gradient(135deg, #991b1b, #6d28d9);
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      padding: 8px 16px;
      box-shadow: 0 0 16px rgba(185,28,28,0.22);
      transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    }
    .search-action-btn:hover {
      transform: translateY(-1px);
      filter: brightness(1.08);
      box-shadow: 0 0 24px rgba(185,28,28,0.34);
    }
    .search-chip-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }
    .search-chip {
      min-height: 32px;
      border-radius: 9999px;
      border: 1px solid rgba(113,113,122,0.55);
      background: rgba(24,24,27,0.88);
      color: #d4d4d8;
      padding: 5px 11px;
      font-size: 12px;
      font-weight: 650;
      transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
    }
    .search-chip:hover {
      background: #27272a;
      border-color: rgba(248,113,113,0.55);
      color: #fff;
    }

    /* Recommended section header — red left accent bar */
    .recs-section-header {
      position: relative;
      padding-left: 12px;
    }
    .recs-section-header::before {
      content: '';
      position: absolute;
      left: 0;
      top: 2px;
      bottom: 2px;
      width: 3px;
      background: linear-gradient(180deg, #ef4444, #7f1d1d);
      border-radius: 2px;
    }

    /* Movie cards — single source of truth for hover state (red glow + lift) */
    .movie-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 20px 30px -8px rgba(0,0,0,0.4),
                  0 0 0 1px rgba(185,28,28,0.3),
                  0 0 20px rgba(185,28,28,0.08);
      border-color: rgba(185,28,28,0.5);
    }

    /* Personal tabs bar — subtle top red glow */
    #personal-tabs-bar {
      box-shadow: 0 -1px 0 0 rgba(185,28,28,0.15) inset !important;
    }
    .personal-tab.active {
      border-bottom-color: #ef4444 !important;
      color: white !important;
    }

    /* Section labels with gradient text */
    .gradient-label {
      background: linear-gradient(90deg, #f87171, #e2e8f0);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* Quick chips in Curator — red tint on hover */
    #curator-quick-replies button:hover {
      border-color: rgba(185,28,28,0.4) !important;
      color: #fca5a5 !important;
    }

    /* Refresh Pool / Recompute buttons — subtle gradient */
    .pool-btn {
      background: linear-gradient(135deg, #27272a, #1c1c1f) !important;
      border-color: #52525b !important;
      transition: all 0.2s ease !important;
    }
    .pool-btn:hover {
      background: linear-gradient(135deg, #3f3f46, #27272a) !important;
      border-color: rgba(185,28,28,0.4) !important;
      box-shadow: 0 0 8px rgba(185,28,28,0.1) !important;
    }

    /* Stats row colored dots already in JS — add pulsing red dot for watched */
    @keyframes red-pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }

    /* Toast success gets a green shimmer */
    .toast.success {
      background: linear-gradient(135deg, #18181b, #0d1f12) !important;
    }

    /* Scrollbar — horror themed */
    ::-webkit-scrollbar { width: 4px; height: 4px; }
    ::-webkit-scrollbar-track { background: #18181b; }
    ::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 4px; }
    ::-webkit-scrollbar-thumb:hover { background: #b91c1c; }

    /* Where to watch popup */
    .why-this-pop {
      position: fixed;
      z-index: 9999;
      background: #18181b;
      border: 1px solid #3f3f46;
      border-radius: 12px;
      padding: 12px 14px;
      font-size: 12px;
      color: #a1a1aa;
      max-width: 230px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.6);
      pointer-events: none;
    }
    /* Match-reason chip on each rec card. Styled as a subtle inline pill so the
       "why was this recommended" signal reads as an intentional badge rather than
       loose text — makes the recommendation logic visible at a glance. The text
       colour utility classes on the element (emerald / amber) still apply. */
    .why-this-btn {
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      max-width: 100%;
      padding: 2px 8px;
      border-radius: 9999px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      line-height: 1.3;
    }
    .why-this-btn:hover { background: rgba(255,255,255,0.09); }

    /* Genre filter chips: a single horizontally-scrollable row instead of wrapping to
       multiple lines. Standard streaming-app pattern — keeps the filter to one tidy
       line at every width and saves vertical space (especially on mobile). Chips don't
       shrink, and the scrollbar is hidden for a clean look. */
    .recs-chip-scroll {
      flex-wrap: nowrap;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      padding-bottom: 2px;
    }
    .recs-chip-scroll::-webkit-scrollbar { display: none; }
    .recs-chip-scroll > * { flex: 0 0 auto; }
    .wtw-popup {
      position: fixed;
      z-index: 500;
      background: #1c1c1f;
      border: 1px solid #3f3f46;
      border-radius: 14px;
      padding: 12px 14px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(185,28,28,0.12);
      min-width: 190px;
      max-width: 260px;
      animation: wtw-in 0.14s ease;
    }
    @keyframes wtw-in {
      from { opacity:0; transform:translateY(4px); }
      to   { opacity:1; transform:translateY(0); }
    }
    .wtw-trigger {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      color: #a1a1aa;
      cursor: pointer;
      background: none;
      border: none;
      padding: 2px 0;
      transition: color 0.15s;
    }
    .wtw-trigger:hover { color: #f87171; }
    .wtw-section-label {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #71717a;
      margin-bottom: 4px;
      margin-top: 8px;
    }
    .wtw-section-label:first-child { margin-top: 0; }
    .wtw-provider-pill {
      display: inline-flex;
      align-items: center;
      padding: 3px 9px;
      border-radius: 9999px;
      font-size: 11px;
      font-weight: 600;
      margin: 2px 3px 2px 0;
      border: 1px solid rgba(255,255,255,0.08);
    }

    /* Modal backdrop blur */
    #detail-modal {
      backdrop-filter: blur(8px) !important;
    }
    #detail-modal > div {
      background: linear-gradient(160deg, #18181b, #120a0a) !important;
      border-color: rgba(185,28,28,0.2) !important;
      box-shadow: 0 25px 50px rgba(0,0,0,0.7), 0 0 0 1px rgba(185,28,28,0.15) !important;
    }

    /* ═══════════════════════════════════
       FULL OVERHAUL CSS — Horror Roki
    ═══════════════════════════════════ */

    /* Cinematic headline font */
    h1, .bebas { font-family: 'Bebas Neue', system-ui, sans-serif !important; letter-spacing: 1px; }
    body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

    /* ── Comprehensive theme overrides ── */
    #sticky-nav { background: var(--nav-bg) !important; border-bottom-color: var(--border) !important; }
    .nav-brand { color: var(--text) !important; }
    .nav-link { color: var(--text3) !important; }
    .nav-link:hover, .nav-link.active, .nav-link.page-active { color: var(--text) !important; background: var(--bg4) !important; }
    .search-input { background: var(--input-bg) !important; border-color: var(--border) !important; color: var(--text) !important; }
    .search-input::placeholder { color: var(--text4) !important; }
    .quick-chip { background: var(--chip-bg) !important; border-color: var(--chip-border) !important; color: var(--text3) !important; }
    .quick-chip:hover { background: var(--bg4) !important; color: var(--text) !important; }
    .section-header { color: var(--text4) !important; }
    .library-item { background: var(--lib-bg) !important; border-color: var(--lib-border) !important; }
    .library-item .text-white, .library-item .text-zinc-100 { color: var(--text) !important; }
    .library-item .text-zinc-400, .library-item .text-zinc-500 { color: var(--text3) !important; }
    .curator-msg { background: var(--curator-bg) !important; border-color: var(--border) !important; color: var(--text) !important; }
    .curator-msg.user { background: var(--curator-user-bg) !important; border-color: var(--border2) !important; }
    .accordion-header { color: var(--text2) !important; }
    .accordion-header:hover { background: var(--bg4) !important; }
    #detail-modal > div, #transfer-modal > div, #settings-modal > div {
      background: var(--modal-bg) !important;
      border-color: var(--border) !important;
      color: var(--text) !important;
    }
    /* Skeleton shimmer */
    .skeleton-card { background: var(--skeleton) !important; }
    .skeleton-card::after { background: linear-gradient(90deg, transparent, var(--skeleton2), transparent) !important; }
    /* Cards / panels */
    .bg-zinc-950, .bg-\[\#09090b\] { background: var(--bg) !important; }
    .bg-zinc-900 { background: var(--bg2) !important; }
    .bg-zinc-800 { background: var(--bg4) !important; }

    /* Provider pills + genre tags in light mode — override zinc darks to readable light chips */
    /* Provider pills + genre tags — light mode overrides */
    /* Modal availability (where to watch) pills */
    html.light #modal-availability span {
      border-color: rgba(0,0,0,0.15) !important;
    }
    html.light #modal-availability span[class*="bg-zinc-7"],
    html.light #modal-availability span[class*="bg-zinc-8"],
    html.light #modal-availability span[class*="bg-zinc-6"] {
      background: #e4e4e7 !important;
      color: #27272a !important;
      border-color: rgba(0,0,0,0.12) !important;
    }
    /* Genre tag chips in modal */
    html.light #modal-genres span,
    html.light .modal-genre-chip {
      background: #f0ece6 !important;
      color: #44403c !important;
      border: 1px solid rgba(0,0,0,0.1) !important;
    }
    /* Where to watch row in search/discover result cards */
    html.light .movie-card span[class*="bg-zinc-7"],
    html.light .movie-card span[class*="bg-zinc-8"],
    html.light .movie-card span[class*="bg-zinc-6"] {
      background: #e4e4e7 !important;
      color: #27272a !important;
      border-color: rgba(0,0,0,0.12) !important;
    }
    /* Modal action buttons in light mode */
    html.light #modal-actions-row button[class*="bg-zinc-8"],
    html.light #modal-actions-row button[class*="border-zinc-7"] {
      background: #f0ece6 !important;
      border-color: rgba(0,0,0,0.15) !important;
      color: #292524 !important;
    }
    /* Rating star buttons in light mode — keep amber but darken slightly */
    html.light button[class*="bg-amber-500/20"] {
      background: rgba(217,119,6,0.12) !important;
      color: #92400e !important;
      border-color: rgba(217,119,6,0.3) !important;
    }
    html.light button[class*="bg-amber-500/20"]:hover {
      background: #d97706 !important;
      color: #fff !important;
    }
    /* Rating bar container in light mode */
    html.light div[class*="bg-amber-950"] {
      background: rgba(217,119,6,0.06) !important;
      border-color: rgba(217,119,6,0.2) !important;
    }
    .border-zinc-800 { border-color: var(--border2) !important; }
    .border-zinc-700 { border-color: var(--border) !important; }
    .text-zinc-100, .text-white { color: var(--text) !important; }
    .text-zinc-300, .text-zinc-200 { color: var(--text2) !important; }
    .text-zinc-400, .text-zinc-500 { color: var(--text3) !important; }
    /* Main tab bar */
    .main-tab-bar { border-color: var(--border2) !important; }
    .main-tab-btn { color: var(--text3) !important; }
    .main-tab-btn.active { color: var(--text) !important; border-bottom-color: rgb(var(--accent)) !important; }
    /* Rec cards */
    .rec-card { background: var(--card-bg) !important; border-color: var(--border) !important; }
    /* Input / textarea theming */
    input:not([type=file]), textarea, select {
      background: var(--input-bg) !important;
      color: var(--text) !important;
      border-color: var(--border) !important;
    }
    /* Header text */
    h1, h2, h3 { color: var(--text) !important; }
    .top-header { border-color: var(--border2) !important; }

    /* ── Light mode specific overrides ── */
    html.light .nav-brand span { color: #b91c1c !important; }
    html.light .movie-card:hover { border-color: #b91c1c !important; box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 0 0 1px rgba(var(--accent),0.15) !important; }
    html.light #curator-quick-replies button { background: var(--chip-bg) !important; border-color: var(--chip-border) !important; color: var(--text3) !important; }
    html.light #curator-quick-replies button:hover { background: var(--bg4) !important; color: var(--text) !important; }
    html.light .nightmare-word { color: #b91c1c !important; }
    html.light .text-zinc-300 { color: #3f3f46 !important; }
    html.light .text-zinc-500 { color: #71717a !important; }

    /* ── Sticky top nav ── */
    #sticky-nav {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(15, 14, 15, 0.85);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-bottom: 1px solid rgba(185,28,28,0.15);
      padding: 8px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .nav-brand {
      font-family: 'Bebas Neue', system-ui, sans-serif;
      font-size: clamp(22px, 2.4vw, 30px);
      letter-spacing: 1px;
      color: white;
      white-space: nowrap;
    }
    .nav-brand span { color: #f87171; }
    .nav-links {
      display: flex;
      gap: 4px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-link {
      font-size: 11px;
      font-weight: 500;
      padding: 5px 12px;
      border-radius: 9999px;
      color: #a1a1aa;
      border: 1px solid transparent;
      white-space: nowrap;
      transition: all 0.15s ease;
      text-decoration: none;
      cursor: pointer;
    }
    .nav-link:hover {
      color: #fff;
      border-color: rgba(185,28,28,0.3);
      background: rgba(185,28,28,0.08);
    }
    .nav-link.active {
      color: #fca5a5;
      border-color: rgba(185,28,28,0.4);
      background: rgba(185,28,28,0.1);
    }

    /* Tab switch animation */
    .personal-pane {
      animation: pane-fade-in 0.22s cubic-bezier(0.4,0,0.2,1) both;
    }
    @keyframes pane-fade-in {
      from { opacity: 0; transform: translateY(6px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* Shimmer skeleton cards */
    .skeleton-card {
      background: linear-gradient(145deg, #18181b, #111113);
      border: 1px solid #3f3f46;
      border-radius: 1.5rem;
      padding: 1.25rem;
      overflow: hidden;
      position: relative;
    }
    .skeleton-card::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
      background-size: 200% 100%;
      animation: skeleton-sweep 1.4s ease-in-out infinite;
    }
    @keyframes skeleton-sweep {
      0%   { background-position: -200% 0; }
      100% { background-position: 200% 0; }
    }
    .skeleton-line {
      background: #27272a;
      border-radius: 6px;
      height: 12px;
      margin-bottom: 8px;
    }
    .skeleton-poster {
      background: #27272a;
      border-radius: 12px;
      flex-shrink: 0;
    }

    /* Improved typing indicator */
    .curator-typing-dots {
      display: inline-flex;
      gap: 4px;
      align-items: center;
      padding: 2px 0;
    }
    .curator-typing-dots span {
      width: 6px;
      height: 6px;
      background: #b91c1c;
      border-radius: 50%;
      animation: dot-bounce 1.2s ease-in-out infinite;
    }
    .curator-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
    .curator-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
    @keyframes dot-bounce {
      0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
      40%           { transform: translateY(-5px); opacity: 1; }
    }

    /* Enhanced movie card layout (.movie-card-v2 is layered on top of .movie-card in markup;
       background/border/transition/hover now live solely on .movie-card above to avoid two
       rules fighting over the same element — this class only adds the gradient background
       variant that .movie-card's flat --card-bg2 doesn't cover). */
    .movie-card-v2 {
      background: linear-gradient(160deg, #18181b 0%, #121014 100%);
    }
    .rating-badge {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      padding: 2px 7px;
      border-radius: 9999px;
      font-size: 11px;
      font-weight: 600;
      background: rgba(251,191,36,0.15);
      border: 1px solid rgba(251,191,36,0.25);
      color: #fbbf24;
    }
    .rating-badge.low {
      background: rgba(113,113,122,0.25);
      color: #a1a1aa;
      border-color: rgba(113,113,122,0.3);
    }
    .rating-badge.high {
      background: rgba(34,197,94,0.12);
      border-color: rgba(34,197,94,0.25);
      color: #4ade80;
    }
    .provider-logo-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 8px;
      border-radius: 9999px;
      font-size: 10px;
      font-weight: 600;
      border: 1px solid rgba(255,255,255,0.1);
      flex-shrink: 0;
    }
    html.light .provider-logo-pill {
      border-color: rgba(0,0,0,0.12) !important;
    }
    .stream-badge {
      background: rgba(99,102,241,0.15);
      border-color: rgba(99,102,241,0.3);
      color: #a5b4fc;
      font-size: 9px;
      font-weight: 600;
      padding: 1px 5px;
      border-radius: 4px;
    }

    /* Enhanced library items */
    .library-item-v2 {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 10px 12px;
      background: linear-gradient(135deg, #111113, #0f0e0f);
      border: 1px solid #27272a;
      border-radius: 16px;
      overflow: hidden;
      transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
      position: relative;
    }
    .library-item-v2::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 16px;
      background: linear-gradient(135deg, rgba(185,28,28,0.04) 0%, transparent 60%);
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    .library-item-v2:hover::after { opacity: 1; }
    .library-item-v2:hover {
      border-color: rgba(185,28,28,0.25);
      background: linear-gradient(135deg, #1a1012, #111113);
      transform: translateX(2px);
      box-shadow: 0 4px 20px rgba(185,28,28,0.1), 0 1px 0 rgba(185,28,28,0.15) inset;
    }
    /* Grid card variant for My Library */
    .library-card {
      display: flex !important;
      flex-direction: row !important;
      align-items: center !important;
      padding: 10px 12px !important;
      gap: 12px !important;
      overflow: hidden !important;
      border-radius: 16px !important;
      transform: none !important;
    }
    .library-card:hover {
      transform: translateX(2px) !important;
    }
    /* To Watch gets a larger poster than Watched/Disliked — it's the list you're
       actively choosing from, so a bigger, more recognizable poster carries more
       weight there. */
    #to-watch-content .lib-poster {
      width: 152px;
      height: 228px;
    }
    .lib-external-links {
      display: flex;
      gap: 6px;
      margin-top: 6px;
    }
    .lib-external-links a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 4px;
      text-decoration: none;
    }
    .library-card .lib-poster {
      width: 112px;
      height: 168px;
      overflow: hidden;
      flex-shrink: 0;
      border-radius: 8px;
      background: #27272a;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      color: #52525b;
    }
    .library-card .lib-poster img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      border-radius: 8px;
    }
    .library-card .lib-body {
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 3px;
      flex: 1;
      min-width: 0;
    }
    .library-card .lib-title {
      font-size: 12px;
      font-weight: 600;
      color: #f4f4f5;
      line-height: 1.3;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .library-card .lib-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 3px;
      align-items: center;
    }
    .library-card .lib-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 3px;
      margin-top: auto;
      padding-top: 5px;
    }
    .library-card .lib-actions button {
      font-size: 10px !important;
      padding: 3px 6px !important;
      border-radius: 7px !important;
      flex-shrink: 0;
      white-space: nowrap;
    }

    .library-genre-tag {
      font-size: 9px;
      font-weight: 500;
      padding: 1px 6px;
      border-radius: 9999px;
      background: rgba(185,28,28,0.15);
      border: 1px solid rgba(185,28,28,0.2);
      color: #fca5a5;
      white-space: nowrap;
    }
    .library-rating {
      font-size: 10px;
      color: #fbbf24;
      font-weight: 600;
      white-space: nowrap;
    }

    /* Atmospheric empty states */
    .empty-state {
      text-align: center;
      padding: 2.5rem 1rem;
      position: relative;
      overflow: hidden;
    }
    .empty-state::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse at 50% 80%, rgba(185,28,28,0.06) 0%, transparent 70%);
      pointer-events: none;
    }
    .empty-state-icon {
      font-size: 2.5rem;
      margin-bottom: 0.75rem;
      display: block;
      filter: grayscale(0.3);
    }

    /* Improved Curator message bubbles */
    .curator-msg {
      border-radius: 18px !important;
      max-width: 88% !important;
    }
    .curator-msg.user {
      background: linear-gradient(135deg, #27272a, #1f1f22) !important;
      max-width: 78% !important;
    }
    #curator-messages {
      background: linear-gradient(180deg, #0a0a0c 0%, #0f0e0f 100%) !important;
    }

    /* ═══════════════════════════════════
       MAIN PAGE TAB SYSTEM
    ═══════════════════════════════════ */

    /* Main page tabs */
    .main-tab-bar {
      display: flex;
      gap: 4px;
      padding: 4px;
      background: var(--bg2);
      border: 1px solid var(--border2);
      border-radius: 16px;
      margin-bottom: 20px;
    }
    /* On desktop the sticky header already shows the four page tabs (For You /
       Curator / Browse / Library), so this second in-page tab bar is redundant and
       just eats vertical space. Hide it from tablet width up; keep it on phones,
       where it stays the large touch-friendly primary nav and the header's tiny
       text links are the secondary affordance. */
    @media (min-width: 768px) {
      .main-tab-bar { display: none; }
    }
    .main-tab-btn {
      flex: 1;
      padding: 9px 12px;
      border-radius: 12px;
      font-size: 13px;
      font-weight: 600;
      color: var(--text3);
      border: none;
      background: transparent;
      cursor: pointer;
      transition: all 0.18s cubic-bezier(0.4,0,0.2,1);
      white-space: nowrap;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .main-tab-btn:hover {
      color: var(--text2);
      background: var(--bg3);
    }
    .main-tab-btn.active {
      background: linear-gradient(135deg, #1c0a0a, #1a0d1a);
      color: #fca5a5;
      box-shadow: 0 0 0 1px rgba(185,28,28,0.35), 0 2px 8px rgba(185,28,28,0.15);
    }
    .main-tab-btn.active .tab-icon { color: #f87171; }
    html.light .main-tab-btn.active {
      background: linear-gradient(135deg, #dc2626, #9333ea);
      color: #fff !important;
      box-shadow: 0 0 0 1px rgba(185,28,28,0.5), 0 4px 14px rgba(185,28,28,0.3), 0 2px 6px rgba(147,51,234,0.2);
      font-weight: 700;
    }
    html.light .main-tab-btn.active .tab-icon { color: #fff !important; }

    /* Main page panels */
    .main-panel {
      display: none;
      animation: pane-fade-in 0.2s ease both;
    }
    .main-panel.active { display: block; }
    #panel-curator.active { display: flex; flex-direction: column; }
    .home-command-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin: 0 0 18px;
    }
    .home-command-card {
      position: relative;
      text-align: left;
      min-height: 86px;
      border-radius: 18px;
      border: 1px solid rgba(63,63,70,0.92);
      background:
        radial-gradient(circle at top right, rgba(185,28,28,0.13), transparent 38%),
        linear-gradient(145deg, rgba(24,24,27,0.96), rgba(9,9,11,0.98));
      padding: 12px 13px;
      color: var(--text2);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
      transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    }
    /* "Next up" poster thumbnail on the Queue card — only shown (via .has-thumb,
       toggled in updateHomeSnapshot) when the queue's first title has a poster. */
    .home-queue-thumb {
      display: none;
      position: absolute;
      top: 10px;
      right: 10px;
      width: 40px;
      height: 60px;
      border-radius: 8px;
      object-fit: cover;
      box-shadow: 0 4px 10px rgba(0,0,0,0.45);
    }
    #home-queue-card.has-thumb {
      padding-right: 58px;
    }
    #home-queue-card.has-thumb .home-queue-thumb {
      display: block;
    }
    .home-command-card:hover {
      transform: translateY(-1px);
      border-color: rgba(248,113,113,0.46);
      box-shadow: 0 10px 24px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.05);
    }
    .home-command-kicker {
      display: block;
      color: var(--text4);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      margin-bottom: 6px;
    }
    .home-command-value {
      display: block;
      color: var(--text);
      font-size: 20px;
      font-weight: 800;
      line-height: 1.05;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .home-command-note {
      display: block;
      color: var(--text3);
      font-size: 11px;
      line-height: 1.25;
      margin-top: 6px;
    }
    /* Primary card (Fresh pool) is the main home-screen CTA — give it slightly more
       visual weight than the other three command cards (richer color, subtle glow)
       without changing its grid footprint or size, so it stands out without dominating. */
    .home-command-card.primary {
      border-color: rgba(185,28,28,0.55);
      background:
        radial-gradient(circle at top right, rgba(147,51,234,0.22), transparent 42%),
        linear-gradient(145deg, rgba(41,12,18,0.98), rgba(14,10,18,0.98));
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 6px 20px rgba(185,28,28,0.12);
    }
    .home-command-card.primary:hover {
      border-color: rgba(248,113,113,0.65);
      box-shadow: 0 12px 28px rgba(185,28,28,0.22), inset 0 1px 0 rgba(255,255,255,0.06);
    }
    @media (max-width: 820px) {
      .home-command-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }
      .home-command-card {
        min-height: 74px;
        padding: 10px;
      }
      .home-command-value {
        font-size: 17px;
      }
    }

    /* Taste Profile Dropdown */
    .taste-dropdown-panel {
      margin-top: 6px;
      background: linear-gradient(145deg, rgba(24,24,27,0.98), rgba(9,9,11,0.99));
      border: 1px solid rgba(63,63,70,0.92);
      border-radius: 16px;
      padding: 14px 16px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.4);
      animation: taste-drop-in 0.18s ease;
    }
    .taste-dropdown-panel.hidden { display: none; }
    @keyframes taste-drop-in {
      from { opacity: 0; transform: translateY(-6px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .taste-dropdown-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .taste-dropdown-title {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text4);
    }
    .taste-dropdown-close {
      background: none;
      border: none;
      color: var(--text4);
      cursor: pointer;
      font-size: 13px;
      padding: 2px 6px;
      border-radius: 6px;
      line-height: 1;
    }
    .taste-dropdown-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
    .taste-dropdown-genres {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 10px;
    }
    .taste-genre-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      padding: 5px 12px;
      border-radius: 999px;
      border: 1px solid rgba(63,63,70,0.92);
      background: rgba(39,39,42,0.8);
      color: var(--text2);
      cursor: pointer;
      transition: border-color 0.14s, background 0.14s;
      white-space: nowrap;
    }
    .taste-genre-chip:hover {
      border-color: rgba(248,113,113,0.5);
      background: rgba(63,63,70,0.5);
    }
    .taste-genre-chip.active {
      background: rgba(185,28,28,0.85);
      border-color: rgba(248,113,113,0.7);
      color: #fff;
    }
    .taste-strength-dots {
      display: inline-flex;
      gap: 2px;
    }
    .taste-dot {
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: rgba(248,113,113,0.45);
    }
    .taste-dot.filled {
      background: rgba(248,113,113,0.85);
    }
    .taste-genre-chip.active .taste-dot { background: rgba(255,255,255,0.4); }
    .taste-genre-chip.active .taste-dot.filled { background: rgba(255,255,255,0.9); }
    .taste-dropdown-footer {
      border-top: 1px solid rgba(63,63,70,0.5);
      padding-top: 10px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .taste-dropdown-footer-btn {
      background: none;
      border: none;
      color: var(--text4);
      cursor: pointer;
      font-size: 11px;
      padding: 0;
      text-decoration: none;
    }
    .taste-dropdown-footer-btn:hover { color: var(--text2); }
    .home-command-card .taste-chevron {
      display: inline-block;
      margin-left: 4px;
      font-size: 9px;
      transition: transform 0.16s;
      color: var(--text4);
      vertical-align: middle;
    }
    .home-command-card.taste-open .taste-chevron {
      transform: rotate(180deg);
    }

    /* Expanded Curator on its own page */
    #curator-chat-full #curator-messages {
      max-height: calc(100vh - 340px) !important;
      min-height: 300px;
    }

    /* Watched page — bigger cards, full height list */
    #watched-page-content {
      max-height: none !important;
    }
    .watched-page-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      background: linear-gradient(135deg, #111113, #0f0e0f);
      border: 1px solid #27272a;
      border-radius: 14px;
      transition: all 0.15s ease;
    }
    .watched-page-item:hover {
      border-color: #3f3f46;
      background: #18181b;
    }
    .watched-page-poster {
      width: 48px;
      height: 72px;
      border-radius: 8px;
      object-fit: cover;
      flex-shrink: 0;
      background: #27272a;
    }

    /* Nav active state */
    #sticky-nav .nav-link.page-active {
      color: #fca5a5;
      border-color: rgba(185,28,28,0.4);
      background: rgba(185,28,28,0.1);
    }

    /* ═══════════════════════════════════
       CURATOR CHAT — REDESIGN v2
    ═══════════════════════════════════ */

    /* Container */
    #curator-chat-full {
      border: 1px solid rgba(185,28,28,0.45) !important;
      border-radius: 20px !important;
      background: var(--curator-bg) !important;
      box-shadow:
        0 0 0 1px rgba(185,28,28,0.12),
        0 0 40px rgba(185,28,28,0.1),
        inset 0 1px 0 rgba(255,255,255,0.04) !important;
      overflow: hidden !important;
    }

    /* Header — glassmorphism with scanline */
    #curator-chat-full > div:first-child {
      background: linear-gradient(135deg, #160608 0%, #1e0a0a 50%, #160610 100%) !important;
      border-bottom: 2px solid rgba(185,28,28,0.5) !important;
      padding: 14px 16px !important;
      position: relative;
      overflow: hidden;
    }
    #curator-chat-full > div:first-child::before {
      content: '';
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.12) 2px,
        rgba(0,0,0,0.12) 4px
      );
      pointer-events: none;
    }
    #curator-chat-full > div:first-child::after {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(185,28,28,0.6), rgba(168,85,247,0.4), transparent);
    }

    /* Message area */
    #curator-messages {
      background: #0e0c10 !important;
      border-top: 1px solid rgba(185,28,28,0.12) !important;
      border-bottom: 1px solid rgba(147,51,234,0.12) !important;
      padding: 16px !important;
    }

    /* AI message bubble — clearly visible dark card */
    .curator-msg:not(.user) {
      background: linear-gradient(135deg, #1e1624 0%, #1a1220 100%) !important;
      border: 1px solid rgba(185,28,28,0.35) !important;
      border-left: 3px solid transparent !important;
      border-image: none !important;
      position: relative;
      overflow: hidden;
      border-radius: 4px 18px 18px 18px !important;
      padding: 12px 14px !important;
      max-width: 84% !important;
      box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(185,28,28,0.15) !important;
      color: #e8e0f0 !important;
    }
    .curator-msg:not(.user)::before {
      content: '';
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: 3px;
      background: linear-gradient(180deg, #ef4444 0%, #9333ea 100%);
      border-radius: 0;
    }
    .curator-msg:not(.user)::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(239,68,68,0.05) 0%, rgba(147,51,234,0.04) 100%);
      pointer-events: none;
      border-radius: inherit;
    }

    /* User message bubble */
    .curator-msg.user {
      background: linear-gradient(135deg, #1e1630 0%, #18102a 100%) !important;
      border: 1px solid rgba(147,51,234,0.4) !important;
      border-radius: 18px 4px 18px 18px !important;
      padding: 10px 14px !important;
      max-width: 74% !important;
      box-shadow: 0 2px 10px rgba(147,51,234,0.15), 0 0 0 1px rgba(147,51,234,0.1) !important;
      color: #e2d9f3 !important;
    }

    /* Curator avatar — glow ring */
    .curator-avatar {
      background: linear-gradient(145deg, #7f1d1d, #4c1d95) !important;
      box-shadow: 0 0 0 1px rgba(185,28,28,0.5), 0 0 12px rgba(185,28,28,0.3) !important;
    }

    /* Input area */
    #curator-chat-full > div:last-child {
      background: linear-gradient(180deg, #120e18 0%, #0e0b14 100%) !important;
      border-top: 2px solid rgba(147,51,234,0.3) !important;
      padding: 14px !important;
    }

    /* Input field */
    #curator-input {
      background: linear-gradient(135deg, #110d15 0%, #0e0b12 100%) !important;
      border: 1px solid rgba(147,51,234,0.25) !important;
      border-radius: 14px !important;
      color: #e2d9f3 !important;
      padding: 12px 16px !important;
      font-size: 14px !important;
      transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    }
    #curator-input:focus {
      border-color: rgba(147,51,234,0.5) !important;
      box-shadow: 0 0 0 3px rgba(147,51,234,0.08), 0 0 16px rgba(147,51,234,0.1) !important;
      outline: none !important;
    }
    #curator-input::placeholder { color: rgba(139,92,246,0.35) !important; }

    /* Send button — red-to-purple gradient */
    #curator-chat-full button[onclick="sendToCurator()"] {
      background: linear-gradient(135deg, #b91c1c 0%, #7c3aed 100%) !important;
      border: none !important;
      border-radius: 14px !important;
      padding: 12px 20px !important;
      font-weight: 700 !important;
      letter-spacing: 0.02em !important;
      box-shadow: 0 2px 12px rgba(185,28,28,0.3), 0 1px 0 rgba(255,255,255,0.1) inset !important;
      transition: all 0.18s ease !important;
    }
    #curator-chat-full button[onclick="sendToCurator()"]:hover {
      background: linear-gradient(135deg, #dc2626 0%, #8b5cf6 100%) !important;
      box-shadow: 0 4px 20px rgba(185,28,28,0.4), 0 1px 0 rgba(255,255,255,0.15) inset !important;
      transform: translateY(-1px) !important;
    }
    #curator-chat-full button[onclick="sendToCurator()"]:active {
      transform: translateY(0) !important;
    }

    /* Quick reply chips */
    #curator-quick-replies button {
      background: rgba(147,51,234,0.15) !important;
      border: 1px solid rgba(147,51,234,0.3) !important;
      color: #ddd6fe !important;
      border-radius: 999px !important;
      font-size: 11px !important;
      padding: 4px 10px !important;
      transition: all 0.15s ease !important;
    }
    #curator-quick-replies button:hover {
      background: rgba(147,51,234,0.2) !important;
      border-color: rgba(147,51,234,0.4) !important;
    }
    .curator-prompt-deck {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding: 12px 14px;
      background: linear-gradient(180deg, rgba(10,8,14,0.7) 0%, rgba(14,10,20,0.85) 100%);
      border-top: 1px solid rgba(185,28,28,0.1);
    }
    .curator-prompt-card {
      text-align: left;
      min-height: 66px;
      border-radius: 16px;
      border: 1px solid rgba(147,51,234,0.2);
      background:
        radial-gradient(circle at top right, rgba(185,28,28,0.12), transparent 50%),
        linear-gradient(145deg, rgba(22,16,30,0.95), rgba(12,10,16,1));
      padding: 11px 13px;
      color: #e9d5ff;
      transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    }
    .curator-prompt-card:hover {
      transform: translateY(-2px);
      border-color: rgba(248,113,113,0.4);
      box-shadow: 0 6px 20px rgba(185,28,28,0.15);
    }
    .curator-prompt-card .prompt-title {
      display: block;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.04em;
      color: #fca5a5;
      margin-bottom: 3px;
    }
    .curator-prompt-card .prompt-copy {
      display: block;
      font-size: 11px;
      line-height: 1.3;
      color: rgba(221,214,254,0.72);
    }
    @media (max-width: 480px) {
      .curator-prompt-deck {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 8px 10px;
        gap: 5px;
      }
      .curator-prompt-card {
        min-height: 0 !important;
        padding: 7px 9px;
      }
      .curator-prompt-card .prompt-title {
        font-size: 11px;
        margin-bottom: 1px;
      }
      .curator-prompt-card .prompt-copy {
        font-size: 10px;
      }
    }

    /* Status line */
    #curator-status { color: rgba(167,139,250,0.65) !important; }

    /* Typing dots — purple */
    .curator-typing-dots span {
      background: linear-gradient(135deg, #ef4444, #8b5cf6) !important;
    }

    /* Mood tag */
    #curator-mood { color: rgba(196,181,253,0.85) !important; letter-spacing: 0.1em; }

    /* Clear buttons in header */
    #curator-chat-full > div:first-child button {
      background: rgba(30,14,40,0.6) !important;
      border: 1px solid rgba(147,51,234,0.2) !important;
      color: rgba(196,181,253,0.7) !important;
      border-radius: 10px !important;
      transition: all 0.15s ease !important;
    }
    #curator-chat-full > div:first-child button:hover {
      background: rgba(147,51,234,0.15) !important;
      border-color: rgba(147,51,234,0.4) !important;
      color: #c4b5fd !important;
    }

    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
    #nav-sync-btn:hover { background: rgba(255,255,255,0.1) !important; color: #e4e4e7 !important; }

    /* ── Light mode: curator — warm parchment / film-stock tone ── */
    html.light #curator-chat-full {
      border-color: rgba(180,120,60,0.25) !important;
      box-shadow: 0 1px 8px rgba(120,60,20,0.07), 0 0 0 1px rgba(180,120,60,0.1) !important;
    }
    /* Header: warm amber-tinted parchment */
    html.light #curator-chat-full > div:first-child {
      background: linear-gradient(135deg, #fdf0e0 0%, #f5e6d0 100%) !important;
      border-bottom: 1px solid rgba(180,120,60,0.2) !important;
    }
    /* Remove dark scanline overlay in light mode */
    html.light #curator-chat-full > div:first-child::before,
    html.light #curator-chat-full > div:first-child::after { display: none !important; }
    /* Message body: warm off-white, not bright white */
    html.light #curator-messages {
      background: #fdf8f2 !important;
    }
    /* Curator AI bubbles: warm cream */
    html.light .curator-msg {
      background: #fef3e2 !important;
      border-color: rgba(180,120,60,0.2) !important;
      color: #2c1a0e !important;
    }
    /* User bubbles: cool slate to contrast */
    html.light .curator-msg.user {
      background: #eef2f7 !important;
      border-color: rgba(99,102,241,0.15) !important;
      color: #1e2a3a !important;
    }
    /* Input bar */
    html.light #curator-chat-full > div:last-child {
      background: #f5ede0 !important;
      border-top: 1px solid rgba(180,120,60,0.18) !important;
    }
    html.light #curator-input {
      background: #fffaf4 !important;
      border-color: rgba(180,120,60,0.25) !important;
      color: #2c1a0e !important;
    }
    html.light #curator-input::placeholder { color: rgba(140,90,40,0.4) !important; }
    /* Header buttons */
    html.light #curator-chat-full > div:first-child button {
      background: rgba(180,120,60,0.1) !important;
      border-color: rgba(180,120,60,0.2) !important;
      color: #7a3c10 !important;
    }
    html.light #curator-chat-full > div:first-child button:hover {
      background: rgba(180,120,60,0.2) !important;
    }
    /* Status text / mood tag */
    html.light #curator-status { color: rgba(120,70,20,0.65) !important; }
    html.light #curator-mood { color: rgba(120,70,20,0.8) !important; letter-spacing: 0.1em; }
    /* Avatar */
    html.light .curator-avatar {
      box-shadow: 0 0 0 1px rgba(185,28,28,0.35), 0 0 10px rgba(185,28,28,0.15) !important;
    }
    /* Quick reply chips */
    html.light #curator-quick-replies button {
      background: #fef3e2 !important;
      border-color: rgba(180,120,60,0.25) !important;
      color: #7a3c10 !important;
    }
    html.light #curator-quick-replies button:hover {
      background: #fde8c8 !important;
      color: #5a2a08 !important;
    }
    /* Footer note */
    html.light #curator-footer-note { color: rgba(120,70,20,0.55) !important; }
    /* Discover panel */
    html.light .discover-panel {
      background: linear-gradient(160deg, #fdf0e0 0%, #f5e6d0 100%) !important;
      border-color: rgba(180,120,60,0.2) !important;
      box-shadow: none !important;
    }
    /* Library sub-tabs */
    html.light .watch-sub-tab {
      background: var(--bg3) !important;
      border-color: var(--border) !important;
      color: var(--text3) !important;
    }
    html.light .watch-sub-tab.active {
      background: #fff !important;
      color: #b91c1c !important;
      border-color: rgba(185,28,28,0.3) !important;
    }
    /* Stats banner */
    html.light #stats-banner {
      background: linear-gradient(135deg, #fff1f2, #fdf4ff) !important;
      border-color: rgba(185,28,28,0.15) !important;
      color: var(--text) !important;
    }
    /* Library list content */
    html.light #personal-content {
      background: var(--bg2) !important;
      border-color: var(--border) !important;
    }
    html.light .personal-pane {
      background: var(--bg2) !important;
      padding: 12px !important;
    }
    html.light #personal-content .text-zinc-400 { color: var(--text3) !important; }
    html.light #personal-content .text-zinc-600 { color: var(--text4) !important; }
    html.light #personal-content button { background: var(--bg4) !important; border-color: var(--border) !important; color: var(--text3) !important; }
    /* Curator message body */
    html.light #curator-messages {
      background: #ffffff !important;
    }
