:root {
  --bg:           #0b0b12;
  --surface:      #13131f;
  --surface-2:    #1c1c2e;
  --surface-3:    #252540;
  --text:         #e4e4f0;
  --text-muted:   #7070a0;
  --border:       #25253a;
  --accent:       #5555ff;

  --imax-laser-190:      #0094d4;
  --imax-gt-laser-143:   #0b6ea8;
  --imax-dual-laser-190: #00c4a0;
  --dolby:               #c81c1c;
  --mm70:                #c89a10;
  --mm35:                #a07830;
  --imax70:              #8b2fc9;
  --screenx:             #1d9e5a;
  --kinotag:             #2e7d32;
  --boc:                 #4a6fa5;
  --programmkino:        #7b5ea7;
  --fourdx:              #c96e00;

  --tag-filmed:          #f0c040;
  --tag-back-in:         #a0b8e0;
  --tag-doc:             #7ecba0;

  --focus-ring:          0 0 0 2px var(--accent);
}

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: linear-gradient(135deg, #0d0d20 0%, #180d28 100%);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-icon {
  font-size: 1.25rem;
  color: var(--accent);
}

.header-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}


.header-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
  letter-spacing: 0.1px;
}

@media (max-width: 600px) {
  .header-tagline { display: none; }
}

#last-updated {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* ── Layout ── */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: calc(100vh - 53px);
  transition: grid-template-columns 0.2s ease;
}

.layout.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

/* ── Sidebar ── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: padding 0.2s ease;
}

.sidebar-collapsed .sidebar-logo,
.sidebar-collapsed .sidebar-footer {
  display: none;
}

.sidebar-collapsed .sidebar {
  padding: 0;
  border-right-color: transparent;
}

/* ── Sidebar toggle button ── */
#sidebar-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem 0.45rem;
  flex-shrink: 0;
  transition: all 0.12s;
}

#sidebar-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.filter-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.chip:hover {
  border-color: var(--chip-color, var(--accent));
  color: var(--text);
}

.chip.active {
  background: var(--chip-color, var(--accent));
  border-color: var(--chip-color, var(--accent));
  color: #fff;
  font-weight: 600;
}

/* Hierarchical filters */
.chip-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}
.chip-group.expanded {
  flex-basis: 100%;
}
.chip--parent {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.chip--parent.partial {
  background: color-mix(in srgb, var(--chip-color, var(--accent)) 30%, transparent);
  border-color: var(--chip-color, var(--accent));
  color: var(--text);
  font-weight: 600;
}
.chip-count {
  font-size: 0.7rem;
  opacity: 0.85;
}
.chip-count:empty { display: none; }
.chip-caret {
  font-size: 0.65rem;
  line-height: 1;
  opacity: 0.7;
  transition: transform 0.15s ease;
  display: inline-block;
  padding: 0 0.1rem;
}
.chip-group.expanded > .chip--parent .chip-caret { transform: rotate(180deg); }
.chip-subs {
  display: none;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.1rem 0 0.1rem 0.85rem;
  border-left: 2px solid var(--border);
  margin-left: 0.4rem;
}
.chip-group.expanded > .chip-subs { display: flex; }
.chip--sub {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
}
.chip--sub2 { font-size: 0.68rem; opacity: 0.85; }

/* Random Trump-style cinema quote bar */
.quote-bar {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  margin: 0 0 0.7rem 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 8%, var(--surface-2)) 0%,
    var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.35;
}
.quote-bar .quote-mark {
  font-size: 1.4rem;
  font-style: normal;
  color: var(--accent);
  font-family: Georgia, serif;
  line-height: 0.6;
  align-self: flex-start;
  padding-top: 0.25rem;
}
.quote-bar .quote-text {
  flex: 1;
}
.quote-bar .quote-attr {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .quote-bar { font-size: 0.78rem; flex-wrap: wrap; }
  .quote-bar .quote-attr { flex-basis: 100%; text-align: right; }
}

/* New-screenings notice banner */
.new-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.85rem 0;
  padding: 0.55rem 0.8rem;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
}
.new-notice .notice-icon { font-size: 1.05rem; }
.new-notice .notice-text { flex-shrink: 0; }
.new-notice .notice-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.new-notice .notice-dot-group {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.new-notice .notice-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}
.new-notice .notice-cta {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.new-notice .notice-cta:hover { filter: brightness(1.1); }
.new-notice .notice-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.3rem;
  line-height: 1;
}
.new-notice .notice-close:hover { color: var(--text); }

