/* The films page: a canvas cloth, the open film's card, the regulars.
   Tokens and type are base.css's. The regulars and the card follow the
   films page of adames.cc as it stood on 26 November 2026. */
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The page's own sides: the cloth runs nearly edge to edge, and the heading
   starts on the cloth's left edge. */
.sheet { padding-inline: clamp(var(--space-3), 3vw, var(--space-7)); }
.sheet .page-head { margin-bottom: var(--space-5); }
.still { display: block; width: 100%; height: auto; }

/* Buttons, on both pages: the one thing to do next, and the quieter ones. */
.go { display: inline-block; font: inherit; padding: var(--space-2) var(--space-4); border: var(--border-w) solid var(--text); background: var(--text); color: var(--bg); border-radius: 4px; cursor: pointer; text-decoration: none; }
.go[disabled] { opacity: 0.5; cursor: default; }
.quiet { font: inherit; font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); background: none; border: 0; padding: var(--space-1) var(--space-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.quiet:hover { color: var(--text); }
/* A text box under 16px makes an iPhone zoom the page in and leave it there. */
input, textarea { font-size: max(16px, 1em); }

.view { --chip-w: 22.5rem; --sky: 3.5rem; --named: 1.375rem; --name: 0.9375rem; --seam: 2px; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.view > * { grid-column: 1; min-width: 0; }

.cloth-box { position: relative; }
.cloth { display: block; width: 100%; cursor: pointer; touch-action: pan-y; outline-offset: 4px; }
.cloth-label { position: absolute; margin: 0; padding: 2px 6px; transform: translate(-50%, -130%); white-space: nowrap; pointer-events: none; font-size: var(--step--1); color: var(--bg); background: var(--text); border-radius: 3px; }

/* Under the cloth: what a reader, or the page's maker, can do with it. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.actions:empty { display: none; }
.actions p { margin: 0; flex: 1 1 100%; max-width: 44rem; }
.actions .note { font-size: var(--step--1); color: var(--muted); }

/* The open film. The colors are the card: bands as tall as their share of
   the poster, the title on the largest, the facts on the next. Where there
   is no room beside the cloth it lies along the foot of the screen, over
   the page, so it is seen wherever the page has been scrolled to. */
.film { position: fixed; z-index: 5; inset: auto 0 0 0; display: flex; flex-direction: column; height: min(15rem, 46vh); overflow: hidden; border-radius: 8px 8px 0 0; box-shadow: 0 -8px 28px rgb(0 0 0 / 0.35); padding-bottom: env(safe-area-inset-bottom); }
/* Room at the very end of the page, so all of it can be scrolled out from
   under the card. */
body:has(.view.open) { padding-bottom: min(15rem, 46vh); }
.band { display: flex; flex: 1 1 0; flex-direction: column; justify-content: flex-end; min-height: 0; }
.band-text { flex-basis: auto; padding: var(--space-3) var(--space-5); gap: var(--space-1); }
.film h3 { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: var(--step-2); line-height: 1.05; text-transform: lowercase; overflow-wrap: anywhere; }
.film h3 a { color: inherit; text-decoration: none; }
.film h3 a:hover, .film h3 a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.facts { margin: 0; font-size: var(--step--1); line-height: 1.5; color: inherit; }
.facts .line { display: block; }
.name { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.shut { position: absolute; top: var(--space-2); right: var(--space-2); z-index: 1; font-size: var(--step--1); color: #f6f4ef; background: rgb(0 0 0 / 0.45); border: 0; border-radius: 3px; padding: 4px 10px; cursor: pointer; }

/* The regulars: a field, then every role. */
.regulars { display: grid; gap: var(--space-3); min-width: 0; }
.find { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; }
.find input { font-family: var(--font-mono); width: min(16rem, 100%); min-height: 2.25rem; padding: 0; color: var(--text); background: none; border: 0; border-bottom: var(--border-w) solid var(--border-strong); border-radius: 0; }
.find input::placeholder { color: var(--muted); opacity: 1; }
.find input:focus-visible { outline: 2px solid var(--accent); outline-offset: var(--space-1); }
.find input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.loved { font: inherit; font-family: var(--font-mono); font-size: var(--step--1); min-height: 2.25rem; color: var(--muted); background: none; border: 0; border-bottom: var(--border-w) solid transparent; padding: 0; cursor: pointer; }
.loved.on { color: var(--text); border-bottom-color: var(--accent); }
.find [role="status"] { font-size: var(--step--1); color: var(--text); }

/* Where there is room, the five roles stand side by side on the cloth's
   width, each headed by its own word. */
.columns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--seam); }
.column { display: grid; gap: var(--seam); align-content: start; min-width: 0; }
.column h3 { margin: var(--space-3) 0 var(--space-3); font-size: var(--step--1); font-weight: 400; color: var(--text); }
/* A sky is a ribbon: 3.5rem tall, its name on one line in the dark. The
   name's part of the ribbon shows the sky's top quarter and the rest shows
   the other three: two hard-edged pieces of one sky, so the name always
   lies on its dark, whoever's sky it is. */
.person { position: relative; display: block; width: 100%; height: var(--sky); min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; cursor: pointer; text-align: left; }
.person-pour { position: absolute; inset: 0; }
.person-pour::before, .person-pour::after { content: ""; position: absolute; inset-inline: 0; background: var(--sky-paint, var(--border)); }
.person-pour::before { top: 0; height: var(--named); background-position: top; background-size: 100% calc(var(--named) / 0.25); }
.person-pour::after { bottom: 0; height: calc(var(--sky) - var(--named)); background-position: bottom; background-size: 100% calc((var(--sky) - var(--named)) / 0.75); }
/* The page's plain face at a middle weight, a size under the text: fifty
   names in the heading's bold serif shouted over the title. */
.person-name { position: absolute; z-index: 1; inset: calc(var(--named) - 1em) var(--space-4) auto var(--space-4); color: var(--ink, var(--text)); font-family: var(--font-sans); font-weight: 500; font-size: var(--name); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person:focus-visible { outline: 2px solid var(--ink, currentColor); outline-offset: -4px; }
.person.on::after { content: ""; position: absolute; inset: 0; z-index: 2; border: 2px solid var(--ink, currentColor); pointer-events: none; }
/* Stepped back: in a column a search has answered, the ones it had before. */
.person.dim { opacity: 0.22; }

.tabs { display: none; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0; font-size: var(--step--1); }
.tabs button { font: inherit; min-height: 2.25rem; color: var(--muted); background: none; border: 0; border-bottom: var(--border-w) solid transparent; padding: 0; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.foot { margin: var(--space-6) 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3) var(--space-5); font-size: 0.75rem; line-height: 1.7; color: var(--muted); }
.foot .notice { flex: 1 1 100%; max-width: 40rem; font-size: 0.6875rem; }
.foot button { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.foot input { font-family: inherit; width: min(14rem, 100%); color: var(--text); background: none; border: 0; border-bottom: var(--border-w) solid var(--border-strong); border-radius: 0; padding: 2px 0; }

/* Beside the cloth: on a wide, tall screen an open film's card stands to
   the right and stays there as the page scrolls; the cloth and the columns
   stop at its margin. */
@media (min-width: 56rem) and (min-height: 34.001rem) {
  .view.open { grid-template-columns: minmax(0, 1fr) var(--chip-w); }
  body:has(.view.open) { padding-bottom: 0; }
  .film { position: sticky; inset: auto; top: var(--space-4); grid-column: 2; grid-row: 1 / span 6; height: min(36rem, 100vh - 2 * var(--space-4)); border-radius: 4px; box-shadow: none; padding-bottom: 0; }
  .band-text { padding: var(--space-4) var(--space-5); gap: var(--space-2); }
  .film h3 { font-size: var(--step-3); }
  .facts { line-height: 1.6; }
  .shut { top: var(--space-3); right: var(--space-3); padding: 2px 8px; }
}
/* Narrower than five columns can stand: one role at a time, chosen by tabs,
   its ribbons two abreast. With a card open that is anything under 78rem. */
@media (max-width: 67.999rem) {
  .tabs { display: flex; }
  .columns { grid-template-columns: minmax(0, 1fr); }
  .column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .column:not(.on), .column h3 { display: none; }
}
@media (max-width: 77.999rem) {
  .view.open .tabs { display: flex; }
  .view.open .columns { grid-template-columns: minmax(0, 1fr); }
  .view.open .column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view.open .column:not(.on), .view.open .column h3 { display: none; }
}
/* A phone: the ribbons one to a row. */
@media (max-width: 39.999rem) {
  .column, .view.open .column { grid-template-columns: minmax(0, 1fr); }
}
