/* Z-INDEX SCALE. Every z-index in src/site/css follows it.
   -1 #wipe | 1 sticky headings in the list, the saga list inside its line | 2 #films-ink | 3 #home, #circle, #pcircle
   4 the pages: #end, #poster, #info, #films | 5 floating panels over a page: #pop, the saga line (with its list), the .snap copy | 6 .ghost (flying words)
   A floating panel is a positioned element with its own z-index, never left to source order. The ending fades its blocks in with
   fill: both, which makes every block its own stacking context; so a floating child rises above its siblings (the chips) only
   through the z-index of its own parent (the saga line), and this is why the saga line itself carries a z-index. The saga list needs none of this:
   it is a popover, drawn in the top layer (the z-index only serves a browser without popovers). */
@font-face { font-family: "Fraunces Soft"; src: url(fraunces-soft.0f3a793066.woff2) format("woff2");
  font-weight: 700 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0152-0153, U+2013-2014, U+2018-201D, U+2022, U+2026, U+2190-2193, U+00D7, U+2212; }
@font-face { font-family: "Jost"; src: url(jost.4bcc366859.woff2) format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0152-0153, U+2013-2014, U+2018-201D, U+2022, U+2026, U+2190-2193, U+00D7, U+2212; }
/* metric-matched fallbacks so the swap does not jump */
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia Bold"), local("Georgia");
  size-adjust: 90%; ascent-override: 95%; descent-override: 25%; line-gap-override: 0%; }
@font-face { font-family: "Jost Fallback"; src: local("Arial");
  size-adjust: 100%; ascent-override: 98%; descent-override: 26%; line-gap-override: 0%; }
:root { --ink: #0B0B0B; --bone: #F2EBDA; --field: #FF6E4A; --fg: #0B0B0B;
  --display: "Fraunces Soft", "Fraunces Fallback", Georgia, serif;
  --text: "Jost", "Jost Fallback", Futura, "Avenir Next", "Century Gothic", sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--field); color: var(--fg); font-family: var(--text); font-synthesis: none; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; touch-action: manipulation; }
:focus-visible { outline: 4px solid var(--fg); outline-offset: 3px; }
[hidden] { display: none !important; }
ul { list-style: none; margin: 0; padding: 0; }
.sr { position: absolute; top: 0; left: 0; margin: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.error { margin: 0; padding: 48px; font-size: 22px; font-weight: 600; }
.error a { color: inherit; }

/* The field color wipes in from the side (behind the type). */
#wipe { position: fixed; inset: 0; z-index: -1; visibility: hidden; }
#stage { position: relative; min-height: 100vh; }

/* The ring: the name of the site, top left. It is home. */
#home { position: absolute; z-index: 3; left: clamp(20px, 3.35vw, 48px); top: 40px; width: 84px; height: 84px; border: 5px solid var(--fg); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-size: 10px; font-weight: 700; line-height: 1.2; letter-spacing: .1em; text-indent: .1em; text-transform: uppercase; white-space: nowrap;
  transition: background-color .2s linear, border-color .2s linear, color .2s linear; }
#home:focus-visible { background: var(--fg); color: var(--field); }
#home .again, #home:focus-visible span:not(.again) { display: none; }
#home:focus-visible .again { display: block; }
#home:focus-visible { outline-offset: 4px; }
/* The sentence: settled clauses, then the open one. All sizes come from fit() as custom properties on #stage. */
#sentence { margin: 0; padding: calc(var(--top) + var(--lift)) var(--pr) 56px var(--pad); font-family: var(--display); font-weight: 900; text-transform: uppercase; }
#settled, .snap { margin: 0 0 var(--sgap, 0px); text-wrap: pretty; font-size: var(--S); line-height: 1.18; }
#settled:empty { display: none; }
.snap { position: fixed; z-index: 5; pointer-events: none; margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; }
.c { white-space: nowrap; }
.a { display: inline-block; padding: .02em .14em .06em; background: var(--ink); color: var(--field); font: inherit; line-height: 1; text-transform: none; white-space: nowrap; text-align: center; }
.gap { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 max(3px, .07em) var(--ink); }
.gap:focus-visible { background: transparent; color: var(--ink); outline: 0; box-shadow: inset 0 0 0 max(5px, .14em) var(--ink); }
.a:focus-visible { background: var(--field); color: var(--ink); outline: 4px solid var(--ink); outline-offset: -4px; }
.more { font: inherit; text-transform: none; text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .1em; }
.more:focus-visible { background: var(--ink); color: var(--field); }

