:root {
    --bg-base: #030303;
    --bg-surface: #0a0a0c;
    --bg-panel: rgba(18, 18, 24, 0.45);
    
    --accent-primary: #8a0303;
    --accent-gold: #d4af37;
    --accent-emerald: #059669;
    --accent-white: #f8fafc;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    
    --font-display: 'Oswald', 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-headline: 'Oswald', 'Inter', system-ui, -apple-system, sans-serif;
    
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
    /* clip keeps position:sticky working in Firefox; hidden forces overflow-y to auto */
    overflow-x: hidden;
    overflow-x: clip;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) var(--bg-base);
}
body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-x: clip;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    min-height: 100dvh;
}
button, input, select { font: inherit; }
button {
    -webkit-appearance: none;
    appearance: none;
}
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body.sidebar-open { overflow: hidden; }

/* Firefox / older-browser inert fallback */
.cyber-sidebar.is-inert,
.cyber-sidebar[inert] {
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 10001;
    padding: 0.65rem 1rem;
    color: #050607;
    background: #fff;
    border-radius: 6px;
    transform: translateY(-200%);
    transition: transform 0.2s;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, [tabindex]):focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

/* Poster hit-target links keep focus after click — don't draw a white frame around art. */
.card-open:focus,
.card-open:focus-visible,
.movie-card:focus,
.movie-card:focus-visible {
    outline: none;
}

.movie-card:has(.card-open:focus-visible) .poster-wrapper {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

/* Native selects: keep option lists readable (Windows paints light popups otherwise) */
select {
    color-scheme: dark;
}
select option {
    background-color: #0a0a0c;
    color: #f8fafc;
}

/* Scrollbar - Minimal */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); }

/* Typography */
h1, h2, h3, h4 { 
    font-family: var(--font-display); 
    font-weight: 400; 
    letter-spacing: -0.02em; 
}

/* Utilities */
.hidden { display: none !important; }

/* Loading Screen - Minimalist */
#loading-screen {
    position: fixed; inset: 0;
    background: var(--bg-base);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-logo {
    height: 64px;
    object-fit: contain;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; filter: drop-shadow(0 0 10px rgba(138, 3, 3, 0.4)); }
    50% { opacity: 1; filter: drop-shadow(0 0 25px rgba(138, 3, 3, 0.8)); }
}

.elegant-spinner {
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-white);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-status {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Top Nav */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 80;
}

.header-brand {
    cursor: pointer;
}

.header-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    cursor: pointer;
}

.brand-logo {
    height: 28px;
    object-fit: contain;
    cursor: pointer;
    filter: invert(1) drop-shadow(0 0 8px rgba(255,255,255,0.1));
    transition: filter 0.3s ease;
}

.brand-logo:hover {
    filter: invert(1) drop-shadow(0 0 12px rgba(210, 38, 38, 0.7));
}

.brand-button {
    border: 0;
    padding: 0.4rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.top-nav-actions {
    display: flex;
    gap: 1rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    transition: opacity 0.22s cubic-bezier(0, 0, 0.2, 1);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar - Fast GPU Accelerated Surface */
.cyber-sidebar {
    width: var(--sidebar-width);
    background: #0b0c10;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    height: 100dvh;
    left: 0; top: 0;
    z-index: 100;
    transform: translate3d(-100%, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.22s cubic-bezier(0, 0, 0.2, 1);
}

.cyber-sidebar.open {
    transform: translate3d(0, 0, 0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 1.5rem 1rem 1.5rem;
}

.sidebar-brand {
    cursor: pointer;
}

.sidebar-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    cursor: pointer;
}

.sidebar-brand .brand-logo {
    height: 36px;
}

.sidebar-brand h1 span {
    color: var(--text-muted);
    font-weight: 300;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1.5rem;
    flex-grow: 1;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-vip {
    margin-top: auto;
    margin-bottom: 2rem;
}

.nav-vip:hover, .nav-vip.active {
    color: var(--accent-emerald);
    background: rgba(5, 150, 105, 0.1);
}

.sidebar-footer {
    padding: 1.5rem 2rem;
    border-top: var(--glass-border);
}

.sidebar-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--text-primary);
}

.icon-btn.log-btn.active {
    color: var(--accent-gold);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

/* Main Content Area */
.main-view {
    flex-grow: 1;
    min-width: 0; 
    min-height: calc(100vh - 70px);
    min-height: calc(100dvh - 70px);
    padding-bottom: 4rem;
    position: relative;
    overflow-x: hidden;
}

/* Hero Section */
.hero-featured {
    height: 80vh;
    height: 80dvh;
    background-size: cover;
    background-position: center 20%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 5rem;
    background-image: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 45%, transparent 65%), linear-gradient(to top, var(--bg-base) 0%, rgba(0,0,0,0.35) 70%), var(--hero-image);
}

.hero-featured::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg-base) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
}

.featured-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.featured-content.hero-fading {
    opacity: 0;
    transform: translateY(14px);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.hero-meta-dot {
    color: var(--text-secondary);
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-dots {
    position: absolute;
    right: 5rem;
    bottom: 2.5rem;
    z-index: 3;
    display: flex;
    gap: 0.5rem;
}

.hero-dots button {
    width: 2rem;
    height: 4px;
    border: none;
    border-radius: 2px;
    padding: 0;
    cursor: pointer;
    background: rgba(255,255,255,0.3);
    transition: background 0.3s ease;
}

.hero-dots button.active {
    background: #fff;
}

.hero-dots button:hover {
    background: rgba(255,255,255,0.7);
}

.trending-badge {
    display: inline-block;
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.featured-content h1,
.featured-content h2 {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.featured-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.continue-badge {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
}

/* In-progress marker on history cards: red hairline + resume time, no fake
   percentage (the embeds don't report duration reliably). */
.resume-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 22px;
    background: linear-gradient(to top, rgba(138, 3, 3, 0.85) 0%, rgba(138, 3, 3, 0.25) 70%, transparent 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 3px;
    z-index: 12;
    pointer-events: none;
}

.resume-strip-label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.btn-primary {
    background: #8a0303;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background: #a30404;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(138, 3, 3, 0.55);
}

/* Sections & Carousels */
.view-section {
    padding: 2rem 5rem 1rem;
}

.view-section > h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.view-section > h3::before {
    content: '|';
    color: #ef4444;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1;
    margin-right: 0.15rem;
}

.movie-info h3::before {
    content: none;
}

.carousel-container {
    position: relative;
    width: 100%;
    /* Room for hover scale so posters don't get a hard clip "border" */
    padding-top: 0.65rem;
    margin-top: -0.65rem;
}

.carousel-arrow {
    position: absolute;
    top: 0.65rem;
    bottom: 2rem; /* above scrollbar padding */
    width: 50px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    cursor: pointer;
    /* Always visible on desktop so they stay put without hover games;
       hidden on touch via the mobile media query below. */
    z-index: 60; /* above hover-scaled cards (z-index 50) */
    opacity: 1;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow.left { left: 0; background: linear-gradient(to right, rgba(0,0,0,0.9), transparent); }
.carousel-arrow.right { right: 0; background: linear-gradient(to left, rgba(0,0,0,0.9), transparent); }
.carousel-arrow:hover { color: var(--accent-gold); }
.carousel-arrow:focus-visible { outline: 2px solid var(--accent-gold); }

.carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2rem;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.carousel-grid {
    display: flex;
    gap: 1.2rem;
}

/* Cards */
.movie-card {
    min-width: 240px;
    width: 240px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, z-index 0.4s step-start;
    position: relative;
}

.movie-card:hover {
    transform: scale(1.03) translateY(-4px);
    z-index: 50;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(138, 3, 3, 0.18);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, z-index 0s step-start;
}

.movie-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: none;
}

.poster-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: #050505;
    z-index: 1;
    border: 0;
    box-shadow: none;
}

/* Soft edge vignette on the poster only — keeps the title clean */
.poster-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 42%, rgba(138, 3, 3, 0.28) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 4;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.movie-card:hover .poster-wrapper::after,
.movie-card:focus-within .poster-wrapper::after {
    opacity: 1;
}

.poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.trailer-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
    z-index: 2;
    background: #000;
    border-radius: inherit;
    animation: fadeIn 200ms ease;
}

.poster-wrapper.trailer-playing .overlay-play {
    opacity: 0;
    transition: opacity 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.15) 38%, transparent 58%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85rem;
    z-index: 10;
}


.movie-card:hover .card-overlay,
.movie-card:focus-within .card-overlay {
    opacity: 1;
}

.anime-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    color: var(--text-primary);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

.play-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px; height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    color: white;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.movie-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-overlay .log-btn {
    align-self: flex-end;
    background: rgba(10, 10, 15, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    display: grid;
    place-items: center;
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 15;
    padding: 0;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1;
    font-family: var(--font-body);
}

.card-overlay .log-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.95);
    color: var(--bg-base);
    transform: scale(1.08);
}

.card-overlay .log-btn.active {
    background: rgba(212, 175, 55, 0.92);
    border-color: rgba(212, 175, 55, 0.95);
    color: var(--bg-base);
}

.card-overlay .remove-history-btn {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    background: rgba(10, 10, 15, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.75);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    display: grid;
    place-items: center;
    z-index: 15;
    padding: 0;
    margin: 0;
}

.card-overlay .remove-history-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: #ef4444;
    color: #ffffff;
    transform: scale(1.1);
}

/* Watchlist status badges — siblings of .continue-badge */
.progress-badge,
.watched-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-badge {
    background: rgba(138, 3, 3, 0.88);
    color: #fff;
}

.watched-badge {
    background: rgba(212, 175, 55, 0.92);
    color: #0a0a0f;
}

/* Mini status circle on watchlist cards — sibling of .log-btn, stacked beneath it */
.card-overlay .mark-btn {
    position: absolute;
    top: calc(0.6rem + 34px);
    right: 0.6rem;
    background: rgba(10, 10, 15, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    display: grid;
    place-items: center;
    z-index: 15;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1;
}

.card-overlay .mark-btn:hover {
    background: rgba(212, 175, 55, 0.92);
    border-color: rgba(212, 175, 55, 0.95);
    color: var(--bg-base);
    transform: scale(1.08);
}

/* Episode list toggle on watchlist TV cards */
.card-overlay .ep-toggle-btn {
    position: absolute;
    bottom: 0.6rem;
    left: 0.6rem;
    background: rgba(10, 10, 15, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.32rem 0.55rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 15;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.card-overlay .ep-toggle-btn:hover,
.card-overlay .ep-toggle-btn.active {
    background: rgba(138, 3, 3, 0.85);
    border-color: rgba(138, 3, 3, 0.95);
    color: #fff;
}

/* Expandable per-episode panel inside watchlist cards */
.ep-panel {
    margin: 0.5rem 0 0;
    padding: 0.65rem 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-family: var(--font-body);
}

.ep-panel[hidden] {
    display: none;
}

.ep-panel-season {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ep-panel-season-name {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
}

.ep-panel-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background 0.15s ease;
}

.ep-panel-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ep-panel-num {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    min-width: 34px;
    flex-shrink: 0;
}

.ep-panel-name {
    flex: 1;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-panel-name:hover {
    color: rgba(212, 175, 55, 0.95);
}

.ep-panel-item.watched .ep-panel-name {
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Per-episode watched toggle — player sidebar rows and watchlist panels */
.ep-watched-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(10, 10, 15, 0.55);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ep-watched-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
}

.ep-watched-btn.active {
    background: rgba(138, 3, 3, 0.9);
    border-color: rgba(138, 3, 3, 0.95);
    color: #fff;
    box-shadow: 0 0 8px rgba(138, 3, 3, 0.45);
}

/* Anchor the toggle at the top-right of player-sidebar episode rows */
.episode-item:has(> .ep-watched-btn) {
    position: relative;
    padding-right: 2.75rem;
}

.episode-item > .ep-watched-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

/* Player sidebar episodes — grid of still cards that reveal title + description on hover */
.episode-sidebar .episode-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    align-content: start;
    min-height: 0;
    padding: 1rem;
}

.episode-sidebar .episode-item {
    position: relative;
    /* 16:9 via height:0 + padding-bottom, NOT aspect-ratio: grid track sizing
       only sees the item's content contribution, and the card's children are
       all absolutely positioned (content = 0), so aspect-ratio left the tracks
       collapsed and rows overlapped vertically. Padding feeds the track. */
    height: 0;
    padding: 0 0 56.25%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.episode-sidebar .episode-item.active {
    border-color: rgba(138, 3, 3, 0.85);
    box-shadow: 0 0 0 1px rgba(138, 3, 3, 0.85), 0 0 14px rgba(138, 3, 3, 0.35);
}

.ep-card-media {
    position: absolute;
    inset: 0;
}

.ep-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ep-card-fallback {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(34, 34, 44, 0.9), rgba(10, 10, 15, 0.95));
}

.episode-sidebar .episode-item .ep-num {
    position: absolute;
    top: 0.4rem;
    left: 0.45rem;
    z-index: 2;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    background: rgba(5, 6, 8, 0.72);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
}

/* Hover reveal: dark gradient washes over the still with the episode's title and description */
.ep-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 0.65rem;
    background: linear-gradient(to top, rgba(5, 6, 8, 0.92) 30%, rgba(5, 6, 8, 0.35) 100%);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    pointer-events: none;
}

.episode-item:hover .ep-card-overlay,
.episode-item:focus-visible .ep-card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.ep-card-overlay .ep-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-card-overlay .ep-overview {
    font-size: 0.7rem;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.85);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Watched toggle hugs the top-right corner of the thumbnail */
.episode-sidebar .episode-item > .ep-watched-btn {
    top: 0.4rem;
    right: 0.4rem;
    z-index: 2;
}

.overlay-play {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.65));
    pointer-events: none;
}

.card-open {
    position: absolute;
    inset: 0;
    z-index: 1;
    color: #fff;
}
.card-title-link { color: inherit; text-decoration: none; }
.card-title-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.card-info { padding-top: 0.75rem; }
.card-info h3 {
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poster-placeholder,
.cast-placeholder,
.person-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #89909c;
    background: radial-gradient(circle at 50% 25%, #262832, #0c0d11 70%);
}
.poster-placeholder span,
.cast-placeholder,
.person-placeholder { font: 700 3rem var(--font-display); }
.poster-placeholder small { font-size: 0.65rem; letter-spacing: 0.15em; }

.movie-info {
    margin-top: 0.8rem;
}

.movie-info h3 {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 420 Zone Specifics - Elegant Frosted Glass */
.vip-420-header {
    text-align: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(to bottom, rgba(5, 150, 105, 0.05), transparent);
}

.vip-420-header h2 {
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent-emerald);
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

/* Player Interface - YouTube Style Cinema Layout */
.player-page-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100vh - 69px);
    min-height: calc(100dvh - 69px);
    background: #000;
    padding: 1.5rem;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    box-sizing: border-box;
}

.player-stage-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

.player-stage-grid.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 420px;
    /* Definite row: long seasons can never stretch the page — the episode sidebar
       fills the row and scrolls internally instead. */
    grid-template-rows: calc(100vh - 8rem);
    grid-template-rows: calc(100dvh - 8rem);
}

.player-stage-grid.has-sidebar .player-frame-container {
    flex: 1;
    min-height: 0;
    aspect-ratio: auto;
}

.player-below-stage {
    width: 100%;
    max-width: 1200px;
}

.player-main {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

/* Server Selection */
.server-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0,0,0,0.4);
    border-bottom: var(--glass-border);
}

.server-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.server-select-dropdown {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    outline: none;
    color-scheme: dark;
}

.server-select-dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
}

