/* Flipbook viewer — made with Flipbook Studio */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--bartext);
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
#fb-app { position: fixed; inset: 0; display: flex; flex-direction: column; }

/* top line */
#fb-top {
  height: 44px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 16px;
  color: var(--bartext); background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0));
}
#fb-logo { font-weight: 700; color: var(--accent); text-decoration: none; letter-spacing: .3px; display: inline-flex; align-items: center; gap: 8px; }
#fb-logo img { display: block; width: auto; max-width: 40vw; object-fit: contain; }
#fb-top.fb-logo-right { flex-direction: row-reverse; justify-content: space-between; }
#fb-app.fb-bar-top #fb-top { order: -2; }
#fb-app.fb-bar-top #fb-bar { order: -1; box-shadow: 0 2px 12px rgba(0,0,0,.3); }
#fb-app.fb-no-arrows .fb-nav { display: none; }
#fb-logo:empty { display: none; }
#fb-title { font-size: 15px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* stage + book */
#fb-stage { position: relative; flex: 1; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#fb-zoomer { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform .35s ease; }
#fb-zoomer.fb-dragging { transition: none; }
#fb-book { position: absolute; perspective: 2600px; transition: transform .5s ease; }
.fb-leaf {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  transform-origin: left center; transform-style: preserve-3d;
  transition: transform var(--flip-ms) cubic-bezier(.45,.05,.35,1);
  cursor: pointer;
}
.fb-rtl .fb-leaf { left: 0; transform-origin: right center; }
.fb-leaf.fb-instant { transition: none; }
.fb-face {
  position: absolute; inset: 0; background: #fff; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.fb-face img { width: 100%; height: 100%; display: block; object-fit: fill; pointer-events: none; -webkit-user-drag: none; }
.fb-back { transform: rotateY(180deg); }
.fb-face.fb-empty { background: transparent; }
.fb-shadow .fb-face:not(.fb-empty) { box-shadow: 0 2px 6px rgba(0,0,0,calc(var(--shadow) * .25)), 0 10px 30px rgba(0,0,0,calc(var(--shadow) * .45)); }
.fb-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.fb-front::after { background: linear-gradient(90deg, rgba(0,0,0,var(--spine)), rgba(0,0,0,calc(var(--spine) * .3)) 3%, rgba(0,0,0,0) 9%); }
.fb-back::after { background: linear-gradient(270deg, rgba(0,0,0,var(--spine)), rgba(0,0,0,calc(var(--spine) * .3)) 3%, rgba(0,0,0,0) 9%); }
.fb-rtl .fb-front::after { background: linear-gradient(270deg, rgba(0,0,0,var(--spine)), rgba(0,0,0,0) 9%); }
.fb-rtl .fb-back::after { background: linear-gradient(90deg, rgba(0,0,0,var(--spine)), rgba(0,0,0,0) 9%); }
.fb-single .fb-face::after { background: none; }
.fb-empty::after { display: none; }
.fb-hard .fb-face { border: 3px solid rgba(0,0,0,.25); border-radius: 2px; }
.fb-leaf.fb-turning .fb-face::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.18) 60%, rgba(0,0,0,.12));
  animation: fb-gloss var(--flip-ms) ease;
}
@keyframes fb-gloss { 0% { opacity: 0 } 50% { opacity: 1 } 100% { opacity: 0 } }
.fb-link { position: absolute; z-index: 3; display: block; border-radius: 2px; background: transparent; transition: background .15s; }
.fb-link:hover { background: rgba(255, 210, 0, .28); outline: 1px solid rgba(255, 170, 0, .6); }
.fb-face .fb-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #aab; font-size: 13px; }

.fb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 72px; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(0,0,0,.25); color: #fff; font-size: 34px; line-height: 1; opacity: .7;
}
.fb-nav:hover { opacity: 1; background: var(--accent); }
.fb-nav[disabled] { opacity: 0; pointer-events: none; }
#fb-prev { left: 12px; } #fb-next { right: 12px; }

