:root {
  --bg: #0e0f13;
  --panel: #181a21;
  --panel-2: #1f222c;
  --text: #f2f3f7;
  --muted: #9aa0b0;
  --accent: #ffcf5c;
  --accent-2: #7aa2ff;
  --free: #5ad58a;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 980px;
  padding: 18px 16px 60px;
  background: var(--bg);
  color: var(--text);
  font-family: "Heebo", system-ui, sans-serif;
}

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* phones: logo row on top, action links in a tidy second row */
@media (max-width: 620px) {
  .top { flex-direction: column; align-items: stretch; }
  .logo-wrap { justify-content: center; }
  .top-actions { justify-content: center; }
}
.top-link {
  color: var(--muted); text-decoration: none; font-size: 14px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid #2c3040; background: var(--panel);
}
.top-link:hover { color: var(--text); border-color: var(--accent-2); }
.add-link { color: var(--accent); }
.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 42px; height: 42px; border-radius: 10px; display: block; }
.logo { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

/* Whole photo, full width, natural height — no crop, no fill, no gray */
.hero { border-radius: var(--radius); overflow: hidden; margin: 14px 0 4px; border: 1px solid #242837; }
.hero img { width: 100%; height: auto; display: block; }
.lang-btn {
  background: var(--panel); color: var(--text); border: 1px solid #2c3040;
  border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer;
}
.lang-btn:hover { border-color: var(--accent); }

.tagline { color: var(--muted); margin: 4px 0 18px; }

.filters { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--panel); border: 1px solid #2c3040; color: var(--muted);
  padding: 6px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 14px;
}
.chip.on { background: var(--accent); color: #14130c; border-color: var(--accent); font-weight: 600; }
.date-hidden { position: absolute; width: 0; height: 0; opacity: 0; border: 0; padding: 0; pointer-events: none; color-scheme: dark; }
#dateChips .chip { font-size: 13px; padding: 5px 12px; }
.row2 { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.free-toggle { color: var(--muted); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.free-toggle input { accent-color: var(--free); width: 16px; height: 16px; }
.search {
  flex: 1; min-width: 180px; background: var(--panel); border: 1px solid #2c3040;
  color: var(--text); border-radius: 999px; padding: 8px 16px; font: inherit;
}
.search:focus { outline: none; border-color: var(--accent-2); }

.day-head {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(var(--bg) 75%, transparent);
  padding: 14px 2px 8px; margin: 10px 0 6px;
  font-weight: 800; font-size: 18px;
}
.day-head .rel { color: var(--accent); margin-inline-start: 8px; font-size: 14px; font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }

.card {
  background: var(--panel); border-radius: var(--radius); overflow: hidden;
  border: 1px solid #242837; display: flex; flex-direction: column;
  text-decoration: none; color: inherit; transition: transform .15s, border-color .15s;
  cursor: pointer;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent-2); }
/* Fixed square media box: absolute-positioned content can't stretch it, so
   every card is identical regardless of the poster's native proportions. */
.card .img { aspect-ratio: 1/1; background: var(--panel-2); position: relative; overflow: hidden; }
.card .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card .img .ph { /* fallback when no image: deterministic tint + initial */
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 800; color: rgba(255,255,255,.85);
}
.badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: rgba(10,10,14,.78); backdrop-filter: blur(4px);
  border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700;
}
.badge.free { color: var(--free); inset-inline-start: auto; inset-inline-end: 10px; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 {
  margin: 0; font-size: 16px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.6em;
}
.meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.desc {
  margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.meta .venue { color: var(--accent-2); }
.price-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-size: 14px; color: var(--text); }
.price.free { color: var(--free); font-weight: 600; }
.tix {
  background: var(--accent); color: #14130c; text-decoration: none; font-size: 12.5px;
  font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.tix:hover { filter: brightness(1.1); }

.state { color: var(--muted); text-align: center; padding: 60px 0; font-size: 16px; white-space: pre-line; }

/* phones: each filter row stays a single tidy line, scrollable sideways */
@media (max-width: 620px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
}

/* phones: two compact cards per row — easier to scan than one huge card */
@media (max-width: 620px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card h3 { font-size: 13.5px; min-height: 2.7em; }
  .meta { font-size: 11.5px; gap: 6px; }
  .desc { font-size: 11.5px; -webkit-line-clamp: 2; }
  .price { font-size: 12px; }
  .badge { font-size: 11.5px; padding: 3px 8px; }
  .card .body { padding: 9px 10px 11px; gap: 4px; }
  .hero img { height: 150px; }
}
.foot { margin-top: 50px; text-align: center; }
.foot a { color: #4a4f60; font-size: 12.5px; text-decoration: none; }
.foot a:hover { color: var(--muted); }

/* status page */
table.status { width: 100%; border-collapse: collapse; margin-top: 18px; }
table.status th, table.status td { text-align: start; padding: 9px 10px; border-bottom: 1px solid #242837; font-size: 14px; }
table.status th { color: var(--muted); font-weight: 600; }
.ok { color: var(--free); } .fail { color: #ff7a7a; }
