/* ==========================================================================
   Learning Hub — public/css/learning-hub.css
   Modern, mobile-first, YouTube-style video library UI.
   Fonts (Poppins, DM Sans) are already loaded by the app layout.
   ========================================================================== */

:root {
    --lh-ink: #0f2238;
    --lh-ink-soft: #3d556f;
    --lh-muted: #6b8299;
    --lh-line: #e2eaf3;
    --lh-line-strong: #cfdcec;
    --lh-bg-soft: #f3f7fb;
    --lh-brand: #1e4f83;
    --lh-brand-dark: #163d68;
    --lh-brand-tint: #eaf2fb;
    --lh-radius: 12px;
    --lh-shadow: 0 10px 30px rgba(16, 35, 58, 0.10);
}

/* ── Container ──────────────────────────────────────────────────────────── */

.lh-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 20px 64px;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.lh-hero {
    margin-bottom: 26px;
}

.lh-hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--lh-ink);
    margin: 0 0 8px;
}

.lh-hero-blurb {
    font-size: 16px;
    line-height: 1.6;
    color: var(--lh-muted);
    max-width: 680px;
    margin: 0;
}

.lh-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lh-brand);
    margin-bottom: 6px;
}

/* ── Controls (search + sort + tags) ───────────────────────────────────── */

.lh-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.lh-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Search */
.lh-search {
    position: relative;
    flex: 1 1 300px;
    display: flex;
    align-items: center;
    min-width: 0;
}

.lh-search-icon {
    position: absolute;
    left: 16px;
    color: #93a8bd;
    pointer-events: none;
}

.lh-search-input {
    width: 100%;
    height: 48px;
    padding: 0 44px;
    border: 1px solid var(--lh-line-strong);
    border-radius: 999px;
    font-size: 15px;
    color: var(--lh-ink);
    background: #fff;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.lh-search-input::placeholder { color: #9fb2c5; }

.lh-search-input:focus {
    border-color: var(--lh-brand);
    box-shadow: 0 0 0 4px rgba(30, 79, 131, 0.10);
}

.lh-search-clear {
    position: absolute;
    right: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--lh-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.lh-search-clear:hover { background: var(--lh-bg-soft); color: var(--lh-ink); }

.lh-search-spinner {
    position: absolute;
    right: 16px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--lh-line-strong);
    border-top-color: var(--lh-brand);
    border-radius: 50%;
    animation: lh-spin 0.7s linear infinite;
}

@keyframes lh-spin { to { transform: rotate(360deg); } }

/* Sort */
.lh-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.lh-sort-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--lh-muted);
    margin: 0;
}

.lh-sort-select {
    height: 48px;
    padding: 0 40px 0 16px;
    border: 1px solid var(--lh-line-strong);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--lh-ink);
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b8299' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s;
}
.lh-sort-select:focus { border-color: var(--lh-brand); }

/* ── Tag chips ──────────────────────────────────────────────────────────── */

.lh-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lh-tag-chip {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid var(--lh-line-strong);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lh-ink-soft);
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.3;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lh-tag-chip:hover {
    background: var(--lh-brand-tint);
    border-color: var(--lh-brand);
    color: var(--lh-ink);
    text-decoration: none;
}

.lh-tag-chip--active,
.lh-tag-chip--active:hover {
    background: var(--lh-brand);
    border-color: var(--lh-brand);
    color: #fff;
}

/* ── Results meta (filtered view) ──────────────────────────────────────── */

.lh-results-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.lh-results-count {
    font-size: 14px;
    color: var(--lh-muted);
}
.lh-results-count strong { color: var(--lh-ink); font-weight: 600; }

.lh-clear-btn {
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--lh-line-strong);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lh-ink-soft);
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.lh-clear-btn:hover { background: var(--lh-bg-soft); color: var(--lh-ink); }

/* ── Breadcrumbs ───────────────────────────────────────────────────────── */

.lh-breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin: 0 0 20px;
}

