html.lsg-app-pull-refresh,
html.lsg-app-pull-refresh body {
  overscroll-behavior-y: contain;
}
/* Graues Speichenrad im iOS-Stil, ohne Textblase oder Vereinsfarbe. */
.lsg-pull-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #777;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -15px);
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease;
}
.lsg-pull-indicator.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, var(--lsg-pull-y, 0px));
}
.lsg-pull-icon {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.lsg-pull-icon > span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  opacity: calc(.15 + var(--lsg-spoke) * .065);
  transform: translate(-50%, -50%) rotate(calc(var(--lsg-spoke) * 30deg)) translateY(-8px);
}
.lsg-pull-indicator.is-refreshing .lsg-pull-icon > span {
  animation: lsg-pull-spoke 1s linear infinite;
  animation-delay: calc(var(--lsg-spoke) * 1s / 12 - 1s);
}
@keyframes lsg-pull-spoke {
  0% { opacity: 1; }
  100% { opacity: .15; }
}
.lsg-pull-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Offlinefehler bleibt sichtbar lesbar. */
.lsg-pull-indicator.has-message {
  width: auto;
  max-width: calc(100vw - 24px);
  height: auto;
  padding: 10px 14px;
  border-radius: 20px;
  background: #f9f9f9;
  color: #555;
  font: 14px/1.3 system-ui, -apple-system, sans-serif;
}
.lsg-pull-indicator.has-message .lsg-pull-icon { display: none; }
.lsg-pull-indicator.has-message .lsg-pull-status {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}
/* Optionale Smartphone-Schaltfläche: 44px Touchfläche. */
button.lsg-scroll-top {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 18px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: rgba(249,249,249,.94);
  color: #555;
  box-shadow: 0 2px 10px #0000000c;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  -webkit-tap-highlight-color: transparent;
}
button.lsg-scroll-top.is-visible {
  opacity: .9;
  visibility: visible;
  pointer-events: auto;
}
button.lsg-scroll-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button.lsg-scroll-top:focus:not(:focus-visible) { outline: none; }
button.lsg-scroll-top:focus-visible {
  opacity: 1;
  outline: 2px solid #B80B5E;
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .lsg-pull-indicator, button.lsg-scroll-top { transition: none; }
  .lsg-pull-indicator.is-refreshing .lsg-pull-icon > span { animation: none; }
}

/* A clearly visible control, below dialogs but above the mobile header. */
html.lsg-app-scroll-device button.lsg-scroll-top{z-index:10010;background:rgba(249,249,249,.96);color:#b80b5e;border-color:rgba(184,11,94,.25);box-shadow:0 3px 16px #0002}
html.lsg-app-scroll-device button.lsg-scroll-top.is-visible{opacity:1}
