@media (prefers-reduced-motion: reduce) {
  .stg-gate, .stg-gate * { transition: none !important; animation: none !important; }
}
html.stg-locked body { visibility: hidden; }
html.stg-locked::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 59, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(18, 153, 255, 0.16), transparent 55%),
    linear-gradient(180deg, #0b0d12 0%, #0e1118 100%);
}
.stg-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #f5f6ff;
  visibility: visible !important;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(94, 59, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(18, 153, 255, 0.20), transparent 55%),
    linear-gradient(180deg, #0b0d12 0%, #0e1118 100%);
}
.stg-gate * { visibility: visible !important; }
.stg-gate-card {
  width: 100%;
  max-width: 460px;
  padding: 36px 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stg-gate-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  opacity: 0.95;
}
.stg-gate-brand img { height: 22px; width: auto; display: block; }
.stg-gate-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ca6ff;
  font-weight: 600;
  margin: 0 0 8px;
}
.stg-gate-title {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.stg-gate-subtitle {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 22px;
  color: #c6c9dc;
}
.stg-gate-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #c1c6e4;
  margin-bottom: 8px;
}
.stg-gate-field {
  position: relative;
  margin-bottom: 14px;
}
.stg-gate-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 44px 13px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #f5f6ff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.stg-gate-input::placeholder { color: #8288a8; }
.stg-gate-input:focus {
  border-color: #7b87ff;
  box-shadow: 0 0 0 3px rgba(123, 135, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}
.stg-gate-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 6px 8px;
  color: #9ba0c5;
  cursor: pointer;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
}
.stg-gate-toggle:hover { color: #f5f6ff; background: rgba(255,255,255,0.06); }
.stg-gate-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255, 72, 88, 0.12);
  border: 1px solid rgba(255, 72, 88, 0.32);
  color: #ffc9cf;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 14px;
}
.stg-gate-error.is-visible { display: flex; }
.stg-gate-error b { display: block; margin-bottom: 2px; color: #ffe3e6; }
.stg-gate-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #f5f6ff 0%, #d7dbff 100%);
  color: #0b0d12;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, filter .15s ease;
}
.stg-gate-button:hover { filter: brightness(1.03); box-shadow: 0 10px 28px rgba(0,0,0,0.35); }
.stg-gate-button:active { transform: translateY(1px); }
.stg-gate-button[disabled] { opacity: 0.6; cursor: progress; }
.stg-gate-hint {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #8d92b7;
}
.stg-gate-hint code {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
}
.stg-shake { animation: stg-shake .35s ease; }
@keyframes stg-shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