.lh-crumb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.lh-crumb-link { color: var(--lh-brand); text-decoration: none; font-weight: 500; }
.lh-crumb-link:hover { text-decoration: underline; }
.lh-crumb-current {
    color: var(--lh-muted);
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lh-crumb-sep { color: #b3c4d6; flex-shrink: 0; }

/* ── Shelves (home browse) ──────────────────────────────────────────────── */

.lh-shelves {
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.lh-shelf-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 16px;
}

.lh-shelf-title {
    font-family: 'Poppins', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--lh-ink);
    margin: 0;
}

.lh-shelf-see-all {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--lh-brand);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.lh-shelf-see-all:hover { text-decoration: none; color: var(--lh-brand-dark); }
.lh-shelf-see-all svg { transition: transform 0.15s; }
.lh-shelf-see-all:hover svg { transform: translateX(2px); }

/* Viewport wraps the scroll row + arrows */
.lh-shelf-viewport { position: relative; }

.lh-shelf-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.lh-shelf-row::-webkit-scrollbar { height: 6px; }
.lh-shelf-row::-webkit-scrollbar-track { background: transparent; }
.lh-shelf-row::-webkit-scrollbar-thumb { background: var(--lh-line-strong); border-radius: 3px; }
.lh-shelf-row:hover::-webkit-scrollbar-thumb { background: #b3c4d6; }

.lh-shelf-row .lh-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

/* Scroll arrows (desktop only) */
.lh-shelf-arrow {
    position: absolute;
    top: 0;
    /* vertically centre on the thumbnail (280px wide → 157.5px tall 16:9) */
    transform: translateY(78px);
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lh-line);
    border-radius: 50%;
    background: #fff;
    color: var(--lh-ink);
    box-shadow: 0 4px 14px rgba(16, 35, 58, 0.16);
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.15s, background 0.15s;
}
.lh-shelf-arrow:hover { background: var(--lh-bg-soft); }
.lh-shelf-arrow--left { left: -12px; }
.lh-shelf-arrow--right { right: -12px; }
.lh-shelf-arrow.is-hidden { opacity: 0; pointer-events: none; }

@media (min-width: 1000px) {
    .lh-shelf-arrow { display: flex; }
}

/* ── Grid ───────────────────────────────────────────────────────────────── */

.lh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
    gap: 26px 22px;
}

.lh-grid.is-refreshing { opacity: 0.55; transition: opacity 0.15s; pointer-events: none; }

/* ── Video card ─────────────────────────────────────────────────────────── */

.lh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: var(--lh-radius);
    transition: transform 0.18s ease;
}

.lh-card:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

/* Thumbnail — 16:9 */
.lh-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--lh-radius);
    background: #e8edf3;
    box-shadow: 0 1px 2px rgba(16, 35, 58, 0.06);
    transition: box-shadow 0.18s;
    flex-shrink: 0;
}
.lh-card:hover .lh-card-thumb { box-shadow: var(--lh-shadow); }

.lh-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.lh-card:hover .lh-card-thumb img { transform: scale(1.04); }

/* Episode index badge (series view) */
.lh-card-index {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 34, 56, 0.88);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 7px;
}

/* Play overlay (hover) */
.lh-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15, 34, 56, 0.66);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s;
    padding-left: 3px;
}
.lh-card:hover .lh-card-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Duration badge */
.lh-card-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
    letter-spacing: 0.02em;
    pointer-events: none;
}

/* Watch-progress bar (YouTube-style) */
.lh-card-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    border-bottom-left-radius: var(--lh-radius);
    border-bottom-right-radius: var(--lh-radius);
    overflow: hidden;
}
.lh-card-progress-bar {
    display: block;
    height: 100%;
    background: #ff0033;
}

/* "Watched" chip */
.lh-card-watched {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 34, 56, 0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 5px;
    pointer-events: none;
}

/* Lock overlay */
.lh-card-lock {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 34, 56, 0.42);
    color: #fff;
    border-radius: var(--lh-radius);
}

/* Card body */
.lh-card-body {
    padding: 12px 4px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lh-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--lh-ink);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lh-card-meta {
    font-size: 12.5px;
    color: var(--lh-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.lh-card-dot { line-height: 1; }

/* Tier badge */
.lh-tier-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 999px;
    margin-top: 3px;
    width: fit-content;
}
.lh-tier-free { background: #e6f4ea; color: #2e7d32; }
.lh-tier-pro { background: #fff3e0; color: #e65100; }

/* ── Compact card (sidebar / playlist) ─────────────────────────────────── */

.lh-card--compact {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    border-radius: 10px;
    padding: 8px;
}
.lh-card--compact:hover { background: var(--lh-bg-soft); transform: none; }

.lh-card--compact .lh-card-thumb {
    flex: 0 0 132px;
    width: 132px;
    border-radius: 8px;
    box-shadow: none;
}
.lh-card--compact:hover .lh-card-thumb { box-shadow: none; }
.lh-card--compact .lh-card-body { padding: 0; min-width: 0; }
.lh-card--compact .lh-card-title { font-size: 13px; }
.lh-card--compact .lh-card-meta { font-size: 11px; }
.lh-card--compact .lh-card-play { width: 38px; height: 38px; }

/* Highlight the currently playing video in the playlist */
.lh-card--active,
.lh-card--active:hover { background: var(--lh-brand-tint); }
.lh-card--active .lh-card-title { color: var(--lh-brand); }

/* ── Series page header ─────────────────────────────────────────────────── */

.lh-series-header {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    margin-bottom: 34px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--lh-line);
}

.lh-series-thumb {
    flex: 0 0 240px;
    width: 240px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--lh-radius);
    background: #e8edf3;
    box-shadow: var(--lh-shadow);
}

.lh-series-header-text { flex: 1; min-width: 0; }

.lh-series-title {
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--lh-ink);
    margin: 0 0 6px;
}