/* Updates list view */
.upd-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.4rem;
}
.upd-row {
  display: grid;
  grid-template-columns: auto 5.5rem 3.5rem auto 1fr auto auto auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-color, var(--accent));
  border-radius: 6px;
  font-size: 0.85rem;
}
.upd-row:hover { background: var(--surface-2); }
.upd-fav {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.upd-fav.is-fav { color: var(--tag-filmed, #f0c040); }
.upd-date {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}
.upd-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.upd-cat {
  display: inline-block;
  background: var(--card-color, #888);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 10px;
  white-space: nowrap;
}
.upd-movie {
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upd-movie:hover { color: var(--accent); }
.upd-cinema {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upd-lang {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 3px;
}
.upd-book {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.upd-book:hover { text-decoration: underline; }

@media (max-width: 800px) {
  .upd-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "fav   date   book"
      "fav   time   book"
      "cat   movie  movie"
      "cat   cinema lang";
    gap: 0.2rem 0.6rem;
  }
  .upd-fav    { grid-area: fav; align-self: start; }
  .upd-date   { grid-area: date; }
  .upd-time   { grid-area: time; }
  .upd-cat    { grid-area: cat; align-self: start; }
  .upd-movie  { grid-area: movie; }
  .upd-cinema { grid-area: cinema; }
  .upd-lang   { grid-area: lang; justify-self: end; }
  .upd-book   { grid-area: book; align-self: center; }
}

/* ── Spielplan list mode toggle ──────────────────────────── */
.view-mode-bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  justify-content: flex-end;
}
.view-mode-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.view-mode-btn.active { color: var(--text); border-color: var(--accent); }
.view-mode-btn:hover  { color: var(--text); }

/* ── Card calendar button ─────────────────────────────────── */
.card-cal {
  display: block;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 0.4rem;
  width: 100%;
  text-align: center;
  transition: color 0.15s, border-color 0.15s;
}
.card-cal:hover { color: var(--text); border-color: var(--accent); }

/* ── Spielplan row (upd-row + 9th cal column) ────────────── */
.spl-row { grid-template-columns: auto 5.5rem 3.5rem auto 1fr auto auto auto 2rem; }
.spl-cal {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.15rem 0.3rem;
  font-size: 0.85rem;
  cursor: pointer;
  justify-self: center;
  transition: color 0.15s, border-color 0.15s;
}
.spl-cal:hover { color: var(--text); border-color: var(--accent); }
@media (max-width: 800px) {
  .spl-row { grid-template-columns: auto 1fr auto; }
  .spl-cal { display: none; }
}

#movie-search {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}

#movie-search:focus { border-color: var(--accent); }
#movie-search::placeholder { color: var(--text-muted); }

/* ── Main area ── */
.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

#stats {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stats-total {
  font-weight: 600;
  color: var(--text);
  margin-right: 0.15rem;
}

.stats-dot-group {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stats-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.view-toggle {
  display: flex;
  background: var(--surface-2);
  border-radius: 7px;
  padding: 3px;
  gap: 2px;
}

.view-toggle button {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.3rem 0.9rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.12s;
}

.view-toggle button.active {
  background: var(--surface-3);
  color: var(--text);
}

.content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* ── Active filter strip ── */
#active-filters {
  display: none;
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 1.5rem;
  background: var(--surface);
  flex-shrink: 0;
}

.af-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.af-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.15rem;
}

.af-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.35rem 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--af-color, var(--border));
  background: color-mix(in srgb, var(--af-color, var(--accent)) 12%, transparent);
  color: var(--text);
}

.af-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 0.1rem;
  transition: color 0.1s;
}

.af-remove:hover { color: var(--text); }

.af-clear-all {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: all 0.12s;
}

.af-clear-all:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Date filter banner ── */
.date-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(85, 85, 255, 0.1);
  border: 1px solid rgba(85, 85, 255, 0.3);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.date-banner strong { font-weight: 600; }

.date-banner button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  margin-left: auto;
  transition: all 0.12s;
}

.date-banner button:hover { color: var(--text); border-color: var(--text-muted); }

/* ── List view ── */
.date-group { margin-bottom: 2rem; }

