/* The screening room (/films/, 2026-10-25, move 7 of MUSE_SCAN_2026-10-25.md): Kana's room. Linked only on /films/,
   right after hub.css, so nothing here reaches another page. On top the shorts (Luna and Her Eclipse, Elio and His
   Sunset since 2026-11-17, The Hat), then the
   six light pieces as a wall (3 by 2, 2 by 3 on a phone) where exactly one plays at a time, then how the light is made,
   and the stage, a <dialog> that assets/films.js fills and opens. Dark plates under every film: the light needs a
   black surround (a frameless test washed them out, the award scan). */

.films-page { --fw-ring:var(--cyan); --fw-plate:#05070c; --fw-radius:18px; }
/* lighter than --purple-2 on this page: the labels sit in the 3D layer's haze and still need 4.5:1 */
.films-page .eyebrow { color:#BB99FF; }
.films-page .sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ── the head: the room's name at marquee size. It stays the page's largest paint: every picture below is smaller. ── */
.films-head h1 { font-size:clamp(2.85rem, 11.4vw, 6.1rem); line-height:.95; }
.films-head .lede { max-width:44ch; }
.films-host { margin-top:18px; color:var(--soft); font-size:15px; font-weight:600; line-height:2.2; }
.films-host .crew-chip { vertical-align:middle; margin:0 1px 0 4px; }

/* ── the pair: two films side by side at every width, the same 16:9 plate, the play disc in the corner ── */
.films-pair .sec-head h2, .films-wall .sec-head h2 { max-width:none; }
.pair { list-style:none; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; align-items:start; }
.pair-card { display:flex; flex-direction:column; min-width:0; }
.pair-frame { position:relative; display:block; aspect-ratio:16 / 9; border-radius:var(--fw-radius); overflow:hidden; background:var(--fw-plate);
  box-shadow:0 0 0 1px rgba(255,255,255,.1), 0 30px 70px -36px rgba(0,0,0,.9); transition:box-shadow .2s ease; }
.pair-frame img { width:100%; height:100%; object-fit:cover; }
.pair-frame:hover { box-shadow:0 0 0 1px rgba(255,255,255,.3), 0 30px 70px -36px rgba(0,0,0,.9); }
.pair-frame:focus-visible { outline:3px solid var(--cyan); outline-offset:4px; border-radius:var(--fw-radius); }
.pair-play { position:absolute; left:10px; bottom:10px; display:inline-flex; align-items:center; gap:8px; pointer-events:none; }
.pair-disc { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:rgba(7,6,26,.74); box-shadow:0 0 0 2px rgba(255,255,255,.85); color:#fff; }
.pair-disc svg { width:18px; height:18px; margin-left:2px; fill:currentColor; }
.pair-label { display:none; padding:7px 12px; border-radius:999px; background:rgba(7,6,26,.8); color:#fff; font:600 14px/1 var(--f); }
.pair-kicker { margin-top:12px; color:#BB99FF; font-size:13px; font-weight:600; line-height:1.35; }
.pair-card h3 { margin-top:4px; font-size:clamp(1.12rem, 2.4vw, 1.6rem); color:var(--ink); }
.pair-line { margin-top:6px; color:var(--soft); font-size:14.5px; line-height:1.5; }
.pair-note { margin-top:8px; color:var(--muted); font-size:12.5px; line-height:1.5; }
@media (min-width:640px) {
  .pair { gap:24px; }
  .pair-disc { width:46px; height:46px; }
  .pair-disc svg { width:20px; height:20px; }
  .pair-play { left:14px; bottom:14px; gap:10px; }
  .pair-label { display:inline-block; }
  .pair-line { font-size:15.5px; }
  .pair-note { font-size:13px; }
}
@media (min-width:1000px) { .pair { gap:32px; } }
/* a phone: the pair as a program, one film to a row, the still beside its title and the words full width under it */
@media (max-width:639px) {
  .pair { grid-template-columns:minmax(0, 1fr); gap:28px; }
  .pair-card { display:grid; grid-template-columns:minmax(0, 46%) minmax(0, 1fr); column-gap:14px; }
  .pair-frame { grid-row:1 / span 2; align-self:center; border-radius:14px; }
  .pair-kicker { grid-column:2; margin-top:0; align-self:end; }
  .pair-card h3 { grid-column:2; align-self:start; }
  .pair-line, .pair-note { grid-column:1 / -1; }
  .pair-line { margin-top:12px; }
  .pair-play { left:8px; bottom:8px; }
  .pair-disc { width:32px; height:32px; box-shadow:0 0 0 1.5px rgba(255,255,255,.85); }
  .pair-disc svg { width:15px; height:15px; }
}
/* three shorts (2026-11-17, Elio and His Sunset): from 1000 px one row of three on the wall's own columns (its 28 px
   gutter, so each card stands over a light piece below); from 640 to 999 px two across and the last one centred under
   them at the same width, never alone at the left of a row (.pair-odd, any odd count); a phone keeps one to a row. */
@media (min-width:640px) {
  .pair-odd > .pair-card:last-child { grid-column:1 / -1; justify-self:center; width:calc((100% - 24px) / 2); }
}
@media (min-width:1000px) {
  .pair-odd > .pair-card:last-child { width:calc((100% - 32px) / 2); }
  .pair-3 { grid-template-columns:repeat(3, minmax(0, 1fr)); column-gap:28px; }
  .pair-3 > .pair-card:last-child { grid-column:auto; justify-self:stretch; width:auto; }
}

/* ── the wall: six plates, one of them playing. The ring and the "Playing" chip say which; the corner glyph says a
   tap opens it large. Stills under reduced motion and Save-Data (films.js never starts a preview there). ── */
.films-wall .lede { max-width:56ch; }
.wall { list-style:none; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:22px 12px; }
.fw-tile { min-width:0; }
.fw-frame { position:relative; display:block; aspect-ratio:4 / 5; border-radius:var(--fw-radius); overflow:hidden; background:var(--fw-plate);
  box-shadow:0 0 0 1px rgba(255,255,255,.09), 0 30px 70px -36px rgba(0,0,0,.9); transition:box-shadow .25s ease; -webkit-tap-highlight-color:transparent; }
.fw-frame img, .fw-frame video { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; }
.fw-frame video { opacity:0; transition:opacity .45s ease; }
.fw-tile.is-live .fw-frame video { opacity:1; }
.fw-frame:hover { box-shadow:0 0 0 1px rgba(255,255,255,.3), 0 30px 70px -36px rgba(0,0,0,.9); }
.fw-tile.is-on .fw-frame { box-shadow:0 0 0 2px var(--fw-ring), 0 0 0 7px rgba(62,231,224,.14), 0 30px 70px -36px rgba(0,0,0,.9); }
.fw-frame:focus-visible { outline:3px solid var(--cyan); outline-offset:5px; border-radius:var(--fw-radius); }
.fw-live { position:absolute; right:9px; top:9px; display:inline-flex; align-items:center; gap:6px; padding:4px 9px 4px 8px; border-radius:999px;
  background:rgba(7,6,26,.78); box-shadow:0 0 0 1px rgba(62,231,224,.45); color:#fff; font:600 11.5px/1.2 var(--f); letter-spacing:.02em;
  opacity:0; transition:opacity .3s ease; pointer-events:none; }
.fw-live::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--fw-ring); }
.fw-tile.is-live .fw-live { opacity:1; }
.fw-open { position:absolute; right:9px; bottom:9px; display:grid; place-items:center; width:34px; height:34px; border-radius:50%;
  background:rgba(7,6,26,.72); box-shadow:0 0 0 1px rgba(255,255,255,.35); color:#fff; pointer-events:none; }
.fw-open svg { width:16px; height:16px; }
.fw-frame:hover .fw-open, .fw-frame:focus-visible .fw-open { box-shadow:0 0 0 2px #fff; }
/* the phone-readable label an app page puts on its picture next to the answer (NYCHawk), kept on the plate */
.fw-frame .lf-tag, .st-frame .lf-tag { position:absolute; left:4%; bottom:22%; padding:3px 8px; border-radius:999px; background:rgba(8,10,18,.8);
  box-shadow:0 0 0 1px rgba(255,255,255,.16); color:#F4F3F8; font:600 11px/1.2 var(--f); letter-spacing:.02em; pointer-events:none; z-index:1; }
.st-frame .lf-tag { padding:4px 10px; font-size:12.5px; }
.fw-name { margin-top:12px; font-size:clamp(1.05rem, 1.9vw, 1.3rem); color:var(--ink); }
.fw-line { margin-top:3px; color:var(--soft); font-size:14px; line-height:1.45; }
.wall-note { margin-top:26px; color:var(--muted); font-size:13.5px; max-width:64ch; }
/* the wall's own Pause (WCAG 2.2.2), under the lede: films.js shows it only where previews can play */
.fw-hold { display:inline-flex; align-items:center; gap:8px; min-height:44px; margin-top:18px; padding:0 16px 0 13px; border-radius:999px;
  border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.07); color:var(--ink); font:600 14px/1 var(--f); letter-spacing:.01em;
  cursor:pointer; transition:background-color .16s ease, border-color .16s ease; }
.fw-hold:hover { background:rgba(255,255,255,.13); border-color:rgba(255,255,255,.34); }
.fw-hold:focus-visible { outline:3px solid var(--cyan); outline-offset:3px; }
.fw-hold[hidden] { display:none; }
.fw-hold svg { width:18px; height:18px; flex:0 0 auto; fill:currentColor; }
.fw-hold .fw-i-play, .fw-hold.is-held .fw-i-pause { display:none; }
.fw-hold.is-held .fw-i-play { display:block; }
@media (min-width:700px) {
  .wall { grid-template-columns:repeat(3, minmax(0, 1fr)); gap:30px 20px; }
  .fw-open { width:40px; height:40px; right:12px; bottom:12px; }
  .fw-open svg { width:18px; height:18px; }
  .fw-live { right:12px; top:12px; font-size:12.5px; padding:5px 11px 5px 9px; }
  .fw-frame .lf-tag { font-size:11.5px; }
  .fw-line { font-size:15px; }
}
@media (min-width:1000px) { .wall { gap:40px 28px; } }

/* ── how the light is made: the frame beside its lift map, a few real lines of the kit, two plain lines ── */
.how-grid { display:grid; grid-template-columns:minmax(0, 1fr); gap:22px; }
.how-head .eyebrow { margin-bottom:12px; }
.how-fig { margin:4px 0 6px; }
.how-pair { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:6px; border-radius:calc(var(--fw-radius) + 4px); background:#000;
  box-shadow:0 0 0 1px rgba(255,255,255,.12), 0 30px 70px -36px rgba(0,0,0,.9); }
.how-pair img { width:100%; height:auto; aspect-ratio:4 / 5; border-radius:var(--fw-radius); }
.how-fig figcaption { margin-top:10px; color:var(--muted); font-size:13.5px; }
.how-head h2 { max-width:18ch; }
.how-copy > p { margin-top:14px; color:var(--soft); font-size:1.05rem; max-width:58ch; }
.how-copy > p:first-child { margin-top:0; }
.how-code { margin:22px 0 0; max-width:58ch; }
.how-code pre { margin:0; padding:14px 16px; border-radius:14px; background:#07081A; border:1px solid var(--hair-2); color:#ECEAFF;
  font:13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.how-code .how-c { color:#ABA7D9; }
.how-code figcaption { margin-top:8px; color:var(--muted); font-size:13px; }
.how-copy > p.how-true { color:var(--ink); font-weight:500; }
.how-copy > p.how-true + p.how-true { margin-top:6px; }
/* from 900px the frame and its map stand on the left, the words beside them (the heading still comes first to read) */
@media (min-width:900px) {
  .how-grid { grid-template-columns:minmax(0, 5fr) minmax(0, 6fr); grid-template-areas:"fig head" "fig copy"; column-gap:56px; row-gap:18px; }
  .how-head { grid-area:head; align-self:end; }
  .how-fig { grid-area:fig; align-self:center; margin:0; }
  .how-copy { grid-area:copy; align-self:start; }
}

/* ── the stage: one dialog for every film, over a near-black room. A tall piece takes up to about 90% of the screen
   height with its words beside it; on a phone it runs edge to edge with the words under it. The Hat is 16:9. ── */
html.fw-lock { overflow:hidden; }
.stage [hidden] { display:none !important; } /* a slot or a button the film does not use (The Hat's captions, an empty line) */
.stage { position:fixed; inset:0; width:100%; height:100%; max-width:100%; max-height:100%; margin:0; padding:0; border:0;
  background:transparent; color:var(--ink); overflow:auto; overscroll-behavior:contain; font-family:var(--f); }
.stage::backdrop { background:rgba(3, 3, 12, .975); }
/* a closed stage is never drawn, even where the browser has no <dialog> of its own (Safari before 15.4 would show the
   empty player over the page, and films.js stops before wiring its close button there) */
.stage:not([open]) { display:none; }
/* a phone upright: the close button gets its own strip above the picture, so it never sits on the film's corner */
.st-box { position:relative; min-height:100%; display:grid; place-items:center; padding:calc(72px + env(safe-area-inset-top)) 0 28px; }
.st-inner { display:grid; grid-template-columns:minmax(0, 1fr); justify-items:center; align-items:center; gap:18px; width:100%; }
.st-frame { position:relative; overflow:hidden; background:var(--fw-plate); box-shadow:0 0 0 1px rgba(255,255,255,.1), 0 40px 120px -40px #000; }
.st-frame img, .st-frame video { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; }
.st-frame video { opacity:0; transition:opacity .45s ease; }
.stage.st-lit .st-frame video { opacity:1; }
/* one column (a phone, a tablet upright): the plate leaves room under it for the title and the buttons */
.stage[data-shape="tall"] .st-frame { aspect-ratio:4 / 5; width:min(100vw, calc((100svh - 280px) * .8)); }
.stage[data-shape="wide"] .st-frame { aspect-ratio:16 / 9; width:min(100vw, 1180px, calc((100svh - 220px) * 16 / 9)); }
.stage[data-shape="wide"] .st-frame video { object-fit:contain; }
.st-side { width:100%; max-width:560px; padding:0 24px; }
.stage[data-shape="wide"] .st-side { max-width:min(100vw, 1180px, calc((100svh - 220px) * 16 / 9)); }
/* a phone on its side: The Hat takes the height, its words and buttons follow below */
@media (max-height:500px) and (min-aspect-ratio:1/1) {
  .stage[data-shape="wide"] .st-frame, .stage[data-shape="wide"] .st-side { width:min(100vw, calc(88svh * 16 / 9)); max-width:none; }
}
.st-kicker { color:#BB99FF; font-size:12.5px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.st-title { margin-top:6px; font-size:clamp(1.5rem, 3.2vw, 2.2rem); color:var(--ink); }
.st-line { margin-top:8px; color:var(--soft); font-size:15px; }
.st-bar { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.st-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:0 16px 0 13px; border-radius:999px;
  border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.07); color:var(--ink); font:600 14px/1 var(--f); letter-spacing:.01em;
  cursor:pointer; transition:background-color .16s ease, border-color .16s ease; }
.st-btn[data-st="play"] { min-width:104px; }
.st-btn[data-st="sound"] { min-width:126px; }
.st-btn:hover { background:rgba(255,255,255,.13); border-color:rgba(255,255,255,.34); }
.st-btn:focus-visible, .st-close:focus-visible { outline:3px solid var(--cyan); outline-offset:3px; }
.st-btn svg { width:18px; height:18px; flex:0 0 auto; fill:currentColor; }
.st-btn .lf-on { display:none; }
.stage.st-playing [data-st="play"] .lf-off { display:none; }
.stage.st-playing [data-st="play"] .lf-on { display:block; }
.stage.st-loud [data-st="sound"] { border-color:var(--cyan); }
.stage.st-loud [data-st="sound"] .lf-off { display:none; }
.stage.st-loud [data-st="sound"] .lf-on { display:block; }
.stage.st-cc [data-st="cc"] { border-color:var(--cyan); }
.st-hdr { display:inline-flex; align-items:center; gap:8px; margin-top:14px; color:var(--ink); font-size:13.5px; font-weight:600; }
.st-hdr::before { content:"HDR"; padding:2px 7px; border-radius:6px; background:linear-gradient(90deg, #F3D58A, #FFFFFF); color:#16142E; font-size:11.5px; font-weight:800; letter-spacing:.06em; }
.st-hdr[hidden] { display:none; }
.st-cap { margin-top:14px; color:var(--soft); font-size:13.5px; line-height:1.6; max-width:62ch; }
.st-cap strong { color:var(--ink); font-weight:600; }
.st-more { margin-top:14px; }
.st-more .text-link { display:inline-flex; align-items:center; min-height:44px; white-space:normal; }
.st-which { display:block; color:var(--muted); font-size:12px; }
.st-which:empty { display:none; }
.st-close { position:fixed; top:max(12px, env(safe-area-inset-top)); right:12px; z-index:3; display:grid; place-items:center; width:48px; height:48px;
  border-radius:50%; border:1px solid rgba(255,255,255,.28); background:rgba(7,6,26,.8); color:#fff; cursor:pointer; }
.st-close svg { width:22px; height:22px; }
.st-close:hover { background:rgba(40,38,80,.9); }
.stage video::cue { font:600 clamp(14px, 2.1vw, 21px)/1.35 var(--f); color:#fff; background:rgba(0,0,0,.74); }
/* a laptop or a phone on its side: the plate up to about 90% of the screen height, its words beside it */
@media (min-aspect-ratio:1/1) and (min-width:640px) {
  .st-box { padding:max(20px, 5svh) 24px; }
  /* max-content, not auto: the plate clips (overflow hidden), so an auto column could be handed less than the plate's
     width and the words would slide over it */
  .stage[data-shape="tall"] .st-inner { grid-template-columns:max-content minmax(240px, 380px); justify-content:center; gap:clamp(24px, 3.5vw, 48px); width:auto; }
  .stage[data-shape="tall"] .st-frame { width:auto; height:min(88svh, 1350px, calc((100vw - 56px - 240px - clamp(24px, 3.5vw, 48px)) * 1.25)); border-radius:20px; }
  .stage[data-shape="tall"] .st-side { padding:0; }
  .stage[data-shape="wide"] .st-frame { border-radius:20px; }
  .stage[data-shape="wide"] .st-side { padding:0; }
}
@media (min-width:640px) and (max-aspect-ratio:1/1) { .stage .st-frame { border-radius:20px; } .st-box { padding:72px 24px 32px; } .st-side { padding:0; } }

@media (prefers-reduced-motion: reduce) {
  .fw-frame, .fw-frame video, .fw-live, .pair-frame, .st-frame video, .st-btn, .fw-hold { transition:none; }
}
@media (forced-colors: active) {
  .st-btn, .st-close, .fw-open, .pair-disc, .fw-hold { border:1px solid ButtonText; }
  .fw-tile.is-on .fw-frame { outline:2px solid Highlight; }
}
