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

.friends-easter-trigger {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 0;
  width: 120px;
  height: 90px;
  padding: 0;
  border: 0;
  background: transparent;
  clip-path: inset(0 48px 0 0);
  cursor: pointer;
  transform-origin: center;
  transition: transform 240ms ease, filter 240ms ease;
}

.friends-easter-trigger:hover { transform: translateY(-3px) rotate(1deg); }

.friends-easter-trigger.is-open {
  z-index: 2002;
  pointer-events: none;
  clip-path: inset(0);
  filter: drop-shadow(4px 8px 10px rgba(90, 59, 26, .22));
  transform: translate(-20px, -48px) rotate(-10deg);
}

.carte-coffee {
  position: relative;
  z-index: 7;
}

.friends-easter-trigger:focus-visible {
  outline: 3px solid #7B70CB;
  outline-offset: 4px;
}

.friends-easter-trigger img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.friends-easter[hidden] { display: none; }

.friends-easter {
  --cream: #F5E6C8;
  --paper: #FFF9EA;
  --brown: #5A3B1A;
  --orange: #E8531A;
  --sage: #8B8F6A;
  --purple: #7B70CB;
  --yellow: #F4DE88;
  position: fixed;
  z-index: 2000;
  inset: 0;
  overflow: hidden;
  color: var(--brown);
}

.friends-easter__veil {
  position: absolute;
  inset: 0;
  background: rgba(90, 59, 26, .27);
}

.friends-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  box-sizing: border-box;
  opacity: 0;
  color: var(--brown);
  transform: translate(-50%, -50%) scale(.985);
}

.friends-stage.is-active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: friends-stage-in 240ms ease-out both;
}

@keyframes friends-stage-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.985); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.friends-stage__chapter {
  margin: 0;
  color: var(--brown);
  font-family: 'Caveat', cursive;
  font-weight: 400;
  text-align: center;
}

.friends-stage__close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 22px;
  border: 0;
  background: transparent;
  color: var(--brown);
  font: 22px/1 'DM Sans', sans-serif;
  cursor: pointer;
}

.friends-stage--question {
  width: 620px;
  height: 480px;
  padding: 46px 58px 40px;
  border: 1px solid rgba(123, 112, 203, .33);
  border-radius: 6px;
  background: linear-gradient(180deg, #F7E79C 0%, #F4DE88 30%, #F1D77A 100%);
  box-shadow: 5px 10px 22px rgba(90, 59, 26, .18), -2px 3px 8px rgba(123, 112, 203, .09);
  transform: translate(-50%, -50%) rotate(1deg);
}

.friends-stage--question.is-active {
  transform: translate(-50%, -50%) rotate(1deg);
  animation-name: friends-postit-in;
}

@keyframes friends-postit-in {
  from { opacity: 0; transform: translate(-50%, -47%) rotate(1deg) scale(.98); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(1deg) scale(1); }
}

.friends-stage--question .friends-stage__chapter {
  height: 31px;
  font-size: 28px;
  line-height: 31px;
}

.friends-question {
  width: 100%;
  margin: 61px 0 26px;
  color: var(--brown);
  font-family: 'Patrick Hand', cursive;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
}

.friends-answer { display: grid; gap: 26px; }

.friends-answer input {
  width: 100%;
  height: 58px;
  box-sizing: border-box;
  padding: 0 20px;
  border: 1px solid rgba(90, 59, 26, .45);
  border-radius: 8px;
  outline: 0;
  background: var(--paper);
  color: var(--brown);
  font: 16px 'Patrick Hand', cursive;
}

.friends-answer input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(123, 112, 203, .16); }

.friends-answer button,
.friends-recipe-details a {
  height: 54px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  border: 0;
  border-radius: 28px;
  background: var(--purple);
  color: white;
  font: 15px 'Space Mono', monospace;
  text-decoration: none;
  cursor: pointer;
}

.friends-answer__error {
  min-height: 18px;
  margin: 22px 0 0;
  color: var(--orange);
  font: 700 13px 'Space Mono', monospace;
  text-align: center;
}

