/* RegioFy – Styles (dunkles Theme, Mobile-first, Desktop-Sidebar ab 860px) */

:root {
  --bg: #0c0c0f;
  --surface: #161619;
  --surface-2: #1d1d22;
  --surface-3: #26262d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f6;
  --text-2: #c9c9d1;
  --muted: #8f8f9c;
  --accent: #c8b4ff;
  --accent-ink: #1a1030;
  --green: #6ee7b7;
  --pink: #ff8fa3;
  --yellow: #ffd480;
  --blue: #8ab4ff;
  --orange: #ffb27a;
  --red: #ff6b6b;
  --sit-green: #7ee83a;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --tabbar-h: 64px;
  --topbar-h: 61px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

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

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
}

.sidebar {
  display: none;
}

.main {
  min-width: 0;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-top)) calc(16px + var(--safe-right)) 10px calc(16px + var(--safe-left));
  background: rgba(12, 12, 15, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: block;
  object-fit: cover;
  flex: none;
}

.topbar .spacer {
  flex: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 52vw;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill svg {
  flex: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn.spinning svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.view {
  padding: 0 calc(16px + var(--safe-right)) 24px calc(16px + var(--safe-left));
}

.section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 18px 0 10px;
  letter-spacing: -0.01em;
}

.section-title small {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 8px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  margin: 16px 0 4px;
  letter-spacing: -0.02em;
}

.page-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 14px;
}

/* ---------- Banner / Status ---------- */
.banner {
  margin: 12px 16px 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner.warn {
  border-color: rgba(255, 212, 128, 0.35);
  background: rgba(255, 212, 128, 0.08);
}

.banner.error {
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
}

.banner.info {
  border-color: rgba(200, 180, 255, 0.35);
  background: rgba(200, 180, 255, 0.08);
}

.banner .grow {
  flex: 1;
}

.banner button {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  margin: 6px 0 10px;
  min-height: 18px;
}

.status-line .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.18);
}

.status-line .dot.stale {
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 212, 128, 0.18);
}

.status-line .dot.off {
  background: var(--muted);
  box-shadow: none;
}

/* ---------- Chips ---------- */
.chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 6px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.chip .swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--muted));
}

.chip.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.chip.active .swatch {
  background: var(--accent-ink);
  opacity: 0.6;
}

/* ---------- Datumsstreifen ---------- */
.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 8px -16px 4px;
  padding: 4px 16px 8px;
  scrollbar-width: none;
}

.date-strip::-webkit-scrollbar {
  display: none;
}

.day {
  flex: none;
  width: 56px;
  padding: 8px 0;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  color: var(--text-2);
  transition: background 0.15s ease, color 0.15s ease;
}

.day .wd {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.day .num {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 2px;
}

.day .count {
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--muted);
  min-height: 13px;
}

.day.today .num {
  color: var(--accent);
}

.day.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.day.active .wd,
.day.active .count,
.day.active .num {
  color: var(--accent-ink);
}

.day.all {
  width: auto;
  padding: 8px 14px;
  display: grid;
  place-items: center;
}

.day.all .num {
  font-size: 15px;
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 14px -16px 4px;
  padding: 0 16px 6px;
  scrollbar-width: none;
}

.hero-scroll::-webkit-scrollbar {
  display: none;
}

.hero {
  position: relative;
  flex: none;
  width: min(86vw, 420px);
  min-height: 190px;
  border-radius: var(--radius);
  padding: 18px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--hero, var(--accent)) 28%, transparent) 0%, var(--surface) 55%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--hero, var(--accent)) 35%, var(--border));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  overflow: hidden;
  cursor: pointer;
}

.hero::before {
  content: '';
  position: absolute;
  inset: auto -30% -50% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--hero, var(--accent)) 22%, transparent);
  filter: blur(40px);
}

.hero .tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--hero, var(--accent));
  color: #0c0c0f;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero .tag.partner {
  background: var(--surface-3);
  color: var(--text-2);
}

.hero h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.01em;
  position: relative;
}

.hero p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  position: relative;
}

.hero .meta {
  color: var(--hero, var(--accent));
  font-weight: 600;
  font-size: 13px;
  position: relative;
}

/* ---------- Event-Liste ---------- */
.group-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-title.today {
  color: var(--accent);
}

.card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
  position: relative;
}

.card:active {
  transform: scale(0.99);
}

.card.partner {
  border-color: rgba(200, 180, 255, 0.25);
}

.card .cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c, var(--muted));
  margin-bottom: 6px;
}

.card .cat::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--muted));
}

