/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* iOS Safari: prevent font size inflation on rotation */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

:root {
  --qg-green:   #CDEA0E;  /* exaktes qundg-Markengrün */
  --qg-blue:    #375D9E;  /* KOON-Blau (Hero, Akzente) */
  --qg-mint:    #E6F9EA;  /* helles Mint als Sekundärfarbe */
  --qg-gray:    #868E96;
  --qg-dark:    #212529;  /* Bootstrap dark, wie auf qundg.de */
  --surface:    #FFFFFF;
  --surface2:   #F8F9FA;  /* neutrales Hellgrau */
  --border:     #E8E8E8;  /* neutrales Grau */
  --text:       #212529;
  --text-muted: #6C757D;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.09);
  --radius-sm:  3px;   /* qundg nutzt fast quadratische Buttons */
  --radius-md:  5px;
  --radius-lg:  8px;
  --header-h:   72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Whitney SSm A", "Whitney SSm B", "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--surface2);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* iOS Safari: prevent tap highlight flash on buttons */
  -webkit-tap-highlight-color: transparent;
}

/* ── Header ── */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  height: var(--header-h);
  border-bottom: 2px solid var(--qg-green);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
}

/* Logo */
.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-koon {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.logo-koon-text {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--qg-dark);
  line-height: 1;
}

.logo-koon-year {
  font-size: 26px;
  font-weight: 900;
  color: var(--qg-green);
  line-height: 1;
}

.logo-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 4px;
}

.logo-qg {
  display: flex;
  flex-direction: column;
}

.logo-qg-top {
  font-size: 10px;
  font-weight: 700;
  color: var(--qg-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}

.logo-qg-bottom {
  font-size: 12px;
  font-weight: 600;
  color: var(--qg-green);
  line-height: 1.2;
}

/* Nav */
.header-nav {
  display: flex;
  gap: 6px;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  border-color: var(--qg-green);
  color: var(--qg-dark);
  background: var(--qg-mint);
}

.nav-btn.active {
  background: var(--qg-green);
  border-color: var(--qg-green);
  color: var(--qg-dark);
}

.badge {
  background: rgba(0,0,0,0.12);
  color: var(--qg-dark);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 22px;
  text-align: center;
  line-height: 1.4;
}

.nav-btn.active .badge { background: rgba(0,0,0,0.15); }

/* ── Hero Banner ── */
.hero-banner {
  background: var(--qg-blue);
  color: white;
  padding: 28px 28px 24px;
  border-bottom: 3px solid var(--qg-green);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--qg-green);
  margin-bottom: 4px;
}

.hero-headline {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.hero-meta {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.hero-meta span {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 5px;
}

.hero-cta {
  padding: 11px 24px;
  border-radius: 4px;
  background: var(--qg-green);
  border: none;
  color: var(--qg-dark);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.hero-cta:hover { opacity: 0.88; }

/* ── Filter Bar ── */
.filter-bar {
  position: -webkit-sticky;
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  padding: 5px 13px;
  border-radius: 3px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.chip:hover { border-color: var(--qg-green); color: var(--qg-dark); background: var(--qg-mint); }
.chip.active { background: var(--qg-green); border-color: var(--qg-green); color: var(--qg-dark); }

.search-group { flex: 1; min-width: 160px; }

#search-input {
  width: 100%;
  max-width: 280px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  background: var(--surface2);
  color: var(--text);
}

#search-input:focus { border-color: var(--qg-green); background: white; }
#search-input::placeholder { color: #b0b5a4; }

/* ── Main Content ── */
#sessions-container, #my-schedule-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px;
}

.day-section { margin-bottom: 44px; }

.day-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border);
}

.day-heading-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.day-heading-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--qg-green);
  flex-shrink: 0;
}

/* ── Session Cards Grid ── */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

/* ── Session Card ── */
.session-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}

.session-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--room-color, #ccc);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.session-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #d0d4c0;
}

.session-card.in-my-schedule {
  border-color: var(--qg-green);
  background: #FAFDE8;
}

.session-card.is-break {
  background: var(--surface2);
  border-style: dashed;
  cursor: default;
  opacity: 0.75;
}