.date-group--today .date-header {
  color: var(--text);
  border-bottom-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.date-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.date-today-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.3px;
}

.date-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-color, var(--accent));
  border-radius: 10px;
  padding: 0.85rem;
  width: 290px;
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.card-poster {
  width: 56px;
  min-width: 56px;
  height: 84px;
  border-radius: 4px;
  object-fit: cover;
  align-self: flex-start;
  margin-top: 0.1rem;
}

.card-poster--placeholder {
  background: var(--card-color, var(--accent));
  opacity: 0.18;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.card { position: relative; }

.card-fav {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.12s;
}

.card-fav:hover { color: var(--tag-filmed); border-color: var(--tag-filmed); }

.card-fav.is-fav {
  color: var(--tag-filmed);
  border-color: var(--tag-filmed);
  background: color-mix(in srgb, var(--tag-filmed) 15%, transparent);
}

/* Sidebar Favoriten chip */
.chip--fav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  justify-content: flex-start;
}

.chip--fav .chip-fav-icon { color: var(--tag-filmed); }

.chip--fav.active {
  background: color-mix(in srgb, var(--tag-filmed) 22%, var(--surface-2));
  border-color: var(--tag-filmed);
  color: var(--text);
}

.chip--fav.active .chip-fav-icon { color: var(--tag-filmed); }

.chip--fav:disabled { opacity: 0.5; cursor: not-allowed; }
.chip--unavail { display: none !important; }
.chip-group--unavail { display: none !important; }

/* Modal favorite star */
.modal-title-row { display: flex; align-items: flex-start; gap: 0.5rem; }

.modal-fav {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: all 0.12s;
}

.modal-fav:hover, .modal-fav.is-fav {
  color: var(--tag-filmed);
  border-color: var(--tag-filmed);
}

.modal-fav.is-fav {
  background: color-mix(in srgb, var(--tag-filmed) 18%, transparent);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  background: var(--card-color, var(--accent));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  align-self: flex-start;
}

.card-movie {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: color 0.15s;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.card-time {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.card-lang {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  display: inline-flex; align-items: center; gap: 3px;
}
.lang-flag { display: inline-block; vertical-align: middle; }

.card-cinema {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 0.1rem;
}

.card-imax-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  align-self: flex-start;
  border: 1px solid currentColor;
}

.card-imax-tag--filmed_for_imax {
  color: var(--tag-filmed);
  border-color: color-mix(in srgb, var(--tag-filmed) 40%, transparent);
  background: color-mix(in srgb, var(--tag-filmed) 8%, transparent);
}

.card-imax-tag--back_in_imax {
  color: var(--tag-back-in);
  border-color: color-mix(in srgb, var(--tag-back-in) 40%, transparent);
  background: color-mix(in srgb, var(--tag-back-in) 8%, transparent);
}

.card-imax-tag--doc {
  color: var(--tag-doc);
  border-color: color-mix(in srgb, var(--tag-doc) 40%, transparent);
  background: color-mix(in srgb, var(--tag-doc) 8%, transparent);
}

.card-book {
  margin-top: 0.5rem;
  display: inline-block;
  color: var(--card-color, var(--accent));
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
  transition: opacity 0.12s;
}

.card-book:hover { opacity: 1; }
.sneak-pred { font-size: 0.68rem; opacity: 0.75; margin-top: 0.25rem; line-height: 1.4; }
.sneak-pred a { color: inherit; text-decoration: none; }
.sneak-pred a:hover { opacity: 1; text-decoration: underline; }

/* ── Calendar view ── */
.cal-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1100px) { .cal-wrap { grid-template-columns: 1fr; } }

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.cal-nav h2 {
  font-size: 0.95rem;
  font-weight: 600;
}

.cal-nav button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.12s;
}

.cal-nav button:hover { background: var(--surface-3); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-col-header {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0.4rem 0;
}

.cal-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.4rem 0.35rem;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  user-select: none;
}

.cal-day.other-month { opacity: 0.2; pointer-events: none; }

.cal-day.has-screenings {
  cursor: pointer;
  border-color: var(--surface-3);
}

.cal-day.has-screenings:hover { background: var(--surface-2); }

.cal-day.today { border-color: var(--text-muted); }

