@import url('https://fonts.googleapis.com/css2?family=Bilbo+Swash+Caps&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Lato:wght@300;400;700&display=swap');

:root {
  --font-serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-frontmatter-display: "Bilbo Swash Caps", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Lato", "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --box-gold: #d99a12;
  --box-ochre: #9a5b18;
  --box-brown: #6d421f;
  --paper: #ffffff;
  --ink: #2d2924;
  --muted: #75695c;
  --rule: #d7c6a6;
  --soft-gold: #f1dfad;
  --resident-burgundy: #7b263a;
  --resident-deep-indigo: #172451;
  --page-w: 8.5in;
  --page-h: 11in;
  --outer: 0.5in;
  --inner: 0.5in;
  --top: 0.5in;
  --bottom: 0.55in;
}

* { box-sizing: border-box; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html, body {
  margin: 0;
  background: #d8d3c8;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 10.5pt;
  line-height: 1.36;
}

.splash-return {
  position: fixed;
  z-index: 110;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  min-height: 34px;
  padding: .38rem .72rem .4rem .55rem;
  border: 1px solid rgba(109, 66, 31, .45);
  border-radius: 999px;
  color: var(--box-brown);
  background: rgba(255, 250, 236, .9);
  box-shadow: 0 3px 12px rgba(65, 36, 16, .2);
  font-family: var(--font-sans);
  font-size: 9pt;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(7px);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.splash-return span[aria-hidden="true"] {
  color: var(--box-ochre);
  font-family: Georgia, serif;
  font-size: 18pt;
  font-weight: 400;
  line-height: .55;
  transform: translateY(-1px);
}

.splash-return:hover,
.splash-return:focus-visible {
  color: #fff;
  background: var(--box-brown);
  outline: none;
  transform: translateY(-1px);
}

.splash-return:hover span[aria-hidden="true"],
.splash-return:focus-visible span[aria-hidden="true"] {
  color: var(--soft-gold);
}

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
}

.spread {
  display: grid;
  position: relative;
  grid-template-columns: var(--page-w) var(--page-w);
  gap: 12px;
  align-items: start;
  scroll-margin-top: 1rem;
}

.recipe-anchor {
  position: absolute;
  top: 0;
  left: 0;
  scroll-margin-top: 1rem;
}

.page {
  width: var(--page-w);
  height: var(--page-h);
  background: var(--paper);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  padding-top: var(--top);
  padding-bottom: var(--bottom);
}

.page-content {
  position: relative;
  z-index: 2;
}

.no-shadows .page,
.no-shadows .scan,
.no-shadows .scan-button {
  box-shadow: none;
}

/* Frontmatter is intentionally isolated from recipe and category page styling. */
.frontmatter-cover-page,
.frontmatter-title-page {
  padding: 0;
}

.frontmatter-cover-page {
  background:
    radial-gradient(circle at 50% 43%, rgba(67, 87, 151, .42), transparent 47%),
    linear-gradient(145deg, #26356f 0%, #172451 54%, #101a3c 100%);
  color: #fff7dd;
}

.frontmatter-cover-frame {
  position: absolute;
  z-index: 4;
  inset: .28in;
  border: 1px solid #dfb749;
  box-shadow:
    inset 0 0 0 .06in #172451,
    inset 0 0 0 calc(.06in + 1px) rgba(223,183,73,.72);
  pointer-events: none;
}

.frontmatter-cover-frame::before,
.frontmatter-cover-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  width: .17in;
  height: .17in;
  border: 1px solid #dfb749;
  background: #172451;
  transform: translateX(-50%) rotate(45deg);
}

.frontmatter-cover-frame::before { top: -.09in; }
.frontmatter-cover-frame::after { bottom: -.09in; }

.frontmatter-cover-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: .5in auto 1fr auto .5in;
  justify-items: center;
  width: 100%;
  height: 100%;
  padding: .43in .58in .48in;
  text-align: center;
}

.frontmatter-cover-content h1 {
  position: relative;
  z-index: 3;
  align-self: center;
  width: 6.8in;
  margin: .3in 0 .1in;
  color: #fff9e8;
  font-family: var(--font-frontmatter-display);
  font-size: 48pt;
  font-weight: 400;
  line-height: .92;
  letter-spacing: .012em;
  text-wrap: balance;
  text-shadow: 0 2px 2px rgba(0,0,0,.26);
}

.frontmatter-centerpiece {
  position: relative;
  z-index: 1;
  align-self: center;
  display: grid;
  place-items: center;
  width: 5.65in;
  height: 6.5in;
  margin: .04in 0 .08in;
  padding: .14in;
  border: 1px solid rgba(223,183,73,.84);
  background: #fff;
  overflow: hidden;
  box-shadow:
    0 .08in .25in rgba(0,0,0,.3),
    0 0 0 .055in #172451,
    0 0 0 calc(.055in + 1px) rgba(223,183,73,.72);
}

.frontmatter-centerpiece img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frontmatter-cover-subtitle {
  position: relative;
  z-index: 3;
  align-self: center;
  margin: .02in 0 .05in;
  color: #f2d67d;
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 15pt;
  font-style: normal;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.yellow-box-motif {
  position: relative;
  z-index: 3;
  width: 4.65in;
  max-width: 100%;
  height: .42in;
  margin-inline: auto;
  justify-self: center;
  color: #dfb749;
}

.yellow-box-motif::before,
.yellow-box-motif::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1.78in;
  height: .2in;
  border-top: 1px solid currentColor;
  border-radius: 50%;
}

.yellow-box-motif::before { left: 0; transform: rotate(7deg); }
.yellow-box-motif::after { right: 0; transform: rotate(-7deg); }

.yellow-box-motif span,
.yellow-box-motif span::before,
.yellow-box-motif span::after,
.yellow-box-motif span > i {
  position: absolute;
}

.yellow-box-motif span {
  top: 50%;
  left: 50%;
  width: .72in;
  height: .28in;
  transform: translate(-50%, -50%);
}

