/* UpNext - Modern Design System */
:root {
    --navy: #0f172a;
    --navy-mid: #1e293b;
    --navy-light: #334155;
    --cream: #f8fafc;
    --cream-dark: #e2e8f0;
    --cream-darker: #cbd5e1;
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --gold-glow: rgba(245, 158, 11, 0.12);
    --green: #10b981;
    --green-light: #34d399;
    --red: #ef4444;
    --text: #0f172a;
    --text-light: #475569;
    --text-muted: #94a3b8;
    --white: #ffffff;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Category colors */
    --read-color: #d97706;
    --read-bg: rgba(217, 119, 6, 0.08);
    --watch-color: #6366f1;
    --watch-bg: rgba(99, 102, 241, 0.08);
    --play-color: #10b981;
    --play-bg: rgba(16, 185, 129, 0.08);
    --go-color: #8b5cf6;
    --go-bg: rgba(139, 92, 246, 0.08);
    --family-color: #ec4899;
    --family-bg: rgba(236, 72, 153, 0.08);

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--cream);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.06), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(245, 158, 11, 0.05), transparent);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    overscroll-behavior-x: none;
}

body > * {
    min-width: 0;
    max-width: 100%;
}

#main-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

/* ========== Hero / App Bar ========== */
.hero {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    color: var(--text);
    padding: 0.85rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.hero-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.logo a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--navy);
    text-decoration: none;
    transition: opacity var(--transition);
}

.logo a:hover {
    opacity: 0.85;
}

.logo-icon {
    flex-shrink: 0;
    transition: transform var(--transition);
}

.logo a:hover .logo-icon {
    transform: scale(1.05);
}

.tagline-brand {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
    padding-left: 0.75rem;
    border-left: 1px solid var(--cream-dark);
    white-space: nowrap;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 1.6rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Auth area in hero */
.auth-area, .user-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.settings-icon {
    font-size: 1.1em;
    opacity: 0.7;
}

#btn-settings #user-email {
    margin-right: 0.2em;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* ========== Quick Add ========== */
.nav-pill-add {
    background: var(--gold-glow);
    color: var(--gold);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.nav-pill-add:hover {
    background: var(--gold);
    color: #0f172a;
}

.nav-pill-add-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

#quick-add-form-panel .quick-add-field {
    margin-top: 1rem;
}

.quick-add-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 1.5px solid var(--cream-dark);
    border-radius: 999px;
    padding: 0.3rem 0.35rem 0.3rem 0.85rem;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.quick-add-field:focus-within {
    border-color: var(--gold);
    box-shadow: var(--shadow-xs), 0 0 0 3px var(--gold-glow);
}

.quick-add-icon {
    width: 18px;
    height: 18px;
    color: var(--gold);
    flex-shrink: 0;
}

.quick-add-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--text);
    background: transparent;
    min-width: 0;
    padding: 0.5rem 0;
}

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

.quick-add-field .btn-primary {
    background: var(--gold);
    color: #0f172a;
    border-radius: 999px;
    flex-shrink: 0;
    font-weight: 600;
    padding: 0.45rem 1rem;
}

.quick-add-field .btn-primary:hover {
    background: var(--gold-light);
    color: #0f172a;
}

.quick-add-field .btn-primary:disabled {
    opacity: 0.65;
    transform: none;
}

.quick-add-field.loading .quick-add-input {
    opacity: 0.6;
}

.quick-add-modal {
    max-width: 480px;
}

.quick-add-candidates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
}

.quick-add-candidate {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color var(--transition), background var(--transition);
}

.quick-add-candidate:hover {
    border-color: var(--gold);
    background: var(--cream);
}

