/* cartelera: design system ported from croquis / El Organillero's editorial
   visual language. Light only: no dark theme, no theme toggle. */

:root {
  --bg: #f8f8f8;
  --bg-edge: #f0f0f0;
  --bg-card: #ffffff;
  --line-stroke: #969696;

  --ink-1: rgba(0, 0, 0, 0.92);
  --ink-2: rgba(0, 0, 0, 0.78);
  --ink-3: rgba(0, 0, 0, 0.55);
  --ink-4: rgba(0, 0, 0, 0.42);
  --ink-5: rgba(0, 0, 0, 0.45);
  --ink-border: rgba(0, 0, 0, 0.18);
  --ink-border-soft: rgba(0, 0, 0, 0.08);
  --ink-rule: rgba(0, 0, 0, 0.05);

  --live: #e63946;
  --ready: #4f9e5b;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 28px; --sp-8: 32px; --sp-9: 36px;

  --rad-sm: 4px; --rad-md: 6px; --rad-lg: 8px; --rad-pill: 999px;

  --shadow-tooltip: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-button:  0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-panel:   0 1px 3px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.10);
  --shadow-medallion: 0 1px 2px rgba(0, 0, 0, 0.08);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --dur-fast: 150ms;
  --dur-base: 220ms;
  --dur-slow: 700ms;

  --focus-ring: rgba(0, 0, 0, 0.08);
  --focus-ring-strong: rgba(0, 0, 0, 0.10);

  /* sede colors — taken from Cineteca's own site, where it defines them
     inline on its sede <select>. Not derived from --live/--ready:
     this site has no "live" indicator, so red keeps meaning "México"
     and nothing else. */
  --sede-003: #EB1C23;  /* México      */
  --sede-001: #28724F;  /* Chapultepec */
  --sede-002: #653090;  /* Las Artes   */

  color-scheme: light;
}

* { box-sizing: border-box; }

/* app.js toggles visibility via the `hidden` attribute throughout (agenda vs.
   empty/error states, search-clear, stale banner). Several component rules
   below set their own `display` (flex/grid) at equal-or-higher specificity
   than the UA `[hidden]{display:none}` rule, which would otherwise win and
   keep the "hidden" element showing. This settles it unconditionally. */
[hidden] { display: none !important; }

html, body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-stack);
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-strong);
  border-radius: var(--rad-sm);
}

img { max-width: 100%; }

/* Off-screen but readable by assistive tech — #results-status only. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

noscript {
  display: block;
  padding: var(--sp-6);
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- editorial vocabulary (ported unchanged) ---------- */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-feature-settings: "tnum" 1;
}

.hairline {
  width: 36px;
  height: 1px;
  background: var(--line-stroke);
  opacity: 0.5;
  margin: var(--sp-4) auto var(--sp-5);
}

.signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: lowercase;
}
.signature::before,
.signature::after {
  content: "";
  width: 18px; height: 1px;
  background: var(--line-stroke);
  opacity: 0.5;
  flex: none;
}

.medallion {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--rad-pill);
  background: var(--line-color, #1a1a1a);
  color: var(--medallion-text, #ffffff);
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.01em;
  font-feature-settings: "tnum" 1;
  flex: none;
  box-shadow: var(--shadow-medallion);
}
.medallion.sm { width: 22px; height: 22px; font-size: 10px; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  border: 1px solid transparent;
  background: #1a1a1a;
  color: #ffffff;
  border-radius: var(--rad-pill);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.10);
  transition:
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
.pill-btn:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 22px rgba(0, 0, 0, 0.14);
}
.pill-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.10);
}
.pill-btn:focus-visible {
  outline: none;
  border-color: var(--ink-1);
  box-shadow: 0 0 0 3px var(--focus-ring-strong), 0 6px 16px rgba(0, 0, 0, 0.10);
}
.pill-btn.secondary {
  background: transparent;
  color: var(--ink-3);
  border-color: var(--ink-border);
  box-shadow: none;
}
.pill-btn.secondary:hover {
  color: var(--ink-1);
  border-color: var(--ink-1);
  transform: none;
  box-shadow: none;
  background: transparent;
}
.pill-btn.sm { padding: 8px 16px; font-size: 12.5px; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--rad-pill);
  border: 1px solid var(--ink-border-soft);
  background: var(--bg-card);
  color: var(--ink-3);
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.icon-btn:hover { color: var(--ink-1); border-color: var(--ink-border); }
.icon-btn:focus-visible {
  outline: none;
  color: var(--ink-1);
  border-color: var(--ink-border);
  box-shadow: 0 0 0 2px var(--focus-ring), var(--shadow-button);
}

