.ecap-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(15, 10, 30, .72);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; transition: opacity .25s ease;
}
.ecap-overlay.is-visible { display: flex; opacity: 1; }

.ecap-modal {
  position: relative;
  width: 100%; max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 26px 26px 22px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(15,10,30,.45);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transform: translateY(18px) scale(.97);
  opacity: 0;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}
.ecap-overlay.is-visible .ecap-modal { transform: translateY(0) scale(1); opacity: 1; }

.ecap-modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 6px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
}

.ecap-close {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: #F3F4F6; color: #6B7280;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.ecap-close:hover { background: #E5E7EB; color: #1F2937; }

.ecap-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(236,72,153,.12));
  color: #7C3AED; font-size: 11px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 10px;
}

.ecap-headline {
  font-size: 20px; font-weight: 800; color: #0F0A1E;
  line-height: 1.25; margin-bottom: 6px;
}

.ecap-sub {
  font-size: 13px; color: #6B7280; line-height: 1.45;
  margin-bottom: 16px;
}

.ecap-form { display: flex; flex-direction: column; gap: 9px; }
.ecap-hp { position: absolute !important; left: -9999px !important; top: -9999px !important; height: 0; width: 0; opacity: 0; pointer-events: none; }

.ecap-field input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #E5E7EB; border-radius: 10px;
  font-size: 14px; font-family: inherit; color: #1F2937;
  transition: border-color .2s, box-shadow .2s;
}
.ecap-field input:focus {
  outline: none; border-color: #7C3AED;
  box-shadow: 0 0 0 4px rgba(124,58,237,.12);
}

.ecap-submit {
  margin-top: 2px; padding: 11px 20px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  color: #fff; font-size: 14.5px; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 8px 24px rgba(124,58,237,.35);
}
.ecap-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(124,58,237,.45); }
.ecap-submit:disabled { opacity: .65; cursor: default; transform: none; }

.ecap-msg { font-size: 12px; min-height: 16px; }
.ecap-msg.error { color: #DC2626; }
.ecap-msg.success { color: #059669; }

.ecap-fine { font-size: 11px; color: #9CA3AF; margin-top: 2px; }

.ecap-success { display: flex; flex-direction: column; align-items: center; }
.ecap-success-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  color: #fff; font-size: 20px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.ecap-success h3 { font-size: 18px; font-weight: 800; color: #0F0A1E; margin-bottom: 6px; }
.ecap-success p { font-size: 13px; color: #6B7280; margin-bottom: 12px; line-height: 1.45; }
.ecap-code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 19px; font-weight: 800; letter-spacing: 1.5px;
  color: #7C3AED; background: #FAF5FF;
  border: 1.5px dashed #C4B5FD; border-radius: 10px;
  padding: 10px 18px; margin-bottom: 12px; user-select: all;
}
.ecap-copy {
  padding: 8px 20px; border-radius: 9px; border: 1.5px solid #7C3AED;
  background: #fff; color: #7C3AED; font-weight: 700; font-size: 13px;
  cursor: pointer; font-family: inherit; transition: background .2s, color .2s;
}
.ecap-copy:hover { background: #7C3AED; color: #fff; }
.ecap-copy.copied { background: #059669; border-color: #059669; color: #fff; }

@media (max-width: 480px) {
  .ecap-modal { padding: 22px 18px 18px; border-radius: 16px; max-height: 92vh; }
  .ecap-headline { font-size: 18px; }
}