.yellow-box-motif span > i {
  top: 50%;
  left: 50%;
  width: .18in;
  height: .18in;
  border: 1px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.yellow-box-motif span::before,
.yellow-box-motif span::after {
  content: "";
  top: 72%;
  width: .13in;
  height: .24in;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.yellow-box-motif span::before {
  right: 0;
  transform: translateY(-50%) rotate(28deg);
}
.yellow-box-motif span::after {
  left: 0;
  transform: translateY(-50%) rotate(-28deg);
}
.yellow-box-motif-bottom { transform: rotate(180deg); }

/* COVER ENTRANCE EXPERIMENT
 * Deliberately isolated behind `.frontmatter-animated` and screen media.
 * Remove this block and that one HTML class to revert the full effect.
 */
@media screen and (prefers-reduced-motion: no-preference) {
  .frontmatter-animated {
    animation: cover-stage-arrive 700ms cubic-bezier(.2,.72,.2,1) both;
    perspective: 11in;
  }

  .frontmatter-animated .frontmatter-cover-frame {
    transform-origin: 50% 50%;
    animation: cover-frame-draw 1050ms cubic-bezier(.22,.72,.18,1) 180ms both;
  }

  .frontmatter-animated .frontmatter-cover-content h1 {
    animation: cover-title-arrive 900ms cubic-bezier(.16,.78,.18,1) 430ms both;
  }

  .frontmatter-animated .frontmatter-centerpiece {
    transform-origin: 50% 58%;
    animation: cover-centerpiece-arrive 1350ms cubic-bezier(.16,.82,.16,1) 320ms both;
  }

  .frontmatter-animated .frontmatter-centerpiece::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(108deg, transparent 36%, rgba(255,244,196,.38) 48%, transparent 60%);
    transform: translateX(-145%);
    animation: cover-centerpiece-gleam 850ms ease-in-out 1460ms both;
  }

  .frontmatter-animated .yellow-box-motif-top {
    animation: cover-flourish-unfold 820ms cubic-bezier(.2,.76,.18,1) 760ms both;
  }

  .frontmatter-animated .yellow-box-motif-bottom {
    animation: cover-flourish-unfold-bottom 820ms cubic-bezier(.2,.76,.18,1) 1180ms both;
  }

  .frontmatter-animated .frontmatter-cover-subtitle {
    animation: cover-subtitle-arrive 700ms ease-out 1200ms both;
  }

  @keyframes cover-stage-arrive {
    0% { opacity: 0; filter: brightness(.45); }
    100% { opacity: 1; filter: brightness(1); }
  }

  @keyframes cover-frame-draw {
    0% { opacity: 0; clip-path: inset(49% 49% 49% 49%); }
    45% { opacity: 1; clip-path: inset(0 47% 0 47%); }
    100% { opacity: 1; clip-path: inset(0); }
  }

  @keyframes cover-title-arrive {
    0% { opacity: 0; transform: translateY(-.16in) scale(.94); filter: blur(5px); letter-spacing: .09em; }
    72% { opacity: 1; transform: translateY(.015in) scale(1.012); filter: blur(0); }
    100% { opacity: 1; transform: none; filter: blur(0); letter-spacing: .012em; }
  }

  @keyframes cover-centerpiece-arrive {
    0% {
      opacity: 0;
      transform: translateY(.24in) rotateX(13deg) rotateY(-9deg) rotateZ(-7deg) scale(.78);
      filter: blur(7px) saturate(.7);
      box-shadow: 0 .25in .4in rgba(0,0,0,.08);
    }
    68% {
      opacity: 1;
      transform: translateY(-.025in) rotateX(-1deg) rotateY(1deg) rotateZ(1deg) scale(1.025);
      filter: blur(0) saturate(1.04);
      box-shadow: 0 .16in .34in rgba(0,0,0,.4), 0 0 0 .055in #172451, 0 0 0 calc(.055in + 1px) rgba(223,183,73,.9);
    }
    100% {
      opacity: 1;
      transform: none;
      filter: none;
    }
  }

  @keyframes cover-flourish-unfold {
    0% { opacity: 0; transform: scaleX(.08); }
    72% { opacity: 1; transform: scaleX(1.035); }
    100% { opacity: 1; transform: scaleX(1); }
  }

  @keyframes cover-flourish-unfold-bottom {
    0% { opacity: 0; transform: rotate(180deg) scaleX(.08); }
    72% { opacity: 1; transform: rotate(180deg) scaleX(1.035); }
    100% { opacity: 1; transform: rotate(180deg) scaleX(1); }
  }

  @keyframes cover-subtitle-arrive {
    0% { opacity: 0; transform: translateY(.1in); filter: blur(3px); letter-spacing: .13em; }
    100% { opacity: 1; transform: none; filter: none; letter-spacing: .065em; }
  }

  @keyframes cover-centerpiece-gleam {
    0% { opacity: 0; transform: translateX(-145%); }
    22% { opacity: 1; }
    100% { opacity: 0; transform: translateX(145%); }
  }
}

@media print, (prefers-reduced-motion: reduce) {
  .frontmatter-animated,
  .frontmatter-animated * {
    animation: none !important;
    transition: none !important;
  }
}

.frontmatter-title-page {
  background:
    radial-gradient(circle at 50% 34%, rgba(241,223,173,.38), transparent 34%),
    #fffefb;
}

.frontmatter-title-page::before {
  content: "";
  position: absolute;
  inset: .34in;
  border: 1px solid rgba(154,91,24,.42);
  box-shadow: inset 0 0 0 .045in #fffefb, inset 0 0 0 calc(.045in + 1px) rgba(217,154,18,.42);
}

.frontmatter-title-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 1.28in .82in .7in;
  text-align: center;
}

