/* Reader-only landscape controls: leave space for both facing pages. */
@media (orientation:landscape) and (max-height:560px){.academy-epbd-folio[data-zen=true] .academy-ebd-controls{flex-wrap:nowrap;overflow-x:auto;max-width:100%;min-height:40px;flex-shrink:0}.academy-epbd-folio[data-zen=true] .academy-ebd-controls>button{flex-shrink:0}.academy-epbd-folio[data-zen=true] .academy-folio-hint{font-size:11px;line-height:1.25;padding:3px 12px}.academy-epbd-folio[data-zen=true] .academy-folio-footer{min-height:34px;flex-shrink:0}.academy-epbd-folio[data-zen=true] .academy-folio-stage{min-height:120px}}


/* Full-bleed story leaves. Live text, never a UI card or baked lettering. */
[data-story=true] .folio-physical-page,[data-story=true] .folio-probe-leaf{padding:0!important;background:#fff9df}
[data-story=true] .folio-ink{container-type:size}
[data-story=true] .folio-story-canvas{width:100%;height:100%;position:relative;overflow:hidden}
[data-story=true] .folio-ink .academy-ebd-story-scene{display:block;position:absolute;inset:0;width:100%;height:100%;margin:0!important;border:0;border-radius:0;box-shadow:none;background:transparent;overflow:hidden}
[data-story=true] .folio-ink .academy-ebd-story-scene>img{position:absolute;inset:0;width:100%!important;height:100%!important;max-height:none!important;object-fit:contain!important;margin:0!important;border:0!important;border-radius:0!important;padding:0!important}
[data-story=true] .folio-ink .academy-ebd-story-words{position:absolute;inset:auto;top:5%;left:5%;width:78%;max-width:90%;margin:0!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:#253328;font-family:QadmaNunito,ui-rounded,Trebuchet MS,sans-serif;font-weight:800;font-size:clamp(16px,4cqw,32px);line-height:1.28;white-space:pre-line;text-wrap:pretty;text-shadow:0 1px 3px #fff9df70}
[data-story=true][data-large=true] .folio-ink .academy-ebd-story-words{font-size:clamp(24px,5cqw,42px)}
[data-story=true] .academy-ebd-story-scene[data-placement=bottom] .academy-ebd-story-words{top:auto;bottom:5%}
[data-story=true] .academy-ebd-story-scene[data-placement=top-right] .academy-ebd-story-words{left:auto;right:5%;width:65%}
[data-story=true] .academy-ebd-story-scene[data-theme=cream] .academy-ebd-story-words{color:#fff8d8;text-shadow:0 1px 4px #122832cc}
[data-story=true] .folio-ink .academy-ebd-story-scene{inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);width:min(100%,80cqh);height:min(100%,125cqw);container-type:size}
[data-story=true] .folio-ink .academy-ebd-story-words{font-size:clamp(16px,4.8cqw,32px);width:82%;line-height:1.22}
[data-story=true][data-large=true] .folio-ink .academy-ebd-story-words{font-size:clamp(22px,5.4cqw,42px)}
[data-story=true] .academy-ebd-story-scene[data-placement=top-center] .academy-ebd-story-words{left:9%;right:auto;top:5%;width:82%}
[data-story=true] .academy-ebd-story-scene[data-placement=bottom-right] .academy-ebd-story-words{top:auto;bottom:5%;left:auto;right:5%;width:82%}
[data-story=true] .academy-ebd-story-scene[data-placement=top-right] .academy-ebd-story-words{top:5%;left:auto;right:5%;width:82%}

/* Story-only paper ratio and text-safe zones; other editions retain their size. */
[data-story=true] .academy-ebd-story-scene:has(img[src$="page-07.jpg"]) .academy-ebd-story-words,
[data-story=true] .academy-ebd-story-scene:has(img[src$="page-08.jpg"]) .academy-ebd-story-words{left:26%;right:5%;width:69%;top:4%;font-size:clamp(15px,4.1cqw,30px);line-height:1.18}
@media(max-height:500px) and (orientation:landscape){
[data-story=true][data-large=false] .folio-ink .academy-ebd-story-words{font-size:clamp(11px,4.7cqw,21px);line-height:1.18}
[data-story=true][data-large=false] .academy-ebd-story-scene:has(img[src$="page-07.jpg"]) .academy-ebd-story-words,
[data-story=true][data-large=false] .academy-ebd-story-scene:has(img[src$="page-08.jpg"]) .academy-ebd-story-words{font-size:clamp(10px,4.1cqw,19px)}
}

/* Approved replacement art 07/08 has a wide quiet sky. */
[data-story=true] .academy-ebd-story-scene:has(img[src$="page-07.jpg"]) .academy-ebd-story-words,
[data-story=true] .academy-ebd-story-scene:has(img[src$="page-08.jpg"]) .academy-ebd-story-words{left:9%;right:auto;width:82%;top:6%;font-size:clamp(16px,4.5cqw,31px);line-height:1.2}
@media(max-height:500px) and (orientation:landscape){
[data-story=true][data-large=false] .academy-ebd-story-scene:has(img[src$="page-07.jpg"]) .academy-ebd-story-words,
[data-story=true][data-large=false] .academy-ebd-story-scene:has(img[src$="page-08.jpg"]) .academy-ebd-story-words{font-size:clamp(10px,4.4cqw,20px)}
}

/* Short landscape: larger live text still fits the whole illustrated leaf. */
@media(max-height:500px) and (orientation:landscape){
[data-story=true][data-large=true] .folio-ink .academy-ebd-story-words{font-size:clamp(14px,6.5cqw,18px)!important;line-height:1.15}
}

@media(max-height:500px) and (orientation:landscape){
[data-story=true][data-large=true] .academy-ebd-story-scene:has(img[src$="page-07.jpg"]) .academy-ebd-story-words,
[data-story=true][data-large=true] .academy-ebd-story-scene:has(img[src$="page-08.jpg"]) .academy-ebd-story-words{font-size:clamp(12px,5.7cqw,16px)!important;line-height:1.15}
}

/* Master cover reserves the SAME height before/after lazy image decode. */
[data-master=true] .folio-ink img{width:100%!important;height:130px!important;min-height:130px!important;max-height:130px!important;object-fit:contain!important}
@media(max-height:500px){[data-master=true] .folio-ink img{height:64px!important;min-height:64px!important;max-height:64px!important}}

/* Touch uses the same physical page-turn in either direction; contain horizontal browser overscroll. */
.academy-epbd-folio .folio-physical,
.academy-epbd-folio .folio-physical .stf__parent,
.academy-epbd-folio .folio-physical .stf__wrapper,
.academy-epbd-folio .folio-physical .stf__block{touch-action:pan-y;overscroll-behavior-x:contain}
.academy-epbd-folio[data-zen=true] .academy-folio-stage{padding:0}
/* Journal art, except the calibrated 3–6 story canvas: scale inside the measured physical leaf. */
.academy-epbd-folio[data-story=false] .folio-ink img,
.academy-epbd-folio[data-story=false] .folio-ink img[src*="-wide."]{
  display:block!important;width:100%!important;max-width:100%!important;
  height:auto!important;min-height:0!important;max-height:min(420px,65cqh)!important;
  object-fit:contain!important;object-position:center!important;
  margin:8px auto!important;padding:0!important;background:transparent!important;
  border:0!important;box-shadow:none!important;border-radius:0!important
}
.academy-epbd-folio[data-story=false][data-master=true] .folio-ink img{
  height:min(400px,65cqh)!important;max-height:min(400px,65cqh)!important
}
.academy-epbd-folio[data-story=false] .folio-ink img.academy-ebd-adult-cover,
.academy-epbd-folio[data-story=false] .folio-ink img[src*="/cover-"]{
  max-height:min(480px,72cqh)!important;object-fit:contain!important
}
@media (max-height:500px) and (orientation:landscape){
  .academy-epbd-folio[data-story=false] .folio-ink img,
  .academy-epbd-folio[data-story=false] .folio-ink img[src*="-wide."],
  .academy-epbd-folio[data-story=false] .folio-ink img.academy-ebd-adult-cover,
  .academy-epbd-folio[data-story=false] .folio-ink img[src*="/cover-"]{
    max-height:62cqh!important;margin-block:6px!important
  }
  .academy-epbd-folio[data-story=false][data-master=true] .folio-ink img{
    height:62cqh!important;max-height:62cqh!important
  }
}
/* Keep the full 7–10 cover composition visible in the catalog as well as the reader. */
.academy-ebd-card .academy-cover{
  justify-content:flex-start;overflow:hidden
}
.academy-ebd-card .academy-cover-photo{
  position:relative;inset:auto!important;display:block;width:100%!important;
  height:auto!important;max-height:clamp(180px,28vw,260px);
  object-fit:contain!important;object-position:center;border-radius:8px
}
.academy-ebd-card .academy-cover-shade{display:none}
.academy-ebd-card .academy-cover-kicker{margin-top:auto;padding-top:12px}
/* Scene 02: feather the local wave foam under live words, without moving or masking the artwork. */
[data-story=true] .academy-ebd-story-scene:has(>img[src$="/scene-02.jpg"]) .academy-ebd-story-words::before{
  content:"";position:absolute;inset:-11px -15px;z-index:-1;pointer-events:none;
  border-radius:13px;background:rgba(29,15,38,.72);filter:blur(8px)
}
/* If a tiny phone exits zen with Aa+ still on, keep its text within the picture. */
@media (orientation:portrait) and (max-height:700px){
  @container (max-width:240px){
    .academy-epbd-folio[data-story=true][data-large=true][data-zen=false] .folio-ink .academy-ebd-story-words{
      font-size:clamp(16px,8.4cqw,22px)
    }
  }
}