/**
 * Virtuelle Stadtführung v2.5 – Premium Design
 * Design Language: Quiet Luxury Travel
 * Typography: DM Serif Display (display) + DM Sans (body)
 * Palette: Deep teal, warm sand, soft cream
 * Effects: Strategic glassmorphism, purposeful micro-interactions
 */

/* ================================================================
   DESIGN TOKENS
   ================================================================ */

:root {
  --vsf-primary: #2A7C6F;
  --vsf-primary-dark: #1D5D54;
  --vsf-primary-light: #E8F4F1;
  --vsf-accent: #C9A96E;
  --vsf-accent-light: #F5EDE0;
  --vsf-bg: #FAFAF7;
  --vsf-text: #2C2C2C;
  --vsf-text-muted: #7A7A72;
  --vsf-text-light: #A8A8A0;
  --vsf-overlay: rgba(18, 25, 28, 0.88);
  --vsf-modal-bg: #FFFFFF;
  --vsf-border: rgba(0, 0, 0, 0.06);
  --vsf-border-light: rgba(255, 255, 255, 0.12);
  --vsf-radius: 16px;
  --vsf-radius-sm: 10px;
  --vsf-radius-lg: 24px;
  --vsf-shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --vsf-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --vsf-shadow-lg: 0 12px 48px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
  --vsf-glass: rgba(255, 255, 255, 0.72);
  --vsf-glass-border: rgba(255, 255, 255, 0.25);
  --vsf-glass-dark: rgba(18, 25, 28, 0.78);
  --vsf-glass-dark-border: rgba(255, 255, 255, 0.08);
  --vsf-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --vsf-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --vsf-duration: 0.35s;
  --vsf-duration-slow: 0.6s;
  --vsf-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --vsf-font-display: 'DM Serif Display', Georgia, serif;
}

/* ================================================================
   BASE & UTILITY
   ================================================================ */
.vsf-hidden { display: none !important; }

/* Visually hidden, but accessible to screen readers (a11y v5.15.0).
   Standard "sr-only" pattern; do NOT use display:none — SRs would skip it. */
.vsf-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[id^="vsf-"], [class^="vsf-"] { box-sizing: border-box; }

/* ================================================================
   BUTTONS
   ================================================================ */
.vsf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 2em;
  border: none;
  border-radius: var(--vsf-radius-sm);
  font-family: var(--vsf-font);
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all var(--vsf-duration) var(--vsf-ease);
  position: relative;
  overflow: hidden;
}

.vsf-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.vsf-btn:hover::after { opacity: 0.06; }
.vsf-btn:active { transform: scale(0.97); }

.vsf-btn-primary {
  background: var(--vsf-primary);
  color: white;
  box-shadow: 0 2px 12px rgba(42, 124, 111, 0.25);
}

.vsf-btn-primary:hover {
  background: var(--vsf-primary-dark);
  color: white;
  box-shadow: 0 4px 20px rgba(42, 124, 111, 0.35);
  transform: translateY(-1px);
}

.vsf-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.vsf-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}

.vsf-btn-tertiary {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9em;
}

.vsf-btn-tertiary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ================================================================
   STARTSCREEN
   ================================================================ */
/* ================================================================
   STARTSCREEN
   ================================================================ */
.vsf-start-screen {
  position: fixed;
  inset: 0;
  background: #12191c;
  z-index: 100000;
  color: white;
  overflow: hidden;
}

/* Fullscreen Hero */
.vsf-start-hero {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.vsf-start-hero.vsf-hero-empty {
  background: linear-gradient(160deg, rgba(42, 124, 111, 0.25) 0%, var(--vsf-bg) 60%);
}

.vsf-start-media {
  position: absolute;
  inset: 0;
}

.vsf-start-video,
.vsf-start-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.vsf-start-img {
  animation: vsfKenBurnsA 12s ease-in-out infinite alternate;
}

.vsf-start-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease;
  will-change: opacity, transform;
}

.vsf-start-slide.vsf-slide-active {
  opacity: 1;
}

/* Ken Burns fuer Start-Slideshow */
.vsf-start-slide.vsf-ken-burns-a {
  animation: vsfKenBurnsA 10s ease-in-out infinite alternate;
}

.vsf-start-slide.vsf-ken-burns-b {
  animation: vsfKenBurnsB 10s ease-in-out infinite alternate;
}

/* Gradient: dunkel, edel – wie Reached/End Screens */
.vsf-start-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
    rgba(18, 25, 28, 1) 0%,
    rgba(18, 25, 28, 0.95) 15%,
    rgba(18, 25, 28, 0.7) 40%,
    rgba(12, 16, 18, 0.45) 65%,
    rgba(8, 10, 12, 0.35) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Vignette (wie Reached/End Screens) */
.vsf-start-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

/* Animierte Route */
.vsf-start-route {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 30%;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 65%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 65%, transparent 100%);
}

.vsf-start-route .vsf-route-svg {
  width: 300px;
  height: 85%;
  max-height: 500px;
  opacity: 0;
  animation: vsf-start-route-in 1.2s ease 0.3s forwards;
}

@keyframes vsf-start-route-in {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 0.9; transform: translateY(0); }
}

/* Pin drop animation fuer Start-Screen */
.vsf-start-pin-drop {
  opacity: 0;
  animation: vsfPinDrop 0.5s var(--vsf-ease) forwards;
}

@keyframes vsfPinDrop {
  0%   { opacity: 0; transform: translateY(-12px) scale(0.4); }
  60%  { opacity: 1; transform: translateY(2px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Utility Buttons (Info / Hilfe) oben rechts */
.vsf-start-utils {
  position: absolute;
  top: env(safe-area-inset-top, 12px);
  right: 12px;
  z-index: 10;
  display: flex;
  gap: 8px;
  padding-top: 12px;
}

.vsf-util-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.vsf-util-btn:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* Content unten */
.vsf-start-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 0 2em env(safe-area-inset-bottom, 2.5em);
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}

@keyframes vsfFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vsf-start-title {
  font-family: var(--vsf-font-display);
  font-size: 1.6em;
  font-weight: 400;
  margin: 0 0 0.25em;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
  animation: vsfFadeUp 0.6s var(--vsf-ease) both;
}

.vsf-start-motto {
  font-family: var(--vsf-font);
  font-size: 0.88em;
  font-weight: 400;
  font-style: italic;
  margin: 0 0 1.2em;
  opacity: 0.55;
  line-height: 1.4;
  animation: vsfFadeUp 0.6s var(--vsf-ease) 0.05s both;
}

/* Meta: vertikale Liste */
.vsf-start-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  margin-bottom: 1.5em;
  animation: vsfFadeUp 0.6s var(--vsf-ease) 0.1s both;
}

.vsf-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--vsf-font);
  font-size: 0.88em;
  opacity: 0.55;
}

.vsf-meta-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Buttons */
.vsf-start-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: center;
  animation: vsfFadeUp 0.6s var(--vsf-ease) 0.15s both;
}

.vsf-start-buttons .vsf-btn {
  width: 100%;
  max-width: 280px;
}

/* Bottom Sheet (Info / Hilfe) */
.vsf-start-sheet {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  background: rgba(0,0,0,0.5);
}

.vsf-sheet-inner {
  width: 100%;
  max-height: 70vh;
  background: var(--vsf-bg);
  border-radius: var(--vsf-radius) var(--vsf-radius) 0 0;
  display: flex;
  flex-direction: column;
  animation: vsfSheetUp 0.3s var(--vsf-ease);
}

@keyframes vsfSheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.vsf-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em 1.5em;
  border-bottom: 1px solid var(--vsf-border);
  flex-shrink: 0;
}

.vsf-sheet-title {
  font-family: var(--vsf-font);
  font-size: 0.88em;
  font-weight: 600;
  color: var(--vsf-text);
}

.vsf-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--vsf-glass);
  color: var(--vsf-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.vsf-sheet-body {
  padding: 1.5em;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--vsf-font);
  font-size: 0.88em;
  line-height: 1.7;
  color: var(--vsf-text);
}

.vsf-sheet-body p {
  margin: 0 0 0.8em;
}

.vsf-sheet-body p:last-child {
  margin-bottom: 0;
}

/* ================================================================
   TOUR CONTAINER
   ================================================================ */
#vsf-tour-container {
  position: relative;
  width: 100%;
  font-family: var(--vsf-font);
  color: var(--vsf-text);
  background: var(--vsf-bg);
}

/* ================================================================
   MAP
   ================================================================ */
#vsf-map-wrapper {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 400px;
  overflow: hidden;
}

#vsf-tour-map { width: 100%; height: 100%; }

/* Split-View */
#vsf-map-wrapper.vsf-split-view { display: flex; overflow: hidden; }
#vsf-map-wrapper.vsf-split-view #vsf-tour-map { width: 100%; transition: width var(--vsf-duration-slow) var(--vsf-ease); }
#vsf-map-wrapper.vsf-split-view #vsf-streetview { width: 0; height: 100%; opacity: 0; overflow: hidden; transition: width var(--vsf-duration-slow) var(--vsf-ease), opacity 0.4s ease 0.15s; }
#vsf-map-wrapper.vsf-sv-visible #vsf-tour-map { width: 35%; }
#vsf-map-wrapper.vsf-sv-visible #vsf-streetview { width: 65%; opacity: 1; }

/* ================================================================
   CUSTOM MAP MARKERS
   Using !important on critical properties to resist theme overrides
   ================================================================ */
.vsf-custom-marker {
  transition: opacity 0.4s ease, transform 0.4s var(--vsf-ease), filter 0.5s ease;
}

.vsf-custom-marker.vsf-fade-out {
  opacity: 0;
  transform: scale(0.7);
}

/* Besuchter Marker: kleiner, heller, dezent */
.vsf-custom-marker.vsf-marker-done {
  opacity: 1;
  transform: scale(0.7);
  filter: saturate(0.3) brightness(1.3);
  pointer-events: auto;
}
.vsf-custom-marker.vsf-marker-done .vsf-marker-bubble {
  box-shadow: 0 2px 6px rgba(42, 124, 111, 0.15), 0 0 0 2px rgba(255,255,255,0.7) !important;
  animation: none !important;
}
.vsf-custom-marker.vsf-marker-done .vsf-marker-tail {
  opacity: 0.4;
}

