/* ---------- self-hosted fonts (OFL) ----------
   Ostrich Sans = the site voice (box-office / cinema sign); the Bold cut is
   the inline/hollow brand face. DM Serif / Spectral / JetBrains Mono are the
   printable calendar's newsprint voice only. All under public/fonts/. */
@font-face { font-family: 'Ostrich Sans'; font-weight: bold; font-style: normal; font-display: swap; src: url("./fonts/OstrichSans-Bold.otf") format("opentype"); }
@font-face { font-family: 'Ostrich Sans Heavy'; font-weight: 900; font-style: normal; font-display: swap; src: url("./fonts/OstrichSans-Heavy.otf") format("opentype"); }
@font-face { font-family: 'Ostrich Sans Black'; font-weight: 900; font-style: normal; font-display: swap; src: url("./fonts/OstrichSans-Black.otf") format("opentype"); }
@font-face { font-family: 'DM Serif Display'; font-weight: 400; font-style: normal; font-display: swap; src: url("./fonts/DMSerifDisplay.woff2") format("woff2"); }
@font-face { font-family: 'Spectral'; font-weight: 400; font-style: normal; font-display: swap; src: url("./fonts/Spectral.woff2") format("woff2"); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url("./fonts/JetBrainsMono.woff2") format("woff2"); }

:root {
  --bg: #faf9f6;
  --text: #1f1d1a;
  --muted: #6b6560;
  /* strict B&W: accent reads as ink (was oxblood #8a3033). Links get an
     underline affordance since color no longer distinguishes them. */
  --accent: #1f1d1a;
  --line: #ddd8d0;
  --card: #ffffff;
  --badge-bg: #efe9df;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191817;
    --text: #ece8e2;
    --muted: #a39c93;
    --accent: #ece8e2;   /* strict B&W: ink = the light text color in dark mode */
    --line: #38352f;
    --card: #211f1d;
    --badge-bg: #2e2b26;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  max-width: 52rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 'Ostrich Sans Black', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- header: the lightbox marquee ----------
   A white illuminated sign panel. Thick left/right borders, thin top/bottom,
   1px track lines between rows. Stays white/lit in BOTH themes (it's a
   lightbox) — so it uses fixed ink-on-white, not the theme tokens. */
header {
  background: #fbfaf7;
  color: #14130f;
  border-top: 3px solid #14130f; border-bottom: 3px solid #14130f;
  border-left: 9px solid #14130f; border-right: 9px solid #14130f;
  margin: 0 0 1.25rem;
  overflow: hidden;
}
header h1 {
  margin: 0;
  padding: 0.35rem 1rem 0.2rem;
  text-align: center;
  font-family: 'Ostrich Sans', sans-serif;   /* the inline/hollow brand cut */
  font-weight: bold;
  font-size: clamp(1.9rem, 6vw, 3rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #14130f;
  border-bottom: 1px solid #bdb6a3;
}
/* short live titles injected by app.js into #marquee-titles */
#marquee-titles { display: block; }
.mq-title {
  display: flex; align-items: baseline; justify-content: center;
  gap: clamp(0.9rem, 4vw, 2.4rem);
  padding: 0.28rem 1rem;
  border-bottom: 1px solid #bdb6a3;
  font-family: 'Ostrich Sans Heavy', sans-serif;
  font-weight: 900;
  font-size: clamp(0.9rem, 2.6vw, 1.3rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #14130f;
  white-space: nowrap;
  overflow: hidden;
}
.mq-title:last-child { border-bottom: none; }
.mq-title .mq-date { color: #14130f; }
.mq-title .mq-venue { color: #4a463d; }
/* the tagline moves BELOW the lightbox, in the normal page voice */
.tagline {
  margin: 0.9rem 0 1.25rem; color: var(--muted); max-width: 38rem;
  font-family: system-ui, -apple-system, sans-serif; font-size: 0.95rem;
}

/* controls — the "chips" filter bar: each field is a notched ticket-chip
   (perforated ends via -webkit-mask), Ostrich labels, mono inputs. */
#controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.7rem;
  padding: 0.4rem 0;
  border: none;
  background: transparent;
}
/* ticket-chip filter field — a real, always-drawn border, with the ticket
   perforations "punched" by two background-colored circles overlapping the
   side borders (pseudo-elements, NOT a mask — a mask shaved the border off
   for some browsers). The circles sit on top of the border and erase a
   semicircle from each side, giving the notch without ever dropping an edge. */
.field {
  position: relative;
  display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--card);
  border: 1px solid var(--text);
  padding: 0.35rem 0.7rem;
}
.field::before, .field::after {
  content: "";
  position: absolute; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg);   /* page bg — a plain bite out of the box + its border */
}
/* a full circle centered exactly on each side border: it overlaps the border
   line and, being page-colored, erases a semicircle from it — a clean notch,
   no mask (so the border on the other three sides is never affected) */
.field::before { left: 0; transform: translate(-50%, -50%); }
.field::after  { right: 0; transform: translate(50%, -50%); }
.field label {
  font-family: 'Ostrich Sans Black', sans-serif;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
input, select {
  font: inherit;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: inherit;
  background: transparent;
  border: none;
  padding: 0.1rem 0.1rem;
  min-width: 6rem;
}

#status { min-height: 1.5em; color: var(--muted); font-size: 0.82rem; font-family: 'JetBrains Mono', monospace; }
#status .warn { color: var(--accent); }
#status a { color: var(--accent); }

/* map panel */
#mapsec { margin: 0.75rem 0 0; }
#maptoggle {
  font: inherit;
  font-size: 0.85rem;
  color: var(--accent);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
}
#maptoggle:hover { border-color: var(--accent); }
/* the About link sits in the toggle row, styled like the toggle buttons */
#abouttoggle {
  font: inherit;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem 0.7rem;
  margin-left: 0.4rem;
}
#abouttoggle:hover { border-color: var(--accent); }
#maphint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 40rem;
  font-family: 'JetBrains Mono', monospace;
}
#map {
  margin-top: 0.6rem;
  height: 380px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
