:root {
  --bg: #0e0d0c;
  --panel: #181614;
  --panel-2: #221f1c;
  --line: #2e2a26;
  --text: #f1ece4;
  --muted: #9c948a;
  --accent: #ffb43a; /* marquee-amber */
  --accent-ink: #1a1206;
  --ugc: #4aa3ff;
  --kin: #ff5a5f;
  --radius: 14px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(var(--bg) 85%, rgba(14, 13, 12, 0.92));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: max(14px, env(safe-area-inset-top)) clamp(12px, 3vw, 32px) 10px;
}
.brand { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h1 {
  margin: 0;
  font: 800 clamp(22px, 3.2vw, 30px)/1 "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
h1 .dot { color: var(--accent); }
.meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.ghost:hover { border-color: var(--muted); }
.ghost:disabled { opacity: 0.5; cursor: progress; }

.days {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 7px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: center;
  line-height: 1.15;
}
.day small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.day[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day[aria-pressed="true"] small { color: var(--accent-ink); opacity: 0.75; }
.day.week { font-weight: 600; }

.filters { display: grid; gap: 8px; margin-top: 10px; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filter-row .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 4px; min-width: 70px; }
.chip {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .swatch { width: 8px; height: 8px; border-radius: 50%; }
.chip.clear { color: var(--muted); border-style: dashed; }
.custom-slot { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.custom-slot select {
  background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 3px 4px;
}

.search-row { gap: 12px; }
#search {
  flex: 1 1 220px;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px;
}
#search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.toggle { color: var(--muted); font-size: 13px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

/* ---------- main ---------- */
main { padding: 14px clamp(12px, 3vw, 32px) 60px; max-width: 1400px; margin: 0 auto; }
.summary { color: var(--muted); margin: 4px 0 14px; font-size: 13.5px; }
.errors { background: #3a1d12; border: 1px solid #6b3420; color: #ffcfb8; padding: 8px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }
.empty { color: var(--muted); text-align: center; padding: 60px 0; }

.films { display: grid; gap: 14px; }

.film {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.poster {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-2) center/40% no-repeat url("icon.svg");
}
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster img.broken { visibility: hidden; }

.title { margin: 0 0 3px; font-size: 19px; line-height: 1.2; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.tag {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  cursor: pointer;
}
.tag:hover { border-color: var(--accent); }
.tag.label { color: var(--accent); border-color: #5a4320; }
.tag.rating { font-weight: 700; }

.synopsis {
  margin: 6px 0 10px;
  font-size: 13.5px;
  color: #d8d1c7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.synopsis.open { -webkit-line-clamp: unset; }

.trailers { display: flex; flex-wrap: wrap; gap: 6px; }
.trailers a, .trailers button {
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.trailers .play { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.trailers a:hover, .trailers button:hover { filter: brightness(1.1); border-color: var(--muted); }

/* ---------- showtimes ---------- */
.times { display: grid; gap: 10px; align-content: start; }
.cin { border-left: 3px solid var(--line); padding-left: 10px; }
.cin.UGC { border-color: var(--ugc); }
.cin.Kinepolis { border-color: var(--kin); }
.cin h3 { margin: 0 0 5px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cin h3 a { text-decoration: none; }
.cin h3 a:hover { text-decoration: underline; }
.dayrow { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.dayrow .dname { flex: 0 0 72px; font-size: 12px; white-space: nowrap; color: var(--muted); text-transform: capitalize; }
.slots { display: flex; flex-wrap: wrap; gap: 5px; }
.slot {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  padding: 4px 9px 3px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  min-width: 62px;
  line-height: 1.15;
}
.slot:hover { border-color: var(--accent); }
.slot b { font-size: 15px; font-variant-numeric: tabular-nums; }
.slot small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.slot .fmt { color: var(--accent); font-weight: 600; }
.slot.past { opacity: 0.38; }
.slot.soldout { text-decoration: line-through; opacity: 0.5; }

/* ---------- player ---------- */
dialog#player {
  width: min(960px, 94vw);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  color: var(--text);
}
dialog#player::backdrop { background: rgba(0, 0, 0, 0.75); }
.player-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--panel); }
#video { width: 100%; display: block; max-height: 75vh; background: #000; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .film { grid-template-columns: 84px minmax(0, 1fr); }
  .times { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .film { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .title { font-size: 17px; }
  .filter-row .label { min-width: 0; width: 100%; }
}

.day.sparse:not([aria-pressed="true"]) { opacity: 0.45; border-style: dashed; }
@media (max-width: 700px) {
  .top { position: static; }
  .search-row .toggle { font-size: 12px; }
}

.chip .count { font-size: 11px; opacity: 0.55; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .count { opacity: 0.7; }
.tag.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* gsm: filterrijen horizontaal scrollen i.p.v. alles onder elkaar */
@media (max-width: 700px) {
  .filters { gap: 6px; }
  .filter-row:not(.search-row) {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * clamp(12px, 3vw, 32px));
    padding: 0 clamp(12px, 3vw, 32px);
  }
  .filter-row:not(.search-row)::-webkit-scrollbar { display: none; }
  .filter-row .label { width: auto; min-width: 0; flex: 0 0 auto; font-size: 11px; }
  .chip, .custom-slot { flex: 0 0 auto; white-space: nowrap; }
}
