/* ==========================================================================
   CartoonNest — streaming look (2026-11). Loaded after cartoonnest.css.
   Two moods share one layout:
     body.cn-kids   — rounded Nunito, deep purple night, sunny "Gledaj" button, playful hovers
     body.cn-adults — Inter, near-black cinema, white "Gledaj" button, calmer motion
   ========================================================================== */

body.cn-kids {
    --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bg: #120d26;
    --bg-rgb: 18, 13, 38;
    --surface: #1d1838;
    --surface-2: #272047;
    --line: rgba(255, 255, 255, .08);
    --text: #f4f1ff;
    --muted: #b3abd6;
    --accent: #8b5cf6;
    --accent-rgb: 139, 92, 246;
    --accent2: #22d3ee;
    --sun: #ffd23f;
    --play-bg: #ffd23f;
    --play-fg: #24164a;
    --radius: 18px;
    --btn-radius: 999px;
    --card-w: clamp(132px, 15vw, 212px);
    --card-w-grid: clamp(128px, 14vw, 196px);
    --hover-tf: scale(1.06) rotate(-1deg);
}
body.cn-adults {
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bg: #0a0b10;
    --bg-rgb: 10, 11, 16;
    --surface: #16181f;
    --surface-2: #1f222b;
    --line: rgba(255, 255, 255, .08);
    --text: #f2f3f5;
    --muted: #9ba2b0;
    --accent: #7c5cff;
    --accent-rgb: 124, 92, 255;
    --accent2: #e8e8ea;
    --sun: #ffd35a;
    --play-bg: #ffffff;
    --play-fg: #0b0b0f;
    --radius: 8px;
    --btn-radius: 6px;
    --card-w: clamp(120px, 13vw, 190px);
    --card-w-grid: clamp(120px, 13vw, 182px);
    --hover-tf: scale(1.05);
}
body { --gut: max(16px, 4vw); }

