/* Physical book presentation; source cover preserved, no WebGL or motion dependency. */
body[data-page="resources/book"] .book-stage {
 --book-depth:30px;
 position:relative;display:grid;place-items:center;
 width:100%;max-width:540px;min-height:490px;
 margin:0 auto;padding:35px 42px 55px!important;
 perspective:1500px;direction:ltr;isolation:isolate;
}
body[data-page="resources/book"] .book-stage::after {
 content:"";position:absolute;left:17%;right:12%;bottom:33px;height:32px;
 background:radial-gradient(ellipse,#30261e70 0%,#30261e25 42%,transparent 72%);
 filter:blur(9px);transform:rotate(-3deg);z-index:-1;
}
body[data-page="resources/book"] .book-object {
 position:relative;width:clamp(230px,24vw,335px);aspect-ratio:3/4;
 transform-style:preserve-3d;transform:rotateX(7deg) rotateY(25deg) rotateZ(-2deg);
}
body[data-page="resources/book"] .book-front,
body[data-page="resources/book"] .book-back {
 position:absolute;inset:0;background:#e8dfce;border-radius:2px 4px 4px 2px;
}
body[data-page="resources/book"] .book-front {
 transform:translateZ(var(--book-depth));backface-visibility:hidden;
 /* Paint the same original cover on its physical face as a compositing fallback.
    The visible img and its alt remain unchanged; all five 3D faces are retained. */
 background-image:url("/assets/book-cover.webp");background-size:cover;background-position:center;background-repeat:no-repeat;
 box-shadow:inset 0 0 0 1px #64563e30;
}
body[data-page="resources/book"] .book-front::after {
 content:"";position:absolute;inset:0;pointer-events:none;
 background:linear-gradient(90deg,#2b1c1929 0%,transparent 2%,#ffffff45 3%,transparent 6%,transparent 97%,#1e140b1c);
 border-radius:inherit;
}
body[data-page="resources/book"] .book-front img,
body[data-page="resources/book"] .book-stage:hover img {
 display:block;width:100%;height:100%;max-width:none;margin:0;object-fit:cover;
 transform:none;transition:none;box-shadow:none;border-radius:inherit;
}
body[data-page="resources/book"] .book-back {
 box-shadow:-2px 3px 5px #30261e20;transform:translateZ(-1px);
}
body[data-page="resources/book"] .book-spine {
 position:absolute;left:0;top:0;width:var(--book-depth);height:100%;
 transform-origin:left center;transform:rotateY(-90deg);backface-visibility:visible;
 background:linear-gradient(90deg,#b6a894,#e3d9c9 35%,#c6baa7 83%,#948570);
 border-block:1px solid #a69984;display:flex;align-items:center;justify-content:center;
}
body[data-page="resources/book"] .book-spine span {
 writing-mode:vertical-rl;transform:rotate(180deg);font:600 11px/1.2 Arial,sans-serif;
 letter-spacing:2px;color:#362c25;white-space:nowrap;
}
body[data-page="resources/book"] .book-pages-top {
 position:absolute;left:3px;right:3px;top:3px;height:calc(var(--book-depth) - 3px);
 transform-origin:center top;transform:rotateX(90deg);
 background:repeating-linear-gradient(0deg,#cfc6b4 0px,#faf6e9 1px,#e7e0d0 2px);
}
body[data-page="resources/book"] .book-pages-side {
 position:absolute;right:2px;top:3px;bottom:3px;width:calc(var(--book-depth) - 3px);
 transform-origin:right center;transform:rotateY(90deg);
 background:repeating-linear-gradient(90deg,#cfc6b4 0px,#faf6e9 1px,#e7e0d0 2px);
}
@media(max-width:700px){
 body[data-page="resources/book"] .book-stage{--book-depth:25px;min-height:410px;padding:24px 30px 48px!important;}
 body[data-page="resources/book"] .book-object{width:min(67vw,285px);}
 body[data-page="resources/book"] .book-stage::after{bottom:24px;left:15%;right:12%;}
 body[data-page="resources/book"] .book-spine span{font-size:9px;letter-spacing:1.6px;}
}

/* Book annotation: an editorial reading column beside the existing 3D object. */
body[data-page="resources/book"] .book-annotation {
 align-self:start;min-width:0;max-width:34rem;padding-block-start:44px;text-align:start;
}
body[data-page="resources/book"] .book-annotation .book-annotation-hook {
 margin:0 0 26px;font-size:clamp(25px,2.25vw,36px);line-height:1.22;letter-spacing:-.025em;
}
body[data-page="resources/book"] .book-annotation p {
 max-width:none;margin:0;font-size:18px;line-height:1.65;
}
body[data-page="resources/book"] .book-annotation p + p {margin-block-start:22px;}
body[data-page="resources/book"][dir="rtl"] .book-annotation .book-annotation-hook,
html[dir="rtl"] body[data-page="resources/book"] .book-annotation .book-annotation-hook {
 letter-spacing:normal;line-height:1.5;
}
html[dir="rtl"] body[data-page="resources/book"] .book-annotation p {line-height:1.85;}
@media(max-width:700px){
 body[data-page="resources/book"] .book-annotation {padding-block-start:0;max-width:none;}
 body[data-page="resources/book"] .book-annotation .book-annotation-hook {font-size:26px;margin-block-end:22px;}
 body[data-page="resources/book"] .book-annotation p {font-size:16px;}
}

/* Direct language downloads, equally visible on every edition page. */
body[data-page="resources/book"] .book-downloads {
 width:100%;max-width:540px;margin:2.5rem auto 0;text-align:center;
}
body[data-page="resources/book"] .book-download-title {margin:0 0 18px;}
body[data-page="resources/book"] .book-language-options {
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;
}
body[data-page="resources/book"] .book-language {
 min-width:0;width:100%;padding:14px 10px;font-size:14px;letter-spacing:.01em;text-transform:none;
}
body[data-page="resources/book"] .book-language[lang="ar"] {letter-spacing:normal;}
@media(max-width:700px){
 body[data-page="resources/book"] .book-language-options {gap:8px;}
 body[data-page="resources/book"] .book-language {font-size:13px;padding-inline:8px;}
}
