* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #e9edf3;
  color: #3c3c3c;
  display: flex;
  flex-direction: column;
}
.leiste {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .6rem 1rem;
  background: #2a5298;
  color: #fff;
}
.marke { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.titel { font-size: 1.05rem; font-weight: 600; margin: 0; flex: 1; text-align: center; }
.werkzeuge { display: flex; align-items: center; gap: .5rem; }
.werkzeuge button, .knopf {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  padding: .45rem .75rem;
  cursor: pointer;
  text-decoration: none;
}
.werkzeuge button:hover, .knopf:hover { background: rgba(255,255,255,.3); }
.werkzeuge button:disabled { opacity: .4; cursor: default; }
#seitenanzeige { min-width: 4.5rem; text-align: center; font-variant-numeric: tabular-nums; }

.buehne {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 0;
}
#buch { margin: 0 auto; }
.seite { background: #fff; overflow: hidden; }
.seite img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.hinweis { font-size: .9rem; color: #5b6475; margin: .75rem 0 0; text-align: center; }

/* Klickflaechen auf den Artikelnummern */
.artikel-link {
  position: absolute;
  display: block;
  border-radius: 3px;
  background: rgba(42, 82, 152, .10);
  outline: 1px solid rgba(42, 82, 152, .35);
  transition: background .15s;
}
.artikel-link:hover, .artikel-link:focus-visible {
  background: rgba(42, 82, 152, .28);
  outline: 2px solid #2a5298;
}

@media (max-width: 700px) {
  .titel { display: none; }
  .leiste { justify-content: space-between; }
  .buehne { padding: .5rem; }
}

/* Suche */
.suche { position: relative; flex: 0 1 300px; }
#suchfeld {
  width: 100%;
  font-size: .95rem;
  padding: .45rem .7rem;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 4px;
  background: #fff;
  color: #3c3c3c;
}
.treffer {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 320px;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding: .25rem 0;
  list-style: none;
  background: #fff;
  color: #3c3c3c;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  z-index: 50;
}
.treffer li { padding: .5rem .8rem; cursor: pointer; line-height: 1.3; }
.treffer li[aria-selected="true"], .treffer li:hover { background: #eef2f9; }
.treffer .t-seite { float: right; color: #5b6475; font-size: .85rem; margin-left: .5rem; }
.treffer .t-titel { font-weight: 600; }
.treffer .t-info { font-size: .85rem; color: #5b6475; }
.treffer .t-leer { cursor: default; color: #5b6475; }
.treffer mark { background: #ffe58a; color: inherit; padding: 0; }

/* Aufblinken nach Sprung aus der Suche */
.markierung {
  position: absolute;
  border-radius: 4px;
  outline: 3px solid #e3a400;
  background: rgba(255, 210, 0, .35);
  pointer-events: none;
  animation: blinken 1s ease-in-out 3;
}
@keyframes blinken { 50% { outline-color: transparent; background: rgba(255,210,0,0); } }

/* Lupe */
#lupe-knopf { display: inline-flex; align-items: center; }
.lupe {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 28, 45, .92);
  display: flex;
  flex-direction: column;
}
.lupe[hidden] { display: none; }
.lupe-leiste {
  background: #1d2638;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem;
  color: #fff;
}
.lupe-leiste button {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px;
  font-size: 1.1rem;
  line-height: 1;
  padding: .45rem .8rem;
  cursor: pointer;
}
.lupe-leiste button:hover { background: rgba(255,255,255,.3); }
.lupe-zu { margin-left: 1rem; }
#lupe-anzeige { min-width: 5rem; text-align: center; font-variant-numeric: tabular-nums; }
.lupe-flaeche { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; cursor: grab; }
.lupe-flaeche.zieht { cursor: grabbing; }
.lupe-seite { position: relative; margin: 0 auto 2rem; background: #fff; }
.lupe-seite img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

@media (max-width: 700px) {
  .leiste { flex-wrap: wrap; }
  .suche { order: 3; flex: 1 1 100%; }
  .treffer { min-width: 0; }
}

/* Grosse Blaetterpfeile neben dem Buch */
.buehne { position: relative; }
.seite { cursor: zoom-in; }
.seitenpfeil {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border: none;
  border-radius: 6px;
  background: rgba(42, 82, 152, .85);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 20;
}
.seitenpfeil:hover { background: #2a5298; }
.pfeil-links { left: .5rem; }
.pfeil-rechts { right: .5rem; }
.seitenpfeil[hidden] { display: none; }
@media (max-width: 700px) {
  .seitenpfeil { width: 34px; height: 52px; font-size: 1.6rem; opacity: .8; }
}
