/* ═══════════════════════════════════════════════════════
   MyTVCalendar — Site-wide stylesheet
   ═══════════════════════════════════════════════════════ */

/* ── 1. RESET & VARIABLES ───────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --cream: #f6f2e8;
    --muted: #c5c0c9;
    --purple: #4b2e83;
    --navy: #0d1b2a;
    --orange: #ff7a00;
    --blue: #8fa7ff;
    --green: #2e7d52;
}

/* ── 2. BASE ────────────────────────────────────────── */
html {
    height: 100%;
}
body {
    min-height: 100%;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: var(--cream);
    color: var(--navy);
    /* Root flex column: gives .layout a definite height so flex: 1 children reach the bottom */
    display: flex;
    flex-direction: column;
}
body.page-dark {
    background: var(--navy);
}

/* ── 3. LAYOUT ──────────────────────────────────────── */
.layout {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── 4. HEADER ──────────────────────────────────────── */
.site-header {
    background: #4b2e83;
    color: #f6f2e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 3rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 150;
}
.site-header-brand {
    font-family: "Bitcount Single", monospace;
    font-size: 1.25rem;
    font-weight: 400;
    color: #f6f2e8;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.site-header-brand span {
    color: #ff7a00;
}
.site-header-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.site-header-btn {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(246, 242, 232, 0.85);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(197, 192, 201, 0.3);
    transition:
        background 0.12s,
        color 0.12s;
}
.site-header-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f6f2e8;
}
.site-header-cta {
    background: #ff7a00;
    color: #fff;
    border-color: transparent;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}
.site-header-cta:hover {
    opacity: 0.9;
    color: #fff;
}
/* ── Notification bell ── */
.bell-wrap {
    position: relative;
}
.bell-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 4px;
    border: 1px solid rgba(197, 192, 201, 0.3);
    background: transparent;
    color: rgba(246, 242, 232, 0.85);
    cursor: pointer;
    position: relative;
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}
.bell-btn:hover,
.bell-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
    color: #f6f2e8;
}
.bell-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 99px;
    background: #e03030;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #4b2e83;
    pointer-events: none;
}
.bell-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 22rem;
    max-width: calc(100vw - 1.5rem);
    background: #fff;
    border: 1px solid #e8e3f0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(13, 27, 42, 0.18);
    z-index: 400;
    overflow: hidden;
}
.bell-dropdown.open {
    display: block;
}
.bell-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e8e3f0;
}
.bell-dropdown-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6B6477;
}
.bell-mark-all {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--purple);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.12s;
}
.bell-mark-all:hover { opacity: 0.7; }
.bell-dropdown-body {
    max-height: 22rem;
    overflow-y: auto;
    scrollbar-width: thin;
}
.bell-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0ecf7;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
    cursor: pointer;
}
.bell-item:last-child { border-bottom: none; }
.bell-item:hover { background: #fafaf6; }
.bell-item--admin { background: #fffbf5; }
.bell-item--admin:hover { background: #fff3e0; }
.bell-item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.bell-item-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}
.bell-item-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.35;
}
.bell-item-sub {
    font-size: 0.75rem;
    color: #8A8090;
    line-height: 1.3;
}
.bell-item-time {
    font-size: 0.6875rem;
    color: #9b96a0;
}
.bell-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #9b96a0;
}

/* ── User menu ── */
.user-menu-wrap {
    position: relative;
}
.user-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid rgba(197, 192, 201, 0.4);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(246, 242, 232, 0.85);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    flex-shrink: 0;
}
.user-menu-btn:hover,
.user-menu-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.15);
    color: #f6f2e8;
    border-color: rgba(246, 242, 232, 0.4);
}
.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 12rem;
    background: #fff;
    border: 1px solid #e8e3f0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(13, 27, 42, 0.18);
    z-index: 400;
    overflow: hidden;
}
.user-menu-dropdown.open {
    display: block;
}
.user-menu-header {
    padding: 0.75rem 1rem 0.625rem;
    border-bottom: 1px solid #f0ecf7;
}
.user-menu-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-menu-username {
    font-size: 0.7rem;
    color: #9b96a0;
    margin-top: 0.1rem;
}
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--navy);
    text-decoration: none;
    transition: background 0.1s;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    width: 100%;
    text-align: left;
}
.user-menu-item:hover {
    background: #f5f2fb;
    color: var(--purple);
}
.user-menu-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}
.user-menu-item:hover svg {
    opacity: 1;
}
.user-menu-divider {
    height: 1px;
    background: #f0ecf7;
    margin: 0.25rem 0;
}
.user-menu-item--danger:hover {
    background: #fff5f5;
    color: #9b2020;
}

.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}
.burger-btn span {
    display: block;
    width: 1.125rem;
    height: 1.5px;
    background: var(--cream);
    border-radius: 2px;
    transition:
        transform 0.2s,
        opacity 0.2s;
}
.burger-btn.open span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}
.burger-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger-btn.open span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 3rem;
    left: 0;
    right: 0;
    background: var(--purple);
    z-index: 200;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.mobile-menu.open {
    display: flex;
}
.mobile-menu-link {
    padding: 0.9rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(246, 242, 232, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.1s;
    display: block;
}
.mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--cream);
}
.mobile-menu-cta {
    color: var(--orange);
}
.mobile-menu-cta:hover {
    color: var(--orange);
    background: rgba(255, 122, 0, 0.08);
}

