/* ============================================================
   cinegram theme — app.css
   01. Tokens          05. Rail / sidebar      09. Detail / player
   02. Reset & base    06. Buttons & pills     10. Episodes
   03. Layout shell    07. Cards & rows        11. Forms / misc
   04. Topbar          08. Home / landing      12. Responsive
   ============================================================ */

/* ---------- 01. Tokens ---------- */
:root {
    --ink-000: #07070d;
    --ink-050: #0a0a12;
    --ink-100: #11111c;
    --ink-150: #161624;
    --ink-200: #1c1c2e;
    --ink-300: #262640;
    --line: rgba(255, 255, 255, .08);
    --line-soft: rgba(255, 255, 255, .05);

    --txt: #eceaf5;
    --txt-dim: #9a98ad;
    --txt-faint: #6c6a80;

    --grape-300: #c9a4ff;
    --grape-400: #a974ff;
    --grape-500: #8a4dff;
    --grape-600: #6f33e6;
    --grape-glow: rgba(138, 77, 255, .42);

    --ok: #46d39a;
    --warn: #ffb454;
    --bad: #ff5d73;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-pill: 999px;

    --rail-w: 212px;
    --topbar-h: 64px;

    --shadow-card: 0 10px 30px rgba(0, 0, 0, .45);
    --shadow-pop: 0 16px 44px rgba(0, 0, 0, .55);

    --font-body: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-head: "Space Grotesk", "Plus Jakarta Sans", system-ui, sans-serif;

    --wrap: 1320px;
}

/* ---------- 02. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--txt);
    background: var(--ink-050);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0; }

::selection { background: var(--grape-500); color: #fff; }

:focus-visible { outline: 2px solid var(--grape-400); outline-offset: 2px; }

.cg-skip {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--grape-500); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.cg-skip:focus { left: 0; }

.cg-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.gone { display: none !important; }

/* thin custom scrollbars on rows */
.cg-row::-webkit-scrollbar, .cg-mirror-tabs::-webkit-scrollbar,
.cg-filter-line::-webkit-scrollbar { height: 0; }

/* ---------- 03. Layout shell ---------- */
.cg-main {
    margin-left: var(--rail-w);
    min-height: 100vh;
    padding-top: var(--topbar-h);
}

.cg-scrim {
    position: fixed; inset: 0; z-index: 78;
    background: rgba(4, 4, 10, .62);
    backdrop-filter: blur(2px);
    opacity: 0; transition: opacity .25s ease;
}
.cg-scrim.opened { opacity: 1; }

/* the index landing drops the rail for a centered marketing layout */
.cg-page-index .cg-rail { display: none; }
.cg-page-index .cg-main { margin-left: 0; }
.cg-page-index .cg-rail-trigger { display: none; }

/* ---------- 04. Topbar ---------- */
.cg-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 80;
    height: var(--topbar-h);
    background: rgba(10, 10, 18, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.cg-topbar-row {
    height: 100%;
    display: flex; align-items: center; gap: 16px;
    padding: 0 22px;
}

.cg-rail-trigger {
    display: none;
    flex-direction: column; gap: 4px;
    width: 40px; height: 40px; padding: 9px 8px;
    background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
}
.cg-rail-trigger span { height: 2px; background: var(--txt); border-radius: 2px; transition: .25s; }

.cg-brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.cg-brand-mark { height: 40px; width: auto; }

.cg-find {
    margin: 0 auto;
    position: relative;
    width: min(440px, 42vw);
    display: flex; align-items: center;
}
.cg-find-field {
    width: 100%;
    height: 40px;
    padding: 0 44px 0 16px;
    background: var(--ink-150);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    color: var(--txt); font-size: 14px;
    transition: border-color .2s, background .2s;
}
.cg-find-field::placeholder { color: var(--txt-faint); }
.cg-find-field:focus { outline: none; border-color: var(--grape-500); background: var(--ink-100); }
.cg-find-go {
    position: absolute; right: 5px;
    width: 32px; height: 32px;
    display: grid; place-items: center;
    background: var(--grape-500); color: #fff;
    border: none; border-radius: var(--r-pill);
    transition: background .2s;
}
.cg-find-go:hover { background: var(--grape-400); }

/* ---------- 05. Rail / sidebar ---------- */
.cg-rail {
    position: fixed; top: var(--topbar-h); bottom: 0; left: 0; z-index: 79;
    width: var(--rail-w);
    background: var(--ink-000);
    border-right: 1px solid var(--line);
    padding: 22px 14px 18px;
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.cg-rail-head {
    margin: 0 0 10px; padding: 0 10px;
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--txt-faint); font-weight: 700;
}
.cg-rail-nav { display: flex; flex-direction: column; gap: 3px; }
.cg-rail-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: var(--r-md);
    color: var(--txt-dim); font-weight: 600; font-size: 14px;
    border-left: 3px solid transparent;
    transition: background .18s, color .18s, border-color .18s;
}
.cg-rail-link svg { flex-shrink: 0; }
.cg-rail-link:hover { background: var(--ink-150); color: var(--txt); }
.cg-rail-link.is-current {
    background: linear-gradient(90deg, rgba(138, 77, 255, .18), transparent);
    color: #fff; border-left-color: var(--grape-500);
}
.cg-rail-foot { margin-top: auto; padding: 14px 10px 0; }
.cg-rail-tag {
    display: inline-block;
    font-size: 11px; color: var(--grape-300);
    background: rgba(138, 77, 255, .12);
    border: 1px solid rgba(138, 77, 255, .25);
    padding: 5px 10px; border-radius: var(--r-pill);
}