.kofi-btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--rad-pill);
  border: 1px solid var(--ink-border-soft);
  background: var(--bg-card);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.kofi-btn-compact:hover { color: var(--ink-1); border-color: var(--ink-border); }
.kofi-btn-compact:focus-visible {
  outline: none;
  color: var(--ink-1);
  border-color: var(--ink-border);
  box-shadow: 0 0 0 2px var(--focus-ring), var(--shadow-button);
}
.kofi-btn-compact .kofi-icon path { stroke: #ff5e5b; }
.kofi-btn-label { line-height: 1; }

/* ---------- about modal (ported unchanged) ---------- */

#about-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: var(--sp-4);
}
#about-modal[hidden] { display: none; }
.about-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
#about-modal.visible .about-backdrop { opacity: 1; }
.about-content {
  position: relative;
  min-width: 0;
  max-width: 440px;
  width: 100%;
  max-height: calc(100vh - 2 * var(--sp-4));
  overflow-y: auto;
  overflow-wrap: break-word;
  padding: 32px 32px 26px;
  background: var(--bg-card);
  border: 1px solid var(--ink-border-soft);
  border-radius: var(--rad-md);
  box-shadow: var(--shadow-panel);
  text-align: center;
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
#about-modal.visible .about-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.about-title {
  font-size: 26px;
  font-weight: var(--fw-bold);
  color: var(--ink-1);
  text-transform: lowercase;
  margin-bottom: var(--sp-3);
}
.about-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 var(--sp-2);
}
.about-body a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.about-body a:hover { color: var(--ink-1); }
.about-body + .about-body { padding-top: var(--sp-2); }
.about-start-btn { width: 100%; margin-top: var(--sp-2); }
.about-author { margin-top: var(--sp-6); }
.about-author-name {
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  color: var(--ink-1);
  text-transform: lowercase;
}
.about-author-links {
  margin-top: var(--sp-1);
  font-size: 11.5px;
  color: var(--ink-3);
}
.about-author-links a { color: inherit; text-decoration: none; }
.about-author-links a:hover { color: var(--ink-1); }

/* ---------- film sheet ---------- */

#film-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  z-index: 160;
  align-items: flex-end;
  justify-content: center;
}
#film-sheet[hidden] { display: none; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
#film-sheet.visible .sheet-backdrop { opacity: 1; }
.sheet-content {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  overflow-wrap: break-word;
  padding: var(--sp-6) var(--sp-5) max(var(--sp-6), env(safe-area-inset-bottom));
  background: var(--bg-card);
  border: 1px solid var(--ink-border-soft);
  border-radius: var(--rad-lg) var(--rad-lg) 0 0;
  box-shadow: var(--shadow-panel);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
#film-sheet.visible .sheet-content {
  opacity: 1;
  transform: translateY(0);
}
.sheet-grab {
  width: 36px;
  height: 4px;
  border-radius: var(--rad-pill);
  background: var(--ink-border);
  margin: 0 auto var(--sp-4);
}
.sheet-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
}

@media (min-width: 640px) {
  #film-sheet { align-items: center; padding: var(--sp-4); }
  .sheet-content {
    border-radius: var(--rad-md);
    max-height: calc(100vh - 2 * var(--sp-4));
    transform: translateY(8px) scale(0.985);
  }
  #film-sheet.visible .sheet-content { transform: translateY(0) scale(1); }
  .sheet-grab { display: none; }
}

html.sheet-open { overflow: hidden; }

.sheet-head {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding-right: var(--sp-8);
}
.sheet-head .poster-wrap { width: 96px; flex: none; }
.sheet-head-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sheet-title {
  margin: 0;
  font-size: 17px;
  font-weight: var(--fw-bold);
  color: var(--ink-1);
  text-transform: uppercase;
  line-height: 1.25;
  overflow-wrap: break-word;
}
.sheet-original {
  font-size: 12px;
  font-style: italic;
  color: var(--ink-4);
}
.sheet-head-info .kicker { margin-top: var(--sp-1); }