.session-card.is-break:hover {
  transform: none;
  box-shadow: none;
}

.session-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.session-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.room-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  color: white;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.session-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  flex: 1;
}

.session-card.is-break .session-title {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
}

.session-speaker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

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

.session-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.session-card.is-break .session-footer { display: none; }

.session-room-label {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.add-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.add-btn:hover {
  border-color: var(--qg-green);
  color: var(--qg-dark);
  background: var(--qg-mint);
}

.add-btn.added {
  background: var(--qg-green);
  border-color: var(--qg-green);
  color: var(--qg-dark);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 72px 24px;
  color: var(--text-muted);
}

.empty-icon { font-size: 40px; margin-bottom: 16px; }
.empty-state h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 14px; line-height: 1.6; max-width: 320px; margin: 0 auto; }

/* ── My Schedule Timeline ── */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  min-height: 40px;
}

.timeline-time-col {
  width: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 20px;
  padding-right: 12px;
  justify-content: flex-end;
}

.timeline-time-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-axis-col {
  width: 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-axis-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 22px;
  flex-shrink: 0;
  border: 2px solid white;
}

.timeline-axis-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 2px;
}

.timeline-card-col {
  flex: 1;
  padding: 8px 0 8px 12px;
}

/* ── Room Legend ── */
.room-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
}

.room-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.room-legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 32, 20, 0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.modal-header-stripe {
  height: 6px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-body { padding: 28px 32px 32px; }

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  z-index: 1;
}

.modal-close:hover { background: var(--surface2); border-color: #ccc; }

.modal-room-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.modal-room-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-time-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.2px;
  margin-bottom: 18px;
  color: var(--qg-dark);
}

.modal-speaker-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border: 1px solid var(--border);
}

.modal-speaker-initial {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.modal-speaker-name { font-size: 14px; font-weight: 700; color: var(--text); }
.modal-speaker-org { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.modal-description {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 20px;
  white-space: pre-line;
}

.modal-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.modal-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.modal-add-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-md);
  border: 2px solid var(--qg-green);
  background: white;
  color: var(--qg-dark);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-add-btn:hover { background: var(--qg-green); color: var(--qg-dark); }
.modal-add-btn.added { background: var(--qg-green); border-color: var(--qg-green); color: var(--qg-dark); }

/* ── Conflict ── */
.conflict-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: var(--surface);
  color: var(--qg-dark);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: slideIn 0.2s ease;
  max-width: 340px;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--qg-green);
}

.toast.success { border-left-color: var(--qg-green); }
.toast.warning { border-left-color: #f59e0b; }
.toast.info { border-left-color: #6E6E6E; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Map View ── */
#map-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 28px 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.map-section-header {
  margin-bottom: 16px;
}

.map-section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--qg-dark);
  margin-bottom: 2px;
}

.map-section-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Image slot – shared by location + rooms */
.map-image-slot {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface2);
  border: 2px dashed var(--border);
}

.map-image-slot img {
  display: none; /* hidden until loaded */
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.map-image-slot.map-image-loaded {
  border: none;
}

.map-image-slot.map-image-loaded img {
  display: block;
}

/* Placeholder shown when no image */
.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
}

.map-image-slot.map-image-loaded .map-placeholder,
.map-image-slot.map-image-missing .map-placeholder {
  display: flex; /* stays visible on missing, hidden on loaded below */
}

.map-image-slot.map-image-loaded .map-placeholder {
  display: none;
}

.map-placeholder-icon {
  font-size: 32px;
  opacity: 0.35;
  line-height: 1;
}

.map-placeholder-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.map-placeholder-path {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: ui-monospace, monospace;
  opacity: 0.8;
}

/* Rooms grid */
.map-rooms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.map-room-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: white;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.map-room-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.map-room-card .map-image-slot {
  border-radius: 0;
  border: none;
  border-bottom: 1.5px dashed var(--border);
  aspect-ratio: 4 / 3;
}

.map-room-card .map-image-slot.map-image-loaded {
  border-bottom: none;
}

.map-room-card .map-image-slot img {
  border-radius: 0;
}

.map-room-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.map-room-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-room-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.map-room-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--qg-dark);
}