/* ---------- 06. Buttons & pills ---------- */
.cg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 20px;
    border: 1px solid transparent; border-radius: var(--r-pill);
    font-family: var(--font-head); font-weight: 600; font-size: 14px;
    transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
    white-space: nowrap;
}
.cg-btn:active { transform: translateY(1px); }
.cg-btn--play {
    background: var(--grape-500); color: #fff;
    box-shadow: 0 8px 22px var(--grape-glow);
}
.cg-btn--play:hover { background: var(--grape-400); }
.cg-btn--ghost {
    background: rgba(255, 255, 255, .04);
    border-color: var(--line);
    color: var(--txt);
}
.cg-btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }

.cg-pill {
    display: inline-flex; align-items: center;
    padding: 5px 13px; border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
    color: var(--txt-dim); font-size: 12.5px; font-weight: 600;
    transition: color .18s, border-color .18s, background .18s;
}
.cg-pill:hover { color: var(--grape-300); border-color: rgba(138, 77, 255, .4); background: rgba(138, 77, 255, .08); }

.cg-seeall {
    font-family: var(--font-head); font-size: 13px; font-weight: 600;
    color: var(--grape-300);
    transition: color .18s;
}
.cg-seeall:hover { color: var(--grape-400); }

/* ---------- 07. Cards & rows ---------- */
.cg-sec { padding: 4px 0 14px; }
.cg-sec-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 0 22px; margin: 18px 0 12px;
}
.cg-sec-title {
    font-size: 19px; letter-spacing: -.01em;
    position: relative; padding-left: 14px;
}
.cg-sec-title::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 4px; height: 20px; border-radius: 4px;
    background: linear-gradient(var(--grape-400), var(--grape-600));
}

.cg-rowwrap { position: relative; }
.cg-row {
    display: flex; gap: 14px;
    overflow-x: auto; scroll-behavior: smooth;
    padding: 4px 22px 6px;
    scrollbar-width: none;
}
.cg-row > .cg-tile { flex: 0 0 158px; }

.cg-row-nav {
    position: absolute; top: 0; bottom: 14px; z-index: 6;
    width: 46px;
    display: grid; place-items: center;
    background: rgba(7, 7, 13, .72);
    border: none; color: var(--txt);
    opacity: 0; transition: opacity .2s, background .2s;
}
.cg-rowwrap:hover .cg-row-nav { opacity: 1; }
.cg-row-nav:hover { background: rgba(7, 7, 13, .92); color: var(--grape-300); }
.cg-row-nav:disabled { opacity: 0 !important; pointer-events: none; }
.cg-row-nav--prev { left: 0; border-radius: 0 var(--r-md) var(--r-md) 0; }
.cg-row-nav--next { right: 0; border-radius: var(--r-md) 0 0 var(--r-md); }

/* tile */
.cg-tile { position: relative; }
.cg-tile-link { display: block; }
.cg-tile-art {
    position: relative; display: block;
    aspect-ratio: 2 / 3;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--ink-200);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-card);
}
.cg-tile-art img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease, filter .3s ease;
}
.cg-tile-link:hover .cg-tile-art img { transform: scale(1.07); filter: brightness(.6); }

.cg-tile-kind {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    font-size: 10px; font-weight: 700; letter-spacing: .03em;
    padding: 3px 8px; border-radius: var(--r-pill);
    background: rgba(10, 10, 18, .78); color: var(--txt);
    backdrop-filter: blur(4px);
}
.cg-tile-kind--tv { background: rgba(138, 77, 255, .85); color: #fff; }
.cg-tile-score {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: var(--r-pill);
    background: rgba(10, 10, 18, .78); color: var(--grape-300);
    backdrop-filter: blur(4px);
}
.cg-tile-score::before { content: "★ "; color: var(--grape-300); }
.cg-tile-ep {
    position: absolute; bottom: 8px; left: 8px; z-index: 2;
    font-size: 10.5px; font-weight: 700;
    padding: 3px 8px; border-radius: var(--r-pill);
    background: rgba(10, 10, 18, .82); color: var(--txt);
}
.cg-tile-hover {
    position: absolute; inset: 0; z-index: 1;
    display: grid; place-items: center;
    color: #fff; opacity: 0; transition: opacity .25s;
}
.cg-tile-hover svg {
    width: 52px; height: 52px; padding: 13px;
    background: var(--grape-500); border-radius: 50%;
    box-shadow: 0 8px 24px var(--grape-glow);
    transform: scale(.8); transition: transform .25s;
}
.cg-tile-link:hover .cg-tile-hover { opacity: 1; }
.cg-tile-link:hover .cg-tile-hover svg { transform: scale(1); }

.cg-tile-meta { padding: 9px 2px 2px; }
.cg-tile-name {
    display: block;
    font-size: 13.5px; font-weight: 600; color: var(--txt);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cg-tile-yr { display: block; font-size: 12px; color: var(--txt-faint); margin-top: 1px; }

/* grid */
.cg-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 16px;
    padding: 6px 0 8px;
}

/* ranked row (top 10) */
.cg-row--rank { padding-left: 38px; }
.cg-rank { position: relative; flex: 0 0 158px; display: block; }
.cg-rank-num {
    position: absolute; left: -30px; bottom: -6px; z-index: 1;
    font-family: var(--font-head); font-weight: 700;
    font-size: 88px; line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(138, 77, 255, .55);
    pointer-events: none;
}
.cg-rank-art {
    position: relative; z-index: 2; display: block;
    aspect-ratio: 2 / 3; border-radius: var(--r-md); overflow: hidden;
    background: var(--ink-200); border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-card);
}
.cg-rank-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cg-rank:hover .cg-rank-art img { transform: scale(1.07); }

