:root {
  --safe-bg: #f8f3ea;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--safe-bg); }
body { overflow-x: hidden; }
.safe-page { width: 100%; margin: 0; padding: 0; }
.safe-section { display: block; width: 100%; height: auto; margin: 0; padding: 0; border: 0; }
.safe-gallery { position: relative; margin: 0; padding: 0; line-height: 0; }
.share-layer { position: absolute; inset: 0; pointer-events: none; }
.safe-share {
  position: absolute;
  z-index: 10;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
.safe-share:focus-visible {
  outline: 3px solid #b77700;
  outline-offset: 2px;
  border-radius: 4px;
}
#safe-toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(17, 39, 71, .94);
  color: white;
  font: 15px/1.35 system-ui, -apple-system, sans-serif;
  padding: 10px 14px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  max-width: min(90vw, 520px);
  text-align: center;
}
#safe-toast.show { opacity: 1; }


/* Rubriktitel-Link: kompakt, ohne zusätzliche Erklärzeile.
   Der Titel steht bereits im JPEG; diese Ebene macht ihn klickbar und ergänzt Lupe + ↗. */
.safe-topic-link {
  position: absolute;
  z-index: 12;
  display: block;
  pointer-events: auto;
  cursor: pointer;
  border-bottom: 1px solid rgba(29, 53, 87, .85);
  text-decoration: none;
}
.safe-topic-icons {
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-52%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #1d3557;
  line-height: 1;
  white-space: nowrap;
}
.safe-magnifier {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.safe-magnifier::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1.5px;
  background: currentColor;
  right: -4px;
  bottom: -2px;
  transform: rotate(45deg);
  transform-origin: left center;
}
.safe-external-arrow {
  font: 600 14px/1 system-ui, -apple-system, sans-serif;
}
.safe-topic-link:hover {
  border-bottom-width: 2px;
}
.safe-topic-link:focus-visible {
  outline: 3px solid #b77700;
  outline-offset: 2px;
  border-radius: 3px;
}
@media (max-width: 700px) {
  .safe-topic-icons { left: calc(100% + 2px); gap: 1px; }
  .safe-magnifier { width: 7px; height: 7px; border-width: 1px; }
  .safe-magnifier::after { width: 4px; height: 1px; right: -3px; bottom: -2px; }
  .safe-external-arrow { font-size: 10px; }
}
