/* Preserve the proportional book corners, ribbons and complete wheat cluster.
   Only plain paper/binding between the caps changes height. Desktop is intact. */
@media (max-width:700px), (max-width:1000px) and (max-height:550px) and (pointer:coarse) {
 .stage .object-stage[data-object="ingredients"]{width:min(430px,calc(100vw - 16px));bottom:max(8px,env(safe-area-inset-bottom));padding:0;container-type:size;display:flex;align-items:center;justify-content:center;overflow:visible}
 .stage .object-stage[data-object="ingredients"]::before{content:none}
 .stage .notebook-scene{--book-width:min(100cqw,calc((100cqh - 12px)/.96));position:relative;width:var(--book-width);height:100%;max-height:none;min-height:0;aspect-ratio:auto;padding:calc(var(--book-width)*.21) calc(var(--book-width)*.095) calc(var(--book-width)*.15) calc(var(--book-width)*.26);overflow:visible;isolation:isolate;flex-direction:column}
 .stage .notebook-scene:not([hidden]){display:flex}
 .stage .notebook-art{position:absolute;inset:0;z-index:-1;border-style:solid;border-color:transparent;border-width:0;border-image-width:calc(var(--book-width)*.24) calc(var(--book-width)*.08) calc(var(--book-width)*.72) calc(var(--book-width)*.23);border-image-source:url('./assets/mobile-notebook/book-v2.webp?v=8c23ac38f14b');border-image-slice:16% 8% 48% 23% fill;border-image-repeat:stretch}
 /* The picture stays in the existing image-decode/retry pipeline. */
 .stage .notebook-art img{opacity:0;object-fit:contain}
 .stage .notebook-intro,.stage .notebook-copy{position:relative;left:auto;top:auto;width:100%;margin:0;transform:none;color:#503925}
 .stage .notebook-intro{flex:none}
 .stage .notebook-intro>.eyebrow{font-size:9px;line-height:1.4;letter-spacing:.025em;margin:0 0 7px}
 .stage .notebook-intro h3{font-size:20px;line-height:1.25;letter-spacing:-.035em;white-space:normal;margin:0 0 12px}
 .stage .notebook-intro h3 em{display:block;font-size:1em;white-space:nowrap}
 .stage .notebook-choices{display:grid;grid-template-columns:1.15fr 1fr;gap:6px;margin:0}
 .stage .notebook-choices button{min-width:0;min-height:44px;padding:7px 5px;font-size:12px}
 .stage .notebook-copy{flex:1;min-height:0;margin-top:18px;padding-right:3px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;overflow-anchor:none;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#b79a6b transparent}
 .stage .notebook-copy>.eyebrow{display:none}
 .stage .notebook-copy h4{font-size:26px;line-height:1.18;margin:0 0 12px}
 .stage .notebook-copy p{font-size:17px;line-height:1.6;margin:0 0 14px}
 .stage .notebook-allergen{font-size:12px;line-height:1.4;margin:0;gap:6px}
 .stage .notebook-allergen span{font-size:16px}
 .stage .notebook-copy .text-link{display:none}
 /* Accessible fallback for enlarged text and windows below the checked sizes. */
 .stage .notebook-scene[data-recipe-overflow="true"] .notebook-copy{margin-bottom:16px}
 .stage .notebook-reading-hint{position:absolute;left:calc(var(--book-width)*.26);right:calc(var(--book-width)*.095);bottom:calc(var(--book-width)*.15);margin:0;color:#72593f;font:10px/1.2 var(--sans);text-align:center;pointer-events:none}
 .stage .notebook-reading-hint[hidden]{display:none}
 .stage .notebook-copy:focus-visible{outline:2px solid #9a7044;outline-offset:3px}
}
@media(max-width:700px) and (max-height:700px){
 .stage .notebook-intro h3{display:none}
 .stage .notebook-copy{margin-top:14px}
}
@media(max-width:700px) and (max-height:600px){
 .stage .notebook-intro>.eyebrow{display:none}
 .stage .notebook-copy{margin-top:8px}
 .stage .notebook-copy h4{font-size:23px;margin-bottom:9px}
 .stage .notebook-copy p{font-size:14px;line-height:1.5;margin-bottom:10px}
 .stage .notebook-allergen{font-size:11px}
}
@media(max-width:700px) and (max-height:500px){.stage .notebook-copy h4{display:none}}
@media(max-width:700px) and (max-height:460px){.stage .notebook-copy p{font-size:13.5px;line-height:1.45}}
/* The separately composed wide book keeps its proportions on rotation. */
@media(max-width:700px) and (max-height:550px) and (min-aspect-ratio:6/5), (max-width:1000px) and (max-height:550px) and (min-aspect-ratio:6/5) and (pointer:coarse){
 .stage .object-stage[data-object="ingredients"]{width:min(900px,calc(100vw - 16px))}
 .stage .notebook-scene{--book-width:min(100cqw,calc(100cqh*1944/809));height:calc(var(--book-width)*809/1944);padding:calc(var(--book-width)*.083) calc(var(--book-width)*.075) calc(var(--book-width)*.060) calc(var(--book-width)*.235);gap:12px;align-items:stretch;flex-direction:row}
 .stage .notebook-art{border-image:none}
 .stage .notebook-art img{opacity:1;object-fit:contain}
 .stage .notebook-intro{flex:0 0 30%;align-self:center}
 .stage .notebook-intro :is(h3,.eyebrow){display:none}
 .stage .notebook-choices{grid-template-columns:1fr;gap:8px}
 .stage .notebook-copy{flex:1;min-width:0;margin:0;padding:0}
 .stage .notebook-copy h4{display:none}
 .stage .notebook-copy p{font-size:13px;line-height:1.45;margin-bottom:8px}
 .stage .notebook-allergen{font-size:11px;line-height:1.3}
}
@media(forced-colors:active) and (max-width:700px){
 .stage .notebook-art{border-image:none}
 .stage .notebook-scene{background:Canvas;color:CanvasText}
}