.sheet-synopsis {
  margin: var(--sp-5) 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.sheet-cast {
  margin: var(--sp-2) 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-4);
}
.sheet-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
}
.sheet-link {
  font-size: 12.5px;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.sheet-link:hover { color: var(--ink-1); }

.sheet-times-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.sheet-count {
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: var(--ink-4);
  font-feature-settings: "tnum" 1;
}
.sheet-empty {
  font-size: 13px;
  color: var(--ink-4);
}

.sheet-days { display: flex; flex-direction: column; gap: var(--sp-4); }
.sheet-day-row { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: baseline; }
.sheet-day-label {
  flex: none;
  min-width: 56px;
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  color: var(--ink-3);
  text-transform: uppercase;
}
.sheet-day-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--ink-border-soft);
  border-radius: var(--rad-pill);
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.time-chip:hover { border-color: var(--ink-border); color: var(--ink-1); }
.time-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-strong);
}
.time-chip .sede-dot { width: 7px; height: 7px; }
.time-chip-time {
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  font-feature-settings: "tnum" 1;
}
.time-chip-sede { font-size: 11px; color: var(--ink-4); }

/* ---------- film index (por película) ---------- */

.film-index-head { padding: 0 0 var(--sp-2); }

.film-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-3) 0;
  border: none;
  border-bottom: 1px solid var(--ink-rule);
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: var(--rad-sm);
}
.film-card:last-child { border-bottom: none; }
.film-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-strong);
}
.film-card .poster-wrap { width: 72px; flex: none; }
.film-card-info { min-width: 0; flex: 1; }
.film-card-runs {
  font-size: 11.5px;
  color: var(--ink-4);
  font-feature-settings: "tnum" 1;
  margin-top: 3px;
}
.film-card-sedes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-4);
}
.film-card-sedes .sede-dot { width: 7px; height: 7px; }
.film-card-sedes span + .sede-dot { margin-left: 6px; }

/* ---------- app shell ---------- */

#app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

#top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: max(var(--sp-4), env(safe-area-inset-top)) var(--sp-4) var(--sp-3);
  background: var(--bg);
  border-bottom: 1px solid var(--ink-rule);
  transition: transform var(--dur-base) var(--ease-out);
}

/* Scrolling down slides the filter rows up behind the masthead, which is held in
   place by an equal and opposite translate — "cartelera" and the date never leave.
   --topbar-hide is measured in app.js (bindAutoHideTopBar) as exactly the filter
   rows plus their gaps, so the bar's border-bottom lands right under .topbar-row.
   Both halves are transforms: no layout changes, so the agenda never reflows. */
#top-bar.is-collapsed {
  transform: translateY(calc(var(--topbar-hide, 0px) * -1));
}
#top-bar.is-collapsed .topbar-row {
  transform: translateY(var(--topbar-hide, 0px));
}

/* The fade covers the sliver of chip that would otherwise show past .topbar-row's
   box, and visibility (discrete, so it flips only at the end of the slide) takes
   the hidden chips and the search field out of the tab order. */
#view-toggle,
#day-strip,
#filters-row {
  transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base);
}
#top-bar.is-collapsed #view-toggle,
#top-bar.is-collapsed #day-strip,
#top-bar.is-collapsed #filters-row {
  opacity: 0;
  visibility: hidden;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  /* opaque and raised so the filter rows pass behind it, not through it */
  position: relative;
  z-index: 1;
  background: var(--bg);
  transition: transform var(--dur-base) var(--ease-out);
}
.brand {
  margin: 0;
  font-size: 19px;
  font-weight: var(--fw-bold);
  color: var(--ink-1);
  text-transform: lowercase;
  letter-spacing: -0.005em;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.date-kicker {
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--ink-3);
}
.topbar-right .icon-btn { width: 30px; height: 30px; }

/* day strip: horizontal scroll + snap on mobile, wraps naturally on wide screens */
#day-strip {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
#day-strip::-webkit-scrollbar { display: none; }