/* ── 5. PAGE FOOTER ─────────────────────────────────── */
.page-footer {
    background: var(--purple);
    min-height: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
}
.page-footer > span {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(246, 242, 232, 0.35);
    text-transform: uppercase;
}
.page-footer-brand {
    position: absolute;
    bottom: 0.625rem;
    left: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.page-footer-brand img {
    height: 4rem;
    width: auto;
}
.page-footer-brand a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}
.page-footer-brand span {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: rgba(246, 242, 232, 0.4);
    text-transform: uppercase;
    white-space: nowrap;
}
.page-footer-brand a:hover span {
    color: rgba(246, 242, 232, 0.65);
}
@media (max-width: 640px) {
    .page-footer {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 1.25rem;
    }
    .page-footer-brand {
        position: static;
        margin-top: 0.25rem;
    }
    .page-footer-brand img {
        height: 2rem;
    }
}

/* ── 6. SUB-NAV ─────────────────────────────────────── */
.sub-nav {
    background: var(--navy);
    height: 2.5rem;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.125rem;
    flex-shrink: 0;
}
.sub-nav-link {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(246, 242, 232, 0.45);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    transition:
        color 0.12s,
        background 0.12s;
}
.sub-nav-link:hover {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.05);
}
.sub-nav-link.active {
    color: var(--orange);
    background: rgba(255, 122, 0, 0.08);
}

/* ── 7. MAIN WRAPPER ────────────────────────────────── */
.main {
    flex: 1;
    padding: 2.5rem 1.5rem;
    width: 100%;
    margin: 0 auto;
}

/* ── 8. PAGE HEADINGS ───────────────────────────────── */
.page-heading {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin-bottom: 0.25rem;
}
.page-sub {
    font-size: 0.875rem;
    color: #6b6477;
    margin-bottom: 2rem;
}
.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

/* ── 9. ALERTS ──────────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    background: #fee2e2;
    color: #991b1b;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
}
.alert-info {
    background: #dbeafe;
    color: #1e40af;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

/* ── 10. FORM FIELDS ────────────────────────────────── */
.field {
    margin-bottom: 1.125rem;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 0.375rem;
}
input[type="email"],
input[type="password"],
input[type="text"] {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--navy);
    background: #fff;
    border: 1.5px solid var(--muted);
    border-radius: 4px;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    -webkit-appearance: none;
}
input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(75, 46, 131, 0.12);
}
input.is-error {
    border-color: #d04040;
    box-shadow: 0 0 0 3px rgba(208, 64, 64, 0.1);
}
.field-error {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: #c03030;
    font-weight: 500;
}
.field-hint {
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: #9a9098;
}

/* Profile page: cream background on inputs inside section cards */
.section-body input[type="email"],
.section-body input[type="password"],
.section-body input[type="text"] {
    background: var(--cream);
}
.section-body input:focus {
    background: #fff;
}

/* Timezone select */
.form-select {
    display: block;
    width: 100%;
    padding: 0.6rem 0.875rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--navy);
    background: var(--cream);
    border: 1.5px solid var(--muted);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.15s;
}
.form-select:focus {
    background: #fff;
    border-color: var(--purple);
}
.form-select.is-error {
    border-color: #d04040;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 1.125rem;
    border-top: 1px solid #ede9e0;
    margin-top: 1.25rem;
}
.btn-save {
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--purple);
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1.375rem;
    cursor: pointer;
    transition:
        background 0.12s,
        transform 0.1s;
}
.btn-save:hover {
    background: #3d2570;
}
.btn-save:active {
    transform: scale(0.98);
}
.btn-save.orange {
    background: var(--orange);
}
.btn-save.orange:hover {
    opacity: 0.88;
    background: var(--orange);
}

/* ── 11. BUTTONS ────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}
.btn-primary {
    background: var(--purple);
    color: #fff;
}
.btn-primary:hover {
    opacity: 0.9;
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--purple);
    color: var(--purple);
}
.btn-outline:hover {
    background: var(--purple);
    color: #fff;
}
.btn-danger {
    background: #fee2e2;
    color: #991b1b;
}
.btn-danger:hover {
    background: #fecaca;
}
.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}
.btn-vote {
    background: #ede9ff;
    color: var(--purple);
}
.btn-vote:hover {
    background: var(--purple);
    color: #fff;
}
.btn-voted {
    background: var(--purple);
    color: #fff;
    cursor: default;
    opacity: 0.7;
}

/* ── 12. ABOUT PAGE ─────────────────────────────────── */
.about-main {
    flex: 1;
    color: var(--navy);
}

