/* The menu on screens 640px and wider: Classic ("paper" in the code), the menu cards on parchment,
 * or Storybook ("scroll"), a giant book with turning pages (js/menu-book.js). index.html loads this
 * file with media="(min-width: 640px)", so phones never wait for it.
 *
 * The paper textures are SVG noise filters rather than pictures.
 */

:root {
  --parch: #f1e9da;
  --page: #fbf8f1;
  --mb-ink-line: rgba(92, 66, 38, 0.28);
  /* Fine paper tooth: tiny bumps lit from the upper left. */
  --mb-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='a' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1.5' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='225' elevation='60'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 .33 0 0 0 0 .23 0 0 0 0 .12 -.6 0 0 0 .524'/%3E%3C/filter%3E%3Cfilter id='b' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1.5' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='225' elevation='60'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 .99 0 0 0 0 .95 .6 0 0 0 -.51'/%3E%3C/filter%3E%3Crect width='280' height='280' filter='url(%23a)'/%3E%3Crect width='280' height='280' filter='url(%23b)'/%3E%3C/svg%3E");
  /* Cold-press watercolor paper: larger, softer bumps for the book's pages. */
  --mb-coldpress: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='c' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.07' numOctaves='4' seed='19' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1.7' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='225' elevation='62'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 .42 0 0 0 0 .34 0 0 0 0 .24 -.42 0 0 0 .373'/%3E%3C/filter%3E%3Cfilter id='h' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.07' numOctaves='4' seed='19' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1.7' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='225' elevation='62'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 .97 .42 0 0 0 -.368'/%3E%3C/filter%3E%3Crect width='360' height='360' filter='url(%23c)'/%3E%3Crect width='360' height='360' filter='url(%23h)'/%3E%3C/svg%3E");
  /* Papyrus: faint crossing strips of plant fiber (Scroll pages). */
  --mb-papyrus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='h' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .07' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 .55 0 0 0 0 .41 0 0 0 0 .22 .42 0 0 0 -.235'/%3E%3C/filter%3E%3Cfilter id='v' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.07 .004' numOctaves='2' seed='8' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 .55 0 0 0 0 .41 0 0 0 0 .22 .26 0 0 0 -.148'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23h)'/%3E%3Crect width='420' height='420' filter='url(%23v)'/%3E%3C/svg%3E");
  /* Softly uneven paper edges (used as a mask). The edge at the spine stays straight. */
  --mb-deckle-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cfilter id='d' x='-5%25' y='-5%25' width='110%25' height='110%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.03' numOctaves='3' seed='2' result='t'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='t' scale='10' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Crect x='-20' y='7' width='1013' height='986' filter='url(%23d)'/%3E%3C/svg%3E");
  --mb-deckle-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cfilter id='d' x='-5%25' y='-5%25' width='110%25' height='110%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.03' numOctaves='3' seed='5' result='t'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='t' scale='10' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Crect x='7' y='7' width='1013' height='986' filter='url(%23d)'/%3E%3C/svg%3E");
  /* Soft, pale watercolor washes, with no hard dried edges. */
  --mb-wash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='1100'%3E%3Cfilter id='w' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0022 .003' numOctaves='3' seed='14' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 .8 0 0 0 0 .66 0 0 0 0 .45 2.6 0 0 0 -1.42'/%3E%3CfeGaussianBlur stdDeviation='22'/%3E%3C/filter%3E%3Crect width='1400' height='1100' filter='url(%23w)'/%3E%3C/svg%3E");
}