.card .partner-badge {
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(200, 180, 255, 0.14);
  color: var(--accent);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.card .partner-badge.tip {
  background: rgba(110, 231, 183, 0.14);
  color: var(--green);
}

.card h4 {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.25;
}

.card .line {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.35;
}

.card .line.muted {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
}

.card .right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.card .time {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.card .price {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}

.heart {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: color 0.15s ease, transform 0.15s ease;
}

.heart.on {
  color: var(--pink);
  border-color: rgba(255, 143, 163, 0.4);
  background: rgba(255, 143, 163, 0.1);
}

.heart:active {
  transform: scale(0.88);
}

/* ---------- Venues ---------- */
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 10px;
}

.search {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 15px;
}

.search input::placeholder {
  color: var(--muted);
}

.select {
  flex: none;
  height: 42px;
  padding: 0 32px 0 12px;
  border-radius: 12px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8f9c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  font-size: 14px;
}

.venue {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.venue.partner {
  border-color: rgba(200, 180, 255, 0.25);
}

.venue .avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--c, var(--accent)) 18%, var(--surface-2));
  color: var(--c, var(--accent));
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
}

.venue h4 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 600;
}

.venue .line {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.35;
}

.venue .line.muted {
  color: var(--muted);
  font-size: 12.5px;
}

.venue .dist {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.venue .type {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c, var(--muted));
  font-weight: 600;
}

.venue .actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.venue .events-here {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.mini-event {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 13px;
  cursor: pointer;
}

.mini-event b {
  font-weight: 600;
}

.mini-event span {
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn.ghost {
  background: transparent;
}

.btn.sm {
  padding: 7px 11px;
  font-size: 12.5px;
  border-radius: 10px;
}

.btn.block {
  width: 100%;
}

/* ---------- Raster (Spaltenzahl per Breakpoint) ---------- */
.events-grid,
.venues-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}

/* ---------- Detail-Panel (breite Bildschirme) ---------- */
.detail-pane {
  display: none;
}

/* ---------- Skeletons ---------- */
.skeleton {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px;
  margin-bottom: 10px;
  display: grid;
  gap: 10px;
}

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

.sk.w40 {
  width: 40%;
}
.sk.w70 {
  width: 70%;
}
.sk.w90 {
  width: 90%;
}
.sk.h18 {
  height: 18px;
}

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

/* ---------- Leer-/Fehlerzustände ---------- */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty .big {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty h3 {
  color: var(--text);
  font-family: var(--font-serif);
  margin: 0 0 6px;
  font-size: 20px;
}

.empty p {
  margin: 0 0 14px;
  font-size: 14px;
}

/* ---------- Tabbar (Mobile) ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 6px calc(8px + var(--safe-right)) var(--safe-bottom) calc(8px + var(--safe-left));
  background: rgba(16, 16, 20, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  position: relative;
  border-radius: 12px;
}

.tab.active {
  color: var(--accent);
}

.tab .badge {
  position: absolute;
  top: 2px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink);
  color: #1a0a10;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Sheet (Detail) ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.18s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(20px + var(--safe-bottom));
  animation: up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow);
}

@keyframes up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

.sheet .grip {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-3);
  margin: 4px auto 14px;
}

.sheet h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin: 6px 0 8px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.sheet .kv {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px 10px;
  margin: 12px 0;
  font-size: 14.5px;
  color: var(--text-2);
}

.sheet .kv svg {
  color: var(--muted);
  margin-top: 2px;
}

.sheet .desc {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 10px 0 14px;
}

.sheet .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.sheet .actions .primary {
  grid-column: 1 / -1;
}

.sheet .lineup {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px;
}

.sheet .lineup span {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

.sheet .city-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.sheet .city-list button {
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}

.sheet .city-list button small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

/* ---------- Mehr / Listen ---------- */
.list-card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  overflow: hidden;
}

.list-card .row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.list-card .row:last-child {
  border-bottom: 0;
}

.list-card .row .grow {
  flex: 1;
  min-width: 0;
}

.list-card .row small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.list-card .row svg {
  color: var(--muted);
  flex: none;
}

.list-card .row .chev {
  color: var(--muted);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px);
  transform: translateX(-50%);
  animation: toast-in 0.2s ease;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: calc(100vw - 32px);
}

