/* 3D flip-book reader */
.sy-fb-lock, .sy-fb-lock body { overflow: hidden !important; }
.sy-fb { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 35%, #1b3a8f 0%, #0a1a44 55%, #050d24 100%); color: #fff; opacity: 0; transition: opacity .3s ease; }
.sy-fb.is-open { opacity: 1; }
.sy-fb-top { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: rgba(0,0,0,.18); }
.sy-fb-title { flex: 1; min-width: 0; font: 700 16px/1.2 var(--sy-head, system-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sy-fb-count { font-size: 13px; opacity: .85; white-space: nowrap; }
.sy-fb-buy { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border: 0; border-radius: 999px; background: #fff; color: #0a1a44; font: 700 13px/1.2 var(--sy-head, system-ui); cursor: pointer; white-space: nowrap; }
.sy-fb-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.sy-fb-close:hover { background: rgba(255,255,255,.26); }
.sy-fb-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; perspective: 2600px; overflow: hidden; }
.sy-fb-wrap { position: relative; }
.sy-fb-wrap.is-single { overflow: visible; }
.sy-fb-book { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.22,1,.36,1); }
.sy-fb-book::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: -18px; height: 30px; background: radial-gradient(ellipse at center, rgba(0,0,0,.55), transparent 70%); filter: blur(4px); }
.sy-fb-leaf { position: absolute; top: 0; height: 100%; transform-origin: left center; transform-style: preserve-3d; transition: transform .85s cubic-bezier(.45,.05,.25,1); cursor: pointer; }
.sy-fb-leaf.is-flipped { transform: rotateY(-180deg); }
.sy-fb-face { position: absolute; inset: 0; overflow: hidden; background: #fbfaf7; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.sy-fb-face.is-back { transform: rotateY(180deg); }
.sy-fb-face img, .sy-fb-face canvas { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.sy-fb-face canvas { object-fit: contain; background: #fff; }
/* Spine shading */
.sy-fb-face::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12%; pointer-events: none; }
.sy-fb-face.is-front::after { left: 0; background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(0,0,0,0)); }
.sy-fb-face.is-back::after { right: 0; background: linear-gradient(270deg, rgba(0,0,0,.22), rgba(0,0,0,0)); }
.sy-fb-wrap.is-single .sy-fb-face.is-back { background: #efece4; }
.sy-fb-leaf.is-turning .sy-fb-face::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.35) 60%, rgba(0,0,0,.18) 100%); animation: sy-fb-gloss .85s ease; }
@keyframes sy-fb-gloss { from { opacity: 0; } 50% { opacity: 1; } to { opacity: 0; } }
.sy-fb-face.is-blank { background: linear-gradient(135deg, #f4f1ea, #e8e3d8); }
.sy-fb-face.is-loading::before { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; border: 3px solid #d6dbe8; border-top-color: #2f6bff; animation: sy-fb-spin 1s linear infinite; }
@keyframes sy-fb-spin { to { transform: rotate(360deg); } }
.sy-fb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; transition: background .2s; }
.sy-fb-nav:hover { background: rgba(255,255,255,.28); }
.sy-fb-nav:disabled { opacity: .25; cursor: default; }
.sy-fb-nav.is-prev { left: 16px; }
.sy-fb-nav.is-next { right: 16px; }
.sy-fb-hint { text-align: center; font-size: 13px; opacity: .7; padding: 6px 12px 14px; }
.sy-fb-busy { position: fixed; inset: 0; z-index: 100001; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(5,13,36,.75); color: #fff; font-weight: 600; }
.sy-fb-busy span { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255,255,255,.25); border-top-color: #fff; animation: sy-fb-spin 1s linear infinite; }
@media (max-width: 600px) {
	.sy-fb-nav { width: 40px; height: 40px; font-size: 26px; background: rgba(0,0,0,.35); }
	.sy-fb-nav.is-prev { left: 6px; } .sy-fb-nav.is-next { right: 6px; }
	.sy-fb-buy { padding: 7px 12px; font-size: 12px; }
	.sy-fb-count { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sy-fb-leaf, .sy-fb-book { transition-duration: .01s; } }
.sy-fb-face img.is-half { width: 200%; max-width: none; object-fit: cover; }
.sy-fb-face img.is-half-2 { margin-left: -100%; }
/* Arrows always above the pages, and visible on white pages too */
.sy-fb-wrap { z-index: 1; }
.sy-fb-nav { z-index: 1200; background: rgba(10,26,68,.82); box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 8px 22px rgba(0,0,0,.45); }
.sy-fb-nav:hover { background: #2f6bff; }
.sy-fb-nav:disabled { opacity: .35; }
@media (max-width: 600px) {
	.sy-fb-nav { width: 42px; height: 42px; background: rgba(10,26,68,.85); }
	.sy-fb-nav.is-prev { left: 8px; } .sy-fb-nav.is-next { right: 8px; }
}