.quick-add-candidate-cat {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.quick-add-candidate-cat.read { background: var(--read-bg, #fef3c7); color: var(--read-color, #d97706); }
.quick-add-candidate-cat.watch { background: var(--watch-bg, #eef2ff); color: var(--watch-color, #6366f1); }
.quick-add-candidate-cat.play { background: var(--play-bg, #d1fae5); color: var(--play-color, #10b981); }
.quick-add-candidate-cat.go { background: var(--go-bg, #ede9fe); color: var(--go-color, #8b5cf6); }

.quick-add-candidate-info {
    min-width: 0;
    flex: 1;
}

.quick-add-candidate-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-add-candidate-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ========== Category Navigation Pills ========== */
.category-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 57px;
    z-index: 50;
}

.category-nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.65rem 1.5rem;
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.65rem 1.1rem;
    min-height: 44px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-light);
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.nav-pill:hover {
    background: var(--cream-dark);
    color: var(--text);
}

.nav-pill.active {
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-xs);
}

.nav-pill.active[data-category="read"] {
    background: var(--read-color);
    border-color: var(--read-color);
}

.nav-pill.active[data-category="watch"] {
    background: var(--watch-color);
    border-color: var(--watch-color);
}

.nav-pill.active[data-category="play"] {
    background: var(--play-color);
    border-color: var(--play-color);
}

.nav-pill.active[data-category="go"] {
    background: var(--go-color);
    border-color: var(--go-color);
}

.nav-pill.active[data-category="news"] {
    background: #0891b2;
    border-color: #0891b2;
}

/* ========== Category Cards Grid ========== */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.category-card-read::before { background: linear-gradient(135deg, var(--read-bg), transparent 70%); }
.category-card-watch::before { background: linear-gradient(135deg, var(--watch-bg), transparent 70%); }
.category-card-play::before { background: linear-gradient(135deg, var(--play-bg), transparent 70%); }
.category-card-go::before { background: linear-gradient(135deg, var(--go-bg), transparent 70%); }

.category-card:hover::before {
    opacity: 1;
}

.category-card-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    position: relative;
    z-index: 1;
}

.category-card-read .category-card-icon { background: var(--read-bg); color: var(--read-color); }
.category-card-watch .category-card-icon { background: var(--watch-bg); color: var(--watch-color); }
.category-card-play .category-card-icon { background: var(--play-bg); color: var(--play-color); }
.category-card-go .category-card-icon { background: var(--go-bg); color: var(--go-color); }

.category-card-info {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.category-card-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    letter-spacing: -0.01em;
}

.category-card-read .category-card-name { color: var(--read-color); }
.category-card-watch .category-card-name { color: var(--watch-color); }
.category-card-play .category-card-name { color: var(--play-color); }
.category-card-go .category-card-name { color: var(--go-color); }

.category-card-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ========== Last 30 Days (Recent Episodes) ========== */
.recent-episodes-section {
    margin-bottom: 1.25rem;
}

.recent-episodes-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    cursor: pointer;
    font-family: inherit;
    color: var(--navy);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
}

.recent-episodes-toggle:hover {
    box-shadow: var(--shadow);
    border-color: transparent;
}

.recent-episodes-label {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1;
    text-align: left;
}

.recent-episodes-count {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.recent-episodes-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--cream-dark);
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    transition: transform var(--transition), background var(--transition);
}

.recent-episodes-toggle.expanded .recent-episodes-icon {
    transform: rotate(45deg);
    background: var(--navy);
    color: var(--white);
}

.recent-episodes-list {
    margin-top: 0.6rem;
    background: var(--white);
    border: 1px solid var(--cream-dark);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.recent-episodes-empty {
    text-align: center;
    padding: 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.recent-show {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-top: 1px solid var(--cream-dark);
    cursor: pointer;
    transition: background var(--transition);
}

.recent-show:first-child {
    border-top: none;
}

.recent-show:hover {
    background: var(--cream);
}

.recent-show-cover {
    width: 42px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.recent-show-cover-placeholder {
    width: 42px;
    height: 60px;
    background: linear-gradient(135deg, var(--cream-dark), var(--cream));
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.recent-show-body {
    flex: 1;
    min-width: 0;
}

.recent-show-head {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.recent-show-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--navy);
    font-size: 0.92rem;
}

.recent-show-network {
    font-size: 0.8rem;
    color: var(--watch-color, #4f46e5);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.recent-ep-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.recent-ep {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-color, #1a1a1a);
    line-height: 1.45;
}

.recent-ep-watched {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(0, 0, 0, 0.3);
}

.recent-ep-check {
    color: var(--green, #2e7d32);
    font-weight: 700;
}

.recent-ep-date {
    color: var(--text-light);
    min-width: 88px;
}

.recent-ep-label {
    font-weight: 600;
    color: var(--navy);
}

.recent-ep-watched .recent-ep-label {
    color: var(--text-muted);
}

/* ========== Coming Up Section ========== */
.coming-up-section {
    margin-top: 0.5rem;
    margin-bottom: 1.75rem;
}

.coming-up-lead {
    margin: -0.35rem 0 1rem;
}

.coming-up-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.coming-up-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.coming-up-day {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--cream-dark);
    margin-bottom: 0.25rem;
}

.coming-up-day-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
}

.coming-up-day-date {
    font-size: 0.78rem;
    color: var(--text-light);
}

.coming-up-day-label {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
}

.coming-up-day-badge {
    background: var(--green, #2e7d32);
    color: var(--white);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.5rem;
    margin-left: 0.15rem;
}

.coming-up-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 0.85rem 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all var(--transition);
    cursor: pointer;
}

.coming-up-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: transparent;
}

.coming-up-cover {
    width: 36px;
    height: 52px;
    object-fit: cover;
    border-radius: 3px;
    background: var(--cream-dark);
    flex-shrink: 0;
    display: block;
}

.coming-up-thumb {
    position: relative;
    flex-shrink: 0;
}

.coming-up-type-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--white);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
    line-height: 0;
}

.coming-up-type-icon {
    display: block;
}

.coming-up-type-read { background: #fef3c7; color: #d97706; }
.coming-up-type-tv { background: #eef2ff; color: #6366f1; }
.coming-up-type-movie { background: #e0e7ff; color: #4f46e5; }
.coming-up-type-play { background: #d1fae5; color: #10b981; }
.coming-up-type-go { background: #ede9fe; color: #8b5cf6; }

.coming-up-cover-placeholder {
    width: 36px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cream-dark), var(--cream));
    border-radius: 3px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.coming-up-info {
    min-width: 0;
    flex: 1;
}

.coming-up-title {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coming-up-author {
    font-size: 0.78rem;
    color: var(--text-light);
}

.coming-up-time {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--watch-color, #4f46e5);
    margin-top: 0.15rem;
    letter-spacing: 0.02em;
}

.coming-up-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--green);
    white-space: nowrap;
    flex-shrink: 0;
}

.coming-up-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ========== Sign-up CTA ========== */
.signup-cta {
    margin-bottom: 2rem;
}

.cta-card {
    background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
    border-radius: var(--radius-xl);
    padding: 2rem 2.25rem;
    text-align: center;
    color: #ffffff;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15), transparent 70%);
    pointer-events: none;
}

.cta-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffffff;
    position: relative;
}

.cta-card p {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.cta-card .btn-primary {
    padding: 0.7rem 2rem;
    font-size: 0.95rem;
}

/* ========== Guest demo & promos ========== */
.demo-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-light);
}

.demo-banner-label {
    flex-shrink: 0;
    padding: 0.15rem 0.55rem;
    background: var(--watch-color);
    color: #fff;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.demo-banner-text .btn-link {
    color: var(--watch-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}

.guest-promo {
    margin-bottom: 1.5rem;
}

.guest-promo-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: var(--white);
    border: 1px solid var(--cream-dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.guest-promo-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.45;
}

.guest-promo-text strong {
    color: var(--text);
    font-size: 0.95rem;
}

.guest-promo-inner .btn-primary {
    flex-shrink: 0;
    white-space: nowrap;
}

.guest-demo-section {
    margin-bottom: 2rem;
}

.guest-demo-section .section-hint {
    margin: -0.5rem 0 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.recent-episodes-list .demo-banner {
    margin: 0.75rem 1rem 0.5rem;
}

@media (max-width: 640px) {
    .guest-promo-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .guest-promo-inner .btn-primary {
        width: 100%;
    }
}

/* ========== Category Headers ========== */
.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-xs);
}

.category-header-icon {
    font-size: 2rem;
    line-height: 1;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.category-header-read .category-header-icon { background: var(--read-bg); color: var(--read-color); }
.category-header-watch .category-header-icon { background: var(--watch-bg); color: var(--watch-color); }
.category-header-play .category-header-icon { background: var(--play-bg); color: var(--play-color); }
.category-header-go .category-header-icon { background: var(--go-bg); color: var(--go-color); }
.category-header-news .category-header-icon { background: rgba(8, 145, 178, 0.1); color: #0891b2; }
.category-header-calendar .category-header-icon { background: rgba(14, 165, 233, 0.08); color: #0ea5e9; }
.category-header-family .category-header-icon { background: var(--family-bg); color: var(--family-color); }

.category-header-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    letter-spacing: -0.02em;
}

.category-header-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.category-header-read { border-color: rgba(217, 119, 6, 0.2); }
.category-header-read .category-header-title { color: var(--read-color); }
.category-header-news { border-color: rgba(8, 145, 178, 0.2); }
.category-header-news .category-header-title { color: #0891b2; }

/* ========== Category Placeholder (Coming Soon) ========== */
.category-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.4s ease;
}

.category-placeholder-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.category-placeholder h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.category-placeholder p {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

.category-placeholder-watch h2 { color: var(--watch-color); }
.category-placeholder-play h2 { color: var(--play-color); }
.category-placeholder-go h2 { color: var(--go-color); }

/* ========== Search (inline in Read category) ========== */
.search-section-inline {
    margin-bottom: 1.5rem;
    overflow: visible;
}

.search-section-inline .search-wrapper {
    max-width: 100%;
}

.search-section-inline .search-input {
    box-shadow: var(--shadow-xs);
    border: 1.5px solid var(--cream-dark);
    border-radius: var(--radius);
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    background: var(--white);
}

.search-section-inline .search-input:focus {
    border-color: var(--watch-color);
    box-shadow: var(--shadow-xs), 0 0 0 3px var(--watch-bg);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1.2rem 0.75rem 2.8rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    box-shadow: var(--shadow-xs);
}

.search-input:focus {
    border-color: var(--navy-light);
    box-shadow: var(--shadow-xs), 0 0 0 3px rgba(51, 65, 85, 0.1);
}

.search-wrapper {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

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

/* Typeahead */
.typeahead-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--cream-dark);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 400;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.typeahead-item {
    padding: 0.75rem 1.2rem;
    cursor: pointer;
    font-size: 0.92rem;
    transition: background 0.15s;
    border-bottom: 1px solid var(--cream);
}

.typeahead-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.typeahead-item:last-child {
    border-bottom: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.typeahead-item:hover,
.typeahead-item.active {
    background: var(--cream);
}

.typeahead-loading {
    padding: 0.75rem 1.2rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Search results dropdown (Watch / Play / Go) */
.search-results-dropdown {
    max-height: min(70vh, 32rem);
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0 0.4rem;
    overflow: hidden;
}

.search-results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem 0.45rem;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
    border-bottom: 1px solid var(--cream);
}

.search-results-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.search-results-close {
    border: none;
    background: var(--cream);
    color: var(--text-light);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-results-close:hover {
    background: var(--cream-dark);
}

.search-results-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

.search-results-heading {
    margin: 0.65rem 0.9rem 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.search-result-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.55rem 0.9rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
}

.search-result-row:hover,
.search-result-row:focus-visible {
    background: var(--cream);
    outline: none;
}

.search-result-thumb,
.search-result-thumb-placeholder {
    width: 40px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--cream-dark);
}

.search-result-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-thumb-placeholder .icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-result-thumb-round,
.search-result-thumb-placeholder.round {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.search-result-info {
    min-width: 0;
    flex: 1;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search-results-dropdown .no-results,
.search-results-dropdown .api-notice,
.search-results-dropdown .typeahead-loading {
    padding: 1.1rem 1rem;
    text-align: center;
}

.search-results-dropdown .no-results-icon {
    font-size: 1.4rem;
    margin-bottom: 0.35rem;
}

.search-results-dropdown .btn-back {
    margin: 0.5rem 0.9rem 0.25rem;
}

.search-results-dropdown .event-card {
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0.55rem 0.9rem;
}

.search-results-dropdown .event-card:hover {
    transform: none;
    box-shadow: none;
}

.search-results-dropdown .actor-card {
    min-width: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    padding: 0.55rem 0.9rem;
}

.search-results-dropdown .actor-card:hover {
    transform: none;
    box-shadow: none;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.3rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.3;
    font-family: inherit;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--navy-mid);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-light);
    border: 1.5px solid var(--cream-dark);
}

.btn-ghost:hover {
    background: var(--cream);
    border-color: var(--cream-darker);
    color: var(--text);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--cream-dark);
}

.btn-outline:hover {
    border-color: var(--navy-light);
    background: var(--cream);
    color: var(--navy);
}

.btn-sm {
    padding: 0.5rem 0.95rem;
    font-size: 0.85rem;
    min-height: 40px;
}

.btn-full {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
}

.btn-link:hover {
    color: var(--gold-light);
}

.btn-follow {
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.btn-follow:hover {
    background: var(--navy-mid);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-follow.following {
    background: var(--green);
    color: var(--white);
}

.btn-follow.following:hover {
    box-shadow: 0 4px 14px rgba(29, 122, 63, 0.3);
}

.btn-watched {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--cream-dark);
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.btn-watched:hover {
    background: var(--cream);
    transform: translateY(-1px);
}

.btn-watched.watched {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.btn-watched.watched:hover {
    box-shadow: 0 4px 14px rgba(26, 26, 46, 0.3);
}

.watched-shows-section {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--cream-dark);
}

.family-watched-section {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--cream-dark);
}
.family-watched-section .watched-show-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.35rem;
}

.watched-shows-section .section-title {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.watched-shows-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.watched-shows-list .watched-show-item {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
}

.watched-shows-list .watched-show-link {
    color: var(--text-muted);
    text-decoration: none;
}

.watched-shows-list .watched-show-link:hover {
    color: var(--navy);
    text-decoration: underline;
}

.btn-amazon {
    background: #ff9900;
    color: #111;
    font-weight: 600;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-amazon:hover {
    background: #e68a00;
    transform: translateY(-1px);
}

.btn-more-stores {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.3rem 0;
    text-decoration: underline;
    margin-top: 0.4rem;
    font-family: inherit;
}

.btn-more-stores:hover {
    color: var(--text-light);
}

.store-links-expanded {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--cream-dark);
}

.btn-store {
    display: inline-block;
    padding: 0.28rem 0.65rem;
    font-size: 0.73rem;
    font-weight: 500;
    color: var(--navy);
    background: var(--cream);
    border-radius: 5px;
    text-decoration: none;
    transition: background var(--transition);
}

.btn-store:hover {
    background: var(--cream-dark);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== Container ========== */
.container {
    max-width: 960px;
    width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 2.5rem;
    flex: 1;
}

/* ========== My Authors ========== */
.my-authors-section {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.4s ease;
}

.my-authors-section .section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.my-author-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.my-author-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.my-author-card.active {
    background: var(--read-bg);
    border-color: rgba(217, 119, 6, 0.3);
    box-shadow: var(--shadow);
}

.ma-cover {
    width: 44px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--cream-dark);
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.ma-cover-placeholder {
    width: 44px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cream-dark), var(--cream));
    border-radius: 4px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

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

.ma-author-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ma-book {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ma-no-book {
    color: var(--text-muted);
    font-style: italic;
}

.ma-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ========== Caught Up Authors Table ========== */
.caught-up-table-wrap {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.caught-up-table-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--cream-dark);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.6) 0%, transparent 100%);
}

.caught-up-search {
    flex: 1;
    min-width: 0;
    margin: 0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.caught-up-count {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.caught-up-table-scroll {
    max-height: 420px;
    overflow: auto;
}

.caught-up-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.caught-up-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--white);
    box-shadow: 0 1px 0 var(--cream-dark);
}

.caught-up-table th {
    padding: 0;
    text-align: left;
    font-weight: 600;
}

.caught-up-table th:nth-child(2),
.caught-up-table th:last-child {
    text-align: right;
}

.caught-up-table th:nth-child(2) {
    width: 5.5rem;
}

.caught-up-table th:last-child {
    width: 7rem;
}

.caught-up-sort {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
}

.caught-up-table th:last-child .caught-up-sort {
    justify-content: flex-end;
}

.caught-up-table th:nth-child(2) .caught-up-sort {
    justify-content: flex-end;
}

.caught-up-sort:hover,
.caught-up-sort.active {
    color: var(--read-color);
}

.caught-up-sort .sort-indicator {
    font-size: 0.7rem;
    opacity: 0.85;
}

.caught-up-row {
    cursor: pointer;
    transition: background var(--transition);
}

.caught-up-row:hover {
    background: var(--read-bg);
}

.caught-up-row td {
    padding: 0.65rem 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.caught-up-name {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--navy);
}

.caught-up-link {
    color: inherit;
    text-decoration: none;
}

.caught-up-link:hover {
    color: var(--read-color);
    text-decoration: underline;
}

.caught-up-count-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--text-light);
}

.caught-up-year-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

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

@media (max-width: 600px) {
    .caught-up-table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .caught-up-count {
        text-align: right;
    }

    .caught-up-table-scroll {
        max-height: 360px;
    }
}

/* ========== Author Detail ========== */
.author-detail {
    animation: fadeIn 0.35s ease;
}

.author-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cream-dark);
}

.author-name {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: var(--navy);
    letter-spacing: -0.3px;
}

/* ========== Book Sections ========== */
.book-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.author-upcoming-section {
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    padding: 1.25rem 1.25rem 0.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(99, 102, 241, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-lg);
}

.author-upcoming-section .section-title {
    font-size: 1.2rem;
    color: var(--blue);
}

/* ========== Book Grid ========== */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* ========== Book Card ========== */
.book-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    object-fit: cover;
    object-position: center top;
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.book-cover-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cream-dark) 0%, var(--cream) 100%);
    font-size: 3rem;
}

