/* A folded garden card, sized to fit in the native dialog's top layer. */
html:has(.zb-postcard[open]) { overflow: hidden; }
dialog.zb-postcard {
  --card-green: #193e31;
  --card-foil: #cab176;
  position: fixed;
  inset: 0;
  width: min(780px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--card-green);
  border: 1px solid #b7ad90;
  border-radius: 5px;
  background: #f8f3e7;
  box-shadow: 0 24px 90px #071b1370, 0 2px 7px #06190d3d;
}
.zb-postcard::backdrop { background: rgb(10 28 21 / .71); }
.zb-postcard__spread {
  display: grid;
  grid-template-columns: 46% 54%;
  perspective: 1000px;
}
.zb-postcard__illustration {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at 44% 42%, #365c44, #204739 65%, #153628);
}
.zb-postcard__illustration::after {
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  box-shadow: inset -7px 0 12px -6px #08251abb;
  border: 9px solid transparent;
  outline: 1px solid #c7b17673;
  outline-offset: -10px;
}
.zb-postcard__foil {
  position: absolute;
  inset: 13% 11%;
  border: 1px solid #d2b67494;
  border-radius: 50%;
  transform: rotate(-14deg);
}
.zb-postcard__foil::after {
  content: '';
  position: absolute;
  inset: 4px -3px;
  border: 1px solid #d2b67455;
  border-radius: inherit;
}
.zb-postcard__sparkles {
  position: absolute;
  top: 19%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
}
.zb-postcard__sparkles i {
  width: 5px;
  height: 5px;
  background: #e4c685;
  clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 63%, 50% 100%, 38% 63%, 0 50%, 38% 37%);
}
.zb-postcard__sparkles i:nth-child(2) { width: 14px; height: 14px; }
.zb-postcard__illustration img {
  display: block;
  position: relative;
  margin: 12% auto 0;
  width: 91%;
  height: auto;
  filter: drop-shadow(0 12px 7px #071e174f);
}
.zb-postcard__paper {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(54px, 6vw, 72px) clamp(29px, 4.4vw, 58px);
  min-height: 365px;
  background: linear-gradient(90deg, #b9ad8d61, transparent 12px, #fffaf160 18px, transparent 40px), #f8f3e7;
  transform-origin: left center;
}
.zabest-design .zb-postcard__heading {
  font: 400 clamp(38px, 5.1vw, 67px)/.99 Georgia, 'Times New Roman', serif;
  letter-spacing: -.055em;
  margin: 0;
  color: var(--card-green);
}
.zb-postcard__heading em { display: block; font: inherit; font-style: italic; color: #586d51; }
.zb-postcard__paper .zb-postcard__wish {
  margin: 22px 0 25px;
  font: 400 15px/1.65 Manrope, system-ui, sans-serif;
  color: #3c5041;
}
.zb-postcard__paper .zb-postcard__signature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-top: 15px;
  border-top: 1px solid #b49a625d;
  font: 600 13px/1.3 Manrope, system-ui, sans-serif;
  color: var(--card-green);
}
.zb-postcard__signature svg { width: 22px; height: 24px; }
button.zb-postcard__close {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  padding: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--card-green);
  font: 400 26px/1 Arial, sans-serif;
  cursor: pointer;
}
.zb-postcard__close span {
  display: grid;
  place-content: center;
  width: 29px;
  height: 29px;
  border: 1px solid #98a58a;
  border-radius: 50%;
  background: #f8f3e7;
}
.zb-postcard__close:focus-visible { outline: 2px solid #a3864e; outline-offset: -2px; }

@media (max-width: 590px) {
  dialog.zb-postcard { width: min(420px, calc(100% - 24px)); }
  .zb-postcard__spread { grid-template-columns: 1fr; }
  .zb-postcard__illustration { height: clamp(130px, 26vh, 205px); }
  .zb-postcard__illustration::after { box-shadow: inset 0 -8px 10px -8px #173324; }
  .zb-postcard__foil { inset: 8% 20%; transform: rotate(-8deg); }
  .zb-postcard__sparkles { top: 9%; }
  .zb-postcard__illustration img { height: 81%; width: 84%; object-fit: contain; margin: 6% auto 0; }
  .zb-postcard__paper {
    min-height: 0;
    padding: 25px clamp(22px, 7vw, 32px);
    background: linear-gradient(#b9ad8d40, transparent 10px), #f8f3e7;
    transform-origin: center top;
  }
  .zb-postcard__heading em { display: inline; }
  .zb-postcard__paper .zb-postcard__wish { margin: 15px 0 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  html[data-winter-motion='on'] .zb-postcard[open] .zb-postcard__paper { animation: zb-unfold-paper 600ms cubic-bezier(.18,.76,.18,1) both; }
  @keyframes zb-unfold-paper {
    from { transform: rotateY(-28deg); }
    to { transform: rotateY(0); }
  }
}
@media (max-width: 590px) and (prefers-reduced-motion: no-preference) {
  html[data-winter-motion='on'] .zb-postcard[open] .zb-postcard__paper { animation-name: zb-unfold-paper-mobile; }
  @keyframes zb-unfold-paper-mobile {
    from { transform: rotateX(18deg); }
    to { transform: rotateX(0); }
  }
}
@media (max-height: 470px) and (min-width: 591px) {
  .zb-postcard__paper { min-height: 0; padding: 32px 38px; }
  .zabest-design .zb-postcard__heading { font-size: 38px; }
  .zb-postcard__paper .zb-postcard__wish { margin: 11px 0 14px; }
}
