/* Four books share a shelf on desktop; two equally sized pairs on mobile. */
.pantry-scene .book-packet{width:9%;height:18.6%}.pantry-scene .packet-sun{left:30%}.pantry-scene .packet-good{left:39%}.pantry-scene .packet-emotion{left:48%}.pantry-scene .packet-hell{left:57%;top:50.8%;width:9%;height:18.6%}.pantry-scene .other-book-caption{display:none}.purchase-links>[hidden]{display:none!important}
/* Match the visible cover height after allowing for transparent image edges. */
.pantry-scene .packet-emotion > img,
.mobile-tour .packet-grid [data-book="emotion"] img {
  transform: translateY(1.4%) scale(1.038);
  transform-origin: center bottom;
}

@media(max-width:1050px){
.mobile-tour .central{
 --book-height:clamp(52px, calc((100svh - 440px) / 2), 32cqw);
 --base-grid-top:clamp(180px,49cqw,238px);
 --opening-space:clamp(0px, calc(100svh - 220px - var(--base-grid-top) - 2 * var(--book-height)), 58px);
 --cord-extension:calc(var(--opening-space) * .29);
 --grid-top:calc(var(--base-grid-top) + var(--opening-space));
 --book-row-pitch:calc(var(--book-height) + 32px);
 height:calc(var(--grid-top) + 2 * var(--book-height) + 70px);
 min-height:calc(100svh - 150px);
 max-height:none;
}
.mobile-tour .central:before{background-position:calc(50% + 1.4cqw) calc(-28cqw + var(--cord-extension))}
/* Keep the original cabinet in one piece and align both shelf edges to the books. */
.mobile-tour .central::before {
  mask-image: linear-gradient(#000 0 var(--grid-top), transparent calc(var(--grid-top) + 62px));
}
.mobile-tour .central::after {
  inset: calc(var(--grid-top) + var(--book-height) - 46px) 0 0;
  height: auto;
  background: url('/snack-assets/pantry-v4.webp') 44% calc(46px - 4.27 * var(--book-row-pitch)) / 218cqw calc(6.16 * var(--book-row-pitch)) no-repeat;
  mask-image: linear-gradient(transparent, #000 29px);
}
.mobile-tour .central { background: #eddbc0; }
.mobile-tour .central .opening-sign{top:clamp(16px,5cqw,26px);left:5%;font-size:clamp(19px,5.5cqw,28px)}
.mobile-tour .tour-copy{top:calc(clamp(84px,24cqw,135px) + var(--opening-space) * .62);left:3%;width:94%}
.mobile-tour .tour-copy p{font-size:clamp(11px,3.3cqw,15px);line-height:1.4}
.mobile-tour .tour-copy h2{font-size:clamp(12px,3.65cqw,17px);margin-top:6px}
.mobile-tour .packet-grid{top:var(--grid-top);left:8%;right:8%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 8%;align-items:start}
/* Clear the cabinet recess while keeping the original posts and shelf fronts visible. */
.mobile-tour .packet-grid::before {
  content: "";
  position: absolute;
  top: calc(var(--book-height) + 17px);
  bottom: 27px;
  left: -7%;
  right: -7%;
  border-radius: 0 0 2px 2px;
  background:
    repeating-linear-gradient(1deg, #55311b18 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #70482f, #926747 24%, #9e7451 90%, #856043);
  box-shadow: inset 0 8px 12px #3d25176e, inset 7px 0 12px #432a184a, inset -7px 0 12px #432a184a;
  pointer-events: none;
}
.mobile-tour .packet-grid>button{position:relative;width:100%;display:flex;flex-direction:column;align-items:center;padding:0;border:0;background:none;color:#52604c}
.mobile-tour .packet-grid img{display:block;width:100%;height:var(--book-height);object-fit:contain;object-position:center bottom;filter:drop-shadow(0 3px 2px #4b321c30)}
.mobile-tour .packet-grid small{margin-top:2px;font-size:11px;line-height:17px;padding:3px 6px;white-space:nowrap}
.packet-author-note{position:absolute;top:100%;left:50%;transform:translateX(-50%);font-size:9px;white-space:nowrap;color:#5e5548;background:#fff9e9ed;padding:1px 4px;border-radius:3px}
.mobile-tour .packet-grid button:focus-visible{outline:2px solid #a78f68;outline-offset:4px;border-radius:6px}
}

@media (min-width: 1051px) {
  .pantry-page .pantry-viewport {
    height: calc(100svh - var(--shared-header-height));
    display: grid;
    place-items: center;
  }

  .pantry-page .pantry-scene {
    --scene-width: min(100vw, calc((100svh - var(--shared-header-height)) * 1672 / 941));
    width: var(--scene-width);
    height: auto;
    aspect-ratio: 1672 / 941;
  }

  /* Fill the viewport with the artwork's atmosphere behind the original scene. */
  .pantry-page .pantry-viewport {
    position: relative;
    isolation: isolate;
  }

  .pantry-page .pantry-viewport::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('/snack-assets/pantry-desktop-extension.jpg') center / cover no-repeat;
    pointer-events: none;
  }

  .pantry-page .pantry-viewport::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: clamp(86px, 14vh, 145px);
    z-index: 4;
    background: linear-gradient(#fffdf6df, #fffdf688 50%, transparent);
    pointer-events: none;
  }

  .pantry-page .pantry-background {
    mask-image: linear-gradient(90deg, transparent, #000 3%, #000 98%, transparent);
  }

  body.pantry-page > .shared-brand-row {
    position: absolute;
    /* Match the feed's centered title row within its 20% / 50% / 30% layout. */
    --feed-inner-width: calc(min(100%, 1800px) - 48px);
    top: calc(var(--shared-header-height) + 10px);
    left: calc(50% - var(--feed-inner-width) * .05);
    transform: translateX(-50%);
    margin: 0;
    width: min(calc(var(--feed-inner-width) * .5), calc((100dvh - 130px) * .82));
    height: 50px;
    padding-inline: 0;
    background: transparent;
    pointer-events: none;
  }

  html body.pantry-page > .site-brand-copy.shared-brand-row > span {
    font-size: clamp(18px, 1.65vw, 24px);
    line-height: 1.4;
    letter-spacing: -.035em;
  }

  html body.pantry-page > .site-brand-copy.shared-brand-row > span > strong {
    white-space: nowrap;
  }

  body.pantry-page > .shared-brand-row .shared-feed-link {
    width: 50px;
    height: 50px;
    pointer-events: auto;
  }

  .pantry-scene .nameplate.plate-history {
    top: 29%;
  }
}
