/*
Theme Name: Xinghuo
Theme URI: https://gitlab.ai-ops.click/chufeng/sayknowseo
Description: Stream Shelf 短剧主题 — 人脸海报主导，去模板味。人机同页、可播、单广告位标注。
Author: SayKnow
Version: 0.7.31
Text Domain: xinghuo
Requires at least: 6.4
Requires PHP: 8.1
*/

:root {
  --xh-bg: #0b0b0f;
  --xh-elev: #14141a;
  --xh-card: transparent;
  --xh-text: #f4f4f6;
  --xh-muted: #9a9aa8;
  --xh-amber: #e24b5a; /* play / accent — not luxury gold */
  --xh-amber-2: #c93d4b;
  --xh-line: #2a2a34;
  --xh-rank: #e24b5a;
  --xh-heat: #e24b5a;
  --xh-max: 1240px;
  --xh-radius: 4px;
  --xh-radius-lg: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  background: var(--xh-bg);
  color: var(--xh-text);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* stream.js marks failed images: keep the box (card background shows), hide the broken icon + alt text. */
img.xh-img-broken { visibility: hidden; }
button { font: inherit; }

.xh-wrap { max-width: var(--xh-max); margin: 0 auto; padding: 0 16px; }

/* —— Nav: flat, no glass —— */
.xh-nav {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 0 14px;
  margin-bottom: 0;
  border-bottom: 0;
  position: relative; z-index: 40;
  background: transparent;
}
.xh-brand {
  display: inline-flex; align-items: center; gap: 0;
  font-weight: 700; letter-spacing: -.01em; color: var(--xh-text); font-size: 18px;
  flex-shrink: 0;
}
.xh-nav-links {
  display: flex; gap: 18px; font-size: 14px; flex: 1; min-width: 0;
  font-weight: 500;
}
.xh-nav-links a { color: var(--xh-muted); }
.xh-nav-links a:hover { color: var(--xh-text); }
.xh-news-list { list-style: none; padding: 0; margin: 0; }
.xh-news-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--xh-line, #e5e7eb);
}
.xh-news-list a { color: var(--xh-text); font-weight: 600; }
.xh-prose { line-height: 1.7; margin: 16px 0 24px; }
.xh-prose p { margin: 0 0 0.85em; }
.xh-article .xh-muted { font-size: 13px; }
.xh-search {
  display: flex; align-items: center; gap: 8px;
  background: #1c1c1f; border: 0;
  border-radius: 4px; padding: 8px 12px; min-width: 180px; max-width: 240px; flex: 0 1 240px;
}
.xh-search input {
  flex: 1; border: 0; background: transparent; color: var(--xh-text); outline: none; font-size: 13px;
}
.xh-search input::placeholder { color: #66666e; }

/* —— Hero: full-bleed photo, soft corners, copy on image —— */
.xh-hero {
  position: relative;
  border-radius: var(--xh-radius-lg);
  overflow: hidden;
  margin: 8px 0 28px;
  border: 0;
  background: #1a1a1c;
  min-height: min(48vh, 400px);
}
.xh-hero-track { position: relative; min-height: inherit; }
.xh-hero-slide {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
}
.xh-hero-slide.is-active { opacity: 1; pointer-events: auto; position: relative; }
.xh-hero-bg {
  position: absolute; inset: 0;
  background: #222;
}
.xh-hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block;
}
.xh-hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(17,17,19,.88) 0%, rgba(17,17,19,.45) 38%, rgba(17,17,19,.12) 62%, rgba(17,17,19,.35) 100%),
    linear-gradient(0deg, rgba(17,17,19,.7) 0%, transparent 42%);
}
.xh-hero-copy {
  position: relative; z-index: 1;
  max-width: 480px;
  padding: 48px 32px 40px;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: min(48vh, 400px);
}
.xh-eyebrow {
  color: rgba(255,255,255,.55); font-size: 12px; margin-bottom: 10px;
  letter-spacing: 0; text-transform: none; font-weight: 500;
}
.xh-hero h1 {
  margin: 0 0 12px; font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.15;
}
.xh-hero p {
  color: rgba(242,242,243,.72); margin: 0 0 16px; max-width: 34em;
  font-size: 14px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.xh-meta-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  margin-bottom: 10px; font-size: 12px; color: rgba(255,255,255,.6);
  font-variant-numeric: tabular-nums;
}
/* tags row (iQIYI): small square chips under the numbers */
.xh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.xh-chip {
  font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 4px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.85);
}
.xh-chip:hover { background: rgba(255,255,255,.22); color: #fff; }
.xh-pill {
  display: inline; font-size: 12px; padding: 0; border-radius: 0;
  border: 0; color: rgba(255,255,255,.5);
  background: transparent;
}
.xh-pill::after { content: none; }
.xh-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.xh-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: #111;
  padding: 10px 22px; border-radius: 4px; font-weight: 650; font-size: 14px;
  transition: opacity .15s ease;
  box-shadow: none;
}
.xh-cta:hover { opacity: .92; color: #111; transform: none; filter: none; }
/* secondary action: 1px outline, same shape (ARTE / iQIYI: never two solid buttons) */
/* .xh-cta.xh-cta--ghost: skins restyle .xh-cta (noir: dark text) and load after this sheet — outrank them */
.xh-cta.xh-cta--ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); cursor: pointer; }
.xh-cta.xh-cta--ghost:hover { color: #fff; background: rgba(255,255,255,.1); border-color: #fff; opacity: 1; }
.xh-cta.xh-cta--ghost[aria-pressed="true"] { border-color: var(--xh-amber); color: var(--xh-amber); }
.xh-cta--sm { padding: 7px 14px; font-size: 13px; }
.xh-diversion {
  font-size: 13px; color: rgba(255,255,255,.45);
  text-decoration: none;
}
.xh-diversion:hover { color: rgba(255,255,255,.85); text-decoration: underline; text-underline-offset: 3px; }
.xh-hero-dots {
  position: absolute; left: 32px; bottom: 16px; z-index: 2;
  display: flex; gap: 5px;
}
.xh-dot {
  width: 6px; height: 6px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.25); padding: 0; cursor: pointer;
}
.xh-dot.is-on { background: #fff; width: 16px; }
/* ReelShort: poster strip bottom-right, current one outlined (shares data-xh-dot with stream.js) */
.xh-hero-thumbs { position: absolute; right: 24px; bottom: 20px; z-index: 2; display: flex; gap: 8px; }
.xh-thumb {
  width: 56px; height: 84px; padding: 0; border: 2px solid transparent; border-radius: 6px;
  overflow: hidden; background: #222; cursor: pointer; opacity: .65;
  transition: opacity .15s ease, border-color .15s ease;
}
.xh-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.xh-thumb.is-on, .xh-thumb:hover { opacity: 1; }
.xh-thumb.is-on { border-color: #fff; }
/* WeTV: title pills instead of dots */
.xh-hero-pills {
  position: absolute; left: 40px; bottom: 20px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 8px; max-width: 72%;
}
.xh-pillbtn {
  font-size: 12px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color: rgba(255,255,255,.8);
  max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xh-pillbtn.is-on { background: #fff; color: #111; border-color: #fff; }

.xh-hero--slim { min-height: min(36vh, 280px); }
.xh-hero--slim .xh-hero-copy { min-height: min(36vh, 280px); padding: 32px 28px 36px; }
.xh-hero--slim h1 { font-size: clamp(24px, 3vw, 32px); }
.xh-hero--theater { min-height: min(58vh, 480px); border-radius: 0; margin-left: -16px; margin-right: -16px; width: calc(100% + 32px); max-width: none; }
.xh-hero--theater .xh-hero-copy { min-height: min(58vh, 480px); max-width: 560px; padding-left: 40px; }
.xh-hero--empty .xh-hero-copy { min-height: 200px; }

/* —— Rails —— */
.xh-section-title {
  margin: 0; font-size: 17px; font-weight: 650; color: var(--xh-text);
  letter-spacing: -.01em;
}
.xh-rail { margin-bottom: 30px; }
.xh-rail-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.xh-view-all { font-size: 13px; color: var(--xh-muted); font-weight: 400; }
.xh-view-all:hover { color: var(--xh-text); }

.xh-river {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.xh-river::-webkit-scrollbar { display: none; }
.xh-river .xh-card {
  flex: 0 0 132px; min-width: 0; scroll-snap-align: start; /* min-width: a long nowrap title must not widen the card */
}
@media (min-width: 900px) {
  .xh-river .xh-card { flex-basis: 148px; }
}

.xh-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 10px; margin-bottom: 28px;
}
.xh-grid > * { min-width: 0; } /* a text card must not widen its column */
.xh-grid--poster .xh-card .cover { aspect-ratio: 2/3; }

/* Poster card: image first, title under — no chrome box */
.xh-card {
  background: transparent; border-radius: 0; overflow: visible;
  border: 0; color: inherit; display: block;
  transition: none;
}
.xh-card:hover { border-color: transparent; transform: none; }
.xh-card:hover .cover { opacity: .92; }
.xh-card .cover {
  aspect-ratio: 2/3;
  background: #1c1c1f;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}
.xh-card .cover img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  display: block;
}
.xh-card .tag {
  position: absolute; top: 0; left: 0; right: 0;
  font-size: 0; padding: 0; /* hide genre chip — AI smell */
  background: transparent;
}
/* corner pills (ReelShort / iQIYI): TOP n or 新剧 top-left, play count bottom-right */
.xh-tag {
  position: absolute; top: 6px; left: 6px; z-index: 1;
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .02em;
  padding: 4px 7px; border-radius: 999px; color: #fff;
}
.xh-tag--rank { background: var(--xh-amber); color: var(--xh-on-accent, #fff); }
.xh-tag--new { background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.35); }
.xh-views {
  position: absolute; right: 6px; bottom: 6px; z-index: 1;
  font-size: 11px; line-height: 1; padding: 4px 6px; border-radius: 4px;
  background: rgba(0,0,0,.55); color: #fff; font-variant-numeric: tabular-nums;
}
/* ARTE end card: the last grid cell is copy, not a poster */
.xh-card--text {
  display: flex; flex-direction: column; gap: 10px; aspect-ratio: 2/3;
  padding: 18px; border-radius: 8px; background: var(--xh-elev); border: 1px solid var(--xh-line);
}
.xh-card--text .t { white-space: normal; font-size: 16px; font-weight: 650; line-height: 1.3; }
.xh-card--text p {
  margin: 0; flex: 1; font-size: 12px; line-height: 1.6; color: var(--xh-muted);
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}
.xh-card--text .score { font-size: 11px; color: var(--xh-muted); }
.xh-card--text .xh-cta { align-self: flex-start; }
.xh-card .xh-badge { display: none; } /* corner 集数 badge — shown by layout-apptab only */
.xh-card .meta {
  display: block; padding: 8px 1px 0; font-size: 13px;
}
.xh-card .t {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--xh-text); font-weight: 500; line-height: 1.3;
}
.xh-card .score {
  color: var(--xh-muted); font-size: 11px; margin-top: 3px;
  display: block;
}

/* —— Rank board —— */
.xh-board { margin-bottom: 28px; }
.xh-board > .xh-section-title { margin-bottom: 10px; }
.xh-board-list { list-style: none; margin: 0; padding: 0; }
.xh-board-item {
  display: grid;
  grid-template-columns: 28px 48px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.xh-board-n {
  font-weight: 700; font-size: 18px; color: var(--xh-muted);
  font-variant-numeric: tabular-nums; text-align: center;
}
.xh-board-n.is-hot { color: var(--xh-amber); }
.xh-board-thumb {
  width: 48px; height: 68px; border-radius: 4px;
  background: #222; display: block; overflow: hidden;
  position: relative;
}
.xh-board-thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block;
}
.xh-board-title {
  color: var(--xh-text); font-size: 14px; font-weight: 550;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.xh-board-sub {
  margin-top: 3px; font-size: 12px; color: var(--xh-muted);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.xh-board-play {
  font-size: 12px; font-weight: 600; color: #111;
  background: #fff; padding: 6px 12px; border-radius: 4px;
}
.xh-board-play:hover { opacity: .9; color: #111; }

.xh-cats {
  display: flex; flex-wrap: wrap; gap: 0; margin: 4px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 0;
}
.xh-cats a {
  padding: 10px 14px 12px; border-radius: 0; border: 0;
  background: transparent; color: var(--xh-muted); font-size: 13px;
  font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.xh-cats a:hover { color: var(--xh-text); border-bottom-color: var(--xh-text); }

.xh-split {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .85fr); gap: 18px; margin-bottom: 28px;
}
.xh-split > * { min-width: 0; } /* a wide hero must never squeeze the board */
.xh-split .xh-hero { margin-bottom: 0; }
.xh-side-panel {
  background: transparent; border: 0;
  border-radius: 0; padding: 4px 0 0;
  max-height: min(48vh, 400px); overflow: auto;
}
.xh-side-panel .xh-board { margin-bottom: 0; }
.xh-side-panel .xh-board-item { grid-template-columns: 24px 40px 1fr; }
.xh-side-panel .xh-board-play { display: none; }

.xh-ad {
  border: 0; border-radius: 4px;
  padding: 12px 14px; margin: 4px 0 28px;
  background: #1a1a1c; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.xh-ad .lab {
  font-size: 10px; padding: 2px 6px; border-radius: 2px;
  background: #333; color: #aaa; flex-shrink: 0; letter-spacing: 0;
}
.xh-ad .body { flex: 1; font-size: 12px; color: var(--xh-muted); min-width: 120px; }
.xh-ad--img { display: block; position: relative; padding: 0; overflow: hidden; }
.xh-ad--img .lab { position: absolute; top: 8px; left: 8px; z-index: 1; }
.xh-ad-media, .xh-ad-media picture { display: block; width: 100%; }
.xh-ad-media img { display: block; width: 100%; height: auto; }

.xh-player {
  background: transparent;
  border-radius: 6px;
  aspect-ratio: auto;
  border: 0;
  display: block;
  overflow: visible;
  max-width: 100%;
}
.xh-player .sk-player { width: 100%; }
.xh-player video, .xh-player iframe { width: 100%; height: 100%; border: 0; }
.xh-detail { display: grid; grid-template-columns: 1.7fr .8fr; gap: 24px; }
.xh-detail > * { min-width: 0; } /* the nowrap 选集 strip must scroll, not widen the column */
.xh-detail-title { margin: 16px 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.xh-detail-ep { color: var(--xh-muted); font-size: 13px; margin: 0 0 8px; }
.xh-detail-body { color: var(--xh-muted); font-size: 14px; margin-bottom: 14px; }
.xh-eps {
  display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 8px;
  overflow-x: auto; padding-bottom: 4px;
}
.xh-eps a, .xh-eps span {
  font-size: 12px; padding: 7px 11px; border-radius: 4px; flex-shrink: 0;
  background: #1c1c1f; border: 0; color: var(--xh-text);
}
.xh-eps .on { background: #fff; color: #111; }
.xh-eps a:hover { background: #2a2a2e; }
.xh-card-side { display: block; margin-bottom: 12px; }
.xh-card-side .cover-wide { aspect-ratio: 16/9; border-radius: 4px; background: #1c1c1f; overflow: hidden; position: relative; }
.xh-card-side .cover-wide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xh-card-side .meta { padding: 6px 0 0; }

/* Portrait-only cover in a landscape box (xinghuo_wide_cover_html): blurred same-URL backdrop + whole poster. */
.xh-fit { position: absolute; inset: 0; display: block; overflow: hidden; background: #111; }
.xh-fit > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
.xh-fit > .xh-fit-bg { object-fit: cover; filter: blur(24px) brightness(.55); transform: scale(1.2); }
.xh-fit > .xh-fit-fg { object-fit: contain; object-position: 50% 50%; }
.xh-card .cover .xh-fit-fg { object-fit: contain; object-position: 50% 50%; } /* outranks .xh-card .cover img */
@media (min-width: 901px) {
  .xh-hero-bg .xh-fit-fg { object-position: 82% 50%; } /* poster right, copy column left stays clear */
}
/* …and behind a 16:9 player (xinghuo_player_backdrop); the player chrome must let it show through. */
.xh-player--fit { position: relative; overflow: hidden; border-radius: 6px; }
.xh-player-bd {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover;
  filter: blur(24px) brightness(.5); transform: scale(1.2); pointer-events: none;
}
.xh-player--fit .sk-player, .xh-player--fit video { background: transparent !important; } /* beats plugin + layout #000 */
.xh-player--fit .xh-player-empty { position: relative; color: #ccc; } /* paint above the positioned backdrop */
.xh-no-eps { color: var(--xh-muted); font-size: 13px; margin: 8px 0; }
.xh-eps .xh-no-eps { background: none; padding: 7px 0; }

.xh-empty { color: var(--xh-muted); font-size: 13px; margin: 8px 0; grid-column: 1 / -1; }
.xh-player-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 32px 16px; color: var(--xh-muted); text-align: center;
}
.xh-player-empty p { margin: 0; font-size: 13px; }
.xh-player-icon {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #333;
  background: radial-gradient(circle at 42% 50%, transparent 40%, #fff 41%, #fff 55%, transparent 56%);
  opacity: .4;
}

/* —— iQIYI 热播榜: poster + colour panel (TOP n · title · 集数) —— */
.xh-board--cards .xh-river .xh-topcard { flex: 0 0 180px; scroll-snap-align: start; }
.xh-topcard { display: block; border-radius: 8px; overflow: hidden; background: var(--xh-elev); }
.xh-topcard .cover { aspect-ratio: 2/3; background: #1c1c1f; }
.xh-topcard .cover img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.xh-topcard .panel {
  padding: 12px 12px 12px; min-height: 92px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--xh-amber) 38%, #141418), #141418 90%); /* ponytail: skin tint; per-poster colour is phase 2 */
}
.xh-topcard .n { font-size: 18px; font-weight: 800; letter-spacing: .02em; color: #fff; }
.xh-topcard .t { margin-top: 6px; font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xh-topcard .e { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.6); }
.xh-topcard:hover .cover img { opacity: .9; }
/* Viki: big numeral beside the poster (data-rank) */
.xh-river--numerals .xh-card-rank { position: relative; padding-left: 56px; flex-basis: 204px !important; }
.xh-river--numerals .xh-card-rank::before {
  content: attr(data-rank); position: absolute; left: -2px; bottom: 46px; z-index: 1;
  font-size: 84px; font-weight: 900; line-height: .8; letter-spacing: -.06em; color: #fff;
  -webkit-text-stroke: 2px var(--xh-amber); text-shadow: 4px 4px 0 var(--xh-amber);
  font-variant-numeric: tabular-nums;
}
.xh-river--numerals .xh-card-rank .xh-tag--rank { display: none; }
.xh-hero-rank {
  display: inline-block; align-self: flex-start; margin: -4px 0 12px; padding: 4px 9px; border-radius: 4px;
  background: var(--xh-amber); color: var(--xh-on-accent, #fff); font-size: 12px; font-weight: 700;
}

/* —— Criterion: four genre doors —— */
.xh-doors { margin: 8px 0 36px; }
.xh-doors-head { text-align: center; margin: 24px 0 26px; }
.xh-doors-head .xh-kicker { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #c9a96a; margin-bottom: 10px; }
.xh-doors-head h2 {
  margin: 0; font-family: "Noto Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  font-weight: 400; font-size: clamp(32px, 4.2vw, 56px); letter-spacing: .02em; line-height: 1.1;
}
.xh-doors-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--xh-line); border-radius: 8px; overflow: hidden; }
.xh-door {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  padding: 28px 20px 26px; border-right: 1px solid var(--xh-line); background: var(--xh-elev);
}
.xh-door:last-child { border-right: 0; }
.xh-door-k { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #c9a96a; }
.xh-door-img { display: block; width: 58%; aspect-ratio: 2/3; border-radius: 4px; overflow: hidden; background: #1c1c1f; }
.xh-door-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.xh-door:hover .xh-door-img img { transform: scale(1.04); }
.xh-door-d {
  font-family: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; font-style: italic;
  font-size: 13px; line-height: 1.5; color: var(--xh-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.xh-door-n { font-size: 12px; color: var(--xh-text); margin-top: auto; }
.xh-all { text-align: center; margin: 8px 0 32px; }

/* —— Promo strip (Criterion / DramaBox): the single ad slot as a thin accent bar —— */
.xh-ad--bar {
  margin: 0 0 24px; padding: 9px 14px; border-radius: 6px;
  background: color-mix(in srgb, var(--xh-amber) 22%, var(--xh-elev)); color: var(--xh-text);
}
.xh-ad--bar .body { color: var(--xh-text); font-size: 13px; font-weight: 500; }
.xh-ad--bar .lab { background: rgba(0,0,0,.35); color: rgba(255,255,255,.7); }
.xh-ad--bar a { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: #fff; color: #111; }

/* —— DramaBox: hero as picture | copy, rich board rows —— */
.xh-hero--split { min-height: 0; background: var(--xh-elev); border: 1px solid var(--xh-line); }
.xh-hero--split .xh-hero-slide.is-active { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.xh-hero--split .xh-hero-bg { position: relative; min-width: 0; min-height: 360px; } /* height follows the copy column; no aspect-ratio (it widened the picture) */
.xh-hero--split .xh-hero-shade { display: none; }
.xh-hero--split .xh-hero-copy { min-height: 0; max-width: none; padding: 26px 28px 60px; justify-content: flex-start; }
.xh-hero--split .xh-eyebrow { margin-bottom: 6px; }
.xh-hero--split h1 { font-size: 26px; letter-spacing: -.02em; }
.xh-hero--split p { -webkit-line-clamp: 5; color: var(--xh-muted); font-size: 13px; }
.xh-hero--split .xh-chip { background: rgba(255,255,255,.08); color: var(--xh-muted); border-radius: 999px; }
.xh-hero--split .xh-hero-dots { left: auto; right: 24px; bottom: 22px; }
.xh-board--rich .xh-board-item { grid-template-columns: 22px 64px 1fr; gap: 10px; align-items: start; padding: 10px 0; }
.xh-board--rich .xh-board-thumb { width: 64px; height: 92px; }
.xh-board--rich .xh-board-play { display: none; }
.xh-board--rich .xh-board-n { font-size: 14px; padding-top: 2px; }
.xh-board-syn { margin: 4px 0 6px; font-size: 12px; line-height: 1.5; color: var(--xh-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xh-board--rich .xh-chips { margin: 0; gap: 4px; }
.xh-board--rich .xh-chip { font-size: 11px; padding: 3px 7px; background: rgba(255,255,255,.08); color: var(--xh-muted); border-radius: 999px; }

/* —— NOWNESS: 16:9 cards + Criterion release-date eyebrow —— */
.xh-rail--wide .xh-river .xh-card { flex-basis: 236px; }
.xh-card--wide .cover { aspect-ratio: 16/9; }
.xh-card .d { font-size: 11px; letter-spacing: .04em; color: #c9a96a; margin-bottom: 6px; }
.xh-card .d ~ .cover .xh-tag--new { display: none; } /* the date already says it's new */

/* —— Tubi: three-up hero (desktop only; phones fall back to the stacked slim carousel) —— */
@media (min-width: 901px) {
  .xh-hero--triple { min-height: 0; background: transparent; border-radius: 0; overflow: visible; }
  .xh-hero--triple .xh-hero-track { display: flex; gap: 10px; min-height: 0; }
  .xh-hero--triple .xh-hero-slide {
    position: relative; opacity: 1; pointer-events: auto; flex: 1 1 0; min-width: 0; min-height: 340px;
    border-radius: var(--xh-radius-lg); overflow: hidden; cursor: pointer;
    transition: flex-grow .35s ease;
  }
  .xh-hero--triple .xh-hero-slide.is-active { flex-grow: 1.9; cursor: default; }
  .xh-hero--triple .xh-hero-copy { min-height: 340px; max-width: 460px; padding: 28px 24px 30px; }
  .xh-hero--triple .xh-hero-slide:not(.is-active) .xh-hero-copy > :not(h1):not(.xh-eyebrow) { display: none; }
  .xh-hero--triple .xh-hero-slide:not(.is-active) h1 { font-size: 20px; }
  .xh-hero--triple .xh-hero-slide:not(.is-active) .xh-hero-shade { background: linear-gradient(0deg, rgba(17,17,19,.85) 0%, rgba(17,17,19,.15) 60%); }
  .xh-hero--triple .xh-hero-sw { display: none; }
}
.xh-hero--triple h1 { font-size: clamp(24px, 3vw, 32px); }

/* —— Tubi: bottom "better on the app" strip —— */
.xh-appbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 44px 10px 16px; background: color-mix(in srgb, var(--xh-amber) 85%, #000); color: #fff;
  font-size: 13px; font-weight: 500; box-shadow: 0 -6px 24px rgba(0,0,0,.35);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.xh-appbar[hidden] { display: none; }
.xh-appbar .xh-cta { background: #fff; color: #111; }
.xh-appbar-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: rgba(255,255,255,.75); font-size: 20px; line-height: 1; padding: 6px 8px; cursor: pointer; }
html.xh-has-appbar .xh-footer { padding-bottom: 96px; }
html.xh-has-appbar .sk-dl-float { display: none; }

/* —— Floating 扫码下载 card (ReelShort), desktop only; phones keep the plugin's sk-dl-float pill —— */
.xh-qr {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 168px;
  padding: 14px 12px 12px; border-radius: 12px; text-align: center;
  background: var(--xh-elev); border: 1px solid var(--xh-line); box-shadow: 0 8px 30px rgba(0,0,0,.45);
}
.xh-qr[hidden] { display: none; }
.xh-qr-t { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.xh-qr-box { display: block; width: 144px; margin: 0 auto; padding: 6px; border-radius: 8px; background: #fff; }
.xh-qr-box canvas { display: block; width: 132px; height: 132px; }
.xh-qr-s { font-size: 11px; color: var(--xh-muted); margin-top: 8px; }
.xh-qr-x {
  position: absolute; top: 2px; right: 4px; padding: 4px 6px; border: 0; background: transparent;
  color: var(--xh-muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.xh-qr-x:hover { color: var(--xh-text); }
@media (min-width: 901px) { body.layout-classic .sk-dl-float { display: none; } }
@media (max-width: 900px) { .xh-qr { display: none; } }

.xh-footer {
  border-top: 1px solid rgba(255,255,255,.06); padding: 20px 0 40px;
  color: #666; font-size: 12px; margin-top: 8px;
}
.xh-interlink { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
.xh-interlink a { color: #888; }
.xh-interlink-label { color: #555; }

@media (max-width: 900px) {
  .xh-nav { flex-wrap: wrap; gap: 10px; }
  .xh-search { order: 3; width: 100%; max-width: none; flex: 1 1 100%; }
  .xh-hero, .xh-hero-copy, .xh-hero--slim .xh-hero-copy, .xh-hero--theater .xh-hero-copy {
    min-height: 0;
  }
  .xh-hero-copy { padding: 28px 18px 36px; min-height: 260px; max-width: 100%; }
  .xh-hero p { max-width: 100%; }
  .xh-hero--theater { margin-left: -16px; margin-right: -16px; width: calc(100% + 32px); }
  .xh-hero-dots { left: 18px; }
  .xh-hero-pills { left: 18px; right: 18px; max-width: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .xh-hero-pills::-webkit-scrollbar { display: none; }
  .xh-pillbtn { flex-shrink: 0; }
  .xh-hero-thumbs { display: none; } /* auto-rotation only; no room beside the copy */
  .xh-chips { display: none; } /* iQIYI: 8 meta items overflow on phones — keep the numbers row only */
  .xh-doors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xh-door { border-bottom: 1px solid var(--xh-line); padding: 20px 12px; }
  .xh-door:nth-child(2n) { border-right: 0; }
  .xh-door:nth-last-child(-n+2) { border-bottom: 0; }
  .xh-hero--split .xh-hero-slide.is-active { grid-template-columns: 1fr; }
  .xh-hero--split .xh-hero-bg { aspect-ratio: 16/9; min-height: 0; }
  .xh-hero--split .xh-hero-copy { padding: 18px 18px 52px; }
  .xh-rail--wide .xh-river .xh-card { flex-basis: 200px; }
  .xh-appbar-t { font-size: 12px; }
  .xh-river--numerals .xh-card-rank { padding-left: 40px; flex-basis: 168px !important; }
  .xh-river--numerals .xh-card-rank::before { font-size: 60px; }
  .xh-detail { grid-template-columns: 1fr; }
  .xh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .xh-split { grid-template-columns: 1fr; }
  .xh-side-panel { max-height: none; }
  .xh-board-item { grid-template-columns: 24px 40px 1fr auto; gap: 8px; }
}
@media (max-width: 480px) {
  .xh-river .xh-card { flex-basis: 128px; }
  .xh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .xh-card .t {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .xh-board-item { grid-template-columns: 22px 44px minmax(0, 1fr); gap: 8px; }
  .xh-board-play { display: none; }
  .xh-board-meta { min-width: 0; }
  .xh-player, .sk-player { max-width: 100%; }
  .xh-player video, .xh-player iframe {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
  }
}

/* —— 18+ gate (adult sites only; content stays rendered underneath, blurred) —— */
html.xh-age-open { overflow: hidden; }
html.xh-age-open .xh-wrap { filter: blur(12px); }
html.xh-age-open .xh-qr, html.xh-age-open .xh-appbar { display: none; } /* nothing floats over the gate */
.xh-age {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.6);
}
.xh-age-box {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  width: 100%; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 24px max(40px, env(safe-area-inset-bottom));
  border: 1px solid rgba(255,255,255,.07); border-radius: 20px 20px 0 0;
  background: #1b1b1f; color: #f2f2f4; text-align: center;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.xh-age-handle { width: 36px; height: 4px; flex-shrink: 0; margin-bottom: 20px; border-radius: 999px; background: rgba(255,255,255,.24); }
.xh-age-brand { display: flex; align-items: center; gap: 10px; height: 45px; }
.xh-age-brand .xh-brand-mark { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; }
.xh-age-brand .xh-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.xh-age-brand .xh-brand-name { font-size: 22px; font-weight: 500; letter-spacing: .12em; color: #f2f2f4; }
.xh-age h2 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 700; color: #f2f2f4; }
.xh-age p { width: 100%; margin: 0; font-size: 14px; line-height: 22px; color: #a1a1aa; }
.xh-age p a { border-radius: 2px; transition: color .15s; }
.xh-age p a:hover { color: #fff; }
.xh-age-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.xh-age-actions button {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; height: 48px;
  padding: 0 22px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 15px; line-height: 22px; font-weight: 500; transition: filter .2s, border-color .2s, background-color .2s;
}
.xh-age-enter {
  border: 0; color: #fff;
  background: linear-gradient(158deg, #ff4a7b 14.6%, #ec237f 51.4%, #93226f 85.4%); /* reference pink on every skin/layout */
}
.xh-age-enter:hover { filter: brightness(1.1); }
.xh-age-leave { border: 1px solid rgba(255,255,255,.24); background: transparent; color: #f2f2f4; }
.xh-age-leave:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.xh-age button:focus-visible, .xh-age a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (min-width: 768px) {
  html.xh-age-open .xh-wrap { filter: blur(16px); }
  .xh-age { align-items: center; padding: 24px; }
  .xh-age-box { width: 506px; max-height: calc(100dvh - 48px); gap: 20px; padding: 40px 40px 32px; border-radius: 20px; }
  .xh-age-handle { display: none; }
  .xh-age-brand { height: 54px; }
  .xh-age-brand .xh-brand-mark { width: 48px; height: 48px; border-radius: 12px; }
  .xh-age-brand .xh-brand-name { font-size: 26px; }
  .xh-age h2 { font-size: 28px; line-height: 38px; }
  .xh-age p { font-size: 15px; line-height: 24px; }
  .xh-age-actions button { height: 56px; padding: 0 28px; font-size: 16px; line-height: 24px; }
}