.book-body {
    padding: 1rem 1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.book-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.book-date.upcoming {
    color: var(--green);
    font-weight: 600;
}

.book-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.45;
    margin-bottom: 0.8rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ========== Read Checkbox ========== */
.read-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-light);
    cursor: pointer;
    user-select: none;
}

.read-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
    cursor: pointer;
}

/* ========== Read Books List ========== */
.read-list {
    list-style: none;
    padding: 0;
}

.read-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--cream-dark);
    font-size: 0.88rem;
}

.read-list li:last-child {
    border-bottom: none;
}

.read-list .read-title {
    color: var(--text);
    font-weight: 500;
}

.read-list .read-date {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.read-list .btn-unread {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.73rem;
    cursor: pointer;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
    font-family: inherit;
}

.read-list .btn-unread:hover {
    color: var(--red);
    background: #fde8e8;
}

/* ========== Follow Prompt (anonymous) ========== */
.follow-prompt {
    animation: fadeIn 0.3s ease;
}

.follow-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    max-width: 450px;
    margin: 0 auto;
    text-align: center;
    border: 1px solid var(--cream-dark);
}

.follow-card h3 {
    font-family: var(--font-display);
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.follow-card p {
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    line-height: 1.45;
}

.follow-form {
    display: flex;
    gap: 0.5rem;
}

.follow-form .search-input {
    flex: 1;
    border-radius: var(--radius);
    padding: 0.7rem 1rem 0.7rem 1rem;
}

.follow-form .btn {
    white-space: nowrap;
}

.privacy-note {
    font-size: 0.73rem !important;
    color: var(--text-muted) !important;
    margin-top: 0.8rem !important;
    margin-bottom: 0 !important;
    font-style: italic;
}

/* ========== Status Message ========== */
.status-message {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    text-align: center;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.88rem;
    font-weight: 500;
    max-width: min(960px, calc(100% - 2rem));
    box-shadow: var(--shadow-lg);
}

.status-message.success {
    background: #e8f5e9;
    color: var(--green);
    border: 1px solid #c8e6c9;
}

.status-message.error {
    background: #fde8e8;
    color: var(--red);
    border: 1px solid #f5c6c6;
}

.status-message.info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.section-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.modal-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: var(--cream);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: background var(--transition);
    line-height: 1;
}

.modal-close:hover {
    background: var(--cream-dark);
}

/* ========== Auth Form ========== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.auth-form input {
    padding: 0.8rem 1rem;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.auth-form input:focus {
    border-color: var(--gold);
}

.auth-error {
    color: var(--red);
    font-size: 0.83rem;
    padding: 0.5rem 0.75rem;
    background: #fde8e8;
    border-radius: var(--radius);
}

.auth-switch {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.88rem;
    color: var(--text-light);
}

/* ========== Settings ========== */
.modal.settings-modal {
    max-width: 720px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.settings-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 90vh;
}

.settings-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.75rem 0.85rem;
    padding-right: 3.5rem;
    border-bottom: 1px solid var(--cream-dark);
    flex-shrink: 0;
}

.settings-content h2 {
    font-family: var(--font-display);
    color: var(--navy);
    margin-bottom: 0;
    font-size: 1.45rem;
}

.settings-layout {
    display: flex;
    min-height: 0;
    flex: 1;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 168px;
    flex-shrink: 0;
    padding: 0.85rem 0.65rem;
    border-right: 1px solid var(--cream-dark);
    background: var(--cream);
    overflow-y: auto;
}

.settings-nav-btn {
    appearance: none;
    border: none;
    background: transparent;
    text-align: left;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-light);
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.settings-nav-btn:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text);
}

.settings-nav-btn.active {
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow-xs);
}

.settings-panels {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 0.25rem 1.5rem 1.5rem;
}

.settings-panel {
    animation: settingsPanelIn 0.18s ease;
}

.settings-panel[hidden] {
    display: none !important;
}

@keyframes settingsPanelIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-inline-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.settings-inline-row input[type="text"],
.settings-inline-row input[type="email"],
.settings-inline-row select.settings-select,
.settings-inline-wrap input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--white);
    color: var(--text);
}

.settings-select {
    max-width: 100%;
    cursor: pointer;
}

.settings-inline-wrap {
    flex-wrap: wrap;
}

.settings-zip-input {
    max-width: 120px;
    flex: 0 0 auto !important;
}

.settings-authors-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.settings-search-input {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.8rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--white);
    color: var(--text);
}

.settings-search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.settings-authors-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.followed-list-scroll {
    max-height: min(42vh, 360px);
    overflow-y: auto;
    padding-right: 0.15rem;
}

.family-invite-perms {
    margin-top: 0.55rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-light);
}

.family-invite-perms label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.family-invite-sep {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.family-member-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.85rem 0.9rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: var(--radius);
    background: var(--white);
}

.family-member-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.family-member-identity {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.family-member-badge {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #b45309;
    background: rgba(245, 158, 11, 0.15);
}

.family-member-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.family-member-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
    font-size: 0.78rem;
    color: var(--text-light);
}

.family-member-check {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    cursor: pointer;
}

.family-member-controls .btn-family-save {
    margin-left: auto;
}

.family-member-status {
    min-height: 1rem;
    font-size: 0.75rem;
    color: var(--green);
}

.btn-family-remove {
    flex-shrink: 0;
    color: var(--red) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

.btn-family-remove:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

.settings-desc {
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
}

.category-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.category-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: var(--radius);
    background: var(--white);
}

.category-toggle-fixed {
    opacity: 0.75;
}

.category-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--cream);
    flex-shrink: 0;
}

.category-toggle-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.category-toggle-info strong {
    font-size: 0.88rem;
    color: var(--text);
}

.category-toggle-info span {
    font-size: 0.75rem;
    color: var(--text-light);
}

.category-toggle-always {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

label.category-toggle-row {
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

label.category-toggle-row:hover {
    border-color: var(--gold);
    background: var(--gold-glow);
}

.category-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.category-toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--cream-dark);
    flex-shrink: 0;
    transition: background var(--transition);
}

.category-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: transform var(--transition);
}

.category-toggle-input:checked + .category-toggle-switch {
    background: var(--green);
}

.category-toggle-input:checked + .category-toggle-switch::after {
    transform: translateX(18px);
}

.category-toggle-input:focus-visible + .category-toggle-switch {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.settings-subtitle {
    font-family: var(--font-display);
    color: var(--navy);
    font-size: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cream-dark);
}

.settings-panel > .settings-subtitle:first-child {
    margin-top: 0.85rem;
    padding-top: 0;
    border-top: none;
}

.pref-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pref-option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.pref-option:hover {
    border-color: var(--gold);
    background: var(--gold-glow);
}

.pref-option input {
    margin-top: 3px;
    accent-color: var(--green);
}

.pref-label {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.pref-label strong {
    font-size: 0.88rem;
    color: var(--text);
}

.pref-label span {
    font-size: 0.78rem;
    color: var(--text-light);
}

.settings-status {
    font-size: 0.8rem;
    min-height: 1.1rem;
    color: var(--green);
    text-align: right;
    flex: 1;
}

.followed-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.followed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: var(--cream);
    border-radius: var(--radius);
}

.followed-item-name {
    font-weight: 500;
    font-size: 0.88rem;
}

.btn-unfollow {
    background: none;
    border: 1px solid var(--red);
    color: var(--red);
    font-size: 0.73rem;
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-unfollow:hover {
    background: var(--red);
    color: var(--white);
}

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

/* ========== Skeleton Loading ========== */
.skeleton {
    background: linear-gradient(90deg, var(--cream-dark) 25%, var(--cream) 50%, var(--cream-dark) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.skeleton-cover {
    height: 280px;
}

.skeleton-body {
    padding: 1rem;
}

.skeleton-title {
    height: 18px;
    width: 80%;
    margin-bottom: 0.5rem;
}

.skeleton-text {
    height: 14px;
    width: 50%;
    margin-bottom: 0.4rem;
}

.skeleton-btn {
    height: 32px;
    width: 100px;
    margin-top: 0.5rem;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========== Back Button ========== */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: 50px;
    background: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--navy);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    margin-bottom: 1.5rem;
}

.btn-back:hover {
    border-color: var(--gold);
    background: var(--gold-glow);
}

.watch-jump-bar {
    margin-bottom: 1rem;
}

#watch-view .my-shows-section,
#watch-view .watched-shows-section,
#watch-view #returning-soon,
#watch-view #family-shows,
#watch-view #followed-people,
#watch-view .watch-recs-link {
    scroll-margin-top: 7rem;
}

/* ========== Jump Bar ========== */
.author-jump-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cream-dark);
}

.jump-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: 50px;
    background: var(--white);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--navy);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.jump-btn:hover {
    border-color: var(--gold);
    background: var(--gold-glow);
}

/* ========== News Section ========== */
.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-header .section-title {
    margin-bottom: 0;
}

.btn-mark-all-read {
    background: var(--green);
    color: var(--white);
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.78rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn-mark-all-read:hover {
    background: var(--green-light);
}

.btn-mark-all-read:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 1rem 1.2rem;
    border: 1px solid var(--cream-dark);
    transition: all var(--transition);
}

.news-card-has-thumb {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
}

.news-card-thumb {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--cream-dark);
    box-shadow: var(--shadow-xs);
}

.news-card-body {
    min-width: 0;
    flex: 1;
}

.news-card-has-thumb .news-card-body {
    padding-top: 0.05rem;
}

.news-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.news-card-unread {
    border-left: 3px solid var(--gold);
}

.news-feed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.news-feed-toolbar .section-hint {
    margin: 0;
}

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

.news-topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
}

.news-topic-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    line-height: 1.2;
}

.news-topic-pill-read {
    background: var(--read-bg);
    color: var(--read-color);
}

.news-topic-pill-watch {
    background: var(--watch-bg);
    color: var(--watch-color);
}