/* Hero */
.about-hero {
    background: var(--navy);
    padding: 5rem 1.5rem 4.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.about-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 60% 40%, rgba(75,46,131,.35) 0%, transparent 60%),
                      radial-gradient(circle at 20% 80%, rgba(143,167,255,.15) 0%, transparent 50%);
    pointer-events: none;
}
.about-hero-inner {
    position: relative;
    max-width: 42rem;
    margin: 0 auto;
}
.about-hero-eyebrow {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 1rem;
}
.about-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    letter-spacing: -.03em;
    color: var(--cream);
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.about-hero-sub {
    font-size: 1.0625rem;
    color: rgba(246,242,232,.7);
    line-height: 1.65;
    margin-bottom: 2rem;
}
.about-hero-ctas {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.about-btn {
    display: inline-block;
    font-size: .9rem;
    font-weight: 700;
    padding: .75rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity .12s, background .12s;
}
.about-btn--primary {
    background: var(--orange);
    color: #fff;
}
.about-btn--primary:hover { opacity: .88; color: #fff; }
.about-btn--ghost {
    background: rgba(255,255,255,.08);
    color: var(--cream);
    border: 1px solid rgba(246,242,232,.2);
}
.about-btn--ghost:hover { background: rgba(255,255,255,.14); color: var(--cream); }

/* Sections */
.about-section {
    padding: 4.5rem 1.5rem;
    background: var(--cream);
}
.about-section--dark {
    background: var(--navy);
}
.about-container {
    max-width: 64rem;
    margin: 0 auto;
}
.about-container--narrow {
    max-width: 44rem;
}
.about-section-title {
    font-size: clamp(1.375rem, 3vw, 1.875rem);
    font-weight: 900;
    letter-spacing: -.025em;
    color: var(--navy);
    text-align: center;
    margin-bottom: 2.75rem;
}
.about-section-title--light { color: var(--cream); }
.about-section-sub {
    font-size: 1rem;
    color: rgba(246,242,232,.65);
    text-align: center;
    max-width: 36rem;
    margin: -1.75rem auto 2.75rem;
    line-height: 1.65;
}

/* Feature grid */
.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.5rem;
}
.about-feature {
    background: #fff;
    border: 1px solid #e8e3f0;
    border-radius: 10px;
    padding: 1.5rem;
}
.about-feature-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.about-feature-icon--purple { background: rgba(75,46,131,.1); color: var(--purple); }
.about-feature-icon--orange { background: rgba(255,122,0,.1); color: var(--orange); }
.about-feature-icon--blue   { background: rgba(143,167,255,.15); color: #5d7ee8; }
.about-feature-title {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .4rem;
}
.about-feature-body {
    font-size: .8375rem;
    color: #5a5060;
    line-height: 1.6;
}

/* Integrations */
.about-integrations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 1.5rem;
}
.about-integration {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(246,242,232,.1);
    border-radius: 10px;
    padding: 1.75rem;
}
.about-integration-logo {
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.about-integration-logo--plex     { background: rgba(229,160,13,.15); color: #e5a00d; }
.about-integration-logo--jellyfin { background: rgba(143,167,255,.15); color: #8fa7ff; }
.about-integration-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--cream);
    margin-bottom: .5rem;
}
.about-integration-body {
    font-size: .8375rem;
    color: rgba(246,242,232,.65);
    line-height: 1.65;
    margin-bottom: 1rem;
}
.about-integration-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.about-integration-bullets li {
    font-size: .8rem;
    color: rgba(246,242,232,.5);
    padding-left: 1.25rem;
    position: relative;
}
.about-integration-bullets li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--orange);
    font-weight: 700;
}

/* Webhook callout */
.about-webhook {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e8e3f0;
    border-left: 4px solid var(--purple);
    border-radius: 8px;
    padding: 1.5rem;
}
.about-webhook-icon {
    flex-shrink: 0;
    color: var(--purple);
    margin-top: .1rem;
}
.about-webhook-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .35rem;
}
.about-webhook-body {
    font-size: .875rem;
    color: #5a5060;
    line-height: 1.6;
}

/* CTA banner */
.about-cta-banner {
    background: var(--purple);
    padding: 4.5rem 1.5rem;
}
.about-cta-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 900;
    letter-spacing: -.025em;
    color: var(--cream);
    margin-bottom: .75rem;
}
.about-cta-sub {
    font-size: .9375rem;
    color: rgba(246,242,232,.65);
    margin-bottom: 2rem;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .about-hero { padding: 3.5rem 1.25rem 3rem; }
    .about-section { padding: 3rem 1.25rem; }
    .about-cta-banner { padding: 3rem 1.25rem; }
    .about-webhook { flex-direction: column; gap: .75rem; }
}

/* ── 13. AUTH PAGES ─────────────────────────────────── */
.auth-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--navy);
    position: relative;
    overflow: hidden;
}
.auth-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(143, 167, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 167, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.auth-card {
    position: relative;
    width: 100%;
    max-width: 24rem;
    background: var(--cream);
    border-radius: 6px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(75, 46, 131, 0.25);
}
.card-accent {
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--purple) 0%,
        var(--blue) 60%,
        var(--orange) 100%
    );
}
.card-accent.register {
    background: linear-gradient(
        90deg,
        var(--orange) 0%,
        var(--blue) 50%,
        var(--purple) 100%
    );
}
.card-inner {
    padding: 2rem 2rem 2.25rem;
}
.card-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}
.card-sub {
    font-size: 0.8125rem;
    color: #6b6477;
    margin-bottom: 1.75rem;
}
.card-sub a {
    color: var(--purple);
    font-weight: 600;
    text-decoration: none;
}
.card-sub a:hover {
    text-decoration: underline;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--purple);
    cursor: pointer;
    flex-shrink: 0;
}
.remember-label {
    font-size: 0.8125rem;
    color: #6b6477;
    cursor: pointer;
    user-select: none;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.03em;
    color: #fff;
    background: var(--purple);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition:
        background 0.15s,
        transform 0.1s;
    margin-top: 0.25rem;
}
.btn-submit:hover {
    background: #3d2570;
}
.btn-submit:active {
    transform: scale(0.99);
}
.btn-submit.orange {
    background: var(--orange);
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.375rem 0;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--muted);
    opacity: 0.5;
}

.auth-alt-btn {
    display: block;
    width: 100%;
    padding: 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    color: var(--purple);
    background: transparent;
    border: 1.5px solid rgba(75, 46, 131, 0.35);
    border-radius: 4px;
    text-decoration: none;
    transition:
        border-color 0.15s,
        background 0.15s;
}
.auth-alt-btn:hover {
    border-color: var(--purple);
    background: rgba(75, 46, 131, 0.05);
}