.vsf-marker-bubble {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  background: var(--vsf-primary) !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--vsf-font) !important;
  font-weight: 700 !important;
  font-size: 0.85em !important;
  line-height: 1 !important;
  box-shadow: 0 3px 12px rgba(42, 124, 111, 0.35), 0 0 0 3px rgba(255,255,255,0.9) !important;
  cursor: pointer !important;
  transition: all 0.3s var(--vsf-ease) !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  outline: none !important;
  position: relative !important;
  z-index: 2 !important;
}

.vsf-marker-bubble img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.vsf-marker-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(42, 124, 111, 0.45), 0 0 0 3px rgba(255,255,255,0.95) !important;
}

/* Nummer-Badge oben links auf Foto-Pins */
.vsf-marker-badge {
  position: absolute !important;
  top: -2px !important;
  left: -2px !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: var(--vsf-primary) !important;
  color: white !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  font-family: var(--vsf-font) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
  border: 2px solid white !important;
  z-index: 3 !important;
}

/* Dreieck-Tail unter dem runden Bubble */
.vsf-marker-tail {
  width: 0 !important;
  height: 0 !important;
  border-left: 7px solid transparent !important;
  border-right: 7px solid transparent !important;
  border-top: 10px solid white !important;
  margin: -3px auto 0 !important;
  background: none !important;
  transform: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: relative !important;
  z-index: 1 !important;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15)) !important;
}

.vsf-marker-active {
  animation: vsfBreathGlow 2.5s ease-in-out infinite;
}

@keyframes vsfBreathGlow {
  0%, 100% { box-shadow: 0 3px 12px rgba(42,124,111,0.35), 0 0 0 3px rgba(255,255,255,0.9), 0 0 0 6px rgba(42,124,111,0); }
  50% { box-shadow: 0 4px 16px rgba(42,124,111,0.5), 0 0 0 3px rgba(255,255,255,0.95), 0 0 0 10px rgba(42,124,111,0.12); }
}

/* ================================================================
   MARKER PREVIEW CARD (Virtual Mode)
   ================================================================ */
#vsf-marker-preview {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: 320px;
  background: var(--vsf-glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--vsf-glass-border);
  border-radius: var(--vsf-radius-lg);
  z-index: 200;
  box-shadow: var(--vsf-shadow-lg);
  animation: vsfSlideInRight var(--vsf-duration-slow) var(--vsf-ease) both;
  overflow: hidden;
}

#vsf-marker-preview.vsf-hidden { display: none !important; }

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

.vsf-slide-out-right {
  animation: vsfSlideOutRight 0.4s var(--vsf-ease) both !important;
}

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

.vsf-preview-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.vsf-preview-image-wrap {
  position: relative;
  width: 100%;
  height: 55%;
  min-height: 160px;
  overflow: hidden;
}

.vsf-preview-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 4s ease;
}

#vsf-marker-preview:hover .vsf-preview-image-wrap img {
  transform: scale(1.04);
}

.vsf-preview-number {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  background: var(--vsf-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--vsf-font);
  font-weight: 700;
  font-size: 0.85em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.vsf-preview-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vsf-preview-title {
  font-family: var(--vsf-font-display);
  font-size: 1.25em;
  font-weight: 400;
  margin: 0 0 8px 0;
  color: var(--vsf-text);
  line-height: 1.25;
}

.vsf-preview-desc {
  font-family: var(--vsf-font);
  font-size: 0.88em;
  color: var(--vsf-text-muted);
  line-height: 1.55;
  margin: 0 0 16px 0;
  flex: 1;
  overflow-y: auto;
}

.vsf-preview-btn {
  font-size: 0.88em;
  padding: 0.7em 1.6em;
}

.vsf-preview-buttons {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.vsf-preview-buttons .vsf-btn-secondary {
  font-size: 0.82em;
  padding: 0.7em 1.2em;
  background: transparent;
  color: var(--vsf-text-muted);
  border-color: var(--vsf-border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.vsf-preview-buttons .vsf-btn-secondary:hover {
  background: var(--vsf-bg-alt);
  color: var(--vsf-text);
  border-color: var(--vsf-text-muted);
}

@media (max-width: 768px) {
  #vsf-marker-preview {
    width: calc(100% - 24px);
    height: 50%;
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    border-radius: var(--vsf-radius-lg);
    animation-name: vsfSlideInBottom;
  }

  @keyframes vsfSlideInBottom {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }

  .vsf-slide-out-right { animation-name: vsfSlideOutBottom !important; }

  @keyframes vsfSlideOutBottom {
    from { transform: translateY(0); opacity: 1; }
    to   { transform: translateY(40px); opacity: 0; }
  }

  .vsf-preview-image-wrap { height: 40%; min-height: 100px; }
}

/* ================================================================
   NEXT POINT BANNER
   ================================================================ */
#vsf-next-info {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  animation: vsfFadeInDown 0.5s var(--vsf-ease) both;
}

#vsf-next-info.vsf-hidden { display: none !important; }

@keyframes vsfFadeInDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.vsf-next-info-inner {
  background: var(--vsf-glass-dark);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  color: #fff;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid var(--vsf-glass-dark-border);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  font-family: var(--vsf-font);
  font-size: 0.9em;
  white-space: nowrap;
}

.vsf-next-info-label {
  color: rgba(255,255,255,0.5);
  font-size: 0.85em;
  font-weight: 500;
}

.vsf-next-info-progress {
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.78em;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.03em;
}

.vsf-next-info-name { font-weight: 600; }
.vsf-next-info-distance { color: var(--vsf-accent); font-weight: 600; }

/* ================================================================
   VIRTUAL WALK CONTROLS
   ================================================================ */
#vsf-walk-controls {
  background: var(--vsf-glass-dark);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  padding: 10px 16px;
  border-top: 1px solid var(--vsf-glass-dark-border);
}

.vsf-walk-controls-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.vsf-walk-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: none;
  border-radius: var(--vsf-radius-sm);
  width: 38px;
  height: 38px;
  font-size: 0.85em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--vsf-ease);
  flex-shrink: 0;
  font-family: var(--vsf-font);
}

.vsf-walk-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.vsf-walk-btn:active { transform: scale(0.92); }

.vsf-walk-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.vsf-walk-btn-play {
  background: var(--vsf-primary);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(42, 124, 111, 0.3);
}

.vsf-walk-btn-play:hover {
  background: var(--vsf-primary-dark);
  box-shadow: 0 4px 20px rgba(42, 124, 111, 0.4);
  transform: scale(1.05);
}

.vsf-walk-btn-play.playing {
  background: var(--vsf-accent);
  box-shadow: 0 2px 12px rgba(201, 169, 110, 0.3);
}

.vsf-walk-btn-play.playing:hover { background: #b8943d; }

.vsf-walk-btn-play svg {
  width: 18px;
  height: 18px;
}

.vsf-walk-speed-btn {
  font-size: 0.8em;
  font-weight: 700;
  width: auto;
  padding: 0 12px;
  letter-spacing: 0.02em;
}

.vsf-walk-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.vsf-walk-progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  min-width: 60px;
  cursor: pointer;
  transition: height 0.2s ease;
}

.vsf-walk-progress:hover { height: 6px; }

.vsf-walk-progress-bar {
  height: 100%;
  background: var(--vsf-primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s linear;
}

.vsf-walk-distance {
  color: rgba(255,255,255,0.5);
  font-family: var(--vsf-font);
  font-size: 0.78em;
  font-weight: 500;
  white-space: nowrap;
  min-width: 50px;
  text-align: right;
  flex-shrink: 0;
}

.vsf-walk-station {
  color: rgba(255,255,255,0.35);
  font-family: var(--vsf-font);
  font-size: 0.72em;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

@media (max-width: 500px) {
  .vsf-walk-controls-inner { gap: 5px; }
  .vsf-walk-btn { width: 34px; height: 34px; }
  .vsf-walk-btn-play { width: 40px; height: 40px; }
  .vsf-walk-distance { display: none; }
}

/* ================================================================
   VIRTUAL WALKER (Lottie on map)
   ================================================================ */
.vsf-virtual-walker-lottie {
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.2));
  z-index: 100;
}

/* ================================================================
   TIMELINE
   FIX: JS creates .vsf-timeline-point + .vsf-timeline-label + .done/.active
   ================================================================ */
#vsf-timeline {
  background: #fff;
  padding: 12px 16px;
  border-top: 1px solid var(--vsf-border);
  position: relative;
  overflow: hidden;
}

#vsf-timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--vsf-primary);
  transition: width 0.5s var(--vsf-ease);
}

#vsf-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#vsf-timeline-list::-webkit-scrollbar { display: none; }

.vsf-timeline-point {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  font-family: var(--vsf-font);
  font-size: 0.82em;
  font-weight: 600;
  color: var(--vsf-text-muted);
  background: var(--vsf-bg);
  cursor: pointer;
  transition: all 0.4s var(--vsf-ease), transform 0.4s var(--vsf-ease-spring);
  white-space: nowrap;
  border: 1px solid var(--vsf-border);
  line-height: 1.3;
  list-style: none;
  transform: scale(1);
}

.vsf-timeline-point .vsf-timeline-label {
  font-weight: 400;
}

.vsf-timeline-point:hover {
  background: var(--vsf-primary-light);
  color: var(--vsf-primary-dark);
  border-color: var(--vsf-primary-light);
}

.vsf-timeline-point.done {
  color: var(--vsf-primary);
  background: var(--vsf-primary-light);
  border-color: var(--vsf-primary-light);
  transform: scale(0.92);
  opacity: 0.75;
}

.vsf-timeline-point.done .vsf-timeline-label {
  opacity: 0.7;
}

/* Unterwegs: dezentes Pulsieren */
.vsf-timeline-point.walking {
  color: #fff;
  background: var(--vsf-primary);
  border-color: var(--vsf-primary);
  font-weight: 600;
  animation: vsf-pill-walk 2s ease-in-out infinite;
}

.vsf-timeline-point.walking .vsf-timeline-label {
  color: #fff;
}

@keyframes vsf-pill-walk {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(42, 124, 111, 0.25); opacity: 0.85; }
  50%      { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(42, 124, 111, 0); opacity: 1; }
}

/* Angekommen: voll aktiv */
.vsf-timeline-point.active {
  color: #fff;
  background: var(--vsf-primary);
  border-color: var(--vsf-primary);
  font-weight: 600;
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(42, 124, 111, 0.3);
}

