.cpag-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 8, 8, 0.42);
  backdrop-filter: blur(16px) saturate(0.9);
  -webkit-backdrop-filter: blur(16px) saturate(0.9);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cpag-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cpag-panel {
  position: relative;
  width: min(92vw, 560px);
  color: #f2f0ec;
  background-image:
    linear-gradient(180deg, rgba(12, 12, 12, 0.62), rgba(8, 8, 8, 0.80)),
    var(--cpag-bg-image, url("charcoal-texture.png"));
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0;
  padding: 0;
  box-shadow: 0 32px 95px rgba(0, 0, 0, 0.52);
  transform: translateY(0);
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.cpag-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.032), transparent 42%),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.035), transparent 36%);
  pointer-events: none;
}

.cpag-overlay.is-hidden .cpag-panel {
  transform: translateY(14px);
}

.cpag-step {
  position: relative;
  z-index: 1;
  display: none;
  padding: 50px 48px 44px;
  text-align: center;
}

.cpag-step.is-active {
  display: block;
}

.cpag-brand {
  margin: 0 auto 54px;
  color: #f2f0ec;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.cpag-brand-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpag-brand-logo {
  display: block;
  width: min(220px, 62vw);
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.42));
}

.cpag-panel h2 {
  margin: 0 auto 22px;
  max-width: 450px;
  color: #d71933;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 0.94;
  font-weight: 950;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.cpag-main-text {
  max-width: 420px;
  margin: 0 auto 12px;
  color: rgba(242, 240, 236, 0.96);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.015em;
}

.cpag-small-text {
  max-width: 420px;
  margin: 0 auto 30px;
  color: rgba(242, 240, 236, 0.72);
  font-size: 14px;
  line-height: 1.6;
}

.cpag-input-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 430px;
  min-height: 56px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(215, 25, 51, 0.78);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cpag-input-row:focus-within {
  border-color: rgba(215, 25, 51, 1);
  box-shadow: 0 0 0 3px rgba(215, 25, 51, 0.14);
  background: rgba(255, 255, 255, 0.055);
}

.cpag-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  border: 0 !important;
  background: transparent !important;
  color: #f2f0ec !important;
  padding: 0 18px !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
}

.cpag-input::placeholder {
  color: rgba(242, 240, 236, 0.58);
}

.cpag-button {
  width: 62px;
  min-width: 62px;
  min-height: 56px;
  border: 0;
  border-left: 1px solid rgba(215, 25, 51, 0.78);
  background: rgba(0, 0, 0, 0.18);
  color: #d71933;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cpag-button:hover {
  background: rgba(215, 25, 51, 0.14);
  color: #ff344f;
  transform: translateX(1px);
}

.cpag-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.cpag-legal {
  max-width: 430px;
  margin: 18px auto 0;
  color: rgba(242, 240, 236, 0.52);
  font-size: 10px;
  line-height: 1.55;
}

.cpag-message {
  position: relative;
  z-index: 1;
  min-height: 22px;
  margin: 0 46px 38px;
  text-align: center;
  color: rgba(242, 240, 236, 0.74);
  font-size: 13px;
}

.cpag-message.is-error {
  color: #ff7f8f;
}

.cpag-message.is-success {
  color: #bdf7c9;
}

.cpag-success-note {
  max-width: 430px;
  margin: 0 auto;
  color: rgba(242, 240, 236, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

html.cpag-gate-open body {
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .cpag-overlay {
    padding: 16px;
  }

  .cpag-step {
    padding: 38px 22px 30px;
  }

  .cpag-brand {
    margin-bottom: 42px;
  }

  .cpag-brand-logo {
    width: min(190px, 70vw);
    max-height: 64px;
  }

  .cpag-panel h2 {
    font-size: 34px;
  }

  .cpag-message {
    margin-left: 20px;
    margin-right: 20px;
  }
}

@media (max-width: 420px) {
  .cpag-panel h2 {
    font-size: 30px;
  }

  .cpag-main-text,
  .cpag-small-text {
    font-size: 12px;
  }
}