.server-select-dropdown:focus,
.server-select-dropdown:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28);
}

.server-next-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.server-select-dropdown option {
    background-color: #0a0a0c;
    color: #f8fafc;
}

.server-status {
    margin-left: auto;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--font-display);
}

.providers-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.provider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.provider-label {
    min-width: 4.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font-display);
}
.provider-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.provider-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}
.provider-chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.provider-empty,
.provider-note,
.person-known-for-line {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.provider-note {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}
.list-transfer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.list-transfer-btn {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.list-transfer-btn:hover {
    background: rgba(138, 3, 3, 0.25);
    border-color: rgba(138, 3, 3, 0.6);
    color: #fff;
    box-shadow: 0 0 12px rgba(138, 3, 3, 0.25);
}

.player-frame-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    background: #000;
}

.player-frame-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.player-frame-container:fullscreen,
.player-frame-container:-webkit-full-screen,
.player-frame-container:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #000;
}

.player-frame-container:fullscreen iframe,
.player-frame-container:-webkit-full-screen iframe,
.player-frame-container:-moz-full-screen iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.episode-sidebar {
    width: 420px;
    background: var(--bg-surface);
    border-left: var(--glass-border);
    display: flex;
    flex-direction: column;
    /* Fill the definite stage row; long seasons scroll internally instead of stretching the page */
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.sidebar-top {
    padding: 2rem 1.5rem 1rem;
}

.sidebar-top h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.season-picker {
    position: relative;
    width: 100%;
}

.season-select {
    width: 100%;
    background-color: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%94a3b8' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.season-select:focus,
.season-select:focus-visible,
.season-select[aria-expanded="true"] {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: none;
}

.season-menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: #0a0a0c;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    max-height: min(50vh, 280px);
    overflow-y: auto;
}

.season-menu-item {
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
    color: #f8fafc;
    font-size: 0.9rem;
    cursor: pointer;
}

.season-menu-item:hover,
.season-menu-item:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.season-menu-item.is-active {
    background: rgba(138, 3, 3, 0.35);
    color: #fff;
}

.episode-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.episode-item {
    position: relative;
    padding: 1rem 2.75rem 1rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.episode-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.episode-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.ep-num {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.ep-name {
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Modals */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}

/* Modern Search */
.modern-search {
    padding: 0;
    display: block;
}

.search-header-sticky {
    position: sticky;
    top: 69px;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 70;
    padding: 1.25rem 5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 1.5rem;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0 1.5rem;
    transition: all 0.3s ease;
    max-width: 800px;
}

.search-input-container:focus-within {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 0 20px rgba(255,255,255,0.05);
}

.search-input-container input:focus,
.search-input-container input:focus-visible {
    outline: none;
}

.search-icon {
    color: var(--text-secondary);
    margin-right: 1rem;
}

.search-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1.25rem 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.25rem;
}

.search-input-container input::placeholder {
    color: var(--text-muted);
}

/* The input is type="search", which browsers stamp with their own X — kill it so only our styled .clear-search shows */
.search-input-container input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

.clear-search {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.clear-search:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.search-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
    max-width: 100%;
}

.search-filters {
    display: flex;
    gap: 0.5rem;
    margin-top: 0;
    flex-wrap: wrap;
}

.minimalist-discover {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    gap: 0.6rem !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.minimalist-discover .filter-group {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.compact-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 42px;
    min-height: 42px;
    padding: 0.45rem 2.2rem 0.45rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
}

.compact-select option {
    background: #0d0f15;
    color: #fff;
    padding: 0.5rem;
}

.compact-input {
    height: 42px;
    min-height: 42px;
    width: 145px;
    padding: 0.45rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    box-sizing: border-box;
}

.compact-input::placeholder {
    color: var(--text-muted);
}

.compact-btn {
    height: 42px;
    min-height: 42px;
    padding: 0.45rem 0.4rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.compact-select:hover, .compact-input:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}

.compact-select:focus, .compact-input:focus {
    border-color: var(--accent-primary);
    color: #fff;
}

.compact-btn:hover {
    color: #fff;
    border-bottom-color: #8a0303;
}

.roulette-btn {
    height: 42px;
    min-height: 42px;
    padding: 0.45rem 1.3rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.25;
    text-transform: uppercase;
    color: #fff;
    background: #8a0303;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    outline: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(138, 3, 3, 0.45), inset 0 0 12px rgba(255, 255, 255, 0.06);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.roulette-btn:hover {
    background: #a30404;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 24px rgba(163, 4, 4, 0.65), inset 0 0 12px rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid rgba(255, 255, 255, 0.16);
    color: var(--text-secondary);
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    border-left-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(138, 3, 3, 0.16);
    color: #fff;
    border-color: rgba(138, 3, 3, 0.45);
    border-left-color: #8a0303;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(138, 3, 3, 0.22);
}

/* Watchlist page toolbar — filter pills, sort select, surprise me */
.watchlist-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.5rem 5rem 0;
}

.watchlist-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.watchlist-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Watchlist library stats (header widget) */
.wl-stats {
    display: flex;
    gap: 1.5rem;
}
.wl-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.wl-stat b {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}
.wl-stat span {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

/* Your-rating stars — fill driven by --fill (0, 0.5, 1) per star */
.wl-stars {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}
.wl-suggest {
    appearance: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.35rem;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}
.wl-suggest:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.wl-star {
    appearance: none;
    border: none;
    background: none;
    padding: 1px;
    cursor: pointer;
    line-height: 1;
}
.wl-star span {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.22);
    background: linear-gradient(90deg, var(--accent-gold) calc(var(--fill, 0) * 100%), rgba(255, 255, 255, 0.22) 0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.12s ease;
}
.wl-star:hover span {
    transform: scale(1.2);
}

/* Watchlist grid card extras */
.wl-card-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.wl-tmdb-score {
    color: var(--accent-gold);
    font-weight: 700;
}
.wl-card-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.35rem;
}
.wl-log-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.45);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.wl-log-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.wl-log-btn.has-review {
    border-color: rgba(212, 175, 55, 0.6);
    color: var(--accent-gold);
}

/* Watchlist list view — dense diary rows */
.wl-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.wl-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.028);
    transition: border-color 0.18s ease, background 0.18s ease;
}
.wl-row:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
}
.wl-row-thumb {
    flex: none;
    width: 46px;
    height: 69px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}
.wl-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wl-row-thumb-fallback {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-muted);
}
.wl-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.wl-row-title {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
}
.wl-row-title a {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wl-row-title a:hover {
    color: var(--accent-gold);
}
.wl-row-year {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    flex: none;
}
.wl-row-sub {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.wl-row-review {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wl-row-side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.wl-status-pill {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
}
.wl-status-watching {
    border-color: rgba(212, 175, 55, 0.55);
    color: var(--accent-gold);
}
.wl-status-watched {
    border-color: rgba(74, 222, 128, 0.5);
    color: #4ade80;
}
.wl-row-actions {
    display: flex;
    gap: 0.4rem;
}
.wl-remove-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.45);
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.wl-remove-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Nudge banner — watched but never rated */
.wl-nudge {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: calc(100% - 10rem);
    margin: 1.25rem 5rem 0;
    padding: 0.9rem 1.2rem;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.03));
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.wl-nudge:hover {
    border-color: rgba(212, 175, 55, 0.7);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.05));
}
.wl-nudge-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.wl-nudge-text b {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-gold);
}
.wl-nudge-text span {
    font-size: 0.76rem;
    color: var(--text-secondary);
}
.wl-nudge-cta {
    flex: none;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
}

/* Your take — personal layer on the details page */
.details-take {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.details-take-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}
.details-take-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.details-take-row .wl-stars .wl-star span {
    font-size: 1.5rem;
}
.details-take-review {
    margin: 0;
    font-size: 0.88rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--text-secondary);
}
.details-take-prompt {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Diary entry modal */
.diary-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    animation: set-panel-in 0.2s ease;
}
.diary-modal-card {
    width: min(480px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: #141416;
    padding: 1.25rem 1.25rem 1.1rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.diary-modal-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.1rem;
}
.diary-modal-poster {
    width: 52px;
    height: 78px;
    object-fit: cover;
    border-radius: 8px;
    flex: none;
}
.diary-modal-titles {
    flex: 1;
    min-width: 0;
}
.diary-modal-kicker {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--accent-gold);
}
.diary-modal-titles h3 {
    margin: 0.2rem 0 0;
    font-size: 1.05rem;
    font-weight: 650;
}
.diary-modal-close {
    appearance: none;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    align-self: flex-start;
}
.diary-modal-close:hover {
    color: var(--text-primary);
}
.diary-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1rem;
}
.diary-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}
.diary-optional {
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
}
.diary-modal-card .wl-stars .wl-star span {
    font-size: 1.7rem;
}
.diary-date {
    width: 100%;
    color-scheme: dark;
}
.diary-review {
    width: 100%;
    resize: vertical;
    min-height: 90px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.85rem;
    line-height: 1.55;
    padding: 0.65rem 0.8rem;
}
.diary-review:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.55);
}
.diary-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.25rem;
}
@media (max-width: 900px) {
    .wl-nudge {
        width: calc(100% - 2rem);
        margin: 1rem 1rem 0;
    }
}
@media (max-width: 560px) {
    .wl-row-side {
        align-items: flex-start;
    }
    .wl-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 900px) {
    .watchlist-toolbar {
        padding: 1.25rem 1rem 0;
    }
}

.modern-search .results-grid {
    padding: 3.5rem 5rem 5rem;
}
.modern-search .movie-card { scroll-margin-top: 260px; }

.search-discover {
    padding: 1rem 0 0;
}
.search-discover[hidden] {
    display: none !important;
}
.search-discover .placeholder-msg {
    min-height: 0;
    padding: 1rem 0 0.25rem;
    text-align: left;
    justify-content: flex-start;
}
.search-discover .discover-panel {
    margin-bottom: 0;
}

/* Filters collapse behind one toggle; roulette sits opposite it. */
.discover-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.discover-toggle-row .roulette-btn {
    margin-left: auto;
}
.discover-active-count {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
}
.discover-person-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.search-discover #discover-panel {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.search-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 0;
    color: var(--text-secondary);
    text-align: center;
}

.search-empty-state svg {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.search-empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.search-loading {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 5rem 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem 1.5rem;
}

.results-grid .movie-card,
.person-credits-grid .movie-card {
    width: 100%;
    min-width: 0;
}

/* Auth View */
.auth-view {
    display: flex; align-items: center; justify-content: center;
    height: 100vh;
}

.auth-card {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    padding: 4rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--glass-shadow);
}

.avatar-selector {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.avatar-option {
    cursor: pointer;
    position: relative;
    display: inline-block;
}

.avatar-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.avatar-option input:focus-visible + .avatar-icon { outline: 2px solid rgba(255, 255, 255, 0.4); outline-offset: 2px; }

.avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
}

.avatar-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(60%);
    transition: filter 0.3s ease;
}

.avatar-option input:checked + .avatar-icon img {
    filter: grayscale(0%);
}

.avatar-option input:checked + .avatar-icon {
    border-color: var(--accent-primary);
    background: rgba(138, 3, 3, 0.2);
    box-shadow: 0 0 15px rgba(138, 3, 3, 0.6);
    transform: scale(1.1);
}

.avatar-option:hover .avatar-icon {
    border-color: rgba(138, 3, 3, 0.5);
}

.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    border-radius: 6px;
}

.input-group input:focus {
    border-color: var(--text-secondary);
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

/* Feature 2: Details & Cast Pages */
.hero-details {
    width: 100%;
    min-height: 85vh;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: flex-end;
    padding: 5rem;
    background-image: linear-gradient(to top, var(--bg-base) 0%, transparent 80%), linear-gradient(to right, var(--bg-base) 0%, rgba(10,10,15,0.65) 45%, transparent 100%), var(--details-image);
}
.details-content-wrapper {
    display: flex;
    gap: 4rem;
    align-items: flex-end;
    max-width: 1400px;
}
.details-poster img {
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.details-poster .detail-placeholder { width: 300px; aspect-ratio: 2 / 3; border-radius: 12px; }
.details-info {
    max-width: 800px;
    background: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.details-info h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
    color: #ffffff;
}
.year-span {
    font-weight: 500;
    font-size: 0.82em;
    color: rgba(248, 250, 252, 0.55);
    margin-left: 0.25rem;
}
.details-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.rating-score {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.rating-score-label {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.rating-score-value {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rating-score--muted {
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.08em;
}
.details-overview {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #e2e8f0;
    margin-bottom: 2.5rem;
}
.details-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    row-gap: 0.6rem;
}
/* Inline margin-left styles on action buttons fight the flex gap and cause
   overflow — neutralize them; the gap above owns spacing now. */
.details-actions > * { margin-left: 0 !important; }
@media (max-width: 720px) {
    .details-actions .btn-primary,
    .details-actions .btn-secondary,
    .details-actions .btn-gold,
    .details-actions .btn-quiet {
        padding-inline: 1rem;
        font-size: 0.8rem;
    }
}
.cast-grid {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
}
.cast-card {
    min-width: 185px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}
.cast-card:hover {
    transform: scale(1.05);
}
.cast-card:focus-visible { transform: translateY(-4px); }
.cast-card img {
    width: 100%;
    height: 278px;
    object-fit: cover;
}
.cast-info {
    padding: 1rem;
}
.cast-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.cast-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.person-layout {
    padding: 100px 5rem 5rem;
}
.person-header {
    display: flex;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: flex-start;
}
.person-photo {
    width: 300px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    flex-shrink: 0;
    object-fit: cover;
    aspect-ratio: 2 / 3;
    max-height: 450px;
}
.person-placeholder { min-width: 300px; aspect-ratio: 2 / 3; }
.person-info h1 {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 1rem;
}
.person-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.person-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e2e8f0;
    max-width: 900px;
}
.person-credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem 1.5rem;
}



/* Franchise Page */
.franchise-page-header {
    text-align: center;
    padding: 2rem 0 3rem;
}
.franchise-page-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 0.12em;
    color: var(--text-primary);
}
.franchise-section .view-section h3 {
    flex-wrap: wrap;
}

/* Franchise grid — compact first-poster tiles that expand into a full-width fan-out */
.franchise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    padding-bottom: 2rem;
}
.franchise-tile {
    min-width: 0;
}
.franchise-tile.open {
    grid-column: 1 / -1;
}
.franchise-tile-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 15, 20, 0.6);
}
.franchise-tile-toggle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    background: transparent;
    display: block;
    text-align: left;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
