.vhs-flipbook-wrapper {
  width: 100%;
  max-width: 1140px;
  margin: 2rem auto;
  padding: 1.25rem;
  background: #f6f7f9;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.vhs-flipbook-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: .75rem;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
  backdrop-filter: blur(8px);
}

.vhs-flipbook-toolbar button,
.vhs-flipbook-toolbar a {
  min-width: 42px;
  height: 40px;
  padding: 0 .9rem;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: #fff;
  color: #222;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.vhs-flipbook-toolbar button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.vhs-flipbook-page-input {
  width: 58px;
  height: 40px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: #f3f4f6;
  text-align: center;
  font: inherit;
  font-weight: 700;
}

.vhs-flipbook-stage {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  min-height: 760px;
  min-width: 0;
}

.vhs-flipbook-stage.is-active,
.vhs-flipbook-stage.is-panning {
  cursor: grab;
}

.vhs-flipbook-stage.is-panning {
  cursor: grabbing;
}

.vhs-flipbook-stage-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: center center;
  transition: transform .12s ease;
  will-change: transform;
}

.vhs-flipbook-stage.is-active .vhs-flipbook-stage-inner {
  touch-action: none;
}

.vhs-flipbook {
  position: relative;
  margin: 0 auto;
  border-radius: 10px;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, .2));
  overflow: visible;
}

.vhs-flipbook-page {
  position: relative;
  background: #fff;
  overflow: hidden;
}

.vhs-flipbook-page canvas {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

.vhs-flipbook-wrapper:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 1rem;
  border-radius: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.vhs-flipbook-wrapper:fullscreen .vhs-flipbook-toolbar {
  position: relative;
  flex: 0 0 auto;
  margin-bottom: 1rem;
}

.vhs-flipbook-wrapper:fullscreen .vhs-flipbook-stage {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.vhs-flipbook-wrapper:fullscreen .vhs-flipbook-stage-inner {
  max-width: 100%;
  max-height: 100%;
}

.vhs-flipbook-toc {
  margin-bottom: 1rem;
  padding: .85rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
}

.vhs-flipbook-toc-title {
  margin-bottom: .5rem;
  font-weight: 700;
}

.vhs-flipbook-toc-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem .85rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.vhs-flipbook-toc-item:hover {
  background: #f3f4f6;
}

.vhs-flipbook-toc-item strong {
  white-space: nowrap;
}

.vhs-flipbook-annotation-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.vhs-flipbook-annotation-layer a {
  position: absolute;
  display: block;
  pointer-events: auto;
  background: rgba(0, 95, 170, .12);
  border: 1px dashed rgba(0, 95, 170, .65);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
  box-sizing: border-box;
}

.vhs-flipbook-annotation-layer a:hover,
.vhs-flipbook-annotation-layer a:focus-visible {
  background: rgba(0, 95, 170, .2);
  border-color: rgba(0, 95, 170, .9);
  outline: 2px solid rgba(255, 255, 255, .75);
  outline-offset: -3px;
}

@media (max-width: 768px) {
  .vhs-flipbook-wrapper {
    margin: 1rem auto;
    padding: .75rem;
    border-radius: 14px;
  }

  .vhs-flipbook-stage {
    min-height: 460px;
  }

  .vhs-flipbook-toolbar button,
  .vhs-flipbook-toolbar a {
    flex: 1 1 auto;
  }
}

@media (min-width: 992px) {
  .vhs-flipbook-wrapper {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(1600px, 100vw);
    max-width: 1600px;

    /* wichtig: nichts anderes hier anfassen */
    margin-left: 0;
    margin-right: 0;
  }
}