.vsf-timeline-point.active .vsf-timeline-label {
  color: #fff;
  opacity: 1;
}

/* ================================================================
   LONG DISTANCE DIALOG
   ================================================================ */
.vsf-longdist {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: vsf-longdist-in 0.3s ease;
}

@keyframes vsf-longdist-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.vsf-longdist-card {
  background: var(--vsf-bg, #FAFAF7);
  border-radius: 16px;
  padding: 28px 24px 24px;
  width: 90%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: vsf-longdist-card-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes vsf-longdist-card-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.vsf-longdist-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f0ee, #d4e4e0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vsf-accent, #2a7c6f);
}

.vsf-longdist-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--vsf-text, #1a2a28);
}

.vsf-longdist-info {
  margin: 0 0 20px;
  font-size: 14px;
  color: #5a6b68;
  line-height: 1.5;
}

.vsf-longdist-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vsf-longdist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.vsf-longdist-transit {
  background: var(--vsf-accent, #2a7c6f);
  color: #fff;
}

.vsf-longdist-transit:hover {
  background: #236b60;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 124, 111, 0.3);
}

.vsf-longdist-transit svg {
  flex-shrink: 0;
}

.vsf-longdist-walk {
  background: transparent;
  color: var(--vsf-text, #1a2a28);
  border: 1.5px solid #d0d5d3;
}

.vsf-longdist-walk:hover {
  border-color: var(--vsf-accent, #2a7c6f);
  color: var(--vsf-accent, #2a7c6f);
}

.vsf-longdist-walk svg {
  flex-shrink: 0;
}

/* ===== v5.17.0: ÖPNV-Disclaimer im Long-Distance-Dialog ===== */
.vsf-longdist-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 14px 0 0;
  padding: 10px 12px;
  background: rgba(42, 124, 111, 0.06);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #5a6b68;
}
.vsf-longdist-disclaimer svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--vsf-accent, #2a7c6f);
  opacity: 0.85;
}
@media (forced-colors: active) {
  .vsf-longdist-disclaimer {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}

/* ===== v5.17.0: Wetter-Toast (GPS-Modus, Open-Meteo) ===== */
.vsf-weather-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 380px;
  padding: 12px 14px 12px 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 30, 40, 0.18), 0 1px 2px rgba(20, 30, 40, 0.06);
  font-family: inherit;
  animation: vsf-weather-toast-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vsf-weather-toast.vsf-weather-toast-leaving {
  animation: vsf-weather-toast-out 0.28s ease forwards;
}
@keyframes vsf-weather-toast-in {
  from { opacity: 0; transform: translate(-50%, -16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes vsf-weather-toast-out {
  from { opacity: 1; transform: translate(-50%, 0); }
  to   { opacity: 0; transform: translate(-50%, -16px); }
}
@media (prefers-reduced-motion: reduce) {
  .vsf-weather-toast,
  .vsf-weather-toast.vsf-weather-toast-leaving {
    animation: none;
  }
}

.vsf-weather-toast-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbe9b3 0%, #f5b942 100%);
  color: #fff;
}
.vsf-weather-toast-icon.vsf-weather-icon-cloud,
.vsf-weather-toast-icon.vsf-weather-icon-fog {
  background: linear-gradient(135deg, #cfd8dc 0%, #90a4ae 100%);
}
.vsf-weather-toast-icon.vsf-weather-icon-rain,
.vsf-weather-toast-icon.vsf-weather-icon-snow {
  background: linear-gradient(135deg, #79c2ec 0%, #2c7ed1 100%);
}
.vsf-weather-toast-icon.vsf-weather-icon-storm {
  background: linear-gradient(135deg, #6a5acd 0%, #2a2a4a 100%);
}

.vsf-weather-toast-body {
  flex: 1;
  min-width: 0;
}
.vsf-weather-toast-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.vsf-weather-toast-temp {
  font-size: 22px;
  font-weight: 700;
  color: var(--vsf-text, #1a2a28);
  line-height: 1;
}
.vsf-weather-toast-cond {
  font-size: 13px;
  font-weight: 500;
  color: #5a6b68;
}
.vsf-weather-toast-meta {
  font-size: 11px;
  color: #8a9591;
  margin-top: 2px;
}
.vsf-weather-toast-warn {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #7a4a08;
  line-height: 1.4;
}

.vsf-weather-toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #8a9591;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}
.vsf-weather-toast-close:hover,
.vsf-weather-toast-close:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  color: #1a2a28;
  outline: none;
}
.vsf-weather-toast-close:focus-visible {
  box-shadow: 0 0 0 2px var(--vsf-accent, #2a7c6f);
}

@media (forced-colors: active) {
  .vsf-weather-toast {
    border: 2px solid CanvasText;
    background: Canvas;
  }
  .vsf-weather-toast-icon { background: ButtonFace; color: ButtonText; }
  .vsf-weather-toast-warn { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
}

/* Transit route indicator on map */
.vsf-transit-badge {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--vsf-glass-dark, rgba(18, 25, 28, 0.78));
  border: 1px solid var(--vsf-glass-dark-border, rgba(255, 255, 255, 0.08));
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--vsf-shadow-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: vsf-transit-badge-in 0.4s ease;
}

@keyframes vsf-transit-badge-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.vsf-transit-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--vsf-accent, #C9A96E);
}

/* Transit vehicle (bus) on map overlay */
.vsf-transit-vehicle {
  position: absolute;
  width: 48px;
  height: 48px;
  pointer-events: none;
  transition: opacity 0.3s ease;
  will-change: transform;
}

.vsf-transit-vehicle-inner {
  width: 100%;
  height: 100%;
  /* Richtung (scaleX) per inline-style – keine CSS animation hier */
}

.vsf-transit-vehicle svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  animation: vsf-bus-wobble 0.6s ease-in-out infinite;
}

@keyframes vsf-bus-wobble {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* Transit directions panel (GPS mode + virtual info) */
.vsf-transit-directions {
  padding: 2px 0;
}

.vsf-transit-dir-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
  color: var(--vsf-accent, #C9A96E);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--vsf-border, rgba(0, 0, 0, 0.06));
}

.vsf-transit-dir-header svg {
  flex-shrink: 0;
  fill: var(--vsf-accent, #C9A96E);
}

.vsf-transit-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.85em;
  line-height: 1.4;
  color: var(--vsf-text, #2C2C2C);
}

.vsf-transit-step + .vsf-transit-step {
  border-top: 1px solid var(--vsf-border, rgba(0, 0, 0, 0.06));
}

.vsf-transit-step-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--vsf-primary-light, #E8F4F1);
  color: var(--vsf-primary, #2A7C6F);
}

.vsf-transit-line-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 3px 10px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: var(--vsf-primary-dark, #1D5D54);
}

.vsf-transit-step-info {
  flex: 1;
  min-width: 0;
}

.vsf-transit-time {
  color: var(--vsf-text-muted, #7A7A72);
  font-size: 0.9em;
}

.vsf-transit-stops {
  color: var(--vsf-text-muted, #7A7A72);
  font-size: 0.9em;
}

.vsf-transit-dir-target {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--vsf-border, rgba(0, 0, 0, 0.06));
  font-size: 0.85em;
  font-weight: 600;
  color: var(--vsf-primary, #2A7C6F);
}

/* Transit info panel (overlay on map during bus animation) */
.vsf-transit-info {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 60;
  background: var(--vsf-bg, #FAFAF7);
  border: 1px solid var(--vsf-border, rgba(0, 0, 0, 0.06));
  border-radius: var(--vsf-radius, 16px);
  padding: 14px 16px;
  box-shadow: var(--vsf-shadow-lg);
  animation: vsf-transit-info-in 0.4s var(--vsf-ease-spring);
  max-width: 420px;
  margin: 0 auto;
}

@keyframes vsf-transit-info-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vsf-transit-info .vsf-transit-dir-header {
  margin-bottom: 6px;
  padding-bottom: 5px;
}

.vsf-transit-info .vsf-transit-step {
  padding: 4px 0;
  font-size: 0.82em;
}

.vsf-transit-info .vsf-transit-dir-target {
  margin-top: 5px;
  padding-top: 5px;
}

.vsf-transit-depart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--vsf-radius-sm, 10px);
  background: linear-gradient(135deg, var(--vsf-accent, #C9A96E), #b8944f);
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: vsf-depart-pulse 2s ease-in-out infinite;
  letter-spacing: 0.3px;
}

.vsf-transit-depart-btn:hover {
  background: linear-gradient(135deg, #d4b678, var(--vsf-accent, #C9A96E));
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.35);
}

@keyframes vsf-depart-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0.3); }
  50%      { box-shadow: 0 0 0 6px rgba(201, 169, 110, 0); }
}

.vsf-transit-depart-btn svg {
  flex-shrink: 0;
}

/* Transit Info: Kollabierter Zustand (nur Header sichtbar) */
.vsf-transit-collapsed {
  padding: 10px 14px;
  animation: none;
}
.vsf-transit-collapsed .vsf-transit-step,
.vsf-transit-collapsed .vsf-transit-dir-target {
  display: none;
}
.vsf-transit-collapsed .vsf-transit-dir-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.vsf-transit-collapsed .vsf-transit-chevron svg {
  transform: rotate(-90deg);
}
.vsf-transit-chevron {
  display: inline-flex;
  margin-left: 6px;
  transition: transform 0.2s ease;
  vertical-align: middle;
  opacity: 0.5;
}
.vsf-transit-chevron svg {
  transition: transform 0.2s ease;
}

/* ================================================================
   FUN FACTS OVERLAY (waehrend langer Walk-Segmente)
   ================================================================ */
.vsf-funfact {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 55;
  max-width: 380px;
  margin: 0 auto;
  pointer-events: none;
}

.vsf-funfact-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--vsf-glass-dark, rgba(18, 25, 28, 0.85));
  border: 1px solid var(--vsf-glass-dark-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--vsf-radius-sm, 10px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--vsf-shadow);
}

.vsf-funfact-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(201, 169, 110, 0.15);
  color: var(--vsf-accent, #C9A96E);
}

.vsf-funfact-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.vsf-funfact-in {
  animation: vsf-funfact-in 0.5s var(--vsf-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.vsf-funfact-out {
  animation: vsf-funfact-out 0.4s var(--vsf-ease, ease) forwards;
}

@keyframes vsf-funfact-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes vsf-funfact-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-8px) scale(0.97); }
}

/* ================================================================
   POINT REACHED OVERLAY
   ================================================================ */
#vsf-reached-screen {
  color: #fff;
  text-align: center;
  overflow: hidden;
}

#vsf-reached-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.35);
  transform: scale(1.15);
  transition: opacity 0.6s;
  opacity: 0;
}

#vsf-reached-bg-img.has-image {
  opacity: 1;
  animation: vsf-ken-burns 12s ease-in-out infinite alternate;
}

@keyframes vsf-ken-burns {
  0%   { transform: scale(1.15) translate(0, 0); }
  100% { transform: scale(1.25) translate(-2%, -1.5%); }
}

/* Vignette + Top-Blur Overlay */
#vsf-reached-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.5) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 40%, transparent 70%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}

.vsf-reached-content {
  position: relative;
  z-index: 2;
}

/* --- Staggered Entrance Animations --- */
.vsf-reached-route {
  width: 100%;
  max-width: 300px;
  height: 200px;
  margin: 0 auto 0.5em;
  opacity: 0;
  animation: vsf-stagger-in 0.7s var(--vsf-ease-spring) 0.1s forwards;
}

.vsf-reached-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2em;
  opacity: 0;
  animation: vsf-stagger-in 0.6s var(--vsf-ease-spring) 0.9s forwards;
}

.vsf-reached-title {
  font-family: var(--vsf-font);
  font-size: 0.95em;
  font-weight: 400;
  margin: 0 0 0.15em;
  line-height: 1.3;
  opacity: 0;
  letter-spacing: 0.03em;
  animation: vsf-stagger-in 0.6s var(--vsf-ease-spring) 1.1s forwards;
}

#vsf-reached-marker-name {
  font-family: var(--vsf-font-display);
  font-size: 2.2em;
  opacity: 0;
  font-weight: 400;
  margin: 0;
  line-height: 1.1;
  animation: vsf-stagger-in 0.5s var(--vsf-ease-spring) 1.3s forwards;
}