.franchise-tile-toggle:hover {
    background: rgba(138, 3, 3, 0.18);
    box-shadow: inset 0 0 0 1px rgba(138, 3, 3, 0.55), 0 0 14px rgba(138, 3, 3, 0.35);
}
.franchise-tile-toggle:active {
    background: rgba(138, 3, 3, 0.3);
    box-shadow: inset 0 0 0 1px rgba(138, 3, 3, 0.75), 0 0 8px rgba(138, 3, 3, 0.3);
}
.franchise-tile-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.franchise-tile-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-muted);
}
.franchise-tile-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.88));
    pointer-events: none;
    transition: background 0.25s ease;
}
.franchise-tile-toggle:hover .franchise-tile-scrim {
    background: linear-gradient(180deg, rgba(138, 3, 3, 0.16) 42%, rgba(0, 0, 0, 0.88));
}
.franchise-tile-count {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.55);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    pointer-events: none;
    border: 1px solid transparent;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.franchise-tile-toggle:hover .franchise-tile-count {
    border-color: rgba(138, 3, 3, 0.6);
    background: rgba(138, 3, 3, 0.35);
    box-shadow: 0 0 8px rgba(138, 3, 3, 0.3);
}
.franchise-tile-genre {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    pointer-events: none;
}
.franchise-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0 1.5rem;
}
.franchise-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.franchise-chip {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted, #a0a6ad);
    background: rgba(20, 22, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    padding: 0.38rem 0.85rem;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.franchise-chip:hover {
    color: #fff;
    border-color: rgba(252, 165, 165, 0.5);
    border-left-color: rgba(252, 165, 165, 0.6);
}
.franchise-chip.active {
    color: #fff;
    background: rgba(138, 3, 3, 0.16);
    border-color: rgba(138, 3, 3, 0.45);
    border-left-color: #8a0303;
    box-shadow: 0 0 10px rgba(138, 3, 3, 0.2);
}
.franchise-sort select {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted, #a0a6ad);
    background: rgba(20, 22, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    padding: 0.38rem 2rem 0.38rem 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a0a6ad' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}
.franchise-sort select:hover {
    color: #fff;
    border-color: rgba(252, 165, 165, 0.5);
}
.franchise-tile-name {
    position: absolute;
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fff;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    pointer-events: none;
}
.franchise-tile-arrow {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(138, 3, 3, 0.55);
    background: rgba(138, 3, 3, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 4;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.franchise-tile-arrow:hover {
    background: rgba(138, 3, 3, 0.55);
    border-color: rgba(138, 3, 3, 0.85);
    box-shadow: 0 0 14px rgba(138, 3, 3, 0.45);
    transform: translateY(-50%) scale(1.08);
}
.franchise-tile-arrow:active {
    background: rgba(138, 3, 3, 0.8);
    border-color: rgba(138, 3, 3, 1);
    box-shadow: 0 0 6px rgba(138, 3, 3, 0.35);
    transform: translateY(-50%) scale(0.96);
}

/* Expanded panel */
.franchise-tile-panel {
    display: none;
}
.franchise-tile.open .franchise-tile-cover {
    display: none;
}
.franchise-tile.open .franchise-tile-panel {
    display: block;
}
.franchise-panel-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}
.franchise-panel-bar {
    width: 4px;
    height: 20px;
    border-radius: 2px;
    flex-shrink: 0;
}
.franchise-panel-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}
.franchise-panel-quote {
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.franchise-panel-close {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 15, 20, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.franchise-panel-close:hover {
    background: rgba(212, 175, 55, 0.9);
    color: var(--bg-base);
    transform: rotate(90deg);
}

/* Deck (fan-out) — shared */
.franchise-deck-wrap {
    position: relative;
}
.franchise-deck {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.franchise-deck-wrap .carousel-arrow {
    bottom: 0.75rem; /* match the deck's bottom padding instead of the rows' 2rem */
}
.franchise-group-heading {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    margin: 1.6rem 0 0.9rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-muted);
}
.franchise-group-heading span {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--accent-gold);
}
.franchise-search {
    min-width: 0;
    max-width: 220px;
    width: 100%;
    padding: 0.5rem 0.85rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: var(--text-primary);
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 8px;
    outline: none;
}
.franchise-search:focus {
    border-color: var(--accent-gold);
}
.franchise-deck::-webkit-scrollbar {
    display: none;
}
.franchise-deck-scroller {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
}
.franchise-deck-first {
    flex: 0 0 auto;
}
.franchise-deck-rest {
    display: flex;
    gap: 1.2rem;
    width: 0;
    flex: 0 0 auto;
    overflow: hidden;
    opacity: 0;
    transition: width 0.55s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.45s ease;
}
.franchise-tile.open .franchise-deck-rest {
    opacity: 1;
}

/* Toast */
.alexandria-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15,15,20,0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.35s, transform 0.35s;
    pointer-events: none;
}
.alexandria-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Details Page Trailer */
.details-trailer-section {
    margin-top: 3rem;
}
.trailer-container {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.trailer-container iframe {
    width: 100%;
    height: 100%;
}

/* Completed interface states and controls */
.placeholder-msg {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
    font: 600 0.85rem var(--font-display);
    letter-spacing: 0.12em;
    text-align: center;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 14px #ef4444; animation: pulse 1.4s infinite; }
.view-header { padding: 3rem 5rem 1rem; }
.view-header h2 { font-size: clamp(2.5rem, 6vw, 5rem); text-transform: uppercase; }
.filtered-view { padding-top: 0; }

/* Genre Explorer Dropdown (Cineby Style) */
.genre-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.genre-dropdown-trigger {
    background: transparent;
    border: none;
    padding: 0;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    transition: opacity 0.2s ease;
}

.genre-dropdown-trigger:hover {
    opacity: 0.9;
}

.genre-red-bar {
    color: #ef4444;
    font-weight: 800;
    font-size: 1.5rem;
    margin-right: 0.15rem;
}

.genre-arrow-icon {
    width: 18px;
    height: 18px;
    color: #ef4444;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.genre-dropdown-wrapper.open .genre-arrow-icon {
    transform: rotate(180deg);
}

.genre-dropdown-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 120;
    width: 250px;
    max-height: 380px;
    overflow-y: auto;
    background: #0d0f15;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85);
    padding: 0.5rem;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.genre-dropdown-popover::-webkit-scrollbar {
    width: 5px;
}
.genre-dropdown-popover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.genre-dropdown-wrapper.open .genre-dropdown-popover {
    display: block;
    animation: genrePopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes genrePopIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.genre-popover-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.genre-popover-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.genre-popover-item.active {
    background: rgba(239, 68, 68, 0.12);
}

.genre-popover-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #e2e8f0;
}

.genre-popover-item.active .genre-popover-text {
    color: #ef4444;
    font-weight: 700;
}

/* Watchlist Filter Dropdown — mirrors genre dropdown but inline toolbar height */
.filter-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.filter-dropdown-trigger {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid rgba(255, 255, 255, 0.16);
    color: var(--text-secondary);
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    border-left-color: rgba(255, 255, 255, 0.4);
    color: var(--text-primary);
}

.filter-dropdown-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(138, 3, 3, 0.4);
}

.filter-arrow-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-gold);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.filter-dropdown-wrapper.open .filter-arrow-icon {
    transform: rotate(180deg);
}

.filter-dropdown-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 120;
    min-width: 200px;
    max-height: 320px;
    overflow-y: auto;
    background: #0d0f15;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85);
    padding: 0.4rem;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.filter-dropdown-popover::-webkit-scrollbar {
    width: 5px;
}
.filter-dropdown-popover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.filter-dropdown-wrapper.open .filter-dropdown-popover {
    display: block;
    animation: genrePopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-popover-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.filter-popover-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.filter-popover-item.active {
    background: rgba(138, 3, 3, 0.16);
    color: #fff;
}

.filter-popover-item.active .filter-popover-text {
    color: #fff;
    font-weight: 600;
}

.filter-popover-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: inherit;
}

/* Surprise Me button — distinct gold-accent style, not btn-gold */
.btn-surprise {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(180, 140, 30, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #d4af37;
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-surprise:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(180, 140, 30, 0.18) 100%);
    border-color: rgba(212, 175, 55, 0.6);
    color: #fff;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
    transform: translateY(-1px);
}

.btn-surprise:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.4);
}

.btn-surprise:active {
    transform: translateY(0) scale(0.98);
}

.btn-surprise svg {
    flex-shrink: 0;
}

/* Category Hero Banner (Movies, TV, Anime) */
.category-hero-banner {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-image: var(--hero-backdrop);
    background-size: cover;
    background-position: center 25%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.category-hero-overlay {
    width: 100%;
    height: 100%;
    padding: 5rem 5rem 2.5rem;
    background: linear-gradient(180deg, rgba(11, 12, 16, 0.35) 0%, rgba(11, 12, 16, 0.96) 100%),
                linear-gradient(90deg, rgba(11, 12, 16, 0.92) 0%, transparent 65%);
    display: flex;
    align-items: flex-end;
}

.category-hero-content {
    max-width: 680px;
}

.category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(138, 3, 3, 0.25);
    border: 1px solid rgba(138, 3, 3, 0.6);
    color: #f8fafc;
    font-family: var(--font-headline);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    border-radius: 4px;
    margin-bottom: 0.85rem;
}

.category-hero-content h1 {
    font-family: var(--font-headline);
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    color: #fff;
    margin: 0 0 0.4rem 0;
    line-height: 0.98;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.category-subtitle {
    font-family: var(--font-body);
    color: var(--accent-gold);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
}

.category-desc {
    color: rgba(248, 250, 252, 0.75);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.resume-label { color: var(--accent-gold); font-size: 0.68rem; letter-spacing: 0.14em; }

.safe-zone-stamp {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    border: 2px solid #b42323;
    border-radius: 50%;
    color: #d74747;
    font: 700 2rem var(--font-display);
}
.auth-subtitle { margin: -1.4rem 0 2rem; color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.12em; text-align: center; }
.auth-footer { margin-top: 1.5rem; color: var(--text-secondary); font-size: 0.75rem; text-align: center; }
.auth-footer a { color: #fff; text-underline-offset: 4px; }
.btn-primary.full { width: 100%; }
.auth-card.switching { opacity: 0; transform: translateY(8px); transition: 0.25s ease; }

#back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 80;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #fff;
    background: rgba(15,16,20,0.88);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: 0.2s ease;
    cursor: pointer;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

.error-state {
    min-height: calc(100vh - 70px);
    min-height: calc(100dvh - 70px);
    max-width: 680px;
    margin: 0 auto;
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
.error-mark { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 2rem; border: 2px solid #8a2323; border-radius: 50%; color: #d94a4a; font: 700 2.5rem var(--font-display); }
.eyebrow { color: #d4af37 !important; font: 700 0.72rem var(--font-display); letter-spacing: 0.16em; }
.error-state h1 { margin: 0.35rem 0 1rem; font-size: clamp(2.5rem, 7vw, 5rem); line-height: 0.95; text-transform: uppercase; }
.error-state > p { max-width: 55ch; color: var(--text-secondary); }
.error-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 3px solid #8a0303;
    border-radius: 4px;
    background: transparent;
    color: #e2e8f0;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    border-left-color: #a30404;
    color: #ffffff;
    transform: translateY(-1px);
}

.sector-widget {
    position: absolute;
    right: 5rem;
    bottom: 5rem;
    z-index: 3;
    width: min(320px, calc(100% - 3rem));
    padding: 1.1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 3px solid #8a0303;
    border-radius: 4px;
    background: #0f1016;
}

.sector-label {
    color: var(--accent-gold);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    font-weight: 700;
    text-transform: uppercase;
}

.sector-widget-content h4 {
    margin: 0.35rem 0 0.2rem;
    font-family: var(--font-headline);
    font-size: 1.15rem;
    color: #fff;
}

.sector-widget-content p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.inline-error { grid-column: 1 / -1; padding: 4rem 1rem; color: var(--text-secondary); text-align: center; }
.inline-error button { margin-left: 0.5rem; border: 0; color: #fff; background: none; text-decoration: underline; cursor: pointer; }
.noscript-message { padding: 2rem; color: #fff; background: #050607; }
.alexandria-toast { text-align: center; }

@media (max-width: 900px) {
    .top-nav { padding: 0.8rem 1rem; }
    .hero-featured { min-height: 650px; height: calc(100vh - 62px); height: calc(100dvh - 62px); padding: 3rem 2rem; }
    .featured-content { max-width: 600px; }
    .featured-content h1, .featured-content h2 { font-size: clamp(2.75rem, 10vw, 4.5rem); }
.hero-dots { right: 2rem; bottom: 2rem; }
    .view-section, .modern-search .results-grid { padding-left: 2rem; padding-right: 2rem; }
    .search-header-sticky, .view-header { padding-left: 2rem; padding-right: 2rem; }
    .search-discover { padding-left: 0; padding-right: 0; }
    .movie-card { min-width: 190px; width: 190px; }
    .hero-details { padding: 3rem 2rem; }
    .details-content-wrapper { gap: 2rem; align-items: center; }
    .details-poster img, .details-poster .detail-placeholder { width: 230px; }
    .details-info { padding: 2rem; }
    .details-info h1 { font-size: 2.6rem; }
    .person-layout { padding: 5rem 2rem; }
    .person-header { gap: 2rem; }
    .player-page-container { padding: 1rem; gap: 1.5rem; }
    .player-stage-grid.has-sidebar { grid-template-columns: 1fr; grid-template-rows: auto; }
    .player-main { flex: none; border-radius: 8px; }
    .player-stage-grid.has-sidebar .player-frame-container { flex: none; min-height: auto; aspect-ratio: 16 / 9; }
    .episode-sidebar {
        width: 100%;
        height: auto;
        max-height: min(52vh, 480px);
        min-height: 280px;
        border-left: 0;
        border-top: var(--glass-border);
        overflow: visible;
    }
    .discover-panel { flex-direction: column; align-items: stretch; gap: 1rem; }
    .filter-group { width: 100%; }
    .filter-group select, .filter-group input { width: 100%; }
}

@media (max-width: 620px) {
    .brand-logo { height: 23px; max-width: 180px; }
    .top-nav-actions { gap: 0.5rem; }
    .account-menu, .changelog-menu { right: 1rem; }
    .cyber-sidebar { width: min(86vw, 320px); height: 100vh; height: 100dvh; }
    .hero-featured { min-height: 610px; padding: 2rem 1.25rem 9.5rem; background-position: 58% center; }
    .featured-content p { font-size: 0.98rem; margin-bottom: 1.5rem; -webkit-line-clamp: 4; line-clamp: 4; }
    .hero-dots { left: 1.25rem; right: auto; bottom: 1.5rem; }
    .view-section, .modern-search .results-grid { padding-left: 1.25rem; padding-right: 1.25rem; }
    .view-section { padding-top: 1.5rem; }
    .search-header-sticky, .view-header { top: 59px; padding: 1.25rem; }
    .search-discover { padding-left: 0; padding-right: 0; }
    .search-input-container { padding: 0 1rem; width: 100%; max-width: none; }
    .search-input-container input { min-width: 0; padding: 1rem 0; font-size: 1rem; }
    .search-filters {
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.15rem;
    }
    .search-filters::-webkit-scrollbar { display: none; }
    .filter-btn { flex: 0 0 auto; }
    .results-grid, .person-credits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 0.75rem; }
    .results-grid .movie-card, .person-credits-grid .movie-card { min-width: 0; width: 100%; }
    .carousel-arrow { display: none; }
    .carousel-grid { gap: 0.8rem; }
    .movie-card { min-width: 145px; width: 145px; }
    .card-overlay { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 48%); }
    .overlay-play { width: 34px; height: 34px; opacity: 0.88; }
    .card-overlay .log-btn { width: 34px; height: 34px; font-size: 1.2rem; }
    .hero-details { min-height: auto; padding: 3rem 1.25rem; align-items: center; }
    .details-content-wrapper { width: 100%; flex-direction: column; align-items: stretch; }
    .details-poster { display: none; }
    .details-info { padding: 1.35rem; border-radius: 16px; }
    .details-info h1 { font-size: 2.2rem; }
    .details-meta, .person-meta { flex-wrap: wrap; gap: 0.6rem 1rem; }
    .details-overview { font-size: 1rem; }
    .person-layout { padding: 3rem 1.25rem; }
    .person-header { flex-direction: column; }
    .person-photo, .person-placeholder { width: min(240px, 80vw); min-width: 0; margin: 0 auto; }
    .person-info h1 { font-size: 2.5rem; text-align: center; }
    .auth-view { min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px); height: auto; padding: 1.25rem; }
    .auth-card { padding: 2rem 1.25rem; }
    .player-layout { min-height: calc(100vh - 59px); min-height: calc(100dvh - 59px); }
    .server-controls { align-items: stretch; flex-direction: column; gap: 0.5rem; }
    .server-status { margin-left: 0; }
    .server-select-dropdown { width: 100%; }
    .sidebar-top { padding: 1.25rem 1rem 0.75rem; }
    .episode-list { padding: 0.75rem 1rem 1.25rem; }
    .episode-sidebar { height: auto; max-height: min(48vh, 420px); min-height: 240px; }
    .error-state { align-items: center; text-align: center; }
    .error-actions { justify-content: center; }
    .year-range { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
/* Discover Hub Filters */
.discover-panel {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.filter-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-display);
    letter-spacing: 1px;
}
.filter-group select, .filter-group input {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.2s ease;
    color-scheme: dark;
}
.filter-group select:focus, .filter-group input:focus,
.filter-group select:focus-visible, .filter-group input:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28);
}
.filter-group select option {
    background-color: #0a0a0c;
    color: #f8fafc;
}
.year-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.person-credits-section {
    margin-top: 3rem;
}
.person-filmography {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.person-filmography-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.25rem;
}
.person-filmography-heading h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; letter-spacing: -0.01em; }
.person-filmography-heading p { margin: 0.35rem 0 0; color: var(--text-secondary); }
.person-credits-count { color: var(--accent-gold); font-family: var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.72rem; }
.person-credit-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.person-credit-tabs,
.person-credit-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.person-credit-tabs button,
.person-credit-roles button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.person-credit-tabs button[aria-pressed="true"],
.person-credit-roles button[aria-pressed="true"] {
    border-color: var(--accent-gold);
    color: var(--text-primary);
    background: rgba(212, 175, 55, 0.08);
}
.person-credit-meta { margin: 0.4rem 0 0; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.person-credits-more { margin-top: 1.5rem; text-align: center; }
.person-credits-more button { background: transparent; border: 1px solid rgba(255, 255, 255, 0.14); color: var(--text-primary); border-radius: 999px; padding: 0.75rem 1.25rem; cursor: pointer; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; }
.person-credits-more button:hover { border-color: var(--accent-gold); }
.person-credits-empty { color: var(--text-muted); margin-top: 1.5rem; }
@media (max-width: 640px) {
    .person-filmography-heading { flex-direction: column; align-items: start; gap: 0.5rem; }
}
/* Person Bio Expand/Collapse */
.person-bio-collapsed {
    max-height: 200px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
.bio-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--accent-primary);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-top: 0.75rem;
    transition: all 0.2s ease;
}
.bio-toggle:hover {
    border-color: var(--accent-primary);
    background: rgba(138, 3, 3, 0.15);
}

/* ── Watch Party ───────────────────────────────────────── */
.party-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.25rem;
    height: calc(100vh - 88px);
    padding: 0 1.5rem 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

.party-stage {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: 0.85rem;
}

.party-topbar {
    display: flex;
    align-items: baseline;
    gap: 0.85rem 1rem;
    flex-wrap: wrap;
}

.party-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-transform: uppercase;
}

.party-role {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.party-role.is-host {
    color: var(--accent-primary);
}

.party-role.is-synced {
    color: var(--text-secondary);
}

.party-users {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.party-invite {
    margin-left: auto;
    padding: 0.45rem 1.15rem !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.08em;
}

.party-sync-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.2rem 0;
}

.party-sync-link:hover {
    color: var(--accent-primary);
}

.party-screen {
    position: relative;
    flex: 1;
    min-height: 260px;
    background: #000;
    border: var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.party-screen iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.party-hint {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    z-index: 2;
    pointer-events: none;
    max-width: min(380px, calc(100% - 1.7rem));
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.35;
}

.party-hint strong {
    color: var(--accent-gold);
    font-weight: 600;
}

.party-transport {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.party-ctrl {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    padding: 0.55rem 1.2rem;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.party-ctrl:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.party-ctrl--accent {
    background: var(--text-primary);
    color: var(--bg-base);
    border-color: transparent;
}

.party-ctrl--accent:hover {
    background: #e2e8f0;
    color: var(--bg-base);
}

.party-clock {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 0.35rem 0.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.party-server-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.party-server-label select {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
    outline: none;
    color-scheme: dark;
    max-width: 160px;
}

.party-server-label select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.party-server-label select option {
    background-color: #0a0a0c;
    color: #f8fafc;
}

.party-clock:hover {
    color: var(--accent-gold);
}

.party-clock--static {
    cursor: default;
}

.party-clock--static:hover {
    color: var(--text-muted);
}

.party-episodes-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.party-episode-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.party-episode-bar label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.party-episode-bar select {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
    outline: none;
    color-scheme: dark;
}

.party-episode-bar select:focus,
.party-episode-bar select:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28);
}

.party-episode-bar select option {
    background-color: #0a0a0c;
    color: #f8fafc;
}

.party-episode-bar select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.party-ep-now {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.party-episodes {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.party-episodes .episode-item {
    flex: 0 0 auto;
    min-width: 140px;
    max-width: 180px;
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.party-rail {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--bg-surface);
    border: var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.party-rail-head {
    padding: 1rem;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.party-people {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    max-height: 170px;
    overflow-y: auto;
}

.party-person {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.party-person-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.party-person-dot.is-host {
    background: var(--accent-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
}

.party-person-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.party-person-tag {
    margin-left: auto;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.party-person-tag--you {
    color: var(--text-muted);
}

.party-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.88rem;
}

.party-chat-msg {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    line-height: 1.4;
    word-break: break-word;
}

.party-chat-msg.system {
    background: transparent;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.2rem;
}

.party-chat-msg strong {
    color: var(--accent-gold);
    font-weight: 600;
    margin-right: 0.3rem;
}

.party-chat-compose {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.party-chat-compose input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    outline: none;
}

.party-chat-compose input:focus {
    border-color: rgba(212, 175, 55, 0.35);
}

.party-chat-compose .btn-primary {
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

@media (max-width: 960px) {
    .party-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: calc(100vh - 88px);
        padding: 0 1rem 1rem;
        gap: 1rem;
    }

    .party-screen {
        flex: none;
        aspect-ratio: 16 / 9;
        min-height: 0;
    }

    .party-rail {
        min-height: 280px;
        max-height: 360px;
    }
}

@media (max-width: 620px) {
    .party-layout {
        padding: 0 0.75rem 0.75rem;
        min-height: calc(100vh - 72px);
        min-height: calc(100dvh - 72px);
    }

    .party-topbar {
        gap: 0.5rem 0.75rem;
    }

    .party-title {
        font-size: 1.1rem;
        width: 100%;
    }

    .party-invite {
        margin-left: auto;
    }

    .party-episode-bar {
        flex-wrap: wrap;
    }

    .party-rail {
        min-height: 240px;
        max-height: 50vh;
    }
}

/* Comments Widget Styles */
.comments-section-container {
    width: 100%;
    margin-top: 2rem;
}

.comments-widget {
    background: #0d0e14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.5rem;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.comments-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.comments-scope-badge {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.comments-user-badge {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    line-height: 1.4;
}

.comments-user-badge strong {
    color: #fff;
    font-weight: 700;
}

.comments-locked-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comments-locked-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comments-locked-icon {
    font-size: 1.4rem;
    opacity: 0.8;
}

.comments-locked-text strong {
    display: block;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.comments-locked-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-text-link {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.comments-composer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.comments-composer textarea {
    width: 100%;
    background: rgba(250, 250, 250, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.85rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comments-composer textarea:focus {
    outline: none;
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.comments-composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-card {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 1rem;
}

.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.comment-avatar-link {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    align-self: flex-start;
    text-decoration: none;
}

.comment-avatar-link:hover .alexandria-avatar {
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
}

.comment-author-link {
    text-decoration: none;
    color: #fff;
}

.comment-author-link:hover {
    color: var(--accent-primary);
}

.comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    cursor: pointer;
    margin-left: auto;
    transition: color 0.2s ease;
    padding: 0.2rem 0.4rem;
}

.comment-delete-btn:hover {
    color: #ef4444;
}

.comment-text {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.45;
    overflow-wrap: anywhere;
    margin: 0;
}

.comments-empty {
    padding: 2rem 1rem;
    text-align: center;
}

/* Community Ratings & Reviews Styles */
#community-section {
    width: 100%;
    margin-top: 2rem;
}

.community-section {
    background: var(--bg-panel, #0d0e14);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.5rem;
}

.ratings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ratings-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
    letter-spacing: 0.04em;
}

.ratings-average {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.avg-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    color: var(--accent-gold);
    font-family: var(--font-display, inherit);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.ratings-composer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.rate-stars-row {
    display: flex;
    gap: 0.35rem;
}

.rate-star {
    font-size: 1.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    transition: color 0.15s ease, transform 0.15s ease;
}

.rate-star:hover {
    transform: scale(1.2);
}

.rate-star.filled {
    color: var(--accent-gold);
}

.ratings-composer textarea {
    width: 100%;
    background: rgba(250, 250, 250, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.85rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ratings-composer textarea:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.ratings-composer-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

.ratings-locked-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.ratings-locked-text {
    font-size: 0.9rem;
    color: var(--text-muted, #9ca3af);
}

.community-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 1rem;
}

.review-avatar-link {
    flex-shrink: 0;
}

.review-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.review-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary, #fff);
    text-decoration: none;
}

.review-author:hover {
    color: var(--accent-gold);
}

.review-stars {
    font-size: 0.8rem;
    color: var(--accent-gold);
    letter-spacing: 0.05em;
}

.review-time {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
}

.review-text {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.review-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* User Auth & Account Modal */
.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    width: auto;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-btn-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.account-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 2rem;
    min-width: 240px;
    background: rgba(15, 17, 24, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    padding: 0.4rem;
    z-index: 90;
}

.account-menu[hidden] {
    display: none;
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: transparent;
    border: 0;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.account-menu-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ff5a5a;
}

.account-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0.35rem 0.4rem;
}

/* ============ WHAT'S NEW — changelog bell ============ */
.changelog-trigger {
    position: relative;
}

.changelog-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5a5a;
    box-shadow: 0 0 0 2px #050607, 0 0 6px rgba(255, 90, 90, 0.7);
}

.changelog-dot[hidden] {
    display: none;
}

.changelog-menu {
    min-width: 340px;
    max-width: min(380px, calc(100vw - 2rem));
    max-height: min(70vh, 480px);
    overflow-y: auto;
    padding: 0.6rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.changelog-menu::-webkit-scrollbar {
    width: 6px;
}

.changelog-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.changelog-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.7rem 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.4rem;
}

.changelog-menu-head h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}

.changelog-entry {
    padding: 0.6rem 0.7rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.changelog-entry:hover {
    background: rgba(255, 255, 255, 0.04);
}

.changelog-entry + .changelog-entry {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.changelog-entry-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.changelog-version {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff5a5a;
}

.changelog-new {
    font-style: normal;
    font-size: 0.58rem;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 90, 90, 0.15);
    border: 1px solid rgba(255, 90, 90, 0.4);
    color: #ff5a5a;
    margin-left: 0.35rem;
    vertical-align: 1px;
}

.changelog-date {
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
}

.changelog-title {
    margin: 0.3rem 0 0.3rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.changelog-items {
    margin: 0;
    padding-left: 1.1rem;
}

.changelog-items li {
    font-family: var(--font-body);
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 0.22rem;
}

.changelog-credit {
    margin: 0.35rem 0 0;
    text-align: right;
    font-family: var(--font-body);
    font-size: 0.66rem;
    font-style: italic;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.45);
}

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.auth-modal-overlay[hidden] {
    display: none !important;
}

.auth-modal-card {
    background: #0f1118;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.auth-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-close-btn:hover {
    color: #ef4444;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.auth-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab-btn.active {
    color: #fff;
    border-bottom-color: #ef4444;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-field input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.75rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: rgba(239, 68, 68, 0.6);
}

/* Account benefits disclosure on the signup tab */
.auth-perks {
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    padding: 0.7rem 0.9rem;
}
.auth-perks summary {
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-gold);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.auth-perks summary::-webkit-details-marker {
    display: none;
}
.auth-perks summary::before {
    content: '+';
    font-size: 1rem;
    line-height: 1;
    color: var(--accent-gold);
}
.auth-perks[open] summary::before {
    content: '–';
}
.auth-perks summary:hover {
    text-decoration: underline;
}
.auth-perks ul {
    margin: 0.7rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.auth-perks li {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
    padding-left: 1.1rem;
    position: relative;
}
.auth-perks li::before {
    content: '★';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-size: 0.7rem;
}
.auth-perks li b {
    color: var(--text-primary);
}
.auth-perks-note {
    margin: 0.7rem 0 0;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.auth-profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.auth-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.auth-profile-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.auth-profile-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Community profiles */
.alexandria-avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    line-height: 1;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
    /* photo avatars anchor to this box; emoji/text avatars are unaffected */
    position: relative;
}

/* Photo avatars fill the circle regardless of grid-track sizing quirks
   (auto tracks + percentage heights don't resolve — same class of bug as
   the episode cards' collapsed rows, so the img is absolutely positioned). */
.alexandria-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-link {
    display: inline-flex;
    border-radius: 50%;
    flex-shrink: 0;
    text-decoration: none;
}

.profile-hero {
    position: relative;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: linear-gradient(145deg, rgba(20, 22, 28, 0.95) 0%, rgba(14, 15, 19, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.25rem;
    margin-bottom: 1.75rem;
    overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 100% -10%, rgba(138, 3, 3, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.profile-hero-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.profile-hero-info h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}
.profile-handle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
    font-weight: 500;
}
.profile-bio {
    color: var(--text-secondary);
    white-space: pre-wrap;
    margin: 0 0 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}
.profile-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
    flex-shrink: 0;
    min-width: 160px;
}
.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.profile-stat {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: border-color 0.2s ease, background 0.2s ease;
}
.profile-stat:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}
.profile-stat strong {
    color: var(--text-primary);
    font-weight: 700;
    margin-right: 0.35rem;
    font-size: 1rem;
}
.profile-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.profile-tabs {
    display: flex;
    gap: 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 1.25rem;
    padding-bottom: 0;
}
.profile-tab {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
    position: relative;
}
.profile-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ef4444, transparent);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.profile-tab:hover {
    color: var(--text-secondary);
}
.profile-tab.active {
    color: #fff;
    border-bottom-color: #ef4444;
}
.profile-tab.active::after {
    opacity: 1;
    transform: scaleX(1);
}
.follow-btn {
    padding: 0.65rem 1.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    background: #8a0303;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.follow-btn:hover {
    background: #a30404;
    box-shadow: 0 4px 16px rgba(163, 4, 4, 0.35);
}
.follow-btn:active {
    transform: scale(0.98);
}
.follow-btn.following {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.1);
}
.follow-btn.following:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    box-shadow: none;
}
.genre-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-left: 2px solid rgba(212, 175, 55, 0.5);
    margin: 0.2rem 0.3rem 0 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.genre-chip:hover {
    background: rgba(212, 175, 55, 0.14);
    border-color: rgba(212, 175, 55, 0.45);
}
.profile-section-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.profile-section-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.profile-section-body {
    flex: 1;
    min-width: 0;
}
.profile-section-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.profile-verb {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}
.profile-timeago {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.profile-avatar-link {
    flex-shrink: 0;
}
.profile-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 12px;
}
.profile-review-stars {
    display: flex;
    gap: 2px;
    margin: 0.5rem 0 0.25rem;
    font-size: 1rem;
    color: var(--accent-gold);
}
.profile-review-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
}
.profile-list-desc {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
}
.comments-scope-badge {
    display: inline-flex;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    margin-left: 0.5rem;
}

.profile-section-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-section-line a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.profile-section-line a:hover {
    color: #ef4444;
}

.profile-verb {
    color: var(--text-muted);
}

.profile-timeago {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    padding-left: 1rem;
}

.profile-review-stars {
    color: var(--accent-gold);
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.profile-review-text {
    color: var(--text-secondary);
    white-space: pre-wrap;
    margin-top: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-list-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.35rem;
    white-space: pre-wrap;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-empty {
    color: var(--text-muted);
    padding: 2rem 0;
    text-align: center;
}

.profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 1rem;
    overflow-y: auto;
}

.profile-modal-overlay[hidden] {
    display: none !important;
}

.profile-modal-card {
    background: #0f1118;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    width: 100%;
    max-width: 520px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.profile-modal-title {
    font-size: 1.15rem;
    color: #fff;
    font-weight: 700;
    margin: 0 0 1.25rem;
    letter-spacing: 0.05em;
}

.profile-modal-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 1rem 0 0.5rem;
}

.profile-modal-card textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.75rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    width: 100%;
}

.profile-modal-card textarea:focus {
    outline: none;
    border-color: rgba(239, 68, 68, 0.6);
}

.avatar-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.avatar-picker button {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.avatar-picker button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.avatar-picker button.selected {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.avatar-picker button img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.avatar-picker-label {
    flex-basis: 100%;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.5);
    margin: 0.35rem 0 -0.1rem;
    text-transform: uppercase;
}

.genre-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.genre-picker .genre-chip {
    margin: 0;
}

.genre-chip-btn {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.genre-chip-btn:hover {
    border-color: rgba(239, 68, 68, 0.5);
}

.genre-chip-btn.selected {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fff;
}

.profile-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .profile-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-hero-actions {
        flex-direction: row;
        justify-content: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-genres {
        justify-content: center;
    }
}

/* Community activity feed */
.community-view .view-section {
    padding-bottom: 0;
}

.community-sub {
    margin: -0.5rem 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.leaderboard-window {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    padding: 0.12rem 0.45rem;
    margin-left: 0.5rem;
}

.feed-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-tab {
    background: none;
    border: none;
    padding: 0.65rem 1.1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.feed-tab.active {
    color: #fff;
    border-bottom-color: #ef4444;
}

#feed-list {
    padding: 1rem 5rem 3rem;
}

#feed-list .placeholder-msg {
    min-height: 180px;
}

.feed-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    background: transparent;
    border: none;
    border-left: 3px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.9rem 0.9rem 0.9rem 1rem;
    margin-bottom: 0;
    transition: background 0.15s ease;
}

.feed-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.feed-kind-watching { border-left-color: #ef4444; }
.feed-kind-rated,
.feed-kind-reviewed,
.feed-kind-comment { border-left-color: var(--accent-gold); }
.feed-kind-watchlist { border-left-color: var(--accent-emerald); }
.feed-kind-list_created,
.feed-kind-list_added,
.feed-kind-followed { border-left-color: var(--text-muted); }

.feed-item-avatar {
    display: inline-flex;
    border-radius: 50%;
    flex-shrink: 0;
    text-decoration: none;
}

.feed-item-body {
    flex: 1;
    min-width: 0;
}

.feed-item-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.feed-item-user {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
}

.feed-item-user:hover,
.feed-item-title:hover {
    color: #ef4444;
}

.feed-item-title {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
}

.feed-item-time {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0;
}

.feed-item-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.feed-kind-chip {
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 0.12rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 3px;
    color: var(--text-muted);
}

.feed-kind-chip.feed-kind-watching { color: #ef4444; border-color: rgba(239, 68, 68, 0.4); }
.feed-kind-chip.feed-kind-rated,
.feed-kind-chip.feed-kind-reviewed,
.feed-kind-chip.feed-kind-comment { color: var(--accent-gold); border-color: rgba(212, 175, 55, 0.4); }
.feed-kind-chip.feed-kind-watchlist { color: var(--accent-emerald); border-color: rgba(5, 150, 105, 0.4); }

.feed-poster-thumb {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-empty {
    color: var(--text-muted);
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    font-family: var(--font-display);
    letter-spacing: 0.06em;
}

.feed-empty p {
    margin: 0 0 1rem;
}

@media (max-width: 1300px) {
    #feed-list {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 900px) {
    #feed-list {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Shared movie night lists */
.list-page {
    padding: 0 5rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.list-hero {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.list-hero-info {
    flex: 1;
    min-width: 0;
}

.list-hero-info h1 {
    font-size: 1.9rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    text-transform: uppercase;
}

.list-desc {
    color: var(--text-secondary);
    white-space: pre-wrap;
    margin: 0 0 1rem;
    line-height: 1.55;
}

.list-owner-line {
    display: flex;
    align-items: center;
}

.list-owner-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.list-owner-link:hover {
    color: #ef4444;
}

.list-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    flex-shrink: 0;
}

.list-delete-btn {
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.list-add-box {
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.list-add-search-wrap {
    position: relative;
}

.list-add-search-wrap input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
}

.list-add-search-wrap input:focus {
    outline: none;
    border-color: rgba(239, 68, 68, 0.6);
}

.list-add-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 30;
    background: #0f1118;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    padding: 0.4rem;
}

.list-add-results[hidden] {
    display: none;
}

.list-add-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

.list-add-result:hover,
.list-add-result:focus-visible {
    background: rgba(255, 255, 255, 0.06);
}

.list-add-result img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.list-add-result-ph {
    width: 40px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-gold);
    font-weight: 700;
}

.list-add-result-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.list-add-result-title {
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-add-result-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.list-add-empty {
    color: var(--text-muted);
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
}

.list-guest-hint {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.25rem 0;
}

.list-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.list-item-card {
    position: relative;
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.list-item-card:hover {
    transform: translateY(-3px);
    border-color: rgba(239, 68, 68, 0.4);
}

.list-item-poster {
    display: block;
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.03);
}

.list-item-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.list-item-poster-ph {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--accent-gold);
    font-size: 1.4rem;
    font-weight: 700;
}

.list-item-body {
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.list-item-title {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.list-item-title:hover {
    color: #ef4444;
}

.list-item-meta {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.list-item-added {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.list-item-added a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.list-item-added a:hover {
    color: #ef4444;
}

.list-item-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.list-item-remove:hover {
    background: #ef4444;
}

.list-empty {
    grid-column: 1 / -1;
    color: var(--text-muted);
    padding: 3rem 0;
    text-align: center;
}

.list-picker-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10001;
    display: grid;
    place-items: center;
    padding: 1rem;
    overflow-y: auto;
}

.list-picker-modal-overlay[hidden] {
    display: none !important;
}

.list-picker-modal-card {
    background: #0f1118;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    width: 100%;
    max-width: 460px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.list-picker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
}

.list-picker-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.list-picker-row-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-picker-row-desc {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-picker-empty {
    color: var(--text-muted);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.85rem;
}

@media (max-width: 1300px) {
    .list-page {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 900px) {
    .list-page {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .list-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .list-hero-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .list-owner-line {
        justify-content: center;
    }
}

/* ---- AIRTIME CALENDAR ---- */
.calendar-view {
    padding: 1.5rem 2rem 2.5rem;
}

.calendar-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

.calendar-range {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

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

.calendar-day {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 220px;
    padding: 0.75rem;
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: 10px;
}

.calendar-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: var(--glass-border);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.calendar-day.today {
    border-color: rgba(212, 175, 55, 0.45);
}

.calendar-day.today .calendar-day-head {
    color: var(--accent-gold);
}

.calendar-today-tag {
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--accent-gold);
    color: var(--bg-surface);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.calendar-item {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.calendar-item img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-surface);
}

.calendar-item .poster-placeholder {
    aspect-ratio: 2 / 3;
    border-radius: 8px;
}

.calendar-item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    text-decoration: none;
}

.calendar-item-title:hover {
    color: var(--accent-gold);
}

.calendar-empty {
    margin-top: 0.25rem;
    padding: 1.5rem 0.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
}

@media (max-width: 1100px) {
    .calendar-grid {
        grid-template-columns: repeat(7, minmax(150px, 1fr));
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
}


/* Roulette Discovery Modal */
.roulette-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.roulette-modal-overlay[hidden] {
    display: none !important;
}

.roulette-modal-card {
    background: #0f1118;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.roulette-title {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.roulette-type-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.roulette-type-btn {
    flex: 1;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 0.6rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.roulette-type-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

.roulette-type-btn.active {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.12);
}

.roulette-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 0.75rem;
    margin-bottom: 1.25rem;
}

.roulette-label {
    display: block;
    margin: 0 0 0.35rem;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.roulette-control {
    width: 100%;
}

.roulette-spin-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    color: #0f1118;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.roulette-spin-btn:hover {
    background: #e2c25c;
    border-color: #e2c25c;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.35);
}

#roulette-result {
    margin-top: 1.25rem;
}

#roulette-result .placeholder-msg {
    min-height: 120px;
    padding: 2rem 1rem;
}

.roulette-result {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.roulette-result-poster {
    width: 200px;
    height: 300px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
    border: var(--glass-border);
    background: var(--bg-panel);
}

.roulette-result-info h3 {
    margin: 0.5rem 0 0.35rem;
    font-size: 1.3rem;
    color: var(--text-primary);
    line-height: 1.25;
}

.roulette-result-meta {
    margin: 0 0 0.4rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.roulette-result-overview {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.roulette-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-left: 2px solid rgba(212, 175, 55, 0.6);
    color: var(--accent-gold);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
}

.roulette-result-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.roulette-result-btns .btn-primary,
.roulette-result-btns .btn-secondary {
    padding: 0.6rem 1.1rem;
    font-size: 0.78rem;
}

.roulette-retry-btn {
    display: block;
    margin: 0.75rem auto 0;
    padding: 0.6rem 1.4rem;
    background: rgba(138, 3, 3, 0.25);
    border: 1px solid rgba(138, 3, 3, 0.5);
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.roulette-retry-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

@media (max-width: 700px) {
    .roulette-result {
        flex-direction: column;
    }
    .roulette-result-poster {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}

/* RELEASING THIS WEEK — homepage airing cards */
.airing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 140px;
    flex: 0 0 auto;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.airing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 3, 3, 0.6);
    box-shadow: 0 8px 24px rgba(138, 3, 3, 0.25);
}
.airing-card-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}
.airing-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(138, 3, 3, 0.85);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 3px 7px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.airing-card-badge.today {
    background: rgba(200, 30, 30, 0.95);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}
.airing-card-title {
    padding: 0.5rem 0.6rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.35;
    color: var(--text-primary);
}
.airing-card-ep {
    margin: -0.35rem 0.6rem 0.6rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #fca5a5;
}

/* ============ PROFILE PULSE INLINE — stats, heatmap, badges in hero ============ */
.profile-pulse-inline {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 0.75rem;
}

.pulse-stats-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.pulse-stat-inline {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.35rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.pulse-stat-inline:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}
.pulse-stat-inline strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.pulse-stat-inline span {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.pulse-heat-inline {
    width: 100%;
    overflow-x: auto;
    padding: 0.25rem 0;
}
.pulse-heat-inline .pulse-heatmap {
    display: flex;
    gap: 2px;
    padding-bottom: 0.25rem;
}
.pulse-heat-inline .pulse-heat-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pulse-heat-inline .pulse-heat-cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pulse-heat-inline .pulse-heat-cell:hover {
    transform: scale(1.8);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.pulse-heat-inline .pulse-heat-cell.heat-1 { background: rgba(239, 68, 68, 0.25); }
.pulse-heat-inline .pulse-heat-cell.heat-2 { background: rgba(239, 68, 68, 0.45); }
.pulse-heat-inline .pulse-heat-cell.heat-3 { background: rgba(239, 68, 68, 0.7); }
.pulse-heat-inline .pulse-heat-cell.heat-4 { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }

.pulse-badges-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.pulse-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-left: 2px solid rgba(239, 68, 68, 0.5);
    cursor: default;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.pulse-badge-chip:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fff;
}
.pulse-badge-chip svg {
    flex: none;
    color: #fca5a5;
    opacity: 0.9;
}

/* ============ ACCOUNT PROFILE — minimal social header, Letterboxd grammar ============ */
.profile-page.account {
    max-width: 1080px;
    margin: 0 auto;
}
.account-head {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding-top: 0.5rem;
}
.account-id {
    flex: 1;
    min-width: 0;
}
.account-id h1 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.1;
    overflow-wrap: break-word;
}
.account-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}
.account-actions .follow-btn,
.account-actions .btn-quiet,
.account-actions .btn-secondary {
    border-radius: 999px;
    width: auto;
}
.account-actions .btn-quiet {
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.account-stats {
    display: flex;
    flex-wrap: wrap;
    row-gap: 0.75rem;
    margin: 1.15rem 0 0;
    padding: 0;
}
.account-stat {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-right: 1.25rem;
    margin-right: 1.25rem;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-left: none;
    background: none;
    font: inherit;
    text-align: left;
    color: inherit;
}
.account-stat:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}
.account-stat .stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}
.account-stat .stat-num {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.account-stat.is-link {
    cursor: pointer;
    border-radius: 8px;
}
.account-stat.is-link:hover .stat-num {
    color: var(--accent-gold);
}
.account-stat.is-link:hover .stat-label {
    color: var(--text-secondary);
}
.friends-card {
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}
#friends-modal-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.75rem;
}
.friend-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid transparent;
}
.friend-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
.friend-name {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}
.friend-handle {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
}
.friends-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.5rem 0 0;
}
/* Badge quests */
.pulse-quests {
    margin-top: 0.6rem;
}
#quests-modal-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.75rem;
}
.quests-progress {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin: 0 0 0.4rem;
}
.quest-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    border: 1px solid transparent;
}
.quest-row.earned {
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.06);
}
.quest-row.locked {
    opacity: 0.55;
}
.quest-icon {
    display: inline-flex;
    flex: none;
    color: var(--accent-gold);
}
.quest-icon svg {
    width: 16px;
    height: 16px;
}
.quest-row.locked .quest-icon {
    color: var(--text-muted);
}
.quest-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}
.quest-text strong {
    color: var(--text-primary);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}
.quest-text small {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.quest-state {
    flex: none;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}
.quest-state.is-earned {
    color: var(--accent-gold);
    border-color: rgba(212, 175, 55, 0.5);
}
.tab-count {
    font-weight: 700;
    font-size: 0.72em;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 0.1em 0.55em;
    margin-left: 0.45em;
    letter-spacing: 0;
}
.profile-tab.active .tab-count {
    color: var(--text-primary);
    background: rgba(239, 68, 68, 0.16);
}
.pulse-heat-legend {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
}
.pulse-heat-legend .pulse-heat-cell {
    width: 10px;
    height: 10px;
}
.pulse-heat-legend .pulse-heat-cell.heat-0 {
    background: rgba(255, 255, 255, 0.05);
}
.account-head a:focus-visible,
.account-stats a:focus-visible,
.profile-tab:focus-visible,
.account-actions button:focus-visible,
.pulse-badge-chip:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}
@media (max-width: 720px) {
    .account-head {
        flex-wrap: wrap;
    }
    .account-actions {
        width: 100%;
    }
    .account-id h1 {
        font-size: 1.55rem;
    }
    .account-stat {
        padding-right: 0.9rem;
        margin-right: 0.9rem;
    }
    .account-stat .stat-num {
        font-size: 1.25rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .pulse-heat-inline .pulse-heat-cell:hover {
        transform: none;
    }
}

/* ============ PROFILE ACTIVITY POSTER CAROUSEL ============ */
.profile-activity-posters {
    margin-bottom: 1.5rem;
}
.profile-activity-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}
.profile-poster-carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.25rem 0.25rem 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.profile-poster-carousel::-webkit-scrollbar {
    height: 6px;
}
.profile-poster-carousel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
.profile-poster-card {
    position: relative;
    flex: 0 0 auto;
    width: 110px;
    scroll-snap-align: start;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 17, 24, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.profile-poster-card:hover {
    transform: translateY(-4px);
    border-color: rgba(138, 3, 3, 0.5);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    z-index: 10;
}
.profile-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}
.profile-poster-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.03);
}
.profile-poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 0.5rem 0.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 12, 0.95) 100%);
}
.profile-poster-action {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    text-align: center;
}

.profile-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* ============ CIPHER — spoiler tags ============ */
.spoiler-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.spoiler-toggle input {
    accent-color: #ef4444;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.spoiler-toggle-text {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-secondary);
}

.spoiler-block {
    display: inline;
    cursor: pointer;
    border-radius: 4px;
}

.spoiler-chip {
    display: inline-block;
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.45);
    border-left: 2px solid rgba(239, 68, 68, 0.7);
    border-radius: 4px;
    padding: 1px 6px;
    margin-right: 6px;
    vertical-align: 0.1em;
}

.spoiler-blur {
    filter: blur(6px);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    transition: filter 0.2s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.spoiler-block.revealed .spoiler-blur {
    filter: none;
    background: transparent;
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}

.spoiler-block.revealed .spoiler-chip {
    display: none;
}

/* ============ LEADERBOARD — top watchers this week (community) ============ */
.leaderboard-section {
    padding: 0.5rem 5rem 1.5rem;
}

.leaderboard-section > h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.leaderboard-section > h3::before {
    content: '|';
    color: #ef4444;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1;
    margin-right: 0.15rem;
}

#leaderboard-list {
    display: grid;
    gap: 0.5rem;
}

.leaderboard-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 1rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

.leaderboard-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.leaderboard-row.rank-1 .leaderboard-rank {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.leaderboard-row.rank-2 .leaderboard-rank {
    border-color: #cbd5e1;
    color: #cbd5e1;
}

.leaderboard-row.rank-3 .leaderboard-rank {
    border-color: #f97316;
    color: #f97316;
}

.leaderboard-row.rank-1 {
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.06);
}

.leaderboard-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-name em {
    font-style: normal;
    color: #ef4444;
    font-size: 0.72rem;
    font-weight: 700;
}

.leaderboard-count {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.05rem;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    white-space: nowrap;
}

.leaderboard-count strong {
    font-size: 0.95rem;
    color: var(--text-primary);
    letter-spacing: 0;
}

.leaderboard-bar {
    position: absolute;
    inset: auto 0 0 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
}

.leaderboard-bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 0 2px 2px 0;
}

.leaderboard-row.is-me {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.06);
}

/* ============ MOBILE DECLUTTER — tighter heroes, fewer stacked rows ============ */
@media (max-width: 620px) {
    /* Shorter heroes on phones (home, watchlist, franchise, anime all share .hero-featured) */
    .hero-featured {
        height: auto;
        min-height: 420px;
        padding: 2rem 1.25rem 7rem;
    }
    .hero-featured .featured-content h1,
    .hero-featured .featured-content h2 {
        font-size: clamp(1.9rem, 9vw, 2.6rem);
    }
    .featured-content p { -webkit-line-clamp: 3; line-clamp: 3; }

    /* Watchlist page: the "X Titles Saved" widget duplicates the hero + toolbar */
    .sector-widget { display: none; }

    /* DETAILS is one tap away on every grid card; drop the duplicate hero button */
    .wl-details-btn { display: none; }

    /* Watchlist filter dropdown full-width on mobile */
    .filter-dropdown-wrapper { width: 100%; }
    .filter-dropdown-trigger { width: 100%; justify-content: space-between; }
    .filter-dropdown-popover { left: 0; right: 0; min-width: auto; }
    .watchlist-toolbar-actions { width: 100%; justify-content: space-between; }

    /* Profile page mobile adjustments */
    .profile-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.75rem 1.25rem;
        gap: 1.25rem;
    }
    .profile-hero::before {
        background: radial-gradient(ellipse 100% 50% at 50% -20%, rgba(138, 3, 3, 0.08) 0%, transparent 70%);
    }
    .profile-hero-info h1 { font-size: 1.6rem; }
    .profile-hero-actions { flex-direction: row; min-width: 0; justify-content: center; }
    .profile-hero-actions .follow-btn,
    .profile-hero-actions .btn-quiet,
    .profile-hero-actions .btn-secondary { width: auto; }
    .profile-stats { justify-content: center; }
    .profile-genres { justify-content: center; }
    .profile-tabs { justify-content: center; }
    .profile-tab { padding: 0.6rem 0.85rem; font-size: 0.75rem; }
    .pulse-stats-inline { justify-content: center; }
    .pulse-stat-inline { padding: 0.3rem 0.5rem; }
    .pulse-stat-inline strong { font-size: 1rem; }
    .pulse-heat-inline .pulse-heat-cell { width: 8px; height: 8px; }
    .pulse-badge-chip { padding: 0.2rem 0.5rem; font-size: 0.62rem; }
    .pulse-badges-inline { justify-content: center; }
    .profile-poster-card { width: 95px; }
}

/* Comment reactions & reply threading */
.comment-reactions-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.react-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.react-btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
}

.react-btn.active {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.5);
    border-left-color: #d4af37;
    color: var(--accent-gold);
}

.react-count {
    font-weight: 700;
    color: inherit;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
}

.comment-reply-btn:hover {
    color: var(--accent-gold);
}

.comment-thread {
    display: flex;
    flex-direction: column;
}

.comment-replies {
    margin-left: 3.4rem;
    padding-left: 0.9rem;
    border-left: 2px solid rgba(212, 175, 55, 0.25);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.reply-to-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.3rem 0.6rem;
    margin-bottom: 0.5rem;
}

.reply-to-cancel {
    background: none;
    border: none;
    color: var(--accent-gold);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
}

@media (max-width: 620px) {
    .comment-replies {
        margin-left: 1.2rem;
        padding-left: 0.6rem;
    }
}

/* Search page — flush with the surface, site-native controls */
.modern-search .search-input-container {
    max-width: none;
    margin: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    background: transparent;
    padding: 0;
    transition: border-color 0.25s ease;
}

.modern-search .search-input-container:focus-within {
    background: transparent;
    border-color: #a30404;
    box-shadow: 0 12px 24px -14px rgba(138, 3, 3, 0.85);
}

.modern-search .search-input-container input {
    font-size: 1.5rem;
    padding: 1.4rem 0 1.25rem;
    font-family: var(--font-display);
    letter-spacing: 0.03em;
}

.modern-search .search-input-container input::placeholder {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.8rem;
}

.modern-search .search-icon {
    margin-right: 1.2rem;
}

.modern-search .search-filters {
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.modern-search .filter-btn {
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.75rem 0.15rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.modern-search .filter-btn:hover {
    background: none;
    border-color: transparent;
    color: var(--text-primary);
}

.modern-search .filter-btn.active {
    background: none;
    border-color: #ef4444;
    color: var(--text-primary);
    box-shadow: none;
}

.modern-search .roulette-btn {
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    color: var(--accent-gold);
    background: transparent;
    padding: 0.45rem 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.modern-search .roulette-btn:hover {
    background: rgba(212, 175, 55, 0.1);
}

.search-context-label {
    padding: 0.5rem 5rem 0;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.search-context-label::before {
    content: '|';
    color: #ef4444;
    font-weight: 800;
    font-size: 1.3rem;
    line-height: 1;
}

.search-history-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 5rem 0.75rem;
}

.search-history-title {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-right: 0.25rem;
}

.search-history-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.search-history-chip:hover {
    border-color: rgba(212, 175, 55, 0.45);
    color: var(--text-primary);
    background: rgba(212, 175, 55, 0.07);
}

.search-history-x { color: var(--text-muted); font-size: 0.7rem; }
.search-history-x:hover { color: #ef4444; }

.search-history-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
}

.search-history-clear:hover { color: #ef4444; }

@media (max-width: 900px) {
    .search-context-label,
    .search-history-row {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Search declutter: recent searches live in a dropdown under the input,
   filter toggle + roulette sit opposite the type tabs on one row. */
.modern-search .search-input-container {
    position: relative;
}
.search-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.search-toolbar-actions .discover-person-hint {
    margin-right: 0.4rem;
}
.search-history-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: rgba(13, 14, 18, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid #8a0303;
    border-radius: 8px;
    padding: 0.85rem 1.1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}
.search-history-dropdown[hidden] {
    display: none !important;
}
.search-history-dropdown .search-history-title {
    margin-bottom: 0.25rem;
}
.search-history-dropdown .search-history-chip {
    width: 100%;
    justify-content: space-between;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    padding: 0.45rem 0.15rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-align: left;
}
.search-history-dropdown .search-history-chip:hover {
    color: var(--text-primary);
    background: none;
    border-bottom-color: rgba(138, 3, 3, 0.6);
}
.search-history-dropdown .search-history-clear {
    align-self: flex-end;
}

/* Letterboxd import progress + results */
.import-progress-card { text-align: center; }
.import-progress-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.import-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}
#import-progress-fill {
    display: block;
    height: 100%;
    width: 3%;
    background: linear-gradient(90deg, #8a0303, #d4af37);
    transition: width 0.2s ease;
}
.import-notfound-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0 0 0.5rem;
}
.import-notfound-list {
    max-height: 12rem;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.import-notfound-list div {
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.import-notfound-list div:last-child { border-bottom: none; }

/* Import explainer modal — the AniList-style "here's what happens" gate */
.import-explainer-intro {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0 0 1.1rem;
}
.import-explainer-row {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}
.import-explainer-bar {
    flex: none;
    width: 3px;
    border-radius: 2px;
    background: #8a0303;
    box-shadow: 0 0 8px rgba(138, 3, 3, 0.45);
}
.import-explainer-label {
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0 0 0.2rem;
}
.import-explainer-text {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 0;
}
.import-explainer-note {
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0.25rem 0 1.1rem;
}

.party-play-toggle {
    padding: 0.35rem 0.9rem;
    font-size: 0.72rem;
    border-radius: 4px;
}

/* ---- DUB / SUB toggle (player server controls) ---- */
.audio-pill {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}
.audio-opt {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-secondary, #9aa0a6);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.32rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.audio-opt:hover { color: var(--text-primary, #fff); }
.audio-opt.active {
    background: #8a0303;
    color: #fff;
}
.audio-opt:focus-visible {
    outline: 2px solid rgba(138, 3, 3, 0.7);
    outline-offset: -2px;
}

/* ---- Dub availability badge (details meta row) ---- */
.dub-badge {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 0.22rem 0.55rem;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
}
.dub-badge.dub-unknown {
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.roulette-watchlist-hint {
    color: var(--text-secondary, #9aa0a6);
    font-size: 0.78rem;
    margin: 0.75rem 0 0.25rem;
}

/* ---- Context button variants — same system, different silhouettes ---- */

/* Play CTA: solid red with an inner highlight and stronger glow. Only for
   the one "press play" action in a view. */
.btn-play {
    background: linear-gradient(180deg, #a30404 0%, #8a0303 100%);
    box-shadow: 0 0 24px rgba(138, 3, 3, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    padding: 0.85rem 2.4rem;
}
.btn-play:hover {
    background: linear-gradient(180deg, #b90505 0%, #990404 100%);
    box-shadow: 0 0 32px rgba(163, 4, 4, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Destructive actions: solid red, reads as a warning at rest. */
.btn-danger {
    background: linear-gradient(180deg, #b90505 0%, #990404 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 0 16px rgba(163, 4, 4, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-danger:hover {
    background: linear-gradient(180deg, #c50606 0%, #a30404 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 24px rgba(163, 4, 4, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

/* Arrow links: bare text with a sliding chevron, for navigation-level
   actions that shouldn't look like buttons at all. */
.btn-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 0.25rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.btn-arrow::after {
    content: '→';
    transition: transform 0.2s ease;
}
.btn-arrow:hover {
    color: #ffffff;
    border-bottom-color: #8a0303;
}
.btn-arrow:hover::after {
    transform: translateX(4px);
}

/* Gold actions: the personal layer — diary, ratings, verdicts, lists.
   Anything that's about YOUR taste, not playback or navigation. */
.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 4px;
    background: rgba(212, 175, 55, 0.08);
    color: var(--accent-gold);
    font-family: var(--font-body);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-gold:hover {
    background: rgba(212, 175, 55, 0.16);
    border-color: rgba(212, 175, 55, 0.8);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
    transform: translateY(-1px);
}

/* Quiet actions: tertiary, dismissive, navigational. Barely a button
   until hovered — for CANCEL, CLEAR, dismiss, and back-links that
   shouldn't compete with the real action. */
.btn-quiet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-quiet:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

/* Size + layout modifiers. Compose freely: class="btn-secondary btn-sm",
   class="btn-primary btn-block". These kill the inline width/margin hacks. */
.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.72rem;
}
.btn-block {
    width: 100%;
}
.btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}
.btn-row-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

/* ---- Franchise archive: banner + rows ---- */
.franchise-hero {
    position: relative;
    height: clamp(260px, 42vh, 400px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.franchise-hero-mosaic {
    position: absolute;
    inset: 0;
    display: flex;
}
.franchise-hero-mosaic img {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    filter: saturate(0.75) contrast(1.05);
    border-right: 1px solid rgba(3, 3, 3, 0.6);
}
.franchise-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-base) 8%, rgba(3, 3, 3, 0.55) 55%, rgba(3, 3, 3, 0.25) 100%),
        radial-gradient(ellipse at 20% 80%, rgba(138, 3, 3, 0.35), transparent 60%);
}
.franchise-hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem 2.5rem;
}
.franchise-hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    margin: 0.2rem 0 0.4rem;
}
.franchise-hero-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

.franchise-deck-host {
    margin: 0.25rem 0 1.75rem;
    background: rgba(11, 12, 16, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #8a0303;
    border-radius: 8px;
    overflow: hidden;
}
.franchise-deck-host .franchise-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
/* The legacy tile panels kept .franchise-deck-rest collapsed until a tile
   opened; the deck host is always open. */
.franchise-deck-host .franchise-deck-rest {
    width: auto;
    opacity: 1;
    overflow: visible;
}

.franchise-row {
    padding-bottom: 0.4rem;
}

.franchise-card {
    flex: none;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
    text-align: left;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.franchise-card:hover {
    transform: translateY(-4px);
}
.franchise-card-poster {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: #050505;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}
.franchise-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.franchise-card-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(3, 3, 3, 0.92) 0%, rgba(3, 3, 3, 0.35) 45%, transparent 65%);
}
.franchise-card-name {
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    z-index: 2;
}
.franchise-card-bar {
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 2px;
    opacity: 0.9;
}
.franchise-card-sub {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    min-height: 2em;
}
.franchise-card.active .franchise-card-poster {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 0 2px #8a0303, 0 0 18px rgba(138, 3, 3, 0.5);
}

/* Franchise completion progress — thin red track under each card. */
.franchise-progress-track {
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.franchise-progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #8a0303, #d4af37);
    border-radius: 2px;
    transition: width 0.4s ease;
}
.franchise-card-progress-text {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ---- Up-next interstitial ---- */
.upnext-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 3, 3, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 200ms ease;
}
.upnext-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 2.25rem 3rem;
    background: rgba(15, 16, 20, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid #8a0303;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 32px rgba(138, 3, 3, 0.3);
    text-align: center;
    max-width: min(480px, 86%);
}
.upnext-eyebrow {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--accent-gold);
    margin: 0;
}
.upnext-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin: 0;
}
.upnext-count {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
}
.upnext-count span {
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
}
.upnext-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---- Settings page ---- */
.settings-view {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}
.set-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 0.4rem 0;
    margin-bottom: 1rem;
}
.set-back:hover {
    color: var(--text-primary);
}
.settings-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.settings-header h1 {
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    margin: 0.2rem 0 0.4rem;
}
.settings-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}
.set-local-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-gold);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
}
.set-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: set-pulse 2.4s ease-in-out infinite;
}
@keyframes set-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.set-tabs {
    display: flex;
    gap: 0.4rem;
    padding: 0.35rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 70px;
    z-index: 20;
    overflow-x: auto;
}
.set-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.6rem 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}
.set-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.set-tab.active {
    background: rgba(138, 3, 3, 0.85);
    color: #ffffff;
}
.set-panel {
    display: none;
}
.set-panel.active {
    display: block;
    animation: set-panel-in 0.25s ease;
}
@keyframes set-panel-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.set-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.2rem;
    margin-bottom: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.028);
    transition: border-color 0.18s ease, background 0.18s ease;
}
.set-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.045);
}
.set-card-icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.set-card-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}
.set-card-title {
    font-size: 0.92rem;
    font-weight: 650;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.set-card-note {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.set-card > :last-child {
    margin-left: auto;
    flex: none;
}
.set-health {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.set-health-ok { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.set-health-down { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.set-health-unknown { background: rgba(255, 255, 255, 0.25); }
.set-meter-val {
    color: var(--accent-gold);
    font-weight: 700;
}
.set-meter-bar {
    display: block;
    height: 5px;
    margin-top: 0.55rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
}
.set-meter-bar > span {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-gold), #ef4444);
}
.set-danger {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.05);
}
.set-danger-title {
    margin: 0 0 0.7rem 0.2rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #ef4444;
}
.set-danger .set-card {
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 0.6rem;
}
.set-danger .set-card:last-child {
    margin-bottom: 0;
}
.set-footnote {
    margin: 1.75rem 0 0;
    text-align: center;
    font-size: 0.76rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.settings-segmented {
    display: inline-flex;
    padding: 3px;
    gap: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
}
.setting-opt {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.setting-opt:hover {
    color: var(--text-primary);
}
.setting-opt.active {
    background: rgba(138, 3, 3, 0.85);
    color: #ffffff;
}
.setting-toggle {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex: none;
}
.setting-toggle-track {
    display: block;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.setting-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #94a3b8;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease;
}
.setting-toggle.on .setting-toggle-track {
    background: rgba(138, 3, 3, 0.6);
    border-color: rgba(239, 68, 68, 0.65);
}
.setting-toggle.on .setting-toggle-knob {
    transform: translateX(20px);
    background: #ffffff;
}
.setting-toggle:hover .setting-toggle-track {
    border-color: rgba(255, 255, 255, 0.3);
}
@media (max-width: 560px) {
    .set-card {
        flex-wrap: wrap;
    }
    .set-card > :last-child {
        margin-left: 0;
        width: 100%;
    }
    .set-card .compact-select {
        width: 100%;
        max-width: none;
    }
    .set-card-icon {
        width: 36px;
        height: 36px;
    }
    .settings-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ============ HALLOWEEN CALENDAR ============ */
.halloween-page {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
    overflow: hidden;
    background:
        radial-gradient(560px 300px at 85% -40px, rgba(249, 115, 22, 0.12), transparent 70%),
        radial-gradient(700px 420px at 10% 0%, rgba(88, 40, 140, 0.16), transparent 65%),
        radial-gradient(900px 500px at 50% 110%, rgba(138, 3, 3, 0.1), transparent 70%);
}
/* cobwebbed corner */
.halloween-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 240px;
    height: 240px;
    pointer-events: none;
    background:
        repeating-radial-gradient(circle at 0 0, transparent 0 26px, rgba(248, 250, 252, 0.07) 26px 27px),
        repeating-conic-gradient(from 270deg at 0 0, rgba(248, 250, 252, 0.08) 0 1.5deg, transparent 1.5deg 14deg);
    -webkit-mask-image: radial-gradient(circle at 0 0, #000 0, transparent 72%);
    mask-image: radial-gradient(circle at 0 0, #000 0, transparent 72%);
}
.hw-moon {
    position: absolute;
    top: 34px;
    right: 5%;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(circle at 34% 32%, rgba(255, 255, 255, 0.9), transparent 42%),
        radial-gradient(circle at 62% 58%, rgba(190, 170, 140, 0.5) 0 9%, transparent 10%),
        radial-gradient(circle at 44% 66%, rgba(190, 170, 140, 0.45) 0 6%, transparent 7%),
        radial-gradient(circle at 70% 34%, rgba(190, 170, 140, 0.4) 0 5%, transparent 6%),
        radial-gradient(circle at 50% 50%, #f5eeda 0 62%, #d9cfae 100%);
    box-shadow: 0 0 44px 10px rgba(245, 238, 218, 0.16), 0 0 120px 30px rgba(249, 115, 22, 0.08);
}
.hw-fog {
    position: absolute;
    top: 120px;
    left: -20%;
    width: 140%;
    height: 220px;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(148, 163, 184, 0.07), transparent);
    filter: blur(6px);
    animation: hw-fog-drift 26s ease-in-out infinite alternate;
}
@keyframes hw-fog-drift {
    from { transform: translateX(-4%); }
    to { transform: translateX(4%); }
}
.halloween-header {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.75rem;
}
.halloween-header::after {
    /* dried-blood scalloped edge */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 12px;
    background-image: radial-gradient(circle at 50% 0, #8a0303 62%, transparent 63%);
    background-size: 26px 12px;
    background-repeat: repeat-x;
    opacity: 0.85;
}
.halloween-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffb347;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}
.hw-pip {
    width: 10px;
    height: 12px;
    border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
    background: radial-gradient(circle at 50% 35%, #ffb347, #f97316 70%, #8a0303);
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.8);
}
.halloween-header h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0 0 0.2rem;
    line-height: 1.1;
    background: linear-gradient(180deg, #ffd9a8 8%, #f97316 52%, #b91c1c 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 34px rgba(249, 115, 22, 0.25);
}
.hw-month {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 0.6rem;
}
.halloween-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
}
.halloween-countdown {
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 1.25rem;
}
.halloween-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
    margin: 0 auto;
}
.halloween-progress-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-align: center;
}
.halloween-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
    overflow: hidden;
}
.halloween-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8a0303, #f97316, #ffb347);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.55);
    transition: width 0.4s ease;
}
.hw-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.hw-weekdays span {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 179, 71, 0.6);
}
.halloween-grid.hw-cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}
.cal-blank {
    min-height: 120px;
    border-radius: 10px;
    border: 1px dashed rgba(167, 139, 250, 0.12);
    background: rgba(255, 255, 255, 0.012);
}
.cal-cell {
    position: relative;
    min-height: 172px;
    border-radius: 10px;
    overflow: hidden;
    background: #0d0714;
    border: 1px solid rgba(167, 139, 250, 0.16);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}
.cal-cell:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(249, 115, 22, 0.18);
}
.cal-poster {
    position: absolute;
    inset: 0;
}
.cal-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.cal-cell:hover .cal-poster img {
    transform: scale(1.06);
}
.halloween-poster-placeholder {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 58%, rgba(249, 115, 22, 0.5) 0 22%, transparent 46%),
        radial-gradient(circle at 50% 8%, rgba(245, 238, 218, 0.14) 0 8%, transparent 20%),
        #0d0714;
}
.halloween-poster-placeholder::before {
    /* carved stem on the jack glow */
    content: '';
    position: absolute;
    top: 22%;
    left: 50%;
    width: 6px;
    height: 14px;
    transform: translateX(-50%);
    border-radius: 3px;
    background: #4a7c2f;
}
.cal-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 3, 3, 0.62) 0%, transparent 34%, transparent 46%, rgba(3, 3, 3, 0.9) 100%);
}
.cal-date {
    position: absolute;
    top: 6px;
    left: 8px;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #ffb347;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.cal-check {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 179, 71, 0.45);
    background: rgba(3, 3, 3, 0.72);
    color: transparent;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.cal-check:hover {
    border-color: #ffb347;
    color: rgba(255, 179, 71, 0.75);
}
.cal-check.watched {
    background: radial-gradient(circle at 50% 40%, #ffb347, #f97316 75%);
    border-color: #ffb347;
    color: #1a0b00;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.7);
}
.cal-cell.watched {
    border-color: rgba(249, 115, 22, 0.65);
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.22);
}
.cal-cell.missed .cal-poster img {
    filter: grayscale(0.7) brightness(0.6);
}
.cal-cell.missed .cal-date {
    color: rgba(148, 163, 184, 0.65);
}
.halloween-card.tonight {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 1px var(--accent-gold), 0 0 22px rgba(212, 175, 55, 0.35);
}
.halloween-card.tonight::after {
    content: 'TONIGHT';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-family: var(--font-display);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: #f8fafc;
    background: var(--accent-primary);
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    padding: 0.18rem 0.4rem;
    pointer-events: none;
    white-space: nowrap;
}
.halloween-card.tonight .cal-date {
    top: 30px;
}
.cal-cell.finale {
    border-color: #8a0303;
    box-shadow: inset 0 0 24px rgba(138, 3, 3, 0.35), 0 0 16px rgba(138, 3, 3, 0.3);
}
.cal-finale {
    position: absolute;
    bottom: 44px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-family: var(--font-display);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fecaca;
    background: rgba(138, 3, 3, 0.85);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 4px;
    padding: 0.16rem 0.4rem;
    pointer-events: none;
}
.cal-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0.35rem 0.4rem 0.4rem;
}
.cal-title {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.1rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.cal-sub {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}
.halloween-watched-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 4, 0, 0.62);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: #ffb347;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    z-index: 2;
    text-shadow: 0 0 12px rgba(249, 115, 22, 0.8);
}
.halloween-watched-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.hw-legend {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
@media (max-width: 720px) {
    .hw-moon {
        width: 56px;
        height: 56px;
        top: 22px;
    }
    .halloween-header h1 {
        font-size: 1.8rem;
    }
    .hw-weekdays,
    .halloween-grid.hw-cal {
        gap: 0.3rem;
    }
    .hw-weekdays span {
        font-size: 0.56rem;
        letter-spacing: 0.08em;
    }
    .cal-blank {
        min-height: 88px;
    }
    .cal-cell {
        min-height: 118px;
    }
    .cal-date {
        font-size: 0.8rem;
    }
    .cal-check {
        width: 22px;
        height: 22px;
        font-size: 0.68rem;
    }
    .cal-title {
        font-size: 0.52rem;
    }
    .cal-sub {
        font-size: 0.5rem;
    }
    .cal-finale {
        bottom: 36px;
        font-size: 0.44rem;
    }
    .halloween-watched-overlay {
        font-size: 0.52rem;
    }
    .halloween-watched-icon {
        font-size: 1rem;
    }
}
@media (max-width: 480px) {
    .cal-cell {
        min-height: 104px;
    }
    .cal-sub {
        display: none;
    }
    .cal-finale {
        display: none;
    }
}
/* Taste Autopsy — speaks in house components: default section headers,
   hairline verdict rows, blood-red bars, watchlist rows for favorites. */
.autopsy-shelf {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.autopsy-line {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    padding: 0.65rem 0;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.autopsy-line:first-child {
    padding-top: 0;
}
.autopsy-line:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.autopsy-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}
.autopsy-label {
    min-width: 7.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.autopsy-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.autopsy-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--accent-primary);
}
.autopsy-count {
    min-width: 1.5rem;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ========================================
   MOBILE AD CREATIVE STYLES
   ======================================== */

/* Mobile Header - Pure black, red wordmark + search */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: #030303;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    touch-action: none;
    overscroll-behavior: none;
}
.mobile-brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}
.mobile-logo {
    height: 26px;
    max-width: 180px;
}
.mobile-header .icon-btn {
    color: #f8fafc;
    padding: 8px;
}

