.lanyard-scene {
  position: relative;
  height: 100%;
  min-height: 700px;
  overflow: visible;
  isolation: isolate;
  z-index: 20;
}

.lanyard-wrapper {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateX(22vw) scale(1);
  transform-origin: center;
}

.lanyard-wrapper canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}

.lanyard-scene__hint {
  position: absolute;
  top: 214px;
  right: clamp(18px, 3vw, 48px);
  z-index: 4;
  display: grid;
  gap: 4px;
  color: rgba(17, 17, 17, .56);
  font: 10px/1.35 monospace;
  letter-spacing: .12em;
  pointer-events: none;
  text-align: right;
  white-space: nowrap;
  pointer-events: none;
}

.home-sticker-layer {
  position: absolute;
  z-index: 120;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.home-sticker-position {
  position: absolute;
  width: 150px;
  height: 150px;
  pointer-events: none;
}

.home-sticker-position .sticker-draggable {
  pointer-events: auto;
}

.profile-card-float {
  position: fixed;
  top: 50%;
  right: clamp(28px, 6vw, 112px);
  z-index: 2000;
  width: min(390px, 34vw);
  aspect-ratio: 720 / 1024;
  transform: translateY(-50%);
  perspective: 1500px;
  filter: drop-shadow(0 34px 34px rgba(17, 17, 17, .2));
}

.profile-card-float--prompt {
  position: relative;
  top: auto;
  right: auto;
  width: min(100%, 300px);
  transform: none;
  filter: drop-shadow(0 24px 26px rgba(17, 17, 17, .2));
}

.profile-card-float--prompt .profile-card-float__actions {
  display: none;
}

.desktop-tip-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  isolation: isolate;
}

.desktop-tip-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 17, 17, .56);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  cursor: pointer;
}

.desktop-tip-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(190px, 300px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 4vw, 58px);
  width: min(760px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 18px;
  background: rgba(247, 245, 238, .96);
  box-shadow: 0 26px 80px rgba(17, 17, 17, .28);
}