.frontmatter-series {
  margin: 0 0 .18in;
  color: var(--box-ochre);
  font-size: 8.5pt;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.yellow-box-motif-title {
  width: 3.45in;
  margin-bottom: .42in;
  color: var(--box-gold);
}

.yellow-box-motif-title::before,
.yellow-box-motif-title::after { width: 1.22in; }

.frontmatter-title-content h1,
.frontmatter-title-lettering {
  width: 6.1in;
  margin: 0;
}

.frontmatter-title-lettering {
  color: var(--box-brown);
}

.frontmatter-title-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.frontmatter-title-ink {
  color: var(--box-brown);
  fill: currentColor;
  font-family: "Bilbo Swash Caps", cursive;
  font-size: 96px;
  font-weight: 400;
}

@media screen and (prefers-reduced-motion: no-preference) {
  .frontmatter-title-reveal {
    fill: none;
    stroke: #fff;
    stroke-width: 132px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: title-page-write 1.5s cubic-bezier(.32,.04,.18,1) 2.4s both;
  }

  .frontmatter-title-ink {
    animation: title-page-ink-settle 1.58s ease-out 2.4s both;
  }

  @keyframes title-page-write {
    0% { stroke-dashoffset: 1; }
    13% { stroke-dashoffset: .925; }
    31% { stroke-dashoffset: .73; }
    52% { stroke-dashoffset: .51; }
    73% { stroke-dashoffset: .3; }
    91% { stroke-dashoffset: .09; }
    100% { stroke-dashoffset: 0; }
  }

  @keyframes title-page-ink-settle {
    0%, 88% { opacity: .9; }
    100% { opacity: 1; }
  }
}

@media print, (prefers-reduced-motion: reduce) {
  .frontmatter-title-reveal,
  .frontmatter-title-ink {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
  }
}

.frontmatter-title-subtitle {
  margin: .27in 0 0;
  color: var(--box-ochre);
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 18pt;
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
}

.frontmatter-title-ornament {
  position: relative;
  width: 1.85in;
  height: .75in;
  margin-top: .48in;
  color: var(--box-gold);
}

.frontmatter-title-ornament::before,
.frontmatter-title-ornament::after {
  content: "";
  position: absolute;
  top: .25in;
  width: .82in;
  border-top: 1px solid currentColor;
}

.frontmatter-title-ornament::before { left: 0; transform: rotate(9deg); }
.frontmatter-title-ornament::after { right: 0; transform: rotate(-9deg); }

.frontmatter-title-ornament span {
  position: absolute;
  top: .17in;
  left: 50%;
  width: .18in;
  height: .18in;
  border: 1px solid currentColor;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: -.12in .08in 0 -.04in currentColor, .12in .08in 0 -.04in currentColor;
}

.frontmatter-colophon {
  width: 5.35in;
  margin-top: auto;
  padding-top: .24in;
  border-top: 1px solid rgba(154,91,24,.45);
  color: #66594b;
  font: 9.5pt/1.45 var(--font-serif);
}

.frontmatter-colophon p { margin: .04in 0; }

.page-left { padding-left: var(--outer); padding-right: var(--inner); }
.page-right { padding-left: var(--inner); padding-right: var(--outer); }

.page::after {
  content: "";
  position: absolute;
  inset: 0.18in;
  border: 1px solid transparent;
  pointer-events: none;
}

.kicker {
  margin: 0 0 0.05in;
  color: var(--box-ochre);
  font-size: 8.6pt;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--box-brown);
}

h1 {
  margin: 0;
  font-size: 29pt;
  line-height: .98;
  font-weight: 600;
}

/* Titles on either facing-page layout reserve clearance for the absolutely
   positioned Kitchen View control. A normalized header with a yield gets that
   clearance from its second grid column; a no-yield header needs it here. */
.page-left.archival-page .page-content > h1,
.page-right.archival-page .page-content > h1,
.page-left.normalized-page .recipe-head:not(:has(.yield)) h1,
.page-right.normalized-page .recipe-head:not(:has(.yield)) h1 {
  width: calc(100% - 1.5in);
}

.title-self-link,
.title-self-link:link,
.title-self-link:visited,
.title-self-link:hover,
.title-self-link:active,
.title-self-link:focus,
.title-self-link:focus-visible {
  color: inherit;
  text-decoration: none;
  outline: none;
  background: none;
  box-shadow: none;
}

.title-self-link { cursor: pointer; }

.title-rule {
  width: 1.1in;
  height: 4px;
  margin: 0.14in 0 0.18in;
  background: var(--box-gold);
  border-radius: 10px;
}

.context-note {
  margin: 0 0 0.14in;
  font-family: var(--font-serif);
  font-size: 12.3pt;
  line-height: 1.25;
  color: #554a3f;
}

.scan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.08in;
  margin: 0 0 0.13in;
  justify-items: center;
}

.scan-grid.two-up {
  grid-template-columns: 1fr 1fr;
}

.scan-grid.three-up,
.scan-grid.four-up {
  grid-template-columns: 1fr 1fr;
}

.scan-grid.three-up > :last-child {
  grid-column: 1 / -1;
  width: calc(50% - 0.04in);
}

.scan-grid.four-up {
  grid-template-columns: 1fr 1fr;
  gap: 0.06in;
}

.scan-grid.four-up .scan {
  max-height: 1.55in;
}

.scan-grid.three-up .scan {
  max-height: 1.75in;
}

.scan {
  width: auto;
  max-width: 100%;
  max-height: 2.25in;
  height: auto;
  object-fit: contain;
  display: block;
  margin-inline: auto;
  border: 0;
  background: white;
  box-shadow: 0 3px 10px rgba(45, 35, 25, .28);
}

.scan-button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  max-width: 100%;
  background: transparent;
  cursor: zoom-in;
  display: block;
}

.scan-button:focus-visible {
  outline: 3px solid var(--box-gold);
  outline-offset: 4px;
}

/* A lone card may grow larger; two-card layouts use the same borderless,
   centered physical-artifact treatment at a compact size. */
.scan-grid > .scan:only-child {
  max-height: 3.35in;
}

/* Gnomes inhabit the page itself. The page edge is their floor, so they have
   neither a card-like frame nor a detached drop shadow. */
.gnome-illustration {
  position: absolute;
  bottom: 0.16in;
  width: 2.2in;
  max-height: 2.15in;
  object-fit: contain;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  z-index: 1;
}

.gnome-bottom-left { left: var(--outer); }
.gnome-bottom-right { right: var(--outer); }
.gnome-wide {
  width: 3.55in;
  max-height: 1.8in;
}

/* Forward workflow (NSRB-023 onward): new gnomes are transparent PNGs
   rendered as CSS backgrounds on div layers. Set --gnome-image per recipe
   and --gnome-z when an illustration should sit behind or in front of text.
   A value of -1 sits above the paper but behind normal page content; positive
   values can bring the illustration forward. */
.gnome-layer {
  position: absolute;
  left: 0.5in;
  bottom: 0.5in;
  width: 7.5in;
  height: var(--gnome-height, 6in);
  border: 0;
  background-color: transparent;
  background-image: var(--gnome-image);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: contain;
  box-shadow: none;
  pointer-events: none;
  z-index: var(--gnome-z, 1);
}

.audit-gnomes .gnome-layer {
  border: 1px dashed orange;
}

/* Empty assigned stages become half-inch measuring grids in gnome audits.
   One complete checker tile is 1in square, so each quadrant is 0.5in. */