.friends-stage--pivot,
.friends-stage--reveal {
  width: 880px;
  height: 610px;
  border: 3px solid var(--purple);
  border-radius: 36px 24px 40px 28px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(90, 59, 26, .2);
}

.friends-stage--pivot .friends-stage__chapter,
.friends-stage--reveal .friends-stage__chapter {
  position: absolute;
  top: 56px;
  left: 80px;
  width: 720px;
  font-size: 32px;
  line-height: 40px;
}

.friends-stage__yellow-line {
  position: absolute;
  top: 115px;
  left: 380px;
  width: 120px;
  height: 11px;
  border-radius: 8px;
  background: var(--yellow);
  transform: rotate(-2deg);
}

.friends-pivot-word {
  position: absolute;
  top: 425px;
  left: 380px;
  color: var(--orange);
  font: 700 110px/.95 'Playfair Display', serif;
  letter-spacing: -.04em;
  transform: rotate(-90deg);
  transform-origin: top left;
  transition: transform 330ms cubic-bezier(.2, .78, .2, 1), opacity 230ms ease;
  user-select: none;
  white-space: nowrap;
}

.friends-pivot-word.is-upright {
  top: 110px;
  left: -30px;
}

.friends-pivot-word.is-disappearing { opacity: 0; }

.friends-pivot-controls {
  position: absolute;
  right: 54px;
  bottom: 46px;
  display: none;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
}

.friends-pivot-controls button {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  font: 26px/1 'Space Mono', monospace;
}

.friends-continue {
  position: absolute;
  left: 50%;
  margin: 0;
  opacity: 0;
  color: var(--purple);
  font: 700 12px/1.4 'Space Mono', monospace;
  letter-spacing: .08em;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.friends-continue.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.friends-pivot-continue { bottom: 48px; }
.friends-reveal-continue { bottom: 30px; }
.friends-continue__touch { display: none; }

.friends-continue kbd {
  min-width: 30px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  margin-left: 7px;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  box-shadow: 0 3px 0 currentColor;
  font: inherit;
  line-height: 1;
}

.friends-reveal-words span {
  position: absolute;
  display: block;
  opacity: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1;
  transition: opacity 200ms ease, transform 260ms ease;
}

.friends-reveal-words span.is-visible { opacity: 1; }

.friends-reveal-oh {
  top: 220px;
  left: 114px;
  color: var(--orange);
  font-size: 92px;
  transform: rotate(-4deg) translateY(8px);
}

.friends-reveal-oh.is-visible { transform: rotate(-4deg) translateY(0); }

.friends-reveal-my {
  top: 292px;
  left: 350px;
  color: var(--purple);
  font-size: 112px;
  transform: rotate(2deg) translateY(8px);
}

.friends-reveal-my.is-visible { transform: rotate(2deg) translateY(0); }

.friends-reveal-god {
  top: 198px;
  left: 514px;
  color: var(--orange);
  font-size: 136px;
  transform: rotate(-2deg) translateY(8px);
}

.friends-reveal-god.is-visible { transform: rotate(-2deg) translateY(0); }

.friends-reveal-found {
  position: absolute;
  top: 480px;
  left: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  color: var(--brown);
  font: 700 15px 'Space Mono', monospace;
  letter-spacing: .2em;
  text-align: center;
  transition: opacity 220ms ease;
}

.friends-reveal-found.is-visible { opacity: 1; }

.friends-stage--gift {
  width: 100%;
  height: 100%;
}

.friends-gift-label {
  position: absolute;
  top: 70px;
  left: 50%;
  margin: 0;
  color: var(--sage);
  font: 13px 'DM Sans', sans-serif;
  letter-spacing: .13em;
  transform: translateX(-50%);
}

.friends-postcard {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 870px;
  height: 595px;
  outline: 0;
  perspective: 1600px;
  transform: translate(-50%, -50%) rotate(1deg);
  cursor: pointer;
  touch-action: manipulation;
}

.friends-postcard:focus-visible { outline: 0; }

.friends-postcard__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 720ms cubic-bezier(.2, .75, .2, 1);
  will-change: transform;
}