/* blank / empty states */
.cg-blank {
    text-align: center; padding: 60px 22px;
    color: var(--txt-dim);
}
.cg-blank p { margin: 0 0 8px; }
.cg-blank-hint { color: var(--txt-faint); font-size: 13.5px; }
.cg-blank-acts { display: inline-flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

/* ---------- pagination (engine markup) ---------- */
.pagination { margin: 30px 0 10px; }
.pagination__list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.pagination__link {
    display: grid; place-items: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    background: var(--ink-150); border: 1px solid var(--line);
    border-radius: var(--r-sm); color: var(--txt-dim);
    font-weight: 600; font-size: 14px;
    transition: background .18s, color .18s, border-color .18s;
}
.pagination__link:hover { background: var(--ink-300); color: var(--txt); }
.pagination__link--active {
    background: var(--grape-500); border-color: var(--grape-500); color: #fff;
}
.pagination__ellipsis { display: grid; place-items: center; min-width: 30px; color: var(--txt-faint); }

/* ---------- 08. Home / landing ---------- */
.cg-feed { padding-bottom: 30px; }
.cg-h1row { padding: 8px 22px 2px; }
.cg-h1 { font-size: 22px; letter-spacing: -.01em; color: var(--txt); }

/* spotlight carousel */
.cg-spot { position: relative; }
.cg-spot-deck { position: relative; height: clamp(360px, 52vh, 560px); }
.cg-spot-slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .7s ease;
}
.cg-spot-slide.is-live { opacity: 1; visibility: visible; }
.cg-spot-bg { position: absolute; inset: 0; overflow: hidden; }
.cg-spot-bg img { width: 100%; height: 100%; object-fit: cover; }
.cg-spot-shade {
    position: absolute; inset: 0;
    background:
        linear-gradient(to top, var(--ink-050) 4%, rgba(10,10,18,.35) 46%, rgba(10,10,18,.15) 100%),
        linear-gradient(to right, rgba(10,10,18,.92) 0%, rgba(10,10,18,.45) 52%, transparent 100%);
}
.cg-spot-text {
    position: absolute; left: 0; bottom: 0;
    max-width: 640px;
    padding: 0 22px 46px;
    z-index: 2;
}
.cg-spot-flag {
    display: inline-block; margin-bottom: 12px;
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
    color: var(--grape-300);
    background: rgba(138, 77, 255, .12); border: 1px solid rgba(138, 77, 255, .28);
    padding: 5px 11px; border-radius: var(--r-pill);
}
.cg-spot-title { font-size: clamp(28px, 4vw, 46px); letter-spacing: -.02em; margin-bottom: 12px; }
.cg-spot-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    color: var(--txt-dim); font-size: 13.5px; font-weight: 600; margin-bottom: 14px;
}
.cg-spot-sc { display: inline-flex; align-items: center; gap: 4px; color: var(--grape-300); }
.cg-spot-g {
    padding: 2px 10px; border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font-size: 12px;
}
.cg-spot-desc {
    color: var(--txt-dim); font-size: 14.5px; line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cg-spot-acts { display: flex; flex-wrap: wrap; gap: 12px; }
.cg-spot-dots {
    position: absolute; right: 22px; bottom: 22px; z-index: 3;
    display: flex; gap: 8px;
}
.cg-spot-dot {
    width: 9px; height: 9px; padding: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .28); border: none;
    transition: background .2s, width .2s, border-radius .2s;
}
.cg-spot-dot.is-live { width: 26px; border-radius: var(--r-pill); background: var(--grape-400); }

/* landing (index) */
.cg-lp-hero {
    position: relative; overflow: hidden;
    text-align: center;
    padding: clamp(56px, 11vw, 120px) 20px clamp(40px, 6vw, 64px);
}
.cg-lp-hero-glow {
    position: absolute; top: -30%; left: 50%; transform: translateX(-50%);
    width: 760px; height: 760px; max-width: 130vw;
    background: radial-gradient(circle, var(--grape-glow), transparent 62%);
    opacity: .5; pointer-events: none;
}
.cg-lp-wrap { position: relative; max-width: 780px; margin: 0 auto; }
.cg-lp-kicker {
    display: inline-block; margin-bottom: 18px;
    font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
    color: var(--grape-300);
    background: rgba(138, 77, 255, .1); border: 1px solid rgba(138, 77, 255, .26);
    padding: 6px 14px; border-radius: var(--r-pill);
}
.cg-lp-h1 { font-size: clamp(30px, 5.4vw, 52px); letter-spacing: -.02em; margin-bottom: 16px; }
.cg-lp-sub { color: var(--txt-dim); font-size: clamp(15px, 2.2vw, 18px); max-width: 600px; margin: 0 auto 28px; }

.cg-lp-search {
    display: flex; align-items: center; gap: 8px;
    max-width: 560px; margin: 0 auto;
    background: var(--ink-150); border: 1px solid var(--line);
    border-radius: var(--r-pill); padding: 6px 6px 6px 16px;
    transition: border-color .2s;
}
.cg-lp-search:focus-within { border-color: var(--grape-500); }
.cg-lp-search-ico { color: var(--txt-faint); flex-shrink: 0; }
.cg-lp-search-field {
    flex: 1; min-width: 0;
    height: 42px; background: transparent; border: none; color: var(--txt); font-size: 15px;
}
.cg-lp-search-field::placeholder { color: var(--txt-faint); }
.cg-lp-search-field:focus { outline: none; }
.cg-lp-search-go {
    height: 42px; padding: 0 22px; flex-shrink: 0;
    background: var(--grape-500); color: #fff;
    border: none; border-radius: var(--r-pill);
    font-family: var(--font-head); font-weight: 600; font-size: 14px;
    transition: background .2s;
}
.cg-lp-search-go:hover { background: var(--grape-400); }

.cg-lp-quick {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    margin-top: 22px;
}
.cg-lp-quick a {
    font-size: 13px; font-weight: 600; color: var(--txt-dim);
    padding: 7px 14px; border-radius: var(--r-pill);
    border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
    transition: color .18s, border-color .18s;
}
.cg-lp-quick a:hover { color: var(--grape-300); border-color: rgba(138, 77, 255, .4); }