.auth-alert {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    padding: 0.625rem 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: #8b2020;
}

.terms {
    margin-top: 1.25rem;
    font-size: 0.7rem;
    color: #9a9098;
    text-align: center;
    line-height: 1.5;
}

/* ── 13. DASHBOARD ──────────────────────────────────── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--muted);
    border-radius: 5px;
    padding: 1.25rem 1.375rem;
    border-top: 3px solid var(--purple);
}
.stat-card.orange {
    border-top-color: var(--orange);
}
.stat-card.blue {
    border-top-color: var(--blue);
}
.stat-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.03em;
    line-height: 1;
}
.stat-meta {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #8a8090;
}
.cta-section {
    background: var(--navy);
    border-radius: 5px;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.cta-text h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 0.25rem;
}
.cta-text p {
    font-size: 0.8125rem;
    color: rgba(246, 242, 232, 0.5);
}
.btn-cta {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--navy);
    background: var(--orange);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 4px;
    white-space: nowrap;
    transition: opacity 0.12s;
}
.btn-cta:hover {
    opacity: 0.88;
}
.admin-section {
    margin-top: 1.5rem;
    border: 1.5px solid rgba(255, 122, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
}
.admin-header {
    background: rgba(255, 122, 0, 0.08);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-bottom: 1px solid rgba(255, 122, 0, 0.2);
}
.admin-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--orange);
}
.admin-body {
    padding: 1.25rem;
    background: #fff;
}
.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}
.admin-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--purple);
    text-decoration: none;
    padding: 0.4rem 0.875rem;
    border: 1.5px solid rgba(75, 46, 131, 0.3);
    border-radius: 4px;
    transition:
        background 0.12s,
        border-color 0.12s;
}
.admin-link:hover {
    background: rgba(75, 46, 131, 0.06);
    border-color: var(--purple);
}

/* ── 14. BROWSE SHOWS ───────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.filter-input {
    flex: 1;
    min-width: 12rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--navy);
    background: #fff;
    border: 1.5px solid var(--muted);
    border-radius: 4px;
    outline: none;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.filter-input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(75, 46, 131, 0.1);
}
.filter-tab {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--muted);
    border-radius: 4px;
    background: #fff;
    color: #5a5060;
    cursor: pointer;
    transition:
        background 0.1s,
        border-color 0.1s,
        color 0.1s;
}
.filter-tab:hover {
    background: var(--cream);
}
.filter-tab.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
.filter-select {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--navy);
    background: #fff;
    border: 1.5px solid var(--muted);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    min-width: 10rem;
}
.filter-select:focus {
    border-color: var(--purple);
}
.filter-select.active {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

.browse-layout {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.letter-sidebar {
    flex-shrink: 0;
    width: 1.75rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.letter-sidebar::-webkit-scrollbar {
    display: none;
}
.letter-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.6rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-radius: 3px;
    color: var(--navy);
    background: rgba(75, 46, 131, 0.08);
    transition:
        background 0.1s,
        color 0.1s;
}
.letter-link:hover {
    background: var(--purple);
    color: #fff;
}
.letter-link.empty {
    color: var(--muted);
    background: transparent;
    pointer-events: none;
}
.letter-link.hidden-letter {
    display: none;
}
.browse-content {
    flex: 1;
    min-width: 0;
}
.letter-section {
    margin-bottom: 2.25rem;
}
.letter-section.hidden-section {
    display: none;
}
.letter-heading {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--purple);
    padding-bottom: 0.5rem;
    margin-bottom: 0.875rem;
    border-bottom: 2px solid rgba(75, 46, 131, 0.15);
    scroll-margin-top: 1rem;
}
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1rem;
}
.show-card {
    background: #fff;
    border: 1.5px solid #ede9e0;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        border-color 0.12s,
        box-shadow 0.12s;
}
.show-card:hover {
    border-color: var(--muted);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.show-card.tracked {
    border-color: rgba(75, 46, 131, 0.4);
}
.card-poster-wrap {
    position: relative;
    aspect-ratio: 2/3;
    background: #ede9e0;
    overflow: hidden;
}
.card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--muted);
}
.tracked-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.card-body {
    padding: 0.625rem 0.75rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.card-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    font-size: 0.6875rem;
    color: #8a8090;
    flex: 1;
}
.card-status {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.1rem 0.375rem;
    border-radius: 2px;
    margin-bottom: 0.375rem;
}
.card-status.returning {
    background: rgba(143, 167, 255, 0.2);
    color: #3050a0;
}
.card-status.ended {
    background: rgba(197, 192, 201, 0.3);
    color: #5a5060;
}
.card-status.cancelled {
    background: rgba(208, 64, 64, 0.1);
    color: #8b2020;
}
.card-network {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-genres {
    font-size: 0.6rem;
    color: #8a8090;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}
.btn-track {
    width: 100%;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0.425rem 0;
    border-radius: 4px;
    cursor: pointer;
    border: 1.5px solid;
    transition:
        background 0.12s,
        color 0.12s,
        border-color 0.12s;
    text-align: center;
}
.btn-track.untracked {
    color: var(--purple);
    border-color: rgba(75, 46, 131, 0.3);
    background: transparent;
}
.btn-track.untracked:hover {
    background: rgba(75, 46, 131, 0.07);
}
.btn-track.tracking {
    color: #1d6b35;
    border-color: rgba(29, 107, 53, 0.35);
    background: #edfaf0;
}
.btn-track.tracking:hover {
    background: #d9f2e3;
    border-color: rgba(29, 107, 53, 0.6);
}
.btn-track:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.empty-state {
    padding: 4rem 1rem;
    text-align: center;
    color: #8a8090;
}
.empty-state h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}
.no-results {
    display: none;
    padding: 3rem 1rem;
    text-align: center;
    color: #8a8090;
    font-size: 0.9375rem;
}
.no-results-request {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: var(--orange);
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.12s;
}
.no-results-request:hover {
    opacity: 0.85;
}
.auth-prompt {
    background: var(--navy);
    border-radius: 5px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.auth-prompt p {
    font-size: 0.875rem;
    color: rgba(246, 242, 232, 0.7);
}
.auth-prompt a {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--orange);
    text-decoration: none;
    white-space: nowrap;
}
.auth-prompt a:hover {
    text-decoration: underline;
}

/* ── 15. SHOW DETAIL ────────────────────────────────── */
.hero {
    position: relative;
    min-height: 22rem;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.hero-backdrop-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--navy) 0%, #1a2f4a 100%);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(13, 27, 42, 0.3) 0%,
        rgba(13, 27, 42, 0.65) 60%,
        rgba(13, 27, 42, 0.92) 100%
    );
}
.hero-content {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 1.75rem;
    padding: 2rem;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
}
.hero-poster {
    flex-shrink: 0;
    width: 10rem;
    aspect-ratio: 2/3;
    border-radius: 6px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    background: #1a2f4a;
}
.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
}
.hero-info {
    flex: 1;
    min-width: 0;
    padding-bottom: 0.25rem;
}
.hero-network {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 0.5rem;
}
.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.625rem;
}
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}
.hero-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
}
.hero-badge.returning {
    background: rgba(143, 167, 255, 0.25);
    color: #a8bfff;
}
.hero-badge.ended {
    background: rgba(197, 192, 201, 0.2);
    color: var(--muted);
}
.hero-badge.cancelled {
    background: rgba(208, 64, 64, 0.2);
    color: #f08080;
}
.hero-genres {
    font-size: 0.75rem;
    color: rgba(246, 242, 232, 0.55);
}
/* ── Hero countdown ── */
.hero-countdown {
    margin-bottom: 1rem;
}
.hero-countdown-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 0.4rem;
}
.hero-countdown-timer {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}
.countdown-unit {
    display: inline-flex;
    align-items: baseline;
    gap: 0.1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
}
.countdown-n {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
    min-width: 2ch;
    text-align: center;
}
.countdown-u {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(246, 242, 232, 0.5);
}
.countdown-sep {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
    font-size: 1rem;
    padding: 0 0.05rem;
}
.hero-countdown-date {
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(246, 242, 232, 0.85);
}

