.sc-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(61, 58, 80, 0.55);
  backdrop-filter: blur(6px);
  animation: sc-fade-in 0.2s ease;
}

.sc-overlay.hidden {
  display: none !important;
}

@keyframes sc-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sc-modal {
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 24px;
  border: 3px solid #f0ebff;
  box-shadow: 0 16px 48px rgba(124, 92, 255, 0.25);
  padding: 20px 20px 24px;
  animation: sc-slide-up 0.25s ease;
}

@keyframes sc-slide-up {
  from { transform: translateY(16px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.sc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sc-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #7c5cff;
}

.sc-close {
  font-family: inherit;
  font-size: 1.4rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border: 2px solid #e8e0ff;
  border-radius: 50%;
  background: #fff;
  color: #7a7590;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.sc-close:hover {
  border-color: #7c5cff;
  transform: scale(1.05);
}

.sc-preview-wrap {
  background: linear-gradient(160deg, #fff5e6, #e8f4ff);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
  border: 2px dashed #ddd0ff;
  text-align: center;
}

.sc-preview-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.15);
  display: block;
}

.sc-preview-img.hidden {
  display: none;
}

.sc-loading {
  padding: 48px 16px;
  color: #7a7590;
  font-size: 0.95rem;
}

.sc-loading.hidden {
  display: none;
}

.sc-ios-hint {
  display: none;
  margin-top: 10px;
  font-size: 0.82rem;
  color: #e8650a;
  line-height: 1.5;
}

.sc-ios-hint.show {
  display: block;
}

.sc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.sc-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.sc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sc-btn-download {
  color: #fff;
  background: linear-gradient(135deg, #7c5cff, #5a3fd4);
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}

.sc-btn-share {
  color: #fff;
  background: linear-gradient(135deg, #ffb347, #e89420);
  box-shadow: 0 4px 14px rgba(255, 179, 71, 0.35);
}

.sc-btn-copy {
  color: #7c5cff;
  background: #fff;
  border: 2.5px solid #e8e0ff;
}

.sc-btn-copy.copied {
  border-color: #4cd964;
  color: #2a9d4e;
}

.sc-status {
  min-height: 1.2em;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  color: #7a7590;
}

.sc-status.ok { color: #2a9d4e; }
.sc-status.err { color: #d94040; }

.share-actions {
  margin-bottom: 14px;
}

.share-actions.hidden {
  display: none !important;
}

.btn-share {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #7c5cff;
  background: linear-gradient(135deg, #f5f0ff, #fff8ee);
  border: 2.5px solid #ddd0ff;
  border-radius: 50px;
  padding: 14px 32px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.12);
}

.btn-share:hover {
  transform: translateY(-2px);
  border-color: #7c5cff;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.2);
}

.dc-btn-share {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #7c5cff;
  background: #fff;
  border: 2.5px solid #ddd0ff;
  border-radius: 50px;
  padding: 12px 28px;
  cursor: pointer;
  margin-top: 12px;
  transition: transform 0.15s, border-color 0.15s;
}

.dc-btn-share:hover {
  transform: translateY(-2px);
  border-color: #7c5cff;
}