.vsf-reached-teaser {
  font-family: var(--vsf-font);
  font-size: 0.9em;
  line-height: 1.5;
  opacity: 0;
  margin: 0.8em auto 0;
  max-width: 340px;
  text-align: center;
  animation: vsf-stagger-in 0.5s ease 1.5s forwards;
}

.vsf-reached-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 2em;
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: vsf-stagger-in 0.5s ease 1.7s forwards;
}

/* Stagger keyframe */
@keyframes vsf-stagger-in {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Override final opacity for elements that should be slightly transparent */
.vsf-reached-title { --vsf-stagger-final-opacity: 0.6; }
.vsf-reached-teaser { --vsf-stagger-final-opacity: 0.55; }

/* --- Progress Ring Badge --- */
.vsf-reached-badge-ring {
  position: relative;
  width: 56px;
  height: 56px;
}

.vsf-reached-badge-ring > svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.vsf-badge-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 3;
}

.vsf-badge-ring-fill {
  fill: none;
  stroke: var(--vsf-accent, #2a7c6f);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.vsf-badge-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--vsf-font);
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.85);
}

/* --- Pin Glow --- */
.vsf-route-pin-glow {
  animation: vsf-pin-glow 2.5s ease-in-out 1.5s infinite alternate;
}

@keyframes vsf-pin-glow {
  0%   { opacity: 0.3; }
  100% { opacity: 0.7; }
}

.vsf-route-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Geschwungene Linie zeichnet sich */
.vsf-route-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: vsf-path-draw 1.2s ease 0.4s forwards;
}

@keyframes vsf-path-draw {
  to { stroke-dashoffset: 0; }
}

/* Pin Drop-Animation */
.vsf-route-pin-drop {
  transform: scale(0);
  animation: vsf-pin-drop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards;
}

@keyframes vsf-pin-drop {
  0%   { transform: scale(0) translateY(-12px); }
  60%  { transform: scale(1.12) translateY(0); }
  100% { transform: scale(1) translateY(0); }
}

.vsf-reached-buttons .vsf-btn {
  min-width: 150px;
  width: 100%;
  font-size: 0.95em;
  padding: 0.9em 1.8em;
}

.vsf-reached-buttons .vsf-btn-secondary {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
}

.vsf-reached-buttons .vsf-btn-secondary:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

.vsf-reached-buttons .vsf-btn-ghost {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.85em;
  padding: 0.6em 1em;
  min-width: auto;
}

.vsf-reached-buttons .vsf-btn-ghost:hover {
  color: rgba(255,255,255,0.85);
}

/* ================================================================
   MARKER MODAL
   ================================================================ */
.vsf-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 14, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#vsf-marker-modal {
  align-items: flex-end;
  animation: vsfModalOverlayIn 0.3s ease both;
}

@keyframes vsfModalOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.vsf-modal-inner {
  background: var(--vsf-modal-bg);
  border-radius: var(--vsf-radius-lg) var(--vsf-radius-lg) 0 0;
  max-width: 560px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  position: relative;
  animation: vsfModalSlideUp 0.45s var(--vsf-ease-spring) both;
}

@keyframes vsfModalSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Hero Image */
.vsf-modal-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

.vsf-modal-hero.vsf-hero-empty {
  aspect-ratio: auto;
  min-height: 80px;
  background: linear-gradient(135deg, var(--vsf-primary) 0%, color-mix(in srgb, var(--vsf-primary) 60%, black) 100%);
}

.vsf-modal-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vsf-hero-empty .vsf-modal-hero-img {
  display: none;
}

.vsf-modal-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg,
    rgba(0,0,0,0.7) 0%,
    rgba(0,0,0,0.15) 40%,
    rgba(0,0,0,0.05) 70%,
    rgba(0,0,0,0.2) 100%
  );
  pointer-events: none;
}

.vsf-modal-hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.2em 1.5em;
  z-index: 2;
}

.vsf-modal-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 3px 12px;
  border-radius: 100px;
  font-family: var(--vsf-font);
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.5em;
}

.vsf-modal-hero-title {
  color: #fff;
  font-family: var(--vsf-font-display);
  font-size: 1.5em;
  font-weight: 400;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* Close Button */
.vsf-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--vsf-ease);
}

.vsf-modal-close:hover {
  background: rgba(0,0,0,0.5);
  color: #fff;
  transform: scale(1.05);
}

/* Tabs */
/* ================================================================
   MODAL: MEDIA HERO
   ================================================================ */
.vsf-modal-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.vsf-modal-media img,
.vsf-modal-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vsf-modal-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  background: #000;
}

/* Ken-Burns Slideshow im Hero */
.vsf-slide-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.vsf-slide-hero.vsf-slide-active {
  opacity: 1;
}

.vsf-slide-hero.vsf-ken-burns-a {
  animation: vsfKenBurnsA 8s ease-in-out infinite alternate;
}

.vsf-slide-hero.vsf-ken-burns-b {
  animation: vsfKenBurnsB 8s ease-in-out infinite alternate;
}

@keyframes vsfKenBurnsA {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1%, -1%); }
}

@keyframes vsfKenBurnsB {
  0%   { transform: scale(1.05) translate(1%, 0); }
  100% { transform: scale(1) translate(-1%, 1%); }
}

/* Hero Dots (Slideshow-Indikator) */
.vsf-hero-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.vsf-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: all 0.3s;
}

.vsf-hero-dot.active {
  background: white;
  transform: scale(1.3);
}

/* Mute-Button */
.vsf-modal-mute {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.vsf-modal-mute:hover {
  background: rgba(0,0,0,0.7);
}

/* Video Controls Overlay */
.vsf-video-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.vsf-video-playpause {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: all;
  transition: all 0.25s var(--vsf-ease);
  opacity: 0;
}

.vsf-video-playpause:hover {
  background: rgba(0,0,0,0.6);
  transform: scale(1.08);
}

/* Show play/pause on hero hover or when paused */
.vsf-modal-hero:hover .vsf-video-playpause,
.vsf-video-paused .vsf-video-playpause {
  opacity: 1;
}

/* Video Progress Bar */
.vsf-video-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
  z-index: 6;
  cursor: pointer;
}

.vsf-video-progress-bar {
  height: 100%;
  background: var(--vsf-primary);
  width: 0%;
  transition: width 0.3s linear;
  border-radius: 0 2px 2px 0;
}

/* Video Expanded (Fullscreen im Modal) */
.vsf-video-expanded {
  height: 92vh; /* Explizite Hoehe damit flex-grow auf Hero wirkt */
}

.vsf-video-expanded .vsf-modal-hero {
  flex: 1 1 0%;
  min-height: 0;
  aspect-ratio: unset;
  transition: flex 0.5s var(--vsf-ease);
}

.vsf-video-expanded .vsf-modal-tabs {
  max-height: 48px;
  opacity: 0.5;
  overflow: hidden;
  border-bottom: none;
  transition: max-height 0.4s var(--vsf-ease), opacity 0.3s ease;
}

.vsf-video-expanded .vsf-modal-tabs:hover {
  opacity: 1;
}

.vsf-video-expanded .vsf-modal-content,
.vsf-video-expanded .vsf-modal-footer {
  max-height: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  border: none;
  transition: max-height 0.4s var(--vsf-ease), opacity 0.3s ease, padding 0.4s var(--vsf-ease);
}

.vsf-video-expanded .vsf-modal-hero-overlay {
  background: linear-gradient(0deg,
    rgba(0,0,0,0.5) 0%,
    rgba(0,0,0,0) 25%,
    rgba(0,0,0,0) 75%,
    rgba(0,0,0,0.3) 100%
  );
}

.vsf-video-expanded .vsf-modal-hero-text {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vsf-video-expanded .vsf-modal-video {
  cursor: default;
}

/* Tab-Hint: Zeigt "mehr Infos" waehrend Video */
.vsf-video-expanded .vsf-modal-tabs::after {
  content: '';
  display: none;
}

/* Post-Video Overlay */
.vsf-post-video {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  animation: vsfFadeIn 0.4s ease;
}

@keyframes vsfFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.vsf-post-video-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 2em;
  width: 100%;
  max-width: 320px;
}

.vsf-post-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 100px;
  font-family: var(--vsf-font);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.vsf-post-btn-audio {
  background: white;
  color: var(--vsf-bg);
}

