/* 拾光放映厅（视频目录）壳 · 放映厅版式：种子色由后台配色喂（lib/play_catalog.php catalog_theme_css），
   这里只留象牙影院兜底 + 由种子派生的 soft/control/button。
   几何契约不变：四列卡片墙 / sticky 分类轨 / 详情播放层断点。 */

:root {
  --ng-accent: #c73e1d; --ng-accent-2: #e9a13b; --ng-accent-3: #1f6f6b;
  --ng-accent-rgb: 199, 62, 29;
  --ng-accent-2-rgb: 233, 161, 59;
  --ng-on-accent: #fff8ef;
  --ng-page: #f6f1e7; --ng-page-deep: #ece4d4;
  --ng-panel-solid: #fffcf6;
  --ng-ink: #272019; --ng-muted: #8a7d6c; --ng-line: #e5dbc8;
  --ng-success: #2f7d4f; --ng-warning: #a06a10; --ng-danger: #c23b2e; --ng-info: #2b6cb0;
  --ng-shadow-rgb: 39, 32, 25;
  --ng-overlay-rgb: 32, 25, 18;
  --ng-stage: #120d09; --ng-stage-ink: #d9c9b8;
  --ng-soft: color-mix(in srgb, var(--ng-accent) 7%, var(--ng-panel-solid));
  --ng-control: var(--ng-soft);
  --ng-control-hover: color-mix(in srgb, var(--ng-accent) 13%, var(--ng-panel-solid));
  --ng-button: linear-gradient(125deg, var(--ng-accent), color-mix(in srgb, var(--ng-accent) 72%, var(--ng-accent-2)));
  --ng-button-shadow: 0 8px 18px rgba(var(--ng-accent-rgb), .24);
  --ng-category-active-shadow: 0 2px 8px rgba(var(--ng-accent-rgb), .28), inset 0 1px rgba(255, 255, 255, .22);
  --ng-modal-overlay: rgba(var(--ng-overlay-rgb), .58);
  --gh-dock: 62px;
  --cat-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  --cat-display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html {
  min-width: 320px; min-height: 100%; background: var(--ng-page); -webkit-text-size-adjust: 100%;
  scrollbar-width: thin; scrollbar-color: var(--ng-line) var(--ng-page);
}
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: var(--ng-page); }
html::-webkit-scrollbar-thumb { background: var(--ng-line); border-radius: 99px; border: 2px solid var(--ng-page); }
html::-webkit-scrollbar-thumb:hover { background: var(--ng-muted); }
::selection { background: rgba(var(--ng-accent-rgb), .18); }
body.gh-body {
  min-width: 320px; min-height: 100dvh; margin: 0; overflow-x: clip;
  color: var(--ng-ink); background: var(--ng-page);
  font-family: var(--cat-font); -webkit-font-smoothing: antialiased;
}
body.gh-body::before {
  content: ""; position: fixed; z-index: -2; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 86% -6%, color-mix(in srgb, var(--ng-accent-2) 20%, transparent), transparent 44%),
    radial-gradient(circle at -8% 34%, rgba(var(--ng-accent-rgb), .10), transparent 46%),
    radial-gradient(circle at 50% 118%, color-mix(in srgb, var(--ng-accent-3) 8%, transparent), transparent 52%),
    linear-gradient(165deg, color-mix(in srgb, var(--ng-panel-solid) 62%, transparent), transparent 58%);
}
body.gh-body::after {
  content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none; opacity: .05;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ng-accent); outline-offset: 3px; }

