html.pe-gate-locked body > *:not(#pe-gate) { visibility: hidden !important; }
html.pe-gate-locked,
html.pe-gate-locked body {
  margin: 0;
  min-height: 100%;
  background: #1a1028;
}

#pe-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(91, 42, 145, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 90%, rgba(68, 32, 109, 0.5), transparent 50%),
    linear-gradient(160deg, #120a1c 0%, #2a1745 45%, #1a1028 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #f4f0fa;
}

#pe-gate[hidden] { display: none !important; }

.pe-gate-card {
  width: min(400px, 100%);
  padding: 36px 32px 32px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  text-align: center;
  color: #1d2433;
}

.pe-gate-card img {
  display: block;
  height: 40px;
  width: auto;
  margin: 0 auto 20px;
}

.pe-gate-card h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #1d2433;
}

.pe-gate-card p {
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #5b6577;
}

.pe-gate-card form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.pe-gate-card label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6577;
}

.pe-gate-card input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #c8ccd4;
  background: #fff;
  color: #1d2433;
  font: inherit;
  font-size: 1rem;
  outline: none;
}

.pe-gate-card input[type="password"]:focus {
  border-color: #5b2a91;
  box-shadow: 0 0 0 3px rgba(91, 42, 145, 0.2);
}

.pe-gate-card button {
  margin-top: 4px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: #5b2a91;
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.pe-gate-card button:hover { background: #44206d; }

.pe-gate-error {
  min-height: 1.2em;
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: #b42318;
}