.vsf-post-btn-audio:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(255,255,255,0.3);
}

.vsf-post-btn-continue {
  background: var(--vsf-primary);
  color: white;
}

.vsf-post-btn-continue:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(42, 124, 111, 0.4);
}

.vsf-post-btn-text {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-family: var(--vsf-font);
  font-size: 0.85em;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.vsf-post-btn-text:hover {
  color: white;
}

/* Smooth transition zurueck */
.vsf-modal-hero {
  transition: flex 0.5s var(--vsf-ease);
}

.vsf-modal-tabs,
.vsf-modal-content,
.vsf-modal-footer {
  transition: max-height 0.4s var(--vsf-ease), opacity 0.3s ease 0.1s, padding 0.4s var(--vsf-ease);
}

.vsf-modal-hero-overlay,
.vsf-modal-hero-text {
  transition: opacity 0.3s ease 0.2s;
}

/* ================================================================
   MODAL: TABS + CONTENT
   ================================================================ */
.vsf-modal-tabs {
  display: flex;
  border-bottom: none;
  background: var(--vsf-bg);
  flex-shrink: 0;
  position: relative;
  padding: 0.3em 0.5em;
  gap: 2px;
}

.vsf-modal-tabs button {
  flex: 1;
  padding: 0.75em 0.5em;
  border: none;
  background: transparent;
  color: var(--vsf-text-muted);
  font-family: var(--vsf-font);
  font-weight: 500;
  font-size: 0.82em;
  cursor: pointer;
  transition: all 0.3s var(--vsf-ease);
  border-radius: var(--vsf-radius-sm);
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}

.vsf-modal-tabs button.active {
  color: var(--vsf-primary);
  background: rgba(42, 124, 111, 0.08);
}

.vsf-modal-tabs button.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 2.5px;
  background: var(--vsf-primary);
  border-radius: 2px;
}

.vsf-modal-tabs button:hover:not(.active) {
  color: var(--vsf-text);
  background: rgba(0,0,0,0.03);
}

/* Tab-Icons */
.vsf-tab-icon {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.vsf-modal-tabs button.active .vsf-tab-icon {
  opacity: 1;
}

.vsf-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5em;
  font-family: var(--vsf-font);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 124, 111, 0.25) transparent;
}

.vsf-modal-content::-webkit-scrollbar { width: 5px; }
.vsf-modal-content::-webkit-scrollbar-track { background: transparent; }
.vsf-modal-content::-webkit-scrollbar-thumb {
  background: rgba(42, 124, 111, 0.25);
  border-radius: 3px;
}
.vsf-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(42, 124, 111, 0.4);
}

.vsf-tab {
  display: none;
  animation: vsf-tab-fade-in 0.35s ease;
}
.vsf-tab.active { display: block; }

@keyframes vsf-tab-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vsf-tab p {
  line-height: 1.7;
  margin: 0;
  color: var(--vsf-text);
  font-size: 0.95em;
}

.vsf-modal-image {
  width: 100%;
  border-radius: var(--vsf-radius-sm);
  margin-bottom: 0.8rem;
}

/* Image Slider (Bilder-Tab) */
.vsf-image-slider {
  position: relative;
  border-radius: var(--vsf-radius-sm);
  overflow: hidden;
  background: var(--vsf-bg-alt);
}

.vsf-slide-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.vsf-slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.15s ease;
}

.vsf-slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.4);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s;
  z-index: 2;
}

.vsf-slide-btn:hover { background: rgba(0,0,0,0.65); }
.vsf-slide-prev { left: 8px; }
.vsf-slide-next { right: 8px; }

.vsf-slide-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.45);
  color: white;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--vsf-font);
  font-size: 0.75em;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}

.vsf-slide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px;
}

.vsf-slide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vsf-border);
  cursor: pointer;
  transition: all 0.2s;
}

.vsf-slide-dot.active {
  background: var(--vsf-primary);
  transform: scale(1.3);
}

/* Links List */
.vsf-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vsf-link-item { margin-bottom: 0.5em; }

.vsf-link-anchor {
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.85em 1em;
  background: var(--vsf-glass);
  border: 1px solid var(--vsf-glass-border);
  border-radius: var(--vsf-radius-sm);
  color: var(--vsf-text);
  text-decoration: none;
  transition: all var(--vsf-duration) var(--vsf-ease);
  font-family: var(--vsf-font);
  font-size: 0.92em;
}

.vsf-link-anchor:hover {
  background: var(--vsf-primary);
  color: white;
  border-color: var(--vsf-primary);
  transform: translateX(4px);
}

.vsf-link-label { flex: 1; font-weight: 500; }

.vsf-link-arrow {
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--vsf-duration) var(--vsf-ease);
}

.vsf-link-anchor:hover .vsf-link-arrow { opacity: 1; }

/* In der Naehe */
.vsf-nearby-list { list-style: none; padding: 0; margin: 0; }
.vsf-nearby-item { margin-bottom: 0.5em; }

.vsf-nearby-anchor {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.85em 1em;
  background: var(--vsf-glass);
  border: 1px solid var(--vsf-glass-border);
  border-radius: var(--vsf-radius-sm);
  color: var(--vsf-text);
  text-decoration: none;
  transition: all var(--vsf-duration) var(--vsf-ease);
  font-family: var(--vsf-font);
}

a.vsf-nearby-anchor:hover {
  background: var(--vsf-primary-light);
  border-color: var(--vsf-primary);
  transform: translateX(4px);
}

.vsf-nearby-icon { font-size: 1.3em; flex-shrink: 0; }

.vsf-nearby-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vsf-nearby-name { font-weight: 500; font-size: 0.92em; }

.vsf-nearby-desc {
  font-size: 0.8em;
  color: var(--vsf-text-muted);
  line-height: 1.4;
}

/* 360 Panorama */
.vsf-pano-container {
  width: 100%;
  height: 350px;
  border-radius: var(--vsf-radius-sm);
  overflow: hidden;
  background: var(--vsf-bg-alt);
}

@media (max-width: 768px) {
  .vsf-pano-container { height: 280px; }
}

@media (min-width: 769px) {
  .vsf-pano-container { height: 400px; }
}

.vsf-modal-footer {
  padding: 1em 1.5em;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--vsf-border);
  background: var(--vsf-bg);
  flex-shrink: 0;
}

#vsf-continue-button {
  background: var(--vsf-primary);
  color: white;
  padding: 0.9em 2.5em;
  border: none;
  border-radius: var(--vsf-radius-sm);
  font-family: var(--vsf-font);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--vsf-duration) var(--vsf-ease);
  letter-spacing: 0.01em;
  flex: 1;
}

#vsf-continue-button:hover {
  background: var(--vsf-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(42, 124, 111, 0.3);
}

/* ================================================================
   END SCREEN
   ================================================================ */
#vsf-end-screen { color: white; text-align: center; overflow: hidden; }

.vsf-end-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #12191c 0%, #1a2e2a 50%, #12191c 100%);
  background-size: cover;
  background-position: center;
  z-index: -1;
  transition: filter 0.6s;
}

.vsf-end-bg.has-image {
  filter: brightness(0.35);
  transform: scale(1.15);
  animation: vsf-ken-burns 12s ease-in-out infinite alternate;
}

/* Vignette */
#vsf-end-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.5) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 40%, transparent 70%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}

.vsf-end-content {
  z-index: 2;
  position: relative;
  padding: 2rem 2rem;
}

/* Stagger-Animationen fuer End Screen */
.vsf-end-route {
  width: 100%;
  max-width: 280px;
  height: 180px;
  margin: 0 auto 0.3em;
  opacity: 0;
  animation: vsf-stagger-in 0.7s var(--vsf-ease-spring) 0.1s forwards;
}

.vsf-end-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8em;
  opacity: 0;
  animation: vsf-stagger-in 0.6s var(--vsf-ease-spring) 0.8s forwards;
}

.vsf-end-ring {
  width: 62px;
  height: 62px;
}

.vsf-end-ring-text svg {
  color: var(--vsf-accent, #2a7c6f);
}

.vsf-end-title {
  font-family: var(--vsf-font-display);
  font-size: 2.2em;
  font-weight: 400;
  margin: 0 0 0.3em;
  opacity: 0;
  animation: vsf-stagger-in 0.6s var(--vsf-ease-spring) 1.0s forwards;
}

.vsf-end-subtitle {
  font-family: var(--vsf-font);
  font-size: 1em;
  margin: 0 0 1.5em;
  opacity: 0;
  animation: vsf-stagger-in 0.5s var(--vsf-ease-spring) 1.2s forwards;
}

/* Tour-Statistiken */
.vsf-end-stats {
  display: flex;
  justify-content: center;
  gap: 2.5em;
  margin-bottom: 2em;
  opacity: 0;
  animation: vsf-stagger-in 0.5s ease 1.4s forwards;
}

.vsf-end-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
}

.vsf-end-stat-value {
  font-family: var(--vsf-font-display);
  font-size: 1.6em;
  font-weight: 400;
  line-height: 1.1;
}

.vsf-end-stat-label {
  font-family: var(--vsf-font);
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
}

.vsf-end-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
  opacity: 0;
  animation: vsf-stagger-in 0.5s ease 1.6s forwards;
}

.vsf-end-buttons .vsf-btn { min-width: 240px; }

/* ================================================================
   SPEECH / AUDIO GUIDE
   ================================================================ */
.vsf-speech-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--vsf-glass-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.2s;
}

.vsf-speech-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
}

.vsf-speech-toggle.vsf-speech-active {
  background: var(--vsf-primary);
  color: white;
  box-shadow: 0 2px 12px rgba(42, 124, 111, 0.4);
}

.vsf-speech-toggle.vsf-speech-active::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--vsf-primary);
  opacity: 0.4;
  animation: vsfSpeechPulse 2s ease-in-out infinite;
}

@keyframes vsfSpeechPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50%      { transform: scale(1.15); opacity: 0; }
}

/* ================================================================
   INSIDER TIPS
   ================================================================ */
.vsf-insider-tip {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
  animation: vsfTipIn 0.4s var(--vsf-ease-spring) both;
}