.cg-lp-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
    max-width: var(--wrap); margin: 0 auto; padding: 8px 22px 10px;
}
.cg-lp-stat {
    text-align: center; padding: 22px 12px;
    background: var(--ink-100); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.cg-lp-stat-n { display: block; font-family: var(--font-head); font-weight: 700; font-size: 26px; color: var(--grape-300); }
.cg-lp-stat-l { display: block; font-size: 12.5px; color: var(--txt-faint); margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }

.cg-lp-block { max-width: 900px; margin: 0 auto; padding: 38px 22px 0; }
.cg-lp-h2 { font-size: clamp(21px, 3vw, 27px); text-align: center; margin-bottom: 22px; letter-spacing: -.01em; }
.cg-lp-block-foot { text-align: center; margin-top: 16px; }
.cg-lp-block-foot a { color: var(--grape-300); font-weight: 600; font-size: 14px; }

.cg-lp-trend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cg-lp-trend-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px;
    background: var(--ink-100); border: 1px solid var(--line); border-radius: var(--r-md);
    transition: border-color .18s, transform .18s;
}
.cg-lp-trend-row:hover { border-color: rgba(138, 77, 255, .4); transform: translateX(3px); }
.cg-lp-trend-rank { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--grape-400); min-width: 24px; }
.cg-lp-trend-name { flex: 1; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-lp-trend-tags { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cg-lp-trend-kind { font-size: 11px; color: var(--txt-faint); text-transform: uppercase; letter-spacing: .05em; }
.cg-lp-trend-sc { font-size: 12px; color: var(--grape-300); font-weight: 700; }

.cg-lp-genres { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cg-lp-genre {
    padding: 9px 18px; border-radius: var(--r-pill);
    background: var(--ink-100); border: 1px solid var(--line);
    font-weight: 600; font-size: 14px; color: var(--txt-dim);
    transition: color .18s, border-color .18s, background .18s;
}
.cg-lp-genre:hover { color: #fff; background: rgba(138, 77, 255, .14); border-color: rgba(138, 77, 255, .45); }

.cg-lp-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cg-lp-card {
    padding: 24px;
    background: var(--ink-100); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.cg-lp-card-ico {
    display: inline-grid; place-items: center;
    width: 46px; height: 46px; margin-bottom: 14px;
    border-radius: var(--r-md);
    background: rgba(138, 77, 255, .14); color: var(--grape-300);
}
.cg-lp-card h3 { font-size: 17px; margin-bottom: 6px; }
.cg-lp-card p { color: var(--txt-dim); font-size: 14px; margin: 0; }

.cg-lp-faq { display: flex; flex-direction: column; gap: 10px; }
.cg-lp-faq-item {
    background: var(--ink-100); border: 1px solid var(--line); border-radius: var(--r-md);
    overflow: hidden;
}
.cg-lp-faq-q {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 16px 18px; cursor: pointer;
    font-family: var(--font-head); font-weight: 600; font-size: 15px;
    list-style: none;
}
.cg-lp-faq-q::-webkit-details-marker { display: none; }
.cg-lp-faq-mark { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.cg-lp-faq-mark::before, .cg-lp-faq-mark::after {
    content: ""; position: absolute; background: var(--grape-300); border-radius: 2px;
    transition: transform .25s;
}
.cg-lp-faq-mark::before { top: 6px; left: 0; width: 14px; height: 2px; }
.cg-lp-faq-mark::after { top: 0; left: 6px; width: 2px; height: 14px; }
.cg-lp-faq-item[open] .cg-lp-faq-mark::after { transform: rotate(90deg); opacity: 0; }
.cg-lp-faq-a { padding: 0 18px 16px; color: var(--txt-dim); font-size: 14px; }
.cg-lp-faq-a a { color: var(--grape-300); }

.cg-lp-prose { max-width: 760px; }
.cg-lp-prose p { color: var(--txt-dim); font-size: 14.5px; margin: 0 0 14px; }
.cg-lp-prose a { color: var(--grape-300); }

/* share row */
.cg-share { text-align: center; max-width: 640px; margin: 30px auto; padding: 22px 16px; }
.cg-share-title { font-family: var(--font-head); font-weight: 600; font-size: 16px; margin: 0 0 4px; }
.cg-share-desc { color: var(--txt-dim); font-size: 13px; margin: 0 0 14px; }
.cg-share-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cg-share-btn {
    padding: 8px 16px; border-radius: var(--r-pill);
    background: var(--ink-150); border: 1px solid var(--line);
    color: var(--txt-dim); font-size: 13px; font-weight: 600;
    transition: color .18s, border-color .18s, background .18s;
}
.cg-share-btn:hover { color: #fff; border-color: rgba(138, 77, 255, .45); background: rgba(138, 77, 255, .12); }

/* ---------- 09. Detail / player ---------- */
.cg-crumbs { padding: 14px 22px 0; }
.cg-crumbs-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.cg-crumbs-link { color: var(--txt-faint); transition: color .18s; }
.cg-crumbs-link:hover { color: var(--grape-300); }
.cg-crumbs-sep { color: var(--txt-faint); opacity: .6; }
.cg-crumbs-now { color: var(--txt-dim); font-weight: 600; }

.cg-hero { position: relative; }
.cg-hero-bg { position: absolute; inset: 0; overflow: hidden; height: 100%; }
.cg-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.cg-hero-veil {
    position: absolute; inset: 0;
    background:
        linear-gradient(to bottom, rgba(10,10,18,.4) 0%, rgba(10,10,18,.78) 60%, var(--ink-050) 100%),
        linear-gradient(to right, rgba(10,10,18,.7), rgba(10,10,18,.3));
}
.cg-hero-grid {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 260px 1fr; gap: 34px;
    max-width: var(--wrap); margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) 22px 30px;
}
.cg-hero-poster {
    border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-pop);
    border: 1px solid var(--line);
    align-self: start;
}
.cg-hero-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }

.cg-hero-flags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.cg-flag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px; border-radius: var(--r-pill);
    font-size: 12px; font-weight: 700;
}
.cg-flag--type { background: var(--grape-500); color: #fff; }
.cg-flag--tv { background: var(--grape-600); }
.cg-flag--score { background: rgba(10,10,18,.6); color: var(--grape-300); border: 1px solid var(--line); }
.cg-flag--status { background: rgba(70, 211, 154, .14); color: var(--ok); border: 1px solid rgba(70,211,154,.3); }

.cg-hero-title { font-size: clamp(26px, 4.4vw, 44px); letter-spacing: -.02em; margin-bottom: 6px; }
.cg-hero-alt { color: var(--txt-faint); font-size: 15px; margin: 0 0 14px; font-style: italic; }

.cg-hero-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.cg-fact {
    padding: 4px 12px; border-radius: var(--r-pill);
    background: rgba(255,255,255,.05); border: 1px solid var(--line);
    font-size: 12.5px; font-weight: 600; color: var(--txt-dim);
}
a.cg-fact:hover { color: var(--grape-300); border-color: rgba(138,77,255,.4); }

.cg-hero-genres { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.cg-hero-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.cg-synopsis { max-width: 720px; margin-bottom: 22px; }
.cg-synopsis p { color: var(--txt-dim); font-size: 15px; line-height: 1.7; margin: 0; }
.cg-readmore {
    display: inline-block; margin-top: 6px;
    background: none; border: none; padding: 0;
    color: var(--grape-300); font-weight: 600; font-size: 13.5px;
}

.cg-specs {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px;
    margin: 0 0 20px; max-width: 720px;
}
.cg-spec { margin: 0; }
.cg-spec dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--txt-faint); margin-bottom: 3px; }
.cg-spec dd { margin: 0; font-size: 14px; color: var(--txt); }
.cg-spec dd a { color: var(--txt); transition: color .18s; }
.cg-spec dd a:hover { color: var(--grape-300); }

.cg-cast { max-width: 720px; font-size: 14px; }
.cg-cast-cap { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--txt-faint); margin-bottom: 4px; }
.cg-cast-list a { color: var(--txt-dim); transition: color .18s; }
.cg-cast-list a:hover { color: var(--grape-300); }

/* player stage */
.cg-watch { max-width: var(--wrap); margin: 0 auto; padding: 10px 22px 8px; }
.cg-watch.is-folded { display: none; }
.cg-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--r-lg); overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
}
.cg-stage-poster { position: absolute; inset: 0; cursor: pointer; }
.cg-stage-poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.6); }
.cg-stage-go {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 78px; height: 78px;
    display: grid; place-items: center;
    background: var(--grape-500); color: #fff;
    border: none; border-radius: 50%;
    box-shadow: 0 10px 30px var(--grape-glow);
    transition: transform .2s, background .2s;
}
.cg-stage-go svg { margin-left: 4px; }
.cg-stage-go:hover { transform: translate(-50%, -50%) scale(1.08); background: var(--grape-400); }
.cg-stage-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cg-stage-loading {
    position: absolute; inset: 0; z-index: 4;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: rgba(7,7,13,.86); color: var(--txt-dim); font-size: 14px;
}
.cg-spin {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,.12); border-top-color: var(--grape-400);
    animation: cg-spin .8s linear infinite;
}
@keyframes cg-spin { to { transform: rotate(360deg); } }
.cg-player-gate { position: absolute; inset: 0; z-index: 10; display: block; }

