.cbmg-page-gate {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  right: auto;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  transform: translateX(-50%);
  z-index: 2147483000;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(16px, 4vw, 40px);
  background:
    radial-gradient(circle at 15% 15%, rgba(26, 115, 232, 0.12), transparent 34%),
    radial-gradient(circle at 85% 80%, rgba(52, 168, 83, 0.1), transparent 32%),
    #f6f8fc;
}

html:has(.cbmg-page-gate),
body:has(.cbmg-page-gate),
html.cbmg-gate-active,
body.cbmg-gate-active {
  overflow: hidden !important;
}

body > .cbmg-page-gate {
  margin: 0 !important;
  max-width: none !important;
}

.cbmg-card {
  --cbmg-blue: #1a73e8;
  --cbmg-blue-dark: #1558b0;
  --cbmg-border: #d9dee8;
  --cbmg-text: #202124;
  --cbmg-muted: #5f6368;
  box-sizing: border-box;
  width: min(100%, 540px);
  margin: 36px auto;
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid var(--cbmg-border);
  border-radius: 20px;
  background: #fff;
  color: var(--cbmg-text);
  box-shadow: 0 16px 44px rgba(25, 39, 67, 0.1);
  text-align: center;
}

.cbmg-card *,
.cbmg-card *::before,
.cbmg-card *::after {
  box-sizing: border-box;
}

.cbmg-lock {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #e8f0fe;
  color: var(--cbmg-blue);
}

.cbmg-title {
  margin: 0 0 12px;
  color: var(--cbmg-text);
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.cbmg-copy,
.cbmg-note,
.cbmg-email,
.cbmg-error {
  margin: 0;
}

.cbmg-copy {
  color: var(--cbmg-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.cbmg-signed-in-label {
  margin-top: 18px;
}

.cbmg-email {
  margin-top: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.cbmg-google-button,
.cbmg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  transition: box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.cbmg-google-button {
  width: min(100%, 330px);
  margin-top: 24px;
  padding: 12px 18px;
  border: 1px solid #747775;
  background: #fff;
  color: #1f1f1f !important;
  gap: 12px;
}

.cbmg-google-button:hover,
.cbmg-google-button:focus-visible {
  background: #f8faff;
  border-color: var(--cbmg-blue);
  box-shadow: 0 2px 8px rgba(60, 64, 67, 0.2);
  transform: translateY(-1px);
}

.cbmg-google-logo {
  flex: 0 0 auto;
}

.cbmg-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.cbmg-button {
  padding: 12px 18px;
  border: 1px solid transparent;
}

.cbmg-button-primary {
  background: var(--cbmg-blue);
  color: #fff !important;
}

.cbmg-button-primary:hover,
.cbmg-button-primary:focus-visible {
  background: var(--cbmg-blue-dark);
}

.cbmg-button-secondary {
  border-color: var(--cbmg-border);
  background: #fff;
  color: var(--cbmg-blue) !important;
}

.cbmg-button-secondary:hover,
.cbmg-button-secondary:focus-visible {
  background: #f6f9fe;
  border-color: #a9c7f5;
}

.cbmg-note {
  margin-top: 20px;
  color: var(--cbmg-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.cbmg-error {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fce8e6;
  color: #a50e0e;
}

.cbmg-inline-error {
  margin-top: 14px;
}

.cbmg-inline-error .cbmg-email {
  margin-top: 10px;
}

@media (max-width: 560px) {
  .cbmg-page-gate {
    place-items: start center;
    padding: 16px;
  }

  .cbmg-card {
    margin: 20px auto;
    border-radius: 14px;
  }
}