@media (max-width: 600px) { #map { height: 280px; } }

/* map popup — MapLibre's default is a white box; theme it to the card palette
   so the venue name isn't white-on-white in dark mode. The tip is a bordered
   triangle, so its border color (per anchor) must track the box background. */
.maplibregl-popup-content {
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.maplibregl-popup-anchor-top .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--card); }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--card); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--card); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--card); }

/* venue popup body */
.vpop { min-width: 8rem; }
.vpop-name {
  display: block;
  font-family: 'Ostrich Sans Heavy', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  line-height: 1.05;
}
.vpop-sub { color: var(--muted); font-size: 0.8rem; margin-top: 0.05rem; }
.vpop-pick { color: var(--accent); font-size: 0.8rem; font-weight: 600; margin-top: 0.1rem; }
.vpop-next {
  margin-top: 0.35rem;
  padding-top: 0.3rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.vpop-row { display: flex; gap: 0.45rem; font-size: 0.8rem; line-height: 1.25; }
.vpop-when { color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vpop-title { color: var(--text); }

/* day sections — the centered ink day bar (paper text; inverts in dark) */
section.day { margin: 1.75rem 0; }
h2.dayhead {
  font-family: 'Ostrich Sans Heavy', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.35rem;
  text-align: center;
  margin: 0 0 1.1rem;
  padding: 0.32rem 0.7rem;
  background: var(--text);
  color: var(--bg);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* film cards — poster | body row, ink-on-paper.
   Separator lightens with the type scale on narrow screens. */
.filmcard {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 1.2rem;
  padding: 0 0 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 3px double var(--text);
}
.filmcard:last-child { border-bottom: none; margin-bottom: 0; }

.poster {
  width: 5.4rem;
  height: 8.1rem;              /* 2:3 vertical poster, COLOR */
  object-fit: cover;
  border-radius: 2px;
  background: var(--badge-bg);
  align-self: start;
}
.poster-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: 'Ostrich Sans Heavy', sans-serif;
  font-size: 2rem;
}

.filmcard-body { min-width: 0; }
.filmcard-body h3 {
  margin: 0;
  font-family: 'Ostrich Sans Heavy', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 1.5rem;
  line-height: 1.02;
}
.filmcard-body h3 .year { font-weight: 900; color: var(--muted); }

/* title + runtime share the first line; runtime pins right and stays on the
   title's line even when a long title wraps (the playground film-head). */
.film-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}
.film-head h3 { min-width: 0; }
.film-runtime {
  font-family: 'Ostrich Sans Black', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-align: right;
  flex: 0 0 auto;
}

/* the about line carries the series tags, level with the ABOUT text */
.about-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  margin: 0.02rem 0 0;
  min-width: 0;   /* let the tags column shrink so long badges can wrap */
}
.about-line details.about { margin: 0; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; min-width: 0; }
.badge {
  font-family: 'Ostrich Sans Black', sans-serif;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  line-height: 1.15;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  /* long series names (e.g. a full "post-film discussion" title) must wrap
     inside the tag rather than run off a narrow screen */
  max-width: 100%;
  overflow-wrap: break-word;
}