.cal-day.today .cal-day-num {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day.selected {
  border-color: var(--accent) !important;
  background: rgba(85, 85, 255, 0.08);
}

.cal-day-num {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 20px;
  width: 20px;
  text-align: center;
}

.cal-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 1px;
}

.cal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: block;
}

/* Day detail panel */
.day-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.day-detail h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.day-detail .cards { gap: 0.6rem; }

.day-detail .card { width: 100%; }

.day-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 1rem 0;
}

/* ── Info view ── */
.info-wrap {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.info-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

.info-cinema-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.info-cinema-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-color, var(--accent));
  border-radius: 10px;
  padding: 0.9rem;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.info-cinema-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.info-city {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.info-cinema-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.info-cinema-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.info-cinema-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.info-format-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.info-format-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.info-format-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.info-format-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.info-format-title {
  font-size: 0.85rem;
  font-weight: 600;
}

.info-format-sub {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.info-format-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.2rem;
}

/* ── Info links ── */
.info-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-link-group-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.info-link-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.info-link-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s;
}

.info-link-item:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.info-link-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.info-link-arrow {
  color: var(--accent);
  font-size: 0.75rem;
}

.info-link-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Info stats ── */
.info-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.info-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  text-align: center;
}
.info-stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}
.info-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}
.info-cat-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.4rem;
}
.stats-cat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
}
.stats-cat-label { flex: 1; color: var(--text); }
.stats-cat-count { font-weight: 600; color: var(--accent); }

/* ── Methodology ── */
.info-method-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem 0;
  line-height: 1.55;
}
.info-method-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
}
.info-method-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}
.info-method-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.info-method-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Featured events ── */
.info-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.7rem;
}
.info-event-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.info-event-card:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}
.info-event-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.info-event-sub {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.info-event-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Format × cinema matrix ── */
.info-matrix {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.matrix-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  align-items: start;
}
.matrix-format {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.matrix-count {
  margin-left: auto;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
}
.matrix-cinemas {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-size: 0.78rem;
}
.matrix-cinemas li { color: var(--text); }
.matrix-cinemas a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--border);
}
.matrix-cinemas a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.matrix-city { color: var(--text-muted); font-size: 0.72rem; }