.news-topic-pill-play {
    background: var(--play-bg);
    color: var(--play-color);
}

.news-topic-pill-go {
    background: var(--go-bg);
    color: var(--go-color);
}

.news-topic-pill-name {
    background: var(--cream-dark);
    color: var(--text-light);
    font-weight: 600;
}

.news-topic-link {
    color: inherit;
    text-decoration: none;
}

.news-topic-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .news-card-has-thumb {
        flex-direction: column;
    }

    .news-card-thumb {
        width: 100%;
        height: 160px;
    }
}

.news-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.news-source {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.news-date {
    font-size: 0.73rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.news-title {
    display: block;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--navy);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 0.3rem;
}

.news-title:hover {
    color: var(--gold);
}

.news-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.45;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-news-read {
    font-size: 0.78rem;
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.btn-news-read:hover {
    text-decoration: underline;
}

.news-share {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--cream-dark);
    background: var(--cream);
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    font-family: inherit;
    line-height: 1;
    padding: 0;
}

.btn-share:hover {
    background: var(--cream-dark);
    color: var(--navy);
    border-color: var(--navy-light);
}

/* Legibility floor: keep UI chrome at ≥12px */
.book-date,
.book-rating-count,
.btn-more-stores,
.btn-store,
.coming-up-author,
.coming-up-time,
.coming-up-day-date,
.coming-up-day-badge,
.recent-episodes-count,
.recent-show-network,
.recent-ep-date,
.footer,
.footer-disclosure,
.footer-links a,
.auth-password-hint,
.auth-consent,
.affiliate-inline-note,
.section-hint,
.cal-label,
.cal-weekdays span,
.cast-character,
.browse-card-meta,
.quick-add-candidate-cat {
    font-size: 0.75rem;
}
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 0.75rem 1.25rem;
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
    left: 0;
}
.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;
}

/* ========== Footer ========== */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--cream-dark);
    margin-top: auto;
    background: rgba(255, 255, 255, 0.5);
}

.footer p {
    margin-bottom: 0.3rem;
}

.footer p:last-child {
    margin-bottom: 0;
}

.footer-tagline {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.footer-disclosure {
    max-width: 36rem;
    margin: 0.5rem auto 0.75rem;
    line-height: 1.45;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.affiliate-inline-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: -0.35rem 0 0.85rem;
}

.auth-password-hint,
.auth-consent {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: -0.25rem 0 0.75rem;
    line-height: 1.45;
}

.auth-consent a {
    color: var(--gold);
}

.auth-consent.hidden,
.auth-password-hint.hidden {
    display: none;
}

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

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Watch/Play/Go Category Headers ========== */
.category-header-watch { border-color: rgba(99, 102, 241, 0.2); }
.category-header-watch .category-header-title { color: var(--watch-color); }
.category-header-play { border-color: rgba(16, 185, 129, 0.2); }
.category-header-play .category-header-title { color: var(--play-color); }
.category-header-go { border-color: rgba(139, 92, 246, 0.2); }
.category-header-go .category-header-title { color: var(--go-color); }

/* ========== Browse Rows (by network) ========== */
.watch-browse {
    margin-bottom: 1rem;
}
.browse-row {
    margin-bottom: 1.75rem;
}
.browse-row-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
    padding-left: 2px;
}
.browse-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--cream-dark) transparent;
}
.browse-scroll::-webkit-scrollbar {
    height: 6px;
}
.browse-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.browse-scroll::-webkit-scrollbar-thumb {
    background: var(--cream-dark);
    border-radius: 3px;
}
.browse-card {
    flex: 0 0 130px;
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0,0,0,0.04);
}
.browse-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.browse-poster {
    width: 130px;
    height: 195px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--cream-dark) 0%, var(--cream) 100%);
}
.browse-poster-placeholder {
    width: 130px;
    height: 195px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cream-dark) 0%, var(--cream) 100%);
    font-size: 2rem;
}
.browse-label {
    padding: 0.4rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2rem;
}
.browse-card-skeleton {
    flex: 0 0 130px;
    height: 225px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--cream) 25%, var(--cream-dark) 50%, var(--cream) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Provider row logo + count */
.provider-row-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.35rem;
    margin-top: -2px;
}
.provider-count {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}

/* Status badge on browse cards */
.browse-status {
    padding: 0.15rem 0.5rem;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    color: var(--text-muted);
    background: var(--cream);
    border-top: 1px solid rgba(0,0,0,0.04);
}
.browse-status-returning-series { color: var(--green); }
.browse-status-ended, .browse-status-canceled { color: var(--red); }

/* Rec "because" tag */
.rec-because {
    padding: 0.2rem 0.5rem 0.35rem;
    font-size: 0.6rem;
    color: var(--watch-color);
    line-height: 1.25;
    font-style: italic;
}

/* Watch recs link / button area */
.watch-recs-link {
    text-align: center;
    padding: 1rem 0 1.5rem;
}
.btn-recs {
    border-color: var(--watch-color);
    color: var(--watch-color);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}
.btn-recs:hover {
    background: var(--watch-bg);
}

/* My shows section */
.my-shows-section {
    margin-bottom: 1.25rem;
}

#my-shows-grid,
#family-shows-grid {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

/* Provider groups — app-style cards */
.provider-section {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.provider-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.15rem 0.85rem;
    border-bottom: 1px solid var(--cream-dark);
}

.provider-section-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    flex: 1;
    line-height: 1.2;
}

.provider-section .provider-row-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    margin: 0;
    flex-shrink: 0;
}

.provider-section .provider-count {
    flex-shrink: 0;
}

.provider-section .list-view,
.provider-section .provider-list {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.provider-section .list-item.watch-list-item {
    padding: 0.9rem 1.15rem;
    gap: 1rem;
    min-height: 4.75rem;
    align-items: center;
}

.provider-section .list-item-thumb,
.provider-section .list-item-thumb-placeholder {
    width: 54px;
    height: 81px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.provider-section .list-item-title {
    font-size: 0.95rem;
    line-height: 1.3;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.provider-section .list-item-meta {
    font-size: 0.8rem;
    margin-top: 0.2rem;
    white-space: normal;
}

.watch-list-item::after {
    content: '›';
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text-muted);
    opacity: 0.35;
    flex-shrink: 0;
    margin-left: 0.25rem;
}

.provider-section--tiles {
    padding-bottom: 0.85rem;
}

.provider-section--tiles .browse-scroll {
    padding: 0.15rem 1rem 0.35rem;
    gap: 0.85rem;
}

.provider-section--tiles .browse-card {
    flex: 0 0 118px;
}

.provider-section--tiles .browse-poster,
.provider-section--tiles .browse-poster-placeholder {
    width: 118px;
    height: 177px;
}

#watch-view .section-title-row {
    margin-bottom: 1rem;
}

#watch-view.container {
    padding-bottom: 3rem;
}

.section-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: -0.35rem 0 0.85rem;
}

.returning-soon-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.returning-soon-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-xs);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
    border-left: 3px solid var(--green);
}

.returning-soon-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    border-color: transparent;
}

.returning-soon-cover {
    width: 36px;
    height: 52px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    background: var(--cream-dark);
}

.returning-soon-cover-placeholder {
    width: 36px;
    height: 52px;
    flex-shrink: 0;
}

.returning-soon-info {
    min-width: 0;
    flex: 1;
}

.returning-soon-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.15rem;
}

.returning-soon-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--green);
}

/* ========== Media Results Grid ========== */
.media-results {
    margin-bottom: 2rem;
}

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

.media-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.media-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: linear-gradient(135deg, var(--cream-dark) 0%, var(--cream) 100%);
}

.media-poster-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cream-dark) 0%, var(--cream) 100%);
    font-size: 2.5rem;
}

.media-body {
    padding: 0.75rem;
}

.media-title {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.2rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-meta {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.media-rating {
    font-size: 0.75rem;
    color: var(--gold);
    font-weight: 600;
}

/* Book rating stars */
.book-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.book-rating-stars {
    color: var(--gold);
    font-size: 0.82rem;
    letter-spacing: 1px;
}

.book-rating-count {
    font-size: 0.73rem;
    color: var(--text-muted);
}

/* Event card */
.event-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    padding: 1rem;
    border: 1px solid var(--cream-dark);
    border-left: 3px solid var(--go-color);
    transition: all var(--transition);
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.event-name {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.3rem;
}

.event-details {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

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

.btn-tickets {
    background: var(--go-color);
    color: var(--white);
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition);
}

.btn-tickets:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-save-event {
    background: none;
    border: 1.5px solid var(--go-color);
    color: var(--go-color);
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-save-event:hover {
    background: var(--go-bg);
}

.btn-save-event.saved {
    background: var(--go-color);
    color: var(--white);
}

/* Go search layout */
.search-wrapper-go {
    display: flex;
    gap: 0.5rem;
    max-width: 100%;
}

.search-input-zip {
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-xs) !important;
    border: 2px solid var(--cream-dark) !important;
}

.search-input-zip:focus {
    border-color: var(--go-color) !important;
    box-shadow: var(--shadow-xs), 0 0 0 3px var(--go-bg) !important;
}

.search-section-inline .search-input.watch-input:focus {
    border-color: var(--watch-color);
    box-shadow: var(--shadow-xs), 0 0 0 3px var(--watch-bg);
}

.search-section-inline .search-input.play-input:focus {
    border-color: var(--play-color);
    box-shadow: var(--shadow-xs), 0 0 0 3px var(--play-bg);
}

/* Events list layout */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.no-results-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* API key not configured message */
.api-notice {
    text-align: center;
    padding: 2rem;
    background: var(--cream);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Show/Movie detail */
.show-backdrop {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center top;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    position: relative;
}
.show-backdrop::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--cream));
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.show-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.show-poster {
    width: 140px;
    height: 210px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}
.show-info {
    flex: 1;
    min-width: 0;
}
.show-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.show-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}
.show-meta-item {
    font-size: 0.82rem;
    color: var(--text-light);
    background: var(--cream);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}
