/* ===== Книга: движок ===== */
.bk-root { position: relative; width: 100%; display: flex; justify-content: center; outline: none; user-select: none; -webkit-user-select: none; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.bk { position: relative; will-change: transform; font-family: "Lora", Georgia, serif; }
.bk-leaves { position: absolute; inset: 0; perspective: 3800px; perspective-origin: 50% 45%; cursor: grab; }
.bk-dragging .bk-leaves { cursor: grabbing; }
.bk-leaf { position: absolute; top: 0; left: var(--pw); width: var(--pw); height: var(--ph); transform-origin: left center; transform-style: preserve-3d; --sh: 0; }
.bk-single .bk-leaf, .bk-root[data-pos="single"] .bk-leaf { left: 0; }
.bk-face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fbf8f0; }
.bk-front { border-radius: 0 3px 3px 0; }
.bk-back { transform: rotateY(180deg); border-radius: 3px 0 0 3px; }
/* тень на летящей странице */
.bk-face::before { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: var(--sh); background: linear-gradient(90deg, rgba(40,28,10,.55), rgba(40,28,10,0) 75%); }
.bk-back::before { background: linear-gradient(270deg, rgba(40,28,10,.55), rgba(40,28,10,0) 75%); }
/* сгиб у корешка */
.bk-front .pg::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(90deg, rgba(60,42,16,.26), rgba(60,42,16,.07) 3.5%, rgba(60,42,16,0) 11%); }
.bk-back .pg::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: linear-gradient(270deg, rgba(60,42,16,.26), rgba(60,42,16,.07) 3.5%, rgba(60,42,16,0) 11%); }
.pg-cover::after, .pg-blank::after { display: none; }
.bk-cast { position: absolute; top: 0; z-index: 1; pointer-events: none; opacity: 0; }
.bk-stack { position: absolute; top: 0; height: var(--ph); width: var(--pw); background: #f3eee1; border-radius: 0 3px 3px 0; }
.bk-stack-l { border-radius: 3px 0 0 3px; }
.bk-floor { position: absolute; left: 3%; right: 3%; bottom: -1.4em; height: 3.4em; background: radial-gradient(ellipse at 50% 40%, rgba(40,28,10,.42), rgba(40,28,10,0) 68%); filter: blur(7px); transition: left .8s, right .8s; }
.bk-root[data-pos="start"] .bk-floor { left: 50%; right: 3%; }
.bk-root[data-pos="end"] .bk-floor { left: 3%; right: 50%; }
.bk-root[data-pos="single"] .bk-floor { left: 3%; right: 3%; }

/* ===== Страницы (размеры в em, 1em ≈ 1/34 ширины страницы) ===== */
.pg { position: absolute; inset: 0; padding: 3em 3em 3.6em; color: #2a2823; font-size: 1em; line-height: 1.6; background: #fbf8f0; overflow: hidden; display: flex; flex-direction: column; hyphens: auto; -webkit-hyphens: auto; }
.pg .kick { font: 500 .6em/1.2 "DM Sans", system-ui, sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #9a7253; margin: 0 0 1.6em; }
.pg h2, .pg h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 500; margin: 0; line-height: 1.12; color: #20201b; }
.pg h3 { font-size: 1.9em; margin-bottom: .6em; font-style: italic; }
.pg p { margin: 0 0 .9em; font-size: 1em; text-align: justify; }
.pg .rule { width: 3.5em; height: 1px; background: #b99a5b; margin: 1.6em auto; }
.pg .hand { font-family: "Caveat", "Marck Script", cursive; color: #5a4a3a; font-size: 1.7em; line-height: 1.15; text-align: center; }
.folio { position: absolute; bottom: 1.5em; font: 400 .62em/1 "DM Sans", sans-serif; letter-spacing: .12em; color: #a89f8c; font-style: normal; z-index: 3; }
.bk-front .folio { right: 4.4em; }
.bk-back .folio { left: 4.4em; }
.pg-blank { background: #f6f1e5; }

/* обложка */
.pg-cover { padding: 0; background: radial-gradient(120% 90% at 30% 20%, #34503f 0%, #223a2d 50%, #162a1f 100%); color: #dcc189; align-items: stretch; justify-content: stretch; }
.pg-cover::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
.pg-cover::after { display: block !important; content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.2em; background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,.12) 55%, rgba(255,255,255,.05) 62%, rgba(0,0,0,.18) 70%, rgba(0,0,0,0)); z-index: 4; pointer-events: none; }
.cv-frame { position: absolute; inset: 2.2em 2.2em 2.2em 3.6em; border: 1px solid rgba(220,193,137,.6); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2em; }
.cv-frame::before { content: ""; position: absolute; inset: .5em; border: 1px solid rgba(220,193,137,.25); pointer-events: none; }
.cv-orn { width: 9em; height: 9em; color: #dcc189; opacity: .9; margin-bottom: 2em; }
.cv-orn.sm { width: 6em; height: 6em; margin: 0; }
.pg .cv-kicker { font: 500 .62em/1.2 "DM Sans", sans-serif; letter-spacing: .3em; text-transform: uppercase; margin: 0 0 1.6em; text-align: center; opacity: .85; color: #dcc189; }
.pg .cv-title { font-family: "Playfair Display", serif; font-weight: 500; font-size: 3.6em; line-height: 1.1; color: #e8cf94; letter-spacing: .02em; margin: 0; word-break: break-word; }
.pg .cv-name { font-style: italic; font-size: 1em; margin: 1.4em 0 0; text-align: center; color: #c9b27c; }
.pg .cv-brand { position: absolute; bottom: 2em; left: 0; right: 0; margin: 0; text-align: center; font: 500 .56em/1 "DM Sans", sans-serif; letter-spacing: .3em; text-transform: uppercase; color: rgba(220,193,137,.7); }
.pg-backcover .cv-brand { position: static; margin-top: 2em; }

/* форзац */
.pg-end { padding: 0; background: #ece4d1; }
.end-pattern { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(120,90,50,.1) 0 1px, transparent 1px 1.5em), repeating-linear-gradient(-45deg, rgba(120,90,50,.1) 0 1px, transparent 1px 1.5em); }
.end-pattern::after { content: ""; position: absolute; inset: 3em; background: #f3ecdb; box-shadow: 0 0 0 1px rgba(154,114,83,.35); }

.pg-title { justify-content: center; align-items: center; text-align: center; }
.pg-title h2 { font-size: 4.4em; font-weight: 400; letter-spacing: .01em; }
.pg-title .years { font-style: italic; color: #6e665a; font-size: .95em; text-align: center; }
.pg-title .kick { margin-bottom: 2em; }

.pg-ded { justify-content: center; align-items: center; text-align: center; }
.pg .ded-text { font-style: italic; font-size: 1.3em; line-height: 1.95; text-align: center !important; color: #3a352b; }
.pg .ded-from { font: 500 .62em/1 "DM Sans", sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #9a7253; margin-top: 2em !important; text-align: center !important; }

.pg-toc ol { list-style: none; margin: 2em 0 0; padding: 0; }
.pg-toc li { display: flex; align-items: baseline; gap: .8em; margin-bottom: 1.5em; font-size: 1.05em; }
.pg-toc .no { font: 500 .62em "DM Sans", sans-serif; letter-spacing: .15em; color: #9a7253; }
.pg-toc .tt { font-family: "Playfair Display", serif; font-size: 1.3em; font-style: italic; color: #20201b; }
.pg-toc .dots { flex: 1; border-bottom: 1px dotted #b3a98f; transform: translateY(-.25em); }
.pg-toc .pn { font: 400 .8em "DM Sans", sans-serif; color: #6e665a; }

.pg-chapter { justify-content: center; align-items: center; text-align: center; }
.pg-chapter .big-no { font: 400 11em/1 "Playfair Display", serif; color: rgba(185,154,91,.34); margin-bottom: -.12em; }
.pg-chapter h2 { font-size: 3em; font-weight: 400; }
.pg-chapter .epi { font-style: italic; color: #6e665a; text-align: center; max-width: 18em; }

.pg-photofull { padding: 0; }
.pf-img { height: 78%; overflow: hidden; background: #e7dfcd; }
.pf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-cap { padding: 1.5em 3em 0; text-align: center; }
.pf-cap .yr { font: 500 .6em "DM Sans", sans-serif; letter-spacing: .24em; color: #9a7253; text-transform: uppercase; }
.pf-cap p { font-style: italic; margin: .6em 0 0; text-align: center; font-size: 1em; color: #3a352b; }

.pg-wide { padding: 2.6em 2.6em 3.4em; }
.pw-img { aspect-ratio: 3 / 2; overflow: hidden; background: #e7dfcd; box-shadow: 0 .4em 1.2em rgba(40,28,10,.2); flex: none; }
.pw-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-cap { display: flex; align-items: baseline; gap: 1em; margin: .9em 0 1em; }
.pw-cap .yr { font: 500 .58em "DM Sans", sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #9a7253; white-space: nowrap; }
.pw-cap em { font-size: .95em; color: #3a352b; line-height: 1.35; }
.pw-text p { font-size: 1.03em; line-height: 1.64; margin-bottom: .8em; }
.pg-mat { align-items: center; justify-content: center; }
.pg-mat figure { margin: 0; background: #fff; padding: 1.1em 1.1em 1em; box-shadow: 0 .6em 1.8em rgba(40,28,10,.22), 0 0 0 1px rgba(0,0,0,.04); transform: rotate(var(--r)); position: relative; width: 24em; }
.pg-mat .tape { position: absolute; top: -1em; left: 50%; width: 7em; height: 2em; margin-left: -3.5em; background: rgba(214,196,150,.62); transform: rotate(-3deg); }
.mat-img { height: 28em; overflow: hidden; background: #e7dfcd; }
.mat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-mat figcaption { padding-top: .5em; }
.pg-mat .yr-small { position: absolute; bottom: 3.4em; font: 500 .6em "DM Sans", sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #9a7253; text-align: center; left: 0; right: 0; }

.pg-text p.drop::first-letter { float: left; font: 400 3.8em/.82 "Playfair Display", serif; padding: .1em .12em 0 0; color: #2b3d34; }
.pg-text { padding-top: 3.6em; }
.pg-text p { font-size: 1.07em; line-height: 1.68; }

.pg-quote { justify-content: center; align-items: center; text-align: center; }
.pg-quote .qm { font: 400 8em/.6 "Playfair Display", serif; color: rgba(185,154,91,.5); height: .5em; }
.pg-quote blockquote { margin: 1em 0 0; font: italic 400 1.9em/1.4 "Playfair Display", serif; color: #20201b; }
.pg-quote .who { font: 500 .6em "DM Sans", sans-serif; letter-spacing: .22em; text-transform: uppercase; color: #9a7253; margin-top: 2.2em; text-align: center; }

.pg-pola { padding: 0; }
.pol { position: absolute; margin: 0; background: #fff; padding: .8em .8em 0; box-shadow: 0 .5em 1.4em rgba(40,28,10,.24); width: 16em; }
.pol-img { height: 11em; overflow: hidden; background: #e7dfcd; }
.pol-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pol figcaption { padding: .35em 0 .4em; font-size: 1.5em !important; }
.pol-1 { left: 2.6em; top: 2.2em; transform: rotate(-4deg); }
.pol-2 { right: 2.4em; top: 15.4em; transform: rotate(3.5deg); }
.pol-3 { left: 4em; top: 28.6em; transform: rotate(-1.8deg); }

.pg-restore .rs-pair { display: flex; gap: 1em; margin-top: .2em; }
.pg-restore figure { margin: 0; flex: 1; }
.rs-img { height: 20em; overflow: hidden; position: relative; background: #e7dfcd; box-shadow: 0 .3em 1em rgba(40,28,10,.18); }
.rs-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-old img { filter: sepia(.85) contrast(.74) brightness(.9) saturate(.5) blur(.4px) !important; }
.rs-old .scratch { position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.25) 0 .25em, transparent .3em), radial-gradient(circle at 70% 60%, rgba(0,0,0,.2) 0 .3em, transparent .35em), linear-gradient(100deg, transparent 38%, rgba(255,255,255,.5) 38.3%, transparent 38.7%), linear-gradient(80deg, transparent 63%, rgba(255,255,255,.4) 63.2%, transparent 63.6%), radial-gradient(ellipse at center, transparent 40%, rgba(40,20,0,.38) 100%); mix-blend-mode: normal; }
.pg-restore figcaption { font: 500 .58em "DM Sans", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #6e665a; text-align: center; margin-top: .9em; }
.pg .rs-cap { margin-top: 1.1em; }
.pg .rs-story { font-size: .9em; color: #5c564a; text-align: center !important; }

.pg-time ul { list-style: none; margin: 1.6em 0 0; padding: 0 0 0 1.4em; border-left: 1px solid #cdbf9d; }
.pg-time li { position: relative; margin-bottom: .95em; display: block; }
.pg-time li::before { content: ""; position: absolute; left: -1.78em; top: .55em; width: .6em; height: .6em; border-radius: 50%; background: #b99a5b; }
.pg-time b { display: block; font: 500 1.5em "Playfair Display", serif; color: #2b3d34; }
.pg-time span { font-size: .95em; color: #4a463c; }

.pg-list ol { margin: 1em 0 0; padding: 0; list-style: none; counter-reset: l; }
.pg-list li { counter-increment: l; position: relative; padding-left: 2.6em; margin-bottom: 1.2em; font-style: italic; font-size: 1.05em; line-height: 1.5; }
.pg-list li::before { content: counter(l); position: absolute; left: 0; top: -.15em; font: 400 1.8em "Playfair Display", serif; color: #b99a5b; font-style: normal; }
.pg-list .tail { margin-top: 1.5em; }

.pg-notes .lines { flex: 1; background: repeating-linear-gradient(to bottom, transparent 0 2.1em, rgba(110,90,60,.2) 2.1em calc(2.1em + 1px)); margin-top: .5em; }
.pg-colo { justify-content: center; align-items: center; text-align: center; }
.pg-colo p { text-align: center; font-style: italic; color: #4a463c; font-size: 1.1em; line-height: 1.9; }
.pg-colo .small { font: 500 .6em "DM Sans", sans-serif; letter-spacing: .26em; text-transform: uppercase; color: #9a7253; font-style: normal; margin-top: 2.4em; }

/* на телефоне — одна страница, шрифт чуть крупнее относительно листа */
.bk-root[data-pos="single"] .pg { padding: 2.6em 2.4em 3.2em; }
.bk-root[data-pos="single"] .pg-pola .pol { width: 14em; }