@media (max-width: 700px) {
  .matrix-row { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ── Glossary ── */
.info-glossary {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.info-glossary-group-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.info-glossary-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.85rem;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.info-glossary-row:last-child { border-bottom: none; }
.info-glossary-term {
  font-weight: 600;
  color: var(--text);
}
.info-glossary-desc {
  color: var(--text-muted);
  line-height: 1.5;
}
@media (max-width: 600px) {
  .info-glossary-row { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ── Attribution ── */
.info-attr .info-attr-block {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.info-attr-item {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.info-attr-item strong { color: var(--text); font-weight: 600; }
.info-attr-item a { color: var(--accent); text-decoration: none; }
.info-attr-item a:hover { text-decoration: underline; }

/* ── Empty / Error ── */
.empty {
  color: var(--text-muted);
  padding: 3rem;
  text-align: center;
  font-size: 0.9rem;
}

.error {
  color: #e07070;
  padding: 2rem;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.8;
}

.error code {
  background: var(--surface-2);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: var(--text);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
}

/* ── Responsive ── */
/* ── Mobile hamburger button (desktop: hidden) ── */
#sidebar-open {
  display: none;
}

/* ── Sidebar backdrop ── */
#sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 150;
}

#sidebar-backdrop.visible { display: block; }

@media (max-width: 700px) {
  /* Hide desktop toggle, show hamburger */
  #sidebar-toggle { display: none; }

  #sidebar-open {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    flex-shrink: 0;
  }

  #sidebar-open:hover { color: var(--text); border-color: var(--text-muted); }

  /* Sidebar becomes off-canvas drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: -270px;
    width: 260px;
    height: 100dvh;
    z-index: 200;
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    transition: left 0.22s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  .sidebar.open { left: 0; }

  /* Layout: single column, sidebar not in flow */
  .layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  /* Prevent sidebar-collapsed class from interfering on mobile */
  .layout.sidebar-collapsed { grid-template-columns: 1fr; }

  .content { padding: 1rem; }

  .card { width: 100%; }

  header { gap: 0.5rem; }
}

/* ── Movie detail modal ──────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 0.15s ease-out;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.movie-modal {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.modal-close:hover { color: var(--text); }

.modal-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-poster {
  width: 180px;
  min-width: 180px;
  border-radius: 6px;
  object-fit: cover;
  align-self: flex-start;
}

.modal-poster[data-full] {
  cursor: zoom-in;
}

@media (max-width: 500px) {
  .movie-modal { padding: 1rem; border-radius: 10px; }
  .modal-header { flex-direction: column; align-items: center; gap: 0.75rem; }
  .modal-poster { width: 60%; max-width: 220px; min-width: 0; }
  .modal-header-text { width: 100%; }
  .modal-title { text-align: center; }
}

#poster-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

#poster-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}

.modal-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding-right: 2rem;
}

.modal-rating {
  color: #f5c518;
  font-weight: 600;
  font-size: 0.9rem;
}

.modal-ext-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.modal-ext-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 2px 8px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  opacity: 0.85;
}

.modal-ext-link:hover {
  opacity: 1;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.modal-tag {
  font-size: 0.72rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text);
  white-space: nowrap;
}

.modal-overview {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.modal-best {
  background: var(--surface-3);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.87rem;
}

.modal-best strong { color: var(--text-muted); font-weight: 500; }

.modal-best-badge {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--card-color, #555);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}

.modal-screenings h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-day-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0.9rem 0 0.3rem;
}

.modal-session {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}

.modal-session-time {
  font-weight: 700;
  min-width: 3.2rem;
  color: var(--text);
}

.modal-session-cat {
  font-size: 0.72rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--card-color, #555);
  color: #fff;
  white-space: nowrap;
}

.modal-session-book {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.modal-session-book:hover { text-decoration: underline; }

.card-movie:hover { color: var(--accent); text-decoration: underline; }

/* ── Sidebar reset button ── */
.reset-filters-btn {
  margin-top: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
}

.reset-filters-btn:hover:not(:disabled) {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--surface-2);
}

.reset-filters-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar-logo {
  display: block;
  width: 100%;
  height: auto;
  margin: auto auto 0;
  opacity: 1.0;
}

.sidebar-footer {
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.6;
  margin: 0;
}

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon   { font-size: 3rem; margin-bottom: 0.75rem; opacity: 0.6; }
.empty-title  { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.empty-hint   { font-size: 0.85rem; }

/* ── Loading skeleton ── */
.skeleton-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skeleton-card {
  display: flex;
  gap: 0.75rem;
  width: 290px;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--surface-3);
  border-radius: 10px;
}

.sk-poster {
  width: 56px;
  min-width: 56px;
  height: 84px;
  border-radius: 4px;
  background: var(--surface-2);
  animation: shimmer 1.4s linear infinite;
  background-image: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
}

.sk-body { display: flex; flex-direction: column; gap: 0.45rem; flex: 1; justify-content: center; }

.sk-line {
  height: 10px;
  border-radius: 3px;
  background: var(--surface-2);
  animation: shimmer 1.4s linear infinite;
  background-image: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
}

.sk-line--xs { width: 40%; height: 8px; }
.sk-line--sm { width: 55%; }
.sk-line--md { width: 85%; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Shortcut help overlay ── */
#shortcut-help {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
}

.sh-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  min-width: 260px;
  cursor: default;
}

.sh-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.sh-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.sh-card li { display: flex; align-items: center; gap: 0.8rem; font-size: 0.85rem; color: var(--text); }

kbd {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.75rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  min-width: 1.5rem;
  text-align: center;
  color: var(--text);
}

.header-right { display: flex; align-items: center; gap: 0.9rem; }
.switch-design {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.18s, border-color 0.18s;
}
.switch-design:hover { color: #d8b35c; border-color: #d8b35c; }

/* ── Mobile-tight pass (vertical viewports) ─────────────────────────────── */
@media (max-width: 540px) {
  /* Header: tighten padding, allow wrap, shrink brand */
  header {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  header h1 { font-size: 1rem; letter-spacing: -0.2px; }
  .header-icon { font-size: 1.1rem; }
  .header-title { gap: 0.45rem; min-width: 0; }
  .header-brand { min-width: 0; }
  .header-right { gap: 0.5rem; flex-wrap: wrap; }
  #last-updated { font-size: 0.68rem; }
  .switch-design {
    font-size: 0.62rem;
    padding: 0.25rem 0.55rem;
    letter-spacing: 0.04em;
  }

  /* Topbar: stack stats above toggle */
  .topbar {
    padding: 0.55rem 0.85rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  #stats {
    width: 100%;
    order: 2;
    font-size: 0.72rem;
    gap: 0.3rem;
  }
  .stats-dot-group { font-size: 0.68rem; }
  .view-toggle { order: 1; padding: 2px; }
  .view-toggle button {
    padding: 0.28rem 0.55rem;
    font-size: 0.72rem;
  }
  #sidebar-open { padding: 0.3rem 0.55rem; font-size: 1rem; }

  /* Sidebar drawer narrower, fits 360px screens */
  .sidebar { width: min(86vw, 280px); left: -300px; padding: 1rem 0.85rem; gap: 1.1rem; }
  .filter-label { font-size: 0.62rem; }
  .chip { padding: 0.3rem 0.65rem; font-size: 0.74rem; }
  .reset-filters-btn { padding: 0.5rem 0.75rem; font-size: 0.74rem; }

  /* Content padding tight */
  .content { padding: 0.85rem 0.7rem; }

  /* Active filter strip wraps cleanly */
  #active-filters { padding: 0.4rem 0.7rem; }
  .af-label { display: none; }
  .af-clear-all { margin-left: 0; font-size: 0.68rem; }
  .af-pill { font-size: 0.7rem; }

  /* Quote bar tighter */
  .quote-bar {
    padding: 0.4rem 0.7rem;
    font-size: 0.74rem;
    gap: 0.35rem;
  }

  /* New-screenings notice: stack rows */
  .new-notice {
    padding: 0.5rem 0.65rem;
    gap: 0.4rem;
    font-size: 0.78rem;
  }
  .new-notice .notice-cta { margin-left: 0; width: 100%; padding: 0.35rem; }
  .new-notice .notice-dots { font-size: 0.7rem; gap: 0.35rem; }

  /* Date group: tighter headers */
  .date-header { font-size: 0.82rem; padding-bottom: 0.45rem; margin-bottom: 0.6rem; }
  .date-group { margin-bottom: 1.4rem; }
  .date-today-badge { font-size: 0.6rem; padding: 0.08rem 0.4rem; }
  .date-count { font-size: 0.66rem; }

  /* Cards: full-width single column */
  .cards { gap: 0.55rem; }
  .card {
    width: 100%;
    padding: 0.7rem;
    gap: 0.6rem;
  }
  .card-poster { width: 52px; min-width: 52px; height: 78px; }
  .card-fav { width: 30px; height: 30px; top: 0.35rem; right: 0.35rem; }

  /* Modal full-bleed */
  .modal-backdrop { padding: 0.4rem; align-items: flex-start; }
  .movie-modal {
    padding: 0.9rem;
    border-radius: 10px;
    max-height: 96vh;
    margin-top: 0.5rem;
  }
  .modal-title { font-size: 1.05rem; padding-right: 1.5rem; }
  .modal-overview { font-size: 0.8rem; }
  .modal-best { padding: 0.55rem 0.7rem; font-size: 0.78rem; }
  .modal-session { font-size: 0.78rem; gap: 0.45rem; }
  .modal-session-time { min-width: 2.6rem; }
  .modal-ext-link { padding: 1px 6px; font-size: 0.72rem; }

  /* Updates rows: already responsive at 800px, just tighten gaps */
  .upd-row { padding: 0.4rem 0.55rem; font-size: 0.78rem; }
  .upd-cat { font-size: 0.62rem; padding: 0.1rem 0.45rem; }

  /* Calendar: smaller cells */
  .cal-day { min-height: 56px; padding: 3px; font-size: 0.7rem; }
  .cal-day-num { font-size: 0.7rem; }

  /* Info / glossary tighter */
  .info-glossary-row { padding: 0.3rem 0.35rem; font-size: 0.78rem; }
  .matrix-row { font-size: 0.78rem; }

  /* Shortcut help overlay */
  .sh-card { min-width: 0; width: 100%; padding: 1rem; }
}

@media (max-width: 380px) {
  header h1 { font-size: 0.92rem; }
  .switch-design { display: none; }
  .view-toggle button { padding: 0.25rem 0.42rem; font-size: 0.68rem; }
  .card-poster { width: 46px; min-width: 46px; height: 70px; }
  .modal-poster { width: 70%; max-width: 200px; }
}