.map-room-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Vorabend-Event ── */
.vorabend-hero {
  position: relative;
  background: linear-gradient(160deg, #1E1535 0%, #2A1A40 50%, #0F2A1A 100%);
  color: white;
  padding: 52px 28px 48px;
  text-align: center;
  overflow: hidden;
}

.vorabend-hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(193,216,47,0.12) 0%, transparent 65%);
  pointer-events: none;
}

.vorabend-hero-content { position: relative; z-index: 1; }

.vorabend-hero-icon {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 20px rgba(193,216,47,0.4));
}

.vorabend-hero-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: white;
}

.vorabend-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  margin-bottom: 28px;
}

.vorabend-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 4px;
  border: none;
  background: var(--qg-green);
  color: var(--qg-dark);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 24px rgba(193,216,47,0.35);
}
.vorabend-cta:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(193,216,47,0.5);
}
.vorabend-cta:active { transform: scale(0.97); }

.vorabend-already-in {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 4px;
  background: rgba(193,216,47,0.15);
  border: 1.5px solid rgba(193,216,47,0.4);
  color: var(--qg-green);
  font-size: 15px;
  font-weight: 700;
}

.vorabend-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--qg-green);
  color: var(--qg-dark);
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}

/* List section */
.vorabend-list-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.vorabend-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
}

.vorabend-count {
  font-size: 15px;
  font-weight: 800;
  color: var(--qg-dark);
}

.vorabend-empty-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 12px 20px 32px;
}

.vorabend-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.vorabend-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: white;
  transition: background 0.1s ease;
}
.vorabend-item:hover { background: var(--surface2); }

.vorabend-item--me { background: var(--qg-mint); }
.vorabend-item--me:hover { background: #eef2d8; }

.vorabend-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.vorabend-item-body { flex: 1; min-width: 0; }

.vorabend-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--qg-dark);
  display: flex;
  align-items: center;
  gap: 7px;
}

.vorabend-me-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--qg-green);
  color: var(--qg-dark);
  padding: 1px 7px;
  border-radius: 99px;
}

.vorabend-item-msg {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
}

.vorabend-item-arrival {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 3px;
}

/* Check-in modal */
.checkin-modal-box { max-width: 420px; }

.checkin-submit-btn {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--qg-green);
  color: var(--qg-dark);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.checkin-submit-btn:hover { opacity: 0.85; }
.checkin-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 768px) {
  .vorabend-hero { padding: 40px 20px 36px; }
  .vorabend-hero-title { font-size: 26px; }
  .vorabend-hero-meta { flex-direction: column; gap: 6px; }
}

/* ── Fahrgemeinschaften ── */
#fg-container {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.fg-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 48px 28px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.fg-loading-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
  font-size: 18px;
}

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

/* Tab switcher */
.fg-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  padding: 0 20px;
  background: white;
  position: sticky;
  top: 60px; /* under header */
  z-index: 10;
}

.fg-tab {
  padding: 14px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.fg-tab:hover { color: var(--qg-dark); }

.fg-tab--active {
  color: var(--qg-dark);
  border-bottom-color: var(--qg-green);
}

/* Action bar */
.fg-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
  flex-wrap: wrap;
}

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

.fg-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(0,0,0,0.12);
  font-size: 11px;
  font-weight: 700;
  margin-left: 3px;
}

.fg-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fg-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.fg-icon-btn:hover { border-color: var(--qg-green); color: var(--qg-dark); background: var(--qg-mint); }

.fg-add-btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  background: var(--qg-green);
  color: var(--qg-dark);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.fg-add-btn:hover { opacity: 0.85; }

/* Cards grid */
.fg-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 20px 20px;
}

.fg-card {
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: white;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.fg-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  transform: translateY(-1px);
}

.fg-biete { border-left: 4px solid var(--qg-green); }
.fg-suche { border-left: 4px solid #f59e0b; }

.fg-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fg-transport-bubble {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.fg-card-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fg-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--qg-dark);
}

