/* Flipbook viewer, cover cards and dialog. Loaded wherever a flipbook is shown (front end and the Flipbooks manager). */
.cc-fb { border: 1px solid var(--cc-line, #d8e1ea); border-radius: var(--cc-radius, 10px); background: #232a35; overflow: hidden; margin: 1rem 0; }
.cc-fb__bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; padding: .6rem .85rem; background: #fff; border-bottom: 1px solid var(--cc-line, #d8e1ea); }
.cc-fb__title { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--cc-navy-ink, #002b50); }
.cc-fb__controls, .cc-fb__zoom { display: flex; gap: .35rem; align-items: center; }
.cc-fb__btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--cc-line, #d8e1ea); background: #fff; color: var(--cc-ink, #232323) !important; cursor: pointer; text-decoration: none; padding: 0; }
.cc-fb__btn:hover:not([disabled]) { border-color: var(--cc-navy, #00427a); color: var(--cc-navy, #00427a) !important; }
.cc-fb__btn[disabled] { opacity: .4; cursor: default; }
.cc-fb__btn[hidden] { display: none; }
.cc-fb__page { min-width: 11ch; text-align: center; font-size: .88rem; color: var(--cc-muted, #5b6573); }
.cc-fb__zoomlevel { min-width: 4.4ch; padding: .3rem .2rem; border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 600; color: var(--cc-muted, #5b6573); cursor: pointer; border-radius: 6px; }
.cc-fb__sep { width: 1px; height: 24px; background: var(--cc-line, #d8e1ea); margin: 0 .3rem; }
.cc-fb__stage { position: relative; display: flex; justify-content: safe center; align-items: safe center; min-height: 420px; padding: 1.25rem; perspective: 2400px; outline: none; overflow: auto; }
.cc-fb__stage:focus-visible { outline: 3px solid var(--cc-orange, #f18020); outline-offset: -3px; }
.cc-fb__spread { display: flex; position: relative; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transform-style: preserve-3d; }
.cc-fb__spread canvas { display: block; background: #fff; max-width: none; }
.cc-fb__spread.is-double::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; transform: translateX(-50%); background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,.18), rgba(0,0,0,0)); pointer-events: none; }
.cc-fb__leaf { position: absolute; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,.1,.2,1); z-index: 5; }
.cc-fb__leaf canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; backface-visibility: hidden; }
.cc-fb__leaf canvas.is-back { transform: rotateY(180deg); }
.cc-fb__loading { color: #e5e7eb; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; justify-content: center; text-align: center; }
.cc-fb__loading a { color: #fff; text-decoration: underline; }
.cc-fb__spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: cc-spin 1s linear infinite; }
@keyframes cc-spin { to { transform: rotate(360deg); } }
.cc-fb.is-zoomed .cc-fb__stage { max-height: 80vh; cursor: grab; }
.cc-fb:fullscreen, .cc-fb.is-fullscreen { display: flex; flex-direction: column; border-radius: 0; height: 100%; margin: 0; }
.cc-fb:fullscreen .cc-fb__stage, .cc-fb.is-fullscreen .cc-fb__stage { flex: 1; max-height: none; min-height: 0; }
.cc-fb.is-expanded { position: fixed; inset: 0; z-index: 100000; width: 100vw; height: 100dvh; margin: 0 !important; border: 0; }
html.cc-fb-locked, html.cc-fb-locked body { overflow: hidden; }
@media (max-width: 640px) {
	.cc-fb__bar { justify-content: center; }
	.cc-fb__title { width: 100%; text-align: center; }
	.cc-fb__controls { flex-wrap: wrap; justify-content: center; }
	.cc-fb__sep { display: none; }
	.cc-fb__stage { min-height: 300px; padding: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .cc-fb__leaf, .cc-book__cover { transition: none !important; } .cc-fb__spinner { animation-duration: 3s; } }

.cc-books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 0 0 var(--cc-gap, 24px); }
@media (min-width: 900px) { .cc-books { grid-template-columns: repeat(var(--cc-cols, 4), minmax(0, 1fr)); } }
.cc-book__open { display: grid; gap: .4rem; text-decoration: none; color: inherit; }
.cc-book__cover { display: block; aspect-ratio: 3 / 4; border-radius: 6px 12px 12px 6px; overflow: hidden; background: var(--cc-tint, #eaf1f8); box-shadow: 0 10px 24px rgba(16, 24, 40, .16), inset 6px 0 0 rgba(0,0,0,.06); transition: transform .2s; }
.cc-book__cover img, .cc-book__cover canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-book__cover--wide { position: relative; isolation: isolate; display: grid; place-items: center; background: var(--cc-navy-ink, #002b50); }
.cc-book__cover--wide::before { content: ""; position: absolute; inset: -24px; z-index: -1; background: var(--cc-cover) center / cover no-repeat; filter: blur(18px) saturate(1.15) brightness(.8); }
.cc-book__cover--wide canvas { height: auto; object-fit: contain; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.cc-book__open:hover .cc-book__cover,.cc-book__open:focus-visible .cc-book__cover { transform: translateY(-3px) rotate(-1deg); }
.cc-book__open:focus-visible { outline: 3px solid var(--cc-orange, #f18020); outline-offset: 4px; border-radius: 8px; }
.cc-book__title { font-size: 1rem; font-weight: 700; margin: .2rem 0 0; color: var(--cc-navy-ink, #002b50); line-height: 1.3; }
.cc-book__meta, .cc-book__desc { font-size: .85rem; color: var(--cc-muted, #5b6573); }
.cc-book__cta { color: var(--cc-navy, #00427a); font-weight: 700; font-size: .9rem; }
.cc-fbdialog { width: min(1200px, 96vw); max-height: 94vh; padding: 0; border: 0; border-radius: 14px; background: transparent; }
.cc-fbdialog::backdrop { background: rgba(15, 18, 26, .78); }
.cc-fbdialog .cc-fb { margin: 0; }
.cc-fbdialog .cc-fb__stage { height: 75vh; min-height: 0; }
.cc-fbdialog .cc-fb:fullscreen .cc-fb__stage, .cc-fbdialog .cc-fb.is-expanded .cc-fb__stage { height: auto; }
