:root {
  --bg: #ecebe6;
  --ink: #111;
  --muted: #6b6a66;
  --accent: #111;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
}

.top h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Sprach-Toggle */
.lang-toggle {
  display: inline-flex;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.lang-toggle button {
  font: inherit;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 6px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.lang-toggle button:focus-visible,
.nav:focus-visible,
.dots button:focus-visible {
  outline: 3px solid #2a7fff;
  outline-offset: 2px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(8px, 3vw, 32px) 24px;
}

/* Slider */
.slider {
  position: relative;
  width: min(100%, 980px);
}

.track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: 3px solid #2a7fff; outline-offset: 4px; }

.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  position: relative;
  aspect-ratio: 1080 / 700;
  background: #fff;
}
.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* Platzhalter, falls ein Bild noch fehlt */
.slide .placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: 24px;
  border: 2px dashed #b9b7b0;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f7f6f2;
}
.slide.missing img { visibility: hidden; }
.slide.missing .placeholder { display: flex; }
.placeholder strong { color: var(--ink); }
.placeholder code { font-size: .9em; background: #e7e5de; padding: 2px 6px; border-radius: 6px; }

/* Pfeile */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  padding: 0 0 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: transform .15s, opacity .15s;
}
.nav:hover { transform: translateY(-50%) scale(1.08); }
.nav:disabled { opacity: .3; cursor: default; transform: translateY(-50%); }
.prev { left: -22px; }
.next { right: -22px; }

.counter {
  margin: 16px 0 8px;
  font-size: .9rem;
  color: var(--muted);
  min-height: 1.2em;
}

/* Punkte */
.dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 90vw;
}
.dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
}
.dots button[aria-current="true"] { background: var(--ink); }

@media (max-width: 1060px) {
  .prev { left: 6px; }
  .next { right: 6px; }
  .nav { width: 38px; height: 38px; font-size: 24px; opacity: .92; }
    
    /* Maximale Kartenhöhe: 85 % der sichtbaren Bildschirmhöhe */
    .slide {
      height: 80vh !important;
      height: 80dvh !important;
    }
    .slide img {
      max-height: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
  .track { scroll-behavior: auto; }
}


