/* Wave-5 layouts (2026-10-27): screen ≈ Apple TV · channels ≈ Plex · curated ≈ MUBI. Enqueued only on those three
   (curated also loads layout-wave4.css for the body.xh-light surface). */

/* ======================================================================
   screen — Apple TV: full-bleed hero, 16:9 rows with the title on the picture, Top 10 numerals, genre tiles
   ====================================================================== */
body.layout-screen { background: #000; }
body.layout-screen .xh-nav { padding: 16px 0; }
body.layout-screen .xh-hero--theater { min-height: min(72vh, 620px); border-radius: 0; }
body.layout-screen .xh-hero--theater .xh-hero-copy { min-height: min(72vh, 620px); max-width: 640px; padding: 0 56px 64px; justify-content: flex-end; }
body.layout-screen .xh-hero-shade { background: linear-gradient(0deg, #000 0%, rgba(0,0,0,.55) 30%, transparent 65%), linear-gradient(90deg, rgba(0,0,0,.35), transparent 50%); }
body.layout-screen .xh-hero h1 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 800; letter-spacing: -.03em; }
body.layout-screen .xh-hero .xh-eyebrow { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.7); }
body.layout-screen .xh-hero .xh-cta { border-radius: 10px; padding: 12px 26px; }
body.layout-screen .xh-hero-dots { left: 50%; transform: translateX(-50%); bottom: 20px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
body.layout-screen .xh-section-title { font-size: 22px; font-weight: 700; }
body.layout-screen .xh-rail { margin-bottom: 40px; }
.xh-sc-cards { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 18px) / 3); gap: 18px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.xh-sc-cards::-webkit-scrollbar { display: none; }
.xh-sc-card {
  position: relative; display: block; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #111;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); scroll-snap-align: start; transition: transform .25s ease;
}
.xh-sc-card:hover { transform: scale(1.03); }
.xh-sc-card img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.xh-sc-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.78), transparent 55%); }
.xh-sc-cap { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; display: flex; flex-direction: column; gap: 3px; color: #fff; }
.xh-sc-cap strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; text-shadow: 0 2px 10px rgba(0,0,0,.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xh-sc-cap small { font-size: 12px; color: rgba(255,255,255,.72); }
/* genre rails become 16:9 too */
body.layout-screen .xh-rail--wide .xh-river { gap: 18px; }
body.layout-screen .xh-rail--wide .xh-river .xh-card { flex-basis: calc((100% - 3 * 18px) / 4); }
body.layout-screen .xh-card .cover { border-radius: 12px; }
/* Top 10 */
.xh-sc-toplist { display: flex; gap: 22px; margin: 0; padding: 0 0 6px; list-style: none; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.xh-sc-toplist::-webkit-scrollbar { display: none; }
.xh-sc-toplist li { flex: 0 0 auto; scroll-snap-align: start; }
.xh-sc-toplist li a { display: flex; align-items: flex-end; gap: 0; color: inherit; }
.xh-sc-toplist .n {
  display: block; margin-right: -12px; margin-bottom: 22px; font-size: 150px; font-weight: 800; line-height: .8; letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 3px rgba(255,255,255,.6); font-variant-numeric: tabular-nums; z-index: 0;
}
.xh-sc-toplist .pic { position: relative; z-index: 1; display: block; width: 150px; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: #1c1c1f; box-shadow: 0 8px 24px rgba(0,0,0,.6); }
.xh-sc-toplist .pic img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.xh-sc-toplist .pic .ph { display: flex; align-items: flex-end; height: 100%; padding: 12px; font-size: 15px; font-weight: 700; line-height: 1.3; color: #fff; background: linear-gradient(160deg, #34343c, #0d0d10); } /* no cover: the title is the poster */
.xh-sc-toplist .t { display: none; }
.xh-sc-top--plain .xh-sc-toplist li a { flex-direction: column; align-items: stretch; gap: 8px; width: 150px; }
.xh-sc-top--plain .xh-sc-toplist .t { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xh-sc-toplist li a:hover .pic { outline: 2px solid #fff; }
/* genre tiles */
.xh-sc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.xh-sc-tile {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; aspect-ratio: 16/9; padding: 18px 20px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--xh-amber) 70%, #000), color-mix(in srgb, var(--xh-amber) 35%, #000));
  transition: transform .25s ease;
}
.xh-sc-tile:nth-child(2) { background: linear-gradient(135deg, #1d4ed8, #0f172a); }
.xh-sc-tile:nth-child(3) { background: linear-gradient(135deg, #7c3aed, #1e1b4b); }
.xh-sc-tile:nth-child(4) { background: linear-gradient(135deg, #0f766e, #022c22); }
.xh-sc-tile:nth-child(5) { background: linear-gradient(135deg, #b45309, #431407); }
.xh-sc-tile:nth-child(6) { background: linear-gradient(135deg, #be185d, #4a044e); }
.xh-sc-tile:nth-child(7) { background: linear-gradient(135deg, #334155, #020617); }
.xh-sc-tile:nth-child(8) { background: linear-gradient(135deg, #15803d, #052e16); }
.xh-sc-tile:hover { transform: scale(1.03); }
.xh-sc-tile strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.xh-sc-tile small { font-size: 12px; color: rgba(255,255,255,.7); }
@media (max-width: 900px) {
  body.layout-screen .xh-hero--theater, body.layout-screen .xh-hero--theater .xh-hero-copy { min-height: min(60vh, 420px); }
  body.layout-screen .xh-hero--theater .xh-hero-copy { padding: 0 20px 48px; }
  body.layout-screen .xh-hero h1 { font-size: 30px; }
  .xh-sc-cards { grid-auto-columns: 84%; gap: 12px; }
  .xh-sc-cap strong { font-size: 18px; }
  body.layout-screen .xh-rail--wide .xh-river .xh-card { flex-basis: 70%; }
  .xh-sc-toplist { gap: 14px; }
  .xh-sc-toplist .n { margin-right: -8px; margin-bottom: 14px; font-size: 96px; -webkit-text-stroke-width: 2px; }
  .xh-sc-toplist .pic { width: 112px; }
  .xh-sc-top--plain .xh-sc-toplist li a { width: 112px; }
  .xh-sc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .xh-sc-tile { padding: 12px 14px; }
  .xh-sc-tile strong { font-size: 18px; }
}

/* portrait-only covers come through xinghuo_wide_cover_html as a blurred backdrop + a contained foreground;
   the 16:9 boxes above set object-fit: cover on every img, so put the foreground back to contain. */
.xh-sc-card .xh-fit-fg, .xh-ch-nowcard .pic .xh-fit-fg, .xh-ch-collage .xh-fit-fg, .xh-cu-still .xh-fit-fg, .xh-cu-coll-bg .xh-fit-fg { object-fit: contain; object-position: 50% 50%; }

/* ======================================================================
   channels — Plex: tinted welcome banner, 免费-style kicker row heads, updating row with progress, genre list cards
   ====================================================================== */
body.layout-channels { --xh-bg: #1e1e1e; --xh-elev: #2a2a2a; --xh-line: #3a3a3a; background: var(--xh-bg); }
body.layout-channels .xh-nav { padding: 14px 0; }
body.layout-channels .xh-search { border-radius: 999px; background: #2a2a2a; }
.xh-ch-welcome {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 46%; align-items: center; gap: 24px; min-height: 300px; margin: 8px 0 28px; padding: 40px 48px; border-radius: 16px; overflow: hidden;
  background: linear-gradient(110deg, color-mix(in srgb, var(--xh-amber) 70%, #2b0a4a) 0%, color-mix(in srgb, var(--xh-amber) 35%, #1e3a8a) 60%, #0f172a 100%);
}
.xh-ch-welcome-copy { position: relative; z-index: 1; max-width: 560px; color: #fff; }
.xh-ch-welcome-copy h1 { margin: 0 0 12px; font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.xh-ch-welcome-copy p { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.82); }
.xh-ch-welcome .xh-cta { border-radius: 999px; }
.xh-ch-collage { position: relative; height: 240px; -webkit-mask: linear-gradient(90deg, transparent, #000 25%); mask: linear-gradient(90deg, transparent, #000 25%); }
.xh-ch-collage > span { position: absolute; width: 58%; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 34px rgba(0,0,0,.45); transform: rotate(-6deg); } /* direct children only: a portrait cover adds an inner .xh-fit span */
.xh-ch-collage > span img { width: 100%; height: 100%; object-fit: cover; }
.xh-ch-collage .c0 { left: 0; top: 50%; margin-top: -16%; z-index: 3; }
.xh-ch-collage .c1 { left: 30%; top: 4%; z-index: 2; opacity: .85; }
.xh-ch-collage .c2 { left: 44%; top: 44%; z-index: 1; opacity: .7; }
body.layout-channels .xh-cats { margin: 0 0 28px; }
body.layout-channels .xh-cats a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--xh-line); background: var(--xh-elev); font-size: 13px; color: var(--xh-text); }
body.layout-channels .xh-cats a:hover { border-color: var(--xh-amber); color: var(--xh-amber); }
body.layout-channels .xh-section-title { font-size: 20px; font-weight: 700; }
.xh-ch-free { display: inline-flex; align-items: center; margin-right: 10px; padding: 3px 8px; border-radius: 4px; background: var(--xh-amber); color: var(--xh-on-accent, #fff); font-size: 11px; font-weight: 800; letter-spacing: .04em; vertical-align: 2px; }
.xh-ch-nowrow { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 14px) / 5); gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.xh-ch-nowrow::-webkit-scrollbar { display: none; }
.xh-ch-nowcard { display: flex; flex-direction: column; gap: 6px; color: inherit; scroll-snap-align: start; min-width: 0; }
.xh-ch-nowcard .pic { position: relative; display: block; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #2a2a2a; }
.xh-ch-nowcard .pic img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.xh-ch-nowcard em { position: absolute; top: 8px; right: 8px; padding: 2px 6px; border-radius: 3px; background: #e11d48; color: #fff; font-style: normal; font-size: 10px; font-weight: 800; }
.xh-ch-nowcard .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); }
.xh-ch-nowcard .bar b { display: block; height: 100%; background: #f59e0b; }
.xh-ch-nowcard strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xh-ch-nowcard small { font-size: 12px; color: var(--xh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xh-ch-lists { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.xh-ch-list { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--xh-elev); color: inherit; border: 1px solid var(--xh-line); transition: border-color .2s ease; }
.xh-ch-list:hover { border-color: var(--xh-amber); }
.xh-ch-list .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 8px; overflow: hidden; }
.xh-ch-list .grid span { display: block; aspect-ratio: 2/3; background: #1c1c1f; }
.xh-ch-list .grid img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.xh-ch-list strong { margin-top: 6px; font-size: 15px; font-weight: 700; }
.xh-ch-list small { font-size: 12px; color: var(--xh-muted); }
@media (max-width: 900px) {
  .xh-ch-welcome { grid-template-columns: 1fr; min-height: 0; padding: 24px 20px; }
  .xh-ch-collage { display: none; }
  .xh-ch-nowrow { grid-auto-columns: 62%; gap: 10px; }
  .xh-ch-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ======================================================================
   curated — MUBI: light surface, full-bleed still with an uppercase title, FEATURED / NEW stills, COLLECTION banner
   ====================================================================== */
body.layout-curated { --xh-bg: #f4f4f2; --xh-elev: #ffffff; --xh-line: #e2e2de; background: var(--xh-bg); }
body.layout-curated .xh-nav { border-bottom: 0; padding: 14px 0; }
body.layout-curated .xh-nav-links { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 600; }
body.layout-curated .xh-hero { min-height: min(78vh, 680px); border-radius: 0; margin-left: -16px; margin-right: -16px; width: calc(100% + 32px); max-width: none; }
body.layout-curated .xh-hero-copy { min-height: min(78vh, 680px); max-width: 680px; padding: 48px 56px 56px; justify-content: space-between; color: #fff; }
body.layout-curated .xh-hero-shade { background: linear-gradient(0deg, rgba(0,0,0,.6) 0%, transparent 45%), linear-gradient(180deg, rgba(0,0,0,.35), transparent 40%); }
body.layout-curated .xh-hero .xh-eyebrow { order: -2; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: #fff; }
body.layout-curated .xh-hero h1 { order: -1; margin: 0; font-size: clamp(34px, 5vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.02em; text-transform: uppercase; }
body.layout-curated .xh-hero p { margin-top: auto; }
body.layout-curated .xh-hero .xh-chip { background: rgba(255,255,255,.18); color: #fff; }
body.layout-curated .xh-hero .xh-cta { border-radius: 2px; padding: 14px 32px; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; background: var(--xh-amber); color: var(--xh-on-accent, #fff); }
body.layout-curated .xh-hero .xh-cta.xh-cta--ghost { color: #fff; border-color: rgba(255,255,255,.7); background: transparent; }
body.layout-curated .xh-hero-dots { left: auto; right: 48px; bottom: 28px; }
.xh-cu-kicker { display: block; margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--xh-text); }
.xh-cu-sec { margin: 36px 0; }
.xh-cu-stills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.xh-cu-still { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: #111; color: #fff; }
.xh-cu-still img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .4s ease; }
.xh-cu-still:hover > img, .xh-cu-still:hover .xh-fit-fg { transform: scale(1.04); } /* the blurred backdrop keeps its own scale */
.xh-cu-still::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.75), transparent 50%); }
.xh-cu-still .cap { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.xh-cu-still .cap strong { font-size: 22px; font-weight: 800; line-height: 1.1; text-transform: uppercase; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xh-cu-still .cap small { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.xh-cu-still .cap small b { font-weight: 800; }
.xh-cu-still--sm .cap strong { font-size: 16px; }
.xh-cu-coll { position: relative; margin: 36px -16px; overflow: hidden; background: #0b1220; color: #fff; }
.xh-cu-coll-bg { position: absolute; inset: 0; }
.xh-cu-coll-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .55; }
.xh-cu-coll::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,10,20,.92) 0%, rgba(5,10,20,.6) 45%, rgba(5,10,20,.15) 100%); }
.xh-cu-coll-copy { position: relative; z-index: 1; max-width: 520px; padding: 64px 56px 48px; }
.xh-cu-coll-copy .xh-cu-kicker { color: rgba(255,255,255,.8); }
.xh-cu-coll-copy h2 { margin: 0 0 18px; font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; line-height: 1.05; text-transform: uppercase; letter-spacing: -.01em; }
.xh-cu-coll-copy h2 em { display: block; font-style: normal; color: color-mix(in srgb, var(--xh-amber) 65%, #fff); }
.xh-cu-coll-copy p { margin: 0 0 24px; font-size: 15px; line-height: 1.7; color: rgba(255,255,255,.85); }
.xh-cu-coll-copy .xh-cta { border-radius: 2px; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; background: #fff; color: #111; }
.xh-cu-coll-strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 0 16px 16px; }
body.layout-curated .xh-x .xh-kicker, body.layout-curated .xh-section-title { text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) {
  body.layout-curated .xh-hero, body.layout-curated .xh-hero-copy { min-height: min(70vh, 520px); }
  body.layout-curated .xh-hero-copy { padding: 28px 20px 40px; }
  body.layout-curated .xh-hero h1 { font-size: 34px; }
  body.layout-curated .xh-hero-dots { right: 20px; bottom: 16px; }
  .xh-cu-stills { grid-template-columns: 1fr; }
  .xh-cu-coll-copy { padding: 36px 20px 24px; }
  .xh-cu-coll-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 8px 8px; }
}
