* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: Georgia, 'Times New Roman', serif; background: #2b3a4a; }

#cafe-scene {
  position: relative;
  background: #2b3a4a;
  overflow: hidden;
}
#cafe-bild {
  width: 100%;
  height: auto;
  display: block;
}
#hotspots { position: absolute; inset: 0; }
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255, 240, 200, 0.15);
  border: 2px solid rgba(255, 240, 200, 0.6);
  border-radius: 6px;
  padding: 0.5em 0.8em;
  color: #fff8ec;
  cursor: pointer;
  font-size: 0.9rem;
  backdrop-filter: blur(1px);
}
.hotspot:hover, .hotspot:focus {
  background: rgba(255, 240, 200, 0.35);
}

#cafe-footer {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
}
#impressum-link {
  color: #fff8ec;
  font-size: 0.8rem;
  opacity: 0.8;
}

#regal-overlay, #ausgabe-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#regal-overlay[hidden], #ausgabe-overlay[hidden] { display: none; }
.overlay-panel {
  position: relative;
  background: #fdfaf2;
  color: #2b2b2b;
  max-width: 40rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 4px;
}
.overlay-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: none;
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
}
#regal-ausgaben-liste { list-style: none; padding: 0; }
#regal-ausgaben-liste li { margin-bottom: 0.5rem; }
#regal-ausgaben-liste li.leer { color: #7a7263; font-style: italic; }
#regal-ausgaben-liste button {
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.8rem;
  background: #efe6d0;
  border: 1px solid #d8c9a3;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.reader { max-width: 40rem; }
#ausgabe-seite.pdf-seite {
  position: relative;
  width: 100%;
  /* Feste Höhe statt Einzelseiten-Seitenverhältnis: eingebettet wird die
     ganze Mehrseiten-PDF, der native Viewer braucht Platz zum Scrollen/
     Blättern zwischen den Seiten. */
  height: 70vh;
  background: #fff url('../img/papier-textur.png') repeat;
  border: 1px solid #d8c9a3;
  transition: opacity 0.15s ease-in-out;
}
#ausgabe-seite.pdf-seite.blenden { opacity: 0; }
#ausgabe-seite.pdf-seite embed {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}
.spinner {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner::after {
  content: '';
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid #d8c9a3;
  border-top-color: #7a5c2e;
  border-radius: 50%;
  animation: spinnerdreh 0.8s linear infinite;
}
@keyframes spinnerdreh {
  to { transform: rotate(360deg); }
}
#pdf-download {
  display: block;
  text-align: center;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: #7a5c2e;
}

@media (max-width: 30rem) {
  .overlay-panel { padding: 1.2rem; }
  .hotspot { font-size: 0.75rem; padding: 0.4em 0.6em; }

  /* Café-Bild ist querformatig (16:9) und würde auf hochkant-Handys nur
     als schmaler Streifen mit viel Weißraum darunter erscheinen. Fester
     Ausschnitt (3:4) mit object-fit:cover zeigt stattdessen den rechten
     Bildteil mit den Zeitungsständern bildschirmfüllend. Da die Crop-
     Fläche bei fixem Seitenverhältnis unabhängig von der genauen Geräte-
     breite immer gleich ist, funktionieren die eigenen Mobile-Hotspot-
     Koordinaten (hotspotMobil in regale.json) zuverlässig. */
  #cafe-scene { aspect-ratio: 3 / 4; }
  #cafe-bild { width: 100%; height: 100%; object-fit: cover; object-position: 95% center; }
}