@keyframes vsfTipIn {
  0%   { opacity: 0; transform: translate(-50%, -80%) scale(0.6); }
  60%  { transform: translate(-50%, -102%) scale(1.03); }
  100% { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}

.vsf-tip-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--vsf-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vsf-tip-icon:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 16px rgba(42, 124, 111, 0.6);
}

/* Expanded: Icon pulsiert, Bubble sichtbar */
.vsf-tip-expanded .vsf-tip-icon {
  animation: vsfTipPulse 2s ease-in-out infinite;
}

/* Collapsed: kein Puls, leichter Ring-Hinweis */
.vsf-tip-collapsed .vsf-tip-icon {
  animation: none;
  box-shadow: 0 0 0 3px rgba(42, 124, 111, 0.3), 0 2px 8px rgba(0,0,0,0.25);
}

@keyframes vsfTipPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
  50%      { box-shadow: 0 2px 16px rgba(42, 124, 111, 0.5); }
}

.vsf-tip-bubble {
  background: var(--vsf-glass-dark);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 8px 14px;
  max-width: 220px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform-origin: bottom left;
}

/* Expanded: Bubble sichtbar */
.vsf-tip-expanded .vsf-tip-bubble {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Collapsed: Bubble versteckt */
.vsf-tip-collapsed .vsf-tip-bubble {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.vsf-tip-text {
  color: white;
  font-family: var(--vsf-font);
  font-size: 0.82em;
  line-height: 1.45;
  font-weight: 400;
}

/* ================================================================
   COUNTDOWN OVERLAY
   ================================================================ */

/* ================================================================
   COUNTDOWN
   ================================================================ */
#vsf-countdown-screen {
  z-index: 10003;
  background: rgba(8, 12, 14, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-direction: column;
}

.vsf-countdown-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

/* Dezenter Kreis-Puls hinter den Zahlen */
.vsf-countdown-content::before {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: vsf-cd-ring 1s ease-out infinite;
  pointer-events: none;
}

@keyframes vsf-cd-ring {
  0%   { transform: scale(0.6); opacity: 0.5; border-color: rgba(255,255,255,0.15); }
  100% { transform: scale(1.8); opacity: 0; border-color: rgba(255,255,255,0); }
}

.vsf-countdown-label {
  font-family: var(--vsf-font);
  font-size: 1.1em;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 0.6em;
  opacity: 0;
  animation: vsf-countdown-label-in 0.5s ease 0.2s forwards;
}

@keyframes vsf-countdown-label-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vsf-countdown-number {
  font-family: var(--vsf-font-display);
  font-size: 8em;
  font-weight: 200;
  line-height: 1;
  color: white;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0);
}

.vsf-countdown-number.vsf-cd-pop {
  animation: vsf-cd-pop 0.85s var(--vsf-ease-spring) both;
}

.vsf-countdown-number.vsf-cd-go {
  font-size: 3.8em;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vsf-accent, #2a7c6f);
  text-shadow: 0 0 30px rgba(42, 124, 111, 0.4);
  animation: vsf-cd-go-in 0.7s var(--vsf-ease-spring) both;
}

@keyframes vsf-cd-pop {
  0%   { opacity: 0; transform: scale(0.3); text-shadow: 0 0 60px rgba(255,255,255,0); }
  40%  { opacity: 1; transform: scale(1.12); text-shadow: 0 0 50px rgba(255,255,255,0.25); }
  60%  { transform: scale(0.95); }
  75%  { transform: scale(1.02); text-shadow: 0 0 30px rgba(255,255,255,0.12); }
  100% { opacity: 0.85; transform: scale(0.92); text-shadow: 0 0 20px rgba(255,255,255,0.06); }
}

@keyframes vsf-cd-go-in {
  0%   { opacity: 0; transform: scale(0.5); text-shadow: 0 0 60px rgba(42,124,111,0); }
  50%  { opacity: 1; transform: scale(1.15); text-shadow: 0 0 40px rgba(42,124,111,0.5); }
  70%  { transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); text-shadow: 0 0 30px rgba(42,124,111,0.3); }
}

#vsf-countdown-screen.vsf-cd-fade-out {
  animation: vsf-cd-screen-out 0.5s ease forwards;
}

@keyframes vsf-cd-screen-out {
  from { opacity: 1; backdrop-filter: blur(16px); }
  to   { opacity: 0; backdrop-filter: blur(0px); }
}

/* ================================================================
   LOTTIE TRANSITION
   ================================================================ */
#vsf-lottie-transition {
  position: fixed;
  inset: 0;
  background: rgba(18, 25, 28, 0.85);
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================================================
   DIRECTIONS (GPS Mode)
   ================================================================ */
#vsf-directions {
  padding: 0.8em 1.2em;
  background: #fff;
  border-bottom: 1px solid var(--vsf-border);
  min-height: 50px;
  font-family: var(--vsf-font);
}

.vsf-dir-instruction { font-size: 0.95em; line-height: 1.5; color: var(--vsf-text); }
.vsf-dir-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 0.82em; color: var(--vsf-text-muted); }
.vsf-dir-distance { font-weight: 600; color: var(--vsf-primary); }
.vsf-dir-target { color: var(--vsf-text-muted); }
.vsf-dir-message { padding: 0.3em 0; font-size: 0.95em; line-height: 1.5; }
.vsf-dir-error { color: #c0392b; }
.vsf-dir-info { color: var(--vsf-text); }

/* ================================================================
   GPS USER MARKER
   ================================================================ */
.vsf-user-marker {
  width: 18px;
  height: 18px;
  background: var(--vsf-primary);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(42, 124, 111, 0.4);
}

.vsf-accuracy-circle {
  background: rgba(42, 124, 111, 0.1);
  border: 1px solid rgba(42, 124, 111, 0.15);
  border-radius: 50%;
}

/* ================================================================
   ADMIN STYLES
   ================================================================ */
.vsf-marker-item {
  border: 1px solid var(--vsf-border);
  border-radius: var(--vsf-radius-sm);
  margin-bottom: 8px;
  background: #fff;
  transition: box-shadow 0.25s var(--vsf-ease);
}

.vsf-marker-item:hover { box-shadow: var(--vsf-shadow-sm); }
.vsf-marker-item.ui-sortable-helper { box-shadow: var(--vsf-shadow); }

.vsf-marker-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.vsf-drag-handle { cursor: grab; color: var(--vsf-text-light); }
.vsf-drag-handle:active { cursor: grabbing; }

.vsf-marker-number {
  background: var(--vsf-primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85em;
  flex-shrink: 0;
}

.vsf-marker-title { flex: 1; font-weight: 500; color: var(--vsf-text); }
.vsf-marker-fields th { width: 120px; font-weight: 500; }

.vsf-marker-placeholder {
  border: 2px dashed var(--vsf-border);
  border-radius: var(--vsf-radius-sm);
  margin-bottom: 8px;
  height: 50px;
  background: var(--vsf-bg);
}

/* ================================================================
   EXPLORE MODE – Frei Erkunden Sidebar
   ================================================================ */

/* Layout: Sidebar + Karte nebeneinander (Desktop) */
#vsf-tour-container.vsf-explore-active {
  display: flex !important;
  flex-direction: row;
  /* Breakout aus Content-Container */
  position: fixed !important;
  inset: 0;
  z-index: 9999;
  height: 100vh;
  height: 100dvh;
}

#vsf-tour-container.vsf-explore-active #vsf-map-wrapper {
  flex: 1;
  min-width: 0;
  height: 100% !important;
}

/* Sidebar */
.vsf-explore-sidebar {
  width: 380px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--vsf-bg, #FAFAF7);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 5;
}

.vsf-explore-header {
  padding: 16px 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.vsf-explore-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.vsf-explore-title {
  margin: 0;
  font-family: var(--vsf-font-display);
  font-size: 1em;
  font-weight: 600;
  color: var(--vsf-text);
  line-height: 1.3;
}

.vsf-explore-count {
  display: block;
  margin-top: 2px;
  font-size: 0.72em;
  color: #8a9a98;
  letter-spacing: 0.02em;
}

/* Filterleiste */
.vsf-explore-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 12px;
}

/* v5.18.0: Tour-Filter (nur bei Übersicht-Touren) */
.vsf-explore-tour-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  margin-bottom: 4px;
}

.vsf-explore-filter-label {
  font-family: var(--vsf-font);
  font-size: 0.68em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vsf-text-muted, #7a8a88);
}

.vsf-explore-tour-filter-row,
.vsf-explore-cat-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vsf-explore-tour-badge {
  display: inline-block;
  margin-top: 4px;
  margin-right: 6px;
  padding: 2px 8px;
  background: rgba(184, 149, 106, 0.12);
  color: var(--vsf-gold, #b8956a);
  border-radius: 10px;
  font-size: 0.7em;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.vsf-explore-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  background: transparent;
  color: var(--vsf-text-muted, #7a8a88);
  font-family: var(--vsf-font);
  font-size: 0.72em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.vsf-explore-filter:hover {
  border-color: rgba(42, 124, 111, 0.3);
  color: var(--vsf-primary);
  background: rgba(42, 124, 111, 0.04);
}

.vsf-explore-filter.active {
  border-color: var(--vsf-primary);
  background: rgba(42, 124, 111, 0.1);
  color: var(--vsf-primary);
  font-weight: 600;
}

.vsf-explore-filter svg {
  width: 13px;
  height: 13px;
  opacity: 0.6;
}

.vsf-explore-filter.active svg {
  opacity: 1;
}

/* Sidebar Footer mit Rundgang-Button */
.vsf-explore-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

/* Rundgang-Button */
.vsf-mode-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid var(--vsf-primary, #2a7c6f);
  border-radius: 10px;
  background: transparent;
  color: var(--vsf-primary, #2a7c6f);
  font-family: inherit;
  font-size: 0.82em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.vsf-mode-switch:hover {
  background: var(--vsf-primary, #2a7c6f);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(42, 124, 111, 0.25);
}

.vsf-mode-switch:active {
  transform: scale(0.97);
}

/* Übersicht-Button auf der Karte (zurueck zu Explore) */
.vsf-map-ui-btn-wide {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 6px 12px !important;
  width: auto !important;
  height: auto !important;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--vsf-font);
  top: auto !important;
  bottom: 16px;
  left: 12px;
  right: auto !important;
}

.vsf-explore-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(42, 124, 111, 0.2) transparent;
}

.vsf-explore-list::-webkit-scrollbar { width: 5px; }
.vsf-explore-list::-webkit-scrollbar-track { background: transparent; }
.vsf-explore-list::-webkit-scrollbar-thumb { background: rgba(42, 124, 111, 0.2); border-radius: 3px; }
.vsf-explore-list::-webkit-scrollbar-thumb:hover { background: rgba(42, 124, 111, 0.35); }

/* Einzelner Punkt */
.vsf-explore-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  border: 1px solid transparent;
}

.vsf-explore-item:hover {
  background: rgba(42, 124, 111, 0.04);
  border-color: rgba(42, 124, 111, 0.1);
}

.vsf-explore-item.vsf-explore-selected {
  background: rgba(42, 124, 111, 0.08);
  border-color: rgba(42, 124, 111, 0.2);
}

.vsf-explore-item:active {
  transform: scale(0.98);
}

/* Thumbnail */
.vsf-explore-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  background-color: #e8e5e0;
}

.vsf-explore-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  font-weight: 600;
  color: #8a9a98;
}

/* Info */
.vsf-explore-info {
  flex: 1;
  min-width: 0;
}

.vsf-explore-num {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--vsf-primary);
  margin-right: 3px;
}