.show-status {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}
.show-status-returning,
.show-status-returningseries {
    background: #dcfce7;
    color: #16a34a;
}
.show-status-ended {
    background: #fef2f2;
    color: #dc2626;
}
.show-status-canceled {
    background: #fef2f2;
    color: #dc2626;
}
.show-status-released {
    background: #dbeafe;
    color: #2563eb;
}
.show-status-inproduction {
    background: #fef9c3;
    color: #ca8a04;
}
.show-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.show-detail-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.show-return-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.9rem 1.1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 14px;
    color: var(--navy);
}
.show-return-icon {
    color: var(--watch-color);
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.show-return-text {
    font-size: 0.9rem;
    line-height: 1.45;
}
.show-return-text strong {
    font-weight: 700;
}
.coming-up-type-returning {
    background: rgba(99, 102, 241, 0.15);
    color: var(--watch-color);
}
.show-detail-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow-xs);
}
.show-detail-card-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 0.5rem;
}
.show-detail-card-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
    line-height: 1.45;
}
.show-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.show-progress-head .show-detail-card-title {
    margin-bottom: 0;
}
.show-progress-status {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--watch-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    white-space: nowrap;
}
.season-progress-pills,
.show-watchwith-card .watch-mode-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.season-progress-pills .season-pill {
    padding: 0.45rem 0.9rem;
    border-radius: 50px;
    border: 1.5px solid var(--cream-darker);
    background: var(--cream);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.season-progress-pills .season-pill:hover {
    border-color: var(--watch-color);
    color: var(--watch-color);
}
.season-progress-pills .season-pill.active {
    background: var(--watch-color);
    border-color: var(--watch-color);
    color: var(--white);
}
.show-overview-card p {
    margin: 0;
    line-height: 1.65;
    font-size: 0.92rem;
    color: var(--text);
}
.show-providers-card .provider-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
}
.provider-tile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: var(--cream);
    border-radius: 12px;
    border: 1px solid var(--cream-dark);
}
.provider-tile-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.provider-tile-logo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream-dark);
}
.provider-tile-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.provider-tile-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.provider-tile-type {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.provider-tile-stream .provider-tile-type { color: var(--watch-color); }
.provider-tile-buy .provider-tile-type,
.provider-tile-rent .provider-tile-type { color: #2563eb; }

/* Settings: where to watch display */
.provider-display-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.provider-display-option {
    display: block;
    cursor: pointer;
}
.provider-display-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.provider-display-card {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--cream-dark);
    border-radius: 12px;
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.provider-display-card strong {
    font-size: 0.88rem;
    color: var(--navy);
}
.provider-display-card span {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.35;
}
.provider-display-option input:checked + .provider-display-card {
    border-color: var(--watch-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.provider-display-option:hover .provider-display-card {
    border-color: var(--cream-darker);
}

.show-overview {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text);
    font-size: 0.92rem;
}
.show-providers {
    margin-bottom: 1.5rem;
}
.show-providers .section-title {
    margin-bottom: 0.75rem;
}
.provider-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.provider-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 50px;
}
.provider-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.provider-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-xs);
}