.lh-series-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--lh-muted);
    margin: 0 0 14px;
}

/* ── Prose description ─────────────────────────────────────────────────── */

.lh-description {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--lh-ink-soft);
}
.lh-description p { margin-bottom: 14px; }
.lh-description p:last-child { margin-bottom: 0; }
.lh-description ul,
.lh-description ol { padding-left: 20px; margin-bottom: 14px; }
.lh-description li { margin-bottom: 6px; }
.lh-description strong { color: var(--lh-ink); }
.lh-description a { color: var(--lh-brand); text-decoration: underline; }
.lh-description h2,
.lh-description h3,
.lh-description h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--lh-ink);
    margin: 22px 0 10px;
}
.lh-description blockquote {
    border-left: 3px solid var(--lh-line-strong);
    padding: 8px 16px;
    color: #4d6a85;
    margin: 16px 0;
    background: var(--lh-bg-soft);
    border-radius: 0 8px 8px 0;
}

/* ── Watch page ─────────────────────────────────────────────────────────── */

.lh-watch-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}

.lh-watch-breadcrumbs { margin-bottom: 6px; }

.lh-watch-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.lh-watch-main { flex: 1 1 0; min-width: 0; }

.lh-watch-sidebar {
    flex: 0 0 360px;
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

@media (max-width: 1000px) {
    .lh-watch-layout { flex-direction: column; }
    .lh-watch-sidebar { flex: none; width: 100%; }
}

/* Player (16:9 responsive iframe) */
.lh-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--lh-radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--lh-shadow);
}
.lh-player-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Locked hero */
.lh-locked-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--lh-radius);
    overflow: hidden;
    background-color: #10233a;
    background-size: cover;
    background-position: center;
    box-shadow: var(--lh-shadow);
}
.lh-locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: linear-gradient(180deg, rgba(15,34,56,0.55) 0%, rgba(15,34,56,0.82) 100%);
    padding: 32px;
    text-align: center;
}
.lh-locked-icon { color: rgba(255, 255, 255, 0.92); flex-shrink: 0; }
.lh-locked-copy {
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    max-width: 460px;
    margin: 0;
}

/* Watch info */
.lh-watch-info { padding-top: 18px; }

.lh-watch-title {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--lh-ink);
    margin: 0 0 10px;
    line-height: 1.3;
}

.lh-watch-meta {
    font-size: 14px;
    color: var(--lh-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.lh-watch-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.lh-watch-series-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.lh-series-crumb {
    font-size: 13px;
    color: var(--lh-brand);
    text-decoration: none;
    border: 1px solid var(--lh-line-strong);
    border-radius: 999px;
    padding: 4px 13px;
    transition: background 0.15s;
}
.lh-series-crumb:hover { background: var(--lh-brand-tint); text-decoration: none; }

/* Description gets a soft card on the watch page */
.lh-watch-info .lh-description {
    background: #fff;
    border: 1px solid var(--lh-line);
    border-radius: var(--lh-radius);
    padding: 20px 22px;
}

/* Sidebar sections */
.lh-sidebar-section { background: #fff; }
.lh-sidebar-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--lh-ink);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--lh-line);
}
.lh-sidebar-title a { color: inherit; text-decoration: none; }
.lh-sidebar-title a:hover { color: var(--lh-brand); }

