.flipbook-heading {
  display: flex; align-items: end; justify-content: space-between;
  flex-wrap: wrap; gap: .8rem 1.5rem; margin-bottom: 1.25rem;
}
.flipbook-heading h2 { margin: 0 0 .4rem; }
.flipbook-heading p { margin: 0; color: var(--muted); line-height: 1.45; }
.flipbook-view {
  background: #e8edf0; border: 1px solid var(--line); border-radius: .75rem; overflow: hidden;
}
.flipbook-view iframe {
  display: block; width: 100%; height: clamp(24rem, 67vh, 44rem); height: clamp(24rem, 67svh, 44rem); border: 0;
}
.flipbook-toolbar[hidden], #flipbook-open[hidden] { display: none; }
html.flipbook-expanded, html.flipbook-expanded body { overflow: hidden; }
.flipbook-view.is-expanded {
  position: fixed; inset: 0; z-index: 2147483000; box-sizing: border-box;
  width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none;
  border: 0; border-radius: 0; background: #102b3c;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
}
.flipbook-view.is-expanded iframe { width: 100%; height: 100%; min-height: 0; }
.flipbook-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: #173c54; color: white;
  padding: .5rem 1rem; padding: max(.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .5rem max(1rem, env(safe-area-inset-left));
}
.flipbook-toolbar > span { font-weight: 600; }
#flipbook-close { min-height: 44px; padding: .45rem .9rem; background: white; color: #16384d; font-weight: 700; }
#flipbook-close:focus-visible { outline: 3px solid #ffc844; outline-offset: 3px; }
@media (max-width: 500px) {
  .flipbook-view iframe { height: min(132vw, 72vh); height: min(132vw, 72svh); }
  .flipbook-view.is-expanded iframe { height: 100%; }
}