/* ========== Watch Tabs ========== */
.watch-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1.25rem;
    background: var(--cream-dark);
    border-radius: var(--radius);
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}
.watch-tab {
    flex: 1 0 auto;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.watch-tab.active {
    background: var(--watch-color);
    color: var(--white);
    box-shadow: var(--shadow-xs);
}
.watch-tab:hover:not(.active) {
    background: var(--cream);
}
.watch-tab-family-pending.active {
    background: var(--family-color, #7c3aed);
}
.watch-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.3rem;
    margin-left: 0.25rem;
    border-radius: 999px;
    background: var(--white);
    color: var(--family-color, #7c3aed);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}
.watch-tab.active .watch-tab-badge {
    background: rgba(255, 255, 255, 0.92);
}
.family-pending-buttons {
    margin-top: 0.35rem;
}
.family-pending-buttons .family-tag-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
}

.family-tag-picker {
    position: relative;
    margin-top: 0.45rem;
    display: inline-flex;
    max-width: 100%;
}
.family-tag-current {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 700;
    padding: 0.3rem 0.55rem 0.3rem 0.35rem;
    border-radius: 999px;
    border: 1.5px solid var(--cream-darker);
    background: var(--cream);
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.family-tag-current:hover:not(:disabled) {
    border-color: var(--family-color);
}
.family-tag-current:disabled {
    opacity: 0.65;
    cursor: wait;
}
.family-tag-current .family-tag-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.family-tag-caret {
    font-size: 0.65rem;
    opacity: 0.7;
    line-height: 1;
    margin-left: 0.05rem;
}
.family-tag-current.family-tag-together {
    background: rgba(45, 80, 22, 0.14);
    border-color: #4ade80;
    color: #166534;
}
.family-tag-current.family-tag-family {
    background: var(--family-bg);
    border-color: var(--family-color);
    color: var(--text);
}
.family-tag-current.family-tag-solo-me,
.family-tag-current.family-tag-solo-them {
    background: rgba(21, 101, 192, 0.14);
    border-color: #60a5fa;
    color: #1e3a8a;
}
.family-tag-current.family-tag-unset {
    background: rgba(245, 158, 11, 0.12);
    border-color: var(--gold);
    color: var(--text);
    border-style: dashed;
}

.watcher-heads {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.watcher-heads .watcher-head + .watcher-head {
    margin-left: -0.35rem;
}
.watcher-head {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    font-size: 0.62rem;
    font-weight: 800;
    color: #fff;
    border: 1.5px solid var(--cream);
    line-height: 1;
    text-transform: uppercase;
}
.watcher-heads-icon {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: var(--family-bg);
    color: var(--family-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.watcher-heads-icon .icon {
    width: 0.8rem;
    height: 0.8rem;
}
.watcher-head-t0 { background: #0d9488; }
.watcher-head-t1 { background: #7c3aed; }
.watcher-head-t2 { background: #2563eb; }
.watcher-head-t3 { background: #db2777; }

.family-tag-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 40;
    min-width: 11rem;
    padding: 0.3rem;
    background: var(--white);
    border: 1px solid var(--cream-dark);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.family-tag-picker.open {
    z-index: 41;
}
.family-tag-menu .family-tag-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    text-align: left;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
}
.family-tag-menu .family-tag-btn:hover:not(:disabled) {
    background: var(--cream);
}
.family-tag-menu .family-tag-btn.active {
    background: var(--family-bg);
    color: var(--text);
}
.family-tag-menu .family-tag-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* ========== Trailer ========== */
.show-trailer { margin-bottom: 1.5rem; }
.trailer-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.trailer-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ========== Cast ========== */
.show-cast { margin-bottom: 1.5rem; }
.cast-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.cast-card { text-align: center; }
.cast-photo {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-xs);
    margin: 0 auto 0.4rem;
    display: block;
}
.cast-photo-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--cream-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin: 0 auto 0.4rem;
    color: var(--text-muted);
}
.cast-name { font-size: 0.8rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.cast-character { font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; }

/* ========== Rec Feedback ========== */
.rec-feedback-btns {
    display: flex; gap: 2px; justify-content: center; padding: 0.2rem 0.25rem;
}
.rec-fb-btn {
    border: none; background: var(--cream); border-radius: 4px;
    padding: 0.15rem 0.4rem; cursor: pointer; font-size: 0.75rem;
    transition: background var(--transition); font-family: inherit;
}
.rec-fb-btn:hover { background: var(--cream-dark); }
.rec-fb-dismiss { font-weight: 700; color: var(--text-muted); font-size: 0.85rem; }

/* ========== Calendar ========== */
.category-header-calendar { border-color: rgba(14, 165, 233, 0.2); }
.category-header-calendar .category-header-title { color: #0ea5e9; }
.nav-pill.active[data-category="calendar"] { background: #0ea5e9; border-color: #0ea5e9; }

.calendar-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.75rem; flex-wrap: wrap;
    margin-bottom: 1rem;
}
.cal-view-toggle {
    margin-left: auto;
}
.cal-view-toggle .view-toggle-btn {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
    min-width: 4.5rem;
}
.cal-month-label {
    font-family: var(--font-display);
    font-size: 1.2rem; font-weight: 700; color: var(--navy);
}
.cal-nav-btn { border-color: var(--navy); color: var(--navy); }
.cal-nav-btn:hover { background: var(--cream-dark); }

.cal-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
    margin-bottom: 2px; text-align: center;
}
.cal-weekdays span {
    font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; padding: 0.4rem 0;
}

.calendar-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
    margin-bottom: 1rem;
}
.cal-day {
    min-height: 88px; padding: 0.35rem 0.3rem;
    background: var(--white); border-radius: 6px;
    cursor: pointer; transition: background var(--transition);
    position: relative; overflow: hidden;
    border: 1px solid var(--cream-dark);
}
.cal-day.has-events { background: #faf8f4; }
.cal-day:hover { background: var(--cream-dark); }
.cal-day.today { border: 2px solid #0ea5e9; background: #f0f9ff; }
.cal-day.empty { background: transparent; border-color: transparent; cursor: default; }
.cal-day.empty:hover { background: transparent; }
.cal-day-number { font-size: 0.78rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 2px; }
.cal-labels { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.cal-label {
    font-size: 0.62rem; line-height: 1.25; font-weight: 600;
    padding: 2px 4px; border-radius: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    display: block;
}
.cal-label-book { background: var(--read-bg); color: var(--read-color); }
.cal-label-watch { background: var(--watch-bg); color: var(--watch-color); }
.cal-label-premiere {
    box-shadow: inset 2px 0 0 var(--watch-color);
    font-weight: 700;
}
.cal-label-shared { background: var(--family-bg); color: var(--family-color); }
.cal-label-separate { background: var(--cream-dark); color: var(--navy); }
.cal-label-more { background: var(--cream-dark); color: var(--text-muted); font-style: italic; }
/* Keep dots for backward compat */
.cal-dots { display: flex; gap: 3px; margin-top: 4px; flex-wrap: wrap; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; }

.calendar-day-detail {
    background: var(--white); border-radius: var(--radius);
    padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.cal-event-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0; border-bottom: 1px solid var(--cream);
}
.cal-event-item:last-child { border-bottom: none; }
.cal-event-group {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--cream);
}
.cal-event-group:last-child { border-bottom: none; }
.cal-event-group-title {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.92rem; font-weight: 700; color: var(--navy);
    margin-bottom: 0.25rem;
}
.cal-episode-list {
    list-style: none; margin: 0 0 0.2rem 1.6rem; padding: 0;
}
.cal-episode-item {
    font-size: 0.8rem; color: var(--text);
    padding: 0.12rem 0;
}
.cal-event-icon { font-size: 1.2rem; flex-shrink: 0; }
.cal-event-title { font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.cal-event-type { font-size: 0.73rem; color: var(--text-muted); text-transform: capitalize; }

.calendar-agenda {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.cal-agenda-empty {
    text-align: center;
    padding: 2rem 1rem;
}
.cal-agenda-day {
    background: var(--white);
    border: 1px solid var(--cream-dark);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.cal-agenda-day.today {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 1px #0ea5e9;
}
.cal-agenda-day.past {
    opacity: 0.72;
}
.cal-agenda-date {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: var(--cream);
    border-bottom: 1px solid var(--cream-dark);
}
.cal-agenda-day.today .cal-agenda-date {
    background: #e0f2fe;
}
.cal-agenda-weekday {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.cal-agenda-daynum {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
}
.cal-agenda-today-badge {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0369a1;
    background: #bae6fd;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}
.cal-agenda-items {
    display: flex;
    flex-direction: column;
}
.cal-agenda-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--cream);
}
.cal-agenda-item:last-child { border-bottom: none; }
.cal-agenda-item-clickable {
    cursor: pointer;
    transition: background var(--transition);
}
.cal-agenda-item-clickable:hover {
    background: var(--cream);
}
.cal-agenda-item-icon {
    font-size: 1.25rem;
    line-height: 1.2;
    flex-shrink: 0;
}
.cal-agenda-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}
.cal-agenda-item-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    text-transform: capitalize;
}
.cal-agenda-item-read .cal-agenda-item-icon { filter: none; }
.cal-agenda-item-shared {
    background: linear-gradient(90deg, rgba(124, 58, 237, 0.04), transparent);
}

.calendar-subscribe {
    padding-top: 1rem; border-top: 1px solid var(--cream-dark);
}
.calendar-subscribe h4 {
    font-family: var(--font-display);
    font-size: 1rem; color: var(--navy); margin-bottom: 0.25rem;
}
.cal-sub-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

html { scroll-behavior: smooth; }

/* Family member tags in show detail */
.family-members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.family-member-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    background: var(--cream);
    border-radius: 50px;
    font-size: 0.78rem;
    color: var(--text);
    border: 1px solid var(--cream-dark);
}

/* ========== Responsive: Tablet / iPad (768px - 1024px) ========== */
@media (max-width: 1024px) and (min-width: 601px) {
    .container {
        padding: 2rem 1.25rem;
    }
    .hero {
        padding: 2.2rem 1.25rem 2.6rem;
    }
    .category-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
    }
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .my-authors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .media-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .cast-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .show-poster {
        width: 130px;
        height: 195px;
    }
    .show-title {
        font-size: 1.35rem;
    }
    .modal {
        max-width: 480px;
    }
    .modal.settings-modal {
        max-width: 720px;
    }
    .cal-day {
        min-height: 90px;
    }
    .cal-label {
        font-size: 0.65rem;
    }
    .trailer-embed {
        max-width: 640px;
    }
}

/* ========== Responsive: Mobile (< 600px) ========== */
@media (max-width: 600px) {
    html, body {
        overflow-x: hidden;
        overscroll-behavior-x: none;
        touch-action: pan-y pinch-zoom;
    }

    .category-nav-inner,
    .settings-nav,
    .browse-scroll,
    .actor-results,
    .caught-up-table-scroll,
    .watch-tabs {
        touch-action: pan-x pan-y pinch-zoom;
    }

    .search-wrapper,
    .search-results-dropdown,
    .typeahead-dropdown {
        max-width: 100%;
    }

    .search-results-dropdown {
        max-height: min(60vh, 24rem);
    }

    .search-result-row.event-card {
        flex-wrap: wrap;
    }

    .search-result-row.event-card .search-result-actions {
        width: 100%;
        padding-left: 52px;
        justify-content: flex-start;
    }

    .hero {
        padding: 0.75rem 1rem;
    }

    .hero-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero-brand {
        justify-content: center;
        flex-wrap: wrap;
    }

    .tagline-brand {
        border-left: none;
        padding-left: 0;
        width: 100%;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .logo {
        font-size: 1.2rem;
    }

    .category-nav {
        top: auto;
    }

    .tagline {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 0.75rem 1rem 0.75rem 2.4rem;
    }

    .container {
        padding: 1.25rem 1rem;
    }

    #watch-view.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .provider-section .list-item.watch-list-item {
        padding: 0.85rem 1rem;
    }

    .provider-section-header {
        padding: 0.85rem 1rem 0.75rem;
    }

    .author-name {
        font-size: 1.4rem;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }

    .my-authors-grid {
        grid-template-columns: 1fr;
    }

    .category-cards-grid {
        grid-template-columns: 1fr;
    }

    .follow-form {
        flex-direction: column;
    }

    .author-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal {
        padding: 1.5rem;
        border-radius: var(--radius-lg);
        max-width: 100%;
        margin: 0.5rem;
    }

    .modal.settings-modal {
        padding: 0;
        margin: 0.5rem;
        max-height: min(92vh, 100%);
        max-width: 100%;
    }

    .settings-layout {
        flex-direction: column;
    }

    .settings-nav {
        flex-direction: row;
        width: auto;
        border-right: none;
        border-bottom: 1px solid var(--cream-dark);
        padding: 0.65rem 0.75rem;
        gap: 0.35rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .settings-nav::-webkit-scrollbar {
        display: none;
    }

    .settings-nav-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.45rem 0.8rem;
        font-size: 0.8rem;
    }

    .settings-header {
        padding: 1.2rem 1.15rem 0.7rem;
        padding-right: 3rem;
    }

    .settings-panels {
        padding: 0.1rem 1.1rem 1.25rem;
    }

    .followed-list-scroll {
        max-height: min(38vh, 280px);
    }

    .book-cover {
        aspect-ratio: 2 / 3;
        height: auto;
    }

    .category-nav-inner {
        padding: 0.5rem 0.75rem;
        gap: 0.35rem;
    }

    .nav-pill {
        padding: 0.55rem 0.9rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .category-header-title {
        font-size: 1.3rem;
    }

    .category-header-icon {
        font-size: 2rem;
    }

    .category-placeholder {
        padding: 3rem 1.5rem;
    }

    .category-placeholder-icon {
        font-size: 3rem;
    }

    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .media-title {
        font-size: 0.75rem;
    }

    .media-body {
        padding: 0.5rem;
    }

    .browse-scroll {
        flex-direction: column;
        overflow-x: visible;
        scroll-snap-type: none;
        gap: 0;
        padding-bottom: 0;
        background: var(--white);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    .browse-scroll .browse-card {
        flex: none;
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid var(--cream-dark);
        padding: 0.65rem 0.85rem;
        background: transparent;
    }
    .browse-scroll .browse-card:last-child {
        border-bottom: none;
    }
    .browse-scroll .browse-card:hover {
        transform: none;
        background: var(--cream);
    }
    .browse-scroll .browse-poster,
    .browse-scroll .browse-poster-placeholder {
        flex: 0 0 40px;
        width: 40px;
        height: 60px;
        border-radius: 4px;
    }
    .browse-scroll .browse-label {
        flex: 1;
        padding: 0;
        font-size: 0.88rem;
        min-height: auto;
    }
    .browse-scroll .browse-status {
        flex-shrink: 0;
        margin-right: 0.25rem;
        font-size: 0.65rem;
    }
    .provider-section--tiles .browse-scroll {
        padding: 0;
        gap: 0;
    }
    .provider-section--tiles .browse-scroll .browse-card {
        flex: none;
        width: 100%;
    }
    .provider-section--tiles .browse-scroll .browse-poster,
    .provider-section--tiles .browse-scroll .browse-poster-placeholder {
        width: 40px;
        height: 60px;
        flex: 0 0 40px;
    }
    .browse-card-skeleton {
        flex: none;
        width: 100%;
        height: 72px;
        border-radius: 0;
        border-bottom: 1px solid var(--cream-dark);
    }
    .browse-row-title {
        font-size: 0.92rem;
    }

    .search-wrapper-go {
        flex-direction: column;
    }

    .search-input-zip {
        max-width: 100% !important;
    }

    .show-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .show-poster {
        width: 120px;
        height: 180px;
    }
    .show-title {
        font-size: 1.15rem;
    }
    .show-meta {
        justify-content: center;
    }
    .show-meta-item {
        font-size: 0.75rem;
        padding: 0.15rem 0.45rem;
    }
    .show-actions {
        justify-content: center;
    }
    .show-backdrop {
        height: 140px;
        border-radius: var(--radius);
    }
    .show-overview {
        font-size: 0.88rem;
    }

    .show-detail-card {
        padding: 0.9rem 1rem;
    }

    .show-providers-card .provider-tiles {
        grid-template-columns: 1fr;
    }

    .season-progress-pills .season-pill {
        flex: 1 1 calc(50% - 0.45rem);
        text-align: center;
    }

    .provider-logo {
        width: 34px;
        height: 34px;
        border-radius: 6px;
    }

    .cast-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }
    .cast-photo, .cast-photo-placeholder {
        width: 60px;
        height: 60px;
    }
    .cast-name {
        font-size: 0.72rem;
    }
    .cast-character {
        font-size: 0.65rem;
    }

    .watch-tabs {
        margin-bottom: 1rem;
    }
    .watch-tab {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }

    .cal-day {
        min-height: 52px;
        padding: 0.2rem;
    }
    .cal-day-number {
        font-size: 0.75rem;
    }
    .cal-label {
        font-size: 0.65rem;
        padding: 1px 2px;
    }
    .cal-dot {
        width: 5px;
        height: 5px;
    }
    .cal-weekdays span {
        font-size: 0.75rem;
    }
    .cal-month-label {
        font-size: 1rem;
    }

    .calendar-subscribe {
        text-align: center;
    }
    .cal-sub-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 0.95rem;
    }

    .coming-up-title {
        font-size: 0.82rem;
    }

    .rec-feedback-btns {
        gap: 1px;
        padding: 0.15rem 0.2rem;
    }
    .rec-fb-btn {
        padding: 0.1rem 0.3rem;
        font-size: 0.7rem;
    }

    .family-member-tag {
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }

    .family-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .family-watchers {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .family-filter {
        width: 100%;
    }

    .family-filter-btn {
        flex: 1;
        text-align: center;
        padding: 0.4rem 0.45rem;
        font-size: 0.75rem;
    }

    .family-toolbar .view-toggle {
        align-self: flex-end;
    }

    .settings-content h2 {
        font-size: 1.2rem;
    }
    .settings-subtitle {
        font-size: 0.92rem;
    }

    .followed-item {
        padding: 0.5rem 0.6rem;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .btn-recs {
        font-size: 0.82rem;
        padding: 0.5rem 1.2rem;
    }

    /* Trailer responsive - full width on mobile */
    .trailer-embed {
        border-radius: var(--radius);
    }

    .family-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Watch Mode Tagging (Detail Page) ---- */
.show-family-inline {
    margin-top: 0.6rem;
}
.watch-mode-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
}
.watch-mode-row:last-child {
    padding-bottom: 0;
}
.watch-mode-member {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
    min-width: 80px;
}
.watch-mode-pills {
    display: flex;
    gap: 0.4rem;
}
.watch-mode-pill {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    border: 1.5px solid var(--cream-darker);
    background: var(--white);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.watch-mode-pill:hover {
    border-color: var(--watch-color);
    color: var(--watch-color);
}
.watch-mode-pill.together.active {
    background: var(--watch-color);
    border-color: var(--watch-color);
    color: var(--white);
}
.watch-mode-pill.solo.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}
.watch-mode-pill.family.active {
    background: var(--family-color);
    border-color: var(--family-color);
    color: var(--white);
}
.watch-mode-pill:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.watch-mode-pending {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
}

/* ---- Family Breakdown Page ---- */
.category-header-family {
    border-color: rgba(236, 72, 153, 0.2);
}
.family-breakdown {
    margin-top: 1rem;
}
.family-section {
    margin-bottom: 2rem;
}
.family-section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--cream-dark);
}
.family-section-count {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.family-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.family-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}
.family-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.family-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
}
.family-card-poster-empty {
    width: 100%;
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream-dark);
    font-size: 2rem;
}
.family-card-info {
    padding: 0.5rem 0.6rem;
}
.family-card-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--navy);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.family-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}
.family-card-untagged {
    border: 2px solid var(--gold);
}
.family-section-untagged .family-section-title {
    color: var(--gold-dark, #b8860b);
}
.family-tag-buttons {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}

/* ---- Calendar Shared Badge ---- */
.cal-dot-shared {
    background: var(--family-color) !important;
}
.cal-family-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.75rem;
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    border-radius: var(--radius);
}

.cal-family-filter[hidden] {
    display: none !important;
}

.cal-family-filter-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.cal-family-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cal-family-filter-btn {
    appearance: none;
    border: 1.5px solid var(--cream-darker);
    background: var(--cream);
    color: var(--text);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.cal-family-filter-btn:hover {
    border-color: var(--navy);
}

.cal-family-filter-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.cal-separate-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--cream-darker, #d6d3cd);
    color: var(--navy);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    margin-left: 0.3rem;
    vertical-align: middle;
}

.cal-shared-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--family-color);
    color: var(--white);
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    margin-left: 0.3rem;
    vertical-align: middle;
}

.cal-premiere-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--watch-color);
    color: #fff;
    padding: 0.12rem 0.45rem;
    border-radius: 8px;
    margin-left: 0.35rem;
    vertical-align: middle;
    text-transform: none;
}

