/* Z4 · Muzi on Screen | 木子放映厅 (XV work order, user-approved 2026-10-10). Page-only styles, loaded by
   p/Z/<lang>/Z4.html after index.css: a dark cinema screen (the newest film) above a paper film-program —
   episodes, vertical cuts, playlists — on Muzi's ink, paper and cinnabar. Site fonts only (no web fonts). */
.z4-page {
  --z4-paper-2: #f3efe7; --z4-ink: #1a1a24; --z4-mist: #5c5a68; --z4-rule: #ddd6c9; --z4-cinnabar: #9e2a2b;
  --z4-gold: #866222; --z4-screen: #0b0c0e; --z4-screen-fg: #f0ece4; --z4-flap: #ff5a3c;
  --z4-display: "Noto Serif SC", "Songti SC", Georgia, serif; --z4-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  max-width: 1120px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 56px; display: grid; gap: 56px; color: var(--z4-ink);
}
/* Light only, like the rest of the site (muzi-master 2026-10-10: the dark-mode text overrides left the
   page near-white on white). The cinema screen stays dark by design. */
.z4-page a { color: inherit; }
.z4-page :focus-visible { outline: 2px solid var(--z4-cinnabar); outline-offset: 3px; }
.z4-page h1, .z4-page h2, .z4-page h3 { margin: 0; text-wrap: balance; }
.z4-eyebrow { font: 500 .72rem/1 var(--z4-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--z4-gold); }
.z4-eyebrow.is-gold { color: #e8c47d; }
.z4-alt { font-weight: 500; color: var(--z4-mist); margin-left: 10px; font-size: .6em; letter-spacing: .08em; }

/* masthead */
.z4-mast { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; }
.z4-mast h1 { font: 700 clamp(2.4rem, 6vw, 4.2rem)/1.05 var(--z4-display); margin-top: 14px; }
.z4-mast h1 .z4-alt { display: block; margin: 10px 0 0; font-size: .44em; letter-spacing: .3em; }
.z4-mast p { max-width: 58ch; margin: 16px 0 0; color: var(--z4-mist); }
.z4-channel { display: grid; gap: 14px; justify-items: end; }
.z4-handle { display: flex; align-items: center; gap: 12px; font: 500 .95rem var(--z4-mono); }
.z4-handle img { width: 44px; height: 44px; }
.z4-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.z4-seal { display: inline-grid; place-items: center; width: 84px; height: 84px; background: var(--z4-cinnabar); color: #fff7ef !important;
  text-decoration: none; border-radius: 6px; transform: rotate(-4deg); box-shadow: inset 0 0 0 3px rgba(255,255,255,.18); transition: transform .2s; text-align: center; }
.z4-seal b { font: 700 1.5rem/1 var(--z4-display); letter-spacing: .08em; }
.z4-seal small { display: block; font: 500 .6rem/1 var(--z4-mono); letter-spacing: .14em; margin-top: 6px; text-transform: uppercase; }
.z4-seal:hover { transform: rotate(0) scale(1.04); }
.z4-ghost { font: 500 .85rem var(--z4-mono); text-decoration: none; border-bottom: 1px solid var(--z4-rule); padding-bottom: 2px; }
.z4-ghost:hover { border-color: var(--z4-cinnabar); color: var(--z4-cinnabar); }

/* the screen */
.z4-screen { background: var(--z4-screen); color: var(--z4-screen-fg); border-radius: 4px; padding: clamp(14px, 3vw, 28px) 0; position: relative; overflow: hidden; }
.z4-screen::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(232,196,125,.55), transparent); animation: z4-scan 7s linear infinite; }
@keyframes z4-scan { from { transform: translateY(0); } to { transform: translateY(640px); } }
.z4-frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.z4-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; }
.z4-feature { position: absolute; inset: 0; display: block; }
.z4-feature img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform 6s ease-out, opacity .35s; }
.z4-screen:hover .z4-feature img { transform: scale(1.06); }
.z4-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,12,14,0) 45%, rgba(11,12,14,.85)); pointer-events: none; }
.z4-play { position: absolute; z-index: 2; left: 50%; top: 44%; translate: -50% -50%; width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(11,12,14,.35); backdrop-filter: blur(3px);
  border: 2px solid var(--z4-flap); animation: z4-ping 2.4s ease-out infinite; }
