/* Artwork supplied by the owner. Text stays on the real pages, without a UI panel. */
.object-stage[data-object="ingredients"] {
  width: min(1280px, 96vw, calc((100dvh - 150px) * 1.59879));
  max-height: none;
  top: calc(50% + 29px);
  translate: -50% -50%;
}
.notebook-scene { aspect-ratio: 1586 / 992; isolation: isolate; }
.notebook-art { position: absolute; inset: 0; display: block; z-index: -1; pointer-events: none; }
.notebook-art img { width: 100%; height: 100%; display: block; object-fit: contain; }
.notebook-intro { position: absolute; left: 25%; top: 24%; width: 26%; color: #503925; }
.notebook-intro .eyebrow { font-size: clamp(8px, .72vw, 11px); color: #80694a; letter-spacing: .07em; }
.notebook-intro h3 { font: 400 clamp(25px, 3vw, 44px)/1.24 var(--serif); letter-spacing: -.045em; margin: 15px 0 8px; }
.notebook-intro h3 em { display: block; font-size: .91em; }
.notebook-choices { flex-wrap: nowrap; gap: 9px; margin: 0; }
.notebook-choices button { background: #d9c5a344; border: 1px solid #ad927266; border-bottom: 3px solid #ad9272; border-radius: 2px 2px 0 0; padding: 9px 11px; min-width: 52px; min-height: 46px; color: #70553b; font: 500 12px/1.3 var(--sans); }
.notebook-choices button:hover { background: #d7bea477; }
.notebook-choices [aria-pressed="true"] { background: #873a2e; color: #fff6e4; border-color: #873a2e; border-bottom-color: #59251c; font-weight: 600; box-shadow: 0 2px 3px #50331b26; }
.notebook-choices [aria-pressed="true"]:hover { background: #783126; }
.notebook-copy { position: absolute; left: 58.2%; top: 23%; width: 28%; color: #503925; transform: rotate(-1deg); }
.notebook-copy .eyebrow { font-size: clamp(8px, .72vw, 11px); color: #80694a; }
.notebook-copy h4 { font: 500 clamp(23px, 2.2vw, 33px)/1.25 var(--serif); letter-spacing: -.025em; margin: 13px 0 17px; }
.notebook-copy p { font: 400 clamp(12px, 1.04vw, 16px)/1.85 var(--sans); margin: 0 0 18px; }
.notebook-allergen { display: flex; align-items: center; gap: 8px; font: 11px/1.5 var(--sans); color: #6e593d; margin-bottom: 15px; }
.notebook-allergen span { font-size: 18px; }
.notebook-copy .text-link { min-height: 44px; font-size: 11px; }
.object-stage[data-object="ingredients"] > .close { right: 9%; top: 12.5%; border: 0; background: #f8edce99; box-shadow: none; }
.object-stage[data-object="ingredients"] .object-footer { margin-top: -3%; position: relative; z-index: 1; }
@media (min-width: 701px) and (max-aspect-ratio: 1/1) {
  .object-stage[data-object="ingredients"] { width: min(100vw, 1100px); }
  .notebook-intro { top: 23%; }
  .notebook-intro h3 { font-size: clamp(25px, 3.7vw, 40px); margin: 12px 0 2px; }
  .notebook-choices { gap: 8px; }
  .notebook-choices button { font-size: 11px; }
  .notebook-copy p { font-size: 12px; line-height: 1.7; }
  .notebook-copy h4 { font-size: 23px; margin-bottom: 12px; }
  .notebook-allergen { font-size: 10px; margin-bottom: 4px; }
  .notebook-copy .text-link { display: none; }
}

/* Keep the live copy inside the light paper when a desktop window is short.
   The book scales with the available height, so the text follows that same
   scale instead of retaining a viewport-width size and spilling onto the
   foreground stones. */
@media (min-width: 701px) and (min-aspect-ratio: 1/1) and (min-height: 551px) {
  .notebook-copy h4 {
    font-size: clamp(21px, 3.55dvh, 33px);
    line-height: 1.18;
    margin: clamp(8px, 1.6dvh, 13px) 0 clamp(9px, 1.8dvh, 17px);
  }
  .notebook-copy p {
    font-size: clamp(11px, 1.75dvh, 16px);
    line-height: 1.58;
    margin-bottom: clamp(8px, 1.8dvh, 18px);
  }
  .notebook-allergen {
    font-size: clamp(9px, 1.3dvh, 11px);
    line-height: 1.35;
    margin-bottom: clamp(6px, 1.5dvh, 15px);
  }
  .notebook-copy .text-link { font-size: clamp(10px, 1.45dvh, 11px); }
}
/* A close-up of the original right page: uniform scale and a deliberate crop. */
@media (max-width: 700px) and (max-aspect-ratio: 1/1) {
  .object-stage[data-object="ingredients"] { width: calc(100vw - 20px); top: calc(50% + 30px); translate: -50% -50%; }
  .notebook-scene { aspect-ratio: auto; height: min(580px, calc(100dvh - 150px)); overflow: hidden; }
  .notebook-art img { object-fit: cover; object-position: 50% 50%; }
  .notebook-intro { left: 11%; top: 10%; width: 78%; }
  .notebook-intro .eyebrow { font-size: 8px; letter-spacing: .12em; }
  .notebook-intro h3 { font-size: clamp(15px, 4.6vw, 19px); line-height: 1.25; margin: 10px 0 8px; white-space: nowrap; }
  .notebook-intro h3 em { display: inline; font-size: 1em; }
  .notebook-choices { gap: 9px; }
  .notebook-choices button { font-size: 12px; }
  .notebook-copy { left: 11.5%; top: 30%; width: 76%; transform: none; }
  .notebook-copy .eyebrow { display: none; }
  .notebook-copy h4 { font-size: 25px; margin: 9px 0 13px; }
  .notebook-copy p { font-size: 13px; line-height: 1.8; margin-bottom: 13px; }
  .notebook-allergen { font-size: 10px; margin: 0; }
  .notebook-copy .text-link { display: none; }
  .object-stage[data-object="ingredients"] > .close { right: 5%; top: 4%; }
  .object-stage[data-object="ingredients"] .object-footer { margin-top: 0; }
}
@media (max-width: 700px) and (max-aspect-ratio: 1/1) and (max-height: 680px) {
  .notebook-intro { top: 7%; }
  .notebook-intro h3 { font-size: clamp(15px, 4.6vw, 19px); margin: 7px 0 3px; }
  .notebook-intro .eyebrow { font-size: 7px; }
  .notebook-choices button { font-size: 11px; }
  .notebook-copy { top: 30%; }
  .notebook-copy h4 { font-size: 23px; margin: 7px 0 9px; }
  .notebook-copy p { font-size: 12px; line-height: 1.65; margin-bottom: 9px; }
  .notebook-copy .eyebrow { font-size: 7px; }
}
@media (max-height: 550px) and (min-aspect-ratio: 1/1) {
  .object-stage[data-object="ingredients"] { width: min(96vw, 1000px); top: calc(50% + 29px); }
  .notebook-scene { height: calc(100dvh - 82px); aspect-ratio: auto; overflow: hidden; }
  .notebook-art img { object-fit: cover; object-position: center 46%; }
  .notebook-intro { left: 24%; top: 13%; width: 27%; }
  .notebook-intro .eyebrow { font-size: 7px; }
  .notebook-intro h3 { font-size: 25px; margin: 9px 0 10px; }
  .notebook-choices { gap: 7px; }
  .notebook-choices button { font-size: 10px; }
  .notebook-copy { top: 12%; left: 58%; width: 29%; }
  .notebook-copy .eyebrow { display: none; }
  .notebook-copy h4 { font-size: 24px; margin: 0 0 11px; }
  .notebook-copy p { font-size: 12px; line-height: 1.7; margin-bottom: 9px; }
  .notebook-allergen { font-size: 9px; margin: 0; }
  .notebook-copy .text-link { display: none; }
  .object-stage[data-object="ingredients"] > .close { right: 7%; top: 2%; }
  .object-stage[data-object="ingredients"] .object-footer { display: none; }
}
@media (max-height: 350px) and (min-aspect-ratio: 1/1) {
  .notebook-intro h3 { font-size: 23px; margin: 6px 0 5px; }
  .notebook-choices { gap: 6px; }
  .notebook-choices button { font-size: 9px; padding-inline: 8px; }
  .notebook-copy { top: 10%; left: 57%; width: 31%; }
  .notebook-copy h4 { font-size: 20px; margin: 0 0 8px; }
  .notebook-copy p { font-size: 11px; line-height: 1.55; }
  .notebook-copy .eyebrow { font-size: 6px; }
  .notebook-allergen { font-size: 8px; }
  .notebook-allergen span { font-size: 14px; }
}
@media (forced-colors: active) {
  .notebook-copy, .notebook-intro { background: Canvas; color: CanvasText; }
  .notebook-choices button { color: ButtonText; }
}

/* Keep the page large enough for its live copy; short screens scroll the book. */
@media (max-width:700px) and (max-aspect-ratio:1/1), (max-height:550px) {
  .object-stage[data-object="ingredients"]{width:min(600px,calc(100vw - 20px));top:78px;bottom:10px;translate:-50% 0;overflow-x:hidden;overflow-y:auto;max-height:none;scrollbar-width:thin;scrollbar-color:#d5bd96 transparent}
  .notebook-scene{height:auto;min-height:620px;padding:54px 0 160px;aspect-ratio:auto;overflow:hidden}
  .notebook-art img{object-fit:cover;object-position:50% 0}
  .notebook-intro{position:relative;left:auto;top:auto;width:70%;margin-left:12%}
  .notebook-intro .eyebrow{font-size:10px;line-height:1.5;letter-spacing:.04em}
  .notebook-intro h3{font-size:20px;line-height:1.35;white-space:normal;margin:10px 0 12px}
  .notebook-intro h3 em{display:inline;font-size:1em}
  .notebook-choices{gap:8px;flex-wrap:wrap}
  .notebook-choices button{font-size:13px;padding:10px 12px;min-height:46px}
  .notebook-copy{position:relative;left:auto;top:auto;width:68%;transform:none;margin:28px 0 0 12%}
  .notebook-copy .eyebrow{display:none}
  .notebook-copy h4{font-size:25px;line-height:1.25;margin:0 0 14px}
  .notebook-copy p{font-size:14px;line-height:1.7;margin:0 0 16px}
  .notebook-allergen{font-size:12px;line-height:1.5;margin:0}
  .notebook-copy .text-link{display:none}
  .object-stage[data-object="ingredients"]>.close{position:sticky;float:right;top:6px;right:0;margin:6px 6px -52px 0;background:#faf1dd;border:1px solid #cdbb98}
  .object-stage[data-object="ingredients"] .object-footer{display:flex;position:relative;bottom:auto;right:auto;translate:none;margin:0;padding:6px 0 12px}
  .object-stage[data-object="ingredients"]::before {
    content: 'Прокрутите вниз ↓';
    position: sticky;
    top: 8px;
    z-index: 4;
    display: block;
    width: max-content;
    max-width: calc(100% - 24px);
    margin: 0 auto -28px;
    padding: 6px 10px;
    border: 1px solid #cdbb9880;
    border-radius: 2px;
    background: #faf1dde8;
    color: #70553b;
    font: 11px/1.2 var(--sans);
    letter-spacing: .02em;
    pointer-events: none;
  }
}
@media(max-height:550px){.object-stage[data-object="ingredients"]{top:68px;bottom:8px}}
