.mx-splash {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 80% 60% at 22% 100%, rgba(0, 200, 255, 0.28), transparent 60%),
    radial-gradient(ellipse 70% 60% at 85% 8%, rgba(91, 33, 182, 0.30), transparent 55%),
    radial-gradient(ellipse 120% 90% at 50% 50%, #0f1626 0%, #070b16 70%, #05070f 100%);
  font-family: Inter, system-ui, sans-serif;
}

.mx-splash::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 78% 14%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 35% 65%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 62% 80%, rgba(0, 200, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 88% 60%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 20% 85%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 50% 30%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 8% 55%, rgba(0, 200, 255, 0.6), transparent);
}

.mx-splash .mx-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
}

/* ПИН-клавиатура (`static/pin-pad.js`, владелец 30.09): точки и крупные цифры, как в
   банковском приложении. ⚠️ Классы свои, а не Tailwind: сборка `app.css` статическая, и
   класса, которого в ней нет, браузер просто не знает. */
.pin-native-hidden {
  display: none;
}

.pin-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 8px;
  user-select: none;
  -webkit-user-select: none;
}

.pin-pad__title {
  font-size: 17px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 18px;
}

.pin-pad__dots {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}

.pin-pad__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: background-color 0.12s ease, transform 0.12s ease;
}

.pin-pad__dot--on {
  background: #2563eb;
  transform: scale(1.1);
}

.pin-pad__msg {
  min-height: 20px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #b91c1c;
  text-align: center;
}

.pin-pad__keys {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 14px 26px;
  justify-content: center;
}

.pin-pad__key {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.1s ease;
}

.pin-pad__key:active {
  background: #dbeafe;
}

.pin-pad__key:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.pin-pad__key--blank {
  border: 0;
  background: transparent;
  cursor: default;
}

.pin-pad__key--erase {
  border-color: transparent;
  background: transparent;
  color: #64748b;
  font-size: 24px;
}

/* Клавиша «по отпечатку» — в пустой ячейке слева от нуля, только у привязки с ключом
   (`data-passkey`, `app/worker_passkey.py`). */
.pin-pad__key--passkey {
  border-color: transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-pad__key--passkey img {
  width: 34px;
  height: 34px;
  pointer-events: none;
}

/* Страница предложения «Входить по отпечатку» (`templates/login_passkey_setup.html`). */
.passkey-offer__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.passkey-offer__msg {
  min-height: 20px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #b91c1c;
  text-align: center;
}

.pin-pad--busy .pin-pad__key {
  opacity: 0.45;
  pointer-events: none;
}

.pin-pad--busy .pin-pad__msg {
  color: #475569;
}

.pin-pad__dots--shake {
  animation: pin-pad-shake 0.4s ease;
}

@keyframes pin-pad-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .pin-pad__dots--shake {
    animation: none;
  }
}

@media (max-width: 360px) {
  .pin-pad__keys {
    grid-template-columns: repeat(3, 64px);
    gap: 12px 20px;
  }

  .pin-pad__key {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
}