/* mirrors */
.cg-mirrors { margin-top: 16px; }
.cg-mirrors-hint {
    display: flex; align-items: center; gap: 7px;
    color: var(--txt-faint); font-size: 13px; margin: 0 0 10px;
}
.cg-mirror-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cg-mirror {
    padding: 9px 16px; border-radius: var(--r-sm);
    background: var(--ink-150); border: 1px solid var(--line);
    color: var(--txt-dim); font-weight: 600; font-size: 13px;
    transition: background .18s, color .18s, border-color .18s;
}
.cg-mirror:hover { background: var(--ink-300); color: var(--txt); }
.cg-mirror.is-current { background: var(--grape-500); border-color: var(--grape-500); color: #fff; }

/* episode nav under player */
.cg-epnav {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 16px; padding: 12px 16px;
    background: var(--ink-100); border: 1px solid var(--line); border-radius: var(--r-md);
}
.cg-epnav-btn {
    padding: 8px 14px; border-radius: var(--r-sm);
    background: var(--ink-200); border: 1px solid var(--line);
    color: var(--txt); font-weight: 600; font-size: 13px;
    transition: background .18s;
}
.cg-epnav-btn:hover:not(:disabled) { background: var(--grape-500); border-color: var(--grape-500); color: #fff; }
.cg-epnav-btn:disabled { opacity: .4; cursor: not-allowed; }
.cg-epnav-now { font-size: 13px; color: var(--txt-dim); text-align: center; flex: 1; font-weight: 600; }

/* report */
.cg-report { margin-top: 16px; }
.cg-report-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: var(--r-sm);
    background: transparent; border: 1px solid var(--line);
    color: var(--txt-faint); font-size: 13px; font-weight: 600;
    transition: color .18s, border-color .18s;
}
.cg-report-toggle:hover { color: var(--bad); border-color: rgba(255,93,115,.4); }
.cg-report-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: flex-start; }
.cg-report-form select, .cg-report-form textarea {
    background: var(--ink-150); border: 1px solid var(--line); border-radius: var(--r-sm);
    color: var(--txt); padding: 10px 12px; font-family: inherit; font-size: 13.5px;
}
.cg-report-form select { min-width: 200px; height: 42px; }
.cg-report-form textarea { flex: 1; min-width: 220px; resize: vertical; }
.cg-report-send {
    height: 42px; padding: 0 18px; border-radius: var(--r-sm);
    background: var(--grape-500); color: #fff; border: none; font-weight: 600; font-size: 13.5px;
    transition: background .2s;
}
.cg-report-send:hover { background: var(--grape-400); }