/* per-venue showtime lines — the marquee times.
   .chiplines holds one .chipline per venue: a .chipline-label (venue) and a
   .chips row of marquee times. More air above so a single line doesn't float
   above the poster's bottom edge (grows a touch on wider screens). */
.chiplines { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 1.3rem; }
@media (min-width: 620px) { .chiplines { margin-top: 1.7rem; } }
.chipline { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: baseline; }
.chipline-label {
  font-family: 'Ostrich Sans Black', sans-serif;
  font-weight: 900; text-transform: uppercase;
  font-size: 1rem; letter-spacing: 0.02em; color: var(--text);
  /* long venue names must wrap, not run off a narrow screen */
  min-width: 0; max-width: 100%; overflow-wrap: break-word;
}
.chips { display: inline-flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: baseline; }

/* the pick toggle joins the marquee time; wrap keeps them together */
.chipwrap { display: inline-flex; align-items: baseline; }

/* the signature marquee time: big hour + raised minutes + format, the whole
   time underlined = the buy link. Sold-out = one continuous strike. */
a.chip {
  font-family: 'Ostrich Sans Black', sans-serif; font-weight: 900;
  color: var(--text); white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: baseline;
  border-bottom: 1.5px solid var(--text);
  padding-bottom: 0;   /* underline hugs the digits, per the mockup */
  line-height: 1;
}
/* per the mockup: hour and raised minutes are near-glued; the format gets a
   real word gap */
a.chip .h { font-size: 1.25rem; letter-spacing: 0.02em; line-height: 0.95; }
a.chip .m { font-size: 1.02rem; position: relative; top: -0.1em; letter-spacing: 0.01em; margin-left: 0.05em; }
a.chip .fmt { font-size: 1.02rem; letter-spacing: 0.02em; margin-left: 0.34rem; }
a.chip:hover { color: var(--muted); border-bottom-color: var(--muted); }
a.chip.chip-soldout {
  color: var(--muted); pointer-events: none;
  border-bottom: none; position: relative;
}
a.chip.chip-soldout::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1.5px; background: currentColor;
}

/* the +/★ calendar-pick toggle (system glyphs, as before the redesign).
   Fixed-width box, glyph centered, so + and ★ occupy the same space and a
   pick never nudges the row. Star is set smaller so it doesn't tower. */
.chip-add {
  font: inherit;
  font-size: 0.95rem; line-height: 1;
  width: 1.4rem;   /* fixed box (rem, not em) so glyph size can't change width */
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.1rem 0;
  margin-left: 0.15rem;
  border: none; background: none;
  color: var(--muted);
  cursor: pointer;
}
.chip-add:hover { color: var(--text); }
/* ★ reads larger than + at the same size, so shrink it; also our accent ink */
.chip-add.picked { font-size: 0.82rem; color: var(--text); }

#plancount { font-size: 0.85rem; color: var(--muted); margin-left: 0.6rem; }
#plancount a { color: var(--accent); }

/* collapsed film synopsis (TMDb) — "ABOUT THIS FILM" toggle in the Ostrich
   label voice, tucked tight under the runtime/tags line. The revealed
   synopsis + links inside use the mono (typewriter) voice. */
