.sm-book-popup {
  position: fixed;
  z-index: 1100;
  left: max(24px, env(safe-area-inset-left));
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(352px, calc(100% - 48px));
  max-height: calc(100dvh - 48px);
  border: 1px solid #d5c9ca;
  border-radius: 8px;
  background: #fffdf9;
  color: #251c22;
  box-shadow: 0 12px 36px rgb(26 21 24 / .18);
  overflow: hidden;
  animation: sm-book-enter .24s ease-out both;
}
.sm-book-popup[hidden] { display: none; }
.sm-book-popup-scroll { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.sm-book-popup-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid #e6dcd8;
  border-radius: 4px;
  background: #fffdf9;
  cursor: pointer;
}
.sm-book-popup-close img { width: 20px; height: 20px; }
.sm-book-popup-media { position: relative; height: 160px; margin-bottom: 18px; }
.sm-book-popup-photo { width: 100%; height: 100%; object-fit: cover; object-position: 45% 48%; }
.sm-book-popup-cover {
  position: absolute;
  right: 52px;
  bottom: -16px;
  width: 92px;
  height: auto;
  transform: rotate(-5deg);
  box-shadow: 4px 7px 12px rgb(30 20 25 / .22);
}
.sm-book-popup-copy { padding: 14px 20px 20px; }
.sm-book-popup-copy .sm-book-popup-eyebrow { margin: 0 40px 8px 0; color: #793b55; font: 600 11px/1.4 var(--sans); text-transform: uppercase; }
.sm-book-popup-copy h2 { margin: 0 0 10px; font: 400 30px/1.05 var(--serif); letter-spacing: 0; }
.sm-book-popup-copy p { margin: 0 0 17px; font: 400 14px/1.5 var(--sans); }
.sm-book-popup-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 3px;
  background: #69364d;
  color: #fffdf9;
  font: 600 14px/1.4 var(--sans);
  text-decoration: none;
}
.sm-book-popup-cta img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.sm-book-popup-cta:hover { background: #4b2335; }
.sm-book-popup-close:hover { background: #eee0df; }
.sm-book-popup :is(a, button):focus-visible { outline: 2px solid #251c22; outline-offset: -4px; }
@keyframes sm-book-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .sm-book-popup {
    left: max(12px, env(safe-area-inset-left));
    bottom: max(68px, calc(56px + env(safe-area-inset-bottom)));
    width: min(352px, calc(100% - 24px));
    max-height: calc(100dvh - 172px);
  }
  .sm-book-popup-media { height: 140px; }
  .sm-book-popup-cover { width: 84px; }
  .sm-book-popup-copy { padding: 12px 18px 18px; }
}
@media (max-height: 600px) {
  .sm-book-popup-media { height: 100px; }
  .sm-book-popup-cover { width: 66px; }
  .sm-book-popup-copy h2 { font-size: 26px; }
}
@media (max-height: 440px) {
  .sm-book-popup-media { display: none; }
  .sm-book-popup-copy { padding-top: 20px; }
  .sm-book-popup-copy h2 { padding-right: 36px; }
}
@media (prefers-reduced-motion: reduce) { .sm-book-popup { animation: none; } }
