/*=============================================
=          Brochure: booklet viewer           =
=============================================*/
.br-viewer {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: radial-gradient(circle at 50% 0%, #2d1a66, #0c0720 70%);
  color: #fff;
}

.br-viewer[open] {
  display: flex;
  flex-direction: column;
}

.br-viewer::backdrop {
  background: rgba(12, 7, 32, 0.85);
}

.br-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.br-title {
  font-size: 17px;
  font-weight: 600;
}

.br-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.br-tool {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.br-tool:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.br-tool--text {
  border-color: transparent;
  background: #805dcd;
}

.br-tool--text:hover {
  background: #6340b5;
}

.br-stage {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 20px 24px 8px;
  overflow: hidden;
}

.br-book {
  flex: 0 0 auto;
  margin: 0 auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.45));
}

.br-book .stf__parent,
.br-book .stf__block {
  background: transparent;
}

.br-simple {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
}

.br-loading {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
}

.br-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 10px 24px 4px;
}

.br-arrow {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #6340b5;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.br-arrow:hover:not(:disabled) {
  transform: scale(1.08);
}

.br-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.br-count {
  min-width: 120px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.br-hint {
  margin: 0;
  padding: 0 24px 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  text-align: center;
}

.br-viewer button:focus-visible,
.br-viewer a:focus-visible {
  outline: 3px solid #f9c322;
  outline-offset: 2px;
}

@media (max-width: 575px) {
  .br-bar {
    padding: 10px 14px;
  }

  .br-title {
    font-size: 15px;
  }

  .br-tool--text span {
    display: none;
  }

  .br-stage {
    padding: 14px 10px 6px;
  }

  .br-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .br-tool,
  .br-arrow {
    transition: none;
  }
}
