/* Website-Funktionen aller Varianten: Theme-Schalter, Nach-oben-Button */
.ifs-theme {
  appearance: none; border: 0; cursor: pointer; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: inherit;
}
.ifs-theme:hover { background: rgba(127, 140, 160, 0.16); }
.ifs-theme:focus-visible, .ifs-totop:focus-visible { outline: 2px solid #4C9BFF; outline-offset: 2px; }
.ifs-theme-float { position: fixed; top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); z-index: 2147482000; background: #fff; color: #14202B; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }

.ifs-totop {
  position: fixed; z-index: 2147482500;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ifs-accent, #00549F); color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
html[data-variant="d"] .ifs-totop { color: #05080F; }
html.ifs-alt-theme[data-variant="d"] .ifs-totop { background: #00549F; color: #fff; }
html.ifs-alt-theme:not([data-variant="d"]) .ifs-totop { background: #4C9BFF; color: #05080F; }
.ifs-totop.ifs-show { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .ifs-totop { transition: none; } }

/* Logo bleibt im Dunkelmodus lesbar */
html[data-site-theme="dark"]:not([data-variant="d"]) header img[src*="logo"] { background: #fff; padding: 4px 8px; border-radius: 6px; box-sizing: content-box; }

/* Steuerleiste des Dummys liegt mittig unten; Buttons der Website rücken bei schmalen Fenstern darüber */
@media (max-width: 900px) { html:not([data-page="mobil-app"]) .ifs-totop { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }

/* Variante D: Header ist eine helle Pille auf dunklem Grund – Schalter dort dunkel zeichnen */
html[data-variant="d"] header .ifs-theme { color: #2A3446; background: #EEF2F7; }
html[data-variant="d"] header .ifs-theme:hover { background: #DDE4EE; }
