/* Approved six-paper surfaces: one fixed material scale in every reader mode. */
html body[data-paper="ivory"] {--paper:#f8f6ef!important;--paper-texture:image-set(url("/paper-surfaces/20261018-v1/india-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/india-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/india-3x.avif") type("image/avif") 3x)!important;--paper-texture-size:384px 384px!important;}
html body[data-paper="ivory"][data-reading-mode] #reader-scroll > #paper.paper {background-color:#f8f6ef!important;background-image:image-set(url("/paper-surfaces/20261018-v1/india-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/india-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/india-3x.avif") type("image/avif") 3x)!important;background-size:384px 384px!important;background-repeat:repeat!important;background-position:0 0!important;background-blend-mode:normal!important;}
html body[data-reading-mode="book"][data-paper="ivory"][data-visual-style][data-theme-tone][data-page-turn-effect] .page-turn-illusion .page-turn-illusion-sheet::after {background-color:#f8f6ef!important;background-image:linear-gradient(270deg,rgba(255,255,255,.04),transparent 24%,transparent 76%,rgba(0,0,0,.07)),image-set(url("/paper-surfaces/20261018-v1/india-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/india-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/india-3x.avif") type("image/avif") 3x)!important;background-size:100% 100%,384px 384px!important;background-repeat:no-repeat,repeat!important;}
.paper-swatch[data-paper-choice="ivory"] span {background:#f8f6ef url("/paper-surfaces/20261018-v1/india-swatch.webp") center / cover!important;}
html body[data-paper="cream"] {--paper:#f8eed4!important;--paper-texture:image-set(url("/paper-surfaces/20261018-v1/cream-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/cream-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/cream-3x.avif") type("image/avif") 3x)!important;--paper-texture-size:384px 384px!important;}
html body[data-paper="cream"][data-reading-mode] #reader-scroll > #paper.paper {background-color:#f8eed4!important;background-image:image-set(url("/paper-surfaces/20261018-v1/cream-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/cream-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/cream-3x.avif") type("image/avif") 3x)!important;background-size:384px 384px!important;background-repeat:repeat!important;background-position:0 0!important;background-blend-mode:normal!important;}
html body[data-reading-mode="book"][data-paper="cream"][data-visual-style][data-theme-tone][data-page-turn-effect] .page-turn-illusion .page-turn-illusion-sheet::after {background-color:#f8eed4!important;background-image:linear-gradient(270deg,rgba(255,255,255,.04),transparent 24%,transparent 76%,rgba(0,0,0,.07)),image-set(url("/paper-surfaces/20261018-v1/cream-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/cream-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/cream-3x.avif") type("image/avif") 3x)!important;background-size:100% 100%,384px 384px!important;background-repeat:no-repeat,repeat!important;}
.paper-swatch[data-paper-choice="cream"] span {background:#f8eed4 url("/paper-surfaces/20261018-v1/cream-swatch.webp") center / cover!important;}
html body[data-paper="ivory-paper"] {--paper:#ebdabd!important;--paper-texture:image-set(url("/paper-surfaces/20261018-v1/ivory-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/ivory-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/ivory-3x.avif") type("image/avif") 3x)!important;--paper-texture-size:384px 384px!important;}
html body[data-paper="ivory-paper"][data-reading-mode] #reader-scroll > #paper.paper {background-color:#ebdabd!important;background-image:image-set(url("/paper-surfaces/20261018-v1/ivory-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/ivory-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/ivory-3x.avif") type("image/avif") 3x)!important;background-size:384px 384px!important;background-repeat:repeat!important;background-position:0 0!important;background-blend-mode:normal!important;}
html body[data-reading-mode="book"][data-paper="ivory-paper"][data-visual-style][data-theme-tone][data-page-turn-effect] .page-turn-illusion .page-turn-illusion-sheet::after {background-color:#ebdabd!important;background-image:linear-gradient(270deg,rgba(255,255,255,.04),transparent 24%,transparent 76%,rgba(0,0,0,.07)),image-set(url("/paper-surfaces/20261018-v1/ivory-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/ivory-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/ivory-3x.avif") type("image/avif") 3x)!important;background-size:100% 100%,384px 384px!important;background-repeat:no-repeat,repeat!important;}
.paper-swatch[data-paper-choice="ivory-paper"] span {background:#ebdabd url("/paper-surfaces/20261018-v1/ivory-swatch.webp") center / cover!important;}
html body[data-paper="beige"] {--paper:#f2e7ce!important;--paper-texture:image-set(url("/paper-surfaces/20261018-v1/laid-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/laid-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/laid-3x.avif") type("image/avif") 3x)!important;--paper-texture-size:384px 384px!important;}
html body[data-paper="beige"][data-reading-mode] #reader-scroll > #paper.paper {background-color:#f2e7ce!important;background-image:image-set(url("/paper-surfaces/20261018-v1/laid-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/laid-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/laid-3x.avif") type("image/avif") 3x)!important;background-size:384px 384px!important;background-repeat:repeat!important;background-position:0 0!important;background-blend-mode:normal!important;}
html body[data-reading-mode="book"][data-paper="beige"][data-visual-style][data-theme-tone][data-page-turn-effect] .page-turn-illusion .page-turn-illusion-sheet::after {background-color:#f2e7ce!important;background-image:linear-gradient(270deg,rgba(255,255,255,.04),transparent 24%,transparent 76%,rgba(0,0,0,.07)),image-set(url("/paper-surfaces/20261018-v1/laid-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/laid-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/laid-3x.avif") type("image/avif") 3x)!important;background-size:100% 100%,384px 384px!important;background-repeat:no-repeat,repeat!important;}
.paper-swatch[data-paper-choice="beige"] span {background:#f2e7ce url("/paper-surfaces/20261018-v1/laid-swatch.webp") center / cover!important;}
html body[data-paper="antique"] {--paper:#e2d2a1!important;--paper-texture:image-set(url("/paper-surfaces/20261018-v1/vellum-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/vellum-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/vellum-3x.webp") type("image/webp") 3x)!important;--paper-texture-size:512px 341.3333333333333px!important;}
html body[data-paper="antique"][data-reading-mode] #reader-scroll > #paper.paper {background-color:#e2d2a1!important;background-image:image-set(url("/paper-surfaces/20261018-v1/vellum-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/vellum-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/vellum-3x.webp") type("image/webp") 3x)!important;background-size:512px 341.3333333333333px!important;background-repeat:repeat!important;background-position:0 0!important;background-blend-mode:normal!important;}
html body[data-reading-mode="book"][data-paper="antique"][data-visual-style][data-theme-tone][data-page-turn-effect] .page-turn-illusion .page-turn-illusion-sheet::after {background-color:#e2d2a1!important;background-image:linear-gradient(270deg,rgba(255,255,255,.04),transparent 24%,transparent 76%,rgba(0,0,0,.07)),image-set(url("/paper-surfaces/20261018-v1/vellum-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/vellum-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/vellum-3x.webp") type("image/webp") 3x)!important;background-size:100% 100%,512px 341.3333333333333px!important;background-repeat:no-repeat,repeat!important;}
.paper-swatch[data-paper-choice="antique"] span {background:#e2d2a1 url("/paper-surfaces/20261018-v1/vellum-swatch.webp") center / cover!important;}
html body[data-reading-mode="scroll"][data-paper="antique"] #reader-scroll > #paper.paper {background-image:none!important;background-color:transparent!important;}
html body[data-reading-mode="scroll"][data-paper="antique"] #reader-scroll > #paper.paper::before {background-color:#e2d2a1!important;background-image:image-set(url("/paper-surfaces/20261018-v1/vellum-1x.avif") type("image/avif") 1x,url("/paper-surfaces/20261018-v1/vellum-2x.avif") type("image/avif") 2x,url("/paper-surfaces/20261018-v1/vellum-3x.webp") type("image/webp") 3x)!important;background-size:512px 341.3333333333333px!important;background-repeat:repeat!important;background-position:0 0!important;}
html body[data-paper="black"] {--paper:#111310!important;--paper-texture:none!important;--paper-texture-size:auto!important;}
html body[data-paper="black"][data-reading-mode] #reader-scroll > #paper.paper {background-color:#111310!important;background-image:none!important;background-size:auto!important;background-repeat:repeat!important;background-position:0 0!important;background-blend-mode:normal!important;}
html body[data-reading-mode="book"][data-paper="black"][data-visual-style][data-theme-tone][data-page-turn-effect] .page-turn-illusion .page-turn-illusion-sheet::after {background-color:#111310!important;background-image:linear-gradient(270deg,rgba(255,255,255,.04),transparent 24%,transparent 76%,rgba(0,0,0,.07)),none!important;background-size:100% 100%,auto!important;background-repeat:no-repeat,repeat!important;}
.paper-swatch[data-paper-choice="black"] span {background:#111310!important;}

/* Ivory uses the light-paper text palette independently of chrome tone. */
html body[data-paper="ivory-paper"] {--reader-ink:#29271f;--reader-muted:#6f5e42;--reader-accent:#7f332b;--reader-rule:rgba(91,72,49,.24);--reader-hover:rgba(135,59,50,.06);--reader-control-bg:rgba(255,252,244,.62);}

/* Vellum's shallow hand-cut Scroll outline applies in every theme.
   Short paint sections avoid full-book mask limits. Book outlines are
   independent; Temple's existing hand-cut Book mask remains in styles.css. */
.vellum-edge-surface {display:none;}
html body[data-reading-mode="scroll"][data-visual-style][data-paper="antique"][data-theme-tone] #reader-scroll > #paper.paper::before {content:none!important;display:none!important;}
html body[data-reading-mode="scroll"][data-visual-style][data-paper="antique"][data-theme-tone] #reader-scroll > #paper.paper > .vellum-edge-surface {
  display:block!important;position:absolute!important;inset:0!important;
  z-index:-1!important;pointer-events:none!important;overflow:clip!important;
}
.vellum-edge-segment {
  display:block;position:absolute;left:0;right:0;pointer-events:none;
  background:rgba(90,60,25,.38);
}
.vellum-edge-face {
  display:block;position:absolute;inset:0;pointer-events:none;
  background-color:var(--paper);background-image:var(--paper-texture);
  background-size:512px 341.3333333333333px;background-repeat:repeat;
}
@media(max-width:600px) {
  html body[data-reading-mode="scroll"][data-visual-style][data-paper="antique"][data-theme-tone] #reader-scroll > #paper.paper > .vellum-edge-surface {
    inset:0 -6px!important;
  }
  html body[data-reading-mode="scroll"] #paper .scroll-range-footer {
    position:relative;left:var(--scroll-footer-offset,0px);
  }
}

/* Vellum has a cut silhouette rather than a rectangular paper/shade layer. */
html body[data-reading-mode="scroll"][data-paper="antique"][data-visual-style][data-theme-tone] #reader-scroll > #paper.paper {
  box-shadow:none!important;
}
html body[data-reading-mode="scroll"][data-paper="antique"][data-visual-style="jacobean"] #reader.reader-shell::before {
  content:none!important;display:none!important;
}

/* Carry the existing irregular Vellum edge profile around all four sides. Its shadow belongs on
   an unmasked wrapper: applying the filter to the masked paper clips the
   shadow at precisely the top/bottom edge it should describe. Text and the
   pagination viewport remain independent of this decorative paint layer. */
html body[data-reading-mode="book"][data-visual-style="jerusalem"][data-paper="antique"][data-theme-tone] #reader-scroll > #paper.paper {
  background:transparent!important;box-shadow:none!important;
  -webkit-mask:none!important;mask:none!important;filter:none!important;
  overflow:visible!important;isolation:isolate;
}
.vellum-book-edge-surface {display:none;}
html body[data-reading-mode="book"][data-visual-style="jerusalem"][data-paper="antique"][data-theme-tone] #paper > .vellum-book-edge-surface {
  display:block;position:absolute;inset:0;z-index:-1;pointer-events:none;
  filter:drop-shadow(0 -1px 0 rgba(103,71,35,.34)) drop-shadow(-1px 0 0 rgba(83,54,24,.24)) drop-shadow(1px 0 0 rgba(83,54,24,.24)) drop-shadow(0 2px 3px rgba(31,15,5,.30)) drop-shadow(0 10px 17px rgba(31,15,5,.16));
}
.vellum-book-edge-sheet {
  display:block;position:absolute;inset:0;background-color:var(--paper);
  background-image:var(--paper-texture);background-size:var(--paper-texture-size);background-repeat:repeat;
  -webkit-mask:url('assets/materials/temple-vellum-sheet-mask-v2.svg') center / 100% 100% no-repeat;
  mask:url('assets/materials/temple-vellum-sheet-mask-v2.svg') center / 100% 100% no-repeat;
}
html body[data-reading-mode="book"][data-visual-style="jerusalem"][data-paper="antique"][data-theme-tone] #reader-scroll > #paper.paper::after {
  top:1.25%;bottom:1.25%;
}