#open { font-size: var(--L); line-height: .98; white-space: nowrap; }
#frame { position: relative; display: inline-block; vertical-align: top; margin: var(--cap) 0 0 calc(var(--L) * .12);
  padding: var(--padv) calc(var(--padh) + var(--disc) * .6) var(--padv) var(--padh); font: 500 var(--O)/1 var(--text); text-transform: none; text-align: left; }
#frame::before { content: ""; position: absolute; inset: 0; border: var(--border) solid var(--ink); transform-origin: left; pointer-events: none; }
#open.stack #frame { display: block; width: fit-content; min-width: var(--framew, 0px); margin: var(--drop) 0 0; }
#options, #popopts { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows), var(--rowh)); column-gap: var(--gap); }
#options button, #popopts button { display: flex; align-items: center; width: 100%; height: 100%; padding: 0 0 0 .3em; white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent; }
#options .w, #popopts .w { padding: .12em .3em .16em; }
#options .k, #popopts .k { flex: none; width: calc(var(--O) * .76); font-size: 13px; font-weight: 600; letter-spacing: .05em; opacity: .8; transform: translateY(calc(var(--O) * .3275 - 3.5px)); } /* sits on the baseline of the word */
.nokeys #options .k, .nokeys #popopts .k { display: none; }
/* One highlighted row: the mouse moves the focus, the keyboard moves it too; the hover only counts while the keyboard is idle. */
.kbd #options button:focus, .kbd #popopts button:focus { background: var(--ink); color: var(--field); outline: 0; }
#options button:focus-visible, #popopts button:focus-visible { outline: 0; }
#options button:active, #popopts button:active { transform: scale(.98); transition: transform .08s; }
#circle, #pcircle { position: absolute; z-index: 3; top: calc(var(--disc) / -2); right: calc(var(--disc) / -2); width: var(--disc); height: var(--disc); border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--disc) * .02); background: var(--ink); color: var(--field); text-align: center;
  transition: background-color .2s linear, color .2s linear, opacity .2s linear; }
#circle b, #pcircle b { font: 900 calc(var(--disc) * .4)/.9 var(--display); font-variant-numeric: lining-nums; }
#circle[data-n="3"] b, #pcircle[data-n="3"] b { font-size: calc(var(--disc) * .32); }
#circle i, #pcircle i { font: normal 600 calc(var(--disc) * .125)/1 var(--text); letter-spacing: .14em; text-indent: .14em; text-transform: uppercase; }
#circle:focus-visible, #pcircle:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--field), 0 0 0 8px var(--ink); }