.fg-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: fit-content;
}
.fg-badge-biete { background: #e8f5d0; color: #3a6b00; }
.fg-badge-suche { background: #fff3d0; color: #7a4f00; }

.fg-when {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
  line-height: 1.4;
  flex-shrink: 0;
}

.fg-route {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.fg-from { font-weight: 700; color: var(--text); }
.fg-arrow { color: var(--text-muted); }

.fg-via {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 3px;
}

.fg-contact {
  font-size: 13px;
  color: var(--text-muted);
}
.fg-contact a {
  color: var(--qg-dark);
  text-decoration: none;
  font-weight: 600;
}
.fg-contact a:hover { text-decoration: underline; }

.fg-notes {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  line-height: 1.5;
  border: 1px solid var(--border);
}

/* Setup screen */
.fg-setup {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

.fg-setup-icon { font-size: 44px; margin-bottom: 12px; }

.fg-setup-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--qg-dark);
  margin-bottom: 10px;
}

.fg-setup-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
}

.fg-steps {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding-left: 20px;
}

.fg-steps li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.fg-steps a { color: var(--qg-dark); font-weight: 700; }
.fg-steps code {
  font-size: 12px;
  background: var(--surface2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.fg-url-row {
  display: flex;
  gap: 8px;
}

.fg-url-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-family: ui-monospace, monospace;
  color: var(--text);
  background: white;
  min-width: 0;
}
.fg-url-input:focus { outline: none; border-color: var(--qg-green); }

.fg-url-save {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--qg-green);
  color: var(--qg-dark);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.fg-url-save:hover { opacity: 0.85; }

.fg-reset-link {
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 0;
}

/* Form modal */
.fg-modal-box { max-width: 500px; }

.fg-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fg-form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fg-form-row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fg-form-row--half > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fg-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.fg-input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: white;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.fg-input:focus { outline: none; border-color: var(--qg-green); }

.fg-submit-btn {
  margin-top: 6px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--qg-green);
  color: var(--qg-dark);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.fg-submit-btn:hover { opacity: 0.85; }
.fg-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Install Banner ── */
.install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: var(--qg-dark);
  color: white;
  font-size: 13px;
  font-weight: 600;
  flex-wrap: wrap;
}

.install-banner-text {
  flex: 1;
  min-width: 0;
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.install-btn {
  padding: 7px 16px;
  border-radius: 4px;
  border: none;
  background: var(--qg-green);
  color: var(--qg-dark);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.install-btn:hover { opacity: 0.85; }

.install-dismiss {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.install-dismiss:hover { background: rgba(255,255,255,0.25); }

/* ── Random Button ── */
.search-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-group input {
  flex: 1;
  min-width: 0;
}

.random-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 17px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  line-height: 1;
}
.random-btn:hover {
  border-color: var(--qg-green);
  background: var(--qg-mint);
  transform: rotate(20deg) scale(1.05);
}
.random-btn:active { transform: rotate(40deg) scale(0.95); }

/* ── Share Bar (Mein Programm) ── */
.share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--qg-mint);
  border: 1.5px solid #d6e87a;
  border-radius: var(--radius-md);
  margin: 20px 20px 4px;
}

.share-bar-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--qg-dark);
  opacity: 0.8;
}

.share-btn {
  padding: 7px 14px;
  border-radius: 4px;
  border: 1.5px solid var(--qg-green);
  background: var(--qg-green);
  color: var(--qg-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}
.share-btn:hover { opacity: 0.8; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; gap: 10px; }
  .logo-divider, .logo-qg { display: none; }
  .hero-banner { padding: 20px 16px; }
  .hero-headline { font-size: 22px; }
  .hero-cta { display: none; }
  .filter-inner { padding: 8px 16px; }
  #sessions-container, #my-schedule-container { padding: 16px; }
  .sessions-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 20px 20px 24px; }
  .share-bar { margin: 0 0 4px; border-radius: 0; border-left: none; border-right: none; }
  .install-banner { padding: 10px 16px; font-size: 12px; }
  #map-container { padding: 20px 16px 48px; gap: 32px; }
  .map-rooms-grid { grid-template-columns: 1fr; }
  .fg-grid { padding: 4px 12px 20px; }
  .fg-action-bar { padding: 12px 12px 8px; }
  .fg-form-row--half { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav-btn .nav-text { display: none; }
  .install-banner-text { font-size: 12px; }
}