/* ---------- 10. Episodes ---------- */
.cg-eps { max-width: var(--wrap); margin: 0 auto; }
.cg-eps-inner { padding: 24px 22px 6px; }
.cg-eps-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
    margin-bottom: 16px;
}
.cg-eps-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.cg-season-pick {
    height: 42px; padding: 0 14px;
    background: var(--ink-150); border: 1px solid var(--line); border-radius: var(--r-sm);
    color: var(--txt); font-family: inherit; font-weight: 600; font-size: 13.5px;
}
.cg-eps-find { position: relative; display: flex; align-items: center; }
.cg-eps-find svg { position: absolute; left: 12px; color: var(--txt-faint); pointer-events: none; }
.cg-eps-find input {
    height: 42px; padding: 0 14px 0 36px; width: 220px;
    background: var(--ink-150); border: 1px solid var(--line); border-radius: var(--r-sm);
    color: var(--txt); font-size: 13.5px;
}
.cg-eps-find input:focus { outline: none; border-color: var(--grape-500); }

.cg-ep-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cg-ep {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
    padding: 12px 14px;
    background: var(--ink-100); border: 1px solid var(--line); border-radius: var(--r-md);
    color: var(--txt);
    transition: border-color .18s, background .18s, transform .18s;
}
button.cg-ep { cursor: pointer; }
.cg-ep-item:hover { border-color: rgba(138,77,255,.5); background: var(--ink-150); transform: translateY(-1px); }
.cg-ep.episode-active, .cg-ep.is-playing { border-color: var(--grape-500); background: rgba(138,77,255,.12); }
.cg-ep-n {
    flex-shrink: 0; width: 34px; height: 34px;
    display: grid; place-items: center; border-radius: var(--r-sm);
    background: var(--ink-300); color: var(--grape-300);
    font-family: var(--font-head); font-weight: 700; font-size: 14px;
}
.cg-ep-info { flex: 1; min-width: 0; }
.cg-ep-title { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-ep-rt { display: block; font-size: 12px; color: var(--txt-faint); margin-top: 1px; }
.cg-ep-go-ico { flex-shrink: 0; color: var(--txt-faint); }
.cg-ep-item:hover .cg-ep-go-ico { color: var(--grape-400); }
.cg-ep-soon { opacity: .6; }
.cg-ep-soon-tag { display: block; font-size: 12px; color: var(--warn); margin-top: 1px; }
.cg-eps-empty { color: var(--txt-faint); padding: 14px; }

/* ---------- 11. Forms / misc ---------- */
.cg-list { max-width: var(--wrap); margin: 0 auto; }
.cg-list-inner { padding: 18px 22px 30px; }
.cg-list-head { margin: 6px 0 18px; }
.cg-list-title { font-size: clamp(22px, 3.4vw, 32px); letter-spacing: -.01em; }
.cg-list-sub { color: var(--txt-dim); font-size: 14.5px; margin: 6px 0 0; }

/* filter chips */
.cg-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.cg-filter-line {
    display: flex; align-items: center; gap: 8px;
    overflow-x: auto; padding-bottom: 4px; scrollbar-width: none;
}
.cg-filter-cap {
    flex-shrink: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--txt-faint); font-weight: 700; padding-right: 4px; min-width: 46px;
}
.cg-chip {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 15px; border-radius: var(--r-pill);
    background: var(--ink-150); border: 1px solid var(--line);
    color: var(--txt-dim); font-size: 13px; font-weight: 600;
    transition: background .18s, color .18s, border-color .18s;
    white-space: nowrap;
}
.cg-chip:hover { color: var(--txt); background: var(--ink-300); }
.cg-chip.is-current { background: var(--grape-500); border-color: var(--grape-500); color: #fff; }
.cg-overflow { position: relative; flex-shrink: 0; }
.cg-overflow > summary { list-style: none; }
.cg-overflow > summary::-webkit-details-marker { display: none; }
.cg-overflow-pop {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
    min-width: 170px; max-height: 280px; overflow-y: auto;
    padding: 6px; border-radius: var(--r-md);
    background: var(--ink-150); border: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
}
.cg-overflow-item {
    padding: 8px 10px; border-radius: var(--r-sm);
    font-size: 13px; font-weight: 600; color: var(--txt-dim);
    transition: background .15s, color .15s;
}
.cg-overflow-item:hover { background: var(--ink-300); color: var(--txt); }
.cg-overflow-item.is-current { background: var(--grape-500); color: #fff; }

.cg-genre-cloud {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line);
}
.cg-genre-cloud-cap { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--txt-faint); font-weight: 700; }