/* ---------- The book switch in the header: Classic (spine) or Storybook (open) ---------- */
/* Placed with the other header icons in css/dark-mode.css. */
.book-btn {
  display: block; position: relative; flex: none; width: 7.4px; height: 44px; margin: 0; padding: 0; /* the spine's width, so the gaps around it are even */
  border: 0; background: transparent; color: var(--rose); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
[data-storybook="off"] .book-btn { display: none; }
.book-btn::after { content: ""; position: absolute; inset: 0 -10px; } /* larger hit area */
.book-btn .book {
  position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; max-width: none; overflow: visible;
  fill: currentColor; transform: translate(-50%, -50%);
  transition: transform .28s cubic-bezier(0.34, 1.56, 0.64, 1); /* same spring as the menu's rosebud buttons */
}
@media (hover: hover) { .book-btn:hover .book { transform: translate(-50%, -50%) scale(1.35); } }
.book-btn:active .book { transform: translate(-50%, -50%) scale(0.94); }
.book-btn:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 8px; }
/* Resting states; the transition between them is animateBook() in js/menu-book.js. */
.bk-lift, .bk-spine, .bk-cover, .bk-page { transform-box: view-box; transform-origin: 0 0; }
.bk-cover, .bk-page { opacity: 0; }
.menu-scroll .bk-spine { opacity: 0; }
.menu-scroll .bk-page { opacity: 1; }

/* ---------- Parchment (Paper and Scroll) ---------- */
/* The glow from the upper left starts just below the top edge, so the paper meets the scalloped edge
   in one flat tan with no seam. The grain sits on top so it matches the scallops' grain. */