.lh-playlist { display: flex; flex-direction: column; gap: 4px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.lh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.lh-btn:hover { text-decoration: none; transform: translateY(-1px); }
.lh-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.lh-btn--primary {
    background: var(--lh-brand);
    color: #fff;
    box-shadow: 0 6px 18px rgba(30, 79, 131, 0.28);
}
.lh-btn--primary:hover { background: var(--lh-brand-dark); color: #fff; }

.lh-btn--ghost {
    background: #fff;
    border-color: var(--lh-line-strong);
    color: var(--lh-brand);
}
.lh-btn--ghost:hover { background: var(--lh-bg-soft); color: var(--lh-brand-dark); }

.lh-load-more { display: flex; justify-content: center; margin-top: 36px; }

/* ── Skeleton loaders ───────────────────────────────────────────────────── */

.lh-skel { pointer-events: none; }
.lh-skel-box,
.lh-skel-line {
    background: linear-gradient(90deg, #eef2f7 25%, #e1e9f1 37%, #eef2f7 63%);
    background-size: 400% 100%;
    animation: lh-shimmer 1.4s ease infinite;
    border-radius: 8px;
}
.lh-skel-line { height: 12px; margin-top: 8px; }
.lh-skel-line--title { width: 88%; height: 14px; }
.lh-skel-line--short { width: 52%; }

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

/* ── Empty / status states ──────────────────────────────────────────────── */

.lh-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    color: var(--lh-muted);
    padding: 60px 20px;
}
.lh-empty-state svg { color: #c0cedd; }
.lh-empty-state p { margin: 0; font-size: 15px; }

.lh-loading { text-align: center; color: var(--lh-muted); padding: 32px 16px; font-size: 14px; }

.lh-error {
    background: #fff5f5;
    border: 1px solid #ffd3d3;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 680px) {
    .lh-container { padding: 20px 14px 48px; }
    .lh-watch-page { padding: 18px 14px 48px; }
    .lh-hero-title { font-size: 26px; }
    .lh-hero-blurb { font-size: 15px; }
    .lh-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 14px; }
    .lh-series-header { flex-direction: column; }
    .lh-series-thumb { flex: none; width: 100%; }
    .lh-series-title { font-size: 22px; }
    .lh-shelf-title { font-size: 17px; }
    .lh-watch-title { font-size: 19px; }

    /* Toolbar stacks; tags scroll horizontally */
    .lh-search { flex-basis: 100%; }
    .lh-sort { width: 100%; justify-content: space-between; }
    .lh-sort-select { flex: 1; }
    .lh-tag-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .lh-tag-chips::-webkit-scrollbar { display: none; }

    /* Compact cards: smaller thumb */
    .lh-card--compact .lh-card-thumb { flex-basis: 116px; width: 116px; }
}

/* ==========================================================================
   UX pass 2 — playlist descriptions, expandable text, watch actions
   ========================================================================== */

/* ── Shelf heading w/ description + count ───────────────────────────────── */
.lh-shelf-heading { min-width: 0; }
.lh-shelf-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lh-shelf-title-link { color: inherit; text-decoration: none; }
.lh-shelf-title-link:hover { color: var(--lh-brand); }
.lh-shelf-count {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--lh-muted);
}
.lh-shelf-desc {
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--lh-muted);
    margin: 4px 0 0;
    max-width: 720px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Series page "Play all" ─────────────────────────────────────────────── */
.lh-series-playall { margin: 4px 0 18px; }

/* ── Removable filter pills ─────────────────────────────────────────────── */
.lh-results-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}
.lh-active-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.lh-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--lh-brand);
    background: var(--lh-brand-tint);
    color: var(--lh-brand-dark);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.lh-filter-pill:hover { background: #dcebfa; }
.lh-filter-pill span { font-size: 12px; opacity: 0.75; }

/* ── Expandable HTML (show more / less) ─────────────────────────────────── */
.lh-expandable { position: relative; }
.lh-expandable-body.is-collapsed {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}
.lh-expandable-toggle {
    margin-top: 8px;
    padding: 4px 0;
    border: none;
    background: none;
    color: var(--lh-brand);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.lh-expandable-toggle:hover { color: var(--lh-brand-dark); text-decoration: underline; }

.lh-description--small { font-size: 13.5px; line-height: 1.55; color: var(--lh-ink-soft); }
.lh-description--small p { margin-bottom: 8px; }

/* ── Watch sub-bar (meta + actions) ─────────────────────────────────────── */
.lh-watch-subbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.lh-watch-subbar .lh-watch-meta { margin-bottom: 0; }

.lh-watch-actions { display: flex; gap: 8px; flex-shrink: 0; }
.lh-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--lh-line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--lh-ink-soft);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lh-action-btn:hover { background: var(--lh-bg-soft); color: var(--lh-ink); text-decoration: none; }
.lh-action-btn--next {
    background: var(--lh-brand);
    border-color: var(--lh-brand);
    color: #fff;
}
.lh-action-btn--next:hover { background: var(--lh-brand-dark); color: #fff; }

/* ── Playlist card (watch sidebar) ──────────────────────────────────────── */
.lh-playlist-card {
    border: 1px solid var(--lh-line);
    border-radius: var(--lh-radius);
    overflow: hidden;
}
.lh-playlist-head {
    padding: 16px 16px 14px;
    background: var(--lh-bg-soft);
    border-bottom: 1px solid var(--lh-line);
}
.lh-playlist-head .lh-eyebrow { margin-bottom: 2px; }
.lh-playlist-name {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--lh-ink);
}
.lh-playlist-name a { color: inherit; text-decoration: none; }
.lh-playlist-name a:hover { color: var(--lh-brand); }
.lh-playlist-progress {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--lh-muted);
    margin: 0 0 6px;
}
.lh-playlist-card .lh-playlist {
    padding: 8px;
    max-height: 460px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.lh-playlist-card .lh-playlist::-webkit-scrollbar { width: 6px; }
.lh-playlist-card .lh-playlist::-webkit-scrollbar-thumb { background: var(--lh-line-strong); border-radius: 3px; }

/* Episode index sits a touch smaller on compact playlist cards */
.lh-card--compact .lh-card-index { top: 6px; left: 6px; min-width: 20px; height: 20px; font-size: 11px; }

/* ==========================================================================
   Likes + share modal + liked filter
   ========================================================================== */

/* ── Like button (watch action bar) ─────────────────────────────────────── */
.lh-like-btn.is-liked {
    background: var(--lh-brand-tint);
    border-color: var(--lh-brand);
    color: var(--lh-brand-dark);
}
.lh-like-btn:disabled { cursor: default; opacity: 0.85; }
.lh-like-count { font-weight: 700; }

/* ── Liked indicators on cards ──────────────────────────────────────────── */
.lh-card-liked {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--lh-brand);
    color: #fff;
}
.lh-card-likes {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--lh-muted);
}
.lh-card-likes svg { color: var(--lh-brand); }

