.gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f4f6fb;
  background-image: radial-gradient(circle at 50% -10%, #eef1ff 0%, #f4f6fb 55%);
  opacity: 1;
  transition: opacity .45s ease;
}
.gate-hidden { opacity: 0; pointer-events: none; }
.gate[hidden] { display: none !important; }

.gate-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(30, 45, 90, .10);
  padding: 38px 34px 28px;
  text-align: center;
}
.gate-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: #fff2e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e8792b;
}
.gate-icon svg { width: 32px; height: 32px; }
.gate-card h1 { margin: 0; font-size: 22px; font-weight: 700; color: #1f2a44; }
.gate-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 11px;
  border-radius: 999px;
  background: #fff2e8;
  color: #d9661b;
  font-size: 12px;
  font-weight: 600;
}
.gate-desc { margin: 16px 0 24px; color: #6b7280; font-size: 13px; line-height: 1.75; }
.gate-label { display: block; text-align: left; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; }
.gate-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid #d9dfeb;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #1f2a44;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.gate-input::placeholder { letter-spacing: 0; color: #b3bac8; font-size: 14px; }
.gate-input:focus { border-color: #f0a05a; box-shadow: 0 0 0 3px rgba(240, 160, 90, .18); }
.gate-error { min-height: 18px; margin: 8px 0 0; text-align: left; color: #d64545; font-size: 12px; }
.gate-btn {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: #ec7a2c;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.gate-btn:hover { background: #db6a1e; }
.gate-btn:active { transform: translateY(1px); }
.gate-btn:disabled { cursor: default; opacity: .9; }
.gate-btn.gate-ok { background: #1d9e75; }
.gate-foot { margin: 22px 0 0; color: #9aa1b0; font-size: 11px; }

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
.gate-card.shake { animation: gate-shake .4s ease; }

.gate-relock {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e3e7f0;
  background: rgba(255, 255, 255, .9);
  color: #8a93a6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .5;
  transition: opacity .2s;
}
.gate-relock:hover { opacity: 1; }
.gate-relock svg { width: 15px; height: 15px; }