@keyframes toast-in {
  from {
    transform: translate(-50%, 16px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.toast button {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Desktop ---------- */
@media (min-width: 860px) {
  .app {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 24px 20px;
    border-right: 1px solid var(--border);
    background: var(--surface);
    overflow-y: auto;
  }

  .sidebar .brand {
    font-size: 26px;
  }

  .sidebar .brand .logo {
    width: 38px;
    height: 38px;
  }

  .sidebar .nav {
    display: grid;
    gap: 4px;
  }

  .sidebar .nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--text-2);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    position: relative;
  }

  .sidebar .nav button.active {
    background: rgba(200, 180, 255, 0.12);
    color: var(--accent);
  }

  .sidebar .nav button .badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--pink);
    color: #1a0a10;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
  }

  .sidebar .label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
  }

  .sidebar .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sidebar .footer {
    margin-top: auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .main {
    padding-bottom: 32px;
  }

  .topbar {
    padding: 14px 32px;
  }

  .topbar .brand {
    display: none;
  }

  .pill {
    max-width: 360px;
  }

  .view {
    padding: 0 32px 32px;
    max-width: 1100px;
  }

  .chips-row.mobile-only {
    display: none;
  }

  .hero-scroll {
    margin: 18px 0 4px;
    padding: 0 0 6px;
  }

  .hero {
    width: 400px;
  }

  .date-strip {
    margin: 8px 0 4px;
    padding: 4px 0 8px;
  }

  .events-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .venues-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }

  .tabbar {
    display: none;
  }

  .sheet-backdrop {
    align-items: center;
  }

  .sheet {
    border-radius: 22px;
    border-bottom: 1px solid var(--border-strong);
    max-height: 86vh;
    padding-bottom: 22px;
  }

  .toast {
    bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Mittlere Breiten: iPhone Duo aufgeklappt (~626–670 px), Tablets hochkant ---------- */
@media (min-width: 600px) {
  .events-grid,
  .venues-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    width: calc(50% - 6px);
    min-width: 280px;
  }

  /* Detail-Panel neben der Liste statt Bottom-Sheet */
  .main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    align-items: start;
  }

  .main > .topbar,
  .main > .banner {
    grid-column: 1 / -1;
  }

  .app.has-pane .main {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 42%);
  }

  .app.has-pane .detail-pane {
    display: block;
    position: sticky;
    top: calc(var(--topbar-h) + var(--safe-top));
    align-self: start;
    max-height: calc(100dvh - var(--topbar-h) - var(--safe-top));
    overflow-y: auto;
    padding: 14px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 16px) 6px;
  }

  /* Neben dem Panel: einspaltig bleiben, Scroll-Reihen nicht unter das Panel laufen lassen */
  .app.has-pane .hero-scroll,
  .app.has-pane .chips-row,
  .app.has-pane .date-strip {
    margin-right: 0;
    padding-right: 0;
  }

  .pane-inner {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow);
    animation: fade 0.18s ease;
  }

  .pane-inner .pane-close {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .pane-inner h2 {
    font-family: var(--font-serif);
    font-size: 24px;
    margin: 6px 48px 8px 0;
    line-height: 1.15;
  }

  .pane-inner .kv {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 8px 10px;
    margin: 12px 0;
    font-size: 14.5px;
    color: var(--text-2);
  }

  .pane-inner .kv svg {
    color: var(--muted);
    margin-top: 2px;
  }

  .pane-inner .desc {
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.5;
    margin: 10px 0 14px;
  }

  .pane-inner .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .pane-inner .actions .primary {
    grid-column: 1 / -1;
  }

  .pane-inner .actions [data-close] {
    display: none;
  }

  .pane-inner .lineup {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 10px;
  }

  .pane-inner .lineup span {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 12.5px;
  }

  /* Standort-Dialog mittig statt am unteren Rand */
  .sheet-backdrop {
    align-items: center;
  }

  .sheet {
    border-radius: 22px;
    border-bottom: 1px solid var(--border-strong);
    max-height: 86vh;
    padding-bottom: 22px;
  }
}

@media (min-width: 860px) and (max-width: 1099px) {
  .app {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 16px;
  }
}

@media (min-width: 600px) and (max-width: 859px) {
  .app.has-pane .events-grid,
  .app.has-pane .venues-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app.has-pane .hero {
    width: min(88%, 420px);
  }
}

@media (min-width: 860px) {
  :root {
    --topbar-h: 69px;
  }

  .app.has-pane .detail-pane {
    padding: 16px 32px 32px 0;
  }

  .app.has-pane .hero-scroll,
  .app.has-pane .chips-row,
  .app.has-pane .date-strip {
    margin-right: 0;
    padding-right: 0;
  }
}

/* ---------- Kurze Bildschirme: iPhone Duo zugeklappt (466×678), Querformat ---------- */
@media (max-height: 720px) {
  .hero {
    min-height: 150px;
    padding: 14px;
  }

  .hero h3 {
    font-size: 20px;
  }

  .hero-scroll {
    margin-top: 10px;
  }

  .day {
    padding: 6px 0;
  }
}

@media (max-height: 520px) {
  .hero-scroll {
    display: none;
  }

  .topbar {
    padding-top: calc(6px + var(--safe-top));
    padding-bottom: 6px;
  }
}
