.fpo-wrapper {
  --fpo-bg: #ece8df;
  --fpo-paper: #ffffff;
  --fpo-ink: #1f1c17;
  --fpo-muted: #6f695f;
  --fpo-accent: #2f6f52;
  --fpo-shadow: 0 20px 50px rgba(44, 37, 27, 0.18);

  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
  color: var(--fpo-ink);
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
}

.fpo-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.fpo-header h2 {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.fpo-header p {
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fpo-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.fpo-book {
  position: relative;
  border-radius: 18px;
  padding: 2rem 1.25rem 4.5rem;
}

.fpo-rings {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: clamp(1.25rem, 8vw, 5rem);
  pointer-events: none;
  z-index: 99;
}

.fpo-rings span {
  position: relative;
  width: 10px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d5d0c6 0%, #a39a8c 50%, #d5d0c6 100%);
  box-shadow: inset 0 0 0 1px rgba(57, 49, 41, 0.25);
}

.fpo-rings span::before,
.fpo-rings span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: #dbd7d0;
  border: 1px solid rgba(96, 88, 76, 0.35);
}

.fpo-rings span::before {
  top: -10px;
}

.fpo-rings span::after {
  bottom: -10px;
}


.fpo-pages {
  position: relative;
  height: clamp(480px, 68vh, 620px);
}

.fpo-page {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--fpo-paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(34, 30, 24, 0.16);

  opacity: 0;
  transform: rotateX(-75deg) translateY(22px);
  transform-origin: top center;
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}

.fpo-page.is-active {
  opacity: 1;
  transform: rotateX(0deg) translateY(0);
  pointer-events: auto;
  z-index: 5;
}

.fpo-page-media {
  position: relative;
  min-height: 220px;
  background: #d9d5cc;
}

.fpo-page-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fpo-page-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fpo-muted);
  font-weight: 600;
  background: repeating-linear-gradient(
    -45deg,
    #ebe6db,
    #ebe6db 14px,
    #e0dacd 14px,
    #e0dacd 28px
  );
}

.fpo-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.88);
  color: #595246;
  font-weight: 700;
}

.fpo-page-content {
  padding: 1.25rem 1.35rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.fpo-page-content h3 {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  line-height: 1.14;
}

.fpo-page-content p {
  margin: 0;
  color: var(--fpo-muted);
  line-height: 1.6;
}

.fpo-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.fpo-points li {
  display: flex;
  gap: 0.55rem;
  line-height: 1.45;
  color: #1B4D3EDE;
}

.fpo-points li::before {
  content: "\2713";
  color: #1B4D3EDE;
  font-weight: 700;
}

.fpo-button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  border: 1px solid #d2ccc0;
  color: #ffff !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background-color: #1B4D3E;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fpo-button::after {
  content: "\2197";
}

.fpo-button:hover,
.fpo-button:focus-visible {
  background: #1B4D3EDE;
  border-color: #1B4D3EDE;
  color: #fff;
}

.fpo-page-count {
  margin-top: auto;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #9d9689;
}

.fpo-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.fpo-control {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #ffffff;
  color: #2b261f;
  box-shadow: 0 8px 18px rgba(44, 37, 27, 0.2);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.fpo-control:hover:not(:disabled),
.fpo-control:focus-visible:not(:disabled) {
  background: #2b261f;
  color: #fff;
}

.fpo-control:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.fpo-dots {
  display: flex;
  gap: 0.35rem;
}

.fpo-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 0;
  background: #9a9284;
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.fpo-dot.is-active {
  width: 30px;
  background: #2b261f;
}

@media (min-width: 860px) {
  .fpo-page {
    grid-template-columns: 1fr 1fr;
  }

  .fpo-page-media {
    min-height: auto;
  }

  .fpo-page-content {
    padding: 2rem;
  }
}

@media (max-width: 600px) {
  .fpo-book {
    padding: 1.6rem 0.8rem 4.1rem;
  }

  .fpo-page-content {
    padding: 1rem;
  }
}