/* ── Liked filter toggle (toolbar) ──────────────────────────────────────── */
.lh-liked-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 48px;
    padding: 0 18px;
    border: 1px solid var(--lh-line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--lh-ink-soft);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.lh-liked-toggle:hover { background: var(--lh-bg-soft); }
.lh-liked-toggle.is-active {
    background: var(--lh-brand-tint);
    border-color: var(--lh-brand);
    color: var(--lh-brand-dark);
}
.lh-liked-toggle svg { color: var(--lh-brand); }

/* ── Share modal ────────────────────────────────────────────────────────── */
.lh-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 34, 56, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: lh-fade-in 0.15s ease;
}
@keyframes lh-fade-in { from { opacity: 0; } to { opacity: 1; } }

.lh-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 24px 60px rgba(15, 34, 56, 0.3);
    overflow: hidden;
    animation: lh-pop-in 0.18s ease;
}
@keyframes lh-pop-in { from { transform: translateY(8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }

.lh-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--lh-line);
}
.lh-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--lh-ink);
    margin: 0;
}
.lh-modal-close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--lh-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
}
.lh-modal-close:hover { background: var(--lh-bg-soft); color: var(--lh-ink); }

.lh-share-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 24px 20px 8px;
}
.lh-share-target {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--lh-ink-soft);
    width: 64px;
}
.lh-share-target:hover { text-decoration: none; color: var(--lh-ink); }
.lh-share-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s;
}
.lh-share-target:hover .lh-share-icon { transform: translateY(-2px); }
.lh-share-label { font-size: 12px; font-weight: 600; }

.lh-copy-row {
    display: flex;
    gap: 8px;
    padding: 16px 20px 22px;
}
.lh-copy-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--lh-line-strong);
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--lh-ink-soft);
    background: var(--lh-bg-soft);
    outline: none;
}
.lh-copy-input:focus { border-color: var(--lh-brand); }
.lh-copy-btn { flex-shrink: 0; padding: 0 22px; }

@media (max-width: 680px) {
    .lh-liked-toggle { width: 100%; justify-content: center; }
    .lh-share-targets { justify-content: space-between; gap: 10px; }
    .lh-share-target { width: 60px; }
}

/* ==========================================================================
   Featured hero · playlists index · continue watching · up-next / autoplay
   ========================================================================== */

