@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(../fonts/barlow-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(../fonts/barlow-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(../fonts/barlow-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(../fonts/barlow-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --blue: #004792;
  --blue-deep: #00315f;
  --green: #188929;
  --ink: #10243a;
  --muted: #526578;
  --water: #f4f8fb;
  --line: #d3dee7;
  --scale-1: #8f7d5c;
  --scale-2: #b3a27f;
  --scale-3: #cfc3a6;
  --scale-4: #e3dbc7;
  --red: #b3261e;
  --condensed: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font: 400 17px/1.55 Barlow, Arial, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--condensed); font-weight: 600; line-height: 1.1; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Přihlášení: živá fotografie úpravny vody, formulář ve skleněném panelu. */
.login-page { background: var(--blue-deep); }
.login-scene { position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; display: grid; align-items: center; justify-items: start; padding: 24px max(16px, 7vw); }
.login-bg { position: absolute; inset: 0; transition: transform 1.05s cubic-bezier(.5, 0, .7, .4); }
.login-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.login-motion { position: absolute; overflow: hidden; pointer-events: none; }
.login-motion svg { display: block; }
.scene-light { mix-blend-mode: screen; }
.login-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 22, 48, .35), rgba(4, 22, 48, 0) 50%); }
.is-clearing .login-bg { transform: scale(1.7); }
.is-clearing .login-form { opacity: 0; translate: 0 10px; scale: .97; transition: opacity .5s, translate .5s, scale .5s; }
@media (max-width: 700px) {
  .login-scene { justify-items: center; align-items: end; padding-bottom: 20px; }
  .login-photo { object-position: 64% center; }
  .login-bg::after { background: linear-gradient(180deg, rgba(4, 22, 48, 0) 40%, rgba(4, 22, 48, .45)); }
}
@media (prefers-reduced-motion: reduce) { .login-bg, .is-clearing .login-form { transition: none; } }

.login-form { position: relative; isolation: isolate; width: min(100%, 380px); padding: 32px 30px 20px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04) 60%), rgba(8, 28, 52, .26);
  -webkit-backdrop-filter: blur(9px) saturate(1.5); backdrop-filter: blur(9px) saturate(1.5);
  box-shadow: 0 24px 60px rgba(2, 14, 32, .4), inset 0 0 24px rgba(255, 255, 255, .07), inset 0 -14px 28px rgba(2, 14, 32, .2);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  color: #fff; text-align: center; text-shadow: 0 1px 2px rgba(2, 14, 32, .45); }
