/* Only route content moves: the sky, soundtrack and controls stay continuous. */
/* Short pages must also carry their footer to the bottom of a tall viewport. */
[data-app-page] { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
[data-app-page] > main { flex: 1 0 auto; }
[data-app-page] main:focus, [data-app-page] h1:focus { outline: none; }
html.app-navigating { cursor: progress; }
/* Keep existing links responsive while a route is loading. */
.app-navigation-progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 30%; z-index: 11000; border-radius: 0 2px 2px 0; background: #a4d5ff; box-shadow: 0 0 10px #66b9ff; opacity: 0; pointer-events: none; }
.app-navigating .app-navigation-progress { opacity: .9; animation: app-progress 1.2s ease-in-out infinite; }
@keyframes app-progress { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.app-navigation-announcement { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-navigation-error { position: fixed; z-index: 11000; left: 16px; right: 16px; top: calc(var(--header-h,76px) + 16px); max-width: 520px; margin-inline: auto; display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: #f8fafc; font-size: 14px; line-height: 1.5; background: #192b43; border: 1px solid #57738f; border-radius: 16px; box-shadow: 0 12px 40px #0008; }
.app-navigation-error[hidden] { display: none; }
.app-navigation-error button { flex: none; cursor: pointer; color: #d3eaff; background: #314c6a; border: 1px solid #7b9abb; border-radius: 9px; min-height: 40px; padding: 8px 12px; font: inherit; }
.app-navigation-error button:focus-visible { outline: 2px solid #b8dcff; outline-offset: 3px; }
.site-header .nav-link { transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease; }
@media(prefers-reduced-motion:reduce) { .app-navigating .app-navigation-progress { animation: none; width: 100%; opacity: .6; } }

.reader-load-status { color: var(--text-secondary,#dbe4f0); font-size: 14px; margin: 0 0 12px; }
[data-reader-loading] .tool-btn:disabled { opacity: .55; }
#flipbook-instance[data-reader-loading] > .fpage:not(:first-child) { display: none; }
#flipbook-instance[data-reader-unavailable] { max-width: 440px; box-shadow: none; }
#flipbook-instance[data-reader-unavailable] > .fpage { max-width: 100%; margin-bottom: 16px; }