.z4-play svg { width: 30px; margin-left: 5px; fill: currentColor; }
@keyframes z4-ping { 0% { box-shadow: 0 0 0 0 rgba(255,90,60,.5); } 80%, 100% { box-shadow: 0 0 0 26px rgba(255,90,60,0); } }
.z4-caption { position: absolute; z-index: 2; left: clamp(16px, 4vw, 40px); right: clamp(16px, 4vw, 40px); bottom: clamp(14px, 3vw, 30px);
  display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; pointer-events: none; }
.z4-caption h2 { font: 700 clamp(1.5rem, 3.6vw, 2.6rem)/1.1 var(--z4-display); margin-top: 8px; color: var(--z4-screen-fg); }
.z4-caption .z4-alt { color: rgba(240,236,228,.7); }
.z4-route { font: 400 .8rem var(--z4-mono); color: rgba(240,236,228,.72); margin-top: 6px; letter-spacing: .06em; }
.z4-runtime { display: grid; gap: 6px; justify-items: end; }
.z4-runtime span { font: 500 .62rem var(--z4-mono); letter-spacing: .2em; color: rgba(240,236,228,.55); }
.z4-flaps { display: flex; gap: 3px; font: 500 1.7rem/1 var(--z4-mono); }
.z4-flaps i { font-style: normal; width: 1.05em; padding: 6px 0; text-align: center; color: var(--z4-flap); background: #191b1f; border-radius: 3px; position: relative; box-shadow: inset 0 -1px 0 #000; }
.z4-flaps i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.75); }
.z4-flaps i.sep { background: none; width: .5em; color: rgba(240,236,228,.5); }
.z4-frame.is-playing .z4-caption, .z4-frame.is-playing .z4-feature { visibility: hidden; }
.z4-screen-note { font: 400 .74rem var(--z4-mono); color: rgba(240,236,228,.5); padding: 14px clamp(16px, 4vw, 40px) 0; margin: 0; }

/* program */
.z4-sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--z4-ink); padding-bottom: 12px; }
.z4-sec-head h2 { font: 700 clamp(1.6rem, 3.4vw, 2.2rem)/1.1 var(--z4-display); margin-top: 8px; }
.z4-sec-head p { margin: 4px 0 0; color: var(--z4-mist); max-width: 52ch; }
.z4-ep { display: grid; grid-template-columns: 96px minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--z4-rule); }
.z4-num { font: 500 .7rem var(--z4-mono); letter-spacing: .2em; color: var(--z4-mist); }
.z4-num b { display: block; font: 700 2.8rem/1 var(--z4-display); letter-spacing: 0; color: var(--z4-ink); margin: 4px 0; }
.z4-thumb { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; border-radius: 3px; background: var(--z4-screen); }
.z4-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.z4-thumb:hover img { transform: scale(1.05); }
.z4-thumb .z4-play { left: auto; top: auto; right: 10px; bottom: 10px; translate: none; width: 34px; height: 34px; border: 0; animation: none; background: var(--z4-cinnabar); }
.z4-thumb .z4-play svg { width: 12px; margin-left: 2px; }
.z4-ep h3 { font: 700 1.5rem/1.2 var(--z4-display); }
.z4-sub { margin: 4px 0 10px; color: var(--z4-mist); }
.z4-chips { display: flex; flex-wrap: wrap; gap: 8px; font: 400 .74rem var(--z4-mono); }
.z4-chip { border: 1px solid var(--z4-rule); border-radius: 999px; padding: 3px 10px; color: var(--z4-mist); }
.z4-chip.is-new { border-color: var(--z4-cinnabar); color: var(--z4-cinnabar); }
.z4-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; }
.z4-links button, .z4-links a { font: 500 .85rem var(--z4-mono); background: none; border: 0; padding: 0 0 2px; cursor: pointer; color: var(--z4-ink);
  text-decoration: none; border-bottom: 1px solid var(--z4-rule); }
.z4-links .is-primary { color: var(--z4-cinnabar); border-color: var(--z4-cinnabar); }
.z4-links :hover { color: var(--z4-cinnabar); border-color: var(--z4-cinnabar); }

