:root {
  --bg: #14100f;
  --bg-elev: #1e1a19;
  --bg-elev-2: #272120;
  --line: #342c2a;
  --text: #f5efe9;
  --muted: #b4a89f;
  --accent: #ff2d87;      /* salsa.frankfurt magenta */
  --salsa: #ff5a4d;
  --bachata: #ff2d87;
  --kizomba: #a06bff;
  --radius: 16px;
  --maxw: 620px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(20,16,15,0.98) 70%, rgba(20,16,15,0.86));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 12px) 16px 10px;
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.brand-accent { color: var(--accent); }
.subscribe {
  font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); background: var(--bg-elev);
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}
.subscribe:active { background: var(--bg-elev-2); }
.tagline { max-width: var(--maxw); margin: 8px auto 0; color: var(--muted); font-size: 13px; }

/* ---------- filter chips ---------- */
.filters {
  max-width: var(--maxw);
  margin: 12px auto 2px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 14px; font-weight: 600;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .06s ease;
}
.chip:active { transform: scale(.96); }
.chip-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-salsa.chip-active { background: var(--salsa); border-color: var(--salsa); }
.chip-bachata.chip-active { background: var(--bachata); border-color: var(--bachata); }
.chip-kizomba.chip-active { background: var(--kizomba); border-color: var(--kizomba); }

/* ---------- list ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px 40px; }
.loading, .empty { color: var(--muted); text-align: center; padding: 48px 0; }

.day-header {
  position: sticky;
  top: 132px;
  z-index: 10;
  background: var(--bg);
  padding: 18px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.day-header.today .day-dow { color: var(--accent); }
.day-dow { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.day-date { color: var(--muted); font-size: 13px; }
.day-badge { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 9px; }

/* ---------- event card ---------- */
.card {
  display: flex;
  gap: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform .07s ease, border-color .15s ease;
}
.card:active { transform: scale(.985); border-color: var(--accent); }

/* Featured ("Empfohlen") — gold border + diagonal corner ribbon */
.card.featured {
  position: relative;
  overflow: hidden;
  border-color: #e2b53c;
  box-shadow: 0 0 0 1px #e2b53c, 0 0 16px rgba(226, 181, 60, 0.22);
}
.feat-ribbon {
  position: absolute;
  top: 13px;
  right: -34px;
  width: 132px;
  text-align: center;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #f6d365, #d4a017);
  color: #2a1e00;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  z-index: 3;
}
.card-time {
  flex: 0 0 52px;
  text-align: center;
  padding-top: 2px;
}
.card-time .hh { font-size: 19px; font-weight: 700; line-height: 1; }
.card-time .ap { font-size: 11px; color: var(--muted); }
.card-body { min-width: 0; flex: 1; }
.card-title {
  font-size: 16px; font-weight: 700; line-height: 1.25;
  margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; display: flex; align-items: flex-start; gap: 6px; }
.card-meta .pin { opacity: .7; line-height: 1.35; }
.where { min-width: 0; }
.where .v-name { display: block; color: var(--text); font-weight: 600; }
.where .v-addr { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em; }
.pill-salsa { background: rgba(255,90,77,.16); color: var(--salsa); }
.pill-bachata { background: rgba(255,45,135,.16); color: var(--bachata); }
.pill-kizomba { background: rgba(160,107,255,.18); color: var(--kizomba); }
.pill-sub { background: var(--bg-elev-2); color: var(--muted); }

.segments { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.seg { font-size: 12px; color: var(--muted); display: flex; gap: 8px; }
.seg-type { font-weight: 700; color: var(--text); min-width: 68px; }
.seg-workshop .seg-type { color: var(--kizomba); }
.seg-party .seg-type { color: var(--accent); }
.card-org { margin-top: 8px; font-size: 12px; color: var(--muted); }
.card-org .org-link { color: var(--accent); font-weight: 600; cursor: pointer; }
.card-org .org-link:hover { text-decoration: underline; }
.card-org .org-name { color: var(--text); font-weight: 600; }
.card-org .org-unknown { color: var(--muted); font-style: italic; }

.thumb {
  flex: 0 0 64px; width: 64px; height: 64px;
  border-radius: 12px; object-fit: cover; background: var(--bg-elev-2);
}

/* ---------- footer ---------- */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 16px calc(env(safe-area-inset-bottom) + 28px);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.foot a { color: var(--muted); }

@media (min-width: 640px) {
  .day-header { top: 138px; }
}
