/* ===== Halaman Buku Menu ===== */
.book-hero { padding: 40px 0 8px; }
.book-hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 8vw, 64px); letter-spacing: -0.03em; }
.book-hero p { color: var(--muted); font-size: 17px; margin-top: 10px; max-width: 560px; }

.branch-rows { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; padding-bottom: 64px; }
.branch-row { display: flex; gap: 18px; align-items: center; background: var(--soft); border-radius: 24px; padding: 16px; }
.row-cover { flex: 0 0 auto; width: 112px; aspect-ratio: 900 / 1273; border-radius: 10px; overflow: hidden; background: #EADCD6; border: 0; padding: 0; position: relative; }
.row-cover img { width: 100%; height: 100%; object-fit: cover; }
.row-cover.is-book { cursor: pointer; box-shadow: 6px 6px 0 -2px #fff, 6px 6px 0 0 var(--field), 0 10px 24px rgba(26,26,26,.18); transition: transform .2s ease; }
.row-cover.is-book:hover { transform: rotate(-2deg) translateY(-2px); }
.is-soon .row-cover img { filter: saturate(.75); }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.row-body h2 { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 4.5vw, 30px); letter-spacing: -0.02em; }
.row-area { color: var(--muted); font-size: 14px; }
.row-meta { font-size: 13px; font-weight: 600; color: var(--green); }
.row-meta.soon { color: var(--muted); font-weight: 500; }
.row-body .btn-row { margin-top: 6px; }
.book-footer { padding-bottom: 40px; }

@media (min-width: 720px) {
  .branch-row { padding: 20px 24px; gap: 28px; }
  .row-cover { width: 150px; }
}
@media (max-width: 420px) {
  .row-cover { width: 92px; }
  .row-body .btn { width: 100%; }
}

/* ===== Pembaca buku ===== */
.reader { position: fixed; inset: 0; z-index: 80; background: radial-gradient(ellipse at center, #3a3532 0%, #151312 75%); color: #fff; display: flex; flex-direction: column; }
.reader[hidden] { display: none; }
.reader-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
.reader-bar strong { font-size: 15px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-count { font-size: 13px; color: #D6D2CE; white-space: nowrap; }
.reader-close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.reader-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; perspective: 2400px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.reader-nav { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
.nav-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.nav-btn:disabled { background: rgba(255,255,255,.14); color: rgba(255,255,255,.4); cursor: default; }
.reader-hint { font-size: 13px; color: #D6D2CE; text-align: center; }

.book { position: relative; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,.7,.2,1); }
.book .leaf { position: absolute; top: 0; left: 0; width: var(--pw); height: 100%; transform-origin: left center; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.45,.05,.2,1); }
.book.spread .leaf { left: 50%; }
.book .leaf.flipped { transform: rotateY(-180deg); }
.book.no-anim, .book.no-anim .leaf { transition: none; }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fbfaf8; overflow: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.face.back { transform: rotateY(180deg); background: #f2efea; }
.face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.leaf.top .face.front, .leaf.top-l .face.back { box-shadow: 0 16px 34px rgba(0,0,0,.4); }
.face.front::after { background: linear-gradient(to right, rgba(0,0,0,.18), rgba(0,0,0,0) 6%); }
.face.back::after { background: linear-gradient(to left, rgba(0,0,0,.18), rgba(0,0,0,0) 6%); }
.book:not(.spread) .face.back { background: #e9e4dd; }

@media (prefers-reduced-motion: reduce) {
  .book, .book .leaf { transition: none; }
}

/* Ringan di HP: lembar yang jauh tidak digambar, gambar halaman tidak bisa dipilih */
.book .leaf.far { display: none; }
.book .leaf.top, .book .leaf.top-l { will-change: transform; }
.face { contain: paint; }
.face img { -webkit-user-drag: none; }