.vsf-explore-name {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--vsf-text);
}

.vsf-explore-teaser {
  margin: 3px 0 0;
  font-size: 0.73em;
  color: #7a8a88;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vsf-explore-tags {
  display: flex;
  gap: 3px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.vsf-explore-tag {
  font-size: 0.6em;
  font-weight: 600;
  padding: 0px 5px;
  border-radius: 3px;
  background: rgba(42, 124, 111, 0.08);
  color: var(--vsf-primary);
  letter-spacing: 0.02em;
}

.vsf-explore-arrow {
  flex-shrink: 0;
  color: #c0cac8;
  transition: color 0.2s ease, transform 0.2s ease;
}

.vsf-explore-item:hover .vsf-explore-arrow {
  color: var(--vsf-primary);
  transform: translateX(2px);
}

/* Mobile: Sidebar wird Bottom-Sheet */
@media (max-width: 768px) {
  #vsf-tour-container.vsf-explore-active {
    flex-direction: column !important;
  }

  .vsf-explore-sidebar {
    width: 100% !important;
    max-height: 45vh;
    border-right: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    order: 2;
  }

  #vsf-tour-container.vsf-explore-active #vsf-map-wrapper {
    order: 1;
    flex: 1 !important;
  }

  .vsf-explore-thumb {
    width: 40px;
    height: 40px;
  }

  .vsf-explore-filters {
    padding-bottom: 8px;
  }
  /* v5.18.0: Innere Filter-Reihen scrollen waagerecht auf Mobile */
  .vsf-explore-tour-filter-row,
  .vsf-explore-cat-filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .vsf-explore-tour-filter-row::-webkit-scrollbar,
  .vsf-explore-cat-filter-row::-webkit-scrollbar { display: none; }

  .vsf-explore-footer {
    padding: 10px 12px;
  }
}

/* Mobile App-Modus + Explore: Sidebar unten mit Safe Area */
body.vsf-app-mobile .vsf-explore-sidebar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ================================================================
   APP MODE – Immersive Tour
   ================================================================ */

/* Mobile App-Modus: Scroll verhindern */
body.vsf-app-mobile {
  overflow: hidden !important;
}

/* Tour-Container im Mobile-App-Modus: Vollbild-Overlay über alles */
body.vsf-app-mobile #vsf-tour-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--vsf-bg) !important;
  height: 100dvh !important;
  height: 100vh !important; /* Fallback */
}

@supports (height: 100dvh) {
  body.vsf-app-mobile #vsf-tour-container {
    height: 100dvh !important;
  }
}

/* Karte füllt den verfügbaren Platz */
body.vsf-app-mobile #vsf-map-wrapper {
  flex: 1 !important;
  height: auto !important;
  min-height: 0 !important;
}

/* iOS Safe Area: Padding unten für Home-Indicator */
body.vsf-app-mobile #vsf-timeline {
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
}

body.vsf-app-mobile #vsf-walk-controls {
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
}

body.vsf-app-mobile #vsf-directions {
  padding-bottom: calc(0.8em + env(safe-area-inset-bottom, 0px)) !important;
}

/* Safe Area oben für Notch/Dynamic Island */
@supports (padding-top: env(safe-area-inset-top, 0px)) {
  body.vsf-app-mobile #vsf-fullscreen-btn,
  body.vsf-app-mobile #vsf-exit-btn {
    top: calc(12px + env(safe-area-inset-top, 0px));
  }
}

/* ================================================================
   MAP UI BUTTONS (Fullscreen + Exit)
   ================================================================ */
.vsf-map-ui-btn {
  position: absolute;
  z-index: 300;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--vsf-radius-sm);
  background: var(--vsf-glass);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--vsf-glass-border);
  color: var(--vsf-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--vsf-shadow);
  transition: all 0.25s var(--vsf-ease);
}

.vsf-map-ui-btn:hover {
  background: rgba(255,255,255,0.9);
  box-shadow: var(--vsf-shadow-lg);
  transform: scale(1.05);
}

.vsf-map-ui-btn:active {
  transform: scale(0.95);
}

/* Fullscreen: oben rechts auf der Karte */
#vsf-fullscreen-btn {
  top: 16px;
  right: 16px;
}

/* Exit: oben links auf der Karte */
#vsf-exit-btn {
  top: 16px;
  left: 16px;
}

/* v5.23.0: Mute-Toggle direkt rechts neben Exit-Button.
   Energie-Effizienz: pause() statt mute=true => Browser stoppt Decoder. */
#vsf-mute-btn {
  top: 16px;
  left: 64px;
}

/* Mute aktiv = Audio aus -> Wayflo-Gold als Akzent */
#vsf-mute-btn.vsf-mute-active {
  background: var(--vsf-accent, #b8956a);
  color: #fff;
  border-color: transparent;
}

#vsf-mute-btn.vsf-mute-active:hover {
  background: var(--vsf-accent, #b8956a);
  filter: brightness(1.05);
}

/* Desktop Fullscreen-Modus */
#vsf-tour-container:fullscreen {
  background: var(--vsf-bg);
  display: flex;
  flex-direction: column;
}

#vsf-tour-container:fullscreen #vsf-map-wrapper {
  flex: 1;
  height: auto;
  min-height: 0;
}

/* ---- Fullscreen: Modal als Side-Panel (50/50) ---- */
#vsf-tour-container:fullscreen #vsf-marker-modal {
  align-items: stretch;
  justify-content: flex-end;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
}

#vsf-tour-container:fullscreen .vsf-modal-inner {
  max-width: 50%;
  min-width: 380px;
  width: 50%;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  animation: vsfSlideInRight 0.35s var(--vsf-ease) both;
}

#vsf-tour-container:fullscreen .vsf-modal-hero {
  aspect-ratio: 16 / 7;
}

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

#vsf-tour-container:fullscreen .vsf-modal-content {
  flex: 1;
  padding: 2em;
  overflow-y: auto;
}

#vsf-tour-container:fullscreen .vsf-modal-tabs button {
  padding: 1em 0.5em;
  font-size: 0.92em;
}

/* 360° + Video größer im Side-Panel */
#vsf-tour-container:fullscreen .vsf-pano-container {
  height: 400px;
}

#vsf-tour-container:fullscreen .vsf-modal-video {
  max-height: 50vh;
}

/* Marker-Preview im Fullscreen etwas anpassen */
#vsf-tour-container:fullscreen #vsf-marker-preview {
  right: 20px;
  top: 20px;
  bottom: auto;
  left: auto;
  max-width: 350px;
}

/* Timeline etwas mehr Platz im Fullscreen */
#vsf-tour-container:fullscreen #vsf-timeline {
  padding: 14px 20px;
}

/* Fullscreen-Button auf Mobile verstecken (nutzt App-Modus stattdessen) */
@media (max-width: 768px) {
  #vsf-fullscreen-btn {
    display: none;
  }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  #vsf-map-wrapper { height: 55vh; min-height: 280px; }
  .vsf-reached-title { font-size: 0.85em; }
  #vsf-reached-marker-name { font-size: 1.8em; }
  .vsf-end-title { font-size: 1.8em; }
  .vsf-modal-inner { max-height: 95vh; border-radius: var(--vsf-radius) var(--vsf-radius) 0 0; }
  .vsf-modal-hero { aspect-ratio: 16 / 8; }
  #vsf-next-info .vsf-next-info-inner { font-size: 0.82em; padding: 8px 14px; }
}

/* Desktop: Modal zentriert statt bottom-sheet */
@media (min-width: 769px) {
  #vsf-marker-modal {
    align-items: center;
  }
  .vsf-modal-inner {
    border-radius: var(--vsf-radius-lg);
    max-height: 88vh;
    animation-name: vsfModalScaleIn;
  }
  @keyframes vsfModalScaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }
}

@media (max-width: 400px) {
  .vsf-start-title { font-size: 1.3em; }
  .vsf-start-content { padding: 0 1.5em 2em; }
  .vsf-modal-hero-title { font-size: 1.25em; }
  .vsf-reached-title { font-size: 0.8em; }
  #vsf-reached-marker-name { font-size: 1.6em; }
}

/* ================================================================
   REDUCED MOTION (a11y v5.15.0, BFSG/WCAG 2.3.3)
   Wer prefers-reduced-motion: reduce gesetzt hat, bekommt:
   - Alle Transitions/Animationen quasi instant (0.01ms statt 0,
     damit transitionend-Events trotzdem feuern)
   - Smooth-Scroll deaktiviert
   - Ken-Burns-Bewegung still
   - Walker/Lottie wird zusaetzlich per JS pausiert
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  /* Walker/Lottie-Container: keine CSS-Bewegung mehr */
  .vsf-walker,
  .vsf-walker-anim,
  [data-lottie] {
    animation: none !important;
    transform: none !important;
  }

  /* Ken-Burns / Hero-Background-Bewegung */
  .vsf-start-media,
  .vsf-end-bg,
  .vsf-reached-bg,
  .vsf-modal-media {
    animation: none !important;
    transform: none !important;
  }

  /* Crossfades und Page-Transitions */
  .vsf-screen,
  .vsf-overlay {
    transition: opacity 0.01ms !important;
  }

  /* Countdown nicht mehr poppen */
  .vsf-countdown-number,
  .vsf-cd-pop,
  .vsf-cd-go {
    animation: none !important;
    transform: none !important;
  }
}

