/* Flipbook Pustaka Gratis - Literasi Publisher */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.fb { background: #2b3040; color: #e6eaf5; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
.fb-app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.fb button { font: inherit; }
.fb svg { display: block; }

/* Bar atas */
.fb-top { flex: none; height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; background: #121845; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); z-index: 5; }
.fb-top__left, .fb-top__right { flex: 1 1 0; display: flex; align-items: center; gap: 12px; min-width: 0; }
.fb-top__right { justify-content: flex-end; gap: 4px; }
.fb-brand { flex: none; display: block; background: #fff; border-radius: 8px; height: 36px; overflow: hidden; }
.fb-brand img { height: 50px; margin: -7px -18px 0 -9px; display: block; }
.fb-title { font-weight: 700; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-tools { flex: none; display: flex; align-items: center; gap: 2px; }
.fb-tools button, .fb-ibtn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; text-decoration: none; transition: background .15s; padding: 0; }
.fb-tools button:hover, .fb-ibtn:hover { background: rgba(255, 255, 255, .12); }
.fb-tools button.is-on { background: #c9a063; color: #121845; }
.fb-sep { width: 1px; height: 24px; background: rgba(255, 255, 255, .25); margin: 0 6px; }
.fb-page { display: flex; align-items: center; gap: 4px; margin: 0 6px; font-size: 14px; font-weight: 700; color: #cfd6ee; }
.fb-page input { width: 52px; height: 30px; border: 0; border-radius: 6px; background: #e9edf7; color: #121845; text-align: center; font: 700 14px inherit; font-family: inherit; outline: 0; }
.fb-page input:focus { box-shadow: 0 0 0 2px #c9a063; }

/* Panggung buku */
.fb-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, #3a4056 0%, #2b3040 60%, #22263a 100%); }
.fb-stage.is-zoomed { overflow: auto; cursor: grab; display: block; }
.fb-stage.is-zoomed.is-dragging { cursor: grabbing; }
.fb-holder { position: relative; flex: none; width: var(--bw, 600px); height: var(--bh, 420px); margin: auto; transition: opacity .4s; opacity: 0; }
.fb-holder.is-ready { opacity: 1; }
.fb-stage.is-zoomed .fb-holder { margin: 30px auto; }
.fb-stage.is-zoomed .fb-book { pointer-events: none; }
.fb-book { width: 100%; height: 100%; }
.fb-pg { background: #fff; overflow: hidden; }
.fb-pg canvas { width: 100%; height: 100%; display: block; }
.fb-pg__ph { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa3bf; font-size: 13px; background: #f4f6fb; }
.fb-pg.is-done .fb-pg__ph { display: none; }
.stf__parent { margin: 0 auto; }
.stf__wrapper { box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7); }

.fb-side { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; display: grid; place-items: center; width: 48px; height: 96px; border: 0; background: transparent; color: rgba(255, 255, 255, .55); cursor: pointer; border-radius: 10px; transition: color .15s, background .15s; padding: 0; }
.fb-side:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.fb-side--prev { left: 8px; }
.fb-side--next { right: 8px; }
.fb-side[disabled] { opacity: .2; cursor: default; }

.fb-loading { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #cfd6ee; font-weight: 600; background: inherit; }
.fb-loading p { margin: 0; }
.fb-loading__book { display: flex; gap: 6px; }
.fb-loading__book span { width: 14px; height: 40px; border-radius: 3px; background: #c9a063; animation: fb-bounce 1s ease-in-out infinite; }
.fb-loading__book span:nth-child(2) { animation-delay: .15s; background: #3a8fd0; }
.fb-loading__book span:nth-child(3) { animation-delay: .3s; background: #e6eaf5; }
@keyframes fb-bounce { 0%, 100% { transform: scaleY(.5); opacity: .6; } 50% { transform: scaleY(1); opacity: 1; } }
.fb-loading.is-hidden { display: none; }
.fb-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3; padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 13px; pointer-events: none; opacity: 0; transition: opacity .4s; white-space: nowrap; }
.fb-hint.is-on { opacity: 1; }
.fb-frame { width: 100%; height: 100%; border: 0; background: #fff; }

/* Thumbnail */
.fb-thumbs { flex: none; background: #1a1f3a; border-top: 1px solid rgba(255, 255, 255, .08); }
.fb-thumbs__list { display: flex; gap: 12px; overflow-x: auto; padding: 14px; scrollbar-width: thin; }
.fb-th { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; color: #aab3d0; cursor: pointer; font-size: 12px; font-weight: 700; padding: 0; }
.fb-th canvas { width: 78px; height: auto; min-height: 60px; background: #e9edf7; border-radius: 3px; border: 2px solid transparent; display: block; }
.fb-th.is-cur canvas { border-color: #c9a063; }
.fb-th.is-cur { color: #fff; }

/* Bar bawah */
.fb-bottom { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; background: #121845; border-top: 1px solid rgba(255, 255, 255, .06); }
.fb-bottom__right { display: flex; align-items: center; }
.fb-tbtn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #dfe5f7; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; }
.fb-tbtn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.fb-tbtn.is-on { color: #c9a063; }
.fb-bottom__right .fb-tbtn + .fb-tbtn { border-left: 1px solid rgba(255, 255, 255, .12); border-radius: 0 8px 8px 0; }

@media (max-width: 860px) {
	.fb-title { display: none; }
	.fb-tools button[data-a="first"], .fb-tools button[data-a="last"] { display: none; }
}
@media (max-width: 560px) {
	.fb-top { padding: 0 8px; gap: 6px; }
	.fb-brand { display: none; }
	.fb-tools [data-a="zoom"], .fb-tools .fb-sep { display: none; }
	.fb-tools button, .fb-ibtn { width: 34px; height: 34px; }
	.fb-page input { width: 42px; }
	.fb-side { width: 34px; height: 70px; }
	.fb-side--prev { left: 0; }
	.fb-side--next { right: 0; }
	.fb-tbtn span { display: none; }
	.fb-tbtn { padding: 0 10px; }
}
