/* HBS Flipbooks viewer. Every rule is scoped to .hbsfb so the theme and the flipbook leave each other alone. */
.hbsfb{
  --fb-table:#e3e1d8; --fb-table2:#d5d3c8; --fb-panel:#f3f2ec; --fb-ink:#1c251f; --fb-muted:#5a645c; --fb-line:#c2c1b3;
  --fb-accent:#2c5a43; --fb-accent-ink:#fff; --fb-paper:#fbfaf4; --fb-cast:rgba(28,37,31,.34);
  position:relative; display:flex; flex-direction:column; box-sizing:border-box; width:100%; height:clamp(440px,80vh,920px);
  background:var(--fb-table); color:var(--fb-ink); font-size:14px; line-height:1.4; overflow:hidden; text-align:left; isolation:isolate;
}
.hbsfb.hbsfb--dark{ --fb-table:#151a17; --fb-table2:#1c2420; --fb-panel:#1f2723; --fb-ink:#e8ebe4; --fb-muted:#98a49b; --fb-line:#323c36; --fb-accent:#8ec3a2; --fb-accent-ink:#0f1f18; --fb-cast:rgba(0,0,0,.6); }
.hbsfb *, .hbsfb *::before, .hbsfb *::after{ box-sizing:border-box; }
.hbsfb:focus{ outline:none; }
.hbsfb:focus-visible{ outline:2px solid var(--fb-accent); outline-offset:2px; }
.hbsfb:fullscreen{ height:100% !important; width:100%; }
.hbsfb:-webkit-full-screen{ height:100% !important; width:100%; }
.hbsfb [hidden]{ display:none !important; }

/* before the script runs, and if it never does */
.hbsfb:not(.hbsfb--on){ height:auto; background:none; }
.hbsfb-fallback img{ display:block; max-width:min(100%,640px); height:auto; margin:0 auto; }
.hbsfb-fallback p{ text-align:center; margin:12px 0 0; }

.hbsfb-stage{ flex:1 1 auto; min-height:0; position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(ellipse 80% 70% at 50% 45%,var(--fb-table2),var(--fb-table) 75%); touch-action:pan-y; -webkit-user-select:none; user-select:none; }
.hbsfb-hint{ position:absolute; left:0; right:0; bottom:8px; text-align:center; font-size:12.5px; color:var(--fb-muted); pointer-events:none; transition:opacity .6s; padding:0 12px; }

.hbsfb-ctl{ flex:none; display:flex; align-items:center; justify-content:center; gap:8px; padding:9px 12px 11px; flex-wrap:wrap; border-top:1px solid var(--fb-line); background:var(--fb-table); margin:0; }
.hbsfb .hbsfb-btn{ all:unset; box-sizing:border-box; display:inline-flex; align-items:center; gap:6px; border:1px solid var(--fb-line) !important; background:var(--fb-panel) !important; color:var(--fb-ink) !important;
  border-radius:999px !important; padding:6px 14px !important; font:inherit; font-size:13.5px !important; line-height:1.3 !important; cursor:pointer; white-space:nowrap; text-decoration:none !important; letter-spacing:0 !important; text-transform:none !important; box-shadow:none !important; }
.hbsfb .hbsfb-btn:hover{ border-color:var(--fb-muted) !important; }
.hbsfb .hbsfb-btn:focus-visible{ outline:2px solid var(--fb-accent); outline-offset:2px; }
.hbsfb .hbsfb-btn.hbsfb-primary{ background:var(--fb-accent) !important; color:var(--fb-accent-ink) !important; border-color:var(--fb-accent) !important; font-weight:600; }
.hbsfb .hbsfb-btn:disabled{ opacity:.4; cursor:default; }
.hbsfb .hbsfb-btn.hbsfb-icon{ padding:6px 11px !important; }
.hbsfb-where{ font-size:12px; color:var(--fb-muted); min-width:128px; text-align:center; font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.hbsfb .hbsfb-range{ width:min(32vw,260px); accent-color:var(--fb-accent); margin:0; padding:0; background:none; border:0; box-shadow:none; height:auto; }
.hbsfb-dots{ display:inline-flex; gap:6px; align-items:center; }
.hbsfb-dots i{ width:7px; height:7px; border-radius:50%; border:1px solid var(--fb-muted); display:block; }
.hbsfb-dots i.on{ background:var(--fb-accent); border-color:var(--fb-accent); }

/* bound publication */
.hbsfb-shift{ position:relative; flex:none; transition:transform .75s cubic-bezier(.3,.1,.2,1); }
.hbsfb-bookshadow{ position:absolute; top:1.5%; bottom:-2.5%; left:0; right:0; background:var(--fb-cast); filter:blur(26px); opacity:.6; border-radius:8px; pointer-events:none;
  transition:left .7s .3s cubic-bezier(.3,.1,.2,1),right .7s .3s cubic-bezier(.3,.1,.2,1); }
.hbsfb .stf__parent{ position:relative; display:block; transform:translateZ(0); touch-action:pan-y; }
.hbsfb .stf__wrapper{ position:relative; width:100%; }
.hbsfb .stf__block{ position:absolute; width:100%; height:100%; perspective:2000px; }
.hbsfb .stf__item{ display:none; position:absolute; transform-style:preserve-3d; margin:0; padding:0; }
.hbsfb .stf__outerShadow,.hbsfb .stf__innerShadow,.hbsfb .stf__hardShadow,.hbsfb .stf__hardInnerShadow{ position:absolute; left:0; top:0; }
.hbsfb-page{ background:var(--fb-paper); overflow:hidden; }
.hbsfb .hbsfb-page img{ width:100% !important; height:100% !important; max-width:none !important; display:block !important; object-fit:fill; pointer-events:none; -webkit-user-drag:none; margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; }
.hbsfb-page::after{ content:""; position:absolute; inset:0; pointer-events:none; }
.hbsfb-page.\--right::after{ background:linear-gradient(90deg,rgba(0,0,0,.20),rgba(0,0,0,.06) 2.5%,rgba(0,0,0,0) 9%,rgba(255,255,255,.05) 14%,rgba(0,0,0,0) 22%); }
.hbsfb-page.\--left::after{ background:linear-gradient(270deg,rgba(0,0,0,.20),rgba(0,0,0,.06) 2.5%,rgba(0,0,0,0) 9%,rgba(255,255,255,.05) 14%,rgba(0,0,0,0) 22%); }
.hbsfb-solo .hbsfb-page::after{ background:none; }

/* folded brochure */
.hbsfb-scene{ perspective:2600px; perspective-origin:50% 42%; position:relative; width:0; height:0; flex:none; }
.hbsfb-castshadow{ position:absolute; left:50%; top:50%; background:var(--fb-cast); filter:blur(26px); border-radius:10px; pointer-events:none; }
.hbsfb-group,.hbsfb-sheet,.hbsfb-panel{ transform-style:preserve-3d; }
.hbsfb-group{ position:relative; cursor:grab; }
.hbsfb-group:active{ cursor:grabbing; }
.hbsfb-panel{ position:absolute; top:0; }
.hbsfb-face{ position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; background-color:var(--fb-paper); background-repeat:no-repeat; overflow:hidden; }
.hbsfb-face.hbsfb-out{ transform:rotateY(180deg); }
.hbsfb-shade{ position:absolute; inset:0; background:#000; opacity:0; pointer-events:none; }
.hbsfb-face::after{ content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(90deg,rgba(0,0,0,.10),rgba(0,0,0,0) 2.2%,rgba(0,0,0,0) 97.8%,rgba(0,0,0,.10)); }

/* look closely */
.hbsfb-zoom{ position:absolute; inset:0; background:var(--fb-table); z-index:5; display:flex; flex-direction:column; }
.hbsfb-zoom .hbsfb-ctl{ border-top:0; border-bottom:1px solid var(--fb-line); }
.hbsfb-zscroll{ flex:1; min-height:0; overflow:auto; padding:16px; text-align:center; -webkit-overflow-scrolling:touch; }
.hbsfb-zinner{ display:inline-flex; box-shadow:0 20px 50px -18px var(--fb-cast); background:var(--fb-paper); }
.hbsfb .hbsfb-zinner img{ display:block !important; height:auto !important; max-width:none !important; margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; }

@media (max-width:600px){ .hbsfb{ height:clamp(380px,72vh,720px); } .hbsfb-where{ min-width:0; flex-basis:100%; order:-1; } .hbsfb-hint{ font-size:11.5px; } }
@media (prefers-reduced-motion: reduce){ .hbsfb-shift,.hbsfb-bookshadow{ transition:none; } }