.day-chip {
  flex: none;
  scroll-snap-align: start;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--rad-pill);
  border: 1px solid var(--ink-border-soft);
  background: var(--bg-card);
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  box-shadow: var(--shadow-button);
  white-space: nowrap;
  font-feature-settings: "tnum" 1;
  transition: color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out);
}
.day-chip:hover { color: var(--ink-1); border-color: var(--ink-border); }
.day-chip[aria-pressed="true"] {
  background: #1a1a1a;
  color: #ffffff;
  border-color: #1a1a1a;
}

/* sede segmented control */
#filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}
#sede-filter {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: var(--rad-pill);
  background: var(--bg-edge);
  flex: none;
}
.sede-chip {
  min-height: 34px;
  padding: 6px 13px;
  border-radius: var(--rad-pill);
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.sede-chip:hover { color: var(--ink-1); }
.sede-chip[aria-pressed="true"] {
  background: var(--bg-card);
  color: var(--ink-1);
  box-shadow: var(--shadow-button);
}
.sede-chip .sede-dot {
  width: 8px; height: 8px;
  border-radius: var(--rad-pill);
  background: var(--dot-color, var(--ink-4));
  flex: none;
}

/* view toggle: por día / por película, same segmented look as #sede-filter */
#view-toggle {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: var(--rad-pill);
  background: var(--bg-edge);
  width: fit-content;
}
.view-chip {
  min-height: 34px;
  padding: 6px 15px;
  border-radius: var(--rad-pill);
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.view-chip:hover { color: var(--ink-1); }
.view-chip[aria-pressed="true"] {
  background: var(--bg-card);
  color: var(--ink-1);
  box-shadow: var(--shadow-button);
}

.search-wrap {
  position: relative;
  flex: 1 1 200px;
  min-width: 140px;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 13px;
  color: var(--ink-4);
  pointer-events: none;
}
#search-input {
  width: 100%;
  min-height: 34px;
  padding: 6px 34px 6px 34px;
  border-radius: var(--rad-pill);
  border: 1px solid var(--ink-border-soft);
  background: var(--bg-card);
  color: var(--ink-1);
  font-size: 13px;
  box-shadow: var(--shadow-button);
}
#search-input::placeholder { color: var(--ink-4); }
#search-input:focus-visible {
  outline: none;
  border-color: var(--ink-border);
  box-shadow: 0 0 0 3px var(--focus-ring-strong), var(--shadow-button);
}
#search-clear {
  position: absolute;
  right: 4px;
  width: 26px; height: 26px;
  box-shadow: none;
  border: none;
  background: transparent;
}

/* The chevron is a data: URI, which can't read a CSS custom property — %23707070
   is that constraint, not a stray literal. It's --ink-3 flattened against --bg-card.
   Note it survives CLAUDE.md's hex grep only because it's URL-encoded. */
#ciclo-select {
  flex: none;
  min-height: 34px;
  padding: 6px 30px 6px 14px;
  border-radius: var(--rad-pill);
  border: 1px solid var(--ink-border-soft);
  background: var(--bg-card) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m6 9 6 6 6-6" fill="none" stroke="%23707070" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 8px center;
  background-size: 16px;
  color: var(--ink-2);
  font-size: 12.5px;
  max-width: 180px;
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
  box-shadow: var(--shadow-button);
}
#ciclo-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-strong), var(--shadow-button);
}

/* staleness banner */
.stale-banner {
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg-edge);
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}
.stale-banner a { color: var(--ink-1); text-decoration: underline; }

/* ---------- agenda ---------- */

#agenda-wrap {
  flex: 1;
  padding: var(--sp-4) var(--sp-4) var(--sp-9);
}

#agenda {
  display: flex;
  flex-direction: column;
  gap: var(--sp-7);
  max-width: 640px;
  margin: 0 auto;
}
#agenda.mode-single { max-width: 720px; }
#agenda.mode-films { max-width: 720px; }

.sede-column { display: flex; flex-direction: column; min-width: 0; }

.sede-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.sede-header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}
/* app.js sets `--ink-4: var(--sede-NNN)` inline on this kicker, so the sede
   colour arrives through the token .kicker already reads. No extra variable. */
.sede-count {
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: var(--ink-4);
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}
.sede-rule {
  height: 1px;
  background: var(--ink-rule);
  margin-bottom: var(--sp-3);
}

.show-list { display: flex; flex-direction: column; }