html { background: var(--bg, #0e1014); }
body.cn-kids, body.cn-adults {
    font-family: var(--font);
    --bs-body-font-family: var(--font);
    color: var(--text);
    overflow-x: clip;
}
body.cn-kids {
    background:
        radial-gradient(900px 520px at 8% -8%, rgba(139, 92, 246, .28), transparent 60%),
        radial-gradient(760px 480px at 100% 0%, rgba(34, 211, 238, .14), transparent 60%),
        radial-gradient(700px 600px at 50% 110%, rgba(255, 111, 177, .10), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}
body.cn-adults { background: var(--bg); }

/* ---------------------------------------------------------------- top bar */
.cn-nav {
    position: sticky; top: 0; z-index: 1030;
    padding: calc(.55rem + env(safe-area-inset-top)) var(--gut) .55rem !important;
    background: rgba(var(--bg-rgb), .94) !important;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: none !important;
    transition: background .25s ease, border-color .25s ease;
}
body.cn-wide .cn-nav { margin-bottom: 0 !important; }
body.cn-has-hero .cn-nav {
    position: fixed; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0)) !important;
    border-bottom: 0 !important;
    backdrop-filter: none;
}
body.cn-has-hero .cn-nav.cn-nav-solid,
body.cn-has-hero.cn-searching .cn-nav { background: rgba(var(--bg-rgb), .96) !important; box-shadow: 0 1px 0 var(--line) !important; backdrop-filter: blur(14px); }

.cn-nav-inner { display: flex; align-items: center; gap: 1.6rem; }
.cn-brand-link { display: flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-weight: 900; font-size: 1.3rem; letter-spacing: .2px; flex: 0 0 auto; }
.cn-brand-link:hover { color: #fff; }
.cn-nav .cn-brand-logo { height: 36px; width: auto; margin: 0; filter: drop-shadow(0 2px 8px rgba(var(--accent-rgb), .55)); }
body.cn-kids .cn-brand-name { background: linear-gradient(90deg, #fff, #d9ccff 40%, var(--sun)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.cn-nav-links { display: flex; align-items: center; gap: 1.2rem; }
.cn-nav-links a { color: rgba(255, 255, 255, .72); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; transition: color .15s; }
.cn-nav-links a:hover { color: #fff; }
.cn-nav-links a.active { color: #fff; font-weight: 800; }
body.cn-kids .cn-nav-links a.active { background: rgba(var(--accent-rgb), .35); padding: .3rem .8rem; border-radius: 999px; }

.cn-nav-right { margin-left: auto; display: flex; align-items: center; gap: .55rem; }
.cn-searchbox { position: relative; margin: 0; }
.cn-searchbox-ico { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); font-size: .85rem; opacity: .7; pointer-events: none; }
.cn-nav .cn-search {
    width: 190px; padding: .45rem .9rem .45rem 2.1rem !important; font-size: .92rem;
    background: rgba(255, 255, 255, .09) !important; border: 1px solid transparent !important; color: #fff !important;
    border-radius: 999px !important; transition: width .2s ease, background .2s ease; outline: none;
}
.cn-nav .cn-search:focus { width: 260px; background: rgba(0, 0, 0, .55) !important; border-color: rgba(255, 255, 255, .35) !important; box-shadow: none !important; }
.cn-nav .cn-search::placeholder { color: rgba(255, 255, 255, .55); }

.cn-aud { display: inline-flex; margin: 0; padding: 2px; border-radius: 999px; background: rgba(255, 255, 255, .09); }
.cn-aud button { border: 0; background: transparent; color: rgba(255, 255, 255, .7); font-weight: 700; font-size: .85rem; padding: .32rem .75rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cn-aud button.active { background: var(--accent); color: #fff; }
body.cn-kids .cn-aud button.active { background: linear-gradient(135deg, var(--accent), #ec6bd2); }

.cn-navbtn {
    border: 0; background: rgba(255, 255, 255, .09); color: #fff; border-radius: 999px;
    padding: .42rem .8rem; font-weight: 700; font-size: .88rem; white-space: nowrap;
}
.cn-navbtn:hover { background: rgba(255, 255, 255, .18); }
.cn-avatar {
    width: 36px; height: 36px; border: 0; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 900; font-size: 1rem;
}
body.cn-kids .cn-avatar { border-radius: 50%; background: linear-gradient(135deg, #ec6bd2, var(--accent) 55%, var(--accent2)); }
.cn-menu { font-family: var(--font); }

/* ---------------------------------------------------------------- page frame */
.cn-main.cn-main-wide { max-width: none; padding: 0 !important; }
.cn-home, .cn-detail-body, .cn-browse { padding: 0 var(--gut) 3.5rem; }
.cn-browse { padding-top: 1.4rem; }
.cn-page-h { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 900; margin: 1.4rem 0 .6rem; letter-spacing: -.3px; }
body.cn-adults .cn-page-h { letter-spacing: -.6px; }

/* ---------------------------------------------------------------- hero */
.cn-hero { position: relative; display: flex; align-items: flex-end; overflow: hidden; }
/* The picture fades out into the page itself (mask), so there is no seam where the hero ends. */
.cn-hero-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center 18%;
    transform: scale(1.02);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 100%);
}
.cn-hero-bg-poster { filter: blur(30px) saturate(1.2) brightness(.55); transform: scale(1.25); }
.cn-hero-shade {
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(var(--bg-rgb), .94) 0%, rgba(var(--bg-rgb), .66) 34%, rgba(var(--bg-rgb), .12) 64%, rgba(var(--bg-rgb), 0) 80%),
        linear-gradient(0deg, rgba(var(--bg-rgb), .35) 0%, rgba(var(--bg-rgb), .3) 22%, rgba(var(--bg-rgb), 0) 52%),
        linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 22%);
}
.cn-hero-inner { position: relative; z-index: 2; display: flex; gap: 2.2rem; align-items: flex-end; width: 100%; padding: 6.5rem var(--gut) 3rem; }
.cn-hero-text { max-width: 680px; min-width: 0; }
.cn-hero-poster {
    width: clamp(150px, 15vw, 230px); aspect-ratio: 2 / 3; object-fit: cover; flex: 0 0 auto;
    border-radius: var(--radius); box-shadow: 0 22px 50px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08);
}
body.cn-kids .cn-hero-poster { transform: rotate(-2deg); border: 4px solid rgba(255, 255, 255, .9); }
.cn-kicker {
    display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(255, 255, 255, .85); margin-bottom: .6rem;
}
body.cn-kids .cn-kicker { letter-spacing: .04em; text-transform: none; font-size: .9rem; background: rgba(255, 210, 63, .16); color: var(--sun); padding: .25rem .75rem; border-radius: 999px; }
.cn-hero-title {
    font-size: clamp(2.1rem, 5.2vw, 4rem); font-weight: 900; line-height: 1.02; margin: 0 0 .7rem;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .6); letter-spacing: -.5px;
}
body.cn-adults .cn-hero-title { letter-spacing: -1.5px; }
.cn-hero-logo { margin: 0 0 .5rem; line-height: 0; }
.cn-hero-logo img { max-width: min(480px, 78vw); max-height: 170px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .35)) drop-shadow(0 6px 24px rgba(0, 0, 0, .65)); }
.cn-hero-subtitle { font-weight: 700; color: rgba(255, 255, 255, .8); margin-bottom: .6rem; font-size: 1.05rem; }

.cn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; font-weight: 700; font-size: .95rem; color: rgba(255, 255, 255, .9); margin-bottom: .7rem; }
.cn-meta-rating { color: var(--sun); }
.cn-age { border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 4px; padding: 0 .4rem; font-size: .82rem; line-height: 1.45; }
body.cn-kids .cn-age { border-radius: 999px; border-color: var(--accent2); color: var(--accent2); }
.cn-meta-lang { background: rgba(34, 211, 238, .16); color: #8fe6ff; border-radius: 4px; padding: 0 .45rem; font-size: .82rem; line-height: 1.6; }
body.cn-kids .cn-meta-lang { border-radius: 999px; }
.cn-meta-flag { color: #6ee7a8; font-size: .85rem; }
.cn-meta-genre { color: rgba(255, 255, 255, .75); font-weight: 600; }
.cn-meta-genre + .cn-meta-genre::before { content: "•"; margin-right: .9rem; opacity: .5; }
.cn-genres { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.cn-genres span { background: rgba(255, 255, 255, .12); border-radius: 999px; padding: .2rem .75rem; font-size: .82rem; font-weight: 700; }
body.cn-kids .cn-genres span:nth-child(3n+1) { background: rgba(139, 92, 246, .32); }
body.cn-kids .cn-genres span:nth-child(3n+2) { background: rgba(34, 211, 238, .22); }
body.cn-kids .cn-genres span:nth-child(3n+3) { background: rgba(255, 111, 177, .25); }
.cn-tagline { font-style: italic; color: rgba(255, 255, 255, .78); margin: 0 0 .4rem; font-size: 1.02rem; }
.cn-overview { font-size: 1.06rem; line-height: 1.55; color: rgba(255, 255, 255, .9); margin: 0 0 .2rem; max-width: 62ch; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.cn-overview-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cn-crew { color: var(--muted); font-size: .9rem; margin-top: .8rem; }
.cn-crew span { color: rgba(255, 255, 255, .55); }

.cn-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 .3rem; }
.cn-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .72rem 1.5rem; border: 0; border-radius: var(--btn-radius);
    font-weight: 800; font-size: 1.04rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform .15s ease, background .15s ease, filter .15s ease, box-shadow .15s ease;
}
.cn-btn:hover { transform: translateY(-1px); }
.cn-btn-ico { font-size: .95em; }
.cn-btn-play { background: var(--play-bg); color: var(--play-fg) !important; }
.cn-btn-play:hover { filter: brightness(.92); }
body.cn-kids .cn-btn-play { box-shadow: 0 6px 0 #c99a10, 0 12px 26px rgba(255, 210, 63, .25); }
body.cn-kids .cn-btn-play:hover { transform: translateY(-2px) scale(1.03); }
body.cn-kids .cn-btn-play:active { transform: translateY(3px); box-shadow: 0 2px 0 #c99a10; }
.cn-btn-ghost { background: rgba(255, 255, 255, .17); color: #fff !important; backdrop-filter: blur(8px); }
.cn-btn-ghost:hover { background: rgba(255, 255, 255, .28); }
.cn-btn.cn-fav-on { background: rgba(var(--accent-rgb), .5); }
.cn-btn.disabled { opacity: .6; pointer-events: none; }
.cn-btn-sm { padding: .4rem 1rem; font-size: .9rem; }
.cn-btn:focus-visible { outline: 3px solid var(--accent2) !important; outline-offset: 3px; }

.cn-resume { display: flex; align-items: center; gap: .7rem; margin-top: .6rem; color: var(--muted); font-size: .88rem; font-weight: 700; }
.cn-resume-bar { width: 200px; height: 5px; background: rgba(255, 255, 255, .22); border-radius: 4px; overflow: hidden; }
.cn-resume-bar > div { height: 100%; background: var(--accent); border-radius: 4px; }
body.cn-kids .cn-resume-bar > div { background: var(--sun); }

/* home carousel */
.cn-hero-home { height: min(84vh, 780px); min-height: 480px; }
.cn-hero-home .cn-slide { position: absolute; inset: 0; display: flex; align-items: flex-end; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.cn-hero-home .cn-slide.active { opacity: 1; visibility: visible; }
.cn-hero-home .cn-slide.active .cn-hero-bg { animation: cn-kenburns 14s ease-out both; }
.cn-hero-home .cn-hero-inner { padding-bottom: 8.5rem; }
.cn-hero-home .cn-hero-text { animation: none; }
.cn-hero-home .cn-slide.active .cn-hero-text { animation: cn-rise .7s ease both; }
@keyframes cn-kenburns { from { transform: scale(1.02); } to { transform: scale(1.09); } }
@keyframes cn-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cn-dots { position: absolute; z-index: 3; right: var(--gut); bottom: 8.6rem; display: flex; gap: .45rem; }
.cn-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .4); cursor: pointer; transition: width .25s ease, background .25s; }
.cn-dots button.active { width: 28px; background: #fff; }
body.cn-kids .cn-dots button.active { background: var(--sun); }
.cn-home-overlap { margin-top: -6.5rem; position: relative; z-index: 3; }
.cn-hero-detail { min-height: min(88vh, 820px); }

/* ---------------------------------------------------------------- rows */
.cn-row { margin: 1.5rem 0 1.2rem; }
.cn-row-h { font-size: 1.28rem; font-weight: 800; margin: 0 0 .35rem; letter-spacing: -.2px; }
body.cn-kids .cn-row-h { font-size: 1.4rem; font-weight: 900; letter-spacing: 0; }
.cn-row-h-sm { font-size: 1.05rem !important; }
.cn-strip-wrap { position: relative; margin: 0 calc(-1 * var(--gut)); }
.cn-strip {
    display: flex; gap: .85rem; overflow-x: auto; overflow-y: hidden;
    padding: .75rem var(--gut) 1rem; scroll-padding: 0 var(--gut);
    scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cn-strip::-webkit-scrollbar { display: none; }
.cn-strip > * { flex: 0 0 var(--card-w); scroll-snap-align: start; }
.cn-strip-wide > * { flex-basis: clamp(250px, 27vw, 400px); }
.cn-strip-nav {
    position: absolute; top: .75rem; bottom: 2.6rem; z-index: 5; width: max(44px, calc(var(--gut) - 4px));
    border: 0; color: #fff; font-size: 2.6rem; font-weight: 300; line-height: 1; cursor: pointer;
    opacity: 0; transition: opacity .2s ease;
}
.cn-prev { left: 0; background: linear-gradient(90deg, rgba(var(--bg-rgb), .92), rgba(var(--bg-rgb), 0)); }
.cn-next { right: 0; background: linear-gradient(270deg, rgba(var(--bg-rgb), .92), rgba(var(--bg-rgb), 0)); }
.cn-strip-wrap:hover .cn-strip-nav { opacity: 1; }
.cn-strip-nav.cn-hide { display: none; }
@media (hover: none) { .cn-strip-nav { display: none; } }

/* ---------------------------------------------------------------- cards */
.cn-card { display: block; position: relative; color: inherit; text-decoration: none; min-width: 0; }
.cn-card:hover { color: inherit; }
.cn-card-img {
    position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
    transition: transform .22s cubic-bezier(.2, .8, .3, 1.2), box-shadow .2s ease;
}
.cn-card-img > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-card:hover .cn-card-img, .cn-card:focus-visible .cn-card-img {
    transform: var(--hover-tf); z-index: 2;
    box-shadow: 0 0 0 3px var(--accent2), 0 18px 36px rgba(0, 0, 0, .6);
}
body.cn-kids .cn-card:hover .cn-card-img, body.cn-kids .cn-card:focus-visible .cn-card-img { box-shadow: 0 0 0 4px var(--sun), 0 18px 36px rgba(0, 0, 0, .55); }
.cn-card:focus-visible { outline: none !important; }
.cn-card-noimg {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: .8rem; text-align: center;
    font-weight: 900; font-size: 1.05rem; line-height: 1.2;
    background: linear-gradient(150deg, rgba(var(--accent-rgb), .55), rgba(34, 211, 238, .25));
}
.cn-card-info {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: .6rem .65rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .25) 45%, rgba(0, 0, 0, 0) 65%);
    opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.cn-card:hover .cn-card-info, .cn-card:focus-visible .cn-card-info { opacity: 1; }
.cn-card-play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--play-bg); color: var(--play-fg); font-size: 1.15rem; padding-left: 3px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.cn-card-meta { font-size: .76rem; font-weight: 700; color: rgba(255, 255, 255, .92); line-height: 1.3; }
.cn-card-title { margin-top: .5rem; font-weight: 700; font-size: .93rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cn-kids .cn-card-title { font-weight: 800; }
.cn-card-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.cn-card .cn-rating { top: 8px; right: 8px; font-size: .74rem; }
.cn-card .cn-lang { font-size: .7rem; }
.cn-card .cn-fav { opacity: 0; transition: opacity .15s; }
.cn-card:hover .cn-fav, .cn-card:focus-within .cn-fav, .cn-card .cn-fav.cn-fav-on { opacity: 1; }
.cn-card-img:has(.cn-rating) .cn-fav { top: 40px; }
.cn-card .cn-tile-badge { z-index: 2; }
.cn-card .cn-prog { height: 5px; z-index: 2; }
body.cn-kids .cn-card .cn-prog-fill { background: var(--sun); }
.cn-card .cn-watched { z-index: 2; top: auto; bottom: 10px; right: 8px; width: 26px; height: 26px; font-size: 15px; }

/* wide (continue watching) */
.cn-card-wide .cn-card-img { aspect-ratio: 16 / 9; }
.cn-card-wide .cn-img-fallback { object-position: center 25%; }
.cn-wide-shade { position: absolute; inset: 0; background: linear-gradient(20deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .1) 55%, rgba(0, 0, 0, 0) 70%); }
.cn-wide-logo { position: absolute; left: .85rem; bottom: .95rem; max-width: 52% !important; max-height: 42% !important; width: auto !important; height: auto !important; object-fit: contain !important; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .7)); }
.cn-wide-title { position: absolute; left: .85rem; right: .85rem; bottom: .9rem; font-weight: 900; font-size: 1.15rem; line-height: 1.15; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.cn-card-wide .cn-card-title { display: none; }
.cn-card-wide .cn-card-sub { margin-top: .5rem; color: rgba(255, 255, 255, .82); font-weight: 600; }

/* folders */
.cn-card-folder .cn-card-img { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; background: linear-gradient(145deg, var(--accent), #22d3ee); }
.cn-card-folder .cn-folder-ico { font-size: 3.2rem; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .35)); }
.cn-folder-count { font-size: .8rem; font-weight: 800; background: rgba(0, 0, 0, .3); padding: .1rem .6rem; border-radius: 999px; }

/* grids (browse views + search results) */
.cn-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-w-grid), 1fr)); gap: 1.4rem 1rem; }
.cn-browse-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-bottom: 1.3rem; }
.cn-browse-head .cn-langpills { margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.cn-lp.active { background: var(--accent) !important; color: #fff !important; }
.cn-search-results { display: none; padding-top: .5rem; }
body.cn-searching .cn-search-results { display: block; }
body.cn-searching .cn-hero-home,
body.cn-searching .cn-home > .cn-row,
body.cn-searching .cn-home > .cn-page-h { display: none !important; }
body.cn-searching .cn-home-overlap { margin-top: 0; padding-top: 5.5rem; }
.cn-empty-search { display: none; color: var(--muted); font-size: 1.05rem; padding: 2rem 0; text-align: center; }
.cn-emptystate { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.cn-emptystate-ico { font-size: 3.2rem; margin-bottom: .6rem; }
.cn-eng { margin-top: 2.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.cn-search-results .cn-eng { margin-top: 1.6rem; }
.cn-eng .eng-head { margin-bottom: .5rem; }
.cn-eng .eng-genre { max-width: 170px; }
.cn-card .eng-soon { background: rgba(255, 196, 0, .92); color: #1a1300; font-weight: 800; }
.cn-card .eng-mine-badge { background: var(--accent); font-weight: 800; }
.eng-more { display: flex; justify-content: center; padding: 1.6rem 0 .5rem; }
.eng-more.loading button { opacity: .5; pointer-events: none; }

/* ---------------------------------------------------------------- details page */
.cn-detail-body { padding-top: .6rem; }
.cn-note { background: rgba(255, 210, 63, .1); border: 1px solid rgba(255, 210, 63, .3); color: #ffe38a; border-radius: 12px; padding: .7rem 1rem; margin: .5rem 0 1rem; font-size: .92rem; }

.cn-episodes { margin: 1rem 0 2rem; scroll-margin-top: 80px; }
.cn-episodes-head { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; margin-bottom: .6rem; }
.cn-seasons { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.cn-seasons::-webkit-scrollbar { display: none; }
.cn-seasons a, .cn-seasons-one {
    flex: 0 0 auto; padding: .38rem .95rem; border-radius: 999px; background: rgba(255, 255, 255, .09);
    color: rgba(255, 255, 255, .8); text-decoration: none; font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.cn-seasons a:hover { background: rgba(255, 255, 255, .17); color: #fff; }
.cn-seasons a.active { background: var(--accent); color: #fff; }
body.cn-kids .cn-seasons a.active { background: var(--sun); color: var(--play-fg); }
body.cn-adults .cn-seasons a, body.cn-adults .cn-seasons-one { border-radius: 6px; }
.cn-seasons small { opacity: .75; font-size: .72rem; }
.cn-linkbtn { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: .88rem; padding: .3rem .2rem; cursor: pointer; }
.cn-linkbtn:hover { color: #fff; }
.cn-season-ov { color: var(--muted); max-width: 80ch; margin: .2rem 0 .8rem; }

.cn-epis { display: flex; flex-direction: column; }
.cn-epi {
    display: grid; grid-template-columns: 2.6rem minmax(150px, 230px) 1fr; gap: 1.1rem; align-items: center;
    padding: .9rem .8rem; border-radius: var(--radius); color: inherit; text-decoration: none;
    border-bottom: 1px solid var(--line); transition: background .15s ease;
}
.cn-epi:hover, .cn-epi:focus-visible { background: rgba(255, 255, 255, .06); color: inherit; }
.cn-epi:focus-visible { outline: 3px solid var(--accent2) !important; outline-offset: -3px; }
.cn-epi-num { font-size: 1.55rem; font-weight: 800; color: rgba(255, 255, 255, .45); text-align: center; }
.cn-epi-img { position: relative; aspect-ratio: 16 / 9; border-radius: calc(var(--radius) - 4px); overflow: hidden; background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.cn-epi-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-epi-play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; padding-left: 3px; font-size: 1.1rem;
    background: rgba(0, 0, 0, .55); border: 2px solid #fff; color: #fff; opacity: 0; transition: opacity .15s ease, transform .15s ease;
}
.cn-epi:hover .cn-epi-play, .cn-epi:focus-visible .cn-epi-play { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
body.cn-kids .cn-epi:hover .cn-epi-play { background: var(--sun); color: var(--play-fg); border-color: var(--sun); }
.cn-epi-done { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: #22d38a; color: #062a17; font-weight: 900; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.cn-epi .cn-prog { height: 4px; }
body.cn-kids .cn-epi .cn-prog-fill { background: var(--sun); }
.cn-epi-body { min-width: 0; }
.cn-epi-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.cn-epi-title { font-weight: 800; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-epi-rt { color: var(--muted); font-size: .88rem; font-weight: 600; white-space: nowrap; }
.cn-epi-ov { color: var(--muted); font-size: .92rem; line-height: 1.45; margin: .3rem 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cn-epi-tags { display: flex; gap: .4rem; margin-top: .35rem; }
.cn-epi-tags:empty { display: none; }
.cn-epi-tags span { font-size: .74rem; font-weight: 800; padding: .05rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.cn-epi-tags .ok { color: #6ee7a8; background: rgba(34, 211, 138, .12); }
.cn-epi-tags .off { color: #ff9b9b; background: rgba(255, 90, 90, .12); }
.cn-epi-off { opacity: .5; }

/* cast */
.cn-cast > .cn-person { flex: 0 0 118px; text-align: center; }
.cn-person-img {
    width: 104px; height: 104px; margin: 0 auto .55rem; border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.6rem; color: #fff;
    background: linear-gradient(135deg, var(--surface-2), rgba(var(--accent-rgb), .5));
    border: 3px solid rgba(255, 255, 255, .1); box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
}
body.cn-kids .cn-person-img { border-color: rgba(255, 210, 63, .7); }
.cn-person-img img { width: 100%; height: 100%; object-fit: cover; }
.cn-person-name { font-weight: 800; font-size: .88rem; line-height: 1.25; }
.cn-person-role { color: var(--muted); font-size: .8rem; line-height: 1.25; margin-top: .15rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* admin panel on details pages */
.cn-admin { margin-top: 2.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1.1rem; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.cn-admin > summary { cursor: pointer; font-weight: 800; color: var(--muted); list-style: none; }
.cn-admin > summary::-webkit-details-marker { display: none; }
.cn-admin[open] > summary { color: #fff; margin-bottom: .8rem; }
.cn-admin-grid { display: flex; flex-direction: column; gap: .8rem; }
.cn-admin-seasons { display: flex; flex-direction: column; }
.cn-admin-season { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }

/* trailer */
.cn-trailer { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .86); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cn-trailer[hidden] { display: none; }
.cn-trailer-box { position: relative; width: min(1100px, 100%); }
.cn-trailer-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.cn-trailer-frame iframe { width: 100%; height: 100%; display: block; }
.cn-trailer-x { position: absolute; top: -46px; right: 0; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.1rem; cursor: pointer; }
.cn-trailer-x:hover { background: rgba(255, 255, 255, .3); }
.cn-noscroll { overflow: hidden; }

/* ---------------------------------------------------------------- legacy pages in the new skin */
body.cn-kids .cn-tile, body.cn-kids .cn-ep, body.cn-kids .cn-showhead { border-radius: var(--radius); }
.btn-cn { background: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
    .cn-navbtn-txt { display: none; }
    .cn-nav .cn-search { width: 150px; }
    .cn-nav .cn-search:focus { width: 200px; }
}
@media (max-width: 900px) {
    .cn-nav-inner { flex-wrap: wrap; gap: .5rem .8rem; }
    .cn-nav-links { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; gap: .4rem; padding-bottom: .1rem; }
    .cn-nav-links::-webkit-scrollbar { display: none; }
    .cn-nav-links a { padding: .3rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .07); font-size: .88rem; }
    .cn-nav-links a.active { background: rgba(var(--accent-rgb), .45); }
    .cn-aud button span { display: none; }
    .cn-hero-poster { display: none; }
    .cn-hero-inner { padding-top: 8.5rem; }
}
@media (max-width: 640px) {
    .cn-brand-name { display: none; }
    .cn-nav .cn-search { width: 118px; }
    .cn-nav .cn-search:focus { width: 160px; }
    .cn-hero-home { height: 76vh; min-height: 520px; }
    .cn-hero-home .cn-hero-inner { padding-bottom: 6.5rem; }
    .cn-dots { display: none; }
    .cn-home-overlap { margin-top: -4.5rem; }
    .cn-hero-shade {
        background:
            linear-gradient(0deg, rgba(var(--bg-rgb), .7) 0%, rgba(var(--bg-rgb), .78) 38%, rgba(var(--bg-rgb), .2) 70%, rgba(var(--bg-rgb), .1) 100%),
            linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 25%);
    }
    .cn-overview { font-size: .98rem; }
    .cn-hero-detail .cn-overview { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
    .cn-btn { padding: .65rem 1.15rem; font-size: .98rem; }
    .cn-actions { gap: .5rem; }
    .cn-epi { grid-template-columns: 130px 1fr; gap: .8rem; padding: .7rem .2rem; }
    .cn-epi-num { display: none; }
    .cn-epi-ov { -webkit-line-clamp: 2; font-size: .86rem; }
    .cn-epi-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .95rem; }
    .cn-epi-head { flex-direction: column; gap: .1rem; }
    .cn-grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem .6rem; }
    .cn-card-title { font-size: .84rem; }
    .cn-strip > * { flex-basis: 31vw; }
    .cn-strip-wide > * { flex-basis: 72vw; }
    .cn-cast > .cn-person { flex-basis: 96px; }
    .cn-person-img { width: 84px; height: 84px; }
}
/* TVs / very large screens: bigger everything (read from the couch). */
@media (min-width: 1700px) {
    body { font-size: 1.08rem; }
    .cn-hero-text { max-width: 760px; }
}
@media (prefers-reduced-motion: reduce) {
    .cn-hero-home .cn-slide.active .cn-hero-bg, .cn-hero-home .cn-slide.active .cn-hero-text { animation: none; }
    .cn-card-img, .cn-btn { transition: none; }
}

/* ---------------------------------------------------------------- not out yet / "Javi mi" */
.cn-notout { margin: .9rem 0 .2rem; padding: .7rem 1rem; border-radius: 12px; background: rgba(255, 196, 0, .12); border: 1px solid rgba(255, 196, 0, .35); color: #ffe08a; font-weight: 600; max-width: 46rem; }
.cn-notout.flash { animation: cn-notout-flash .9s ease 2; }
@keyframes cn-notout-flash { 50% { background: rgba(255, 196, 0, .32); transform: scale(1.015); } }
.cn-btn.cn-alert-on { background: rgba(255, 196, 0, .2) !important; color: #ffe08a !important; }
.cn-soon-block { margin: -.4rem 0 1.2rem; }
.cn-toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 20px); opacity: 0; transition: all .3s ease; z-index: 3000; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: center;
            max-width: min(92vw, 34rem); padding: .8rem 1.1rem; border-radius: 14px; background: rgba(20, 20, 28, .97); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); color: #fff; }
.cn-toast.show { transform: translate(-50%, 0); opacity: 1; }
