/* ══════════════════════════════════════════════════════════════════════════
   Werkbund Publikationen — E-Reader
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Einzelseite Kopf ─────────────────────────────────────────────────── */
.wbpub { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; }
.wbpub__head { margin-bottom: 22px; }
.wbpub__kicker {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #8b6914; margin-bottom: 6px;
}
.wbpub__title { font-size: clamp(1.5rem, 3.5vw, 2.6rem); font-weight: 800; line-height: 1.2; margin: 0 0 8px; }
.wbpub__author { font-size: 15px; color: #555; margin-bottom: 8px; }
.wbpub__desc { font-size: 15px; color: #444; line-height: 1.6; max-width: 68ch; margin: 8px 0 0; }
.wbpub__nopdf { padding: 48px; text-align: center; color: #999; background: #f3f2ee; border-radius: 12px; }

/* ── Reader Container ─────────────────────────────────────────────────── */
.wbpub-reader {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #1c1c1e;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 44px rgba(0,0,0,.24);
  margin-bottom: 48px;
  user-select: none;
  -webkit-user-select: none;
}

/* Toolbar */
.wbpub-reader__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #141416;
  color: #f2f2f2;
}
.wbpub-reader__btn {
  appearance: none; border: none;
  background: rgba(255,255,255,.10); color: #fff;
  width: 38px; height: 38px; border-radius: 9px;
  font-size: 19px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.wbpub-reader__btn:hover:not(:disabled) { background: rgba(255,255,255,.20); }
.wbpub-reader__btn:disabled { opacity: .3; cursor: default; }
.wbpub-reader__count { font-size: 14px; font-variant-numeric: tabular-nums; min-width: 56px; text-align: center; }
.wbpub-reader__sep { opacity: .5; margin: 0 3px; }
.wbpub-reader__flex { flex: 1; }

/* Viewport */
.wbpub-reader__viewport {
  position: relative;
  width: 100%;
  height: min(82vh, 920px);
  background: radial-gradient(ellipse at center, #3a3a3c 0%, #232325 100%);
  overflow: hidden;
}

/* Loading */
.wbpub-reader__loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: #ccc; font-size: 14px;
}
.wbpub-reader__spinner {
  width: 22px; height: 22px;
  border: 2px solid rgba(255,255,255,.22); border-top-color: #fff;
  border-radius: 50%; animation: wbpub-spin .8s linear infinite;
}
@keyframes wbpub-spin { to { transform: rotate(360deg); } }

.wbpub-reader__noscript { padding: 24px; color: #ccc; text-align: center; }

/* ── Desktop: Flip (eine/zwei Seiten zentriert) ───────────────────────── */
.wbpub-reader.is-flip .wbpub-reader__viewport {
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.wbpub-reader.is-flip .wbpub-reader__pages {
  display: flex; gap: 0; align-items: center; justify-content: center;
  box-shadow: 0 8px 36px rgba(0,0,0,.45);
}
.wbpub-reader.is-flip .wbpub-reader__page { display: flex; }
.wbpub-reader.is-flip .wbpub-reader__canvas { display: block; background: #fff; }

/* ── Mobile: Scroll (Seiten untereinander) ────────────────────────────── */
.wbpub-reader.is-scroll .wbpub-reader__viewport {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.wbpub-reader.is-scroll .wbpub-reader__pages {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 14px 12px;
}
.wbpub-reader.is-scroll .wbpub-reader__page {
  width: 100%; display: flex; justify-content: center;
}
.wbpub-reader.is-scroll .wbpub-reader__canvas {
  display: block; background: #fff;
  max-width: 100%; height: auto;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  border-radius: 2px;
}

/* Fullscreen */
.wbpub-reader.is-fullscreen { border-radius: 0; margin: 0; height: 100vh; }
.wbpub-reader.is-fullscreen .wbpub-reader__viewport { height: calc(100vh - 58px); }

/* ── Volltext (SEO/GEO) ───────────────────────────────────────────────── */
.wbpub__fulltext { border-top: 1px solid #e8e4dc; padding-top: 36px; }
.wbpub__fulltext-h { font-size: 18px; font-weight: 700; margin: 0 0 18px; color: #3a3a3a; }
.wbpub__fulltext-body { columns: 2 320px; column-gap: 40px; font-size: 14px; line-height: 1.8; color: #555; }
.wbpub__fulltext-body p { margin: 0 0 12px; break-inside: avoid; }

/* ══ Archiv ═══════════════════════════════════════════════════════════════ */
.wbpub-archive { max-width: 1100px; margin: 0 auto; padding: 32px 16px 64px; }
.wbpub-archive__head { margin-bottom: 36px; }
.wbpub-archive__title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; margin: 0 0 8px; }
.wbpub-archive__sub { font-size: 16px; color: #666; margin: 0; }
.wbpub-archive__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px;
}

.wbpub-card__link { display: block; text-decoration: none; color: inherit; }
.wbpub-card__media {
  position: relative; overflow: hidden; border-radius: 10px;
  background: #ebe9e3; aspect-ratio: 3 / 4;
  box-shadow: 0 2px 12px rgba(0,0,0,.10); transition: box-shadow .2s;
}
.wbpub-card__link:hover .wbpub-card__media { box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.wbpub-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.wbpub-card__link:hover .wbpub-card__img { transform: scale(1.03); }
.wbpub-card__fallback { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 13px; color: #aaa; font-style: italic; }
.wbpub-card__body { padding: 10px 0 0; }
.wbpub-card__kicker { font-size: 11px; color: #8b6914; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.wbpub-card__title { font-size: 15px; font-weight: 700; margin: 0 0 3px; line-height: 1.3; }
.wbpub-card__meta { font-size: 12px; color: #666; }

@media (max-width: 640px) {
  .wbpub-archive__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .wbpub__fulltext-body { columns: 1; }
  .wbpub-reader__viewport { height: 82svh; }
}

/* ════════════════════════════════════════════════════════════════════
   E-Book Reader v2 – Modus-Umschalter, Lesefluss, Künstler-Verlinkung
   ════════════════════════════════════════════════════════════════════ */

/* Modus-Umschalter (Lesefluss ↔ Originalseite) */
.wbpub-reader__mode {
  appearance: none;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.wbpub-reader__mode:hover { background: rgba(255,255,255,.20); }
.wbpub-reader__mode[aria-pressed="true"] {
  background: #fff;
  color: #1d2127;
  border-color: #fff;
}

/* Lesefluss-Ansicht im Viewport */
.wbpub-reader__flow {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  background: #fbfaf7;
  -webkit-overflow-scrolling: touch;
}
.wbpub-flow__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 28px 64px;
  font-size: 17px;
  line-height: 1.75;
  color: #2b2b2b;
  font-family: Georgia, "Times New Roman", serif;
}
.wbpub-flow__inner p { margin: 0 0 1.1em; }
.wbpub-reader.is-flow .wbpub-reader__viewport { background: #fbfaf7; }

/* Verlinkte Künstlernamen im Fließtext */
.wbpub-inline-artist {
  color: #2f6b40;
  text-decoration: none;
  border-bottom: 1px solid rgba(47,107,64,.35);
  transition: border-color .15s ease, color .15s ease;
}
.wbpub-inline-artist:hover {
  color: #234d2e;
  border-bottom-color: #2f6b40;
}

/* "Vorkommende Künstler:innen" */
.wbpub__artists { border-top: 1px solid #e8e4dc; padding-top: 28px; margin-top: 36px; }
.wbpub__artists-h { font-size: 18px; font-weight: 700; margin: 0 0 16px; color: #3a3a3a; }
.wbpub__artists-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.wbpub__artist-chip {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(47,107,64,.07);
  border: 1px solid rgba(47,107,64,.2);
  color: #2f6b40;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.wbpub__artist-chip:hover {
  background: rgba(47,107,64,.12);
  border-color: rgba(47,107,64,.4);
  transform: translateY(-1px);
}

/* Reader-Viewport muss relativ sein, damit der Lesefluss-Overlay sitzt */
.wbpub-reader__viewport { position: relative; }

@media (max-width: 819px) {
  .wbpub-flow__inner { padding: 28px 20px 48px; font-size: 16px; }
}