.cal-agenda-item-premiere .cal-agenda-item-title,
.cal-event-group-premiere .cal-event-group-title,
.cal-event-item-premiere .cal-event-title {
    font-weight: 700;
}

/* ========== View Toggle (List/Tile) ========== */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.section-title-row .section-title {
    margin-bottom: 0;
}

.family-toolbar {
    margin-bottom: 0.5rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.family-watchers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0.75rem 0 0.85rem;
    padding: 0.65rem 0.75rem;
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    border-radius: var(--radius);
}

.family-watchers[hidden],
.family-toolbar[hidden] {
    display: none !important;
}

.family-watchers-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.family-watchers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.family-watcher-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem 0.35rem 0.55rem;
    border: 1.5px solid var(--cream-darker);
    border-radius: 999px;
    background: var(--cream);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
    user-select: none;
}

.family-watcher-chip:hover {
    border-color: var(--family-color);
}

.family-watcher-chip.active {
    border-color: var(--family-color);
    background: var(--family-bg);
    color: var(--text);
}

.family-watcher-name {
    color: inherit;
    line-height: 1.2;
}

.family-watcher-chip input {
    margin: 0;
    width: 1rem;
    height: 1rem;
    accent-color: var(--family-color);
    cursor: pointer;
    flex-shrink: 0;
}

.family-filter {
    display: inline-flex;
    gap: 2px;
    background: var(--cream-dark);
    border-radius: 6px;
    padding: 2px;
    flex-wrap: wrap;
}

.family-filter-btn {
    border: none;
    background: transparent;
    border-radius: 5px;
    padding: 0.35rem 0.7rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.family-filter-btn:hover:not(.active) {
    background: var(--cream);
    color: var(--text);
}

.family-filter-btn.active {
    background: var(--family-color);
    color: var(--white);
    box-shadow: var(--shadow-xs);
}

.family-coming-date {
    color: var(--family-color);
    font-weight: 600;
}

.view-toggle {
    display: inline-flex;
    gap: 2px;
    background: var(--cream-dark);
    border-radius: 6px;
    padding: 2px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.view-toggle-btn:hover {
    color: var(--text);
}

.view-toggle-btn.active {
    background: var(--white);
    color: var(--gold);
    box-shadow: var(--shadow-xs);
}

/* ---- List View Styles ---- */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--cream-dark);
    cursor: pointer;
    transition: background 0.15s;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--cream);
}

.list-item-thumb {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--cream-dark);
}

.list-item-thumb-placeholder {
    width: 40px;
    height: 60px;
    border-radius: 4px;
    flex-shrink: 0;
    background: var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

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

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

.list-item-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.list-item-badge-together {
    background: rgba(79, 70, 229, 0.1);
    color: var(--watch-color);
}

.list-item-badge-solo {
    background: var(--cream-dark);
    color: var(--text-muted);
}

.list-item-badge-family {
    background: rgba(224, 64, 160, 0.1);
    color: var(--family-color);
}

.list-item-badge-status {
    background: var(--cream-dark);
    color: var(--text-light);
}

/* ========== Actor Search Results ========== */
.actor-results {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.actor-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    min-width: 220px;
    flex-shrink: 0;
}

.actor-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.actor-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.actor-photo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.actor-info {
    min-width: 0;
}

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

.actor-known {
    font-size: 0.73rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== New Since Visit Badge ========== */
.new-since-visit {
    margin-bottom: 1rem;
}
.new-since-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
}
.new-since-badge-btn {
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition), border-color var(--transition);
}
.new-since-badge-btn:hover {
    background: #fde68a;
    border-color: #f59e0b;
}
.new-since-modal-content h3 {
    font-size: 0.95rem;
    margin: 1rem 0 0.5rem;
}
.new-since-modal-content h3:first-child {
    margin-top: 0;
}
.new-since-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
}
.new-since-list li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--cream-dark);
    font-size: 0.88rem;
}
.new-since-list a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}
.new-since-list a:hover {
    text-decoration: underline;
}
.watch-group-choices {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}
.season-watched-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.65rem;
}
.season-watched-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
}
.season-pills {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.season-pill {
    padding: 0.3rem 0.75rem;
    border-radius: 16px;
    border: 1.5px solid var(--cream-darker);
    background: var(--white);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.season-pill:hover {
    border-color: var(--watch-color);
    color: var(--watch-color);
}
.season-pill.watched {
    background: var(--watch-color);
    border-color: var(--watch-color);
    color: var(--white);
}
.season-pill-clear {
    font-weight: 500;
}

/* ========== Recent Episode Mark Actions ========== */
.recent-mark-all {
    margin-bottom: 0.75rem;
}
.recent-mark-show {
    margin-left: auto;
    flex-shrink: 0;
}
.recent-show-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.recent-ep-mark {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--watch-color);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

/* ========== Family Activity ========== */
.family-activity-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}
.family-activity-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--cream-dark);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ========== Onboarding ========== */
.onboarding-modal {
    max-width: 420px;
}
.onboarding-progress {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== SVG Icons ========== */
.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

.category-card-icon .icon,
.category-header-icon .icon {
    display: block;
}

.category-header-icon,
.coming-up-cover-placeholder,
.book-cover-placeholder,
.ma-cover-placeholder,
.media-poster-placeholder,
.browse-poster-placeholder,
.list-item-thumb-placeholder,
.recent-show-cover-placeholder,
.cast-photo-placeholder,
.actor-photo-placeholder,
.family-card-poster-empty,
.no-results-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.coming-up-cover-placeholder,
.recent-show-cover-placeholder {
    background: linear-gradient(135deg, var(--cream-dark), var(--cream));
}

.pref-cat-icon {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.family-section-title,
.browse-row-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cal-event-icon,
.cal-agenda-item-icon {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
}

.jump-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.family-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.rec-fb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


/* ========== Phone widths (< 430px) ========== */
@media (max-width: 430px) {
    .nav-pill {
        min-height: 44px;
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
    }

    .btn-sm,
    #btn-login,
    #btn-register {
        min-height: 44px;
        padding: 0.55rem 1rem;
        font-size: 0.88rem;
    }

    .coming-up-time,
    .recent-episodes-count,
    .coming-up-day-badge,
    .recent-show-network {
        font-size: 0.8rem;
    }

    .category-cards-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions .btn {
        min-height: 44px;
    }
}

/* ========== Dark Mode ========== */

html[data-theme="dark"] {
        color-scheme: dark;
        --navy: #f1f5f9;
        --navy-mid: #e2e8f0;
        --navy-light: #cbd5e1;
        --cream: #0b1120;
        --cream-dark: #1e293b;
        --cream-darker: #334155;
        --gold: #fbbf24;
        --gold-light: #fcd34d;
        --gold-glow: rgba(251, 191, 36, 0.15);
        --green: #34d399;
        --green-light: #6ee7b7;
        --red: #f87171;
        --text: #f1f5f9;
        --text-light: #cbd5e1;
        --text-muted: #94a3b8;
        --white: #1e293b;
        --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
        --read-color: #fbbf24;
        --read-bg: rgba(251, 191, 36, 0.12);
        --watch-color: #818cf8;
        --watch-bg: rgba(129, 140, 248, 0.12);
        --play-color: #34d399;
        --play-bg: rgba(52, 211, 153, 0.12);
        --go-color: #a78bfa;
        --go-bg: rgba(167, 139, 250, 0.12);
        --family-color: #f472b6;
        --family-bg: rgba(244, 114, 182, 0.12);
    }

html[data-theme="dark"] body {
        background-image:
            radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.12), transparent),
            radial-gradient(ellipse 60% 40% at 100% 0%, rgba(245, 158, 11, 0.08), transparent);
    }

html[data-theme="dark"] .hero {
        background: #0f172a;
        border-bottom-color: #334155;
    }

html[data-theme="dark"] .logo a {
        color: var(--text);
    }

html[data-theme="dark"] .tagline-brand {
        color: #cbd5e1;
        border-left-color: #475569;
    }

html[data-theme="dark"] .logo-icon path {
        stroke: #f1f5f9;
    }

html[data-theme="dark"] .category-nav {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: rgba(71, 85, 105, 0.7);
    }

html[data-theme="dark"] .nav-pill-add {
        background: rgba(245, 158, 11, 0.12);
        color: var(--gold-light);
        border-color: rgba(245, 158, 11, 0.35);
    }

html[data-theme="dark"] .nav-pill-add:hover {
        background: var(--gold);
        color: #0f172a;
    }

