/**
 * HK PDF flipbook reader (PDF.js + StPageFlip)
 */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: #505050;
}

.hk-pdf-flipbook {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #505050;
  overflow: hidden;
}

.hk-pdf-flipbook-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font: 500 14px/1.4 Inter, system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #505050;
}

.hk-pdf-flipbook-loader.is-hidden {
  display: none;
}

.hk-pdf-flipbook-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: default;
}

.hk-pdf-flipbook-viewport.is-pannable {
  cursor: grab;
}

.hk-pdf-flipbook-viewport.is-panning {
  cursor: grabbing;
}

.hk-pdf-flipbook-book {
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}

.hk-pdf-flipbook-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 72px;
  border: 0;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, background 0.2s;
}

.hk-pdf-flipbook-nav:hover,
.hk-pdf-flipbook-nav:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.45);
}

.hk-pdf-flipbook-nav--prev {
  left: 0;
  border-radius: 0 6px 6px 0;
}

.hk-pdf-flipbook-nav--next {
  right: 0;
  border-radius: 6px 0 0 6px;
}

.hk-pdf-flipbook-toolbar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 12;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(51, 51, 51, 0.88);
  transform: translateX(-50%);
}

.hk-pdf-flipbook--ready .hk-pdf-flipbook-nav,
.hk-pdf-flipbook--ready .hk-pdf-flipbook-toolbar {
  display: flex;
}

.hk-pdf-flipbook-nav {
  display: none;
}

.hk-pdf-flipbook-tool {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #eee;
  font: 500 18px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.hk-pdf-flipbook-tool:hover,
.hk-pdf-flipbook-tool:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.hk-pdf-flipbook-tool:disabled {
  opacity: 0.35;
  cursor: default;
}

.hk-pdf-flipbook-tool--reset {
  margin-left: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hk-pdf-flipbook-zoom-label {
  min-width: 52px;
  color: #eee;
  font: 500 13px/1 Inter, system-ui, sans-serif;
  text-align: center;
  user-select: none;
}

.hk-pdf-flipbook--zoomed .hk-pdf-flipbook-nav {
  opacity: 0.25;
  pointer-events: none;
}

.hk-pdf-flipbook--zoomed .stf__parent {
  pointer-events: none;
}

.hk-pdf-flipbook--error {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hk-pdf-flipbook-error {
  margin: 0;
  color: #fff;
  font: 500 15px/1.5 Inter, system-ui, sans-serif;
}

.hk-pdf-flipbook .stf__parent {
  background: #505050 !important;
}

.hk-pdf-flipbook .stf__block {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.hk-pdf-flipbook .stf__item {
  background: #fff;
}

.hk-pdf-flipbook .stf__item img,
.hk-pdf-flipbook .stf__item canvas {
  image-rendering: auto;
}

@media (max-width: 760px) {
  .hk-pdf-flipbook-nav {
    width: 36px;
    height: 56px;
    font-size: 22px;
  }

  .hk-pdf-flipbook-toolbar {
    bottom: 12px;
    padding: 4px 6px;
  }

  .hk-pdf-flipbook-tool {
    min-width: 32px;
    height: 32px;
    font-size: 16px;
  }
}