/* Category Tabs - Horizontal, red underline on active */
.category-tabs {
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 16px;
    background: #030303;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: fixed;
    top: 56px; left: 0; right: 0;
    z-index: 99;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
    flex: 0 0 auto;
    padding: 12px 8px;
    background: transparent;
    border: none;
    text-decoration: none;
    color: #94a3b8;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    cursor: pointer;
    transition: color 0.15s;
}
.category-tab::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 8px; right: 8px;
    height: 2px;
    background: #8a0303;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.category-tab.active,
.category-tab[aria-selected="true"] {
    color: #f8fafc;
}
.category-tab.active::after,
.category-tab[aria-selected="true"]::after {
    transform: scaleX(1);
}
.category-tab:hover { color: #f8fafc; }

/* Main View - Account for fixed header + tabs */
.main-view {
    padding-top: 0;
    padding-bottom: 92px; /* space for bottom tab bar */
}

/* Hero - desktop untouched; mobile hero lives in the max-width:768 block below */

/* View Sections - Dense, flat, no cards */
.view-section {
    padding: 20px 16px 8px;
}
.view-section > h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f8fafc;
    margin-bottom: 14px;
    padding: 0 4px;
}
.view-section > h3::before { content: none; }

/* Carousel - Flat, no arrows on mobile, no shadows */
.carousel-container { position: relative; width: 100%; padding-top: 0; margin-top: 0; }
.carousel-arrow { display: none; }
.carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 16px;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}
.carousel-wrapper::-webkit-scrollbar { display: none; }
.carousel-grid {
    display: flex;
    gap: 12px;
    padding: 0 4px 4px;
}
.movie-card {
    min-width: 120px;
    width: 120px;
    flex-shrink: 0;
    scroll-snap-align: start;
    transition: transform 0.2s;
}
.movie-card:hover { transform: scale(1.02); z-index: 10; }
.poster-wrapper {
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: #050505;
}
.poster-wrapper img { transition: none; }
.play-overlay { display: none; }
/* card-overlay stays mounted on all inputs: hover devices use the
   opacity fade from the base rules; touch gets corner buttons below */
