/* book3d.css — Tab 2026-10-27 (v2, front view): covers shown as real printed books on the website.
   Pure CSS, no 3D transform (stays razor sharp); cover image files and PDFs are never changed. */
.b3d{--bw:200px;--sp:calc(var(--bw) * .075);--pg:calc(var(--bw) * .024);--bc:#c8442a;--bk:#7a2a1a;position:relative;isolation:isolate;display:block;width:var(--bw);max-width:calc(100% - var(--sp) - var(--pg) - 10px);margin:0 auto;align-self:start;padding:6px calc(var(--pg) + 8px) calc(var(--pg) + 16px) var(--sp);box-sizing:content-box;line-height:0;-webkit-tap-highlight-color:transparent}
.b3d .b3d-book{position:relative;display:block;width:100%}
.b3d .b3d-front{position:relative;z-index:3;display:block!important;width:100%!important;max-width:none!important;max-height:none!important;min-width:0!important;height:auto!important;aspect-ratio:auto!important;margin:0!important;padding:0!important;border:0!important;object-fit:fill!important;border-radius:0 3px 3px 0!important;transform:none!important;background:#eee;box-shadow:none!important;opacity:1!important}
.b3d .b3d-gloss,.b3d .b3d-spine,.b3d .b3d-pages,.b3d .b3d-back,.b3d .b3d-shadow{position:absolute;pointer-events:none;display:block}
/* hinge crease + soft gloss + a hint of edge darkening, laid over the cover */
.b3d .b3d-gloss{z-index:4;inset:0;border-radius:0 3px 3px 0;
 background:
  linear-gradient(90deg,rgba(0,0,0,.34) 0,rgba(0,0,0,.10) 1.2%,rgba(255,255,255,.34) 2.4%,rgba(255,255,255,.06) 3.8%,rgba(0,0,0,.22) 5%,rgba(0,0,0,.06) 6.8%,rgba(0,0,0,0) 9%),
  linear-gradient(125deg,rgba(255,255,255,.20) 0,rgba(255,255,255,.06) 22%,rgba(255,255,255,0) 38%,rgba(255,255,255,0) 62%,rgba(255,255,255,.10) 74%,rgba(255,255,255,0) 86%),
  linear-gradient(90deg,rgba(0,0,0,0) 96%,rgba(0,0,0,.10) 100%),
  linear-gradient(180deg,rgba(0,0,0,0) 94%,rgba(0,0,0,.10) 100%);
 box-shadow:inset 0 0 0 .5px rgba(0,0,0,.16)}
/* spine on the left: its own face, shaded like a rounded paperback spine, edge slightly foreshortened */
.b3d .b3d-spine{z-index:2;top:0;bottom:0;right:calc(100% - 1px);width:var(--sp);border-radius:3px 0 0 3px;
 clip-path:polygon(0 1.4%,100% 0,100% 100%,0 98.6%);
 background:
  linear-gradient(90deg,rgba(0,0,0,.42) 0,rgba(0,0,0,.18) 18%,rgba(255,255,255,.20) 46%,rgba(255,255,255,.04) 64%,rgba(0,0,0,.30) 88%,rgba(0,0,0,.45) 100%),
  linear-gradient(180deg,rgba(255,255,255,.10) 0,rgba(0,0,0,0) 20%,rgba(0,0,0,0) 80%,rgba(0,0,0,.18) 100%),
  var(--bc)}
/* page block peeking out on the right and bottom, back board behind it */
.b3d .b3d-pages{z-index:1;left:2px;top:3px;right:calc(var(--pg) * -1);bottom:calc(var(--pg) * -1);border-radius:0 3px 3px 0;
 background:
  linear-gradient(90deg,rgba(0,0,0,0) calc(100% - var(--pg)),rgba(0,0,0,.05) calc(100% - var(--pg) * .5),rgba(0,0,0,.18) 100%),
  linear-gradient(180deg,rgba(0,0,0,0) calc(100% - var(--pg)),rgba(0,0,0,.06) calc(100% - var(--pg) * .5),rgba(0,0,0,.20) 100%),
  repeating-linear-gradient(90deg,#fdfbf4 0,#fdfbf4 .8px,#d8d1c0 .8px,#d8d1c0 1.3px,#f3efe3 1.3px,#f3efe3 2.1px) right top/var(--pg) 100% no-repeat,
  repeating-linear-gradient(180deg,#fdfbf4 0,#fdfbf4 .8px,#d8d1c0 .8px,#d8d1c0 1.3px,#f3efe3 1.3px,#f3efe3 2.1px) left bottom/100% var(--pg) no-repeat,
  #f3efe3}
.b3d .b3d-back{z-index:0;left:4px;top:5px;right:calc(var(--pg) * -1 - 1.5px);bottom:calc(var(--pg) * -1 - 1.5px);border-radius:0 4px 4px 0;background:var(--bk)}
/* soft cast shadow + contact shadow on the "table" */
.b3d .b3d-shadow{z-index:-1;left:calc(var(--sp) * -1 + 2px);top:4%;right:calc(var(--pg) * -1 - 1px);bottom:calc(var(--pg) * -1 - 1px);border-radius:4px;
 box-shadow:14px 18px 26px -6px rgba(40,20,0,.38),4px 6px 10px rgba(40,20,0,.22)}
.b3d::after{content:"";position:absolute;z-index:-2;left:calc(var(--sp) * .2);right:2px;bottom:4px;height:22px;border-radius:50%;background:radial-gradient(closest-side,rgba(40,20,0,.30),rgba(40,20,0,0))}
/* sizes (cover width; mobile first) */
.b3d-feature{--bw:min(200px,52vw)}
.b3d-hero{--bw:min(215px,56vw)}
.b3d-final{--bw:min(165px,44vw)}
.b3d-bonus{--bw:min(170px,46vw)}
.b3d-card{--bw:80px}
.b3d-mini{--bw:52px}
@media (max-width:370px){.b3d-card{--bw:70px}}
@media (min-width:640px){.b3d-card{--bw:160px}}
@media (min-width:900px){.b3d-feature{--bw:230px}.b3d-hero{--bw:300px}.b3d-bonus{--bw:205px}.b3d-final{--bw:175px}}
.hm-feat-img:has(.b3d){padding:10px 0 0}
.bk-cover:has(.b3d){padding:6px 0 0}
.hero-media .b3d,.final-card .b3d{margin:0 auto 6px}

/* ---- "Website book image" (a finished book picture uploaded per ebook in admin) — Tab 2026-10-27 ---- */
.bki{--bw:200px;position:relative;isolation:isolate;display:block;width:var(--bw);max-width:100%;margin:0 auto;align-self:start;padding:4px 0 16px;line-height:0}
.bki img{position:relative;z-index:1;display:block!important;width:100%!important;max-width:none!important;max-height:none!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;object-fit:fill!important;background:transparent!important;box-shadow:none!important;transform:none!important;
 filter:drop-shadow(9px 12px 14px rgba(40,20,0,.26)) drop-shadow(2px 3px 4px rgba(40,20,0,.16))}
.bki::after{content:"";position:absolute;z-index:0;left:8%;right:4%;bottom:6px;height:22px;border-radius:50%;background:radial-gradient(closest-side,rgba(40,20,0,.28),rgba(40,20,0,0))}
.bki-flat img{mix-blend-mode:multiply;filter:none}
.bki-feature{--bw:min(260px,66vw)}
.bki-hero{--bw:min(270px,68vw)}
.bki-final{--bw:min(200px,52vw)}
.bki-bonus{--bw:min(200px,52vw)}
.bki-card{--bw:96px;padding-bottom:10px}
.bki-mini{--bw:60px;padding-bottom:4px}
.bki-card::after,.bki-mini::after{height:12px;bottom:3px}
@media (max-width:370px){.bki-card{--bw:84px}}
@media (min-width:640px){.bki-card{--bw:180px}}
@media (min-width:900px){.bki-feature{--bw:300px}.bki-hero{--bw:360px}.bki-final,.bki-bonus{--bw:220px}}
.hm-feat-img:has(.bki){padding:14px 0 2px}
.bk-cover:has(.bki){padding:6px 0 0}
.hero-media .bki,.final-card .bki{margin:0 auto 6px}