.hero-actions {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}
.btn-track-hero {
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1.5px solid;
    transition:
        background 0.12s,
        color 0.12s,
        border-color 0.12s;
}
.btn-track-hero.untracked {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}
.btn-track-hero.untracked:hover {
    background: rgba(255, 255, 255, 0.2);
}
.btn-track-hero.tracking {
    color: #fff;
    background: var(--green);
    border-color: var(--green);
}
.btn-track-hero.tracking:hover {
    background: #256844;
    border-color: #256844;
}
.btn-track-hero:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.synopsis-section {
    margin-bottom: 2.5rem;
}
.section-heading {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 0.75rem;
}
.synopsis-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #3a3040;
    max-width: 50rem;
}
.season-block {
    margin-bottom: 1.5rem;
    border: 1.5px solid #e0dbd4;
    border-radius: 6px;
    overflow: hidden;
}
.season-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--navy);
    cursor: pointer;
    user-select: none;
    gap: 1rem;
}
.season-header:hover {
    background: #162840;
}
.season-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.season-chevron {
    font-size: 0.75rem;
    color: rgba(246, 242, 232, 0.4);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.season-block.open .season-chevron {
    transform: rotate(90deg);
}
.season-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--cream);
}
.season-ep-count {
    font-size: 0.6875rem;
    color: rgba(246, 242, 232, 0.4);
}
.season-progress {
    font-size: 0.6875rem;
    color: rgba(246, 242, 232, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
}
.season-progress.complete {
    color: #6fcf97;
}
.season-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.btn-season-watch {
    font-size: 0.6875rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid rgba(143, 167, 255, 0.35);
    background: rgba(143, 167, 255, 0.1);
    color: var(--blue);
    transition:
        background 0.12s,
        border-color 0.12s;
    white-space: nowrap;
}
.btn-season-watch:hover {
    background: rgba(143, 167, 255, 0.2);
    border-color: rgba(143, 167, 255, 0.6);
}
.btn-season-watch.all-watched {
    border-color: rgba(111, 207, 151, 0.4);
    background: rgba(111, 207, 151, 0.1);
    color: #6fcf97;
}
.btn-season-watch.all-watched:hover {
    background: rgba(111, 207, 151, 0.18);
}
.btn-season-watch:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.episode-list {
    display: none;
}
.season-block.open .episode-list {
    display: block;
}
.episode-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-top: 1px solid #ede9e0;
    transition: background 0.08s;
}
.episode-row:hover {
    background: #fafaf7;
}
.episode-row.watched {
    opacity: 0.45;
}
.episode-row.watched:hover {
    opacity: 0.7;
}
.ep-watch-btn {
    flex-shrink: 0;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    border: 1.5px solid var(--muted);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: transparent;
    transition:
        background 0.12s,
        border-color 0.12s,
        color 0.12s;
    padding: 0;
}
.ep-watch-btn:hover {
    border-color: var(--green);
    color: var(--green);
}
.ep-watch-btn.watched {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.ep-watch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.ep-code {
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    flex-shrink: 0;
    width: 3.5rem;
}
.ep-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--navy);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ep-date {
    font-size: 0.6875rem;
    color: var(--muted);
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── 16. REQUEST PAGE ───────────────────────────────── */
.main > h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}
.search-wrap {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}
.search-wrap h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.search-row {
    display: flex;
    gap: 0.75rem;
}
.search-row input {
    flex: 1;
    border: 1.5px solid #ddd;
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    outline: none;
    width: auto;
    background: #fff;
    display: block;
}
.search-row input:focus {
    border-color: var(--purple);
    box-shadow: none;
}
#search-results {
    margin-top: 1.25rem;
    display: none;
}
#search-results.active {
    display: block;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.result-card {
    background: #fafafa;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.65rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.result-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: #ddd;
}
.result-poster-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #aaa;
}
.result-body {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.result-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}
.result-year {
    font-size: 0.75rem;
    color: #888;
}
.result-overview {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.result-footer {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.vote-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #ede9ff;
    color: var(--purple);
    border-radius: 2rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.in-library-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 2rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.search-loading {
    text-align: center;
    color: #888;
    font-size: 0.875rem;
    padding: 1rem 0;
}
.search-error {
    color: #991b1b;
    font-size: 0.875rem;
    padding: 0.5rem 0;
}
.req-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.feedback-type-option {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1.5px solid var(--muted);
    color: #555;
    background: #fff;
    transition:
        border-color 0.12s,
        background 0.12s,
        color 0.12s;
    user-select: none;
}
.feedback-type-option:hover {
    border-color: var(--purple);
    color: var(--purple);
}
.feedback-type-option.selected {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
}
.requests-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.requests-table th {
    background: #f3f4f6;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    padding: 0.75rem 1rem;
    text-align: left;
}
.requests-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-top: 1px solid #f3f4f6;
    vertical-align: middle;
}
.req-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
    background: #e5e7eb;
}
.req-poster-placeholder {
    width: 40px;
    height: 60px;
    background: #e5e7eb;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.req-name {
    font-weight: 600;
}
.req-meta {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.15rem;
}
.votes-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #ede9ff;
    color: var(--purple);
    border-radius: 2rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.empty {
    text-align: center;
    color: #888;
    padding: 3rem 0;
    font-size: 0.9rem;
}

