html.contact-open,
html.contact-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

.contact-badge {
  background: transparent;
  color: #edf3f4;
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  overflow: hidden;
}

.contact-badge[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
}

.contact-badge::backdrop {
  background: rgb(0 2 4 / 79%);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.contact-dismiss {
  position: absolute;
  z-index: 2;
  top: max(20px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #d4e5eb50;
  border-radius: 50%;
  background: #1c292f9e;
  font: 300 28px/1 system-ui, sans-serif;
}

.contact-stage {
  position: relative;
  width: min(100%, 960px);
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
}

.contact-stage .lanyard-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.contact-print {
  position: relative;
  display: grid;
  width: min(69vw, 39svh, 310px);
  aspect-ratio: 1.6 / 2.25;
  border: 0;
  border-radius: 1em;
  background: transparent;
  padding: 0;
  font: 500 clamp(13px,1.5vw,18px)/1.4 system-ui,sans-serif;
  text-align: left;
  perspective: 900px;
}
.contact-print:hover { filter: none; }
.contact-print[hidden] { display: none; }

.contact-print::before {
  content: "";
  position: absolute;
  width: 1.6em;
  height: 60vh;
  bottom: calc(100% - .7em);
  left: calc(50% - .8em);
  background: repeating-linear-gradient(40deg,#3f6473 0 1px,#355866 1px 3px);
  border-bottom: .55em solid #b4c7cc;
}

.contact-print-side {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .6em;
  border: 1px solid #f3f7f8;
  border-radius: inherit;
  padding: 9%;
  color: #142629;
  background: #dae8e9;
  box-shadow: 1px 3px #8fa6ab, 0 16px 60px #0006;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.contact-print-front { transform: rotateY(0); }
.contact-print-back {
  align-items: center;
  text-align: center;
  transform: rotateY(-180deg);
  background: white;
}
.contact-print.is-flipped .contact-print-front { transform: rotateY(180deg); }
.contact-print.is-flipped .contact-print-back { transform: rotateY(0); }
@media (prefers-reduced-motion: no-preference) {
  .contact-print-side { transition: transform .48s cubic-bezier(.2,.72,.25,1); }
}

.contact-print-front img {
  width: 100%;
  aspect-ratio: 1.65;
  height: auto;
  object-fit: cover;
}
.contact-print-back img { width: 100%; height: auto; }
.contact-print b { font-size: 1.6em; letter-spacing: -.055em; }
.contact-print-email {
  padding-top: .5em;
  border-top: 1px solid #9fb6bd;
  font: 500 clamp(11px,1.6svh,16px)/1.3 Arial,sans-serif;
  overflow-wrap: anywhere;
}

.contact-actions {
  text-align: center;
  margin: 0 0 max(6svh, env(safe-area-inset-bottom), 20px);
}

.contact-badge :focus-visible { outline: 2px solid #a6d3e6; outline-offset: 3px; }
.contact-flip-hint {
  margin: 8px 0 0;
  color: #a7b4bb;
  font: 400 13px/1.5 system-ui,sans-serif;
}

@media (max-height: 430px) {
  .contact-badge[open] {
    grid-template-rows: minmax(138px, 1fr) auto;
    overflow-y: auto;
  }
  .contact-print {
    width: min(72vw, 55svh, 210px);
    font-size: clamp(10px,3.2svh,13px);
  }
  .contact-print-side { gap: .25em; padding: 7%; }
  .contact-actions { margin-bottom: max(8px,env(safe-area-inset-bottom)); }
}