/* Hrana silného skla: světlá nahoře vlevo, tmavší dole, jako lom světla v tloušťce skla. */
.login-form::before { content: ""; position: absolute; inset: 0; z-index: -1; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .18) 30%, rgba(255, 255, 255, .04) 55%, rgba(255, 255, 255, .3) 85%, rgba(255, 255, 255, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
/* Odlesk, který sleduje myš nebo náklon telefonu. */
.glass-glare { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--glare-x, 30%) var(--glare-y, 20%), rgba(255, 255, 255, .3), rgba(255, 255, 255, .08) 28%, rgba(255, 255, 255, 0) 55%); }
.glass-ripple { position: absolute; z-index: 2; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 2px solid rgba(255, 255, 255, .75); border-radius: 50%; pointer-events: none; animation: glass-ripple 1s cubic-bezier(.2, .6, .3, 1) both; }
@keyframes glass-ripple { from { scale: .2; opacity: .9; } to { scale: 16; opacity: 0; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .login-form { background: rgba(8, 28, 52, .82); } }
.login-motes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Úvodní nájezd: fotka se oddálí, slunce se rozsvítí, sklo se vynoří z rozmazání. */
.is-intro .login-bg { animation: intro-bg 2.6s cubic-bezier(.2, .7, .2, 1) both; }
.is-intro .scene-light, .is-intro .login-motes { animation: intro-fade 2.2s .6s ease-out both; }
.is-intro .login-form { animation: intro-glass 1.1s .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes intro-bg { from { scale: 1.14; } to { scale: 1; } }
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-glass { from { opacity: 0; translate: 0 22px; filter: blur(12px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }

/* Špatné heslo: sklo se otřese a hrana krátce zčervená. */
.login-form.is-failed { animation: glass-shake .55s cubic-bezier(.36, .07, .19, .97) both; }
.login-form.is-failed::before { animation: edge-alert 1.8s ease-out both; }
@keyframes glass-shake { 10%, 90% { translate: -2px 0; } 20%, 80% { translate: 4px 0; } 30%, 50%, 70% { translate: -8px 0; } 40%, 60% { translate: 8px 0; } }
@keyframes edge-alert { 0%, 35% { background: rgba(255, 110, 100, .95); padding: 2.5px; } 100% { padding: 1.5px; } }
@media (prefers-reduced-motion: reduce) {
  .is-intro .login-bg, .is-intro .scene-light, .is-intro .login-form, .login-form.is-failed { animation: none; }
}
.login-logo { margin: 0 auto 22px; filter: drop-shadow(0 1px 2px rgba(2, 14, 32, .35)); }
.login-form h1 { margin: 0 0 8px; font-size: 32px; color: #fff; }
.login-help { margin: 0 0 18px; font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, .9); }
.form-error { margin: 0 0 18px; font-size: 15px; line-height: 1.4; font-weight: 600; color: #ffc4bd; }
.login-form input { width: 100%; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--ink); font: 500 20px/1.3 Barlow, Arial, sans-serif; letter-spacing: .06em; text-align: center; text-shadow: none; }
.login-form input::placeholder { color: #8394a5; }
.login-form button { width: 100%; margin-top: 10px; padding: 12px; border: 0; border-radius: 8px; background: var(--green); color: #fff; font: 600 18px/1.3 Barlow, Arial, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(2, 14, 32, .3); }
.login-form button:hover { background: #127021; }
.lang-switch { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.lang-switch a { min-width: 40px; padding: 8px 6px; border-radius: 6px; color: rgba(255, 255, 255, .78); font-size: 14px; font-weight: 500; letter-spacing: .04em; text-decoration: none; }
.lang-switch a:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.lang-switch a[aria-current] { color: #fff; font-weight: 700; box-shadow: inset 0 -2px 0 #fff; }
.is-clearing .lang-switch { visibility: hidden; }

/* Sekce s materiály */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px max(16px, calc((100vw - 760px) / 2 + 16px)); border-bottom: 1px solid var(--line); }
.site-header img { height: 40px; width: auto; }
.link-button { padding: 4px 0; border: 0; background: none; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; }
.plain-link { white-space: nowrap; }
.preview-note { margin: 0; padding: 8px 16px; background: var(--scale-4); text-align: center; font-size: 15px; }
.access-note { margin: 0; padding: 8px 16px; background: var(--scale-4); color: #4a3f28; text-align: center; font-size: 15px; font-weight: 500; }

.theme-blue { --accent: #004792; --accent-deep: #00315f; --accent-soft: #7fb0e0; }
.theme-green { --accent: #12702a; --accent-deep: #0b4d1c; --accent-soft: #8fd6a0; }
.theme-teal { --accent: #0b6272; --accent-deep: #07454f; --accent-soft: #7fcbd6; }
.theme-violet { --accent: #56408f; --accent-deep: #3b2b66; --accent-soft: #b9a7e6; }
.theme-red { --accent: #9c2f2a; --accent-deep: #6e1f1c; --accent-soft: #eda79f; }
.theme-ochre { --accent: #85590a; --accent-deep: #5e3f06; --accent-soft: #e6c27a; }
.theme-graphite { --accent: #3c4a56; --accent-deep: #27323b; --accent-soft: #a8b7c4; }

.hero { position: relative; overflow: hidden; background: var(--accent, var(--blue)); color: #fff; }
.hero-motif { position: absolute; top: 50%; right: -120px; width: 620px; height: 620px; transform: translateY(-50%); }
.motif-rings { fill: none; stroke: var(--accent-soft, #7fb0e0); stroke-width: 2; opacity: .35; }
.motif-drops { fill: var(--accent-soft, #7fb0e0); opacity: .3; }
.hero-inner { position: relative; display: grid; gap: 28px; align-items: center; max-width: 760px; margin: 0 auto; padding: 52px 16px; }
.hero.has-poster .hero-inner { max-width: 960px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.hero h1 { margin: 0; font-size: clamp(52px, 11vw, 96px); line-height: .95; color: #fff; }
.hero-poster { margin: 0; }
.hero-poster img { width: 100%; max-height: 70vh; object-fit: contain; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.hero-poster figcaption { margin-top: 10px; font-size: 15px; color: rgba(255, 255, 255, .85); }

.section-main { max-width: 760px; margin: 0 auto; padding: 8px 16px 88px; }
.empty { color: var(--muted); }
.block { margin-top: 40px; }
.block h2 { margin: 0 0 12px; font-size: 32px; color: var(--accent, var(--blue)); }
.block img { width: 100%; }
.is-draft { opacity: .6; }
.caption { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.prose { max-width: 66ch; }
.prose h2 { font-size: 30px; margin: 1.2em 0 .4em; }
.prose h3 { font-size: 24px; margin: 1.2em 0 .4em; }
.prose p { margin: 0 0 1em; }
.prose blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--scale-2); }
.video { aspect-ratio: 16 / 9; }
.video iframe { width: 100%; height: 100%; border: 0; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery-item { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--water); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery-item:hover img { transform: scale(1.05); }
a[data-lightbox] { cursor: zoom-in; }

.lightbox { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 20, 32, .94); color: #fff; }
.lightbox::backdrop { background: rgba(10, 20, 32, .94); }
.lightbox-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; margin: 0; padding: 52px 72px 16px; }
.lightbox-stage img { flex: 0 1 auto; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.lightbox-stage.is-zoomed { display: block; overflow: auto; padding: 0; }
.lightbox-stage.is-zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.lightbox-stage.is-zoomed figcaption { display: none; }
.lightbox figcaption { flex: none; max-width: 70ch; text-align: center; font-size: 15px; color: rgba(255, 255, 255, .85); }
.lightbox-count { position: absolute; top: 16px; left: 18px; font-size: 15px; }
.lightbox-close, .lightbox-nav { position: absolute; z-index: 2; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .14); cursor: pointer; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox-close { top: 8px; right: 8px; width: 44px; height: 44px; }
.lightbox-close::before, .lightbox-close::after { content: ""; position: absolute; top: 21px; left: 11px; width: 22px; height: 2px; background: #fff; }
.lightbox-close::before { transform: rotate(45deg); }
.lightbox-close::after { transform: rotate(-45deg); }
.lightbox-nav { top: 50%; width: 48px; height: 72px; margin-top: -36px; }
.lightbox-nav[hidden] { display: none; }
.lightbox-nav::before { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-top: 3px solid #fff; border-right: 3px solid #fff; }
.lightbox-prev { left: 10px; }
.lightbox-prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.lightbox-next { right: 10px; }
.lightbox-next::before { transform: translate(-70%, -50%) rotate(45deg); }

.category-desc { max-width: 62ch; margin: -6px 0 18px; color: var(--muted); }
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; }
.shelf-book { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.cover { position: relative; display: block; aspect-ratio: 210 / 297; margin-bottom: 12px; background: #fff; box-shadow: var(--thick, 4px) var(--thick, 4px) 0 -1px #dfe6ec, calc(var(--thick, 4px) + 1px) calc(var(--thick, 4px) + 1px) 0 -1px var(--scale-2), 12px 16px 26px rgba(16, 36, 58, .22); transition: transform .2s ease; }
.cover::before { content: ""; position: absolute; inset: 0 auto 0 0; z-index: 1; width: 10px; background: linear-gradient(to right, rgba(16, 36, 58, .22), rgba(16, 36, 58, 0)); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-blank { display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 16px 16px 16px 22px; background: var(--accent, var(--blue)); color: #fff; font: 600 24px/1.1 var(--condensed); overflow-wrap: anywhere; }
.shelf-book:hover .cover { transform: translateY(-4px) rotate(-1deg); }
.shelf-book:hover .doc-name { text-decoration: underline; }
.doc-name { font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--ink); }
.doc-desc { font-size: 15px; line-height: 1.35; color: var(--muted); }

.error-page { max-width: 560px; margin: 0 auto; padding: 80px 16px; }
.error-page h1 { font-size: 38px; color: var(--blue); }

/* PDF čtečka jako kniha */
.viewer-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #33475a; }
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 16px; background: var(--blue-deep); color: #fff; font-size: 15px; }
.viewer-back { color: #fff; }
.viewer-title { flex: 1 1 200px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.viewer-tools { display: flex; align-items: center; gap: 6px; }
.viewer-tools button { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 3px; background: none; color: #fff; font: 500 15px/1 Barlow, Arial, sans-serif; cursor: pointer; }
.viewer-tools button:hover { background: rgba(255, 255, 255, .14); }
.viewer-area { position: relative; flex: 1; min-height: 0; }
.viewer { position: absolute; inset: 0; display: flex; overflow: hidden; padding: 20px 68px; touch-action: none; user-select: none; -webkit-user-select: none; }
.viewer.is-zoomed { overflow: auto; cursor: grab; }
.viewer.is-zoomed:active { cursor: grabbing; }
.viewer.is-flipping { overflow: hidden; }
.viewer-status { width: 100%; color: #fff; text-align: center; margin-top: 40px; }

.book { position: relative; flex: none; margin: auto; perspective: 2600px; transition: transform .5s ease; cursor: pointer; }
.is-zoomed .book { cursor: inherit; }
.book.at-cover { transform: translateX(-25%); }
.book.at-end { transform: translateX(25%); }
.sheet { position: absolute; top: 0; bottom: 0; width: 50%; background: #fff; overflow: hidden; }
.sheet canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.sheet-left { left: 0; box-shadow: -3px 6px 22px rgba(0, 0, 0, .35); }
.sheet-right { left: 50%; box-shadow: 3px 6px 22px rgba(0, 0, 0, .35); }
.sheet.is-blank { background: transparent; box-shadow: none; }
.sheet.is-blank canvas { visibility: hidden; }
.sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.sheet-left::after, .leaf-back::after { background: linear-gradient(to left, rgba(16, 36, 58, .2), rgba(16, 36, 58, 0) 7%); }
.sheet-right::after, .leaf-front::after { background: linear-gradient(to right, rgba(16, 36, 58, .2), rgba(16, 36, 58, 0) 7%); }

.leaf { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; z-index: 3; transform-origin: left center; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.45, .05, .35, 1); }
.leaf[hidden] { display: none; }
.leaf.on-left { left: 0; transform-origin: right center; }
.leaf .sheet { left: 0; width: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf .leaf-back { transform: rotateY(180deg); }
.leaf.on-left .leaf-front::after { background: linear-gradient(to left, rgba(16, 36, 58, .2), rgba(16, 36, 58, 0) 7%); }
.leaf.on-left .leaf-back::after { background: linear-gradient(to right, rgba(16, 36, 58, .2), rgba(16, 36, 58, 0) 7%); }
.leaf .sheet.is-blank { background: #fff; }

.book.is-single .sheet-left { display: none; }
.book.is-single .sheet-right { left: 0; width: 100%; }
.book.is-single .leaf { left: 0; width: 100%; }

.page-nav { position: absolute; top: 50%; width: 48px; height: 72px; margin-top: -36px; border: 0; border-radius: 3px; background: rgba(0, 49, 95, .72); cursor: pointer; }
.page-nav::before { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; border-top: 3px solid #fff; border-right: 3px solid #fff; }
.page-prev { left: 10px; }
.page-prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.page-next { right: 10px; }
.page-next::before { transform: translate(-70%, -50%) rotate(45deg); }
.page-nav:hover { background: var(--blue); }
.page-nav:disabled { opacity: .25; cursor: default; }

.book::before, .book::after { content: ""; position: absolute; top: 3px; bottom: 3px; background: repeating-linear-gradient(to right, #fff 0 1px, #c6d1da 1px 2px); }
.book::before { right: 100%; width: var(--stack-left, 0); }
.book::after { left: 100%; width: var(--stack-right, 0); }
.book.at-cover .sheet-right { border-radius: 2px 6px 6px 2px; box-shadow: 0 0 0 3px var(--blue-deep), 10px 12px 28px rgba(0, 0, 0, .45); }
.book.at-end .sheet-left { border-radius: 6px 2px 2px 6px; box-shadow: 0 0 0 3px var(--blue-deep), -10px 12px 28px rgba(0, 0, 0, .45); }

.thumbs { display: flex; gap: 10px; flex: none; height: 132px; padding: 10px 16px; overflow-x: auto; background: #293a4a; }
.thumbs[hidden] { display: none; }
.thumbs button { position: relative; flex: none; height: 100%; padding: 0; border: 2px solid transparent; background: #fff; cursor: pointer; }
.thumbs button.is-current { border-color: #4fc264; }
.thumbs canvas { display: block; width: 100%; height: 100%; }
.thumbs span { position: absolute; right: 2px; bottom: 2px; padding: 0 4px; background: rgba(0, 49, 95, .8); color: #fff; font-size: 12px; }

.viewer-foot { display: flex; align-items: center; gap: 14px; padding: 6px 16px; background: var(--blue-deep); color: #fff; font-size: 15px; }
.viewer-foot input { flex: 1; min-width: 0; accent-color: #4fc264; }
#pageInfo { min-width: 72px; text-align: right; white-space: nowrap; }
.print-blocked { display: none; }

@media (max-width: 700px) {
  .viewer { padding: 10px 8px; }
  .page-nav { width: 34px; height: 56px; margin-top: -28px; }
  .page-prev { left: 2px; }
  .page-next { right: 2px; }
}
@media (max-width: 700px) {
  .hero.has-poster .hero-inner { grid-template-columns: 1fr; }
  .hero-inner { padding: 36px 16px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lightbox-stage { padding: 56px 8px 12px; }
  .lightbox-nav { width: 36px; height: 56px; margin-top: -28px; }
  .lightbox-prev { left: 2px; }
  .lightbox-next { right: 2px; }
}
@media print {
  .viewer-page > *:not(.print-blocked) { display: none !important; }
  .print-blocked { display: block; color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  .book { transition: none; }
}