.anime-badge {
    position: absolute;
    top: 6px; left: 6px; z-index: 5;
    background: #8a0303;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
}
.continue-badge,
.progress-badge,
.watched-badge {
    top: 6px; left: 6px;
    font-size: 0.55rem;
    padding: 2px 6px;
    border-radius: 2px;
}

/* Airing cards - Flat */
.airing-card {
    min-width: 110px;
    width: 110px;
    flex-shrink: 0;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
}
.airing-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 4px;
}
.airing-card-badge {
    display: block;
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #94a3b8;
    text-transform: uppercase;
}
.airing-card-badge.today { color: #8a0303; }
.airing-card-title {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #f8fafc;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.airing-card-ep {
    display: block;
    margin-top: 2px;
    font-size: 0.65rem;
    color: #64748b;
}

/* Bottom Tab Bar - Fixed, red active */
.bottom-tab-bar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 72px;
    background: #030303;
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding: 4px 0;
}
.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    background: transparent;
    border: none;
    text-decoration: none;
    color: #64748b;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
    min-width: 60px;
}
.tab-btn svg {
    width: 24px; height: 24px;
    transition: stroke 0.15s;
}
.tab-btn.active,
.tab-btn[aria-selected="true"] {
    color: #8a0303;
}
.tab-btn.active svg,
.tab-btn[aria-selected="true"] svg {
    stroke: #8a0303;
}
.tab-btn:hover { color: #94a3b8; }
.tab-btn:hover svg { stroke: #94a3b8; }

/* Desktop: hide mobile UI */
@media (min-width: 769px) {
    .mobile-header { display: none !important; }
    .category-tabs { display: none !important; }
    .bottom-tab-bar { display: none !important; }
    .top-nav { display: flex !important; }
    .main-view { padding-top: 70px; padding-bottom: 4rem; }
    .hero-featured { min-height: 80vh; height: 80dvh; }
    .movie-card { min-width: 240px; width: 240px; }
    .carousel-arrow { display: flex; }
}

/* Mobile: show mobile UI, hide desktop nav */
@media (max-width: 768px) {
    .mobile-header { display: flex; }
    .category-tabs { display: flex; }
    .bottom-tab-bar { display: flex; }
    .top-nav { display: none; }
    .main-view { padding-top: 104px; } /* header 56 + tabs ~48 */
    /* Mobile hero - compact banner: trimmed title, 2-line overview, dots clear */
    .hero-featured {
        height: auto;
        min-height: 440px;
        aspect-ratio: auto;
        background-position: center 20%;
        flex-direction: column;
        justify-content: flex-end;
        align-items: stretch;
        padding: 0 16px 60px;
    }
    .hero-featured .featured-content { max-width: none; }
    .hero-featured .featured-content h1,
    .hero-featured .featured-content h2 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        font-weight: 700;
        line-height: 1.08;
        margin-bottom: 8px;
    }
    .hero-featured .hero-meta { font-size: 0.8rem; margin-bottom: 8px; }
    .hero-featured .featured-content p {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .hero-featured .hero-actions { gap: 10px; }
    .hero-featured .hero-actions .btn-play,
    .hero-featured .hero-actions .btn-quiet {
        padding: 0.7rem 1.4rem;
        font-size: 0.78rem;
    }
    .hero-featured .trending-badge {
        color: #8a0303;
        font-family: var(--font-display);
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        margin-bottom: 8px;
    }
    .hero-dots { left: 16px; right: auto; bottom: 22px; }
    .view-section { padding: 16px; }
    .view-section > h3 { font-size: 0.85rem; }
    .movie-card { min-width: 112px; width: 112px; }
    .search-header-sticky, .view-header { top: 102px; }
    .main-view > section, .view-section { scroll-margin-top: 110px; }
    /* Touch: no hover, so show badges + corner action buttons, hide the
       full-cover open link (tap the poster goes to details anyway) */
    .card-overlay {
        display: block;
        opacity: 1;
        background: none;
        pointer-events: none;
        padding: 0;
    }
    .card-overlay .card-open { display: none; }
    .card-overlay .log-btn,
    .card-overlay .remove-history-btn {
        display: grid;
        pointer-events: auto;
        position: absolute;
        top: 6px;
        right: 6px;
        width: 32px;
        height: 32px;
        font-size: 1.05rem;
        background: rgba(10,10,15,0.78);
        z-index: 16;
    }
    .card-overlay .mark-btn,
    .card-overlay .ep-toggle-btn { display: none; }
    .poster-wrapper::after { display: none; }
}

/* Search trigger desktop -> hook to same handler */
#search-trigger-desktop { display: none; }
@media (min-width: 769px) {
    #search-trigger-desktop { display: flex; }
    #search-trigger { display: none; }
}

/* ══ Directors archive ─────────────────────────────────────────────────────
   A portrait index and a tabbed dossier. Black field, bone type, a
   blood-red active tab and restrained gold. No panel chrome: the
   photography and the typography carry the hierarchy. */

.dir-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 9rem 2rem;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── Index ─────────────────────────────────────────────────────────────── */

.dir-index {
    position: relative;
    max-width: 1560px;
    margin: 0 auto;
    padding: 6rem 3rem 5rem;
}

.dir-masthead {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2rem 3rem;
    align-items: end;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.dir-masthead h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: 0.005em;
    text-transform: none;
    color: var(--text-primary);
}

.dir-masthead-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    padding-bottom: 0.35rem;
}

.dir-lede {
    margin: 0;
    max-width: 46ch;
    color: var(--text-secondary);
    font-size: 0.97rem;
    line-height: 1.75;
}

.dir-count {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.dir-wall {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2.4rem 1.35rem;
}

.dir-card {
    display: block;
    color: inherit;
    text-decoration: none;
    outline: none;
}

.dir-card-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0b0b0d;
}

.dir-card-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dir-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.06) brightness(0.84);
    transform: scale(1.015);
    transition: filter 0.6s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.dir-card-initials {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    letter-spacing: 0.08em;
    color: rgba(212, 175, 55, 0.5);
}