/* search */
.cg-search-empty { text-align: center; padding: 50px 16px; color: var(--txt-faint); }
.cg-search-empty .cg-list-title { margin: 14px 0 4px; }
.cg-search-empty .cg-list-sub { margin-bottom: 24px; }
.cg-search-form { max-width: 620px; margin: 0 auto; }
.cg-search-bar { margin-bottom: 22px; }
.cg-search-bar .cg-search-form { margin: 0; }
.cg-search-field-wrap {
    position: relative; display: flex; align-items: center;
    background: var(--ink-150); border: 1px solid var(--line); border-radius: var(--r-pill);
    padding-left: 16px;
}
.cg-search-field-wrap:focus-within { border-color: var(--grape-500); }
.cg-search-field-wrap svg { color: var(--txt-faint); flex-shrink: 0; }
.cg-search-field-wrap input {
    flex: 1; height: 48px; background: transparent; border: none; color: var(--txt);
    font-size: 15px; padding: 0 16px;
}
.cg-search-field-wrap input:focus { outline: none; }
.cg-search-types { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.cg-search-types--auto { justify-content: flex-start; }
.cg-search-type {
    padding: 7px 16px; border-radius: var(--r-pill);
    background: var(--ink-150); border: 1px solid var(--line);
    font-size: 13px; font-weight: 600; color: var(--txt-dim); cursor: pointer;
    transition: color .18s, border-color .18s, background .18s;
}
.cg-search-type:hover { color: var(--txt); }
.cg-search-type.is-current { background: var(--grape-500); border-color: var(--grape-500); color: #fff; }
.cg-search-type input { position: absolute; opacity: 0; width: 0; height: 0; }
.cg-search-count { color: var(--txt-dim); font-size: 14px; margin-top: 14px; }
.cg-search-count strong { color: var(--txt); }

/* request form */
.cg-req { display: grid; grid-template-columns: 320px 1fr; gap: 28px; padding-top: 10px; }
.cg-req-side {
    padding: 28px; border-radius: var(--r-lg);
    background: linear-gradient(160deg, rgba(138,77,255,.14), var(--ink-100));
    border: 1px solid var(--line);
    align-self: start;
}
.cg-req-ico {
    display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px;
    border-radius: var(--r-md); background: rgba(138,77,255,.18); color: var(--grape-300);
}
.cg-req-title { font-size: 22px; margin-bottom: 8px; }
.cg-req-lead { color: var(--txt-dim); font-size: 14px; margin: 0 0 18px; }
.cg-req-steps { margin: 0 0 16px; padding-left: 18px; color: var(--txt-dim); font-size: 14px; }
.cg-req-steps li { margin-bottom: 8px; }
.cg-req-fine { color: var(--txt-faint); font-size: 13px; margin: 0; }

.cg-req-main {
    padding: 26px; border-radius: var(--r-lg);
    background: var(--ink-100); border: 1px solid var(--line);
}
.cg-req-form { display: flex; flex-direction: column; gap: 16px; }
.cg-req-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cg-field { display: flex; flex-direction: column; gap: 6px; }
.cg-field label { font-size: 13px; font-weight: 600; color: var(--txt-dim); }
.cg-req-star { color: var(--bad); }
.cg-req-opt { color: var(--txt-faint); font-weight: 500; font-size: 12px; }
.cg-field input, .cg-field select, .cg-field textarea {
    background: var(--ink-150); border: 1px solid var(--line); border-radius: var(--r-sm);
    color: var(--txt); padding: 11px 13px; font-family: inherit; font-size: 14px;
}
.cg-field input:focus, .cg-field select:focus, .cg-field textarea:focus { outline: none; border-color: var(--grape-500); }
.cg-field textarea { resize: vertical; }
.cg-req-links { display: flex; gap: 14px; margin-top: 4px; }
.cg-req-links a { font-size: 12.5px; color: var(--grape-300); }
.cg-req-submit { align-self: flex-start; margin-top: 4px; }

.cg-alert {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; border-radius: var(--r-md); margin-bottom: 18px; font-size: 14px;
}
.cg-alert--ok { background: rgba(70,211,154,.12); border: 1px solid rgba(70,211,154,.3); color: var(--ok); }
.cg-alert--err { background: rgba(255,93,115,.12); border: 1px solid rgba(255,93,115,.3); color: var(--bad); }

/* 404 */
.cg-404 { display: grid; place-items: center; min-height: 64vh; padding: 40px 22px; text-align: center; }
.cg-404-inner { max-width: 540px; }
.cg-404-code {
    font-family: var(--font-head); font-weight: 700; font-size: clamp(80px, 16vw, 150px);
    line-height: 1; margin: 0;
    background: linear-gradient(120deg, var(--grape-400), var(--grape-600));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.cg-404-title { font-size: clamp(22px, 4vw, 30px); margin: 8px 0 10px; }
.cg-404-text { color: var(--txt-dim); font-size: 15px; margin: 0 0 22px; }
.cg-404-search { margin-bottom: 22px; }
.cg-404-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* trailer modal */
.cg-trailer-modal {
    position: fixed; inset: 0; z-index: 1200;
    display: none; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(4,4,10,.86); backdrop-filter: blur(6px);
}
.cg-trailer-modal.opened { display: flex; }
.cg-trailer-card { position: relative; width: min(960px, 100%); }
.cg-trailer-frame { position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-pop); }
.cg-trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cg-trailer-close {
    position: absolute; top: -44px; right: 0;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.1); border: 1px solid var(--line); color: #fff;
    font-size: 22px; line-height: 1; display: grid; place-items: center;
    transition: background .2s;
}
.cg-trailer-close:hover { background: var(--bad); border-color: var(--bad); }

/* notification bar */
.cg-notice {
    position: relative; z-index: 90;
    background: linear-gradient(90deg, var(--grape-600), var(--grape-500));
    color: #fff;
}
.cg-notice-inner {
    display: flex; align-items: center; gap: 10px;
    max-width: var(--wrap); margin: 0 auto; padding: 9px 22px;
    font-size: 13.5px;
}
.cg-notice-spark { display: inline-flex; flex-shrink: 0; }
.cg-notice-text { flex: 1; font-weight: 600; }
.cg-notice-act {
    flex-shrink: 0; padding: 5px 12px; border-radius: var(--r-pill);
    background: rgba(255,255,255,.18); border: none; color: #fff;
    font-size: 12.5px; font-weight: 700; transition: background .2s;
}
.cg-notice-act:hover { background: rgba(255,255,255,.3); }
.cg-notice-x { background: none; border: none; color: rgba(255,255,255,.85); display: inline-flex; padding: 4px; }
.cg-notice-x:hover { color: #fff; }
.cg-notice-dialog {
    border: none; border-radius: var(--r-lg); padding: 0; max-width: 440px; width: 92%;
    background: var(--ink-100); color: var(--txt); box-shadow: var(--shadow-pop);
}
.cg-notice-dialog::backdrop { background: rgba(4,4,10,.7); backdrop-filter: blur(4px); }
.cg-notice-dialog-card { padding: 22px; }
.cg-notice-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cg-notice-dialog-head h3 { font-size: 17px; }
.cg-notice-dialog-head button { background: none; border: none; color: var(--txt-faint); display: inline-flex; }
.cg-notice-dialog-body { color: var(--txt-dim); font-size: 14px; margin: 0 0 14px; }
.cg-notice-dialog-link { color: var(--grape-300); font-weight: 600; font-size: 14px; }

/* join (telegram) popup */
.cg-join {
    position: fixed; right: 20px; bottom: 20px; z-index: 1100;
    width: 300px; max-width: calc(100vw - 40px);
    padding: 18px 18px 16px;
    background: var(--ink-100); border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-pop);
    transform: translateY(140%); opacity: 0;
    transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s;
}
.cg-join.is-up { transform: translateY(0); opacity: 1; }
.cg-join-x { position: absolute; top: 10px; right: 10px; background: none; border: none; color: var(--txt-faint); display: inline-flex; }
.cg-join-x:hover { color: var(--txt); }
.cg-join-ico {
    display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 10px;
    border-radius: var(--r-md); background: rgba(138,77,255,.16); color: var(--grape-300);
}
.cg-join-title { font-family: var(--font-head); font-weight: 600; font-size: 15px; margin: 0 0 4px; }
.cg-join-text { color: var(--txt-dim); font-size: 13px; margin: 0 0 14px; }
.cg-join-go {
    display: block; text-align: center;
    padding: 10px; border-radius: var(--r-sm);
    background: var(--grape-500); color: #fff; font-weight: 700; font-size: 13.5px;
    transition: background .2s;
}
.cg-join-go:hover { background: var(--grape-400); }

/* ad slot */
.cg-adslot { text-align: center; margin: 16px auto; padding: 0 22px; max-width: var(--wrap); }

/* footer */
.cg-foot { border-top: 1px solid var(--line); margin-top: 30px; background: var(--ink-000); }
.cg-foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 32px 22px; }
.cg-foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.cg-foot-brand img { height: 38px; width: auto; }
.cg-foot-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.cg-foot-nav a { color: var(--txt-dim); font-size: 14px; font-weight: 600; transition: color .18s; }
.cg-foot-nav a:hover { color: var(--grape-300); }
.cg-foot-note { color: var(--txt-faint); font-size: 12.5px; line-height: 1.7; max-width: 880px; margin: 0 0 12px; }
.cg-foot-copy { color: var(--txt-faint); font-size: 12.5px; margin: 0; }

