/* ==========================================================================
   演员百科 Cast Atlas
   石墨灰 #242a31 / 钴蓝 #2f5fd0 / 白 #ffffff / 浅灰底 #f3f5f7
   资料库气质: REF 编号、表格化演员表、首字圆人物 chip; 手机单列、桌面三栏
   断点: base(360) / 375 / 768 / 1100
   ========================================================================== */

:root {
    --ct-bg: #f3f5f7;
    --ct-card: #ffffff;
    --ct-line: #dde3e9;
    --ct-text: #24292f;
    --ct-mute: #66707b;
    --ct-graphite: #242a31;
    --ct-graphite2: #2f3640;
    --ct-cobalt: #2f5fd0;
    --ct-cobalt-dim: #24479e;
    --ct-cobalt-soft: #e8eefb;
    --ct-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --ct-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --ct-radius: 10px;
    --ct-maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--ct-bg);
    color: var(--ct-text);
    font-family: var(--ct-sans);
    font-size: 16px;
    line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ct-cobalt); text-decoration: none; }
a:hover { color: var(--ct-cobalt-dim); text-decoration: underline; }
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--ct-cobalt);
    outline-offset: 2px;
}
.sr-only {
    position: absolute; width: 1px; height: 1px;
    clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.ct-main { max-width: var(--ct-maxw); margin: 0 auto; padding: 0 16px 48px; }

/* ---------- 通用 ---------- */
.ct-ref, .ct-card__ref, .ct-drama__ref, .ct-404__ref {
    font-family: var(--ct-mono); font-size: 12px; letter-spacing: .06em;
    color: var(--ct-cobalt-dim);
}
.ct-btn {
    display: inline-block; padding: 12px 24px; border-radius: var(--ct-radius);
    font-size: 15.5px; font-weight: 600; border: 2px solid var(--ct-cobalt);
    transition: background .15s, color .15s;
}
.ct-btn--solid { background: var(--ct-cobalt); color: #fff; }
.ct-btn--solid:hover { background: var(--ct-cobalt-dim); border-color: var(--ct-cobalt-dim); color: #fff; text-decoration: none; }
.ct-btn--ghost { color: var(--ct-cobalt); }
.ct-btn--ghost:hover { background: var(--ct-cobalt-soft); text-decoration: none; }
.ct-inline { font-weight: 600; }

.ct-block { margin-bottom: 30px; }
.ct-h2 { font-size: 20px; margin: 0 0 14px; }
.ct-h2sub { font-size: 13.5px; color: var(--ct-mute); font-weight: 400; margin-left: 8px; }

/* ---------- 顶栏(深石墨) ---------- */
.ct-top { background: var(--ct-graphite); }
.ct-top__bar {
    max-width: var(--ct-maxw); margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; gap: 18px; min-height: 60px; flex-wrap: wrap;
}
.ct-logo { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .02em; }
.ct-logo::before { content: "◈ "; color: var(--ct-cobalt); }
.ct-logo:hover { color: #fff; text-decoration: none; }
.ct-top__nav { margin-left: auto; }
.ct-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.ct-menu a { font-size: 15px; color: #c8cfd8; padding: 6px 2px; }
.ct-menu a:hover { color: #fff; }

/* ---------- 搜索 ---------- */
.ct-searchform { display: flex; }
.ct-searchform input {
    background: var(--ct-graphite2); border: 1px solid #3c4550; border-right: 0;
    border-radius: var(--ct-radius) 0 0 var(--ct-radius);
    color: #fff; padding: 8px 12px; font-size: 14.5px; width: 160px;
}
.ct-searchform input::placeholder { color: #8b95a1; }
.ct-searchform button {
    background: var(--ct-cobalt); border: 1px solid var(--ct-cobalt); color: #fff;
    border-radius: 0 var(--ct-radius) var(--ct-radius) 0; padding: 8px 14px;
    font-size: 14.5px; cursor: pointer;
}
.ct-searchform button:hover { background: var(--ct-cobalt-dim); }
.ct-searchform--page { margin-top: 14px; }
.ct-searchform--page input { width: min(340px, 62vw); padding: 11px 14px; background: #fff; border-color: var(--ct-line); color: var(--ct-text); }
.ct-searchform--page button { padding: 11px 18px; }

/* ---------- 首页宣言与统计 ---------- */
.ct-mast {
    background: var(--ct-graphite); color: #e7ebf0;
    margin: 0 -16px; padding: 46px 16px 40px; text-align: center;
}
.ct-mast__inner { max-width: 760px; margin: 0 auto; }
.ct-mast__kicker {
    font-family: var(--ct-mono); font-size: 13px; letter-spacing: .28em;
    color: var(--ct-cobalt); margin: 0 0 10px;
}
.ct-mast__title { font-size: 30px; margin: 0 0 12px; color: #fff; }
.ct-mast__text { color: #aab4c0; max-width: 560px; margin: 0 auto 26px; font-size: 15.5px; }
.ct-stats {
    display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 0;
}
.ct-stats__item {
    background: var(--ct-graphite2); border: 1px solid #3c4550; border-radius: var(--ct-radius);
    padding: 14px 26px; min-width: 130px;
}
.ct-stats__item dt { font-size: 13px; color: #8b95a1; margin-bottom: 4px; }
.ct-stats__item dd { margin: 0; font-size: 24px; font-weight: 800; color: #fff; font-family: var(--ct-mono); }

.ct-sect { padding: 30px 0 6px; }
.ct-sect__head { margin-bottom: 16px; }
.ct-sect__title { font-size: 21px; margin: 0 0 4px; }
.ct-sect__note { color: var(--ct-mute); font-size: 14.5px; margin: 0; }
.ct-textlink { display: inline-block; margin-top: 16px; font-size: 15px; font-weight: 600; }
.ct-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ---------- 档案卡 ---------- */
.ct-card__link {
    position: relative; display: block; background: var(--ct-card);
    border: 1px solid var(--ct-line); border-radius: var(--ct-radius); overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.ct-card__link:hover { border-color: var(--ct-cobalt); box-shadow: 0 6px 18px rgba(47, 95, 208, .12); text-decoration: none; }
.ct-card__ref {
    position: absolute; top: 10px; left: 10px; z-index: 2;
    background: rgba(255, 255, 255, .94); border: 1px solid var(--ct-line);
    border-radius: 6px; padding: 2px 8px;
}
.ct-card__posterwrap { display: block; }
.ct-card__posterwrap img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.ct-card__title { font-size: 16.5px; margin: 12px 14px 6px; color: var(--ct-text); }
.ct-card__meta { display: block; margin: 0 14px 14px; font-size: 13.5px; color: var(--ct-mute); }

/* ---------- 人物 chip ---------- */
.ct-persons { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ct-person {
    display: flex; align-items: center; gap: 12px;
    background: var(--ct-card); border: 1px solid var(--ct-line);
    border-radius: var(--ct-radius); padding: 12px 16px;
    transition: border-color .15s;
}
.ct-person:hover { border-color: var(--ct-cobalt); text-decoration: none; }
.ct-person__initial {
    flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%;
    background: var(--ct-cobalt); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; font-weight: 700;
}
.ct-person__name { font-size: 16px; font-weight: 700; color: var(--ct-text); }
.ct-person__count { margin-left: auto; font-size: 13px; color: var(--ct-mute); font-family: var(--ct-mono); white-space: nowrap; }

/* ---------- 面包屑 / chips / 分页 ---------- */
.ct-crumbs { font-size: 13.5px; margin-bottom: 18px; }
.ct-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ct-crumbs li { color: var(--ct-mute); }
.ct-crumbs li + li::before { content: "/ "; color: var(--ct-line); margin-right: 6px; }
.ct-crumbs a { color: var(--ct-cobalt); }

.ct-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ct-chip {
    display: inline-block; padding: 8px 18px; font-size: 14.5px;
    background: var(--ct-card); border: 1.5px solid var(--ct-line); border-radius: 999px;
    color: var(--ct-text);
}
.ct-chip:hover { border-color: var(--ct-cobalt); color: var(--ct-cobalt-dim); text-decoration: none; }

.ct-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.ct-pagination .page-numbers {
    min-width: 40px; text-align: center; padding: 8px 12px; font-size: 15px;
    background: var(--ct-card); border: 1.5px solid var(--ct-line); border-radius: 8px; color: var(--ct-text);
}
.ct-pagination .page-numbers.current { background: var(--ct-cobalt); border-color: var(--ct-cobalt); color: #fff; }
.ct-pagination a.page-numbers:hover { border-color: var(--ct-cobalt); text-decoration: none; }

/* ---------- 详情页 ---------- */
.ct-drama { padding-top: 18px; }
.ct-drama__head { margin-bottom: 18px; }
.ct-drama__ref { display: inline-block; border: 1px solid var(--ct-cobalt); border-radius: 6px; padding: 2px 10px; margin-bottom: 8px; }
.ct-drama__title { font-size: 28px; margin: 0 0 4px; }
.ct-drama__original { color: var(--ct-mute); font-size: 14px; margin: 0; }

.ct-drama__main { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 30px; }
.ct-drama__poster { max-width: 320px; margin: 0 auto; }
.ct-drama__poster img { border-radius: var(--ct-radius); border: 1px solid var(--ct-line); width: 100%; }
.ct-drama__tagline { color: var(--ct-cobalt-dim); font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.ct-drama__excerpt { margin: 0 0 16px; }

.ct-facts { margin: 0 0 20px; border-top: 1px solid var(--ct-line); }
.ct-facts__row {
    display: flex; gap: 14px; padding: 9px 0;
    border-bottom: 1px solid var(--ct-line); font-size: 15px;
}
.ct-facts__row dt { color: var(--ct-mute); flex: 0 0 84px; }
.ct-facts__row dd { margin: 0; }

.ct-synopsis { font-size: 16px; background: var(--ct-card); border: 1px solid var(--ct-line); border-radius: var(--ct-radius); padding: 18px 20px; }
.ct-synopsis p { margin: 0 0 12px; }
.ct-synopsis p:last-child { margin-bottom: 0; }

/* ---------- 演员表(资料库表格) ---------- */
.ct-cast {
    width: 100%; border-collapse: collapse; background: var(--ct-card);
    border: 1px solid var(--ct-line); border-radius: var(--ct-radius); overflow: hidden;
    font-size: 15px;
}
.ct-cast th, .ct-cast td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--ct-line); }
.ct-cast thead th {
    background: var(--ct-cobalt-soft); color: var(--ct-cobalt-dim);
    font-size: 13.5px; letter-spacing: .04em;
}
.ct-cast tbody tr:last-child td { border-bottom: 0; }
.ct-cast tbody tr:hover { background: #f7f9fd; }
.ct-cast__name { font-weight: 700; }
.ct-cast__name a { color: var(--ct-cobalt); }
.ct-cast__role { color: var(--ct-mute); }
.ct-cast__ref { font-size: 13.5px; }
.ct-cast__ref--none { color: var(--ct-mute); }

/* ---------- 选集(rows) ---------- */
.ct-eplist.ct-eplist--rows, .ct-eplist--rows { list-style: none; margin: 0; padding: 0; }
.ct-eplist--rows .ct-eplist__item a {
    display: flex; align-items: baseline; gap: 12px;
    background: var(--ct-card); border: 1px solid var(--ct-line); border-radius: 8px;
    padding: 11px 16px; margin-bottom: 8px; color: var(--ct-text); font-size: 15px;
}
.ct-eplist--rows .ct-eplist__item a:hover { border-color: var(--ct-cobalt); text-decoration: none; }
.ct-eplist--rows .ct-eplist__num {
    font-family: var(--ct-mono); font-weight: 700; color: var(--ct-cobalt-dim); flex: 0 0 34px;
}
.ct-eplist--rows .ct-eplist__name { font-weight: 600; }
.ct-eplist--rows .ct-eplist__meta { margin-left: auto; color: var(--ct-mute); font-size: 13px; white-space: nowrap; }
.ct-eplist--rows .ct-eplist__item.is-current a {
    background: var(--ct-cobalt-soft); border-color: var(--ct-cobalt);
}
.ct-empty { color: var(--ct-mute); font-size: 14.5px; }

/* ---------- 单集观看页 ---------- */
.ct-watch { padding-top: 18px; }
.ct-watch__stage { margin: 0 -16px 20px; }
.ct-player { position: relative; background: #000; }
.ct-player video, .ct-player iframe { width: 100%; aspect-ratio: 16/9; display: block; height: auto; }
.ct-player--pending img { width: 100%; opacity: .5; }
.ct-player__notice {
    position: absolute; inset: auto 0 14px; text-align: center; margin: 0;
    font-size: 14.5px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
}
.ct-watch__head { margin-bottom: 18px; }
.ct-watch__title { font-size: 24px; margin: 0 0 6px; }
.ct-watch__subtitle { color: var(--ct-cobalt-dim); margin: 0 0 8px; font-size: 16.5px; font-weight: 600; }
.ct-watch__meta { font-size: 14px; color: var(--ct-mute); margin: 0 0 14px; }
.ct-watch__summary {
    margin: 0; font-size: 15.5px; background: var(--ct-card);
    border: 1px solid var(--ct-line); border-radius: var(--ct-radius); padding: 14px 18px;
}

.ct-epnav { display: flex; gap: 10px; margin-bottom: 26px; }
.ct-epnav__prev, .ct-epnav__next {
    flex: 1; text-align: center; padding: 12px 8px; font-size: 15px;
    background: var(--ct-card); border: 1.5px solid var(--ct-line); border-radius: var(--ct-radius);
    color: var(--ct-text);
}
.ct-epnav__prev:hover, .ct-epnav__next:hover { border-color: var(--ct-cobalt); text-decoration: none; }
.ct-epnav .is-disabled { color: var(--ct-line); pointer-events: none; }

/* ---------- 人物资料页 ---------- */
.ct-profile { padding-top: 18px; }
.ct-profile__head {
    display: flex; align-items: center; gap: 20px;
    background: var(--ct-graphite); color: #e7ebf0;
    border-radius: var(--ct-radius); padding: 26px 22px; margin-bottom: 28px;
}
.ct-profile__initial {
    flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%;
    background: var(--ct-cobalt); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 38px; font-weight: 800;
}
.ct-profile__kicker {
    font-family: var(--ct-mono); font-size: 12.5px; letter-spacing: .24em;
    color: var(--ct-cobalt); margin: 0 0 6px;
}
.ct-profile__title { font-size: 27px; margin: 0 0 8px; color: #fff; }
.ct-profile__desc { color: #aab4c0; font-size: 15px; margin: 0 0 8px; }
.ct-profile__count { margin: 0; font-family: var(--ct-mono); font-size: 13.5px; color: #8b95a1; }

.ct-works { display: grid; grid-template-columns: 1fr; gap: 14px; }
.ct-work {
    display: flex; gap: 16px; background: var(--ct-card);
    border: 1px solid var(--ct-line); border-radius: var(--ct-radius); padding: 14px;
    transition: border-color .15s;
}
.ct-work:hover { border-color: var(--ct-cobalt); }
.ct-work__posterwrap { flex: 0 0 92px; }
.ct-work__posterwrap img { width: 92px; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }
.ct-work__title { font-size: 17px; margin: 2px 0 6px; }
.ct-work__title a { color: var(--ct-text); }
.ct-work__title a:hover { color: var(--ct-cobalt); }
.ct-work__role { color: var(--ct-cobalt-dim); font-size: 14.5px; font-weight: 600; margin: 0 0 4px; }
.ct-work__meta { color: var(--ct-mute); font-size: 13.5px; margin: 0; font-family: var(--ct-mono); }

/* ---------- 片库归档 ---------- */
.ct-shelf { padding-top: 24px; }
.ct-shelf__head { border-bottom: 1px solid var(--ct-line); padding-bottom: 16px; margin-bottom: 18px; }
.ct-shelf__kicker {
    font-family: var(--ct-mono); font-size: 12.5px; letter-spacing: .24em;
    color: var(--ct-cobalt-dim); margin: 0 0 6px;
}
.ct-shelf__title { font-size: 26px; margin: 0 0 8px; }
.ct-shelf__desc { color: var(--ct-mute); font-size: 15px; margin: 0; max-width: 640px; }
.ct-shelf__filter { margin-bottom: 20px; }

/* ---------- 搜索页 ---------- */
.ct-searchpage { padding-top: 24px; }
.ct-searchpage__head { border-bottom: 1px solid var(--ct-line); padding-bottom: 18px; margin-bottom: 22px; }
.ct-searchpage__kicker {
    font-family: var(--ct-mono); font-size: 12.5px; letter-spacing: .24em;
    color: var(--ct-cobalt-dim); margin: 0 0 6px;
}
.ct-searchpage__title { font-size: 24px; margin: 0 0 6px; }
.ct-searchpage__count { color: var(--ct-mute); font-size: 14px; margin: 0; }

.ct-results { list-style: none; margin: 0; padding: 0; }
.ct-results__item { padding: 16px 0; border-bottom: 1px solid var(--ct-line); }
.ct-results__type {
    font-size: 12px; color: var(--ct-cobalt-dim); background: var(--ct-cobalt-soft);
    border-radius: 999px; padding: 2px 12px; display: inline-block; margin-bottom: 8px;
}
.ct-results__title { font-size: 18px; margin: 0 0 4px; }
.ct-results__title a { color: var(--ct-text); }
.ct-results__title a:hover { color: var(--ct-cobalt); }
.ct-results__excerpt { color: var(--ct-mute); font-size: 14.5px; margin: 0; }
.ct-noresult { padding: 30px 0; color: var(--ct-mute); }

/* ---------- 404 ---------- */
.ct-404 { text-align: center; padding: 56px 0 48px; }
.ct-404__ref { display: inline-block; border: 1px solid var(--ct-cobalt); border-radius: 6px; padding: 3px 12px; margin: 0 0 14px; }
.ct-404__title { font-size: 26px; margin: 0 0 12px; }
.ct-404__text { color: var(--ct-mute); margin: 0 auto 26px; font-size: 16px; max-width: 520px; }
.ct-404__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.ct-404__search { color: var(--ct-mute); font-size: 15px; }
.ct-404__search .ct-searchform { justify-content: center; }

/* ---------- 静态页 ---------- */
.ct-page { max-width: 740px; margin: 0 auto; padding-top: 24px; }
.ct-page__head { border-bottom: 1px solid var(--ct-line); padding-bottom: 14px; margin-bottom: 22px; }
.ct-page__title { font-size: 26px; margin: 0; }
.ct-page__body { font-size: 16px; }
.ct-page__body h2 { font-size: 21px; margin: 28px 0 12px; }
.ct-page__body h3 { font-size: 18px; margin: 24px 0 10px; }
.ct-page__body p { margin: 0 0 16px; }

/* ---------- 空状态 ---------- */
.ct-empty-state { text-align: center; padding: 40px 0; }
.ct-empty-state__text { color: var(--ct-mute); margin-bottom: 16px; }

/* ---------- 页脚(深石墨) ---------- */
.ct-foot {
    background: var(--ct-graphite); color: #aab4c0;
    padding: 38px 16px 26px; margin-top: 44px;
}
.ct-foot__grid {
    max-width: var(--ct-maxw); margin: 0 auto;
    display: grid; grid-template-columns: 1fr; gap: 26px;
}
.ct-foot__logo { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.ct-foot__slogan { color: #8b95a1; font-size: 14px; margin: 0; }
.ct-foot__h {
    font-family: var(--ct-mono); font-size: 12.5px; letter-spacing: .2em;
    color: #8b95a1; margin: 0 0 12px;
}
.ct-foot__links { list-style: none; margin: 0; padding: 0; }
.ct-foot__links li { margin-bottom: 10px; }
.ct-foot__links a { color: #aab4c0; font-size: 15px; }
.ct-foot__links a:hover { color: #fff; }
.ct-foot .ct-chip { background: var(--ct-graphite2); border-color: #3c4550; color: #c8cfd8; }
.ct-foot .ct-chip:hover { border-color: var(--ct-cobalt); color: #fff; }
.ct-foot__copy {
    max-width: var(--ct-maxw); margin: 26px auto 0; padding-top: 16px;
    border-top: 1px solid #3c4550;
    color: #8b95a1; font-size: 13px; text-align: center;
}

/* ---------- 375+ ---------- */
@media (min-width: 375px) {
    .ct-mast__title { font-size: 33px; }
    .ct-drama__title { font-size: 30px; }
    .ct-persons { grid-template-columns: repeat(2, 1fr); }
    .ct-person__count { margin-left: 0; }
    .ct-person { flex-wrap: wrap; }
}

/* ---------- 768+ ---------- */
@media (min-width: 768px) {
    .ct-main { padding: 0 24px 60px; }
    .ct-top__bar { padding: 0 24px; }
    .ct-mast { margin: 0; border-radius: 0 0 var(--ct-radius) var(--ct-radius); padding: 60px 24px 52px; }
    .ct-mast__title { font-size: 38px; }
    .ct-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .ct-persons { grid-template-columns: repeat(3, 1fr); }
    .ct-person { flex-wrap: nowrap; }
    .ct-person__count { margin-left: auto; }
    .ct-drama__main { grid-template-columns: 300px 1fr; gap: 30px; }
    .ct-drama__poster { margin: 0; }
    .ct-watch__stage { margin: 0 0 24px; }
    .ct-watch__title { font-size: 27px; }
    .ct-profile__head { padding: 32px 30px; }
    .ct-works { grid-template-columns: repeat(2, 1fr); }
    .ct-foot__grid { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}

/* ---------- 1100+ ---------- */
@media (min-width: 1100px) {
    .ct-mast__title { font-size: 42px; }
    .ct-drama__main { grid-template-columns: 320px 1fr; }
}