.dir-card-foot {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 0.8rem;
}

.dir-card-name {
    font-family: var(--font-display);
    font-size: clamp(1.02rem, 1.45vw, 1.42rem);
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #fff;
}

.dir-card-signature {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.dir-card-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.35s ease;
}

.dir-card:hover .dir-card-media img,
.dir-card:focus-visible .dir-card-media img {
    filter: grayscale(0) contrast(1.02) brightness(0.96);
    transform: scale(1.05);
}

.dir-card:hover .dir-card-name,
.dir-card:focus-visible .dir-card-name {
    text-decoration: underline;
    text-decoration-color: var(--accent-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.dir-card:focus-visible .dir-card-frame::after {
    border-color: rgba(212, 175, 55, 0.85);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

/* ── Dossier: signature ────────────────────────────────────────────────── */

.dir-signature {
    padding: 0 0 2rem;
}

.dir-signature-head {
    margin-bottom: 1.5rem;
}

.dir-signature h2 {
    max-width: 100%;
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.16;
    letter-spacing: -0.005em;
    color: var(--text-primary);
}

.dir-technique {
    margin: 0;
    max-width: 72ch;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.dir-signature-body {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 0.6fr);
    gap: 2rem 4rem;
    align-items: start;
    margin-bottom: 2.9rem;
}

.dir-description {
    max-width: 64ch;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.01rem;
    line-height: 1.85;
}

.dir-references {
    padding-left: 1.4rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.dir-references h4 {
    margin: 0 0 0.85rem;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dir-references ol {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dir-references a {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.45;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding-bottom: 1px;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.dir-references a:hover,
.dir-references a:focus-visible {
    color: var(--text-primary);
    border-color: var(--accent-gold);
    outline: none;
}

.dir-frames {
    margin-top: 0.4rem;
}

.dir-frames-label {
    margin: 0 0 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dir-frames-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.dir-frame {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    outline: none;
}

.dir-frame-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0b0b0d;
}

.dir-frame-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.82) contrast(1.05);
    transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.45s ease;
}

.dir-frame-plate {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    letter-spacing: 0.1em;
    color: rgba(212, 175, 55, 0.4);
    background: radial-gradient(80% 80% at 50% 40%, rgba(138, 3, 3, 0.28), transparent 70%);
}

.dir-frame-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(3, 3, 3, 0.05) 40%, rgba(3, 3, 3, 0.6) 100%);
}

.dir-frame-caption {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-top: 0.9rem;
}

.dir-frame-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.dir-frame-note {
    max-width: 58ch;
    color: var(--text-secondary);
    font-size: 0.83rem;
    line-height: 1.6;
}

.dir-frame-open {
    margin-top: 0.15rem;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-gold);
    transition: color 0.25s ease;
}

.dir-frame:hover .dir-frame-media img,
.dir-frame:focus-visible .dir-frame-media img {
    transform: scale(1.035);
    filter: brightness(0.95) contrast(1.03);
}

.dir-frame:hover .dir-frame-open,
.dir-frame:focus-visible .dir-frame-open {
    color: var(--text-primary);
}

.dir-frame:focus-visible .dir-frame-media {
    box-shadow: 0 0 0 2px var(--accent-gold);
}

/* ── Dossier: best films ───────────────────────────────────────────────── */

.dir-best {
    max-width: 840px;
    padding: 1.5rem 0 1rem;
}

.dir-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.dir-section-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-primary);
}

