/* StPageFlip 2.0.7 Engine-CSS (aus dem Bundle extrahiert, Tippfehler .sft__wrapper korrigiert) */
.stf__parent {
  position: relative;
  display: block;
  box-sizing: border-box;
  transform: translateZ(0);

  -ms-touch-action: pan-y;
  touch-action: pan-y;
}

.stf__wrapper {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.stf__parent canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
}

.stf__block {
  position: absolute;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  perspective: 2000px;
}

.stf__item {
  display: none;
  position: absolute;
  transform-style: preserve-3d;
}

.stf__outerShadow {
  position: absolute;
  left: 0;
  top: 0;
}

.stf__innerShadow {
  position: absolute;
  left: 0;
  top: 0;
}

.stf__hardShadow {
  position: absolute;
  left: 0;
  top: 0;
}

.stf__hardInnerShadow {
  position: absolute;
  left: 0;
  top: 0;
}
/* devqon-epaper viewer — Farben kommen aus theme.css (--ep-bg, --ep-toolbar, --ep-accent, --ep-fg, --ep-focus) */
html, body { margin: 0; height: 100%; background: var(--ep-bg, #2b3440); }
body {
  overflow: hidden; overscroll-behavior: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.4; color: var(--ep-fg, #fff);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input { font: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.ep-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; color: #111; padding: 8px 12px; border-radius: 6px; }
.ep-skip:focus { left: 8px; }

.ep-app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.ep-app:fullscreen { background: var(--ep-bg); }

/* Toolbar */
.ep-toolbar {
  order: 0; flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 8px; padding-top: env(safe-area-inset-top);
  background: var(--ep-toolbar, #1c2229); color: var(--ep-fg, #fff); z-index: 5;
}
.ep-toolbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ep-logo { display: inline-flex; align-items: center; height: 40px; }
.ep-logo img { height: 32px; width: auto; display: block; }
.ep-toolbar-main { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.ep-btn {
  appearance: none; background: transparent; border: 0; color: inherit; padding: 0;
  width: 44px; height: 44px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; touch-action: manipulation; text-decoration: none; flex: 0 0 auto;
}
.ep-btn svg { width: 24px; height: 24px; display: block; }
.ep-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.ep-btn:focus-visible, .ep-thumbs button:focus-visible, .ep-results button:focus-visible, .ep-more-list a:focus-visible, .ep-more-list button:focus-visible, .ep-hot:focus-visible, input:focus-visible {
  outline: 2px solid var(--ep-focus, #fff); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ep-toolbar, #1c2229);
}
.ep-text.is-visible :focus-visible { outline-color: #111; box-shadow: 0 0 0 5px #fff; }
.ep-btn[aria-pressed="true"], .ep-btn[aria-expanded="true"] { color: var(--ep-accent, #f28c00); }
.ep-btn[disabled] { opacity: .3; cursor: default; }
.ep-btn[disabled]:hover { background: transparent; }
.ep-btn-text { width: auto; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.ep-btn-site { width: auto; padding: 0 10px; font-size: 14px; white-space: nowrap; }
.ep-pager { display: flex; align-items: center; gap: 4px; margin: 0 4px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ep-page-input {
  width: 3.2em; height: 40px; text-align: center; border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  background: color-mix(in srgb, #000 15%, transparent); color: inherit; border-radius: 6px; font-size: 16px; -moz-appearance: textfield;
}
.ep-page-input::-webkit-outer-spin-button, .ep-page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ep-page-total { white-space: nowrap; opacity: .85; }

/* Bühne */
.ep-main { order: 1; flex: 1 1 auto; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 12px; }
.ep-stage { position: relative; flex: 0 0 auto; width: min(calc(100vw - 24px), calc((100vh - 84px) * var(--ep-ratio, 0.707) * 2)); aspect-ratio: calc(var(--ep-ratio, 0.707) * 2); }
@media (max-width: 599px) { .ep-stage { width: min(100vw, calc((100vh - 80px) * var(--ep-ratio, 0.707))); aspect-ratio: var(--ep-ratio, 0.707); } }
.ep-app:not(.is-ready) .ep-main, .ep-app:not(.is-ready) .ep-toolbar-main { visibility: hidden; }
.ep-book { position: relative; width: 100%; height: 100%; min-width: 0 !important; touch-action: none !important; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ep-book .stf__wrapper { position: relative; height: 100%; }
.ep-book .stf__block { transition: transform .3s ease; }
.ep-page { background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .35); overflow: hidden; }
.ep-page.--hard { box-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.ep-sheet { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #fff center / 100% 100% no-repeat; }
.ep-sheet picture, .ep-sheet img { display: block; width: 100%; height: 100%; }
.ep-sheet img { pointer-events: none; -webkit-user-drag: none; -webkit-touch-callout: none; object-fit: fill; opacity: 1; transition: opacity .2s; }
.ep-sheet img:not([src]) { opacity: 0; }
.ep-overlay { position: absolute; inset: 0; pointer-events: none; }
.ep-mark { position: absolute; background: rgba(255, 215, 0, .42); border-radius: 2px; }
.ep-mark.is-active { background: rgba(255, 190, 0, .6); outline: 2px solid #e08a00; }
.ep-hotspots { position: absolute; inset: 0; }
.ep-hot { position: absolute; display: block; border-radius: 3px; cursor: pointer; }
.ep-hot:hover { background: color-mix(in srgb, var(--ep-accent, #f28c00) 18%, transparent); outline: 1px solid color-mix(in srgb, var(--ep-accent, #f28c00) 70%, transparent); }
.ep-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; border: 0; border-radius: 10px;
  background: color-mix(in srgb, var(--ep-toolbar, #1c2229) 70%, transparent); color: var(--ep-fg, #fff); cursor: pointer; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
}
.ep-arrow svg { width: 28px; height: 28px; }
.ep-arrow-prev { left: 6px; } .ep-arrow-next { right: 6px; }
.ep-arrow:hover { background: var(--ep-toolbar, #1c2229); }
.ep-arrow[disabled] { opacity: .2; cursor: default; }

/* Zoom */
.ep-zoom { position: absolute; inset: 0; z-index: 4; background: var(--ep-bg, #2b3440); display: flex; flex-direction: column; }
.ep-zoom[hidden] { display: none; }
.ep-zoom-viewport { flex: 1 1 auto; position: relative; overflow: hidden; touch-action: none; cursor: grab; }
.ep-zoom-viewport.is-panning { cursor: grabbing; }
.ep-zoom-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: flex; will-change: transform; }
.ep-zpage { position: relative; flex: 0 0 auto; background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.ep-zpage img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.ep-zpage .ep-hot { min-width: 0; min-height: 0; }
.ep-zoom-tools {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px;
  background: var(--ep-toolbar, #1c2229); color: var(--ep-fg, #fff); border-radius: 12px; padding: 4px; z-index: 2; box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.ep-zoom-level { min-width: 4.2em; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }

/* Laden, Toast */
.ep-loading { position: absolute; inset: 0; z-index: 20; background: var(--ep-bg, #2b3440); display: flex; align-items: center; justify-content: center; transition: opacity .35s; }
.ep-loading.is-done { opacity: 0; pointer-events: none; }
.ep-loading-box { text-align: center; }
.ep-loading-cover { display: block; margin: 0 auto 14px; width: 120px; height: auto; box-shadow: 0 2px 14px rgba(0, 0, 0, .4); background: #fff; }
.ep-loading-title { margin: 0 0 4px; font-weight: 600; }
.ep-loading-text { margin: 0; opacity: .8; font-size: 14px; }
.ep-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 30; background: var(--ep-toolbar, #1c2229); color: var(--ep-fg, #fff); padding: 10px 16px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); font-size: 14px; }
.ep-toast[hidden] { display: none; }

/* Dialoge */
dialog.ep-dialog {
  border: 0; border-radius: 12px; padding: 0; margin: auto; background: var(--ep-panel, #1c2229); color: var(--ep-panel-fg, #fff);
  width: min(92vw, 720px); max-height: 85vh; max-height: 85dvh; overflow: auto; overscroll-behavior: contain; box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}
dialog.ep-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.ep-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 6px 20px; position: sticky; top: 0; background: inherit; z-index: 1; }
.ep-dialog-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.ep-thumbs { list-style: none; margin: 0; padding: 10px 20px 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.ep-thumbs button { appearance: none; background: none; border: 0; padding: 0; color: inherit; cursor: pointer; width: 100%; text-align: center; font-size: 13px; }
.ep-thumbs img { display: block; width: 100%; height: auto; border: 3px solid transparent; border-radius: 4px; background: #fff; margin-bottom: 4px; }
.ep-thumbs button[aria-current="page"] img { border-color: var(--ep-accent, #f28c00); }
.ep-search-form { display: flex; gap: 8px; padding: 4px 20px 8px; }
.ep-search-input { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid color-mix(in srgb, currentColor 55%, transparent); background: color-mix(in srgb, #000 15%, transparent); color: inherit; font-size: 16px; }
.ep-search-input::placeholder, .ep-page-input::placeholder { color: inherit; opacity: .75; }
.ep-search-input::-webkit-search-cancel-button { filter: invert(1) grayscale(1) brightness(1.6); cursor: pointer; }
.ep-search-count { margin: 0; padding: 0 20px 6px; font-size: 13px; opacity: .85; min-height: 1.2em; }
.ep-results { list-style: none; margin: 0; padding: 0 12px 16px; }
.ep-results button { appearance: none; display: block; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 10px 8px; border-radius: 8px; cursor: pointer; min-height: 44px; line-height: 1.35; }
.ep-results button:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.ep-results .ep-result-page { font-weight: 600; margin-right: 6px; }
.ep-results mark { background: #ffd54a; color: #111; border-radius: 2px; padding: 0 2px; }
.ep-more-list { list-style: none; margin: 0; padding: 4px 12px 14px; }
.ep-more-list a, .ep-more-list button { appearance: none; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 10px; background: none; border: 0; color: inherit; text-decoration: none; border-radius: 8px; cursor: pointer; text-align: left; }
.ep-more-list a:hover, .ep-more-list button:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.ep-more-list svg { width: 22px; height: 22px; flex: 0 0 auto; opacity: .9; }
.ep-more-list small { opacity: .7; margin-left: auto; font-size: 12px; }
.ep-share-box { padding: 0 20px 20px; }
.ep-share-box label { display: block; font-size: 13px; margin-bottom: 4px; opacity: .85; }
.ep-share-box input { width: 100%; height: 44px; padding: 0 10px; border-radius: 6px; border: 1px solid color-mix(in srgb, currentColor 55%, transparent); background: color-mix(in srgb, #000 15%, transparent); color: inherit; font-size: 16px; }

/* Textebene: unsichtbar, aber im DOM (Screenreader/Suchmaschinen); per Button als Panel */
.ep-text:not(.is-visible) { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.ep-text.is-visible { position: absolute; top: 0; right: 0; bottom: 0; width: min(100%, 560px); z-index: 4; background: #fff; color: #111; overflow: auto; overscroll-behavior: contain; padding: 12px 24px 24px; box-shadow: -4px 0 24px rgba(0, 0, 0, .3); line-height: 1.5; }
.ep-text.is-visible .ep-text-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; background: #fff; padding: 8px 0; }
.ep-text.is-visible .ep-text-head h2 { margin: 0; font-size: 18px; }
.ep-text.is-visible .ep-text-close { color: #111; border: 1px solid #ccc; }
.ep-text.is-visible article { border-top: 1px solid #e5e5e5; padding: 14px 0; }
.ep-text.is-visible h2 { font-size: 16px; }
.ep-text.is-visible a { color: #0a58ca; }
.ep-text-keywords { font-style: italic; opacity: .8; }


/* noscript */
.ep-noscript { position: relative; z-index: 50; padding: 20px; color: #fff; background: var(--ep-bg, #2b3440); }
.ep-noscript img { max-width: 100%; height: auto; display: block; margin: 12px 0; }
.ep-noscript a { color: #fff; }

/* Mobile: Toolbar unten, kompakt */
@media (max-width: 899px) { .ep-arrow { display: none; } .ep-main { padding: 8px; } }
@media (max-width: 599px) {
  .ep-toolbar { order: 2; height: auto; min-height: 56px; padding: 4px 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); padding-top: 4px; justify-content: center; }
  .ep-toolbar-left { display: none; }
  .ep-toolbar-main { margin: 0; width: 100%; justify-content: space-between; }
  .ep-btn-zoom, .ep-btn-fullscreen { display: none; }
  .ep-pager { margin: 0; }
  .ep-main { padding: 6px 12px; }
  .ep-page { box-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
  dialog.ep-dialog { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; margin: 0; }
  .ep-toast { bottom: 90px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .ep-toolbar { min-height: 44px; height: 44px; padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
  .ep-btn { width: 40px; height: 40px; }
  .ep-btn-site, .ep-btn-text { width: auto; }
  .ep-main { padding: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