/* ── 17. PROFILE ────────────────────────────────────── */
.section {
    background: #fff;
    border: 1px solid var(--muted);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.section-header {
    padding: 1rem 1.375rem;
    border-bottom: 1px solid #ede9e0;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}
.section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
}
.section-desc {
    font-size: 0.8rem;
    color: #8a8090;
}
.section-body {
    padding: 1.375rem;
}
.flash {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}
.flash.success {
    background: #edfaf0;
    border: 1px solid #a8e0b8;
    color: #1d6b35;
}
.flash-icon {
    font-size: 0.875rem;
}
.section.danger {
    border-color: rgba(200, 50, 50, 0.3);
}
.section.danger .section-header {
    background: #fff6f6;
    border-bottom-color: rgba(200, 50, 50, 0.15);
}
.section.danger .section-title {
    color: #9b2020;
}

/* ── DELETE ACCOUNT DIALOG ──────────────────────────── */
.delete-dialog {
    border: none;
    border-radius: 8px;
    padding: 0;
    width: 100%;
    max-width: 28rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(200, 50, 50, 0.2);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}
.delete-dialog::backdrop {
    background: rgba(13, 27, 42, 0.7);
    backdrop-filter: blur(2px);
}
.delete-dialog-inner {
    padding: 2rem;
}
.delete-dialog-icon {
    font-size: 2rem;
    color: #c83232;
    margin-bottom: 0.75rem;
}
.delete-dialog-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 0.875rem;
}
.delete-dialog-body {
    font-size: 0.875rem;
    color: #6b6477;
    line-height: 1.6;
}
.delete-dialog-list {
    margin: 0.5rem 0 0 1.25rem;
    font-size: 0.875rem;
    color: #6b6477;
    line-height: 1.8;
}
.delete-dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1.125rem;
    border-top: 1px solid #ede9e0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #ede9e0;
}
.stat {
    background: #fff;
    padding: 1.25rem 1rem;
    text-align: center;
}
.stat .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--purple);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat .stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}
.stat-sub {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 0.2rem;
}