.menu-paper .menu {
  background-color: var(--parch);
  background-image:
    var(--mb-grain),
    linear-gradient(to bottom, rgb(241, 233, 218) 0px, rgba(241, 233, 218, 0.55) 50px, rgba(241, 233, 218, 0) 170px),
    radial-gradient(110% 70% at 18% 0%, rgba(255, 252, 244, 0.7), rgba(255, 252, 244, 0) 62%),
    radial-gradient(150% 120% at 50% 42%, rgba(122, 90, 50, 0) 64%, rgba(122, 90, 50, 0.08) 100%),
    var(--mb-wash);
  background-size: 280px 280px, 100% 100%, 100% 100%, 100% 100%, 1400px 1100px;
  background-position: 0 0, 0 0, 0 0, 0 0, -220px -80px;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, repeat;
}
/* The scalloped edges become the same paper. */
.menu-paper .menu::before,
.menu-paper .menu::after {
  background-color: var(--parch);
  background-image: var(--mb-grain);
  background-size: 280px 280px;
  background-repeat: repeat;
}
.menu-paper .menu::before {
  -webkit-mask: radial-gradient(circle at 12px 12px, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
  mask: radial-gradient(circle at 12px 12px, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
}
.menu-paper .menu::after {
  -webkit-mask: radial-gradient(circle at 12px 0, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
  mask: radial-gradient(circle at 12px 0, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
}
.menu-paper .menu .group-head { border-bottom-color: var(--mb-ink-line); }

/* ---------- The book ---------- */
.mb { display: none; }
.menu-book .mb { display: block; }
.menu-book #menu-groups { display: none; }

.mb-stage { display: grid; justify-items: center; gap: 18px; padding-top: 12px; }
.mb-book {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 0.64;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none;
  cursor: grab;
  /* tilts a little toward the mouse (set from js/menu-book.js) */
  transform: perspective(1900px) rotateX(var(--mb-rx, 0deg)) rotateY(var(--mb-ry, 0deg));
}
.mb-book:active { cursor: grabbing; }
.mb-book:focus-visible { outline: 2.5px solid var(--rose); outline-offset: 22px; border-radius: 10px; }
.mb.is-two .mb-book { max-width: 1080px; aspect-ratio: 1.44; }

/* Soft shadows the book casts on the table. They shift a little as the book tilts. */
.mb-shadow {
  position: absolute; inset: 7% 3% -5%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 58%, rgba(58, 44, 26, 0.3), rgba(58, 44, 26, 0.12) 50%, rgba(58, 44, 26, 0) 74%);
  filter: blur(24px);
  transform: translate(var(--mb-sx, 0px), var(--mb-sy, 0px));
}
.mb-shadow::after {
  content: ""; position: absolute; inset: 90% 7% -2%;
  background: radial-gradient(50% 50% at 50% 40%, rgba(44, 32, 14, 0.36), rgba(44, 32, 14, 0) 76%);
  filter: blur(7px);
}

.mb-block { position: absolute; inset: 0; }

/* The pages lying in the book */
.mb-page { position: absolute; top: 0; bottom: 0; }
.mb-left { display: none; }
.mb.is-one .mb-right { left: 0; width: 100%; }
.mb.is-two .mb-left { display: block; left: 0; width: 50%; }
.mb.is-two .mb-right { left: 50%; width: 50%; }

/* The pages underneath, peeking out along the bottom and outer edge, a little uneven */
.mb-under {
  position: absolute; display: none; pointer-events: none;
  background-color: #f3eee4; background-image: var(--mb-coldpress); background-size: 360px 360px;
  box-shadow: 0 1px 1.5px rgba(60, 44, 26, 0.2), 0 0 0 0.5px rgba(60, 44, 26, 0.08);
}
.mb.is-two .mb-under--r1 { display: block; left: 50%; right: -2px; top: 4px; bottom: -3px; border-radius: 0 13px 14px 0; }
.mb.is-two .mb-under--r2 { display: block; left: 61%; right: -4px; top: 11px; bottom: -6px; border-radius: 0 15px 17px 0; background-color: #ebe4d6; }
.mb.is-two .mb-under--l1 { display: block; left: -2px; right: 50%; top: 5px; bottom: -2px; border-radius: 14px 0 0 13px; }
.mb.is-two .mb-under--l2 { display: block; left: -4px; right: 64%; top: 12px; bottom: -5px; border-radius: 17px 0 0 15px; background-color: #ebe4d6; }
.mb.is-one .mb-under--r1 { display: block; left: 3px; right: -2px; top: 4px; bottom: -3px; border-radius: 3px 13px 14px 3px; }
.mb.is-one .mb-under--r2 { display: block; left: 18%; right: -4px; top: 10px; bottom: -6px; border-radius: 0 15px 17px 0; background-color: #ebe4d6; }
.mb.is-scroll .mb-under { background-color: #ecdfc2; }
.mb.is-scroll .mb-under--r2, .mb.is-scroll .mb-under--l2 { background-color: #e3d4b3; }
/* The fold where the pages meet */
.mb-spine { display: none; }
.mb.is-two .mb-spine {
  display: block; position: absolute; top: 0; bottom: 0; left: 50%; z-index: 2; width: 1.4%;
  transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(90deg, rgba(72, 52, 28, 0), rgba(72, 52, 28, 0.09) 38%, rgba(52, 36, 16, 0.13) 50%, rgba(72, 52, 28, 0.09) 62%, rgba(72, 52, 28, 0));
}
/* The linen thread that binds the pages (drawn in js/menu-book.js) */
.mb-thread { position: absolute; top: 0; bottom: 0; z-index: 2; width: 14px; pointer-events: none; }
.mb.is-two .mb-thread { left: 50%; transform: translateX(-50%); }
.mb.is-one .mb-thread { left: 2.6%; transform: translateX(-50%); }
.mb-thread svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* ---------- A sheet of paper (pages lying flat and pages turning) ---------- */
.mb-sheet {
  position: relative; width: 100%; height: 100%; overflow: hidden; container-type: size;
  color: var(--ink);
}
/* The page curving down into the fold: a soft shadow, with a faint highlight where it turns */
.mb-sheet::after { content: ""; position: absolute; top: 0; bottom: 0; width: 20%; pointer-events: none; }
.mb-sheet.is-left::after {
  right: 0;
  background: linear-gradient(to left, rgba(80, 58, 30, 0.2), rgba(80, 58, 30, 0.06) 24%, rgba(255, 255, 255, 0.28) 46%, rgba(255, 255, 255, 0) 70%);
}
.mb-sheet.is-right::after {
  left: 0;
  background: linear-gradient(to right, rgba(80, 58, 30, 0.2), rgba(80, 58, 30, 0.06) 24%, rgba(255, 255, 255, 0.28) 46%, rgba(255, 255, 255, 0) 70%);
}
.mb-sheet.is-single::after { left: 0; width: 9%; background: linear-gradient(to right, rgba(80, 58, 30, 0.16), rgba(80, 58, 30, 0)); }

.mb-in { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; padding: 7cqw 8.5cqw 4.5cqw; }
.mb-runner {
  flex: none; color: var(--ink-3); font-family: var(--font-display);
  font-size: max(9.5px, 2.25cqw); letter-spacing: 0.24em; line-height: 1.3; text-align: center; text-transform: uppercase;
}
.mb-folio { flex: none; margin-top: 2.4cqw; color: var(--ink-3); font-family: var(--font-display); font-size: max(11px, 2.7cqw); text-align: center; }

/* the name under each picture */
.mb-cap { display: grid; justify-items: center; gap: 0.6cqw; text-align: center; }
.mb-cap em { color: var(--ink-2); font-family: var(--font-display); font-size: max(15px, 4.6cqw); line-height: 1.15; }

/* Right page: the words */
.mb-text { display: flex; flex: 1; flex-direction: column; justify-content: center; min-height: 0; padding-top: 2cqw; }
.mb-text > * { flex-shrink: 0; }
.mb-tag { color: var(--rose); font-family: var(--font-display); font-size: max(14px, 3.7cqw); font-style: italic; line-height: 1.3; }
.mb-title { margin-top: 0.8cqw; font-size: max(24px, 8.4cqw); line-height: 1.03; text-wrap: balance; }
.mb-rule { display: flex; align-items: center; gap: 2.2cqw; margin: 3.6cqw 0 3.4cqw; }
.mb-rule::before, .mb-rule::after { content: ""; width: 9cqw; height: 1px; background: var(--mb-ink-line); }
.mb-rule i { width: 1.5cqw; height: 1.5cqw; min-width: 6px; min-height: 6px; background: var(--rose); transform: rotate(45deg); }
.mb-desc {
  display: grid; flex: 0 1 auto; align-content: start; gap: 2.2cqw; min-height: 0; overflow: hidden;
  color: var(--ink-2); font-size: max(13.5px, 3.35cqw); line-height: 1.55;
}
.mb-desc.is-clipped { -webkit-mask-image: linear-gradient(#000 calc(100% - 3.2em), transparent); mask-image: linear-gradient(#000 calc(100% - 3.2em), transparent); }
.mb-prices { display: grid; gap: 1.3cqw; margin-top: 4cqw; font-size: max(13.5px, 3.3cqw); }
.mb-prices li { display: flex; align-items: baseline; gap: 1.8cqw; }
.mb-prices i { flex: 1; min-width: 4cqw; border-bottom: 1.5px dotted rgba(92, 66, 38, 0.4); transform: translateY(-0.28em); }
.mb-prices b { font-weight: 600; font-variant-numeric: tabular-nums; }
.mb-buy { margin-top: 4.6cqw; }
.mb-add { min-height: max(42px, 9.6cqw); padding: 0 6cqw; font-size: max(14.5px, 3.3cqw); }
.mb-add .when-closed { display: none; }
.is-closed .mb-add .when-open { display: none; }
.is-closed .mb-add .when-closed { display: inline; }

/* A page at a time (narrower screens): one page holds the whole product */
.mb-sheet.is-single .mb-in { padding: 6.5cqw 7.5cqw 4cqw 10cqw; }
.mb-sheet.is-single .mb-text { justify-content: flex-start; padding-top: 5cqw; }
.mb-sheet.is-single .mb-title { font-size: max(23px, 8.6cqw); }
.mb-sheet.is-single .mb-rule { margin: 3cqw 0 2.8cqw; }
.mb-sheet.is-single .mb-prices { margin-top: 3.4cqw; }
.mb-sheet.is-single .mb-buy { margin-top: 4cqw; }

/* ---------- The page that turns (built in js/menu-book.js) ---------- */
.mb-leaflayer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.mb-leaf { position: absolute; transform-style: preserve-3d; }
.mb-strip { position: absolute; top: 0; height: 100%; transform-style: preserve-3d; will-change: transform; }
.mb-face { position: absolute; inset: 0; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.mb-back { transform: rotateY(180deg); }
.mb-face-in { position: absolute; top: 0; }
.mb-cast { position: absolute; pointer-events: none; }

/* Folded page corners: click to turn */
.mb-corner {
  position: absolute; bottom: 0; z-index: 4; width: 8.5%; max-width: 64px; min-width: 40px; aspect-ratio: 1;
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
.mb.is-one .mb-corner { width: 13%; }
.mb-corner--next { right: 0; }
.mb-corner--prev { left: 0; }
.mb.is-one .mb-corner--prev { display: none; }
.mb-corner::before {
  content: ""; position: absolute; bottom: 0; width: 40%; height: 40%;
  transition: width .35s var(--ease-out), height .35s var(--ease-out);
  filter: drop-shadow(-1px -1px 1.5px rgba(60, 40, 18, 0.18));
}
.mb-corner--next::before { right: 0; background: linear-gradient(315deg, transparent 50%, #ece6da 50%, #fdfbf6 85%); border-bottom-right-radius: 11px; }
.mb-corner--prev::before { left: 0; background: linear-gradient(45deg, transparent 50%, #ece6da 50%, #fdfbf6 85%); border-bottom-left-radius: 11px; filter: drop-shadow(1px -1px 1.5px rgba(60, 40, 18, 0.18)); }
@media (hover: hover) { .mb-corner:hover::before { width: 70%; height: 70%; } }
.mb-corner:focus-visible { outline-offset: -4px; }
.mb-book.is-turning .mb-corner { opacity: 0; }

/* ---------- Under the book ---------- */
.mb-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.mb-nav {
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 1.5px solid var(--line-strong); border-radius: 50%;
  background: rgba(255, 252, 244, 0.55); color: var(--ink);
  transition: background-color .2s, border-color .2s, color .2s, opacity .2s;
}
.mb-nav .icon { width: 20px; height: 20px; }
.mb-nav[data-mb-prev] .icon { transform: scaleX(-1); }
@media (hover: hover) { .mb-nav:hover:not(:disabled) { border-color: var(--rose); background: var(--rose); color: #fff; } }
.mb-nav:disabled { opacity: 0.35; cursor: default; }
.mb-count { min-width: 12ch; color: var(--ink-2); font-size: 15px; text-align: center; }
.mb-count em { color: var(--ink); font-family: var(--font-display); font-size: 18px; }
.mb-hint { color: var(--ink-3); font-family: var(--font-display); font-size: 15px; font-style: italic; text-align: center; }

/* ---------- Scroll: the giant book that fills the whole menu section ---------- */
/* The heading sits above the parchment, lined up and sized like the site's other section headings. The
   parchment, with its scalloped top and bottom edges, starts below the heading and holds the book. */
.menu-scroll .menu { padding: 0; background: transparent; }
.menu-scroll .menu::before, .menu-scroll .menu::after { display: none; }
.menu-scroll .menu > .container { max-width: none; padding: 0; }
.menu-scroll .menu .section-head {
  display: block; position: relative; z-index: 1;
  margin: 0 var(--gutter) 34px max(var(--gutter), (100% - var(--maxw)) / 2);
  padding-top: 4px;
}
@media (min-width: 960px) { .menu-scroll .menu .section-head { margin-bottom: 44px; } }
.mb.is-scroll {
  position: relative;
  padding: 40px max(14px, env(safe-area-inset-right, 0px)) 52px max(14px, env(safe-area-inset-left, 0px));
  background-color: var(--parch);
  background-image:
    var(--mb-grain),
    linear-gradient(to bottom, rgb(241, 233, 218) 0px, rgba(241, 233, 218, 0.55) 50px, rgba(241, 233, 218, 0) 170px),
    radial-gradient(110% 70% at 18% 0%, rgba(255, 252, 244, 0.7), rgba(255, 252, 244, 0) 62%),
    radial-gradient(150% 120% at 50% 42%, rgba(122, 90, 50, 0) 64%, rgba(122, 90, 50, 0.08) 100%),
    var(--mb-wash);
  background-size: 280px 280px, 100% 100%, 100% 100%, 100% 100%, 1400px 1100px;
  background-position: 0 0, 0 0, 0 0, 0 0, -220px -80px;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, repeat;
}
.mb.is-scroll::before, .mb.is-scroll::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12px; pointer-events: none;
  background-color: var(--parch); background-image: var(--mb-grain); background-size: 280px 280px;
}
.mb.is-scroll::before {
  top: -11px;
  -webkit-mask: radial-gradient(circle at 12px 12px, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
  mask: radial-gradient(circle at 12px 12px, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
}
.mb.is-scroll::after {
  bottom: -11px;
  -webkit-mask: radial-gradient(circle at 12px 0, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
  mask: radial-gradient(circle at 12px 0, #000 11.5px, transparent 12px) 0 0 / 24px 12px repeat-x;
}
.mb.is-scroll .mb-stage { padding-top: 0; }
/* the name under each picture */
.mb.is-scroll .mb-sheet.is-papyrus .mb-cap em { font-size: clamp(20px, 3.8cqw, 26px); }
/* a little narrower and shorter than the whole section, so the parchment shows around it */
.mb.is-scroll.is-two .mb-book { max-width: none; width: 88%; aspect-ratio: auto; height: clamp(560px, calc(100vh - 230px), 860px); }
.mb.is-scroll.is-one .mb-book { max-width: 530px; width: 94%; aspect-ratio: 0.55; } /* a page at a time on narrower screens */
.mb.is-scroll .mb-shadow { inset: 4% 1% -3%; }
/* The pages: warm, papyrus-toned paper with softly uneven edges */
.mb.is-scroll .mb-page { background: transparent; box-shadow: none; }
.mb-sheet.is-papyrus {
  background-color: #f4e9d0;
  background-image:
    radial-gradient(120% 90% at 50% 45%, rgba(150, 108, 56, 0) 62%, rgba(150, 108, 56, 0.16) 100%),
    radial-gradient(90% 60% at 25% 10%, rgba(255, 251, 240, 0.55), rgba(255, 251, 240, 0) 70%),
    var(--mb-papyrus),
    var(--mb-coldpress),
    var(--mb-grain);
  background-size: 100% 100%, 100% 100%, 420px 420px, 360px 360px, 280px 280px;
  -webkit-mask: var(--mb-deckle-r) 0 0 / 100% 100% no-repeat;
  mask: var(--mb-deckle-r) 0 0 / 100% 100% no-repeat;
}
.mb-sheet.is-papyrus.is-left { -webkit-mask-image: var(--mb-deckle-l); mask-image: var(--mb-deckle-l); }

.mb-sheet.is-papyrus .mb-in { padding: max(28px, 5.5cqh) max(28px, 8cqw) max(18px, 3cqh); }
.mb-sheet.is-papyrus.is-single .mb-in { padding: 22px 20px 14px 30px; }

/* The picture, painted straight onto the paper: no frame, soft faded edges */
.mb-paint { position: relative; display: grid; flex: 1; place-items: center; min-height: 0; margin: 2.5cqh 0 1.5cqh; }
.mb-paint img {
  width: min(100%, 60cqh); aspect-ratio: 1; height: auto; max-height: 100%; object-fit: cover;
  mix-blend-mode: multiply; opacity: 0.9; filter: sepia(0.16) saturate(0.85) contrast(0.96);
  -webkit-mask-image: radial-gradient(closest-side, #000 52%, rgba(0, 0, 0, 0.5) 74%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 52%, rgba(0, 0, 0, 0.5) 74%, transparent 100%);
}
.mb-sheet.is-single .mb-paint { flex: none; margin: 6px -6px 0; }
.mb-sheet.is-single .mb-paint img { width: 100%; aspect-ratio: 16 / 10; max-height: none; }
.mb.is-scroll.is-one .mb-dots { gap: 2px; }
.mb.is-scroll.is-one .mb-dots button { min-width: 32px; height: 34px; padding: 0 4px; }
.mb-sheet.is-papyrus .mb-cap { flex: none; }

/* Words on the giant pages: sizes capped so they stay comfortable to read */
.mb-sheet.is-papyrus .mb-text { padding-top: 0; }
.mb-sheet.is-papyrus.is-right .mb-text { max-width: 34em; margin: 0 auto; width: 100%; }
.mb-sheet.is-papyrus .mb-runner { margin-bottom: 1.2em; text-align: left; font-size: clamp(10px, 1.6cqw, 13px); }
.mb-sheet.is-papyrus .mb-tag { font-size: clamp(15px, 2.6cqw, 21px); }
.mb-sheet.is-papyrus .mb-title { font-size: clamp(28px, 6.4cqw, 54px); }
.mb-sheet.is-papyrus .mb-rule { margin: clamp(12px, 2.4cqw, 22px) 0; }
.mb-sheet.is-papyrus .mb-desc { gap: 0.8em; font-size: clamp(14.5px, 2.5cqw, 19px); }
.mb-sheet.is-papyrus .mb-prices { gap: 0.4em; margin-top: 1.4em; font-size: clamp(14.5px, 2.4cqw, 18px); }
.mb-sheet.is-papyrus .mb-buy { margin-top: 1.5em; }
.mb-sheet.is-papyrus .mb-add { min-height: 50px; padding: 0 28px; font-size: 16.5px; }
.mb-sheet.is-papyrus .mb-folio { font-size: clamp(11px, 1.7cqw, 14px); }
.mb-sheet.is-papyrus.is-single .mb-text { padding-top: 12px; }
.mb-sheet.is-papyrus.is-single .mb-title { font-size: 27px; }
.mb-sheet.is-papyrus.is-single .mb-desc { font-size: 15px; }
.mb-sheet.is-papyrus.is-single .mb-add { min-height: 44px; padding: 0 22px; font-size: 15.5px; }

/* the turning page keeps the same uneven edge */
.mb.is-scroll .mb-face { border-radius: 0 !important; }
/* The turning page (built in js/menu-book.js): thin wedges cut along fold lines that meet below the spine.
   On phones it rolls off the left edge of the book, so anything past that edge is hidden. */
.mb.is-scroll .mb-leaflayer { perspective: 3000px; }
.mb.is-scroll.is-one .mb-leaflayer { perspective: 2400px; perspective-origin: 20% 50%; clip-path: inset(-60% -60% -60% 0); }
.mb-cone-shade { position: absolute; inset: 0; z-index: 3; pointer-events: none; will-change: transform; }

/* page numbers under the giant book */
.mb.is-scroll .mb-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.mb-dots button {
  min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--ink-2); font-family: var(--font-display); font-size: 17px;
  transition: background-color .2s, border-color .2s, color .2s;
}
.mb-dots button[aria-current="true"] { border-color: var(--rose); color: var(--rose-deep); background: rgba(255, 252, 244, 0.7); }
@media (hover: hover) { .mb-dots button:hover { border-color: var(--line-strong); } }

/* Pages ready to measure (hidden) */
.mb-measure { position: absolute; top: 0; left: 0; visibility: hidden; pointer-events: none; z-index: -1; }

/* Reduced motion: pages swap with a quick fade instead of turning, and the book doesn't tilt */
.mb-block.is-fading .mb-page { opacity: 0; }
.mb-page { transition: opacity .16s; }
@media (prefers-reduced-motion: reduce) { .mb-book { transform: none; } .mb-shadow { transform: none; } }