.dir-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 640px;
    margin-bottom: 2.3rem;
}

.dir-plate {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    outline: none;
}

.dir-plate-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0b0b0d;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.dir-plate-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92);
    transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}

.dir-plate-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    color: rgba(212, 175, 55, 0.45);
}

.dir-plate-rank {
    margin-top: 0.9rem;
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
}

.dir-plate-title {
    margin-top: 0.25rem;
    font-family: var(--font-display);
    font-size: 1.12rem;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.dir-plate-meta {
    margin-top: 0.32rem;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dir-plate:hover .dir-plate-frame img,
.dir-plate:focus-visible .dir-plate-frame img {
    transform: scale(1.03);
    filter: saturate(1.05) brightness(1.03);
}

.dir-plate:hover .dir-plate-title,
.dir-plate:focus-visible .dir-plate-title {
    text-decoration: underline;
    text-decoration-color: var(--accent-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.dir-plate:focus-visible .dir-plate-frame {
    box-shadow: 0 0 0 2px var(--accent-gold);
}

.dir-ranks {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dir-rank {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 4rem;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease;
}

.dir-rank-no {
    font-family: var(--font-display);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    color: var(--accent-gold);
}

.dir-rank-link {
    display: flex;
    align-items: baseline;
    gap: 1.1rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    outline: none;
}

.dir-rank-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.dir-rank-meta {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.dir-rank-score {
    font-family: var(--font-display);
    font-size: 1.2rem;
    text-align: right;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.dir-rank:hover {
    background: rgba(255, 255, 255, 0.025);
}

.dir-rank-link:hover .dir-rank-title,
.dir-rank-link:focus-visible .dir-rank-title {
    text-decoration: underline;
    text-decoration-color: var(--accent-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.dir-rank-link:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 4px;
}

.dir-method-note {
    max-width: 78ch;
    margin: 1rem 0 0;
    font-size: 0.82rem;
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
}

.dir-empty-note {
    margin: 0.5rem 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Curated dossiers: one compact portrait, one visible reading surface. */
.director-person {
    max-width: 1440px;
    margin: 0 auto;
    padding: 5.5rem 3rem 5rem;
    background: #050505;
}
.director-back {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-decoration: none;
}
.director-back:hover { color: var(--text-primary); }
.director-person .person-header {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 1.75rem;
    margin-bottom: 2rem;
}
.director-person .person-photo {
    width: 124px;
    min-width: 0;
    margin: 0;
    border-radius: 2px;
    box-shadow: none;
    filter: grayscale(1);
}
.director-person .person-info { min-width: 0; }
.director-person .person-info h1 {
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4.5vw, 3.8rem);
    font-weight: 500;
    line-height: 1.12;
    text-align: left;
    overflow-wrap: anywhere;
}
.director-person-tagline {
    margin: 0 0 0.8rem;
    color: var(--accent-gold);
    font-size: 0.92rem;
}
.director-person .person-meta {
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.76rem;
}
.director-person .person-bio {
    max-width: 78ch;
    padding-top: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text-secondary);
}
.director-biography summary,
.dir-ranking-method summary {
    width: fit-content;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
}
.director-tabs {
    display: flex;
    gap: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.75rem;
}
.director-tabs [role="tab"] {
    padding: 0.8rem 0;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--text-secondary);
    font-size: 0.92rem;
    white-space: nowrap;
    cursor: pointer;
}
.director-tabs [aria-selected="true"] {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
}
.director-person .director-panel[hidden],
.director-person .person-credits-grid[hidden],
.director-person .person-credits-empty[hidden],
.director-person #person-credits-more[hidden] { display: none; }
.director-person .person-filmography {
    margin-top: 0;
    padding-top: 0;
    border: 0;
}
.director-person .person-filmography-heading h2 { font-size: 1.8rem; }
.director-person .person-filmography-heading p { font-size: 0.82rem; }
.director-person .person-credits-count {
    color: var(--text-secondary);
    font-family: var(--font-body);
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.78rem;
}
.director-person .person-credit-controls {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}
.director-person .person-credit-tabs { gap: 0; }
.director-person .person-credit-tabs button {
    border-radius: 2px;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    letter-spacing: 0;
    text-transform: none;
}
.director-person .person-credit-tabs button[aria-pressed="true"] {
    border-color: var(--accent-primary);
    background: rgba(138, 3, 3, 0.2);
}
.director-role-filter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.director-role-filter select {
    max-width: 100%;
    min-height: 38px;
    padding: 0.4rem 1.5rem 0.4rem 0.6rem;
    background: var(--bg-base);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}
.director-person .director-known-for { margin: 0 0 1.5rem; padding: 0; }
.director-person .director-known-for > h3 {
    font-size: 1.8rem;
    letter-spacing: 0;
    text-transform: none;
}
.director-person .person-credit-meta { text-transform: none; letter-spacing: 0; }
.director-person .person-credits-more button { border-radius: 2px; text-transform: none; letter-spacing: 0; }
.director-tabs button:focus-visible,
.director-role-filter select:focus-visible,
.director-biography summary:focus-visible,
.dir-ranking-method summary:focus-visible,
.director-back:focus-visible,
.director-panel:focus-visible,
.director-person .person-credit-tabs button:focus-visible,
.director-person .person-credits-more button:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 4px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1280px) {
    .dir-index { padding: 5.5rem 2.2rem 5rem; }
    .dir-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .dir-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.1rem; }
    .dir-signature-body { grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr); gap: 2rem 2.5rem; }
}

@media (max-width: 860px) {
    .dir-masthead { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
    .dir-masthead-aside { align-items: flex-start; gap: 0.25rem; }
    .dir-signature-body { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
    .dir-references { padding-left: 0; padding-top: 1.2rem; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
    .dir-frames-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
    .dir-section-head { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
}

@media (max-width: 640px) {
    .dir-index { padding: 5.2rem 1.15rem 4rem; }
    .dir-masthead { padding-bottom: 1.8rem; margin-bottom: 2rem; }
    .dir-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 0.75rem; }
    .dir-card-foot { gap: 0.3rem; }
    .dir-card-signature { font-size: 0.72rem; -webkit-line-clamp: 2; }
    .dir-signature { padding-bottom: 1.5rem; }
    .dir-signature h2 { max-width: 100%; }
    .dir-frames { margin-top: 0; }
    .dir-podium { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
    .dir-plate-title { font-size: 0.92rem; }
    .dir-plate-meta { font-size: 0.6rem; }
    .dir-rank { grid-template-columns: 2rem minmax(0, 1fr) 3rem; gap: 0.6rem; }
    .dir-rank-link { flex-direction: column; gap: 0.2rem; }
    .dir-rank-title { font-size: 1rem; }
    .dir-rank-score { font-size: 1rem; }
    .director-person { padding: 4.5rem 1.15rem 3rem; }
    .director-person .person-header { grid-template-columns: 76px minmax(0, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
    .director-person .person-photo { width: 76px; }
    .director-person .person-info h1 { font-size: clamp(1.7rem, 7vw, 2.5rem); }
    .director-person-tagline { font-size: 0.8rem; }
    .director-tabs { gap: 1.2rem; }
    .director-tabs [role="tab"] { font-size: 0.82rem; }
    .director-person .person-credits-grid { gap: 1.25rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .dir-card-media img,
    .dir-frame-media img,
    .dir-plate-frame img,
    .dir-card-name,
    .dir-rank,
    .dir-frame-open {
        transition: none;
    }

    .dir-card:hover .dir-card-media img,
    .dir-card:focus-visible .dir-card-media img,
    .dir-frame:hover .dir-frame-media img,
    .dir-frame:focus-visible .dir-frame-media img,
    .dir-plate:hover .dir-plate-frame img,
    .dir-plate:focus-visible .dir-plate-frame img {
        transform: none;
    }
}