.desktop-tip-modal__card {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.desktop-tip-modal__copy {
  min-width: 0;
  color: #111;
}

.desktop-tip-modal__eyebrow {
  margin-bottom: 14px;
  color: rgba(17, 17, 17, .5);
  font: 10px/1.3 monospace;
  letter-spacing: .14em;
}

.desktop-tip-modal__copy h2 {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: clamp(23px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: 0;
}

.desktop-tip-modal__copy h2 span:last-child {
  color: rgba(17, 17, 17, .5);
  font: 500 clamp(16px, 2vw, 22px)/1.2 Inter, sans-serif;
}

.desktop-tip-modal__copy p {
  display: grid;
  gap: 5px;
  margin: 18px 0 24px;
  color: rgba(17, 17, 17, .68);
  font-size: 14px;
  line-height: 1.6;
}

.desktop-tip-modal__copy p span:last-child {
  color: rgba(17, 17, 17, .5);
  font-size: 12px;
}

.desktop-tip-modal__check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(17, 17, 17, .74);
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.desktop-tip-modal__check input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: #111;
}

.desktop-tip-modal__check span {
  display: grid;
  gap: 3px;
}

.desktop-tip-modal__check span span:last-child {
  color: rgba(17, 17, 17, .48);
  font-size: 11px;
}

.desktop-tip-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(17, 17, 17, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  color: #111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.desktop-tip-open { overflow: hidden; }

.profile-card-float__actions {
  position: absolute;
  top: -54px;
  right: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.profile-card-float__button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 24px rgba(17, 17, 17, .12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.profile-card-float__button:first-child { font-size: 20px; }

.profile-card-3d {
  --card-depth: 6px;
  --card-half-depth: 3px;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  outline: none;
  cursor: grab;
  touch-action: none;
  transform-style: preserve-3d;
  transform-origin: center;
  transition: transform .46s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.profile-card-3d.is-dragging { cursor: grabbing; transition: none; }

.profile-card-3d:focus-visible {
  outline: 2px solid #111;
  outline-offset: 5px;
}

.profile-card-3d__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 14px;
  background: #f7f5ee;
  box-shadow: inset 0 1px rgba(255, 255, 255, .7);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.profile-card-3d__face--front { transform: translateZ(var(--card-half-depth)); }
.profile-card-3d__face--back {
  overflow: visible;
  transform: rotateY(180deg) translateZ(var(--card-half-depth));
}

.profile-card-3d__face--back > img { border-radius: inherit; }

.profile-card-3d__layer {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5a4d7 0%, #8edfd3 52%, #f6d873 100%);
  backface-visibility: visible;
  pointer-events: none;
  transform: translateZ(var(--card-layer-z));
}

.profile-card-3d__face > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-card-3d__face .profile-card-3d__qr {
  position: absolute;
  left: 63%;
  top: 77%;
  z-index: 2;
  width: 28.5%;
  height: 22%;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(17, 17, 17, .12));
}

.profile-card-back-sticker {
  position: absolute;
  top: 35.5%;
  left: 13%;
  z-index: 3;
}

.profile-card-3d__face .profile-card-back-sticker--static {
  position: absolute;
  top: 35.5%;
  left: 13%;
  z-index: 3;
  width: 74%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.detached-back-sticker {
  z-index: 180;
  pointer-events: auto;
}

.home-sticker-position {
  position: absolute;
  transform: translateZ(0);
}

.sticker-draggable {
  position: absolute;
  width: var(--sticker-width, 200px);
  cursor: grab;
  transform: translateZ(0);
}

.sticker-draggable:active { cursor: grabbing; }
.sticker-draggable *, .sticker-draggable img { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.sticker-container {
  position: relative;
  transform: rotate(var(--peel-direction));
  transform-origin: center;
  touch-action: none;
}

.sticker-main {
  clip-path: polygon(-10px -10px, calc(100% + 10px) -10px, calc(100% + 10px) calc(100% + 10px), -10px calc(100% + 10px));
  transition: clip-path .6s ease-out;
  filter: url(#sticker-shadow);
}

.sticker-container:hover .sticker-main,
.sticker-container.touch-active .sticker-main {
  clip-path: polygon(-10px 20%, calc(100% + 10px) 20%, calc(100% + 10px) calc(100% + 10px), -10px calc(100% + 10px));
}

.sticker-container:active .sticker-main {
  clip-path: polygon(-10px 40%, calc(100% + 10px) 40%, calc(100% + 10px) calc(100% + 10px), -10px calc(100% + 10px));
}

.sticker-lighting, .sticker-flap-lighting { filter: url(#sticker-point-light); }
.sticker-image, .sticker-flap-image { width: 100%; display: block; transform: rotate(var(--sticker-rotate)); }

.sticker-flap {
  position: absolute;
  top: calc(-100% - 20px);
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(-10px -10px, calc(100% + 10px) -10px, calc(100% + 10px) -10px, -10px -10px);
  transform: scaleY(-1);
  transition: top .6s ease-out, clip-path .6s ease-out, transform .6s ease-out, opacity .6s ease-out;
}

.sticker-container:hover .sticker-flap,
.sticker-container.touch-active .sticker-flap {
  top: calc(-100% + 40% - 1px);
  clip-path: polygon(-10px -10px, calc(100% + 10px) -10px, calc(100% + 10px) 20%, -10px 20%);
}

.sticker-container:active .sticker-flap {
  top: calc(-100% + 80% - 1px);
  clip-path: polygon(-10px -10px, calc(100% + 10px) -10px, calc(100% + 10px) 40%, -10px 40%);
}

.sticker-flap-lighting { filter: url(#sticker-point-light-flipped); }
.sticker-flap-image { filter: url(#sticker-fill); }

@media (max-width: 768px) {
  .lanyard-scene { min-height: 660px; }
  .lanyard-wrapper { min-height: 660px; transform: scale(1); }
  .lanyard-scene__hint {
    top: 132px;
    right: 24px;
    font-size: 9px;
  }
  .profile-card-float {
    top: 54%;
    right: 18px;
    width: min(76vw, 360px);
  }
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .desktop-tip-modal__panel {
    grid-template-columns: minmax(150px, 42%), minmax(0, 1fr);
    gap: clamp(18px, 4vw, 34px);
    padding: clamp(22px, 4vw, 34px);
  }
  .profile-card-float--prompt { width: min(100%, 250px); }
}

@media (max-width: 560px) {
  .desktop-tip-modal { padding: 12px; }
  .desktop-tip-modal__panel {
    grid-template-columns: 1fr;
    gap: 18px;
    max-height: 94vh;
    padding: 28px 20px 22px;
  }
  .desktop-tip-modal__card { order: 0; }
  .profile-card-float--prompt { width: min(58vw, 220px); }
  .desktop-tip-modal__copy { text-align: center; }
  .desktop-tip-modal__eyebrow { margin-bottom: 10px; }
  .desktop-tip-modal__copy p { margin: 14px 0 18px; }
  .desktop-tip-modal__check { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .sticker-main, .sticker-flap { transition-duration: .01ms; }
  .profile-card-3d { transition-duration: .01ms; }
}