/* ── 18. JELLYFIN ───────────────────────────────────── */
.card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}
.card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.linked-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #dcfce7;
    color: #166534;
    border-radius: 2rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.linked-badge::before {
    content: "✓";
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    text-transform: none;
    letter-spacing: 0;
}
.form-group input {
    width: 100%;
    border: 1.5px solid #ddd;
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-size: 1rem;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: "Courier New", monospace;
    font-weight: 700;
    display: block;
    background: #fff;
}
.form-group input:focus {
    border-color: var(--purple);
    box-shadow: none;
}
hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}
.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.step-num {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--purple);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.1rem;
}
.step-body {
    font-size: 0.9rem;
    line-height: 1.5;
}
.step-body strong {
    font-weight: 600;
}
.step-body code {
    background: #f3f4f6;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}

/* ── 19. CALENDAR ───────────────────────────────────── */
.month-nav {
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 1.25rem;
    height: 2.625rem;
    flex-shrink: 0;
}
.month-nav-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.month-heading {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cream);
    white-space: nowrap;
}
.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 3px;
    border: 1px solid rgba(143, 167, 255, 0.25);
    color: var(--blue);
    text-decoration: none;
    font-size: 0.875rem;
    transition:
        background 0.12s,
        border-color 0.12s;
}
.nav-arrow:hover {
    background: rgba(143, 167, 255, 0.12);
    border-color: rgba(143, 167, 255, 0.55);
}
.nav-today {
    position: absolute;
    right: 1.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--orange);
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 122, 0, 0.35);
    border-radius: 3px;
    transition: background 0.12s;
}
.nav-today:hover {
    background: rgba(255, 122, 0, 0.1);
}
.day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--purple);
    border-bottom: 2px solid var(--navy);
    flex-shrink: 0;
}
.day-header {
    padding: 0.4rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(246, 242, 232, 0.55);
    text-align: center;
}
.day-header.weekend {
    color: rgba(143, 167, 255, 0.7);
}
.calendar-body {
    display: grid;
    flex: 1;
    align-content: start;
    border-left: 1px solid var(--muted);
    border-top: 1px solid var(--muted);
}
.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.calendar-cell {
    border-right: 1px solid var(--muted);
    border-bottom: 1px solid var(--muted);
    padding: 0.3125rem 0.4375rem;
    position: relative;
    background: var(--cream);
    cursor: default;
    transition: background 0.1s;
}
.calendar-cell:hover {
    background: #eee9d8;
}
.calendar-cell.other-month {
    background: #efece3;
}
.calendar-cell.other-month:hover {
    background: #e6e1d4;
}
.calendar-cell.today {
    background: #fff7ee;
}
.calendar-cell.today:hover {
    background: #ffefd6;
}
.calendar-cell.is-weekend {
    background: #f2eef5;
}
.calendar-cell.is-weekend:hover {
    background: #e9e3ee;
}
.calendar-cell.is-weekend.other-month {
    background: #ede8ee;
}
.calendar-cell.is-weekend.today {
    background: #fff5ec;
}
.date-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    color: var(--navy);
    margin-bottom: 0.2rem;
    flex-shrink: 0;
}
.date-num.dim {
    color: var(--muted);
    font-weight: 400;
}
.date-num.today-dot {
    background: var(--orange);
    color: #fff;
    font-weight: 800;
}
.show-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}
.show-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(143, 167, 255, 0.13);
    border: 1px solid rgba(143, 167, 255, 0.22);
    border-left: 2px solid var(--blue);
    border-radius: 0 2px 2px 0;
    overflow: hidden;
    cursor: default;
    transition:
        background 0.1s,
        opacity 0.15s;
    position: relative;
}
.show-item:hover {
    background: rgba(143, 167, 255, 0.26);
}
.show-item.is-watched {
    opacity: 0.45;
    border-left-color: #5a9e6f;
    background: rgba(90, 158, 111, 0.1);
}
.show-item.is-watched:hover {
    opacity: 0.65;
    background: rgba(90, 158, 111, 0.18);
}
.watch-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 1px solid rgba(143, 167, 255, 0.4);
    background: rgba(246, 242, 232, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    line-height: 1;
    color: var(--muted);
    transition:
        background 0.12s,
        border-color 0.12s,
        color 0.12s;
    z-index: 2;
    padding: 0;
}
.watch-btn:hover {
    background: #fff;
    border-color: #5a9e6f;
    color: #5a9e6f;
}
.watch-btn.watched {
    background: #5a9e6f;
    border-color: #5a9e6f;
    color: #fff;
}
.show-banner {
    width: 100%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}
.show-info {
    padding: 2px 4px 3px;
    min-width: 0;
}
.show-text {
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.show-meta {
    font-size: 0.5625rem;
    font-weight: 500;
    line-height: 1.4;
    color: #6b6477;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}
.bottom-nav {
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 1.25rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.bottom-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(246, 242, 232, 0.35);
}

/* ── 20. MOBILE AGENDA ──────────────────────────────── */
.mobile-agenda {
    display: none;
    background: var(--cream);
    flex: 1;
}
.agenda-header {
    background: var(--navy);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.agenda-header .nav-today {
    position: static;
}
.agenda-day {
    border-bottom: 1px solid var(--muted);
}
.agenda-day.is-today .agenda-date-row {
    background: #fff7ee;
    border-bottom-color: rgba(255, 122, 0, 0.2);
}
.agenda-date-row {
    padding: 0.5rem 1rem 0.35rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    background: var(--cream);
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid var(--muted);
}
.agenda-weekday {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.agenda-datenum {
    font-size: 0.6875rem;
    color: #6b6477;
}
.agenda-datenum.today-dot {
    background: var(--orange);
    color: #fff;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}
.agenda-empty {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
}
.agenda-episodes {
    display: flex;
    flex-direction: column;
}
.agenda-episode {
    display: flex;
    align-items: stretch;
    min-width: 0;
    background: rgba(143, 167, 255, 0.08);
    border-left: 3px solid var(--blue);
    position: relative;
    transition:
        background 0.1s,
        opacity 0.15s;
}
.agenda-episode + .agenda-episode {
    border-top: 1px solid rgba(143, 167, 255, 0.12);
}
.agenda-episode:hover {
    background: rgba(143, 167, 255, 0.18);
}
.agenda-episode.is-watched {
    opacity: 0.45;
    border-left-color: #5a9e6f;
    background: rgba(90, 158, 111, 0.08);
}
.agenda-episode.is-watched:hover {
    opacity: 0.65;
}
.agenda-banner {
    width: 5.5rem;
    height: 3.25rem;
    object-fit: cover;
    flex-shrink: 0;
}
.agenda-episode-info {
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}
.agenda-show-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.agenda-episode-meta {
    font-size: 0.75rem;
    color: #6b6477;
}
.agenda-episode .watch-btn {
    position: absolute;
    top: 50%;
    right: 0.625rem;
    transform: translateY(-50%);
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
}
.agenda-empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b6477;
}
.agenda-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cream);
}
.agenda-nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 3px;
    border: 1px solid rgba(143, 167, 255, 0.25);
    color: var(--blue);
    text-decoration: none;
    font-size: 1rem;
    transition:
        background 0.12s,
        border-color 0.12s;
    flex-shrink: 0;
}
.agenda-nav-arrow:hover {
    background: rgba(143, 167, 255, 0.12);
    border-color: rgba(143, 167, 255, 0.55);
}

/* ── 21. PUBLIC PROFILE ─────────────────────────────── */
.pub-profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.pub-avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pub-profile-info {
    min-width: 0;
}
.pub-username {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
}
.pub-display-name {
    font-size: 0.9375rem;
    color: #6B6477;
    margin-bottom: 0.2rem;
}
.pub-meta {
    font-size: 0.75rem;
    color: #9b96a0;
}

/* Stats grid */
.pub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.pub-stat {
    background: #fff;
    border: 1px solid #e8e3f0;
    border-radius: 8px;
    padding: 1rem 1.125rem;
}
.pub-stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.pub-stat-unit {
    font-size: 1rem;
    font-weight: 600;
    color: #9b96a0;
}
.pub-stat-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9b96a0;
}
.pub-stat-sub {
    font-size: 0.75rem;
    color: #9b96a0;
    margin-top: 0.2rem;
}