.friends-postcard.is-flipped .friends-postcard__inner { transform: rotateY(180deg); }
.friends-postcard.is-flipped { cursor: default; }

.friends-postcard__face {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid var(--brown);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 8px 14px 28px rgba(90, 59, 26, .2);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.friends-postcard__front {
  padding: 22px;
  pointer-events: auto;
}

.friends-postcard__back { pointer-events: none; }
.friends-postcard.is-flipped .friends-postcard__front { pointer-events: none; }
.friends-postcard.is-flipped .friends-postcard__back { pointer-events: auto; }

.friends-postcard__front img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
}

.friends-postcard__ribbon {
  position: absolute;
  right: 72px;
  bottom: 93px;
  left: 62px;
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 8px 30px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(243, 106, 56, .81) 0%, rgba(232, 83, 26, .77) 45%, rgba(217, 72, 22, .81) 100%);
  color: white;
  font: 30px/1.1 'Caveat', cursive;
  text-align: center;
  transform: rotate(-1.5deg);
  clip-path: polygon(
    8px 0, calc(100% - 8px) 0,
    100% 5%, calc(100% - 8px) 10%, 100% 15%, calc(100% - 8px) 20%,
    100% 25%, calc(100% - 8px) 30%, 100% 35%, calc(100% - 8px) 40%,
    100% 45%, calc(100% - 8px) 50%, 100% 55%, calc(100% - 8px) 60%,
    100% 65%, calc(100% - 8px) 70%, 100% 75%, calc(100% - 8px) 80%,
    100% 85%, calc(100% - 8px) 90%, 100% 95%, calc(100% - 8px) 100%,
    8px 100%,
    0 95%, 8px 90%, 0 85%, 8px 80%, 0 75%, 8px 70%,
    0 65%, 8px 60%, 0 55%, 8px 50%, 0 45%, 8px 40%,
    0 35%, 8px 30%, 0 25%, 8px 20%, 0 15%, 8px 10%, 0 5%
  );
  filter: drop-shadow(1px 3px 4px rgba(90, 59, 26, .14)) drop-shadow(0 1px 2px rgba(255, 255, 255, .18));
}

.friends-postcard__back {
  display: grid;
  grid-template-columns: 320px 2px 330px;
  gap: 48px;
  padding: 48px;
  transform: rotateY(180deg);
}

.friends-recipe-intro h2 {
  margin: 0 0 43px;
  color: var(--purple);
  font: 400 42px/1 'Caveat', cursive;
}

.friends-recipe-illustration {
  width: 320px;
  height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  overflow: hidden;
  border: 2px solid var(--purple);
  border-radius: 8px;
  background: rgba(244, 222, 136, .3);
  color: var(--purple);
}

.friends-recipe-illustration img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.friends-recipe-intro > p {
  margin: 22px 0 0;
  font: 14px/1.35 'DM Sans', sans-serif;
}

.friends-recipe-separator { width: 2px; height: 490px; background: rgba(90, 59, 26, .2); }

.friends-recipe-details h3 {
  margin: 4px 0 14px;
  color: var(--orange);
  font: 700 13px 'Space Mono', monospace;
  letter-spacing: .08em;
}

.friends-recipe-details p {
  margin: 0 0 20px;
  color: var(--brown);
  font: 14px/1.35 'DM Sans', sans-serif;
}

.friends-recipe-details a { width: 332px; margin-top: 18px; }

body.friends-easter-open { overflow: hidden; }

