/* Оверлей графического ключа — полноэкранный, блокирует скролл и клики */
#mr-app-lock {
    position: fixed; inset: 0; z-index: 2147483647;
    background: #FDFBF8;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Montserrat', system-ui, sans-serif;
    color: #2A1218;
    overflow: hidden;
}
#mr-app-lock.active { display: flex; }
#mr-app-lock.no-scroll body { overflow: hidden; }

.mr-lock-logo { width: 72px; height: 72px; margin-bottom: 20px; opacity: .9; }
.mr-lock-title {
    font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em;
    text-align: center; margin: 0 0 8px;
}
.mr-lock-sub { color: #8A6A72; font-size: .95rem; text-align: center; margin: 0 0 28px; }

/* Индикаторы введённых цифр */
.mr-lock-dots { display: flex; gap: 14px; margin-bottom: 32px; }
.mr-lock-dot {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid #85283A; background: transparent;
    transition: background .15s, transform .15s, border-color .15s;
}
.mr-lock-dot.filled { background: #85283A; transform: scale(1.1); }
.mr-lock-dot.error {
    background: #B91C1C; border-color: #B91C1C;
    animation: mr-shake .4s ease-in-out;
}
@keyframes mr-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
}

/* Сетка цифр */
.mr-lock-pad {
    display: grid;
    grid-template-columns: repeat(3, 76px);
    grid-auto-rows: 76px;
    gap: 14px;
    max-width: 100%;
}
.mr-lock-key {
    appearance: none; border: 0; background: #fff;
    border: 1.5px solid #EADFD9; border-radius: 50%;
    font-family: inherit; font-size: 1.6rem; font-weight: 700;
    color: #2A1218; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s, transform .12s, box-shadow .12s;
    user-select: none; -webkit-tap-highlight-color: transparent;
}
.mr-lock-key:hover { background: #FFF4CC; border-color: #FFCC00; }
.mr-lock-key:active { transform: scale(.94); background: #FFCC00; }
.mr-lock-key.ghost { background: transparent; border-color: transparent; cursor: default; }
.mr-lock-key.ghost:hover { background: transparent; }
.mr-lock-key svg { width: 26px; height: 26px; stroke: #85283A; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.mr-lock-error {
    color: #B91C1C; font-weight: 700; font-size: .9rem;
    min-height: 20px; margin-bottom: 10px; text-align: center;
}
.mr-lock-alt {
    background: transparent; border: 0; cursor: pointer;
    color: #85283A; font-weight: 700; font-size: .92rem;
    font-family: inherit; padding: 8px 12px; border-radius: 8px;
    margin-top: 12px;
}
.mr-lock-alt:hover { background: #FFF4CC; }

.mr-lock-user {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid #EADFD9; border-radius: 999px;
    padding: 6px 14px 6px 6px; margin-bottom: 22px;
    font-size: .88rem; color: #2A1218;
}
.mr-lock-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, #C2607A, #85283A);
    color: #fff; font-weight: 800; font-size: .8rem;
    display: flex; align-items: center; justify-content: center;
}

@media (max-width: 380px) {
    .mr-lock-pad { grid-template-columns: repeat(3, 64px); grid-auto-rows: 64px; gap: 10px; }
    .mr-lock-key { font-size: 1.4rem; }
}