.dy-flipbook { max-width: 1000px; width: 100%; margin: 24px auto; text-align: center; }

.dy-flipbook-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dy-flipbook-viewport {
  width: 100%;
  height: min(70vw, 620px);
  min-height: 280px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 56px;
  box-sizing: border-box;
}
.dy-flipbook.dy-is-zoomed .dy-flipbook-viewport {
  overflow: auto;
  display: block;
  padding: 0;
  cursor: grab;
  cursor: -webkit-grab;
  touch-action: pan-x pan-y;
}
.dy-flipbook.dy-is-panning .dy-flipbook-viewport,
.dy-flipbook.dy-is-panning .dy-flipbook-viewport * {
  cursor: grabbing !important;
  cursor: -webkit-grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.dy-flipbook-stage-sizer {
  width: 100%;
  height: 100%;
  position: relative;
  margin: auto;
}
.dy-flipbook-canvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-origin: top left;
}

/* Large Left & Right Edge Arrows */
.dy-flipbook button.dy-edge-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 48px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: rgba(24, 27, 34, 0.82);
  color: #fff;
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 0 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: background-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}
.dy-flipbook button.dy-edge-arrow.dy-prev { left: 6px; }
.dy-flipbook button.dy-edge-arrow.dy-next { right: 6px; }
.dy-flipbook button.dy-edge-arrow:hover:not(:disabled) {
  background: #c62828;
  transform: translateY(-50%) scale(1.05);
}
.dy-flipbook button.dy-edge-arrow:disabled {
  opacity: 0.22;
  cursor: default;
  pointer-events: none;
}

.dy-flipbook .dy-page {
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 0 5px #ddd;
  position: relative;
  cursor: pointer;
}
.dy-flipbook.dy-is-zoomed .dy-page {
  cursor: inherit;
}
.dy-flipbook .dy-page img.dy-page-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.dy-flipbook .dy-page-wait {
  background: #fff;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font: 14px sans-serif;
}

/* Interactive PDF Hyperlinks Overlay */
.dy-flipbook .dy-overlay-layer {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  z-index: 12;
  pointer-events: none;
}
.dy-flipbook .dy-link-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dy-flipbook a.dy-pdf-link {
  position: absolute;
  display: block;
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  border-radius: 2px;
  transition: background-color 0.15s ease, outline-color 0.15s ease;
  text-decoration: none;
}
.dy-flipbook a.dy-pdf-link:hover,
.dy-flipbook a.dy-pdf-link:focus-visible {
  background: rgba(0, 115, 230, 0.16);
  outline: 1.5px solid rgba(0, 115, 230, 0.6);
}

/* Bottom Status, Pan Hand & Zoom Bar */
.dy-flipbook-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.dy-flipbook-controls button {
  cursor: pointer;
  background: #242424;
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 8px 13px;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
}
.dy-flipbook-controls button:hover:not(:disabled) {
  background: #3a3a3a;
}
.dy-flipbook-controls button:disabled {
  opacity: 0.45;
  cursor: default;
}
.dy-flipbook .dy-status {
  font-size: 14px;
  font-weight: 600;
  min-width: 135px;
}
.dy-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dy-zoom-group button {
  padding: 8px 11px;
  min-width: 36px;
}
.dy-zoom-group .dy-pan-toggle.is-active {
  background: #c62828;
  color: #fff;
}
.dy-zoom-group .dy-zoom-reset {
  min-width: 58px;
  font-variant-numeric: tabular-nums;
}
.dy-flipbook .dy-fallback {
  font-size: 13px;
  margin: 4px 0;
}

/* Modal Lightbox Styles */
html.dy-modal-open, html.dy-modal-open body { overflow: hidden; }
.dy-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 18, 24, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.dy-modal-dialog {
  background: #f5f5f7;
  color: #1d1d1f;
  width: 100%;
  max-width: 1120px;
  max-height: 94vh;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dy-modal-header,
.dy-standalone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #1f232a;
  color: #fff;
}
.dy-modal-title,
.dy-standalone-title {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dy-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.dy-modal-download {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
}
.dy-modal-download:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.dy-modal-close {
  cursor: pointer;
  background: #c62828;
  color: #fff;
  border: 0;
  border-radius: 5px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.dy-modal-close:hover { background: #b71c1c; color: #fff; }
.dy-flipbook-in-modal { margin: 12px auto 6px; padding: 0 12px; max-width: 1080px; }
.dy-flipbook-in-modal .dy-flipbook-viewport { height: min(72vh, 660px); }

/* Standalone Full-Tab Reader (when opened in a new browser tab) */
body.dy-standalone-body {
  margin: 0;
  min-height: 100vh;
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
}
.dy-standalone-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px 20px;
}
.dy-flipbook-standalone {
  margin: 0 auto;
  max-width: 1120px;
}
.dy-flipbook-standalone .dy-flipbook-viewport {
  height: calc(100vh - 132px);
  min-height: 360px;
}

@media (max-width: 600px) {
  .dy-flipbook-viewport { height: min(125vw, 570px); min-height: 250px; padding: 0 38px; }
  .dy-flipbook button.dy-edge-arrow { width: 34px; height: 52px; font-size: 28px; }
  .dy-flipbook button.dy-edge-arrow.dy-prev { left: 2px; }
  .dy-flipbook button.dy-edge-arrow.dy-next { right: 2px; }
  .dy-modal { padding: 8px; }
  .dy-flipbook-in-modal .dy-flipbook-viewport { height: 64vh; }
  .dy-flipbook-standalone .dy-flipbook-viewport { height: calc(100vh - 120px); }
}
