.hm-bro {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
}

.hm-reader-standalone .hm-bro {
  position: relative;
  min-height: 100dvh;
  z-index: 1;
}

.hm-reader-standalone .hm-bro[hidden] {
  display: none !important;
}

.hm-reader-standalone .hm-bro:not([hidden]) {
  display: flex !important;
}

.hm-bro-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hm-bro-image-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.hm-bro-pdf-wrap {
  position: relative;
  z-index: 4;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hm-bro-pdf-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.hm-bro-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hm-bro-layer-a {
  z-index: 2;
  transition: opacity 0.18s ease;
}

.hm-bro-error {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(180, 40, 40, 0.92);
  color: #fff;
  font-size: 13px;
  text-align: center;
  z-index: 12;
  margin: 0;
}

.hm-bro-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

body.hm-reader-open {
  overflow: hidden;
}

.hm-bro-layer-b {
  z-index: 1;
}

.hm-bro-layer img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.hm-bro-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.hm-bro-prev {
  left: 14px;
}

.hm-bro-next {
  right: 14px;
}

.hm-bro-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -22px 0 0 -22px;
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #4a7fb5;
  border-radius: 50%;
  animation: hm-bro-spin 0.75s linear infinite;
  z-index: 10;
}

@keyframes hm-bro-spin {
  to {
    transform: rotate(360deg);
  }
}

.hm-bro-bar {
  width: 100%;
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  background: #000;
}

.hm-bro-count {
  color: rgba(255, 255, 255, 0.32);
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 56px;
  text-align: center;
}

.hm-bro-scrub {
  width: 44%;
  max-width: 300px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
}

.hm-bro-scrub-fill {
  height: 100%;
  background: #4a7fb5;
  border-radius: 10px;
  width: 0%;
  transition: width 0.2s;
  pointer-events: none;
}

.hm-bro-icon-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.38);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hm-bro-jump {
  position: absolute;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e2d4a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 8px;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 20;
  display: flex;
}

.hm-bro-jump input {
  width: 66px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-align: center;
  outline: none;
  font-size: 13px;
  border-radius: 8px;
  padding: 7px 4px;
}

.hm-bro-jump button {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  background: #4a7fb5;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.hm-rtb-wrap {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.hm-rtb-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 16px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 100;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.hm-rtb-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
}

.hm-rtb-wrap:hover .hm-rtb-tooltip {
  display: block;
}

.hm-rtb-btn {
  display: inline-block;
  background: #fff;
  color: #4172b0;
  font-size: 16px;
  padding: 13px 40px;
  border-radius: 50px;
  border: 2px solid #4172b0;
  cursor: pointer;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.hm-rtb-btn:hover {
  background: #4172b0;
  color: #fff;
}

@media (max-width: 767px) {
  .hm-rtb-btn {
    font-size: 14px;
    padding: 11px 28px;
  }
}
