:root { color-scheme: light; }

.beta-gate {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  padding: 24px;
  color: #11224a;
  background:
    radial-gradient(circle at 14% 12%, rgba(175, 205, 255, .52), transparent 34%),
    radial-gradient(circle at 88% 84%, rgba(202, 184, 255, .34), transparent 32%),
    linear-gradient(145deg, #f8faff 0%, #eef3ff 54%, #f7f4ff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: opacity .26s ease, transform .26s ease;
}

.beta-gate.is-leaving { opacity: 0; transform: scale(1.015); }
.beta-dot-field { position: absolute; inset: 0; }

.beta-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,.06), rgba(255,255,255,.58) 48%, rgba(255,255,255,.08));
  pointer-events: none;
}

.beta-access-card {
  position: relative;
  width: min(100%, 480px);
  padding: 38px;
  border: 1px solid rgba(106, 132, 190, .2);
  border-radius: 28px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 24px 80px rgba(42, 67, 125, .16), inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter: blur(22px);
}

.beta-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #102351;
  font-weight: 800;
  letter-spacing: -.02em;
}

.beta-brand img { width: 34px; height: 34px; }

.beta-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 30px 0 12px;
  color: #3163d4;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.beta-kicker::before { content: ""; width: 18px; height: 2px; border-radius: 10px; background: currentColor; }
.beta-access-card h1 { margin: 0; color: #102044; font-size: clamp(2rem, 7vw, 3rem); line-height: 1.02; letter-spacing: -.05em; }
.beta-intro { margin: 16px 0 26px; color: #60708f; font-size: 1rem; line-height: 1.65; }
.beta-access-card label { display: block; margin-bottom: 9px; color: #25375d; font-size: .86rem; font-weight: 750; }

.beta-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.beta-code-row input {
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #cbd6ec;
  border-radius: 14px;
  outline: none;
  color: #102044;
  background: rgba(249, 251, 255, .96);
  font: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.beta-code-row input:focus { border-color: #527de4; box-shadow: 0 0 0 4px rgba(82, 125, 228, .13); }
.beta-code-row button {
  min-width: 116px;
  height: 52px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  color: white;
  background: linear-gradient(135deg, #244fae, #4779e4);
  box-shadow: 0 10px 24px rgba(47, 90, 190, .24);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease;
}

.beta-code-row button:hover:not(:disabled) { transform: translateY(-1px); }
.beta-code-row button:disabled { cursor: wait; opacity: .72; }
.beta-code-row button[data-loading="true"]::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px; border: 2px solid rgba(255,255,255,.42); border-top-color: white; border-radius: 50%; vertical-align: -1px; animation: beta-spin .7s linear infinite; }

.beta-message { min-height: 21px; margin: 12px 2px 0; color: #687793; font-size: .86rem; }
.beta-message[data-type="error"] { color: #b4324c; }
.beta-message[data-type="success"] { color: #197552; }
.beta-footnote { display: flex; align-items: center; gap: 7px; margin: 20px 0 0; color: #7b88a1; font-size: .78rem; }
.beta-footnote::before { content: "✓"; color: #3971dc; font-weight: 900; }

.beta-gate.is-checking .beta-access-card { opacity: 0; transform: translateY(8px); }
@keyframes beta-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .beta-gate { padding: 16px; }
  .beta-access-card { padding: 28px 22px; border-radius: 22px; }
  .beta-code-row { grid-template-columns: 1fr; }
  .beta-code-row button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .beta-gate, .beta-code-row button { transition: none; }
}