.audit-gnomes .gnome-zone-empty {
  background-image:
    linear-gradient(to right, rgba(210, 145, 0, .42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(210, 145, 0, .42) 1px, transparent 1px),
    conic-gradient(
      rgba(0, 0, 0, .07) 0 25%,
      transparent 0 50%,
      rgba(0, 0, 0, .07) 0 75%,
      transparent 0
    );
  background-position: left bottom;
  background-size: 1in 100%, 100% 1in, 1in 1in;
  background-repeat: repeat;
}

.audit-gnomes .gnome-zone-empty::after {
  content: "Gnome Zone\2122  ·  0.5in squares";
  position: absolute;
  top: .08in;
  left: .1in;
  padding: .04in .07in;
  border: 1px solid rgba(210, 145, 0, .5);
  background: rgba(255, 255, 255, .88);
  color: #8a5a00;
  font: 700 7pt/1 var(--font-sans);
  letter-spacing: .04em;
}

/* Category dividers deliberately consume a complete two-page spread so the
   left/right rhythm of the printed book remains stable. */
.category-title-page,
.category-index-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(217,154,18,.08), transparent 1.8in),
    var(--paper);
}

.category-title-content {
  min-height: 3.4in;
  padding-top: .45in;
}

.category-eyebrow {
  margin: 1.05in 0 .08in;
  color: var(--box-gold);
  font: 700 10pt/1 var(--font-sans);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.category-title-content h1 {
  max-width: 6.8in;
  font-size: 47pt;
  line-height: .94;
}

.category-count {
  margin: .14in 0 0;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 14pt;
  font-style: italic;
}

.ornamental-rule {
  position: relative;
  width: 2.65in;
  height: .22in;
  margin-top: .28in;
}

.ornamental-rule::before,
.ornamental-rule::after,
.ornamental-rule span {
  content: "";
  position: absolute;
  top: 50%;
}

.ornamental-rule::before,
.ornamental-rule::after {
  width: 1.04in;
  height: 2px;
  background: var(--box-gold);
}

.ornamental-rule::before { left: 0; }
.ornamental-rule::after { right: 0; }
.ornamental-rule span {
  left: 50%;
  width: .18in;
  height: .18in;
  border: 2px solid var(--box-ochre);
  transform: translate(-50%, -50%) rotate(45deg);
}

.category-index-content h1 { font-size: 36pt; }

.category-recipe-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .12in .16in;
  margin: .05in 0 0;
  padding: 0;
  list-style: none;
  counter-reset: category-recipe;
}

.category-recipe-list li { counter-increment: category-recipe; }

.category-recipe-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: .52in;
  padding: .08in .1in;
  border: 1px solid rgba(109,66,31,.5);
  border-left: 5px solid var(--box-gold);
  background:
    linear-gradient(135deg, rgba(217,154,18,.13), rgba(255,255,255,.92) 45%),
    var(--paper);
  color: var(--box-brown);
  text-decoration: none;
  box-shadow: inset 0 0 0 2px rgba(241,223,173,.55);
}

.category-recipe-list a::before {
  content: counter(category-recipe, decimal-leading-zero);
  margin-right: .09in;
  color: var(--box-ochre);
  font: 700 7.5pt/1 var(--font-sans);
  letter-spacing: .08em;
}

.category-recipe-title {
  font-family: var(--font-serif);
  font-size: 12.2pt;
  font-weight: 600;
  line-height: 1.02;
}

.category-link-arrow {
  margin-left: .06in;
  color: var(--box-gold);
  font-size: 17pt;
  line-height: 1;
}