html[data-theme="dark"] .quick-add-field {
        background: rgba(30, 41, 59, 0.85);
        border-color: #334155;
    }

html[data-theme="dark"] .quick-add-field:focus-within {
        border-color: var(--gold);
        box-shadow: var(--shadow-xs), 0 0 0 3px var(--gold-glow);
    }

html[data-theme="dark"] .nav-pill {
        color: #cbd5e1;
    }

html[data-theme="dark"] .nav-pill:hover {
        background: rgba(51, 65, 85, 0.7);
        color: #f8fafc;
    }

html[data-theme="dark"] .nav-pill.active {
        background: #f1f5f9;
        color: #0f172a;
        box-shadow: var(--shadow-xs);
    }

html[data-theme="dark"] .nav-pill.active[data-category="read"] { background: #f59e0b; color: #0f172a; }

html[data-theme="dark"] .nav-pill.active[data-category="watch"] { background: #818cf8; color: #0f172a; }

html[data-theme="dark"] .nav-pill.active[data-category="play"] { background: #34d399; color: #0f172a; }

html[data-theme="dark"] .nav-pill.active[data-category="go"] { background: #a78bfa; color: #0f172a; }

html[data-theme="dark"] .nav-pill.active[data-category="news"] { background: #22d3ee; color: #0f172a; }

html[data-theme="dark"] .nav-pill.active[data-category="calendar"] { background: #38bdf8; color: #0f172a; }

html[data-theme="dark"] .nav-pill.active[data-category="family"] { background: #f472b6; color: #0f172a; }

html[data-theme="dark"] .category-card,
html[data-theme="dark"] .my-author-card,
html[data-theme="dark"] .caught-up-table-wrap,
html[data-theme="dark"] .book-card,
html[data-theme="dark"] .media-card,
html[data-theme="dark"] .coming-up-item,
html[data-theme="dark"] .recent-episodes-toggle,
html[data-theme="dark"] .recent-episodes-list,
html[data-theme="dark"] .news-card,
html[data-theme="dark"] .follow-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .category-header,
html[data-theme="dark"] .list-view,
html[data-theme="dark"] .provider-section,
html[data-theme="dark"] .show-detail-card,
html[data-theme="dark"] .cal-day,
html[data-theme="dark"] .cal-agenda-day,
html[data-theme="dark"] .family-card,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .browse-card,
html[data-theme="dark"] .actor-card,
html[data-theme="dark"] .cal-family-filter {
        border-color: rgba(51, 65, 85, 0.8);
    }

html[data-theme="dark"] .book-cover,
html[data-theme="dark"] .book-cover-placeholder,
html[data-theme="dark"] .browse-poster,
html[data-theme="dark"] .browse-poster-placeholder,
html[data-theme="dark"] .media-poster,
html[data-theme="dark"] .media-poster-placeholder {
        background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 100%);
    }

html[data-theme="dark"] .cta-card {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }

html[data-theme="dark"] .demo-banner {
        background: linear-gradient(135deg, rgba(129, 140, 248, 0.15) 0%, rgba(251, 191, 36, 0.1) 100%);
        border-color: rgba(129, 140, 248, 0.25);
        color: var(--text-light);
    }

html[data-theme="dark"] .guest-promo-inner {
        background: #1e293b;
        border-color: #334155;
    }

html[data-theme="dark"] .caught-up-table-toolbar {
        background: linear-gradient(180deg, rgba(30, 41, 59, 0.55) 0%, transparent 100%);
    }

html[data-theme="dark"] .caught-up-table thead {
        background: var(--white);
    }

html[data-theme="dark"] .footer {
        background: rgba(15, 23, 42, 0.6);
    }

html[data-theme="dark"] .family-watcher-chip {
        background: #0f172a;
        border-color: #475569;
        color: #f8fafc;
    }

html[data-theme="dark"] .family-watcher-chip:hover {
        border-color: #f472b6;
        color: #f8fafc;
    }

html[data-theme="dark"] .family-watcher-chip.active {
        background: rgba(244, 114, 182, 0.22);
        border-color: #f472b6;
        color: #f8fafc;
    }

html[data-theme="dark"] .family-watcher-name {
        color: #f8fafc;
    }

html[data-theme="dark"] .cal-family-filter {
        background: #0f172a;
    }

html[data-theme="dark"] .cal-family-filter-btn {
        background: #0f172a;
        border-color: #475569;
        color: #f8fafc;
    }

html[data-theme="dark"] .cal-family-filter-btn:hover {
        border-color: #38bdf8;
    }

html[data-theme="dark"] .cal-family-filter-btn.active {
        background: #38bdf8;
        border-color: #38bdf8;
        color: #0f172a;
    }

html[data-theme="dark"] .cal-separate-badge {
        background: #334155;
        color: #e2e8f0;
    }

html[data-theme="dark"] .family-filter-btn.active {
        color: #0f172a;
    }

html[data-theme="dark"] .family-tag-current {
        background: #0f172a;
        border-color: #475569;
        color: #f8fafc;
    }

html[data-theme="dark"] .family-tag-current.family-tag-together {
        background: rgba(74, 222, 128, 0.16);
        border-color: #4ade80;
        color: #bbf7d0;
    }

html[data-theme="dark"] .family-tag-current.family-tag-family {
        background: rgba(244, 114, 182, 0.18);
        border-color: #f472b6;
        color: #fce7f3;
    }

html[data-theme="dark"] .family-tag-current.family-tag-solo-me,
html[data-theme="dark"] .family-tag-current.family-tag-solo-them {
        background: rgba(96, 165, 250, 0.16);
        border-color: #60a5fa;
        color: #dbeafe;
    }

html[data-theme="dark"] .family-tag-current.family-tag-unset {
        background: rgba(251, 191, 36, 0.12);
        border-color: #fbbf24;
        color: #fde68a;
    }

html[data-theme="dark"] .watcher-head {
        border-color: #0f172a;
    }

html[data-theme="dark"] .family-tag-menu {
        background: #1e293b;
        border-color: #334155;
    }

html[data-theme="dark"] .family-tag-menu .family-tag-btn {
        color: #f1f5f9;
    }

html[data-theme="dark"] .family-tag-menu .family-tag-btn:hover:not(:disabled) {
        background: #334155;
    }

html[data-theme="dark"] .family-tag-menu .family-tag-btn.active {
        background: rgba(244, 114, 182, 0.2);
    }

html[data-theme="dark"] .btn-ghost {
        border-color: #475569;
        color: #e2e8f0;
    }

html[data-theme="dark"] .btn-ghost:hover {
        background: rgba(51, 65, 85, 0.7);
        color: #f8fafc;
        border-color: #64748b;
    }

html[data-theme="dark"] .btn-outline {
        color: var(--text);
        border-color: var(--cream-darker);
    }

html[data-theme="dark"] .btn-outline:hover {
        background: var(--cream-dark);
    }

html[data-theme="dark"] .btn-primary {
        background: #f1f5f9;
        color: #0f172a;
    }

html[data-theme="dark"] .btn-primary:hover {
        background: #e2e8f0;
    }

html[data-theme="dark"] .btn-follow {
        background: var(--gold);
        color: #0f172a;
    }

html[data-theme="dark"] .btn-follow.following {
        background: var(--green);
        color: #0f172a;
    }

html[data-theme="dark"] .status-message.success {
        background: rgba(52, 211, 153, 0.15);
        border-color: rgba(52, 211, 153, 0.3);
        color: var(--green);
    }

html[data-theme="dark"] .status-message.error {
        background: rgba(248, 113, 113, 0.15);
        border-color: rgba(248, 113, 113, 0.3);
        color: var(--red);
    }

html[data-theme="dark"] .status-message.info {
        background: rgba(96, 165, 250, 0.15);
        border-color: rgba(96, 165, 250, 0.3);
        color: #93c5fd;
    }

html[data-theme="dark"] .new-since-badge {
        background: rgba(251, 191, 36, 0.15);
        color: #fcd34d;
        border-color: rgba(251, 191, 36, 0.3);
    }

html[data-theme="dark"] .auth-error {
        background: rgba(248, 113, 113, 0.15);
    }

html[data-theme="dark"] .show-meta-item,
html[data-theme="dark"] .followed-item,
html[data-theme="dark"] .pref-option,
html[data-theme="dark"] .recent-episodes-icon {
        background: var(--cream-dark);
    }

html[data-theme="dark"] .cal-day.today,
html[data-theme="dark"] .cal-agenda-day.today {
        border-color: #38bdf8;
        background: rgba(56, 189, 248, 0.08);
    }

html[data-theme="dark"] .cal-agenda-day.today .cal-agenda-date {
        background: rgba(56, 189, 248, 0.12);
    }

html[data-theme="dark"] .typeahead-dropdown {
        background: #1e293b;
        border-color: #475569;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    }

html[data-theme="dark"] .search-results-toolbar {
        background: #1e293b;
        border-bottom-color: #334155;
    }

html[data-theme="dark"] .search-results-close {
        background: #334155;
        color: #cbd5e1;
    }

html[data-theme="dark"] .search-results-close:hover {
        background: #475569;
    }

html[data-theme="dark"] .search-result-row:hover,
html[data-theme="dark"] .search-result-row:focus-visible {
        background: #334155;
    }

html[data-theme="dark"] .modal-overlay {
        background: rgba(0, 0, 0, 0.65);
    }

html[data-theme="dark"] .settings-header,
html[data-theme="dark"] .settings-nav {
        border-color: #334155;
    }

html[data-theme="dark"] .settings-nav {
        background: rgba(15, 23, 42, 0.55);
    }

html[data-theme="dark"] .settings-nav-btn:hover {
        background: rgba(51, 65, 85, 0.7);
        color: #f8fafc;
    }

html[data-theme="dark"] .settings-nav-btn.active {
        background: #1e293b;
        color: #f1f5f9;
    }

html[data-theme="dark"] .settings-search-input,
html[data-theme="dark"] .settings-inline-row input[type="text"],
html[data-theme="dark"] .settings-inline-row input[type="email"],
html[data-theme="dark"] .settings-inline-row select.settings-select {
        background: #0f172a;
        border-color: #334155;
        color: #f1f5f9;
    }

html[data-theme="dark"] .family-member-card {
        background: #1e293b;
        border-color: #334155;
    }

html[data-theme="dark"] .family-member-badge {
        color: #fcd34d;
        background: rgba(251, 191, 36, 0.15);
    }

html[data-theme="dark"] .skeleton,
html[data-theme="dark"] .skeleton-card,
html[data-theme="dark"] .browse-card-skeleton {
        opacity: 0.7;
    }

