/* Flipbook Archive CSS - Multi-Page Version */
.anagura-archive {
  --body-bg: #6b5847 url(http://itako999.com/blog/bg/) repeat;
  --page-bg: #f5f5f5;
  --page-bg-image: url(https://itako999.com/blog/bg_paper_mid/);
  --dark-text: #2a2935;
  --baseline: 12px;
  --base-size: calc(var(--baseline) * 1.2);
  --title: ui-serif, Georgia, serif;
}

.anagura-flipbook {
  background: var(--body-bg);
  padding: 60px 16px;
  perspective: 2000px;
}

.anagura-flipbook .book {
  width: min(960px, 96vw);
  aspect-ratio: 60 / 45;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

/* Static Base (The Book's "Table" or Backing) */
.book__base-left, .book__base-right {
  position: absolute;
  width: 50%;
  height: 100%;
  background-color: var(--page-bg);
  background-image: var(--page-bg-image);
  background-size: cover;
}
.book__base-left { left: 0; border-radius: 4px 0 0 4px; }
.book__base-right { right: 0; border-radius: 0 4px 4px 0; }

/* The Leaf Logic */
.leaf {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), z-index 0s 0.4s;
  transform-style: preserve-3d;
  cursor: pointer;
  z-index: var(--z-initial);
}

/* When the checkbox is checked, flip the leaf and update Z-index */
.leaf__toggle:checked + .leaf {
  transform: rotateY(-180deg);
  z-index: var(--z-flipped);
}

.leaf__front, .leaf__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background-color: var(--page-bg);
  background-image: var(--page-bg-image);
  background-size: cover;
  box-shadow: inset 0 0 100px rgba(0,0,0,0.05);
}

/* The shadow in the fold */
.leaf__front::after {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 40px;
  background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
}
.leaf__back::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 40px;
  background: linear-gradient(to left, rgba(0,0,0,0.15), transparent);
}

.leaf__back {
  transform: rotateY(180deg);
}

/* Content Typography (Inherited from your original) */
.page__content {
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.page__content-title { font-family: var(--title); font-size: 1.5rem; margin-top: 20px; }
.page__content-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.page__content-table td { padding: 8px; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 0.9rem; }

/* Mobile Fallback */
@media (max-width: 900px) {
  .anagura-flipbook .book { display: flex; flex-direction: column; aspect-ratio: auto; height: auto; }
  .book__base-left, .book__base-right, .leaf { position: relative; width: 100%; transform: none !important; right: auto; left: auto; }
  .leaf__back { transform: none; }
  .leaf__toggle, .leaf__back { display: none; } /* Show only front of pages on mobile */
}