/* One photographic print per edition, shared by every appearance of that book.
   Artwork is text-free: the exact live title and supplied logo remain above it. */
[data-cover="sage"] {
  --real-book-image:url('assets/book-realistic-01.png');
  --real-book-wash:#fff5e529;
  --real-book-ink:#60401f;
}
[data-cover="cream"] {
  --real-book-image:url('assets/book-realistic-02.png');
  --real-book-wash:#6e3f282e;
  --real-book-ink:#fff2dc;
}
[data-cover="forest"] {
  --real-book-image:url('assets/book-realistic-03.png');
  --real-book-wash:#073b2c38;
  --real-book-ink:#fff1d5;
}
[data-cover="blue"] {
  --real-book-image:url('assets/book-realistic-04.png');
  --real-book-wash:#fff8ee29;
  --real-book-ink:#304b36;
}
[data-cover="olive"] {
  --real-book-image:url('assets/book-realistic-05.png');
  --real-book-wash:#34412233;
  --real-book-ink:#fff4db;
}
[data-cover="paper"] {
  --real-book-image:url('assets/book-realistic-06.png');
  --real-book-wash:#fff8ec29;
  --real-book-ink:#674524;
}

.resource-cover[data-cover],
.book-cover[data-cover],
.mini-cover[data-cover],
.reader-cover-face {
  background-color:var(--book-paper,var(--reader-cover));
  background-image:var(--real-book-image);
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  color:var(--real-book-ink);
  isolation:isolate;
  container-type:inline-size;
}

/* No leaf, wireframe, crosshatch or moire layer remains over the photograph.
   Hidden motif nodes keep the stable rendering hooks and fallback identities. */
.resource-cover .cover-illustration,
.book-stage .preview-motif,
.featured-book .mini-cover .preview-motif,
.reader-cover-motif,
.reader-cover-back .reader-back-motif { display:none; }

