.lf-popup-corner {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 99999;
  /* gutes Verhaeltnis zur Displaygroesse: nie breiter als der Viewport,
     auf grossen Screens gedeckelt, Hoehe durch das quadratische Bild bestimmt */
  width: min(340px, calc(100vw - 2rem), 42vh);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.3);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.3s ease-out, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lf-popup-corner.lf-popup-visible {
  opacity: 1;
  transform: none;
}
@media (min-width: 1600px) {
  .lf-popup-corner { width: min(400px, 42vh); }
}

.lf-popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lf-popup-close:hover,
.lf-popup-close:focus-visible { background: rgba(15, 23, 42, 0.85); }

.lf-popup-media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.lf-popup-visual {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
a.lf-popup-media:hover .lf-popup-visual,
a.lf-popup-media:focus-visible .lf-popup-visual { transform: scale(1.04); }

.lf-popup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: #0f172a;
  color: #fff;
}
.lf-popup-bar-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lf-popup-cta {
  flex-shrink: 0;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.lf-popup-cta:hover,
.lf-popup-cta:focus-visible { transform: translateY(-1px); }

.lf-popup-body { padding: 1.25rem; }
.lf-popup-body .lf-popup-bar-title {
  color: #0f172a;
  font-size: 1.05rem;
  white-space: normal;
  margin-bottom: 0.5rem;
  display: block;
}
.lf-popup-text {
  color: #334155;
  font-size: 0.9rem;
  max-height: 9em;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.lf-popup-body .lf-popup-cta {
  display: inline-block;
  background: #0f172a;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .lf-popup-corner, .lf-popup-visual, .lf-popup-cta { transition: none; }
}