/* =============================================================
 * Audio-Guide-Player im Marker-Modal (v5.21.0)
 * Mini-Player zwischen Hero und Tabs. Nur sichtbar wenn der
 * Marker eine hinterlegte Audio-Datei hat.
 * ============================================================= */

.vsf-audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(180deg, var(--wayflo-color-accent-soft, rgba(42, 124, 111, 0.08)) 0%, transparent 100%);
    border-bottom: 1px solid var(--wayflo-color-border, rgba(0, 0, 0, 0.08));
    font-family: var(--wayflo-font-sans, 'Outfit', sans-serif);
    color: var(--wayflo-color-text, #1a1e23);
}

.vsf-audio-player.vsf-hidden {
    display: none;
}

.vsf-audio-playpause {
    flex: 0 0 auto;
    /* v5.27.0: 44px = WCAG 2.5.5 Touch-Target-Empfehlung, gilt jetzt auch auf Mobile */
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--wayflo-color-accent, #2a7c6f);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, transform 0.12s ease;
    box-shadow: 0 2px 6px rgba(42, 124, 111, 0.25);
}

.vsf-audio-playpause:hover {
    background: var(--wayflo-color-accent-dark, #237063);
    transform: scale(1.05);
}

.vsf-audio-playpause:active {
    transform: scale(0.96);
}

.vsf-audio-playpause:focus-visible {
    outline: 2px solid var(--wayflo-color-gold, #b8956a);
    outline-offset: 2px;
}

.vsf-audio-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vsf-audio-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    /* v5.27.0: Dunkleres Teal fuer WCAG AA bei kleiner Schrift (vorher #2a7c6f ~4.7:1) */
    color: var(--wayflo-color-accent-dark, #1f5e54);
}

/*
 * Progress-Bar: visuelle Hoehe bleibt schmal, aber die Hit-Area
 * wird auf 24px vergroessert via vertikales Padding (v5.27.0).
 * Standard-Pattern: aeusseres Element ist klick-/tap-bar, inneres
 * gerendert die schmale Bar. So bleibt die Optik unauffaellig,
 * aber Touch + Maus treffen zuverlaessig.
 */
.vsf-audio-progress {
    position: relative;
    width: 100%;
    /* Hit-Area: 24px hoch (Inhalt 6px + 9px Padding oben/unten = 24px gesamt) */
    height: 6px;
    padding: 9px 0;
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    /* Hintergrund auf Pseudo-Element, damit das Padding kein "dickerer Strich" wird */
}

.vsf-audio-progress::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
    pointer-events: none;
}

.vsf-audio-progress:focus-visible {
    outline: 2px solid var(--wayflo-color-gold, #b8956a);
    outline-offset: 4px;
    border-radius: 4px;
}

.vsf-audio-progress-bar {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    width: 0%;
    background: linear-gradient(90deg, var(--wayflo-color-accent, #2a7c6f) 0%, var(--wayflo-color-gold, #b8956a) 100%);
    border-radius: 3px;
    transition: width 0.1s linear;
    pointer-events: none;
}

.vsf-audio-time {
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    /* v5.27.0: Dunkleres Grau fuer WCAG AA bei 12px (vorher #6b7079 ~4.6:1) */
    color: var(--wayflo-color-text-muted-dark, #4d5158);
    min-width: 64px;
    text-align: right;
}

@media (max-width: 480px) {
    .vsf-audio-player {
        padding: 8px 12px;
        gap: 10px;
    }
    /* v5.27.0: Mobile NICHT mehr verkleinern — 44px bleibt fuer Touch-Target */
    .vsf-audio-time {
        font-size: 11px;
        min-width: 56px;
    }
    .vsf-audio-label {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vsf-audio-playpause,
    .vsf-audio-progress-bar {
        transition: none;
    }
}

/* =============================================================
 * Start-Screen Audio-Guide-Toggle (v5.22.0)
 * iOS-Switch-Style. Sitzt zwischen Tour-Meta und Mode-Buttons.
 * ============================================================= */

.vsf-start-audio-toggle {
  display: flex;
  justify-content: center;
  margin: 0 0 14px;
  animation: vsfFadeUp 0.6s 0.4s both;
}

.vsf-start-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-width: 240px;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.vsf-start-audio-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.vsf-start-audio-btn:active {
  transform: scale(0.98);
}

.vsf-start-audio-btn:focus-visible {
  outline: 2px solid var(--vsf-accent, #b8956a);
  outline-offset: 3px;
}

.vsf-start-audio-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.vsf-start-audio-on .vsf-start-audio-icon {
  background: var(--vsf-primary, #2a7c6f);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(42, 124, 111, 0.18);
}

.vsf-start-audio-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  text-align: left;
  line-height: 1.2;
}

.vsf-start-audio-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.vsf-start-audio-state {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.7;
  letter-spacing: 0.04em;
}

.vsf-start-audio-on .vsf-start-audio-state {
  color: var(--vsf-primary-light, #e8f4f1);
  opacity: 1;
}

/* iOS-Switch-Style Toggle */
.vsf-start-audio-switch {
  flex: 0 0 auto;
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  transition: background-color 0.22s ease;
}

.vsf-start-audio-on .vsf-start-audio-switch {
  background: var(--vsf-primary, #2a7c6f);
}

.vsf-start-audio-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: left 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.vsf-start-audio-on .vsf-start-audio-knob {
  left: 18px;
}

@media (max-width: 380px) {
  .vsf-start-audio-btn {
    min-width: 0;
    width: 100%;
    padding: 9px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vsf-start-audio-toggle { animation: none; }
  .vsf-start-audio-knob,
  .vsf-start-audio-switch,
  .vsf-start-audio-icon,
  .vsf-start-audio-btn { transition: none; }
}

/* =============================================================
 * Tour-Verlassen-Dialog (v5.23.0)
 * Custom Modal mit zwei Optionen: "Zurueck zum Start" / "Tour beenden".
 * Ersetzt den nativen confirm()-Dialog.
 * ============================================================= */

.vsf-leave-dialog {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 18, 21, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.vsf-leave-dialog.vsf-leave-dialog-open {
  opacity: 1;
}

.vsf-leave-dialog-leaving {
  opacity: 0;
}

.vsf-leave-dialog-card {
  background: #fff;
  border-radius: var(--vsf-radius, 16px);
  padding: 28px 24px 20px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  font-family: var(--wayflo-font-sans, 'Outfit', sans-serif);
  text-align: center;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.vsf-leave-dialog-open .vsf-leave-dialog-card {
  transform: scale(1) translateY(0);
}

.vsf-leave-dialog-title {
  font-family: var(--wayflo-font-serif, 'Instrument Serif', serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--vsf-text, #1a1e23);
  margin: 0 0 8px;
}

.vsf-leave-dialog-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--vsf-text-muted, #6b7079);
  margin: 0 0 20px;
}

.vsf-leave-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vsf-leave-dialog-actions .vsf-btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.vsf-leave-dialog-actions .vsf-btn:active {
  transform: scale(0.98);
}

.vsf-leave-dialog-actions .vsf-btn-primary {
  background: var(--vsf-primary, #2a7c6f);
  color: #fff;
}
.vsf-leave-dialog-actions .vsf-btn-primary:hover {
  background: var(--vsf-primary-dark, #237063);
}

.vsf-leave-dialog-actions .vsf-btn-secondary {
  background: var(--vsf-accent, #b8956a);
  color: #fff;
}
.vsf-leave-dialog-actions .vsf-btn-secondary:hover {
  filter: brightness(1.06);
}

.vsf-leave-dialog-actions .vsf-btn-ghost,
.vsf-leave-dialog-actions .vsf-leave-cancel {
  background: transparent;
  color: var(--vsf-text-muted, #6b7079);
  margin-top: 4px;
}
.vsf-leave-dialog-actions .vsf-btn-ghost:hover,
.vsf-leave-dialog-actions .vsf-leave-cancel:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--vsf-text, #1a1e23);
}

.vsf-leave-dialog-actions .vsf-btn:focus-visible {
  outline: 2px solid var(--vsf-accent, #b8956a);
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .vsf-leave-dialog-card {
    padding: 22px 18px 16px;
  }
  .vsf-leave-dialog-title { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .vsf-leave-dialog,
  .vsf-leave-dialog-card,
  .vsf-leave-dialog-actions .vsf-btn {
    transition: none;
  }
}

/* ================================================================
   v5.41.3 FIX – Explore-/Uebersichts-Modus: Layout & Active-State
   ----------------------------------------------------------------
   Problem: tour-fullscreen.css erzwingt auf
   "body.vsf-app-mode #vsf-tour-container" ein
   "flex-direction: column !important" (korrekt fuer Walk/Virtual).
   Der Explore-Modus braucht jedoch ROW (Sidebar | Karte); seine
   Regel hatte kein !important und verlor. Folge: Sidebar oben,
   Karte unsichtbar darunter, Liste nicht scrollbar.
   Loesung: hoehere Spezifitaet (.vsf-explore-active) + !important,
   nur Desktop. Mobile-Bottom-Sheet (<=768px) bleibt unveraendert.
   ================================================================ */

@media (min-width: 769px) {
  body.vsf-app-mode #vsf-tour-container.vsf-explore-active {
    flex-direction: row !important;
  }
  body.vsf-app-mode #vsf-tour-container.vsf-explore-active .vsf-explore-sidebar {
    width: 380px !important;
    flex: 0 0 380px !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  body.vsf-app-mode #vsf-tour-container.vsf-explore-active #vsf-map-wrapper {
    flex: 1 1 auto !important;
    width: auto !important;
    height: 100% !important;
    min-width: 0 !important;
  }
  body.vsf-app-mode #vsf-tour-container.vsf-explore-active .vsf-explore-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

/* Ausgewaehlter Eintrag: nur Akzentbalken (kein Layout-Shift).
   Hintergrund/Border + Badge-Farbe liefert der Branding-Renderer
   (v5.41.4) – dort zentral, damit die Markenfarbe greift. */
.vsf-explore-item.vsf-explore-selected {
  box-shadow: inset 3px 0 0 var(--wayflo-accent, var(--vsf-primary, #2a7c6f));
}