details.about { margin: 0.15rem 0 0; color: var(--muted); }
details.about summary {
  cursor: pointer;
  width: fit-content;
  list-style: none;
  font-family: 'Ostrich Sans Black', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1rem;
  color: var(--muted);
}
details.about summary::-webkit-details-marker { display: none; }
details.about[open] summary { color: var(--text); }
details.about p {
  margin: 0.4rem 0 0.2rem; max-width: 42rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem; line-height: 1.6; text-transform: none; letter-spacing: 0;
}
details.about .about-meta { margin: 0.3rem 0 0.3rem; }

.empty { color: var(--muted); margin: 2rem 0; }

/* ---------- printable calendar poster ---------- */

#postertoggle {
  font: inherit;
  font-size: 0.85rem;
  color: var(--accent);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  margin-left: 0.4rem;
}
#postertoggle:hover { border-color: var(--accent); }
#postertoggle:disabled { opacity: 0.45; cursor: default; }
#postertoggle:disabled:hover { border-color: var(--line); }

#posterwrap {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  background: rgba(20, 18, 16, 0.6);
  padding: 3.6rem 1rem 2rem;
}
body.postering { overflow: hidden; }

#postertools {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
#postertools button {
  font: inherit;
  font-size: 0.85rem;
  color: var(--accent);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
}
#postertools button:hover { border-color: var(--accent); }

/* the sheet: fixed paper palette — this is ink on paper, never dark-mode.
   Newsprint programme voice (serif display + small-caps + mono times). Strict
   B&W: the accent (--pk) is ink, not oxblood. */
.poster-page {
  --pk: #16130f;      /* accent (day numbers, venue codes, month) — now ink */
  --ptext: #16130f;
  --pmut: #6a645d;
  --pline: #c9c3b8;
  --pout: #efece6;    /* days outside the covered range */
  background: #fff;
  color: var(--ptext);
  font-family: 'Spectral', Georgia, 'Times New Roman', serif;
  /* on-screen geometry mirrors the print content box so the overflow the
     fitter sees on screen is exactly what would spill a print page. Height is
     held under the 7.9in printable area (letter landscape minus @page 0.3in
     margins): a box filling the *full* printable height plus its forced
     page-break tips a hairline onto a second sheet, so we leave slack. */
  width: 10.4in;
  height: 7.4in;
  padding: 0.35in 0.85in;   /* generous side margins so header/foot/grid breathe */
  margin: 0 auto 1.4rem;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
#poster.bw .poster-page { --pk: #000; }

.pp-head {
  display: flex;
  align-items: baseline;
  gap: 0.25in;
  border-bottom: 2.5pt solid var(--ptext);
  padding-bottom: 5pt;
}
.pp-month { font-family: 'DM Serif Display', Georgia, serif; font-size: 24pt; font-weight: 400; letter-spacing: -0.01em; color: var(--pk); flex: 0 0 auto; }
.pp-brand { font-family: 'Spectral', serif; font-variant: small-caps; font-size: 9pt; font-weight: 600; letter-spacing: 0.12em; flex: 0 0 auto; }
/* scope: right-aligned, but allowed to wrap to a second line so a long
   "within N mi of ZIP · times in TZ" never runs to the sheet's right edge */
.pp-scope {
  margin-left: auto; flex: 0 1 auto; min-width: 0;
  font-family: 'Spectral', serif; font-size: 7.5pt; color: var(--pmut);
  text-align: right; line-height: 1.3; max-width: 3in;
}

.pp-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-family: 'Spectral', serif;
  font-variant: small-caps;
  font-size: 7.2pt;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--pmut);
  padding: 4pt 0 2pt;
}
.pp-dow span { padding-left: 3pt; }

.pp-weeks {
  flex: 1 1 auto;
  min-height: 0;      /* allow the flex child to shrink so overflow is real */
  overflow: hidden;   /* the fitter trims until scrollHeight <= clientHeight */
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--pline);
  border-left: 1px solid var(--pline);
}
.pp-week {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-height: 0.72in;
  break-inside: avoid;
  page-break-inside: avoid;
}
.pp-cell {
  border-right: 1px solid var(--pline);
  border-bottom: 1px solid var(--pline);
  padding: 2pt 3pt 3pt;
  min-width: 0;
}
.pp-cell.pp-out { background: var(--pout); }
.pp-daynum { font-family: 'DM Serif Display', Georgia, serif; font-size: 9.5pt; font-weight: 400; color: var(--pk); }
.pp-out .pp-daynum, .pp-empty .pp-daynum { color: var(--pmut); }

