/* ------------------------------------------------------------ Fotos vergrößern (bildGross() und src/gross.js) */
.gross-link { position: relative; display: block; color: inherit; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.gross-link:focus-visible { outline: 3px solid var(--gold-text); outline-offset: 4px; }
.gross-lupe {
  position: absolute; right: .85rem; bottom: .85rem; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  color: var(--gold-hell); background: rgba(11, 18, 48, .55); border: 1px solid rgba(236, 210, 142, .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
  transition: transform .25s ease, background-color .25s ease;
}
.gross-lupe svg, .gross-knopf svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.gross-link:hover .gross-lupe, .gross-link:focus-visible .gross-lupe { transform: scale(1.08); background: rgba(11, 18, 48, .75); }

/* Der Dialog: dunkle Fläche über der ganzen Seite, oben die Knöpfe, unten die Bildunterschrift */
html:has(.gross[open]) { overflow: hidden; }
.gross {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  color: var(--auf-nacht); background: rgba(6, 10, 28, .97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.gross::backdrop { background: transparent; }
.gross[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: gross-auf .28s ease both; }
.gross.schliesst { animation: gross-zu .18s ease both; }
@keyframes gross-auf { from { opacity: 0; } }
@keyframes gross-zu { to { opacity: 0; } }

.gross-leiste {
  display: flex; align-items: center; gap: .6rem;
  padding: max(.75rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) .75rem max(1rem, env(safe-area-inset-left, 0px));
}
.gross-hinweis { margin: 0 auto 0 0; font-family: var(--font-ui); font-size: .8rem; color: var(--auf-nacht-3); }
.gross-hinweis-klicken { display: none; }
@media (hover: hover) and (pointer: fine) {
  .gross-hinweis-tippen { display: none; }
  .gross-hinweis-klicken { display: inline; }
}
.gross-knopf {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; min-width: 2.75rem; justify-content: center; padding: 0 1rem;
  font: 600 .9rem/1 var(--font-ui); color: var(--gold-hell); background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(236, 210, 142, .28); border-radius: 999px; cursor: pointer; transition: background-color .2s ease;
}
.gross-knopf:hover { background: rgba(236, 210, 142, .14); }
.gross-knopf:focus-visible { outline: 3px solid var(--gold-hell); outline-offset: 2px; }
.gross-zoom { padding: 0; }
.gross-zoom-an { display: contents; }
.gross-zoom-aus, .ist-gezoomt .gross-zoom-an { display: none; }
.ist-gezoomt .gross-zoom-aus { display: contents; }

/* Die Fläche: Das Foto passt zuerst ganz hinein; gezoomt wird es breiter als die Fläche und lässt sich verschieben.
   margin: auto zentriert es, ohne dass beim Zoomen links oder oben etwas unerreichbar wird. */
.gross-flaeche {
  display: flex; overflow: auto; overscroll-behavior: contain; padding: 0 max(1rem, env(safe-area-inset-right, 0px)) 0 max(1rem, env(safe-area-inset-left, 0px));
  scrollbar-width: thin; scrollbar-color: rgba(236, 210, 142, .35) transparent;
}
.gross-flaeche:focus-visible { outline: 3px solid var(--gold-hell); outline-offset: -4px; }
.gross-flaeche picture { display: contents; }
.gross-flaeche img {
  display: block; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%;
  border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); cursor: zoom-in; user-select: none; -webkit-user-select: none;
  animation: gross-bild .4s cubic-bezier(.2, .7, .2, 1) both;
}
.ist-gezoomt .gross-flaeche { padding: 0; }
.ist-gezoomt .gross-flaeche img { max-width: none; max-height: none; border-radius: 0; cursor: zoom-out; animation: none; }
.zieht .gross-flaeche, .zieht .gross-flaeche img { cursor: grabbing; }
@keyframes gross-bild { from { opacity: 0; transform: scale(.94); } }

.gross-text {
  max-width: 46rem; margin: 0 auto; text-align: center; font-family: var(--font-ui); font-size: .85rem; line-height: 1.5; color: var(--auf-nacht-2);
  padding: .9rem max(1.25rem, env(safe-area-inset-right, 0px)) max(1rem, env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
}
.gross-text :is(h2, h3) { margin: 0 0 .2rem; font: 600 .95rem/1.35 var(--font-ui); color: var(--auf-nacht); }
.gross-text p { margin: 0; }
.gross-text .nachweis { display: block; margin-top: .2rem; color: var(--auf-nacht-3); }
.gross-text a { color: inherit; text-decoration: underline; text-decoration-color: rgba(236, 210, 142, .4); text-underline-offset: .15em; }
.gross-text a:focus-visible { outline: 2px solid var(--gold-hell); outline-offset: 2px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  .gross-lupe { transition: none; }
  .gross[open], .gross.schliesst, .gross-flaeche img { animation: none; }
}