.resource-cover[data-cover]::before,
.book-cover[data-cover]::before,
.mini-cover[data-cover]::before,
.reader-cover-face::before {
  content:'';
  position:absolute;
  inset:0;
  z-index:0;
  opacity:1;
  pointer-events:none;
  background:linear-gradient(180deg,var(--real-book-wash) 0%,var(--real-book-wash) 32%,transparent 46%),linear-gradient(90deg,#21180f3b 0%,transparent 3.5%,#ffffff0d 5%,transparent 8%);
}
.book-cover[data-cover]::after,
.featured-book .mini-cover::after,
.reader-cover-front::after { content:none; }

/* A portrait print with a restrained binding and thin, real-looking page edge. */
.resource-card .resource-cover {
  width:100%;
  height:auto;
  aspect-ratio:3/4;
  padding:0;
  border:1px solid #59412633;
  border-left:3px solid #372a1e45;
  border-radius:2px 5px 5px 2px;
  box-shadow:inset 4px 0 5px #271d151c,1px 3px 7px #49332225;
}
.resource-pages {
  inset:3px -4px 0 4px;
  border-color:#c8b89d;
  border-radius:3px 6px 6px 3px;
  background:repeating-linear-gradient(0deg,#f9f3e8 0 1px,#ddd1bd 1px 2px);
  box-shadow:3px 6px 10px #4933221c;
}
.resource-cover .cover-head { display:none; }
.resource-cover .cover-title {
  position:absolute;
  top:20%;
  right:8%;
  left:8%;
  max-width:none;
  margin:0;
  font-size:clamp(15px,8.5cqw,32px);
  line-height:1.32;
  font-weight:700;
  color:inherit;
  text-shadow:0 1px 1px #ffffff20;
}
.resource-cover .cover-bottom {
  position:absolute;
  top:6%;
  right:8%;
  left:8%;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  gap:8px;
  font-size:clamp(7px,2.5cqw,10px);
  opacity:1;
}
.resource-cover .cover-bottom > span:first-child { max-width:58%;opacity:.9; }
.resource-cover .cover-bottom .book-brand { width:clamp(40px,21cqw,78px);height:clamp(19px,9cqw,34px); }

.book-stage .book-cover {
  border-radius:2px 5px 5px 2px;
  box-shadow:inset 5px 0 6px #21170e3d,inset 0 0 0 1px #ffffff30;
}
.book-stage .display-pages { inset:3px -5px 3px 4px;border-radius:3px 6px 6px 3px; }
.book-stage .display-series {
  position:absolute;
  top:6%;
  right:8%;
  left:8%;
  padding:0;
  border:0;
  font-size:clamp(7px,3.2cqw,10px);
}
.book-stage .display-series .book-brand { width:clamp(35px,23cqw,65px);height:clamp(17px,11cqw,30px); }
.book-stage .display-title,
.book-stage .display-book:not(.display-book-ivory) .display-title {
  position:absolute;
  top:20%;
  right:8%;
  left:8%;
  margin:0;
  font-size:clamp(14px,9cqw,29px);
  line-height:1.32;
  text-shadow:0 1px 1px #ffffff20;
}
.featured-book .mini-cover { border-radius:2px 4px 4px 2px;box-shadow:inset 3px 0 4px #21170e35,2px 1px 0 #ddcfb8,4px 4px 9px #49332224; }
.featured-book .mini-cover .book-brand { top:5%;bottom:auto;right:9%;width:55%;height:24%; }

/* The turning sheet keeps its original geometry and animation. The photo keeps
   its own ratio, filling that transient face without stretching or new motion. */
.reader-cover-face { padding:0; }
.reader-cover-edition {
  position:absolute;
  top:6%;
  right:8%;
  left:8%;
  z-index:1;
  padding:0;
  border:0;
  font-size:clamp(9px,2.4cqw,12px);
}
.reader-cover-edition .book-brand { width:clamp(65px,21cqw,100px);height:clamp(30px,9cqw,43px); }
.reader-cover-title {
  position:absolute;
  top:20%;
  right:8%;
  left:8%;
  margin:0;
  font-size:clamp(27px,8.5cqw,43px);
  line-height:1.32;
  color:inherit;
  text-shadow:0 1px 1px #ffffff20;
}
.reader-cover-bottom { position:absolute;right:8%;left:8%;bottom:5%;z-index:1;margin:0;padding:0;border:0;font-size:10px;text-shadow:0 1px 5px #0005; }
.reader-cover-back > .book-brand { position:absolute;top:7%;right:8%;width:clamp(65px,21cqw,100px);height:43px;z-index:1;opacity:1; }
.reader-cover-back > span:not(.book-brand):not(.reader-back-motif) { position:absolute;top:24%;right:8%;left:8%;z-index:1;opacity:1;color:inherit; }
.reader-dialog:is([data-cover="cream"],[data-cover="forest"],[data-cover="olive"]) .reader-cover-back .book-brand-logo { filter:brightness(0) invert(1); }

@media(max-width:370px) {
  .resource-cover .cover-title { font-size:clamp(13px,8.5cqw,17px);line-height:1.32;margin:0;max-width:none; }
  .resource-cover .cover-bottom .book-brand { width:clamp(34px,24cqw,48px);height:20px; }
}

/* The entire card remains one accessible button; this is its text-only CTA. */
.resource-card .resource-open {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:46px;
  margin-top:20px;
  padding:12px 20px;
  border:1px solid #194c3d;
  border-radius:12px;
  background:#194c3d;
  color:#fff7e9;
  font-size:15px;
  font-weight:700;
  line-height:1.5;
  text-align:center;
  text-decoration:none;
  box-shadow:0 3px 8px #194c3d12;
  transition:background .2s,border-color .2s,box-shadow .2s;
}
.resource-card:is(:hover,:focus-visible) .resource-open {
  background:#103e33;
  border-color:#103e33;
  box-shadow:0 5px 12px #194c3d24;
}
.resource-card:focus-visible .resource-open { outline:2px solid #a7865d;outline-offset:3px; }
@media(prefers-reduced-motion:reduce) { .resource-card .resource-open { transition:none; } }