/* week strip (7-day poster): one full-height column per date */
.pp-daycols {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;      /* same clip contract as .pp-weeks */
  display: grid;         /* columns set inline: repeat(n, 1fr) */
  border-top: 1px solid var(--pline);
  border-left: 1px solid var(--pline);
  margin-top: 4pt;
}
.pp-daycol {
  border-right: 1px solid var(--pline);
  border-bottom: 1px solid var(--pline);
  padding: 3pt 5pt 5pt;
  min-width: 0;
  /* a fixed 7×5 grid: the day header, 5 equal film-row slots so every day's
     entries line up row-for-row across the week, then a short trailing row
     that holds the "+N more" note (so the note never eats a film slot). */
  display: grid;
  grid-template-rows: auto repeat(5, 1fr) auto;
  row-gap: 3pt;
}
.pp-dayhead {
  font-family: 'Spectral', serif;
  font-size: 8pt;
  color: var(--pmut);
  border-bottom: 1.2pt solid var(--pk);
  padding-bottom: 3pt;
  margin-bottom: 1pt;
}
.pp-dayhead-dow { font-variant: small-caps; font-weight: 700; color: var(--pk); letter-spacing: 0.06em; }

/* week-strip entries: one per fixed row slot, top-aligned, no separators
   (the aligned slots give the grid feel — no extra rules needed) */
.pp-week-strip .pp-daycol .pentry {
  min-height: 0; min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 7pt;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* TMDb backdrop strip above a week-strip entry — a horizontal B&W still,
   like the playground calendar. Hidden by the ink-saver B&W toggle. */
.pentry-txt { min-width: 0; }
.pthumb {
  display: block;
  width: 100%;
  height: 0.5in;
  object-fit: cover;
  border-radius: 0;
  background: var(--pout);
  margin-bottom: 3pt;
}
/* backdrops follow the sheet: color by default, grayscale when the reader
   flips "Switch to B&W" (the ink-saver / newsprint look) */
#poster.bw .pthumb { filter: grayscale(1) contrast(1.02); }
/* no-backdrop placeholder: a letter tile filling the same strip */
span.pthumb-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pmut);
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18pt;
  filter: none;
}

.pentry { font-family: 'Spectral', serif; font-size: 6.6pt; line-height: 1.3; margin-top: 2pt; overflow-wrap: break-word; }
.ptitle { font-weight: 700; }
.pyear { color: var(--pmut); font-style: italic; }
.pfmt { color: var(--pk); font-weight: 600; font-size: 5.8pt; text-transform: uppercase; letter-spacing: 0.04em; }
.ptimes { font-family: 'JetBrains Mono', monospace; font-size: 5.8pt; white-space: normal; }
.pvcode { color: var(--pk); font-weight: 700; }
.pmore { color: var(--pmut); font-style: italic; font-weight: 600; }
/* week strip: the "+N more" note sits in the trailing row, small, at the very
   bottom of the day column — not a film slot */
.pp-week-strip .pp-daycol .pmore {
  grid-row: -2;                 /* the trailing auto row */
  align-self: end;
  font-size: 6pt;
  padding-top: 2pt;
  border-top: 1px dotted var(--pline);
}