/* ---------- 站点品牌头 ---------- */
.gh-brand {
  position: relative; z-index: 40; width: 100%; min-height: 58px; margin: 0 auto;
  padding: max(9px, env(safe-area-inset-top, 0px)) 14px 9px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--ng-line);
  background: color-mix(in srgb, var(--ng-panel-solid) 88%, transparent);
  backdrop-filter: blur(10px);
}
.gh-brand__logo { min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--ng-ink); text-decoration: none; }
.gh-brand__logo img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.gh-brand__mark {
  width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center;
  color: var(--ng-on-accent); border-radius: 10px; background: var(--ng-button);
  font-size: 16px; font-weight: 800;
}
.gh-brand__name { min-width: 0; overflow: hidden; font-size: 17px; font-weight: 800; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.gh-brand__login {
  flex: 0 0 auto; min-height: 34px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ng-accent);
  border: 1px solid color-mix(in srgb, var(--ng-accent) 30%, var(--ng-line));
  border-radius: 999px; background: var(--ng-soft);
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}
.gh-brand__login:hover { background: var(--ng-control-hover); border-color: color-mix(in srgb, var(--ng-accent) 46%, var(--ng-line)); }
.gh-brand__login svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 页面骨架 + 刊头（胶片齿孔分隔） ---------- */
.ng-hub-shell {
  width: min(100% - 32px, 1180px); margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top, 0px)) 0 calc(var(--gh-dock) + env(safe-area-inset-bottom, 0px) + 30px);
}
.ng-page-head { margin: 6px 0 18px; }
.ng-page-head__line { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ng-page-title {
  position: relative; margin: 0; padding-left: 18px;
  color: var(--ng-ink); font-family: var(--cat-display);
  font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; line-height: 1.25; letter-spacing: .02em;
}
.ng-page-title::before {
  content: ""; position: absolute; left: 0; top: .16em; bottom: .1em; width: 6px; border-radius: 3px;
  background: linear-gradient(180deg, var(--ng-accent), var(--ng-accent-2));
}
.ng-page-tagline { color: var(--ng-accent); font-size: 13px; font-weight: 800; letter-spacing: .14em; }
.ng-page-intro { margin: 10px 0 0; max-width: 720px; color: var(--ng-muted); font-size: 13px; line-height: 1.8; }
.ng-page-head::after {
  content: ""; display: block; height: 7px; margin-top: 16px; border-radius: 4px; opacity: .45;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--ng-ink) 22%, transparent) 0 12px, transparent 12px 24px);
}
.ng-hub-section { margin-top: 6px; }
.collector-catalog-panel { width: 100%; margin: 0; color: var(--ng-ink); }
.collector-catalog-shell { position: relative; overflow: visible; }

.collector-refresh-indicator {
  position: absolute; top: -6px; left: 0; z-index: 8; width: 34%; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--ng-accent), var(--ng-accent-2), transparent);
  pointer-events: none; animation: cat-sweep 1.1s ease-in-out infinite;
}
@keyframes cat-sweep { 0% { transform: translateX(-30%); opacity: .4; } 50% { transform: translateX(180%); opacity: 1; } 100% { transform: translateX(320%); opacity: .2; } }

.collector-demo-notice {
  margin: 0 0 12px; padding: 8px 12px;
  border: 1px dashed color-mix(in srgb, var(--ng-accent-2) 70%, var(--ng-line));
  border-radius: 10px; background: color-mix(in srgb, var(--ng-accent-2) 9%, var(--ng-panel-solid));
  color: var(--ng-muted); font-size: 12px; text-align: center;
}
.collector-demo-notice strong { color: var(--ng-warning); font-weight: 800; }

