/* ==========================================================================
   Design System & Styling: Evangelisationszeiten Norddeutschland
   Präzises, klares & modernes Hell-Design (Kein Darkmode, Kein Logo-Icon)
   ========================================================================== */

:root {
  /* Helles, freundliches und klares Farbschema */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --brand-blue: #2563eb;
  --brand-blue-hover: #1d4ed8;
  --brand-blue-subtle: #eff6ff;
  --brand-blue-border: #bfdbfe;

  --accent-gold: #b45309;
  --accent-gold-bg: #fffbeb;
  --accent-gold-border: #fde68a;

  --accent-emerald: #059669;
  --accent-emerald-subtle: #ecfdf5;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 0 3px rgba(37, 99, 235, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 5%, rgba(37, 99, 235, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 40%, rgba(180, 83, 9, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header & Navigation (Kein Logo, Nur sauberer Text)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-text-link {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--brand-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--brand-blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 55px 0 35px;
  text-align: center;
}

.hero-content {
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--brand-blue-subtle);
  border: 1px solid var(--brand-blue-border);
  color: var(--brand-blue);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 20px;
}

.hero-title .highlight {
  color: var(--brand-blue);
}

.scripture-quote-hero {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  margin: 0 auto 30px;
  width: fit-content;
  max-width: min(860px, 94vw);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.scripture-text {
  font-style: italic;
  font-size: 1.02rem;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.5;
  white-space: nowrap !important;
}

@media (max-width: 820px) {
  .scripture-text {
    white-space: normal !important;
    text-wrap: balance;
  }
}

.scripture-ref {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--brand-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}


.btn-app-install {
  background: #0f172a;
  color: #ffffff !important;
  border: 1px solid #1e293b;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
}
.btn-app-install:hover {
  background: #1e293b;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-2px);
}

/* Stats Counter */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-blue);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   Map Section
   ========================================================================== */
.map-section {
  padding: 30px 0;
}

.map-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
  flex-wrap: wrap;
  gap: 12px;
}

.map-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.map-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.map-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.map-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.map-btn:hover {
  background: #f1f5f9;
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.map-leaflet-wrapper {
  position: relative;
  width: 100%;
  height: 580px;
  background: #f1f5f9;
  z-index: 1;
}

/* Diffused Heatmap für abgesteckte Bereiche (Datenschutz Gäste) */
.diffused-heat-circle {
  filter: blur(12px);
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.diffused-heat-circle:hover {
  filter: blur(10px);
  cursor: pointer;
}

/* Floating Drawing Banner */
.draw-banner {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  pointer-events: auto;
}

.draw-btn-finish {
  background: var(--accent-emerald);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.draw-btn-finish:hover {
  opacity: 0.9;
}

.draw-btn-cancel {
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
}

.draw-btn-cancel:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

/* Leaflet Custom Popup */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border-color) !important;
  font-family: var(--font-body) !important;
  padding: 4px !important;
}

.leaflet-popup-tip {
  background: #ffffff !important;
}

.custom-map-popup {
  padding: 8px 4px 4px;
  min-width: 200px;
}

.custom-map-popup h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.custom-map-popup .popup-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 6px;
  white-space: pre-line;
  line-height: 1.4;
}

.custom-map-popup .popup-meeting {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.custom-map-popup .popup-btn,
.custom-map-popup .popup-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--brand-blue);
  color: #ffffff !important;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition-fast);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.custom-map-popup .popup-btn:hover,
.custom-map-popup .popup-btn-primary:hover {
  background: var(--brand-blue-hover);
}

.custom-map-popup .popup-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.custom-map-popup .popup-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--brand-blue) !important;
}

/* Leaflet Attribution: Keine Flaggen, saubere dezente Typografie */
.leaflet-control-attribution svg,
.leaflet-attribution-flag {
  display: none !important;
}
.leaflet-control-attribution {
  font-size: 11px !important;
  color: #64748b !important;
  background: rgba(255, 255, 255, 0.85) !important;
  border-radius: var(--radius-sm) 0 0 0 !important;
}

.map-footer-bar {
  padding: 12px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Directory & Search Section
   ========================================================================== */
.directory-section {
  padding: 50px 0;
}

.section-head {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 36px;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-blue);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

.search-filter-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-glow);
}

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

.filter-btn {
  padding: 6px 14px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--brand-blue);
  color: white;
  border-color: var(--brand-blue);
}

