/* Gigi's bottom drawer: real paper, things to pick up, no carousel. */
.keepsake-invitation {
  position: relative;
  align-self: center;
  min-width: 0;
  padding: 20px 0 135px;
  isolation: isolate;
}
.keepsake-invitation .kitchen-postcard {
  width: 86%;
  margin: 0 0 0 auto;
  padding-bottom: 62px;
  z-index: 1;
}
.keepsake-invitation .kitchen-postcard > img:first-child {
  height: auto;
  aspect-ratio: 0.78;
}
.keepsake-invitation .kitchen-postcard figcaption {
  font-size: 19px;
}
.keepsake-invitation .postcard-branch {
  right: -15px;
  bottom: -42px;
}
.keepsake-envelope {
  position: absolute;
  width: 78%;
  height: 50%;
  left: 0;
  top: 36px;
  background: #dbc69f;
  border: 1px solid #ae8c5c55;
  box-shadow: 0 3px 13px #503a2915;
  transform: rotate(-8deg);
}
.keepsake-envelope:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    32deg,
    transparent 49.5%,
    #af916744 50%,
    transparent 50.5%
  );
}
.keepsake-envelope > span {
  position: absolute;
  left: 14px;
  top: 14px;
  writing-mode: vertical-rl;
  font: italic 20px var(--serif);
  color: #705537;
}
.keepsake-peek {
  position: absolute;
  z-index: 2;
  left: -8%;
  bottom: 125px;
  width: 52%;
  padding: 9px 9px 44px;
  background: #fff8e9;
  box-shadow:
    3px 9px 20px #503a292c,
    0 1px 2px #503a2929;
  transform: rotate(-10deg);
}
.keepsake-peek:before {
  content: "";
  position: absolute;
  width: 52%;
  height: 22px;
  top: -9px;
  left: 24%;
  background: #c3a36880;
  transform: rotate(3deg);
  clip-path: polygon(2% 0, 98% 3%, 100% 90%, 1% 100%, 4% 50%);
}
.keepsake-peek > img {
  width: 100%;
  height: auto;
  aspect-ratio: 0.82;
  object-fit: cover;
  object-position: 49% 35%;
}
.keepsake-peek figcaption {
  position: absolute;
  bottom: 8px;
  left: 4px;
  right: 4px;
  text-align: center;
  font: italic 22px/1 var(--serif);
  color: #725238;
}
.keepsake-peek figcaption span {
  display: block;
  font: 8px/1.7 var(--sans);
  letter-spacing: 0.08em;
  color: #8c785e;
}
.drawer-open {
  position: absolute;
  bottom: 0;
  left: 9%;
  width: 84%;
  border: 0;
  padding: 14px 8px;
  color: #64492f;
  background: transparent;
  cursor: pointer;
  display: flex;
  gap: 17px;
  justify-content: center;
  align-items: center;
  text-align: left;
  font: italic 28px/1 var(--serif);
}
.drawer-open-note {
  display: block;
  margin-top: 8px;
  font: 10px/1.5 var(--sans);
  color: #7d684f;
}
.drawer-handle {
  position: relative;
  flex: 0 0 72px;
  height: 37px;
  border-radius: 50% 50% 8px 8px;
  background: linear-gradient(175deg, #d2b577 0%, #a98044 48%, #76512c 100%);
  border: 1px solid #836037;
  box-shadow:
    0 4px 4px #503a2925,
    inset 0 1px 2px #ffe7b5;
  transition:
    translate 0.35s ease,
    box-shadow 0.35s ease;
}
.drawer-handle:before,
.drawer-handle:after {
  content: "";
  position: absolute;
  top: 20px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #67462d;
  box-shadow: 0 1px 0 #e5c484;
}
.drawer-handle:before {
  left: 7px;
}
.drawer-handle:after {
  right: 7px;
}
.drawer-handle i {
  position: absolute;
  inset: 15px 18px 3px;
  border-radius: 50% 50% 3px 3px;
  background: linear-gradient(#4c3424, #8d693c);
  box-shadow: inset 0 2px 3px #2b1c19aa;
}
.drawer-invitation-arrow {
  position: absolute;
  width: 66px;
  right: -19px;
  top: -29px;
  rotate: 30deg;
}
@media (hover: hover) {
  .drawer-open:hover .drawer-handle {
    translate: 0 5px;
    box-shadow:
      0 7px 6px #503a2939,
      inset 0 1px 2px #ffe7b5;
  }
}

.keepsake-drawer {
  width: min(1220px, calc(100% - 36px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 0;
  border: 0;
  background: #f6eddc;
  color: #503a29;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 30px 100px #281c1890;
  scrollbar-width: thin;
  scrollbar-color: #aa8a5f #f6eddc;
}
.keepsake-drawer::backdrop {
  background: #2f221cb0;
  backdrop-filter: blur(5px);
}
.drawer-shell {
  position: relative;
  padding: 26px 30px 19px;
}
.drawer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4px 23px;
}
.drawer-heading h2 {
  font-size: clamp(35px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.drawer-heading h2 em {
  color: #9a743c;
}
.drawer-heading #drawer-intro {
  font: 11px/1.6 var(--sans);
  color: #786148;
  margin-top: 12px;
}
.drawer-touch-hint {
  display: none;
}
.drawer-close,
.memory-put-back,
.drawer-tidy,
.drawer-erase,
.drawer-pencil,
.memory-turn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #705237;
  min-height: 44px;
  padding: 8px;
  cursor: pointer;
}
.drawer-close {
  display: flex;
  gap: 12px;
  align-items: center;
  white-space: nowrap;
  font-size: 11px;
}
.drawer-close svg {
  width: 22px;
  height: 22px;
}
.drawer-tray {
  position: relative;
  padding: 17px 17px 25px;
  background: repeating-linear-gradient(
    2deg,
    #815c39 0px,
    #8c6642 3px,
    #916c44 5px,
    #89613c 8px,
    #97724b 14px
  );
  border: 1px solid #795333;
  box-shadow:
    0 7px 16px #503a2923,
    inset 0 1px 1px #d1aa77;
}
.drawer-paper {
  position: relative;
  height: clamp(430px, 55vh, 610px);
  background: #e8d9bb url("/assets/book-paper-e7582ec5.webp") repeat;
  background-size: 240px auto;
  overflow: hidden;
  box-shadow:
    inset 0 3px 12px #53372165,
    inset 0 0 1px 1px #7d5b37;
  isolation: isolate;
}
.drawer-paper:before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f2e5ce87;
  pointer-events: none;
}
.drawer-paper-note {
  position: absolute;
  right: 3%;
  bottom: 4%;
  color: #9d8460;
  font: italic 19px/1.1 var(--serif);
  rotate: -4deg;
  text-align: right;
  pointer-events: none;
}
.drawer-ink-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #b79a6c88;
  pointer-events: none;
}
.drawer-front-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  border-top: 1px solid #c59e6655;
  box-shadow: 0 1px 2px #3d251b77;
  background: linear-gradient(#9a744c, #80603d);
}
.drawer-front-edge i {
  position: absolute;
  left: 45%;
  right: 45%;
  top: 2px;
  height: 8px;
  border-radius: 0 0 20px 20px;
  box-shadow:
    inset 0 -1px 2px #c8a574,
    inset 0 3px 3px #412719;
  background: #6b482c;
}
.drawer-pieces {
  position: absolute;
  inset: 0;
}
.keepsake {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
  transform: translate(-50%, -50%) rotate(calc(var(--a) * 1deg));
  border: 0;
  padding: 0;
  border-radius: 0;
  cursor: grab;
  color: #65492f;
  text-align: center;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
  filter: drop-shadow(2px 6px 4px #4c321b30);
  z-index: var(--z, 1);
}
.keepsake:focus-visible {
  outline: 2px solid #9e6f2a;
  outline-offset: 7px;
}
.keepsake-gigi {
  --x: 19;
  --y: 38;
  --w: 23;
  --a: -9;
  --z: 4;
}
.keepsake-boys {
  --x: 48;
  --y: 28;
  --w: 29;
  --a: 6;
  --z: 2;
}
.keepsake-hands {
  --x: 24;
  --y: 78;
  --w: 23;
  --a: 8;
  --z: 6;
}
.keepsake-us {
  --x: 73;
  --y: 69;
  --w: 28;
  --a: -7;
  --z: 5;
}
.keepsake-note {
  --x: 79;
  --y: 28;
  --w: 24;
  --a: 9;
  --z: 3;
}
.keepsake-flower {
  --x: 47;
  --y: 74;
  --w: 16;
  --a: -13;
  --z: 7;
}
.keepsake-face {
  position: relative;
  display: block;
}
.keepsake-photo .keepsake-face {
  padding: 10px 10px 14px;
  background: #fff8e9;
  box-shadow: inset 0 0 1px 1px #d5c4a5;
}
.keepsake-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.4;
  object-fit: cover;
  pointer-events: none;
  filter: saturate(0.8) contrast(0.96);
}
.keepsake-gigi img {
  aspect-ratio: 0.87;
  object-position: 49% 36%;
}
.keepsake-caption {
  display: block;
  margin-top: 9px;
  font: italic clamp(17px, 1.8vw, 25px)/1.05 var(--serif);
}
.keepsake.is-dragging {
  cursor: grabbing;
  transform: translate(-50%, -50%) rotate(0deg) scale(1.04);
  filter: drop-shadow(5px 16px 10px #4c321b38);
  transition: none;
}
@media (hover: hover) {
  .keepsake:not(.is-dragging):hover {
    transform: translate(-50%, -54%) rotate(calc(var(--a) * 0.65deg));
    filter: drop-shadow(4px 12px 7px #4c321b38);
  }
}
.note-face {
  min-height: 235px;
  padding: 25px 20px 17px;
  background:
    linear-gradient(
      0deg,
      transparent 32.5%,
      #97784f2b 33%,
      #fff7e799 33.5%,
      transparent 34%,
      transparent 65%,
      #97784f33 65.5%,
      #fff7e799 66%,
      transparent 66.5%
    ),
    #ead8ae;
  box-shadow: inset 0 0 15px #ae8c5722;
  text-align: left;
  clip-path: polygon(1% 0, 100% 1%, 99% 100%, 0 98%);
}
.note-title {
  font: 31px/0.96 var(--serif);
  display: block;
}
.note-rule {
  display: block;
  width: 55%;
  height: 1px;
  background: #9d7b4855;
  margin: 14px 0 11px;
}
.note-ingredients {
  display: block;
  font: italic 22px/1.3 var(--serif);
}
.note-postscript {
  display: block;
  text-align: right;
  margin-top: 12px;
  font: italic 17px var(--serif);
}
.flower-face {
  padding: 17px 12px 13px;
  background: #eee0bb;
  box-shadow: 1px 2px 4px #60442822;
}
.keepsake-botanical {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(0.2) drop-shadow(1px 2px 1px #785a3b30);
}
.flower-tape {
  position: absolute;
  z-index: 2;
  top: -5px;
  left: 30%;
  width: 47%;
  height: 19px;
  background: #b8986380;
  transform: rotate(-4deg);
  clip-path: polygon(1% 0, 98% 3%, 100% 90%, 0 100%);
}
.flower-face .keepsake-caption {
  font-size: 20px;
}
.drawer-doodle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}
.is-doodling .drawer-doodle {
  pointer-events: auto;
  cursor: crosshair;
  touch-action: none;
}
.drawer-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 11px;
}
.drawer-pencil {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-left: 0;
  font: italic 23px var(--serif);
}
.drawer-pencil svg {
  width: 76px;
  height: 18px;
  rotate: -8deg;
  transition: rotate 0.3s ease;
}
.drawer-pencil[aria-pressed="true"] svg {
  rotate: -25deg;
}
.drawer-pencil[aria-pressed="true"] {
  color: #916a2d;
}
.drawer-erase,
.drawer-tidy {
  font-size: 10px;
}
.drawer-tidy {
  margin-left: auto;
}
.drawer-tidy svg {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-left: 8px;
}
.drawer-placeholder-note {
  margin-top: 3px;
  color: #826d54;
  text-align: center;
  font: italic 17px/1.4 var(--serif);
}

/* A picked-up object is still the object, not a slideshow or a new page. */
.memory-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  padding: 25px 20px;
  background: #f3e7d3f7;
  backdrop-filter: blur(3px);
}
.memory-view {
  width: min(470px, 100%);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 15px;
}
.memory-put-back {
  justify-self: start;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 11px;
}
.memory-put-back svg {
  width: 22px;
  height: 22px;
}
.memory-piece {
  width: 100%;
  height: min(56dvh, 505px);
  min-height: 350px;
  perspective: 1500px;
}
.memory-leaf {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.2, 0.75, 0.25, 1);
}
.memory-piece.is-turned .memory-leaf {
  transform: rotateY(180deg);
}
.memory-front,
.memory-back {
  position: absolute;
  inset: 0;
  padding: 15px;
  background: #fff8e9;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    3px 10px 35px #4f341c30,
    0 0 1px #8b725044;
}
.memory-front {
  transform: rotate(-2deg);
}
.memory-front .keepsake-face {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.memory-front img {
  width: 100%;
  height: 0;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}
.memory-front .keepsake-caption {
  margin: 16px 0 6px;
  text-align: center;
  font-size: 27px;
}
.memory-sample {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 3px 6px;
  background: #fcf5e6db;
  color: #715d44;
  font: 8px/1.5 var(--sans);
  letter-spacing: 0.04em;
}
.memory-back {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(25px, 4vw, 47px);
  text-align: left;
  background:
    linear-gradient(90deg, transparent 9%, #b6856230 9.3%, transparent 9.6%),
    repeating-linear-gradient(transparent 0 31px, #bb9e6c22 32px 33px), #f7ebd4;
  transform: rotateY(180deg) rotate(1deg);
}
.memory-back h3 {
  font: 36px/1.05 var(--serif);
  font-weight: 400;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}
.memory-back p {
  font: 20px/1.5 var(--serif);
  margin: 0;
}
.memory-back p + p {
  margin-top: 12px;
}
.memory-back .memory-eyebrow {
  font: 9px/1.6 var(--sans);
  letter-spacing: 0.13em;
  margin: 0 0 20px;
  color: #8b7150;
}
.memory-back .memory-signoff {
  font-style: italic;
  font-size: 22px;
  margin-top: 22px;
}
.memory-placeholder {
  font: 9px/1.5 var(--sans);
  color: #8b7150;
  margin-top: 23px;
}
.memory-turn {
  display: inline-flex;
  gap: 18px;
  align-items: center;
  font: italic 26px var(--serif);
}
.memory-turn svg {
  width: 34px;
  height: 24px;
}
.memory-piece[data-kind="note"] .memory-front {
  background: #ead8ae;
}
.memory-piece[data-kind="note"] .note-face {
  padding: 30px;
  justify-content: center;
}
.memory-piece[data-kind="note"] .note-title {
  font-size: 52px;
}
.memory-piece[data-kind="note"] .note-ingredients {
  font-size: 29px;
}
.memory-piece[data-kind="note"] .note-postscript {
  font-size: 25px;
  margin-top: 28px;
}
.memory-piece[data-kind="flower"] {
  max-width: 365px;
}
.memory-piece[data-kind="flower"] .memory-front {
  background: #eee0bb;
}
.memory-piece[data-kind="flower"] .flower-face {
  background: transparent;
  box-shadow: none;
  align-items: center;
}
.memory-piece[data-kind="flower"] .keepsake-botanical {
  height: calc(100% - 54px);
  width: auto;
  max-width: 100%;
}
.memory-piece[data-kind="flower"] .flower-tape {
  top: -20px;
  height: 27px;
}
@keyframes drawer-arrive {
  from {
    opacity: 0;
    transform: translateY(35px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes keepsake-arrive {
  from {
    opacity: 0.2;
    transform: translate(-50%, -35%) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(calc(var(--a) * 1deg));
  }
}
.keepsake-drawer[open] {
  animation: drawer-arrive 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.keepsake-drawer[open] .keepsake {
  animation: keepsake-arrive 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.keepsake-drawer[open] .keepsake:nth-of-type(2n) {
  animation-duration: 1.1s;
}

@media (max-width: 900px) {
  .drawer-shell {
    padding: 22px 20px 16px;
  }
  .drawer-heading h2 {
    font-size: 42px;
  }
  .drawer-heading #drawer-intro {
    max-width: 310px;
  }
  .note-face {
    min-height: 205px;
    padding: 18px 14px;
  }
  .note-title {
    font-size: 27px;
  }
  .note-ingredients {
    font-size: 19px;
  }
  .note-postscript {
    font-size: 16px;
  }
}
@media (max-width: 700px) {
  .keepsake-invitation {
    width: min(400px, 100%);
    margin: 20px auto 0;
    padding: 15px 0 125px;
  }
  .keepsake-invitation .kitchen-postcard {
    width: 83%;
    margin: 0 0 0 auto;
  }
  .keepsake-peek {
    left: -1%;
    bottom: 115px;
    width: 49%;
  }
  .drawer-open {
    left: 3%;
    width: 94%;
  }
  .drawer-invitation-arrow {
    right: -3px;
    width: 53px;
    top: -28px;
  }
  .keepsake-drawer {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }
  .drawer-shell {
    padding: 22px 12px 17px;
  }
  .drawer-heading {
    padding: 0 5px 18px;
    gap: 4px;
  }
  .drawer-heading h2 {
    font-size: clamp(33px, 8.7vw, 44px);
    max-width: 280px;
  }
  .drawer-heading #drawer-intro {
    font-size: 11px;
    max-width: 240px;
    line-height: 1.55;
  }
  .drawer-desktop-hint {
    display: none;
  }
  .drawer-touch-hint {
    display: inline;
  }
  .drawer-close {
    min-width: 40px;
    height: 44px;
    justify-content: center;
    padding: 6px;
  }
  .drawer-close > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .drawer-tray {
    padding: 11px 10px 18px;
  }
  .drawer-paper {
    height: 590px;
  }
  .drawer-front-edge {
    height: 12px;
  }
  .drawer-paper-note {
    font-size: 16px;
    bottom: 2%;
    right: 4%;
  }
  .keepsake-gigi {
    --x: 27;
    --y: 21;
    --w: 44;
    --a: -8;
  }
  .keepsake-boys {
    --x: 72;
    --y: 22;
    --w: 48;
    --a: 7;
  }
  .keepsake-hands {
    --x: 27;
    --y: 56;
    --w: 48;
    --a: 7;
  }
  .keepsake-us {
    --x: 71;
    --y: 78;
    --w: 53;
    --a: -7;
  }
  .keepsake-note {
    --x: 70;
    --y: 49;
    --w: 48;
    --a: 6;
  }
  .keepsake-flower {
    --x: 28;
    --y: 86;
    --w: 28;
    --a: -12;
  }
  .keepsake-photo .keepsake-face {
    padding: 7px 7px 10px;
  }
  .keepsake-caption {
    font-size: clamp(16px, 4.8vw, 21px);
    margin-top: 7px;
  }
  .note-face {
    min-height: 180px;
    padding: 18px 13px 12px;
  }
  .note-title {
    font-size: 25px;
  }
  .note-rule {
    margin: 10px 0;
  }
  .note-ingredients {
    font-size: 17px;
  }
  .note-postscript {
    font-size: 14px;
  }
  .flower-face {
    padding: 14px 8px 10px;
  }
  .flower-face .keepsake-caption {
    font-size: 17px;
  }
  .drawer-pencil {
    gap: 5px;
    font-size: 20px;
  }
  .drawer-pencil svg {
    width: 45px;
  }
  .drawer-tidy {
    font-size: 9px;
    padding: 8px 0;
  }
  .drawer-tidy svg {
    margin-left: 3px;
  }
  .drawer-tools {
    gap: 5px;
    flex-wrap: wrap;
  }
  .drawer-placeholder-note {
    font-size: 16px;
    max-width: 290px;
    margin: 5px auto 0;
  }
  .memory-overlay {
    padding: 15px;
  }
  .memory-view {
    gap: 13px;
  }
  .memory-piece {
    min-height: 370px;
    height: min(58dvh, 490px);
  }
  .memory-back {
    padding: 28px 24px;
  }
  .memory-back h3 {
    font-size: 32px;
    margin-bottom: 15px;
  }
  .memory-back p {
    font-size: 20px;
    line-height: 1.4;
  }
  .memory-back .memory-eyebrow {
    margin-bottom: 15px;
  }
  .memory-back .memory-signoff {
    margin-top: 18px;
  }
  .memory-placeholder {
    margin-top: 18px;
  }
  .memory-front .keepsake-caption {
    font-size: 24px;
  }
  .memory-turn {
    font-size: 25px;
  }
}
@media (max-width: 360px) {
  .drawer-paper {
    height: 550px;
  }
  .note-face {
    min-height: 162px;
    padding: 13px 10px;
  }
  .note-title {
    font-size: 23px;
  }
  .note-ingredients {
    font-size: 16px;
  }
  .memory-back {
    padding: 24px 18px;
  }
  .memory-back h3 {
    font-size: 29px;
  }
  .memory-back p {
    font-size: 19px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .keepsake-drawer[open],
  .keepsake-drawer[open] .keepsake {
    animation: none;
  }
  .keepsake,
  .memory-leaf,
  .drawer-handle,
  .drawer-pencil svg {
    transition: none;
  }
}