/* ---------- 分类轨（票签胶囊） ---------- */
.collector-category-filters {
  position: sticky; top: max(8px, env(safe-area-inset-top, 0px)); z-index: 30;
  display: block; width: 100%; min-width: 0; padding: 0; margin: 0 0 12px;
  overflow: hidden; border: 0; background: transparent;
}
.collector-category-list {
  display: flex; width: 100%; min-width: 0; min-height: 48px;
  align-items: center; justify-content: flex-start; gap: 6px;
  margin: 0; padding: 2px 6px;
  overflow-x: auto; overflow-y: hidden;
  scroll-padding-inline: 6px; scrollbar-width: none;
  overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch;
}
.collector-category-list::-webkit-scrollbar { display: none; }
.collector-category-tab {
  position: relative; isolation: isolate;
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
  width: auto; min-width: max-content; height: 44px; min-height: 44px;
  margin: 0; padding: 6px 14px; gap: 0;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--ng-muted); font-size: 12px; font-weight: 800; line-height: 1.2;
  text-align: center; white-space: nowrap; cursor: pointer;
  transition: color 160ms ease;
}
.collector-category-tab::before {
  content: ""; position: absolute; inset: 6px 0; z-index: -1;
  border: 1px solid var(--ng-line); border-radius: 999px;
  background: color-mix(in srgb, var(--ng-panel-solid) 86%, transparent);
  pointer-events: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.collector-category-tab:hover { color: var(--ng-ink); }
.collector-category-tab:hover::before {
  border-color: color-mix(in srgb, var(--ng-accent) 34%, var(--ng-line));
  background: var(--ng-soft);
}
.collector-category-tab.is-active { color: var(--ng-on-accent); }
.collector-category-tab.is-active::before {
  border-color: color-mix(in srgb, #fff 40%, transparent);
  background: var(--ng-button);
  box-shadow: var(--ng-category-active-shadow);
}
.collector-category-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 搜索条 ---------- */
.collector-toolbar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px;
  padding: 0 0 16px; border: 0;
}
.collector-toolbar input {
  width: 100%; min-height: 44px; padding: 9px 16px;
  border: 1px solid var(--ng-line); border-radius: 12px; outline: 0;
  background: color-mix(in srgb, var(--ng-panel-solid) 94%, transparent);
  color: var(--ng-ink); font-size: 16px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.collector-toolbar input::placeholder { color: var(--ng-muted); opacity: .85; }
.collector-toolbar input:focus { border-color: var(--ng-accent); box-shadow: 0 0 0 3px rgba(var(--ng-accent-rgb), .14); }
.collector-toolbar button {
  min-height: 44px; padding: 0 22px; border: 0; border-radius: 12px;
  color: var(--ng-on-accent); background: var(--ng-button);
  box-shadow: var(--ng-button-shadow);
  font-size: 14px; font-weight: 700;
  transition: filter .16s ease, transform .1s ease;
}
.collector-toolbar button:hover { filter: brightness(1.06); }
.collector-toolbar button:active { transform: scale(.97); }

/* ---------- 卡片墙：四列契约，手机也四列；票根卡 ---------- */
.collector-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 1.25vw, 14px); padding: 0 0 20px;
}
.collector-card {
  display: block; min-width: 0; overflow: hidden;
  border: 1px solid var(--ng-line); border-radius: 14px;
  background: var(--ng-panel-solid);
  color: inherit; text-decoration: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(var(--ng-shadow-rgb), .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: cat-in .45s ease backwards;
}
.collector-card:nth-child(1) { animation-delay: .02s; } .collector-card:nth-child(2) { animation-delay: .06s; }
.collector-card:nth-child(3) { animation-delay: .10s; } .collector-card:nth-child(4) { animation-delay: .14s; }
.collector-card:nth-child(5) { animation-delay: .18s; } .collector-card:nth-child(6) { animation-delay: .22s; }
.collector-card:nth-child(7) { animation-delay: .26s; } .collector-card:nth-child(8) { animation-delay: .30s; }
@keyframes cat-in { from { opacity: 0; transform: translateY(10px); } }
.collector-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--ng-accent) 42%, var(--ng-line));
  box-shadow: 0 16px 34px rgba(var(--ng-accent-rgb), .14), 0 4px 12px rgba(var(--ng-shadow-rgb), .08);
}
.collector-cover {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  background: linear-gradient(150deg, var(--ng-page-deep), color-mix(in srgb, var(--ng-panel-solid) 55%, var(--ng-page-deep)));
}
.collector-cover img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.collector-cover.is-ready img { opacity: 1; }
.collector-cover:not(.is-ready)::before {
  content: ""; position: absolute; top: calc(50% - 25px); left: calc(50% - 18px);
  width: 36px; height: 28px; border: 2px solid currentColor; border-radius: 6px;
  color: var(--ng-muted); opacity: .35;
  background: repeating-linear-gradient(90deg, transparent 0 5px, currentColor 5px 8px, transparent 8px 12px) top / 100% 3px no-repeat;
}
.collector-cover:not(.is-ready)::after {
  content: "封面加载中"; position: absolute; top: calc(50% + 14px); left: 0; right: 0;
  color: var(--ng-muted); font-size: 12px; text-align: center;
}
.collector-cover.is-empty::before { display: none; }
.collector-cover.is-empty::after { content: "暂无封面"; top: calc(50% - 8px); }
.collector-remarks {
  position: absolute; right: 7px; bottom: 7px; max-width: calc(100% - 14px); overflow: hidden;
  padding: 4px 8px; border-radius: 6px; color: var(--ng-ink); background: var(--ng-accent-2);
  box-shadow: 0 2px 6px rgba(var(--ng-shadow-rgb), .22);
  font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap;
}
.collector-card-copy { min-width: 0; padding: 10px; border-top: 1px dashed var(--ng-line); }
.collector-card-copy strong {
  display: -webkit-box; min-height: 2.7em; overflow: hidden;
  color: var(--ng-ink); font-size: clamp(11px, 1.15vw, 14px); font-weight: 650; line-height: 1.35;
  overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.collector-card-copy span {
  display: block; margin-top: 5px; overflow: hidden;
  color: var(--ng-muted); font-size: clamp(9px, .95vw, 11px); line-height: 1.5;
  text-overflow: ellipsis; white-space: nowrap; overflow-wrap: anywhere;
}

/* ---------- 骨架 / 空态 / 年龄门 ---------- */
.collector-skeleton-card { pointer-events: none; animation: none; }
.collector-skeleton-card .collector-cover::before, .collector-skeleton-card .collector-cover::after { display: none; }
.collector-skeleton-card .collector-cover { animation: cat-pulse 1.4s ease-in-out infinite; }
.collector-skeleton-copy {
  height: 68px; margin: 0 12px;
  background: linear-gradient(var(--ng-line), var(--ng-line)) 0 14px / 80% 10px no-repeat,
              linear-gradient(var(--ng-line), var(--ng-line)) 0 34px / 55% 8px no-repeat;
}
@keyframes cat-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.collector-empty, .collector-age-gate {
  display: grid; justify-items: center; gap: 10px; min-height: 220px;
  padding: 32px 24px; text-align: center;
}
.collector-age-gate { min-height: 190px; gap: 8px; padding: 24px 20px; }
.collector-empty-icon, .collector-age-icon {
  display: grid; place-items: center; width: 66px; height: 66px; border-radius: 20px;
  color: var(--ng-accent); background: var(--ng-soft);
  border: 1px solid color-mix(in srgb, var(--ng-accent) 26%, var(--ng-line));
  font-size: 26px; font-weight: 900;
}
.collector-age-icon { font-family: var(--cat-display); letter-spacing: .02em; }
.collector-empty-icon { position: relative; }
.collector-empty-icon::before {
  content: ""; position: absolute; box-sizing: border-box;
  width: 28px; height: 22px; border: 3px solid currentColor; border-radius: 6px;
}
.collector-empty-icon::after {
  content: ""; position: absolute; box-sizing: border-box;
  width: 9px; height: 9px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
}
.collector-empty-icon.is-error { color: var(--ng-danger); background: color-mix(in srgb, var(--ng-danger) 8%, var(--ng-panel-solid)); border-color: color-mix(in srgb, var(--ng-danger) 26%, var(--ng-line)); }
.collector-empty-icon.is-error::before { width: 26px; height: 26px; border-radius: 50%; }
.collector-empty-icon.is-error::after {
  width: 3px; height: 12px; border: 0; border-radius: 2px; background: currentColor;
  box-shadow: 0 15px 0 -.5px currentColor; transform: translateY(-4px);
}
.collector-empty h3, .collector-age-gate h3 { margin: 7px 0 0; font-size: 20px; font-family: var(--cat-display); font-weight: 900; }
.collector-empty p, .collector-age-gate p { max-width: 560px; margin: 0; color: var(--ng-muted); font-size: 13px; line-height: 1.8; }
.collector-age-actions { display: flex; gap: 10px; margin-top: 7px; }
.collector-age-actions button, .collector-empty button {
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 12px;
  color: var(--ng-on-accent); background: var(--ng-button);
  box-shadow: var(--ng-button-shadow); font-weight: 700;
  transition: filter .16s ease, transform .1s ease;
}
.collector-age-actions button:hover, .collector-empty button:hover { filter: brightness(1.06); }
.collector-age-actions button:active, .collector-empty button:active { transform: scale(.97); }
.collector-age-actions .is-quiet {
  border: 1px solid var(--ng-line); color: var(--ng-muted);
  background: var(--ng-panel-solid); box-shadow: none;
}

/* ---------- 分页 ---------- */
.collector-pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 12px; padding: 4px 0 12px;
}
.collector-pagination button {
  min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 1px solid var(--ng-line); border-radius: 11px;
  background: color-mix(in srgb, var(--ng-panel-solid) 94%, transparent);
  color: var(--ng-ink); font-weight: 700;
  transition: border-color .16s ease, color .16s ease;
}
.collector-pagination > button { min-width: 76px; }
.collector-pagination button:hover:not(:disabled) { border-color: var(--ng-accent); color: var(--ng-accent); }
.collector-pagination button:disabled { opacity: .42; cursor: default; }
.collector-page-numbers { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.collector-page-number.is-current {
  border-color: transparent; color: var(--ng-on-accent); background: var(--ng-button);
  box-shadow: var(--ng-category-active-shadow);
}
.collector-page-number.is-current:hover { color: var(--ng-on-accent); }
.collector-page-ellipsis { min-width: 20px; text-align: center; color: var(--ng-muted); }
.collector-page-summary { display: none; color: var(--ng-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.collector-page-jump { display: inline-flex; align-items: center; gap: 6px; }
.collector-page-jump input {
  width: 70px; min-height: 44px; border: 1px solid var(--ng-line); border-radius: 11px;
  background: color-mix(in srgb, var(--ng-panel-solid) 94%, transparent);
  color: var(--ng-ink); text-align: center; font-size: 16px;
}
.collector-page-jump input:focus { border-color: var(--ng-accent); outline: none; box-shadow: 0 0 0 3px rgba(var(--ng-accent-rgb), .14); }
.collector-page-jump button { min-width: 60px; }

/* ---------- 播放详情层 ---------- */
body.cp-open { overflow: hidden; }
.cp-overlay {
  position: fixed; inset: 0; z-index: 220;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--ng-modal-overlay);
  backdrop-filter: blur(4px);
  animation: cp-fade .18s ease;
}
@keyframes cp-fade { from { opacity: 0; } }
.cp-dialog {
  width: min(1180px, calc(100vw - 32px)); height: min(720px, calc(100dvh - 32px)); min-height: 460px;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; overflow: hidden;
  border: 1px solid var(--ng-line); border-radius: 22px;
  background: var(--ng-panel-solid);
  box-shadow: 0 30px 80px rgba(var(--ng-overlay-rgb), .35);
  animation: cp-rise .22s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes cp-rise { from { transform: translateY(14px) scale(.985); opacity: 0; } }
.cp-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--ng-panel-solid); }
.cp-head {
  min-height: 86px; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--ng-line);
  background: linear-gradient(180deg, var(--ng-panel-solid), color-mix(in srgb, var(--ng-accent-2) 5%, var(--ng-panel-solid)));
}
.cp-heading { min-width: 0; }
.cp-kicker { display: block; margin-bottom: 5px; color: var(--ng-accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.cp-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; font-weight: 900; font-family: var(--cat-display); }
.cp-close {
  position: relative; display: flex; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center; padding: 0;
  border: 1px solid color-mix(in srgb, var(--ng-ink) 14%, var(--ng-panel-solid)); border-radius: 50%;
  background: color-mix(in srgb, var(--ng-panel-solid) 96%, var(--ng-ink));
  color: color-mix(in srgb, var(--ng-ink) 82%, var(--ng-panel-solid));
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.cp-close svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.cp-close:hover { border-color: color-mix(in srgb, var(--ng-accent) 40%, var(--ng-panel-solid)); color: var(--ng-accent); background: var(--ng-soft); }
.cp-close:active { transform: scale(.94); }
.cp-frame-wrap { position: relative; min-height: 0; flex: 1 1 auto; background: var(--ng-stage); }
.cp-frame-wrap .artplayer-app { width: 100%; height: 100%; }
.cp-player-loading {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  color: var(--ng-stage-ink); font-size: 13px; background: var(--ng-stage);
}
.cp-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(var(--ng-accent-2-rgb), .25); border-top-color: var(--ng-accent-2);
  animation: cp-spin .8s linear infinite;
}
@keyframes cp-spin { to { transform: rotate(1turn); } }
.cp-note {
  min-height: 46px; padding: 12px 20px; display: flex; align-items: center;
  color: var(--ng-muted); background: var(--ng-panel-solid);
  font-size: 13px; border-top: 1px solid var(--ng-line);
}
.cp-note.is-error { color: var(--ng-danger); }
.cp-info {
  min-width: 0; min-height: 0; overflow: auto; padding: 22px;
  background: var(--ng-panel-solid);
  scrollbar-width: thin; scrollbar-color: var(--ng-line) transparent;
}
.cp-info::-webkit-scrollbar { width: 8px; }
.cp-info::-webkit-scrollbar-thumb { background: var(--ng-line); border-radius: 99px; }
.cp-info::-webkit-scrollbar-thumb:hover { background: var(--ng-accent); }
.cp-overview {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 15px; align-items: center;
  padding-bottom: 20px; border-bottom: 1px dashed var(--ng-line);
}
.cp-poster {
  width: 76px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 12px;
  border: 1px solid var(--ng-line); background: var(--ng-soft);
}
.cp-poster img { width: 100%; height: 100%; display: block; object-fit: cover; }
.cp-poster.empty::after {
  content: "暂无封面"; height: 100%; display: grid; place-items: center; padding: 6px;
  text-align: center; color: var(--ng-muted); font-size: 11px;
}
.cp-overview h3 { margin: 0; font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; font-family: var(--cat-display); font-weight: 900; }
.cp-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.cp-meta span {
  padding: 5px 9px; border: 1px solid var(--ng-line); border-radius: 999px;
  color: var(--ng-muted); font-size: 12px; overflow-wrap: anywhere;
  background: color-mix(in srgb, var(--ng-panel-solid) 92%, var(--ng-accent-3));
}
.cp-section {
  margin-top: 20px; padding: 18px;
  border: 1px solid var(--ng-line); border-radius: 16px;
  background: color-mix(in srgb, var(--ng-panel-solid) 93%, var(--ng-accent-2));
}
.cp-section h4 { margin: 0; font-size: 16px; }
.cp-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; margin-top: 13px; }
.cp-label { color: var(--ng-accent); font-size: 13px; font-weight: 800; }
.cp-desc { margin: 0; color: var(--ng-muted); font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; }
.cp-episode-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-count { color: var(--ng-muted); font-size: 12px; }
.cp-episodes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.cp-episode, .cp-more {
  min-height: 42px; padding: 8px;
  border: 1px solid var(--ng-line); border-radius: 10px;
  background: var(--ng-control); color: var(--ng-ink);
  overflow-wrap: anywhere; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.cp-episode:hover, .cp-more:hover { border-color: var(--ng-accent); background: var(--ng-control-hover); }
.cp-episode.active { border-color: transparent; background: var(--ng-button); color: var(--ng-on-accent); box-shadow: var(--ng-category-active-shadow); }
.cp-more { width: 100%; margin-top: 11px; }
.cp-empty-copy { margin-top: 13px; color: var(--ng-muted); font-size: 13px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .cp-overlay { padding: 8px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .cp-dialog {
    width: min(620px, calc(100vw - 16px)); height: auto; max-height: calc(100dvh - 16px); min-height: 0;
    display: block; overflow: auto; border-radius: 20px;
  }
  .cp-head { position: sticky; top: 0; z-index: 3; min-height: 72px; padding: 12px 14px; background: var(--ng-panel-solid); }
  .cp-title { font-size: 17px; }
  .cp-frame-wrap { height: auto; aspect-ratio: 16 / 9; flex: none; }
  .cp-note { min-height: 40px; padding: 10px 14px; }
  .cp-info { overflow: visible; padding: 16px; }
  .cp-overview { grid-template-columns: 62px minmax(0, 1fr); }
  .cp-poster { width: 62px; }
  .cp-overview h3 { font-size: 20px; }
  .cp-section { margin-top: 14px; padding: 14px; }
  .cp-episodes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .ng-hub-shell { width: min(100% - 20px, 1180px); }
  .ng-page-head { margin: 4px 0 14px; }
  .ng-page-title { font-size: 26px; padding-left: 14px; }
  .ng-page-title::before { width: 5px; }
  .ng-page-tagline { font-size: 12px; letter-spacing: .1em; }
  .ng-page-intro { font-size: 12px; }
  .ng-page-head::after { margin-top: 12px; }
  .collector-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 0 18px; }
  .collector-card-copy { padding: 7px 6px 8px; }
  .collector-card-copy strong { font-size: 12px; font-weight: 650; line-height: 1.45; min-height: 2.9em; }
  .collector-card-copy span { margin-top: 4px; font-size: 11px; }
  .collector-category-tab { padding-inline: 11px; font-size: 11px; }
  .collector-age-gate { min-height: 0; padding: 20px 14px; }
  .collector-age-icon { width: 58px; height: 58px; border-radius: 18px; font-size: 23px; }
  .collector-pagination { column-gap: 12px; row-gap: 12px; padding-inline: 0; }
  .collector-page-numbers { display: none; }
  .collector-page-summary { display: block; min-width: 72px; text-align: center; }
  .collector-pagination > button { flex: 1 1 0; max-width: 160px; }
  .collector-page-jump { flex: 0 0 100%; justify-content: center; }
  .gh-brand { min-height: 54px; padding-left: 12px; padding-right: 12px; }
  .gh-brand__logo img, .gh-brand__mark { width: 34px; height: 34px; border-radius: 9px; }
  .gh-brand__name { font-size: 16px; }
  .gh-brand__login { min-height: 32px; padding: 0 12px; font-size: 12px; }
}
@media (max-width: 430px) {
  .cp-episodes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp-dialog { border-radius: 17px; }
  .cp-info { padding: 13px; }
  .cp-section { padding: 13px; }
}
@media (max-width: 390px) {
  .collector-grid { gap: 6px; }
  .collector-card-copy { padding-inline: 5px; }
}
@media (max-height: 620px) and (min-width: 901px) {
  .cp-dialog { height: calc(100dvh - 16px); min-height: 0; }
  .cp-head { min-height: 68px; padding: 10px 18px; }
  .cp-note { min-height: 38px; padding: 8px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* 站点底栏：跟着放映厅配色取色 */
.site-tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; z-index: 100;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--ng-panel-solid) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--ng-line);
  box-shadow: 0 -4px 18px rgba(var(--ng-shadow-rgb), .08);
}
.site-tabbar .st-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; position: relative; padding: 2px 0; -webkit-tap-highlight-color: transparent; }
.site-tabbar .st-ico { width: 40px; height: 27px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--ng-muted); transition: color .18s, background .18s; }
.site-tabbar .st-ico svg { width: 23px; height: 23px; display: block; }
.site-tabbar .st-ico img { width: 23px; height: 23px; object-fit: contain; }
.site-tabbar .st-label { font-size: 11px; color: var(--ng-muted); font-weight: 500; transition: color .18s; }
.site-tabbar .st-item.active .st-ico { color: var(--ng-accent); background: var(--ng-soft); }
.site-tabbar .st-item.active .st-label { color: var(--ng-accent); font-weight: 800; }
.site-tabbar .st-badge { position: absolute; top: -1px; left: 50%; margin-left: 9px; background: var(--ng-danger); color: #fff; font-size: 9px; font-weight: 700; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--ng-panel-solid); }