/* Congregation Cards */
.congregation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.congregation-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.congregation-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.city-badge {
  padding: 4px 10px;
  background: var(--brand-blue-subtle);
  color: var(--brand-blue);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.congregation-card.pending-card {
  border-left: 4px solid #f59e0b;
  background: #fffdfa;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.card-time {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--accent-gold);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 10px;
  white-space: pre-line;
  line-height: 1.4;
}

.card-time svg {
  margin-top: 2px;
  flex-shrink: 0;
}

.card-address {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.card-btn {
  flex: 1;
  padding: 9px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.card-btn:hover {
  background: var(--brand-blue);
  color: white;
  border-color: var(--brand-blue);
}

/* ==========================================================================
   Biblical Foundations Section
   ========================================================================== */
.foundations-section {
  padding: 60px 0;
  background: #f1f5f9;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   Seminare & Praxistrainings (Bereichs-Wrap, Listenzeilen & Promo-Karte)
   ========================================================================== */
.courses-section-box {
  max-width: 980px;
  margin: 0 auto 36px auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.courses-list-wrapper {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.courses-list-wrapper .course-list-item {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #f1f5f9;
  box-shadow: none;
}

.courses-list-wrapper .course-list-item:last-child {
  border-bottom: none;
}

.courses-list-wrapper .course-list-item:hover {
  background: #f8fafc;
  box-shadow: none;
}

/* Gemeinde-Werbung als eigenständige Box / Karte */
.course-card-promo {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.course-card-promo:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.course-card-promo-body {
  flex: 1;
  min-width: 0;
}

.course-card-promo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.course-card-promo-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
}

.course-card-promo-desc {
  font-size: 0.86rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

.course-card-promo-action {
  flex-shrink: 0;
}

.course-list-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.course-list-item:hover {
  border-color: #94a3b8;
  background: #fbfcfd;
  box-shadow: var(--shadow-sm);
}

.course-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.course-row-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.course-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.course-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.course-row-meta {
  font-size: 0.82rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.course-list-action {
  flex-shrink: 0;
}

.course-list-action .btn {
  white-space: nowrap;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
}

@media (max-width: 768px) {
  .courses-section-box {
    padding: 16px;
    gap: 16px;
  }
  .course-card-promo {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
  }
  .course-card-promo-action {
    width: 100%;
  }
  .course-card-promo-action .btn {
    width: 100%;
    justify-content: center;
  }
  .course-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
  }
  .course-row-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }
  .course-row-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .course-list-action {
    width: 100%;
  }
  .course-list-action .btn {
    width: 100%;
    justify-content: center;
  }
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 35px;
}

.pillar-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.pillar-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #0f172a;
}

.pillar-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.keywords-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kw-tag {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

/* Romans Road Box - Sachlich, funktional, nüchtern */
.romans-road-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: none;
}

.romans-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  text-align: left;
  color: #0f172a;
  margin-bottom: 6px;
}

.romans-sub {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.romans-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.romans-step {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.step-num {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: #475569;
  min-width: 22px;
}

.step-content {
  flex: 1;
}

.step-verse {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #0f172a;
}

.step-text {
  font-size: 0.92rem;
  color: #1e293b;
  line-height: 1.6;
}

.step-question {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.5;
}

.step-question strong {
  color: #0f172a;
  font-weight: 700;
}

.romans-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
}

.romans-note strong {
  color: #0f172a;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
  padding: 60px 0;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.faq-icon {
  transition: transform var(--transition-normal);
  color: var(--brand-blue);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 18px;
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

#legalModal {
  z-index: 2000 !important;
}

.open-privacy-trigger,
.open-terms-trigger {
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.open-privacy-trigger:hover,
.open-terms-trigger:hover {
  opacity: 0.8;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
}

.modal-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.form-input:focus {
  background: #ffffff;
  border-color: var(--brand-blue);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.checkbox-group input {
  margin-top: 3px;
  accent-color: var(--brand-blue);
}

/* ==========================================================================
   Footer (Kein Logo, Nur sauberer Text)
   ========================================================================== */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 50px 0 30px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  margin-bottom: 35px;
  align-items: start;
}

.footer-brand-desc {
  margin-top: 10px;
  max-width: 420px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, auto));
  gap: 10px 32px;
}

.footer-link:hover {
  color: var(--brand-blue);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 850px) {
  .nav-links {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2rem;
  }
  .stats-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .map-frame-wrapper {
    height: 420px;
  }
  .congregation-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Leaflet Map Popups & Melden Buttons
   ========================================================================== */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  font-family: var(--font-body) !important;
  border: 1px solid var(--border-color);
  padding: 4px;
}

.leaflet-popup-content {
  margin: 12px 14px !important;
  line-height: 1.4 !important;
}

.custom-map-popup h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.custom-map-popup .popup-time {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-blue);
  margin-bottom: 4px;
}

.custom-map-popup .popup-meeting {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 8px;
}

.popup-btn {
  display: block;
  text-align: center;
  background: var(--brand-blue);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.popup-btn:hover {
  background: var(--brand-blue-hover);
}

.popup-report-btn {
  display: inline-block;
  text-align: center;
  color: #dc2626 !important;
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: underline;
  padding: 2px 4px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.popup-report-btn:hover {
  opacity: 1;
}

/* ==========================================================================
   THEME 2: Nüchtern, Seriös & Zurückhaltend
   Keine bunten Span-Boxen, gedämpfte Farben, ruhige Typografie
   ========================================================================== */
body[data-theme="theme-2"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #1e293b;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --brand-blue: #1e293b;         /* Seriöses Schiefer/Navy statt Knallblau */
  --brand-blue-hover: #0f172a;
  --brand-blue-subtle: #f1f5f9;  /* Ruhiges Grau statt Babyblau */
  --brand-blue-border: #cbd5e1;

  --accent-gold: #475569;
  --accent-gold-bg: #f8fafc;
  --accent-gold-border: #cbd5e1;

  --accent-emerald: #334155;
  --accent-emerald-subtle: #f1f5f9;

  background-image: none !important; /* Ruhiger Hintergrund ohne Bunt-Gradienten */
}

/* Theme 2: Badges & Span-Boxen schlicht und seriös */
body[data-theme="theme-2"] .hero-badge {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600 !important;
  padding: 5px 14px !important;
  box-shadow: none !important;
}

body[data-theme="theme-2"] .pulse-dot {
  background: #64748b !important; /* Dezenter Schieferpunkt statt Neongrün */
}

body[data-theme="theme-2"] .section-tag {
  color: #64748b !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

body[data-theme="theme-2"] .hero-title .highlight {
  color: #0f172a !important; /* Seriöses einheitliches Dunkel anstelle von Knallblau */
}

body[data-theme="theme-2"] .scripture-quote-hero {
  border-left: 3px solid #334155 !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}

body[data-theme="theme-2"] .scripture-ref {
  color: #64748b !important;
}

/* Theme 2: Kurs-Liste schlicht und sachlich */
body[data-theme="theme-2"] .course-list-item {
  box-shadow: none !important;
  border: 1px solid #cbd5e1 !important;
}

body[data-theme="theme-2"] .course-list-item:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

body[data-theme="theme-2"] .course-badge {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

body[data-theme="theme-2"] .course-meta-list {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

/* Theme 2: Buttons ruhig und edel */
body[data-theme="theme-2"] .btn-primary {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
}

body[data-theme="theme-2"] .btn-primary:hover {
  background: #334155 !important;
  border-color: #334155 !important;
}

body[data-theme="theme-2"] .btn-secondary {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body[data-theme="theme-2"] .btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

/* Theme 2: Gemeindekarten & Tags */
body[data-theme="theme-2"] .city-badge {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
}

body[data-theme="theme-2"] .filter-btn {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

body[data-theme="theme-2"] .filter-btn.active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
}

body[data-theme="theme-2"] .kw-tag {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

body[data-theme="theme-2"] .romans-road-box {
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
}

body[data-theme="theme-2"] .romans-step .step-num {
  color: #475569 !important;
}

body[data-theme="theme-2"] .romans-step .step-verse {
  color: #0f172a !important;
}

body[data-theme="theme-2"] .romans-step .step-question {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

body[data-theme="theme-2"] .map-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid #e2e8f0 !important;
}

/* Theme Switcher Button Styling */
.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.theme-switch-btn:hover {
  background: #e2e8f0;
}

body[data-theme="theme-2"] .theme-switch-btn {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* ==========================================================================
   Leaflet Map Popups - Modern Premium Card Style
   ========================================================================== */
.leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.18), 0 4px 10px -2px rgba(15, 23, 42, 0.08) !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  padding: 0 !important;
  overflow: hidden !important;
  font-family: inherit !important;
}

.leaflet-popup-content {
  margin: 16px 18px !important;
  line-height: 1.4 !important;
  font-size: 0.9rem !important;
}

.leaflet-popup-tip {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15) !important;
}

.custom-map-popup {
  min-width: 250px;
  max-width: 320px;
}

.custom-map-popup .popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.custom-map-popup h4 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.custom-map-popup .popup-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 6px;
}

.custom-map-popup .popup-notes-box {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.custom-map-popup .popup-btn-approve {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  margin-top: 10px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.custom-map-popup .popup-btn-approve:hover {
  background: #059669;
}

.custom-map-popup .popup-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  gap: 10px;
}

.custom-map-popup .popup-btn-edit {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.custom-map-popup .popup-btn-edit:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.custom-map-popup .popup-btn-delete {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.custom-map-popup .popup-btn-delete:hover {
  background: #fecaca;
}

.custom-map-popup .popup-link-report {
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s ease;
}

.custom-map-popup .popup-link-report:hover {
  text-decoration: underline;
  opacity: 0.85;
}





/* ==========================================================================
   Bible-Memory Karaoke-Loop Styling (Multisensorisches Bibelmemorieren)
   ========================================================================== */
.memory-section {
  padding: 64px 0;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.memory-tag {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.memory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.memory-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.memory-verse-selector-wrap,
.memory-modes-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.memory-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.memory-select {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.memory-select:focus {
  border-color: var(--brand-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.memory-mode-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mode-pill:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.mode-pill.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mode-pill.auto-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-stage1 { background: #10b981; }
.dot-stage2 { background: #f59e0b; }
.dot-stage3 { background: #8b5cf6; }

/* Quick Verses Tabs */
.memory-verse-pills-bar {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.verse-quick-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.verse-quick-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.verse-quick-pill.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

/* The Karaoke Screen */
.memory-screen {
  background: #0f172a;
  border-radius: var(--radius-md);
  padding: 32px 28px;
  color: #ffffff;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.memory-screen-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.memory-ref-badge {
  background: #3b82f6;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
}

.memory-version-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.memory-theme-badge {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
}

.memory-loop-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.memory-meaning {
  font-size: 0.95rem;
  color: #94a3b8;
  font-style: italic;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Dynamic Karaoke Word Typography */
.memory-text-display {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  line-height: 1.75;
  color: #e2e8f0;
  font-weight: 500;
  margin-bottom: 24px;
  word-spacing: 4px;
}

.mem-word {
  display: inline-block;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color 0.12s ease, transform 0.12s ease, color 0.12s ease;
  position: relative;
}

.mem-word.active-karaoke-word {
  background: #facc15;
  color: #0f172a;
  font-weight: 700;
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.6);
  z-index: 2;
}

/* Blank Words in Stage 2 */
.mem-word.blank-word {
  border-bottom: 2px dashed #64748b;
  color: #64748b;
  font-family: monospace;
  letter-spacing: 2px;
  cursor: pointer;
}

.mem-word.blank-word:hover,
.mem-word.blank-word.revealed {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

/* Initial Words in Stage 3 */
.mem-word.initial-word {
  color: #a78bfa;
  font-weight: 600;
  cursor: pointer;
}

.mem-word.initial-word .hidden-chars {
  color: #475569;
  letter-spacing: 2px;
}

.mem-word.initial-word:hover .hidden-chars,
.mem-word.initial-word.revealed .hidden-chars {
  color: #c084fc;
}

.memory-hint-bar {
  display: flex;
  justify-content: flex-end;
  font-size: 0.8rem;
  color: #64748b;
}

/* Player Controls Bar */
.memory-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.memory-ctrl-left,
.memory-ctrl-center,
.memory-ctrl-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-ctrl:hover {
  background: var(--bg-secondary);
  border-color: #cbd5e1;
}

.btn-play-pause {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: var(--brand-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: var(--transition-fast);
}

.btn-play-pause:hover {
  background: var(--brand-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-play-pause.is-playing {
  background: #e11d48;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.btn-play-pause.is-playing:hover {
  background: #be123c;
}

.btn-loop-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-loop-toggle.active {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.speed-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-peek {
  background: #f8fafc;
  color: var(--text-secondary);
}

.btn-peek:hover {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .memory-card {
    padding: 18px 14px;
  }
  .memory-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .memory-text-display {
    font-size: 1.25rem;
    line-height: 1.65;
  }
  .memory-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .memory-ctrl-left,
  .memory-ctrl-center,
  .memory-ctrl-right {
    justify-content: center;
    width: 100%;
  }
  .btn-play-pause {
    flex: 1;
    justify-content: center;
  }
}