/* ── Hero with side link ────────────────────────────────────────────────── */
.lh-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}
.lh-hero-text { min-width: 0; }
.lh-hero-links { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.lh-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--lh-brand);
    text-decoration: none;
    padding: 9px 16px;
    border: 1px solid var(--lh-line-strong);
    border-radius: 999px;
    transition: background 0.15s;
}
.lh-hero-link:hover { background: var(--lh-bg-soft); text-decoration: none; }

/* ── Featured hero banner ───────────────────────────────────────────────── */
.lh-featured {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0;
    background: linear-gradient(135deg, #0f2240 0%, #1a3d6e 100%);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--lh-shadow);
}
.lh-featured:hover { text-decoration: none; }
.lh-featured-media { position: relative; aspect-ratio: 16 / 9; }
.lh-featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lh-featured-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: rgba(15, 34, 56, 0.62);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    transition: transform 0.15s, background 0.15s;
}
.lh-featured:hover .lh-featured-play { transform: translate(-50%, -50%) scale(1.06); background: rgba(30, 79, 131, 0.85); }
.lh-featured-body {
    padding: 32px 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}
/* Scoped + !important to defeat the global theme's heading/anchor colours
   on the dark gradient panel. */
.lh-featured .lh-eyebrow { color: #8ec3f0 !important; }
.lh-featured .lh-featured-title {
    font-family: 'Poppins', sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    margin: 4px 0 12px;
    color: #ffffff !important;
}
.lh-featured .lh-featured-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #c3d8ec !important;
    margin: 0 0 22px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lh-featured-cta { align-self: flex-start; }

@media (max-width: 760px) {
    .lh-featured { grid-template-columns: 1fr; }
    .lh-featured-body { padding: 22px 22px 26px; }
    .lh-featured-title { font-size: 21px; }
}

/* ── Playlists index grid ───────────────────────────────────────────────── */
.lh-pl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.lh-pl-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--lh-line);
    border-radius: var(--lh-radius);
    overflow: hidden;
    background: #fff;
    transition: transform 0.18s, box-shadow 0.18s;
}
.lh-pl-card:hover { transform: translateY(-3px); box-shadow: var(--lh-shadow); text-decoration: none; color: inherit; }
.lh-pl-thumb { position: relative; aspect-ratio: 16 / 9; background: #e8edf3; }
.lh-pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lh-pl-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(15, 34, 56, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}
.lh-pl-body { padding: 14px 16px 16px; }
.lh-pl-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--lh-ink);
    margin: 0 0 6px;
}
.lh-pl-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--lh-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Up next + autoplay (watch page) ────────────────────────────────────── */
.lh-upnext {
    margin-top: 14px;
    border: 1px solid var(--lh-line);
    border-radius: var(--lh-radius);
    padding: 12px 14px;
    background: var(--lh-bg-soft);
}
.lh-upnext-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.lh-upnext-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lh-muted);
}
.lh-upnext-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    padding: 6px;
    transition: background 0.15s;
}
.lh-upnext-card:hover { background: #fff; text-decoration: none; color: inherit; }
.lh-upnext-thumb { position: relative; flex: 0 0 150px; width: 150px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #e8edf3; }
.lh-upnext-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lh-upnext-info { flex: 1; min-width: 0; }
.lh-upnext-title {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--lh-ink);
    line-height: 1.35;
    margin-bottom: 3px;
}
.lh-upnext-sub { font-size: 12.5px; color: var(--lh-muted); }
.lh-upnext-arrow { color: var(--lh-muted); flex-shrink: 0; }

/* Autoplay toggle (switch) */
.lh-autoplay-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--lh-ink-soft);
    cursor: pointer;
    margin: 0;
    user-select: none;
}
.lh-autoplay-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.lh-autoplay-track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #c8d3e1;
    transition: background 0.15s;
}
.lh-autoplay-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.15s;
}
.lh-autoplay-toggle input:checked + .lh-autoplay-track { background: var(--lh-brand); }
.lh-autoplay-toggle input:checked + .lh-autoplay-track .lh-autoplay-knob { transform: translateX(16px); }
.lh-autoplay-toggle input:focus-visible + .lh-autoplay-track { box-shadow: 0 0 0 3px rgba(30,79,131,0.25); }

@media (max-width: 680px) {
    .lh-hero { flex-direction: column; align-items: flex-start; gap: 12px; }
    .lh-pl-grid { grid-template-columns: 1fr; }
    .lh-upnext-thumb { flex-basis: 120px; width: 120px; }
}
