.epc-catalog {
  --epc-bg: #f3f4f6;
  --epc-height: 680px;
  --epc-border: rgba(31, 35, 44, 0.1);

  background: var(--epc-bg);
  border: 1px solid var(--epc-border);
  border-radius: 14px;
  padding: 18px clamp(8px, 1.5vw, 20px) 12px;
  overflow: hidden;
}

.epc-is-fullwidth {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.epc-empty {
  border: 1px dashed rgba(21, 26, 34, 0.28);
  border-radius: 12px;
  padding: 14px;
  color: #1f2937;
  background: #ffffff;
}

.epc-stage {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 20px);
}

.epc-btn {
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 10px;
  background: #f1f3f5;
  color: #111827;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.epc-btn:hover {
  transform: scale(1.03);
  border-color: rgba(17, 24, 39, 0.22);
  background: #e5e7eb;
}

.epc-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.epc-side-nav {
  z-index: 3;
}

.epc-book-wrap {
  width: 100%;
  height: var(--epc-height);
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(17, 24, 39, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  perspective: 1200px;
  position: relative;
}

.epc-book {
  width: 100%;
  max-width: min(1700px, 94vw);
  height: 100%;
  margin: 0 auto;
}

.epc-book-turn {
  position: relative;
}

.epc-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-size: 14px;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.72);
  z-index: 4;
}

.epc-is-loading .epc-book-turn {
  opacity: 0.2;
}

.epc-turn-page {
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.2);
  overflow: hidden;
}

.epc-turn-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.epc-book-turn .page-wrapper {
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.18);
}

.epc-book-turn .even,
.epc-book-turn .odd {
  background: #fff;
}

.epc-book-turn .shadow {
  box-shadow: none;
}

.epc-footer {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.epc-toolbar {
  display: inline-flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: #9a9da3;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.2);
}

.epc-tool {
  min-width: 34px;
  min-height: 29px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 0;
  background: #a9acb1;
  color: #111827;
  font-size: 13px;
}

.epc-tool:hover {
  background: #b6bac0;
}

.epc-tool-nav {
  background: #c2c5ca;
}

.epc-toolbar-page {
  min-width: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.36);
  background: #2f3137;
}

.epc-page-indicator {
  font-size: 20px;
  line-height: 1;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.epc-toolbar-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.4);
}

.epc-tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.epc-share {
  letter-spacing: -2px;
  font-size: 10px;
}

.epc-open-pdf {
  display: none;
}

.epc-has-error .epc-book-wrap {
  border-color: #cd8a8a;
  background: #fff3f3;
}

.epc-has-error .epc-page-indicator {
  color: #ffd1d1;
}

@media (max-width: 900px) {
  .epc-catalog {
    padding: 12px;
  }

  .epc-book {
    max-width: 100%;
  }

  .epc-book-wrap {
    height: min(var(--epc-height), 78vh);
  }

  .epc-stage {
    gap: 6px;
  }

  .epc-side-nav {
    min-width: 40px;
    min-height: 40px;
    font-size: 18px;
  }

  .epc-tool {
    min-width: 44px;
    min-height: 44px;
    font-size: 18px;
  }

  .epc-toolbar-page {
    min-width: 94px;
  }

  .epc-page-indicator {
    font-size: 18px;
  }
}
