.share-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 7, 16, 0.45);
  display: grid;
  place-items: center;
  align-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px))
    max(12px, env(safe-area-inset-right, 0px))
    max(12px, env(safe-area-inset-bottom, 0px))
    max(12px, env(safe-area-inset-left, 0px));
  z-index: 1000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.share-modal {
  width: min(560px, 100%);
  max-width: calc(100vw - 24px);
  max-height: min(90dvh, 640px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid #b43762;
  border-radius: clamp(10px, 2.5vw, 14px);
  padding: clamp(10px, 3vw, 14px);
  color: #111827;
  margin: auto;
}

.share-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.share-modal-head h3 {
  margin: 0;
  font-size: 1.25rem;
}

.share-close-btn {
  border: 0;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  background: transparent;
  color: #374151;
  font-size: 1.2rem;
  cursor: pointer;
}

.share-preview-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #f9fafb;
}

#share-preview-image {
  width: 100%;
  display: block;
}

.share-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 400px) {
  .share-actions {
    grid-template-columns: 1fr;
  }

  .share-modal-head h3 {
    font-size: clamp(1.05rem, 4vw, 1.25rem);
  }
}