@media (max-width: 1024px) {
  .friends-easter-trigger {
    width: 104px;
    height: 78px;
    clip-path: inset(0 34px 0 0);
  }

  .friends-easter-trigger.is-open { clip-path: inset(0); }

  .friends-easter__veil { background: rgba(90, 59, 26, .27); }

  .friends-stage--question {
    top: 50%;
    width: calc(100vw - 24px);
    max-width: 366px;
    height: 540px;
    padding: 38px 14px 38px;
    border-radius: 6px;
  }

  .friends-stage--question .friends-stage__chapter {
    width: 286px;
    height: 54px;
    margin: 0 auto;
    font-size: 26px;
    line-height: 1.05;
  }

  .friends-stage__close { top: 16px; right: 18px; font-size: 18px; }

  .friends-question {
    width: 290px;
    margin: 54px auto 24px;
    font-size: 30px;
    line-height: 1.05;
  }

  .friends-answer { gap: 20px; }
  .friends-answer input { height: 58px; font-size: 15px; }
  .friends-answer button { height: 54px; font-size: 13px; }
  .friends-answer__error { margin-top: 20px; font-size: 11px; }

  .friends-stage--pivot,
  .friends-stage--reveal {
    width: calc(100vw - 56px);
    max-width: 334px;
    height: min(580px, calc(100dvh - 80px));
    border-radius: 24px 18px 28px 20px;
  }

  .friends-stage--pivot .friends-stage__chapter,
  .friends-stage--reveal .friends-stage__chapter {
    top: 38px;
    left: 24px;
    width: 286px;
    font-size: 26px;
    line-height: 1.05;
  }

  .friends-stage__yellow-line {
    top: 114px;
    left: 127px;
    width: 80px;
    height: 6px;
    transform: none;
  }

  .friends-pivot-word {
    top: 289px;
    left: 142px;
    font-size: 60px;
  }

  .friends-pivot-word.is-upright {
    top: 134px;
    left: 38px;
  }

  .friends-pivot-controls {
    right: auto;
    bottom: 12px;
    left: 50%;
    width: 190px;
    display: flex;
    justify-content: space-between;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%);
  }

  .friends-pivot-controls button { width: 58px; height: 58px; cursor: pointer; }
  .friends-pivot-controls button:disabled { opacity: .35; }

  .friends-continue {
    width: calc(100% - 40px);
    font-size: 10px;
    letter-spacing: .06em;
  }

  .friends-pivot-continue { bottom: 88px; }
  .friends-reveal-continue { bottom: 22px; }
  .friends-continue__desktop { display: none; }
  .friends-continue__touch { display: inline; }

  .friends-reveal-oh { top: 220px; left: 34px; font-size: 64px; }
  .friends-reveal-my { top: 302px; left: 110px; font-size: 78px; }
  .friends-reveal-god { top: 395px; left: 42px; font-size: 92px; }
  .friends-reveal-found { top: auto; bottom: 62px; font-size: 11px; }

  .friends-gift-label {
    top: 72px;
    width: 100%;
    font-size: 10px;
    text-align: center;
  }

  .friends-postcard {
    width: calc(100vw - 20px);
    max-width: 370px;
    height: min(610px, calc(100dvh - 128px));
    transform: translate(-50%, -46%) rotate(1deg);
  }

  .friends-postcard__front { padding: 12px; }
  .friends-postcard__ribbon {
    right: 52px;
    bottom: 119px;
    left: 32px;
    min-height: 100px;
    padding: 8px 22px;
    font-size: 27px;
  }

  .friends-postcard__back {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    overflow-y: auto;
  }

  .friends-recipe-intro h2 { margin: 0 0 18px; font-size: 36px; }
  .friends-recipe-illustration { width: 100%; height: 118px; }
  .friends-recipe-intro > p { display: none; }
  .friends-recipe-separator { display: none; }
  .friends-recipe-details h3 { margin: 0 0 8px; font-size: 12px; }
  .friends-recipe-details p { margin: 0 0 22px; font-size: 13px; line-height: 1.35; }
  .friends-recipe-details a { width: 100%; height: 54px; margin: 0; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .friends-stage,
  .friends-postcard__inner,
  .friends-pivot-word,
  .friends-reveal-words span,
  .friends-reveal-found { animation: none; transition-duration: 1ms; }
}