#back, #skip { position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); min-width: 44px; min-height: 44px; padding: 12px; text-align: center; font-size: 16px; font-weight: 700; letter-spacing: .14em; text-indent: .14em; text-transform: uppercase; }
#back { left: calc(var(--pad) - 12px); }
#skip { right: calc(var(--pad) - 12px); }
#back:focus-visible, #skip:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
/* The ending: the finished sentence with the title right under it, centered next to the poster. */
#end { z-index: 4; isolation: isolate; }
#poster { display: block; position: relative; }
#poster img, #poster .ph { display: block; width: 100%; height: 100%; object-fit: cover; border: 3px solid var(--ink); }
#poster .ph { padding: 20px; background: var(--bone); color: var(--ink); font: 900 28px/.95 var(--display); text-transform: uppercase; }
#info { padding-bottom: var(--title-h, 0px); }
#info h2 { margin: 0; font: 900 var(--title-size)/.9 var(--display); text-transform: uppercase; overflow-wrap: break-word; text-wrap: balance; }
#info h2:focus { outline: none; }
#info p { margin: .5em 0 0; font-size: 24px; font-weight: 500; line-height: 1.5; }
#info p .nw { white-space: nowrap; }
@media (max-width: 599px) { #info p { font-size: 18px; } }
#info .fits { display: block; margin-top: 2px; font-size: 18px; font-weight: 700; line-height: 1.6; text-transform: uppercase; letter-spacing: .14em; text-decoration: underline; text-underline-offset: 4px; }
#info .fits:focus-visible { background: var(--ink); color: var(--field); }
#stage:not(.stacked).ending { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--top) - 8px) 0 calc(var(--top) - 32px); } /* 20px of play: the estimate of the text height is a few lines off at worst */
#stage:not(.stacked) #end { display: contents; }
#stage:not(.stacked) #poster { position: absolute; z-index: 4; left: var(--poster-x); top: calc(50% - (var(--poster-h) + var(--row-h, 0px) + var(--credit-h, 0px)) / 2); width: var(--poster-w); height: var(--poster-h); } /* the poster and the row of alternatives under it are centered together */
#stage:not(.stacked) #info { position: relative; z-index: 4; width: calc(var(--pad) + var(--colw)); padding-left: var(--pad); }
#stage.ending #settled { margin-bottom: 0; }
#stage.ending #sentence { padding: 0 var(--pr) var(--gap) var(--pad); }
#stage.ending.stacked #sentence { padding: var(--top) var(--pr) 24px var(--pad); }
#stage.stacked #end { position: relative; padding: 8px var(--pad) 40px; }
#stage.stacked #poster { width: var(--poster-w); height: var(--poster-h); margin: 0 auto 28px; }
/* The pick: the others fade, the frame and the disc go, the word turns into an ink block (see js/transitions.js). */
.leaving #options li:not(.pick), .leaving #frame::before, .leaving #circle { opacity: 0; transition: opacity .12s cubic-bezier(.2, .7, .2, 1); }
.leaving .pick button { background: var(--ink); color: var(--field); transition: background-color .12s linear, color .12s linear; }
.leaving .pick .k { opacity: 0; transition: opacity .12s linear; }
.landing #open, .landing #end, .landing #pop, .reopen #open, .reopen #end, .landing .last, .landing .gap { visibility: hidden; }
.ghost { position: fixed; left: 0; top: 0; z-index: 6; pointer-events: none; }
.ghost i { position: absolute; background: var(--ink); transform-origin: 0 0; }
.ghost b { position: absolute; left: 0; top: 0; line-height: 1; white-space: nowrap; }
.ghost .j { font-family: var(--text); font-weight: 500; }
.ghost .f { font-family: var(--display); font-weight: 900; }
.ghost.lead { margin: 0; font: 900 1em/.98 var(--display); text-transform: uppercase; white-space: pre; transform-origin: 0 0; }
@media (max-width: 599px) {
  #home { left: 20px; top: 20px; width: 72px; height: 72px; border-width: 4px; font-size: 9.5px; letter-spacing: .08em; text-indent: .08em; }
  #back, #skip { bottom: calc(8px + env(safe-area-inset-bottom)); background: var(--field); } /* flat field plate: text scrolling underneath never shows through */
}
/* A stacked ending (phone, narrow tablet): BACK is the last thing of the page, in the flow under the row, never over the tiles, the labels or the chips. */
#stage.stacked.ending #back { position: static; display: block; margin: 16px 0 calc(12px + env(safe-area-inset-bottom)) calc(var(--pad) - 12px); background: none; }
@media (max-height: 559px) { #stage.ending #home { display: none; }
  #stage:not(.stacked).ending { padding: 40px 0; } } /* a short window: the ending has room for the sentence only */
@media (pointer: coarse) { #info .fits { display: flex; align-items: center; min-height: 40px; } }
@media (max-width: 599px) {
  #open { scroll-margin-bottom: 64px; } /* the options end above BACK and SKIP */
  #stage.ending.stacked #end { padding-bottom: 8px; }
  #stage.ending { padding-bottom: 12px; }
  #info .fits { display: flex; align-items: center; min-height: 40px; margin-top: 0; font-size: 16px; line-height: 1.25; }
  #info .tags + .fits { margin-top: 10px; }
}
/* A touch screen: the settled words answer a thumb in a taller area than their ink block. */
@media (pointer: coarse), (max-width: 599px) { #settled .a, #settled .more { position: relative; } #settled .a::after, #settled .more::after { content: ""; position: absolute; inset: -9px -3px; } }
@media (max-width: 359px) { #info p { font-size: 16px; } #home { font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* A reopened answer: the frame of options as an overlay at the word (see renderPop in js/render.js); the options and the disc share the rules above. */
#pop { position: absolute; z-index: 5; width: fit-content; padding: var(--padv) calc(var(--padh) + var(--disc) * .6) var(--padv) var(--padh); background: var(--field); font: 500 var(--O)/1 var(--text); text-transform: none; text-align: left; }
#pop::before { content: ""; position: absolute; inset: 0; border: var(--border) solid var(--ink); pointer-events: none; }
.editing #open, .editing #poster, .editing #info { opacity: .3; }
#popopts button[aria-current] .w { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }
/* Hover: every clickable thing answers the pointer with a flat inversion or an underline. Hover rules only where a pointer can hover (touch has no stuck hover); keyboard focus has its own rules above. */
@media (hover: hover) {
  #home:hover { background: var(--fg); color: var(--field); }
  #home:hover span:not(.again) { display: none; }
  #home:hover .again { display: block; }
  .a:hover { background: var(--field); color: var(--ink); outline: 4px solid var(--ink); outline-offset: -4px; }
  .gap:hover { background: transparent; color: var(--ink); outline: 0; box-shadow: inset 0 0 0 max(5px, .14em) var(--ink); }
  .more:hover { background: var(--ink); color: var(--field); }
  body:not(.kbd) #options button:hover, body:not(.kbd) #popopts button:hover { background: var(--ink); color: var(--field); outline: 0; }
  #circle:hover, #pcircle:hover { background: var(--field); color: var(--ink); box-shadow: inset 0 0 0 4px var(--ink); }
  #back:hover, #skip:hover { text-decoration: underline; text-underline-offset: 4px; }
  #info .fits:hover { background: var(--ink); color: var(--field); }
}
#circle:focus-visible, #pcircle:focus-visible { background: var(--field); color: var(--ink); box-shadow: inset 0 0 0 4px var(--ink), 0 0 0 4px var(--field), 0 0 0 8px var(--ink); }
/* Links on the poster: three flat round buttons in a column down its right border from the top, each half outside the poster and half over it, always visible. Tags under the facts: flat, not clickable (filled = in your sentence, outlined = the film also has it). */
#poster .icons { position: absolute; top: 12px; right: 0; transform: translateX(50%); display: flex; flex-direction: column; gap: 8px; }
.ico { --bg: var(--ink); width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--field); box-shadow: 0 0 0 1px var(--field); cursor: pointer; transition: transform .12s; }
.ico svg { width: 78%; height: 78%; }
.ico:focus-visible { background: var(--field); color: var(--ink); --bg: var(--field); box-shadow: 0 0 0 1px var(--ink), 0 0 0 4px var(--field), 0 0 0 6px var(--ink); transform: scale(1.1); outline: 0; }
@media (hover: hover) { .ico:hover { background: var(--field); color: var(--ink); --bg: var(--field); box-shadow: 0 0 0 1px var(--ink); transform: scale(1.1); } }
@media (max-width: 899px) { .ico { width: 40px; height: 40px; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; cursor: default; }
.tags li { padding: 1px 11px 3px; border: 2px solid var(--ink); border-radius: 1em; font-size: 15px; font-weight: 500; white-space: nowrap; }
.tags .hit { background: var(--ink); color: var(--field); font-weight: 700; }
#info .tags + .fits { margin-top: 14px; }
/* The saga's film count: hover, focus or tap opens a flat ink list of its films under the line. The list is a popover (the top layer, above everything, placed by
   ending.js from the line's coordinates); only a browser without popovers uses the absolute box below, in the line's own stacking context. */
#info .sagaline { position: relative; z-index: 5; }
#info .sagacount { font: inherit; text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: pointer; }
#info .sagacount:focus-visible, .sagaline.open .sagacount { background: var(--ink); color: var(--field); outline: 0; }
#info #sagalist { margin: 0; padding: 12px 18px 14px; list-style: none; box-sizing: border-box; width: max-content; overflow: auto; background: var(--ink); color: var(--field); border: 0; font-size: 17px; font-weight: 500; line-height: 1.5; box-shadow: 0 0 0 6px var(--field); }
#info #sagalist[popover] { position: fixed; inset: auto; }
#info #sagalist:not([popover]) { display: none; position: absolute; z-index: 1; left: 0; top: 100%; max-width: min(460px, calc(100vw - 2 * var(--pad))); }
#info .sagaline::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px; } /* no gap between the line and its list for the pointer to fall through */
#info .sagaline.open #sagalist:not([popover]) { display: block; }
#info .sagaline.up #sagalist:not([popover]) { top: auto; bottom: 100%; }
#info .sagaline.up::after { top: auto; bottom: 100%; }
@media (max-width: 599px) { #info #sagalist { font-size: 15px; padding: 10px 14px 12px; } }
/* The shelf of the ending: "Or something more…" and a row of up to four tiny posters, each under a one-word label (a feeling the film has and the
   featured one lacks). Flat: the field color, ink type, 2px ink tile borders; no panel ever covers content. The row is exactly as wide as the poster
   (same left and right edges; a poster too narrow for four tiles gets a centered row of 318px at most; ending.js sets --row-w, --row-h, --tile and --cols): the tiles sit in equal columns from edge to edge, one row on every screen. */
#shelf { z-index: 4; color: var(--ink); }
#more { margin: 10px 0 6px; font: 500 18px/22px var(--text); }
#shelf ul { display: grid; grid-template-columns: repeat(var(--cols, 4), var(--tile, 80px)); justify-content: space-between; row-gap: 10px; }
#shelf li { width: var(--tile, 80px); }
#shelf button { display: flex; flex-direction: column; align-items: center; width: 100%; min-height: 40px; }
#shelf .lbl { height: 16px; margin-bottom: 4px; padding: 0; border-radius: 999px; font: 700 13px/16px var(--text); white-space: nowrap; }
#shelf .tile { display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; border: 2px solid var(--ink); background: var(--bone); transition: transform .12s; }
#shelf .tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
#shelf .tile .ph { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; padding: 6px 4px; font: 900 10px/.95 var(--display); text-align: center; text-transform: uppercase; }
#shelf button:focus-visible { outline: 0; }
#shelf button:focus-visible .tile { outline: 3px solid var(--ink); outline-offset: 3px; }
#shelf button:focus-visible .lbl { background: var(--ink); color: var(--field); box-shadow: 0 0 0 4px var(--ink); }
@media (hover: hover) { #shelf button:hover .tile { transform: translateY(-4px); } }
#shelf button:active .tile { transform: scale(.97); }
#stage:not(.stacked) #shelf { position: absolute; left: calc(var(--poster-x) + (var(--poster-w) - var(--row-w)) / 2); top: calc(50% + (var(--poster-h) - var(--row-h) - var(--credit-h, 0px)) / 2); width: var(--row-w); height: var(--row-h); }
#stage.stacked #shelf { width: var(--row-w); margin: clamp(28px, 4.5vh, 40px) auto 0; } /* clear of the chips */
@media (max-width: 599px) {
  #more { margin: 0 0 12px; font-size: 16px; } /* the line sits on the row's left edge, the same margin as the sentence and the chips */
  #stage.stacked #shelf .lbl { width: calc(100% + 8px); margin: 0 -4px 4px; overflow: hidden; text-overflow: ellipsis; text-align: center; } /* a long label may use the gap beside it (8px at least), else it is cut with an ellipsis */
}
@media (max-width: 340px) { #stage.stacked #shelf .lbl { font-size: 12px; } } /* the smallest phones: 'disorienting' still fits */
@media (prefers-reduced-motion: reduce) { #shelf .tile { transform: none !important; } }
/* The TMDB credit (required attribution) under the row: the logo in black (the terms allow black or white), the sentence in 8px Jost at most (smaller on a narrow row), in the row's width and
   left edge. ending.js sets --credit-h (what layout.js reserves: the 3px above it and the single line). */
#credit { z-index: 4; display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 3px 0 0; color: var(--ink); white-space: nowrap; font: 400 clamp(5px, calc((var(--row-w, 438px) - 60px) / 32), 8px)/10px var(--text); } /* one line at every width: the text shrinks with the row, never wraps */
#credit a { position: relative; display: block; flex: none; height: 7px; }
#credit a::after { content: ""; position: absolute; inset: -8px -6px; } /* a transparent hit area: the visible logo and the layout stay as they are */
#credit img { display: block; height: 7px; width: auto; }
#credit a:focus-visible { outline-offset: 2px; outline-width: 2px; }
#credit span { flex: none; }
#stage:not(.stacked) #credit { position: absolute; left: calc(var(--poster-x) + (var(--poster-w) - var(--row-w)) / 2); top: calc(50% + (var(--poster-h) + var(--row-h) - var(--credit-h, 0px)) / 2); width: var(--row-w); margin: 0; padding-top: 3px; }
#stage.stacked #credit { width: var(--row-w); margin: 3px auto 0; }
/* The list of movies left. The disc's ink (#films-ink) spreads over the page and the disc fades out; the ring stays
   visible above it, the sentence is below it, the list above all. */
#films-ink { position: fixed; inset: 0; z-index: 2; display: none; background: var(--ink); }
body.films-open { overflow: hidden; }
/* The disc goes once the iris edge has passed it. */
body.films-open #end { visibility: hidden; transition: visibility 0s linear .3s; } /* the ending's card goes once the iris has passed it */
body.films-open #circle, body.films-open #pop { opacity: 0; transition: opacity .15s linear .3s; pointer-events: none; }
body.films-open #home { background: var(--ink); border-color: var(--bone); color: var(--bone); transition-delay: .3s, .3s, .3s; }
body.films-open #home:focus-visible, body.films-open #home:hover { background: var(--bone); color: var(--ink); transition-delay: 0s; }

#films { position: fixed; inset: 0; z-index: 4; pointer-events: none; color: var(--bone); --pad: 12px; --ycol: 72px; --row: 12px; --title: clamp(20px, 2.4vw, 34px); }

#films-box { position: absolute; display: flex; flex-direction: column; pointer-events: auto; }
#films header { flex: none; padding: 0 var(--pad) 14px; }
#films h2 { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: rgba(242, 235, 218, .7); }
#films h2:focus { outline: none; }
#films-close { position: fixed; left: calc(var(--page-pad, 48px) - 12px); bottom: calc(12px + env(safe-area-inset-bottom)); min-width: 44px; min-height: 44px; padding: 12px; font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; text-indent: .14em; color: var(--bone); }
#films-close:hover, #films-close:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
#films :focus-visible { outline: 3px solid var(--bone); outline-offset: 2px; }

#films-scroll { flex: 1; min-height: 0; overflow: hidden; scrollbar-width: thin; scrollbar-color: rgba(242, 235, 218, .3) transparent; }
#films-box.ready #films-scroll { overflow-y: auto; }
#films ul { list-style: none; margin: 0; padding: 0; }
#films li { border-top: 1px solid rgba(242, 235, 218, .18); }
#films-scroll > ul > li:last-child, #films .dec > ul > li:last-child { border-bottom: 1px solid rgba(242, 235, 218, .18); }
#films .row { display: grid; grid-template-columns: var(--ycol) 1fr; align-items: baseline; width: 100%; padding: var(--row) var(--pad); color: var(--bone); }
#films .y { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; color: var(--films-year); }
#films .t { font-family: var(--display); font-size: var(--title); font-weight: 800; text-transform: uppercase; line-height: 1; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
/* Hover and focus: a flat field-colored plate, no transition. */
#films .n { font: 700 15px/1 var(--text, Jost, sans-serif); text-transform: none; letter-spacing: .02em; white-space: nowrap; margin-left: .6em; color: var(--films-year); }
#films .row:hover .n, #films .row:focus .n { color: var(--ink); }
#films .row:hover, #films .row:focus { background: var(--films-field); color: var(--ink); }
#films .row:hover .y, #films .row:focus .y { color: var(--ink); }
#films .row:hover .t, #films .row:focus .t { -webkit-line-clamp: unset; }
#films:not(.compact) .t { margin-right: 132px; }

#films-poster { position: absolute; right: 0; width: 120px; height: 180px; object-fit: cover; border: 3px solid var(--bone); background: var(--ink); pointer-events: none; }
#films-poster[hidden] { display: none; }

/* Many films: compact rows, sticky decade headers (the list is then in year order). */
#films.dense { --row: 8px; --title: 22px; }
#films.dense li:not(.dec) { content-visibility: auto; contain-intrinsic-size: auto 44px; scroll-margin-top: 34px; }
#films .dec { border-top: 0; }
#films .dec h3 { position: sticky; top: 0; z-index: 1; margin: 0; padding: 12px var(--pad) 8px; background: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--films-year); }

/* One film left: the title is the poster. */
#films.solo #films-box { flex-direction: row; align-items: center; }
#films.solo header { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
#films.solo #films-scroll { flex: 0 1 auto; overflow: visible; }
#films.solo li { border: 0; }
#films.solo #films-scroll > ul > li:last-child { border: 0; }
#films.solo .row { display: flex; flex-direction: column; padding: 0; pointer-events: none; }
#films.solo .row:hover, #films.solo .row:focus { background: none; color: var(--bone); }
#films.solo .t { margin: 0; font-size: clamp(48px, 7vw, 110px); line-height: .95; -webkit-line-clamp: 3; }
#films.solo .y { order: 2; margin-top: 20px; font-size: 24px; }
#films.solo .row:hover .y, #films.solo .row:focus .y { color: var(--films-year); }
#films.solo #films-poster { position: static; flex: none; width: 200px; height: 300px; margin-left: 48px; }

/* Narrow: the list moves closer to the circle and the poster is a small fixed thumbnail. */
#films.compact { --ycol: 56px; }
#films.compact #films-poster { top: auto; bottom: 0; width: 96px; height: 144px; }
#films.compact.solo #films-poster { position: static; width: 120px; height: 180px; margin-left: 24px; }