/* ---------- 12. Responsive ---------- */

/* wide desktop — denser grid */
@media (min-width: 1500px) {
    .cg-grid { grid-template-columns: repeat(7, 1fr); }
}

/* laptop */
@media (max-width: 1180px) {
    .cg-grid { grid-template-columns: repeat(5, 1fr); }
}

/* small laptop / large tablet */
@media (max-width: 1000px) {
    .cg-grid { grid-template-columns: repeat(4, 1fr); }
    .cg-hero-grid { grid-template-columns: 200px 1fr; gap: 24px; }
}

/* tablet — rail becomes an off-canvas drawer */
@media (max-width: 860px) {
    :root { --rail-w: 0px; }
    .cg-main { margin-left: 0; }
    .cg-rail-trigger { display: flex; }
    .cg-rail {
        transform: translateX(-100%);
        transition: transform .3s ease;
        width: 256px;
        box-shadow: var(--shadow-pop);
    }
    .cg-rail.opened { transform: translateX(0); }
    .cg-page-index .cg-rail-trigger { display: none; }

    .cg-find { width: auto; flex: 1; }
    .cg-req { grid-template-columns: 1fr; }
    .cg-lp-cards { grid-template-columns: 1fr; }
    .cg-lp-trend { grid-template-columns: 1fr; }
}

/* phones */
@media (max-width: 640px) {
    body { font-size: 14px; }
    .cg-topbar-row { padding: 0 14px; gap: 10px; }
    .cg-brand-mark { height: 34px; }
    .cg-find-field { height: 38px; }

    .cg-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
    .cg-row > .cg-tile, .cg-rank { flex-basis: 128px; }
    .cg-row, .cg-sec-head, .cg-h1row, .cg-list-inner, .cg-eps-inner,
    .cg-watch, .cg-crumbs, .cg-adslot { padding-left: 14px; padding-right: 14px; }
    .cg-hero-grid { padding-left: 14px; padding-right: 14px; }

    .cg-row-nav { display: none; }

    .cg-hero-grid { grid-template-columns: 1fr; gap: 18px; }
    .cg-hero-poster { width: 150px; }
    .cg-hero-acts .cg-btn { flex: 1; }

    .cg-ep-list { grid-template-columns: 1fr; }
    .cg-lp-stats { grid-template-columns: repeat(2, 1fr); }
    .cg-eps-find input { width: 100%; }
    .cg-eps-tools { width: 100%; }
    .cg-eps-find { flex: 1; }

    .cg-spot-deck { height: 64vh; min-height: 380px; }
    .cg-spot-text { padding-bottom: 56px; }

    .cg-req-row { grid-template-columns: 1fr; }
    .cg-overflow-pop { grid-template-columns: 1fr; }

    .cg-join { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

/* very small phones */
@media (max-width: 380px) {
    .cg-grid { grid-template-columns: repeat(2, 1fr); }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .cg-spot-slide { transition: none; }
}
