/* Prime Comic Reader // Printed metallic foil r2
   Dedicated to real first and last comic pages, including page-turn previews.
   The cover raster, artwork colors and ink are untouched. No glass, backdrop,
   chromatic pane, blur or separate animated full-page texture. The existing
   cover <span> is the only paint surface; its ancestors own page turns. */
.cr-cover-foil{
  position:absolute!important;
  inset:0!important;
  z-index:7!important;
  display:block!important;
  pointer-events:none!important;
  border:0!important;
  border-radius:inherit!important;
  overflow:hidden!important;
  background:none!important;
  box-shadow:none!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  isolation:auto!important;
  transform:none!important;
  animation:none!important;
  contain:paint;
}
/* FOIL R2 // Ink-first finish.
   The reflection is narrow and low-energy, not a white veil over the art.
   OVERLAY catches brighter metallic ink without turning shadows grey. */
.cr-cover-foil::before{
  content:"";
  position:absolute;
  inset:0;
  display:block;
  pointer-events:none;
  border:0;
  border-radius:inherit;
  opacity:.38;
  background:
    radial-gradient(ellipse 27% 21% at var(--cr-foil-light-x,50%) var(--cr-foil-light-y,44%),
      rgba(250,242,213,.27) 0%,rgba(221,215,187,.11) 35%,transparent 73%),
    linear-gradient(calc(var(--cr-foil-light-angle,116deg) + 90deg),
      transparent 0 42%,rgba(217,220,212,.035) 47%,
      rgba(250,241,207,.14) 50%,rgba(173,195,200,.035) 53%,transparent 59%);
  background-repeat:no-repeat;
  background-size:100% 100%;
  mix-blend-mode:overlay;
  filter:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  box-shadow:none!important;
  transform:none!important;
  animation:none!important;
}
/* A small glancing specular point travels with the existing Spatial pose.
   SOFT-LIGHT avoids the hard clipped white hotspot from SCREEN blending. */
.cr-cover-foil::after{
  content:"";
  display:block;
  position:absolute;
  inset:0;
  pointer-events:none;
  border:0;
  border-radius:inherit;
  opacity:.54;
  background:
    radial-gradient(ellipse 12% 9% at var(--cr-foil-light-x,50%) var(--cr-foil-light-y,44%),
      rgba(255,249,224,.36) 0%,rgba(226,230,216,.09) 40%,transparent 78%),
    linear-gradient(calc(var(--cr-foil-light-angle,116deg) + 90deg),
      transparent 0 47%,rgba(251,246,222,.16) 49%,
      rgba(212,222,225,.05) 51%,transparent 53%);
  background-repeat:no-repeat;
  background-size:100% 100%;
  mix-blend-mode:soft-light;
  box-shadow:none!important;
  filter:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  animation:none!important;
  transform:none!important;
}
.cr-cover-foil,
.cr-cover-foil::before,
.cr-cover-foil::after{
  backface-visibility:hidden;
}
.cr-swipe-turn-page>.cr-cover-foil,
.cr-swipe-underlay>.cr-cover-foil{z-index:2!important;}
/* In live turns the turn engine owns the fold shadow and highlight.
   The foil is part of the physical page rather than a screen-fixed pane. */
@media (prefers-reduced-motion:reduce){
 .cr-cover-foil::before,.cr-cover-foil::after{transition:none!important;}
}
/* A graceful fixed light remains when Spatial is off or unavailable. */

/* Cover-only page-turn control. Interior sheets retain their existing curl FX.
   The foil itself remains attached to the printed cover throughout the turn. */
.cr-swipe-turn-page[data-comic-cover]::before{
  width:25%!important;
  opacity:clamp(.08,var(--swipe-progress,0),.38)!important;
  mix-blend-mode:soft-light!important;
  background:linear-gradient(101deg,
    transparent 0 27%,rgba(218,226,219,.035) 38%,
    rgba(252,242,211,.28) 50%,rgba(206,216,218,.045) 62%,
    transparent 74%)!important;
}
.cr-book.cr-turn-active .cr-page.cr-active-turn[data-comic-cover]::before{
  opacity:.30!important;
  mix-blend-mode:soft-light!important;
  animation:none!important;
  filter:none!important;
  background:linear-gradient(103deg,
    rgba(0,0,0,.12),transparent 28%,
    rgba(247,239,212,.24) 46%,rgba(203,217,222,.05) 52%,
    transparent 64%,rgba(0,0,0,.13))!important;
}
.cr-book.cr-turn-active:has(.cr-page.cr-active-turn[data-comic-cover]) .cr-book-turn-flash::before{
  opacity:.32!important;
  background:linear-gradient(101deg,
    transparent 22%,rgba(250,240,211,.19) 48%,transparent 75%)!important;
}
/* Cover artwork is unchanged in all renderers, including reduced motion. */