.past-details { margin-top: var(--sp-2); }
.past-details > summary {
  list-style: none;
  cursor: pointer;
  color: var(--ink-4);
  font-size: 10.5px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: lowercase;
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--ink-rule);
}
.past-details > summary::-webkit-details-marker { display: none; }
.past-details > summary::before {
  content: "▸ ";
}
.past-details[open] > summary::before {
  content: "▾ ";
}
.past-details .show-list { margin-top: var(--sp-1); }

.show-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--ink-rule);
}
.show-row:last-child { border-bottom: none; }
/* Past rows are dimmed, but 0.42 on top of --ink-4 (itself 42% alpha) left the
   meta line around 18% — unreadable, not merely de-emphasised. These sit behind
   a collapsed <details>, so nobody opens them by accident; they just have to be
   legible once opened. */
.show-row[data-past="true"] { opacity: 0.72; }
.show-row[data-past="true"] .show-meta,
.show-row[data-past="true"] .show-sub { color: var(--ink-3); }

.show-row-link {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border-radius: var(--rad-sm);
  border: none;
  background: none;
  padding: 0;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.show-row-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-strong);
}
.show-row[data-past="true"] .show-row-link,
.show-row[data-past="true"] .show-row-actions { pointer-events: none; }

.poster-wrap {
  flex: none;
  width: 72px;
  aspect-ratio: 2 / 3;
  border-radius: var(--rad-sm);
  overflow: hidden;
  background: var(--bg-edge);
  position: relative;
}
.poster-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.poster-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-align: center;
  font-size: 9.5px;
  font-weight: var(--fw-semibold);
  line-height: 1.25;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.show-row-info { min-width: 0; flex: 1; }
.show-time {
  display: block;
  font-size: 15px;
  font-weight: var(--fw-bold);
  color: var(--ink-1);
  font-feature-settings: "tnum" 1;
  line-height: 1.3;
}
.show-title {
  font-size: 13.5px;
  font-weight: var(--fw-semibold);
  color: var(--ink-1);
  text-transform: uppercase;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.show-meta {
  font-size: 11.5px;
  color: var(--ink-4);
  line-height: 1.35;
  margin-top: 1px;
}
.show-sub {
  font-size: 11px;
  color: var(--ink-4);
  font-feature-settings: "tnum" 1;
  margin-top: 2px;
}

.show-row-actions {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
}
.buy-btn {
  padding: 9px 16px;
  font-size: 12px;
  min-height: 44px;
}
.sede-empty {
  padding: var(--sp-4) 0;
  font-size: 12.5px;
  color: var(--ink-4);
}

/* global empty / error states */
.empty-state, .error-state {
  max-width: 360px;
  margin: var(--sp-9) auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}
.empty-state-title, .error-state-title {
  font-size: 15px;
  font-weight: var(--fw-semibold);
  color: var(--ink-2);
}
.error-state-body { font-size: 13px; color: var(--ink-4); margin-top: -8px; }

#site-footer {
  padding: var(--sp-6) var(--sp-4) max(var(--sp-6), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

/* ---------- responsive ---------- */

@media (min-width: 640px) {
  .show-row { gap: var(--sp-4); }
  .poster-wrap { width: 84px; }
  .show-time { font-size: 16px; }

  #agenda.mode-films {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--sp-6);
    max-width: 880px;
  }
  #agenda.mode-films .film-index-head { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  #top-bar { padding-left: var(--sp-7); padding-right: var(--sp-7); }
  #agenda-wrap { padding-left: var(--sp-7); padding-right: var(--sp-7); }

  #agenda.mode-all {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-6);
    max-width: 1240px;
  }
  #agenda.mode-all .sede-column { min-width: 0; }

  /* Single-sede: two columns of showtimes under one full-width sede header.
     The grid has to sit on .show-list, which is what actually contains the
     .show-row children — #agenda's only child here is one .sede-column, so
     making #agenda the grid just left half the page empty and put every
     grid-column rule on elements that weren't grid items. */
  #agenda.mode-single { max-width: 880px; }
  #agenda.mode-single .show-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--sp-6);
    align-items: start;
  }
  #agenda.mode-single .poster-wrap { width: 110px; }

  #agenda.mode-films {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1240px;
  }
}

@media (max-width: 420px) {
  .show-row-actions { align-items: center; }
  .buy-btn { padding: 9px 13px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 80ms !important;
    animation-duration: 80ms !important;
  }
}