/* Taste chips */
.pub-taste-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.pub-taste-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: #fff;
    border: 1px solid #e8e3f0;
    border-radius: 8px;
    padding: 0.625rem 1rem;
}
.pub-taste-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}
.pub-taste-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.pub-taste-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #9b96a0;
}
.pub-taste-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
}

/* Shows list */
.pub-shows-section {
    margin-top: 0.5rem;
}
.pub-shows-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.btn-hide-completed {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0.35rem 0.875rem;
    border-radius: 4px;
    cursor: pointer;
    border: 1.5px solid #d1ccd8;
    background: #fff;
    color: #6B6477;
    transition: border-color 0.12s, color 0.12s;
    white-space: nowrap;
}
.btn-hide-completed:hover {
    border-color: var(--purple);
    color: var(--purple);
}
.pub-shows-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}
.pub-show-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e8e3f0;
    border-radius: 8px;
    padding: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.pub-show-row:hover {
    border-color: var(--purple);
    box-shadow: 0 2px 8px rgba(75, 46, 131, 0.1);
}
.pub-show-thumb {
    width: 3.5rem;
    aspect-ratio: 2/3;
    border-radius: 4px;
    overflow: hidden;
    background: #e8e3f0;
    flex-shrink: 0;
}
.pub-show-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pub-show-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #9b96a0;
}
.pub-show-info {
    flex: 1;
    min-width: 0;
}
.pub-show-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.pub-show-badge {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}
.pub-show-badge.complete {
    background: rgba(46, 125, 82, 0.15);
    color: var(--green);
}
.pub-show-badge.returning {
    background: rgba(143, 167, 255, 0.2);
    color: #6a88e8;
}
.pub-show-meta {
    font-size: 0.75rem;
    color: #9b96a0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.pub-dot {
    opacity: 0.5;
}
.pub-show-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.pub-show-bar {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: #e8e3f0;
    overflow: hidden;
}
.pub-show-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.3s ease;
}
.pub-show-pct {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #9b96a0;
    min-width: 2.5ch;
    text-align: right;
}

/* ── Toggle switch (for profile privacy) ── */
.toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    justify-content: space-between;
}
.toggle-text {
    flex: 1;
    min-width: 0;
}
.toggle-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0;
    text-transform: none;
    margin-bottom: 0;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 2.75rem;
    height: 1.5rem;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1ccd8;
    border-radius: 99px;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: #fff;
    left: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    background: var(--purple);
}
.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(1.25rem);
}

/* ── Input with prefix (/u/) ── */
.input-prefix-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid #d1ccd8;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.12s;
}
.input-prefix-wrap:focus-within {
    border-color: var(--purple);
}
.input-prefix {
    background: #f0ecf7;
    border-right: 1px solid #d1ccd8;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #9b96a0;
    flex-shrink: 0;
}
.input-prefix-wrap input {
    border: none;
    border-radius: 0;
    outline: none;
    flex: 1;
    min-width: 0;
}
.input-prefix-wrap input:focus {
    outline: none;
    box-shadow: none;
}

/* ── 22. RESPONSIVE ─────────────────────────────────── */
@media (max-width: 640px) {
    /* Header: burger menu */
    .site-header-nav {
        display: none;
    }
    .burger-btn {
        display: flex;
    }

    /* Calendar: swap grid for agenda list */
    .month-nav,
    .day-headers,
    .calendar-body,
    .bottom-nav {
        display: none;
    }
    .mobile-agenda {
        display: flex;
        flex-direction: column;
    }

    .browse-layout {
        flex-direction: column;
        gap: 0.75rem;
    }
    .letter-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2px;
        overflow: visible;
    }
    .letter-link {
        width: 1.6rem;
        height: 1.6rem;
        font-size: 0.625rem;
    }
    .shows-grid {
        grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
        gap: 0.75rem;
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }
    .hero-poster {
        width: 7rem;
    }
    .ep-date {
        display: none;
    }

    .search-row {
        flex-direction: column;
    }
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