/* vertical cuts */
.z4-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 22px; }
.z4-short { display: grid; gap: 10px; align-content: start; }
.z4-short-pic { position: relative; display: block; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--z4-screen); box-shadow: 0 0 0 1px var(--z4-rule); }
.z4-short-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.z4-short-pic:hover img { transform: scale(1.04); }
.z4-shorts-tag { position: absolute; left: 10px; top: 10px; font: 500 .6rem var(--z4-mono); letter-spacing: .2em; color: #fff; background: rgba(11,12,14,.6); padding: 4px 8px; border-radius: 999px; }
.z4-short-t { font-size: .9rem; line-height: 1.35; }
.z4-short-m { font: 400 .72rem var(--z4-mono); color: var(--z4-mist); }

/* playlists */
.z4-stubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 22px; }
.z4-stub { display: grid; grid-template-columns: minmax(0, 1fr) 92px; text-decoration: none; background: var(--z4-paper-2); border-radius: 6px; overflow: hidden; transition: transform .2s; }
.z4-stub:hover { transform: translateY(-2px); }
.z4-stub-body { padding: 20px 22px; display: grid; gap: 6px; min-width: 0; }
.z4-stub h3 { font: 700 1.25rem/1.2 var(--z4-display); }
.z4-stub p { margin: 0; color: var(--z4-mist); font-size: .92rem; }
.z4-id { font: 400 .7rem var(--z4-mono); color: var(--z4-mist); letter-spacing: .08em; overflow-wrap: anywhere; }
.z4-tear { border-left: 2px dashed var(--z4-rule); display: grid; place-items: center; font: 700 1.6rem var(--z4-display); color: var(--z4-cinnabar); text-align: center; }
.z4-tear small { display: block; font: 500 .6rem var(--z4-mono); letter-spacing: .18em; color: var(--z4-mist); }
.z4-foot { font-size: .86rem; color: var(--z4-mist); border-top: 1px solid var(--z4-rule); padding-top: 18px; display: grid; gap: 6px; max-width: 80ch; }
.z4-foot a { color: var(--z4-cinnabar); }

/* Shorts lightbox (9:16) */
.z4-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(6,7,9,.86); }
.z4-lightbox[hidden] { display: none; }
.z4-lightbox-frame { height: min(86vh, 860px); aspect-ratio: 9 / 16; max-width: 92vw; background: #000; border-radius: 10px; overflow: hidden; }
.z4-lightbox-frame iframe { width: 100%; height: 100%; border: 0; }
.z4-lightbox-close { position: absolute; top: 16px; right: 18px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.4); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }

@media (max-width: 760px) {
  .z4-mast { grid-template-columns: 1fr; }
  .z4-channel { justify-items: start; }
  .z4-actions { justify-content: flex-start; }
  .z4-ep { grid-template-columns: 1fr; gap: 12px; }
  .z4-num b { display: inline; font-size: 1.6rem; margin: 0 6px; }
  .z4-shelf { grid-template-columns: repeat(4, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .z4-short { scroll-snap-align: start; }
  .z4-stubs { grid-template-columns: 1fr; }
  .z4-play { width: 64px; height: 64px; }
  /* phones: the caption leaves the poster (its own titles show through) and sits under the frame */
  .z4-frame { aspect-ratio: auto; overflow: visible; background: none; }
  .z4-feature { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
  .z4-frame iframe { inset: 0 0 auto 0; height: auto; aspect-ratio: 16 / 9; }
  .z4-feature::after { display: none; }
  .z4-caption { position: static; padding: 14px clamp(16px, 4vw, 40px) 0; pointer-events: auto; }
  .z4-frame.is-playing .z4-caption { visibility: visible; }
  .z4-flaps { font-size: 1.2rem; }
}
@media (max-width: 600px) {
  .lang-en .z4-caption h2 { font-size: 1.25rem; }
  .lang-en .z4-mast h1 { font-size: 2.1rem; }
  .lang-en .z4-ep h3 { font-size: 1.2rem; }
  .lang-en .z4-mast p, .lang-en .z4-sub { font-size: .9rem; }
  .z4-caption .z4-alt { display: none; }
}
@media (prefers-reduced-motion: reduce) { .z4-page *, .z4-page *::before, .z4-page *::after { animation: none !important; transition: none !important; } }

/* XV review (2026-10-10): the caption bar sits under the poster at every width (the posters carry their
   own titles and history strip); the footnote is the plain, full-width program note; EN display type
   uses the site serif (AGENTS: EN serif overrides need !important against .lang-en sans). */
.z4-frame { aspect-ratio: auto; overflow: visible; background: none; }
.z4-feature { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.z4-feature::after { display: none; }
.z4-frame iframe { inset: 0 0 auto 0; height: auto; aspect-ratio: 16 / 9; }
.z4-caption { position: static; padding: 18px clamp(16px, 4vw, 40px) 0; pointer-events: auto; }
.z4-frame.is-playing .z4-caption { visibility: visible; }
.z4-foot { max-width: none; width: 100%; background: none; }
.lang-en .z4-page :is(h1, h2, h3), .lang-en .z4-page .z4-num b, .lang-en .z4-page .z4-tear { font-family: "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif !important; }