/* toolbar */
#fb-bar {
  flex: none; min-height: 52px; display: flex; align-items: center; gap: 4px; padding: 6px 10px;
  background: var(--bar); color: var(--bartext); box-shadow: 0 -2px 12px rgba(0,0,0,.3); z-index: 20;
}
#fb-bar .fb-group { display: flex; align-items: center; gap: 2px; }
#fb-bar .fb-spacer { flex: 1; }
.fb-btn {
  width: calc(var(--icon, 21px) + 17px); height: calc(var(--icon, 21px) + 17px); border: 0; background: transparent; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; opacity: .88;
}
.fb-btn svg { width: var(--icon, 21px); height: var(--icon, 21px); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fb-btn:hover { background: rgba(255,255,255,.12); opacity: 1; }
.fb-btn.fb-on { color: var(--accent); opacity: 1; }
.fb-btn[disabled] { opacity: .3; cursor: default; background: transparent; }
#fb-pagebox {
  min-width: 96px; height: 34px; padding: 0 10px; border-radius: 17px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.07); text-align: center; font-size: 14px; color: inherit; outline: none;
}
#fb-pagebox:focus { border-color: var(--accent); }

/* side panel */
#fb-panel {
  position: absolute; left: 0; top: 44px; bottom: 52px; /* set exactly by the script */ width: 330px; max-width: 88vw; z-index: 30;
  background: rgba(22,24,30,.97); color: #e9ecf2; box-shadow: 6px 0 24px rgba(0,0,0,.4);
  transform: translateX(-105%); transition: transform .28s ease; display: flex; flex-direction: column;
}
#fb-panel.fb-open { transform: none; }
.fb-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 600; }
.fb-panel-head button { border: 0; background: transparent; font-size: 24px; cursor: pointer; color: inherit; }
#fb-panel-body { flex: 1; overflow: auto; padding: 10px 12px 20px; }
.fb-toc a { display: block; padding: 8px 8px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.fb-toc a:hover { background: rgba(255,255,255,.08); color: var(--accent); }
.fb-toc a span:last-child { opacity: .55; font-size: 12px; }
.fb-toc .fb-l1 { padding-left: 24px; font-size: 13px; }
.fb-toc .fb-l2 { padding-left: 40px; font-size: 13px; opacity: .85; }
.fb-thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fb-thumbs a { display: block; text-align: center; color: inherit; text-decoration: none; font-size: 12px; opacity: .85; }
.fb-thumbs img { width: 100%; display: block; background: #fff; border: 2px solid transparent; border-radius: 3px; margin-bottom: 4px; }
.fb-thumbs a.fb-cur img { border-color: var(--accent); }
.fb-thumbs a:hover { opacity: 1; }
.fb-search input {
  width: 100%; height: 38px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: inherit; padding: 0 12px; font-size: 15px; outline: none;
}
.fb-search input:focus { border-color: var(--accent); }
.fb-search .fb-count { font-size: 12px; opacity: .6; margin: 10px 2px; }
.fb-result { display: block; padding: 9px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1.4; border-bottom: 1px solid rgba(255,255,255,.05); }
.fb-result:hover { background: rgba(255,255,255,.07); }
.fb-result b { color: var(--accent); font-weight: 600; display: block; font-size: 12px; margin-bottom: 2px; }
.fb-result mark { background: var(--accent); color: #111; border-radius: 2px; padding: 0 1px; }
.fb-share a, .fb-share button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; margin-bottom: 6px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: inherit; text-decoration: none; cursor: pointer; font-size: 14px;
}
.fb-share a:hover, .fb-share button:hover { border-color: var(--accent); }
.fb-share textarea { width: 100%; height: 86px; background: rgba(255,255,255,.05); color: inherit; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 8px; font-size: 12px; }
.fb-share h4 { margin: 16px 0 6px; font-size: 13px; opacity: .7; font-weight: 500; }

#fb-toast {
  position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: rgba(0,0,0,.8); color: #fff; padding: 8px 16px; border-radius: 18px; font-size: 13px; z-index: 50;
  transition: all .25s ease; pointer-events: none;
}
#fb-toast.fb-show { opacity: 1; transform: translateX(-50%); }
#fb-loader { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 60; transition: opacity .4s; }
#fb-loader div { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--accent); animation: fb-spin 1s linear infinite; }
@keyframes fb-spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  #fb-bar { gap: 0; padding: 4px; overflow-x: auto; }
  .fb-btn { width: 34px; }
  .fb-hide-small { display: none !important; }
  .fb-nav { width: 34px; height: 56px; font-size: 26px; }
  #fb-panel { width: 100%; max-width: 100%; }
}
@media print { #fb-app { display: none; } }
/* quick taps on buttons and pages turn pages; they never zoom the page on phones */
.fb-nav, .fb-btn, #fb-bar, #fb-panel { touch-action: manipulation; }

/* clickable pictures, videos and links drawn on pages */
.fb-hot { position: absolute; z-index: 4; display: block; padding: 0; margin: 0; border: 0; border-radius: 3px; background: transparent; cursor: pointer; overflow: hidden; }
.fb-hot:hover { background: rgba(255, 210, 0, .18); outline: 2px solid var(--accent); }
.fb-hot-badge { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; pointer-events: none; animation: fb-pulse 2.4s ease-in-out infinite; }
.fb-hot-badge svg { width: 100%; height: 100%; display: block; }
@keyframes fb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.fb-hot-playing { background: #000; outline: none; cursor: default; }
.fb-hot-playing video, .fb-hot-playing iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }

/* pop-up for pictures and videos */
.fb-modal { position: fixed; inset: 0; z-index: 100; background: rgba(8, 10, 14, .86); display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; animation: fb-fade .2s ease; }
@keyframes fb-fade { from { opacity: 0; } to { opacity: 1; } }
.fb-modal-box { position: relative; width: min(1100px, 92vw); aspect-ratio: 16 / 9; max-height: 86vh; background: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.fb-modal-box iframe, .fb-modal-box video { width: 100%; height: 100%; border: 0; display: block; }
.fb-modal-box.fb-modal-img { width: auto; aspect-ratio: auto; background: transparent; box-shadow: none; }
.fb-modal-img img { display: block; max-width: 92vw; max-height: 84vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.fb-modal-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; color: #fff; font-size: 14px; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.fb-modal-x { position: fixed; top: 14px; right: 18px; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.fb-modal-x:hover { background: var(--accent); }

/* language menu */
.fb-langs { position: relative; margin-left: auto; }
#fb-top.fb-logo-right .fb-langs { margin-left: 0; margin-right: auto; }
.fb-lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid currentColor; background: transparent; cursor: pointer; font-size: 13px; opacity: .85; }
.fb-lang-btn:hover { opacity: 1; color: var(--accent); }
.fb-lang-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.fb-lang-menu { display: none; position: absolute; right: 0; top: 36px; min-width: 160px; background: rgba(22,24,30,.97); border-radius: 8px; padding: 6px; z-index: 40; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.fb-langs.fb-open .fb-lang-menu { display: block; }
.fb-lang-menu a { display: block; padding: 8px 10px; border-radius: 6px; color: #e9ecf2; text-decoration: none; font-size: 14px; }
.fb-lang-menu a:hover { background: rgba(255,255,255,.08); color: var(--accent); }
.fb-lang-menu a.fb-cur { color: var(--accent); font-weight: 600; }

/* statistics consent */
.fb-consent { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 90; width: min(560px, 92vw); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 10px; background: rgba(20,22,28,.97); color: #e9ecf2; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.fb-consent span { flex: 1 1 260px; line-height: 1.4; }
.fb-consent button { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit; cursor: pointer; }
.fb-consent .fb-yes { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
