/* Astro-Viewer: schwarzer Hintergrund, Bild möglichst groß mit kleinem Rahmen. Keine externen Ressourcen. */
:root { --pad: 10px; --vh: 100vh; color-scheme: dark; }
@supports (height: 100dvh) { :root { --vh: 100dvh; } }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: #000; color: #e9e9e9; overflow: hidden;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Helvetica, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid #4fd1b3; outline-offset: 2px; }

#stage { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--pad); }
#fig { position: relative; margin: 0; --ar: 1.5;
  width: min(calc(100vw - 2 * var(--pad)), calc((var(--vh) - 2 * var(--pad)) * var(--ar)));
  aspect-ratio: var(--ar); }
#fig[hidden] { display: none; }
#pic { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .15s; }
body.busy #pic { opacity: .35; }

/* Bilddaten rechts unten im Bild */
#info { position: absolute; right: 1.2%; bottom: 1.6%; max-width: 70%; padding: .55em .9em .6em; text-align: right;
  background: rgba(0, 0, 0, .55); border-radius: 6px; line-height: 1.45; text-shadow: 0 0 4px #000;
  font-size: clamp(10px, calc(.5vw + 7px), 16px); }
#info b { display: block; font-size: 1.15em; font-weight: 650; color: #fff; margin-bottom: .1em; }
#info span { display: block; color: #d6d6d6; }
body.noinfo #info { display: none; }

/* Leiste oben und Pfeile: dezent, verschwinden bei Ruhe */
.bar { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 8px 14px;
  font-size: 13px; color: #cfcfcf; text-shadow: 0 0 4px #000; z-index: 3; transition: opacity .4s; }
.bar .back { margin-right: auto; }
.bar a:hover, .bar button:hover { color: #fff; }
.bar button { width: 28px; height: 28px; border-radius: 6px; background: rgba(0, 0, 0, .45); font-size: 15px; line-height: 1; }
#count { font-variant-numeric: tabular-nums; }
.arrow { position: fixed; top: 0; bottom: 0; width: 12vw; max-width: 140px; z-index: 2; font-size: 44px; color: rgba(255, 255, 255, .0);
  display: flex; align-items: center; transition: color .2s, opacity .4s; text-shadow: 0 0 6px #000; }
.arrow.prev { left: 0; justify-content: flex-start; padding-left: 14px; }
.arrow.next { right: 0; justify-content: flex-end; padding-right: 14px; }
.arrow:hover { color: rgba(255, 255, 255, .85); }
body.idle .bar, body.idle .arrow { opacity: 0; }
body.idle { cursor: none; }
@media (hover: none) { .arrow { display: none; } }

#msg { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 20px;
  text-align: center; color: #bbb; pointer-events: none; }
#msg:empty { display: none; }

/* Urhebervermerk links unten im Bild, immer sichtbar (auch wenn die Bilddaten ausgeblendet sind) */
#copy { position: absolute; left: 1.2%; bottom: 1.6%; padding: .45em .8em; background: rgba(0, 0, 0, .55); border-radius: 6px;
  color: #e6e6e6; text-shadow: 0 0 4px #000; pointer-events: none; user-select: none; -webkit-user-select: none;
  font-size: clamp(10px, calc(.5vw + 7px), 16px); }