.pp-foot {
  border-top: 2.5pt solid var(--ptext);
  margin-top: 5pt;
  padding-top: 4pt;
  font-family: 'Spectral', serif;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 7pt;
  color: var(--pmut);
  display: flex;
  justify-content: space-between;
  gap: 0.3in;
  flex-wrap: nowrap;      /* fixed height: legend clips rather than wrapping,
                             so the footer can't steal rows from the grid and
                             desync the fit measurement from print layout */
  align-items: baseline;
}
.pp-legend {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pp-foot > span:last-child { flex: 0 0 auto; white-space: nowrap; }
.pp-legend b { color: var(--pk); }
.poster-empty { color: #fff; text-align: center; margin: 4rem 0; font-size: 1rem; }

/* print: only the sheets, landscape letter, one month per page */
@page cal { size: letter landscape; margin: 0.3in; }
@media print {
  body.postering > :not(#posterwrap) { display: none !important; }
  /* zero every ancestor's box so nothing adds to the page height — leftover
     body padding/margin is what tips a page onto a trailing blank sheet */
  body.postering { overflow: visible; background: #fff; margin: 0; padding: 0; }
  body.postering #posterwrap {
    position: static;
    overflow: visible;
    background: none;
    margin: 0;
    padding: 0;
  }
  body.postering #poster, body.postering #posterpages { margin: 0; padding: 0; }
  body.postering #postertools { display: none; }
  body.postering .poster-page {
    page: cal;
    /* keep the exact screen geometry the fitter measured against; just drop the
       shadow + bottom margin and force one month per sheet */
    box-shadow: none;
    margin: 0;
    page-break-after: always;
  }
  body.postering .poster-page:last-child { page-break-after: auto; }
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  font-family: system-ui, -apple-system, sans-serif;   /* body copy stays legible */
}
footer h2 {
  font-family: 'Ostrich Sans Heavy', sans-serif; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 1.15rem; color: var(--text);
}

/* ---------- About subpage: the "end credits" ----------
   Everything centered and rolling down the middle of the sheet, like a film's
   closing crawl, signed off with the incoherent logo. */
.about-page {
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--text);
  text-align: center;
  max-width: 42rem;
  margin: 2.5rem auto 0;
  padding: 0 1rem;
}
.about-page h2 {
  font-family: 'Ostrich Sans Heavy', sans-serif; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 1.05rem; color: var(--muted);
  margin: 2.8rem 0 0.6rem;
}
.about-page p {
  max-width: 34rem;
  margin: 0 auto 0.8rem;
  line-height: 1.75;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}
.about-page a { color: var(--accent); }

/* "Brought to you by" — same voice as the ABOUT / CREDITS section headers.
   (selector matches .about-page p specificity so the mono body rule doesn't
   override the font here) */
.about-page p.about-broughtby {
  font-family: 'Ostrich Sans Heavy', sans-serif; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 1.05rem; color: var(--muted);
  max-width: none;
  margin: 3.5rem 0 0.6rem;
}
/* the sign-off: incoherent logo + a small IG mark, linked */
.about-signoff {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 0 auto 1rem;
}
/* the sign-off logo — black art on light, white art on dark */
.about-logo {
  width: 9.5rem; max-width: 48%;
  height: auto;
  display: block;
}
.about-logo.dark { display: none; }
.about-ig { display: inline-flex; line-height: 0; }
.about-ig svg { width: 1.2rem; height: 1.2rem; display: block; }
.about-ig .ig-mark { fill: var(--text); transition: opacity 0.15s; }
.about-ig:hover .ig-mark { opacity: 0.6; }
@media (prefers-color-scheme: dark) {
  .about-logo.light { display: none; }
  .about-logo.dark { display: block; }
}

.about-back {
  display: inline-block;
  font-family: 'Ostrich Sans Black', sans-serif;
  text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  margin-top: 2rem;
}
.about-back:hover { border-color: var(--accent); }

/* responsive film rows: separators + type lighten with the viewport, so the
   double rule doesn't feel heavy on a phone (mirrors the locked playground). */
@media (max-width: 620px) {
  .filmcard { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.9rem;
    padding-bottom: 1rem; margin-bottom: 1rem; border-bottom-width: 2px; }
  .poster { width: 4.5rem; height: 6.75rem; }
  .filmcard-body h3 { font-size: 1.3rem; }
  .film-runtime { font-size: 1rem; }
  .chipline { flex-direction: column; gap: 0.2rem; }
}
@media (max-width: 480px) {
  .filmcard { grid-template-columns: 3.6rem minmax(0, 1fr); gap: 0.7rem;
    padding-bottom: 0.8rem; margin-bottom: 0.8rem; border-bottom: 1px solid var(--text); }
  .poster { width: 3.6rem; height: 5.4rem; }
  .filmcard-body h3 { font-size: 1.15rem; }
  .film-head { gap: 0.5rem; }
}