.category-recipe-list a:hover,
.category-recipe-list a:focus-visible {
  border-color: var(--box-ochre);
  background: linear-gradient(135deg, #f5cf52, #fff7d7 62%);
  outline: 0;
  transform: translateY(-1px);
}

/* Outside-page controls appear only when the physical two-page spread fits. */
.book-navigation {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

.book-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: .66in;
  height: 1.08in;
  border: 2px solid #713f13;
  background:
    radial-gradient(circle at 50% 25%, transparent 0 .09in, rgba(113,63,19,.55) .1in .115in, transparent .12in),
    linear-gradient(#f8c52a, #d98d08);
  color: #63360f;
  text-decoration: none;
  box-shadow: 0 5px 13px rgba(44,29,15,.28), inset 0 0 0 4px rgba(255,225,112,.65);
  pointer-events: auto;
  transition: transform .16s ease, filter .16s ease;
}

.book-nav span {
  margin-top: .15in;
  font-family: Georgia, serif;
  font-size: 31pt;
  font-weight: 700;
  line-height: 1;
}

.book-nav-previous {
  left: -.78in;
  clip-path: polygon(100% 0, 100% 100%, 28% 88%, 0 50%, 28% 12%);
  transform: translateY(-50%) rotate(-3deg);
}

.book-nav-next {
  right: -.78in;
  clip-path: polygon(0 0, 72% 12%, 100% 50%, 72% 88%, 0 100%);
  transform: translateY(-50%) rotate(3deg);
}

.book-nav:hover { filter: saturate(1.15) brightness(1.06); }
.book-nav-previous:hover { transform: translateY(-50%) translateX(-3px) rotate(-5deg); }
.book-nav-next:hover { transform: translateY(-50%) translateX(3px) rotate(5deg); }
.book-nav:focus-visible { outline: 4px solid white; outline-offset: 3px; }

@media screen and (min-width: 1800px) {
  .book-navigation { display: block; }
}

/*
 * Maximized/fullscreen Chrome presentation. JavaScript supplies a scale that
 * fits the two Letter pages and both outside tabs inside the current viewport.
 * Every spread then occupies exactly one screen-height snap slot, so the next
 * recipe cannot peek into the resting view.
 */
@media screen {
  html.presentation-mode,
  body.presentation-mode {
    height: 100%;
    overflow: hidden;
  }

  body.presentation-mode .book {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    gap: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
  }

  body.presentation-mode .book::-webkit-scrollbar { display: none; }

  body.presentation-mode .spread {
    flex: 0 0 auto;
    height: var(--presentation-slot-height);
    padding-block: var(--presentation-pad-y);
    scroll-margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    zoom: var(--presentation-scale);
  }

  body.presentation-mode .recipe-anchor { scroll-margin: 0; }
  body.presentation-mode .book-navigation { display: block; }
}

.section-label {
  display: flex;
  align-items: center;
  gap: .08in;
  margin: 0.08in 0 0.06in;
}

.section-label h2 {
  margin: 0;
  font-size: 18pt;
  line-height: 1;
  font-weight: 600;
}

.section-label::after {
  content: "";
  height: 1px;
  background: var(--rule);
  flex: 1;
}

.transcription {
  font-family: var(--font-serif);
  font-size: 10.2pt;
  line-height: 1.16;
  columns: 2;
  column-gap: .22in;
}

.transcription p {
  margin: 0 0 .055in;
  break-inside: avoid;
}

.transcription .editorial {
  color: var(--muted);
  font-style: italic;
}

.recipe-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .18in;
  align-items: end;
  margin-bottom: .16in;
}

.recipe-head:not(:has(.yield)) {
  grid-template-columns: 1fr;
  gap: 0;
}

.recipe-head .yield {
  text-align: right;
  font-size: 9pt;
  color: var(--muted);
}

.description {
  margin: 0 0 .18in;
  font-family: var(--font-serif);
  font-size: 13pt;
  line-height: 1.24;
}

.recipe-columns {
  display: grid;
  grid-template-columns: 0.93fr 1.22fr;
  gap: .3in;
}

.recipe-section h2 {
  font-size: 18pt;
  margin: 0 0 .07in;
  padding-bottom: .035in;
  border-bottom: 2px solid var(--box-gold);
}

.ingredients {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ingredients li {
  margin: 0 0 .06in;
  padding-left: .11in;
  position: relative;
}

.ingredients li::before {
  content: "•";
  color: var(--box-gold);
  position: absolute;
  left: 0;
  font-weight: 700;
}

.steps {
  counter-reset: step;
}

.step {
  margin: 0 0 .105in;
  break-inside: avoid;
}

.step h3 {
  margin: 0 0 .018in;
  font-size: 13.3pt;
  font-weight: 600;
}

.step p {
  margin: 0;
}

.notes {
  margin-top: .11in;
  padding: .10in .12in;
  border-left: 4px solid var(--box-gold);
  background: rgba(217,154,18,.08);
  font-size: 8.8pt;
}

.notes strong {
  font-family: var(--font-serif);
  font-size: 11pt;
}

.notes p {
  margin: 0 0 .06in;
}

.notes p:last-child {
  margin-bottom: 0;
}

.folio {
  position: absolute;
  bottom: .23in;
  color: #938574;
  font-family: var(--font-serif);
  font-size: 9pt;
}
.page-left .folio { left: var(--outer); }
.page-right .folio { right: var(--outer); }

.recipe-popout {
  position: absolute;
  top: .22in;
  right: .42in;
  z-index: 8;
  display: grid;
  place-items: center;
  width: .62in;
  height: .62in;
  border: 1.5px solid color-mix(in srgb, var(--box-ochre) 78%, #6b4a23);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 92%, var(--box-yellow));
  color: #715026;
  box-shadow: 0 1px 3px rgb(75 48 16 / 18%);
  transition: color 120ms ease, background 120ms ease, transform 120ms ease, stroke 120ms ease;
}

.recipe-popout:hover,
.recipe-popout:focus-visible {
  background: var(--box-yellow);
  color: #4f3517;
  transform: translateY(-1px);
}

.recipe-popout:focus-visible {
  outline: 2px solid #6d4218;
  outline-offset: 2px;
}

.recipe-popout svg {
  width: .35in;
  height: .35in;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: center;
  transition: color 120ms ease, background 120ms ease, transform 120ms ease, stroke 120ms ease;
}

/* In the two-page desktop spread, one Kitchen View control is sufficient. */
@media screen and (min-width: 1600px) {
  .page-left .recipe-popout {
    display: none;
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  .recipe-popout {
    animation: kitchen-view-ring-pulse 2.5s ease-in-out infinite;
    filter: drop-shadow(5px 5px 8px rgba(0, 0, 0, 0.4));
  }

  .recipe-popout svg {
    color: var(--resident-burgundy);
  }

  .recipe-popout.is-entering svg {
    animation: kitchen-view-arrival 700ms ease-out 1;
  }

  @keyframes kitchen-view-arrival {
    from { transform: rotate(-360deg) scale(.65); }
    to { transform: rotate(0deg) scale(1); }
  }

  @keyframes kitchen-view-ring-pulse {
    0%, 100% {
      box-shadow: 0 1px 2px rgb(75 48 16 / 18%), 0 0 0 0.01in
      color-mix(in srgb, var(--resident-burgundy) 70%, transparent);
    }
    50% {
      box-shadow: 0 1px 3px rgb(75 48 16 / 24%), 0 0 0 .02in
      color-mix(in srgb, var(--resident-deep-indigo) 80%, transparent);
    }
  }
}

@media print, (prefers-reduced-motion: reduce) {
  .recipe-popout {
    animation: none !important;
  }

  .recipe-popout svg {
    animation: none !important;
    color: var(--resident-burgundy);
  }
}

.missing-asset,
.overflow-warning {
  border: 1px dashed #a33;
  background: #fff1f1;
  color: #7b2020;
  padding: .08in;
  font: 700 9pt/1.3 var(--font-sans);
}

.missing-asset {
  display: none;
}

.audit-missing-assets .missing-asset {
  display: block;
}

.overflow-warning {
  display: none;
  position: absolute;
  right: .18in;
  bottom: .18in;
  z-index: 10;
}

.audit-overflow .page.has-overflow .overflow-warning {
  display: block;
}

.audit-recipe-id {
  position: absolute;
  bottom: .2in;
  z-index: 4;
  color: #938574;
  font-family: var(--font-sans);
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: .08em;
}

.audit-recipe-id-left { right: var(--inner); }
.audit-recipe-id-right { left: var(--inner); }

.gnome-lightbox-button {
  display: none;
  position: absolute;
  z-index: 18;
  bottom: .11in;
  width: .42in;
  height: .42in;
  padding: .025in;
  border: 1px solid rgba(109, 66, 31, .65);
  border-radius: 50%;
  background: rgba(255, 248, 224, .94);
  box-shadow: 0 2px 5px rgba(75, 48, 23, .2), inset 0 0 0 1px rgba(217, 154, 18, .35);
  cursor: zoom-in;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.page-left .gnome-lightbox-button { left: .11in; }
.page-right .gnome-lightbox-button { right: .11in; }

.gnome-lightbox-button img {
  display: block;
  width: 100%;
  height: 100%;
}

.gnome-lightbox-button:hover {
  background: #fff4d2;
  box-shadow: 0 3px 8px rgba(75, 48, 23, .3), inset 0 0 0 1px rgba(217, 154, 18, .55);
  transform: translateY(-1px) rotate(-2deg);
}

.gnome-lightbox-button:focus-visible {
  outline: 3px solid var(--box-gold);
  outline-offset: 2px;
}

@media screen and (min-width: 1600px) and (hover: hover) and (pointer: fine) {
  .gnome-lightbox-button { display: grid; place-items: center; }
}

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(33, 25, 17, .72);
  color: #3f260e;
  overflow: hidden;
}

body.lightbox-open { overflow: hidden; }

.lightbox[open] { display: grid; place-items: center; }

.lightbox::backdrop {
  background:
    radial-gradient(circle at center, rgba(105,71,34,.2), rgba(0,0,0,.88) 70%);
  backdrop-filter: blur(3px);
}

.lightbox-box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(2.8rem, 5vw) minmax(0, 1fr) minmax(2.8rem, 5vw);
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(82vw, 72rem);
  height: min(82vh, 50rem);
  padding: 3.7rem 1.15rem 1rem;
  border: 14px solid #d49008;
  outline: 4px solid #6c3b11;
  outline-offset: -7px;
  background:
    radial-gradient(circle at 10% 9%, transparent 0 .45rem, rgba(111,60,14,.7) .48rem .58rem, transparent .61rem),
    radial-gradient(circle at 90% 9%, transparent 0 .45rem, rgba(111,60,14,.7) .48rem .58rem, transparent .61rem),
    linear-gradient(135deg, rgba(255,211,46,.98), rgba(224,143,5,.98));
  box-shadow:
    0 24px 70px rgba(0,0,0,.6),
    inset 0 0 0 5px rgba(255,224,99,.75),
    inset 0 0 0 8px rgba(104,55,12,.42);
  transform: rotate(-.35deg);
  transition: width .18s ease, height .18s ease;
}

.lightbox-box.is-portrait {
  width: min(66vw, 43rem);
  height: min(90vh, 58rem);
}

.lightbox-box::before,
.lightbox-box::after {
  content: "";
  position: absolute;
  left: 2.2rem;
  right: 2.2rem;
  height: 1.05rem;
  background:
    radial-gradient(ellipse at center, transparent 0 21%, #713f13 23% 28%, transparent 30%) 0 0 / 3rem 1rem repeat-x;
  opacity: .72;
  pointer-events: none;
}

.lightbox-box::before { top: .8rem; }
.lightbox-box::after { bottom: .42rem; transform: rotate(180deg); }

.lightbox-lid {
  position: absolute;
  left: 50%;
  top: .45rem;
  width: min(25rem, 50%);
  height: 2.35rem;
  transform: translateX(-50%);
}

.lightbox-lid::before,
.lightbox-lid::after,
.lightbox-lid span::before,
.lightbox-lid span::after {
  content: "";
  position: absolute;
  border: 3px solid rgba(113,63,19,.8);
  border-radius: 50%;
}

.lightbox-lid::before { inset: .35rem 50% .35rem 0; border-right: 0; }
.lightbox-lid::after { inset: .35rem 0 .35rem 50%; border-left: 0; }
.lightbox-lid span::before { width: 2rem; height: 2rem; left: calc(50% - 1.7rem); top: .1rem; }
.lightbox-lid span::after { width: 2rem; height: 2rem; right: calc(50% - 1.7rem); top: .1rem; }

.lightbox-label {
  position: absolute;
  z-index: 2;
  top: 2.55rem;
  left: 50%;
  margin: 0;
  padding: .22rem .8rem .16rem;
  border: 2px solid #754212;
  background: #ffe58a;
  color: #6d421f;
  font: 700 .76rem/1 var(--font-sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  transform: translateX(-50%) rotate(.4deg);
  box-shadow: inset 0 0 0 2px #f3bd20;
}

/* Caption visibility is body state so a future preference control only needs
 * to toggle one class. Captions are intentionally hidden by default. */
body.captions-hidden .gnome-caption,
body.captions-hidden .lightbox-caption,
body.captions-hidden [data-caption-display] {
  display: none;
}

.lightbox-stage {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 8px ridge #8a571f;
  background: #f8f1df;
  box-shadow: inset 0 0 22px rgba(70,45,20,.25);
  touch-action: none;
  cursor: zoom-in;
}

.lightbox-stage.is-zoomed { cursor: grab; }
.lightbox-stage.is-zoomed:active { cursor: grabbing; }

.lightbox-image-container {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 1.4rem);
  max-height: calc(100% - 1.4rem);
  object-fit: contain;
  border: 1px solid rgba(91,61,30,.2);
  box-shadow: 0 7px 20px rgba(53,35,17,.25);
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close,
.lightbox-nav {
  appearance: none;
  border: 2px solid #6b3b10;
  color: #63360f;
  background: linear-gradient(#ffe072, #dc970d);
  cursor: pointer;
  font-family: Georgia, serif;
  box-shadow: inset 0 0 0 3px rgba(255,235,150,.6), 0 3px 8px rgba(70,40,10,.28);
}

.lightbox-close:hover,
.lightbox-nav:hover { background: linear-gradient(#fff0a5, #edae20); }

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible { outline: 3px solid var(--box-gold); }

.lightbox-close {
  position: absolute;
  z-index: 5;
  top: .62rem;
  right: .62rem;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 1;
}

.lightbox-nav {
  width: min(3.35rem, 7vw);
  height: 4.4rem;
  font-size: 2.7rem;
  align-self: center;
}

.lightbox-prev { grid-column: 1; grid-row: 2; justify-self: center; transform: rotate(-2deg); }
.lightbox-next { grid-column: 3; grid-row: 2; justify-self: center; transform: rotate(2deg); }

/* Gnome-scene viewer: a broad brass-and-timber inspection cabinet. */
.lightbox.lightbox-mode-gnome {
  background:
    radial-gradient(circle at 50% 42%, rgba(105, 78, 40, .24), transparent 48%),
    rgba(15, 12, 9, .9);
}

.lightbox-mode-gnome .lightbox-box,
.lightbox-mode-gnome.lightbox-box,
.lightbox-mode-gnome .lightbox-box.is-portrait,
.lightbox-mode-gnome.lightbox-box.is-portrait {
  width: min(96vw, 112rem);
  height: min(94vh, 70rem);
  padding: 4.15rem 1.35rem 1.15rem;
  border: 16px solid #744019;
  outline: 5px solid #24150c;
  outline-offset: -9px;
  background:
    radial-gradient(circle at 1.3rem 1.3rem, #f4c969 0 .18rem, #6f3a13 .2rem .35rem, transparent .37rem) 0 0 / 3.2rem 3.2rem,
    repeating-linear-gradient(90deg, transparent 0 5.8rem, rgba(35, 15, 6, .22) 5.9rem 6rem),
    linear-gradient(105deg, #49250f, #8d5120 28%, #5a2d12 60%, #9a5b25);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, .78),
    inset 0 0 0 6px #c58a31,
    inset 0 0 0 11px #38200f,
    inset 0 0 55px rgba(10, 5, 2, .72);
  transform: none;
}

.lightbox-mode-gnome .lightbox-box::before,
.lightbox-mode-gnome.lightbox-box::before,
.lightbox-mode-gnome .lightbox-box::after,
.lightbox-mode-gnome.lightbox-box::after {
  left: 4.3rem;
  right: 4.3rem;
  height: 1.3rem;
  opacity: 1;
  background:
    linear-gradient(#d5a34d, #6c3914 48%, #e0b461 52%, #7c451a);
  border: 2px solid #2c180c;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 218, 128, .3), 0 3px 5px rgba(0, 0, 0, .5);
}

.lightbox-mode-gnome .lightbox-box::before,
.lightbox-mode-gnome.lightbox-box::before { top: 1rem; }
.lightbox-mode-gnome .lightbox-box::after,
.lightbox-mode-gnome.lightbox-box::after { bottom: .72rem; transform: none; }

.lightbox-mode-gnome .lightbox-lid {
  top: .43rem;
  width: min(35rem, 48%);
  height: 3rem;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .55));
}

.lightbox-mode-gnome .lightbox-lid::before,
.lightbox-mode-gnome .lightbox-lid::after,
.lightbox-mode-gnome .lightbox-lid span::before,
.lightbox-mode-gnome .lightbox-lid span::after {
  border-color: #d2a04b;
  background: rgba(61, 31, 12, .75);
}

.lightbox-mode-gnome .lightbox-label {
  top: 2.65rem;
  padding: .3rem 1.4rem .25rem;
  border: 3px double #edc471;
  background: linear-gradient(#70411c, #321b0d);
  color: #ffe3a1;
  letter-spacing: .18em;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .55), inset 0 0 0 2px #9a682d;
  transform: translateX(-50%);
}

.lightbox-mode-gnome .lightbox-stage {
  border: 10px ridge #b67b2d;
  background:
    radial-gradient(circle, #fffaf0 0, #e8ddc7 72%, #9a7143 100%);
  box-shadow: inset 0 0 35px rgba(48, 25, 9, .48), 0 0 0 3px #2a160a;
}

.lightbox-mode-gnome .lightbox-image-container {
  position: relative;
  display: block;
}

.lightbox-mode-gnome .lightbox-image {
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  border: 10px solid #fff;
  box-shadow: 0 8px 28px rgba(29, 16, 7, .28);
}

.lightbox-mode-gnome .lightbox-close {
  top: .72rem;
  right: .82rem;
  border-color: #2e190c;
  color: #ffe7aa;
  background: radial-gradient(circle at 35% 30%, #d5a557, #744019 68%);
  box-shadow: inset 0 0 0 3px rgba(255, 219, 133, .32), 0 3px 8px rgba(0, 0, 0, .55);
}

/*
 * Reversible image-frame trial. Remove `gnome-frame-image` from lightbox_html
 * in generate-cookbook to restore the original CSS inspection cabinet above.
 */
.lightbox-mode-gnome .lightbox-box.gnome-frame-image,
.lightbox-mode-gnome.lightbox-box.gnome-frame-image,
.lightbox-mode-gnome .lightbox-box.gnome-frame-image.is-portrait,
.lightbox-mode-gnome.lightbox-box.gnome-frame-image.is-portrait {
  display: block;
  width: min(96vw, 160vh, 112rem);
  height: auto;
  aspect-ratio: 1611 / 856;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .72);
  isolation: isolate;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image::before,
.lightbox-mode-gnome.lightbox-box.gnome-frame-image::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  opacity: 1;
  background: url("../assets/images/gnomepunk-lightbox-frame.png") center / contain no-repeat;
  box-shadow: none;
  pointer-events: none;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image::after,
.lightbox-mode-gnome.lightbox-box.gnome-frame-image::after,
.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-lid {
  display: none;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-stage {
  position: absolute;
  z-index: 1;
  inset: 12.4% 14.9% 11.8%;
  width: auto;
  height: auto;
  border: 0;
  background: #FFFFFF;
  box-shadow: inset 0 0 14px rgba(45, 27, 14, .14);
}

.lightbox-storybook-caption {
  display: none;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-storybook-caption {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 1.3%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44%;
  height: 8%;
  box-sizing: border-box;
  margin: 0;
  color: #f5dca8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.48rem, 1.05vw, 1.15rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .01em;
  text-align: center;
  text-shadow: 0 1px 1px #160d08, 0 0 5px rgba(0, 0, 0, .9);
  transform: translateX(-50%);
  pointer-events: none;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-storybook-caption[hidden] {
  display: none;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-storybook-caption-missing {
  color: #ffd074;
  text-decoration: underline dashed #d77a00;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-image {
  border: 0;
  box-shadow: none;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-nav {
  display: none;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-close,
.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-nav {
  position: absolute;
  z-index: 5;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-close {
  top: 5.5%;
  right: 6.5%;
  width: clamp(1.8rem, 3vw, 2.65rem);
  height: clamp(1.8rem, 3vw, 2.65rem);
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-nav {
  top: 50%;
  width: clamp(1.8rem, 3.5vw, 3rem);
  height: clamp(2.6rem, 6vw, 4.2rem);
  transform: translateY(-50%);
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-prev {
  left: 16.25%;
}

.lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-next {
  right: 16.25%;
}

@media screen and (max-width: 1599px) {
  .spread { grid-template-columns: var(--page-w); }
}

@media screen and (max-width: 850px) {
  .splash-return { display: none; }
  .book { gap: 12px; padding: 12px 0; }
  .spread {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 12px;
  }
  .page {
    width: calc(100vw - 24px);
    height: auto;
    min-height: calc((100vw - 24px) * 1.2941);
    padding: clamp(20px, 6vw, .5in);
  }
  .page-left,
  .page-right { padding-inline: clamp(20px, 6vw, .5in); }
  .frontmatter-cover-page,
  .frontmatter-title-page {
    min-height: calc((100vw - 24px) * 1.2941);
    padding: 0;
  }
  .frontmatter-cover-content { padding: 5.5vw 7vw; }
  .frontmatter-cover-content h1,
  .frontmatter-title-content h1,
  .frontmatter-title-lettering { width: min(84vw, 6.8in); }
  .frontmatter-cover-content h1 { font-size: clamp(27pt, 9vw, 36pt); }
  .frontmatter-centerpiece {
    width: min(67vw, 5.65in);
    height: min(77vw, 6.5in);
  }
  .yellow-box-motif { width: min(55vw, 4.65in); }
  .frontmatter-cover-subtitle { font-size: clamp(10pt, 3.3vw, 15pt); }
  .frontmatter-title-content { padding: 14vw 8vw 8vw; }
  .frontmatter-title-content h1 { font-size: clamp(31pt, 10vw, 43pt); }
  .frontmatter-colophon { width: min(72vw, 5.35in); }
  h1 { font-size: clamp(22pt, 9vw, 29pt); }
  .page-left.archival-page .page-content > h1,
  .page-right.archival-page .page-content > h1,
  .page-left.normalized-page .recipe-head:not(:has(.yield)) h1,
  .page-right.normalized-page .recipe-head:not(:has(.yield)) h1 {
    width: calc(100% - 1.1in);
  }
  .recipe-columns { grid-template-columns: 1fr; }
  .transcription { columns: 1; }
  .category-title-content { padding-top: 0; }
  .category-eyebrow { margin-top: .65in; }
  .category-title-content h1 { font-size: clamp(34pt, 12vw, 47pt); }
  .category-recipe-list { grid-template-columns: 1fr; }
  .audit-gnomes .gnome-layer { border: 0; }
  .gnome-layer {
    width: min(5in, 62vw);
    height: min(4.2in, 52vw);
  }

  .mobile-gnome-shelf .page {
    display: flex;
    flex-direction: column;
  }
  .mobile-gnome-shelf .page-content { order: 1; }
  .mobile-gnome-shelf .gnome-layer:not(.gnome-layer-active):not(.gnome-zone-empty) { display: none; }
  .mobile-gnome-shelf .gnome-layer-active,
  .mobile-gnome-shelf .gnome-zone-empty {
    position: relative;
    inset: auto !important;
    order: 2;
    flex: 0 0 auto;
    width: 100% !important;
    min-width: 0 !important;
    height: clamp(9rem, 43vw, 16rem) !important;
    max-height: none !important;
    margin: clamp(.75rem, 3vw, 1.5rem) 0 0;
    background-position: center bottom !important;
    background-size: contain;
    transform: none !important;
  }
  .mobile-gnome-shelf .gnome-layer-active.is-lightbox-trigger {
    pointer-events: auto;
    cursor: zoom-in;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-gnome-shelf .gnome-layer-active.is-lightbox-trigger:focus-visible {
    outline: 3px solid var(--box-gold);
    outline-offset: 4px;
    border-radius: .12in;
  }
  .mobile-gnome-shelf .category-spread .gnome-layer-active {
    height: clamp(24rem, 82vw, 46rem) !important;
    margin-top: clamp(1rem, 4vw, 2rem);
    background-position: center bottom !important;
    background-size: contain !important;
  }
  .mobile-gnome-shelf.gnome-shelf-enhanced .gnome-layer-active:not(.is-revealed) {
    opacity: 0;
    transform: translateY(.7rem) !important;
  }
  .mobile-gnome-shelf.gnome-shelf-enhanced .gnome-layer-active {
    transition: opacity 1.12s ease-out, transform .7s cubic-bezier(.2,.75,.25,1);
  }
  .mobile-gnome-shelf.gnome-shelf-enhanced .gnome-layer-active.is-revealed {
    opacity: 1;
    transform: none !important;
  }
  .lightbox-box {
    width: calc(100vw - 24px);
    height: min(82vh, 44rem);
    padding: 3.3rem .3rem .55rem;
    border-width: 9px;
  }
  .lightbox-box.is-portrait {
    width: calc(100vw - 24px);
    height: min(92vh, 58rem);
  }
  .lightbox-label { white-space: nowrap; font-size: .62rem; }
  .lightbox-nav { width: 2.4rem; height: 3.6rem; }
  .lightbox-stage { border-width: 5px; }
  .lightbox-mode-gnome .lightbox-box.gnome-frame-image,
  .lightbox-mode-gnome.lightbox-box.gnome-frame-image,
  .lightbox-mode-gnome .lightbox-box.gnome-frame-image.is-portrait,
  .lightbox-mode-gnome.lightbox-box.gnome-frame-image.is-portrait {
    width: calc(100vw - 8px);
    height: auto;
    padding: 0;
    border: 0;
  }
  .lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-nav {
    width: 1.9rem;
    height: 2.8rem;
    font-size: 2rem;
  }
  .lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-close {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 1.35rem;
  }
  .lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-stage {
    box-shadow: inset 0 0 14px rgba(45, 27, 14, .09);
  }
  .lightbox-mode-gnome .lightbox-box.gnome-frame-image .lightbox-storybook-caption {
    width: 48%;
    font-size: clamp(.42rem, 1.8vw, .68rem);
    line-height: 1.08;
  }
}

@media screen and (max-width: 600px) {
  .recipe-popout {
    top: .2in;
    right: .2in;
    width: .46in;
    height: .46in;
  }

  .recipe-popout svg {
    width: .25in;
    height: .25in;
  }

  .page-left.archival-page .page-content > h1,
  .page-right.archival-page .page-content > h1,
  .page-left.normalized-page .recipe-head:not(:has(.yield)) h1,
  .page-right.normalized-page .recipe-head:not(:has(.yield)) h1 {
    width: calc(100% - .78in);
  }
}

@media screen and (max-width: 850px) and (prefers-reduced-motion: reduce) {
  .mobile-gnome-shelf.gnome-shelf-enhanced .gnome-layer-active {
    opacity: 1;
    transform: none !important;
    transition: none;
  }
}

/* PRINT CSS START */
@page {
  size: Letter portrait;
  margin: 0;
}

@media print {
  .recipe-popout { display: none !important; }
  .splash-return { display: none !important; }
  html, body { background: white; }
  .book { display: block; padding: 0; }
  .spread { display: block; }
  .page {
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  .page:last-child {
    break-after: auto;
    page-break-after: auto;
  }
  .scan-button { cursor: default; }
  .lightbox,
  .missing-asset,
  .overflow-warning { display: none !important; }
}
/* PRINT CSS END */
