:root {
    --purple: #44218f;
    --pink: #e33b7b;
    --soft-purple: #d9a6f1;
    --button-bg: #f7e9ff;
    --green: #68c824;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: grid;
    place-items: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
    padding: 24px;
}

.pin-card {
    width: min(326px, calc(100vw - 32px));
    min-height: 386px;
    background: linear-gradient(180deg, #fffaf9 0%, #fff4f6 100%);
    border: 3px solid #e9a7df;
    border-radius: 24px;
    box-shadow:
        0 6px 0 rgba(162, 58, 164, .35),
        0 12px 25px rgba(92, 28, 132, .25),
        inset 0 0 0 1px rgba(255, 255, 255, .8);
    padding: 21px 35px 18px;
    text-align: center;
}

.title {
    font-size: 36px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
    color: var(--purple);
    margin: 0 0 8px;
}

.title .name {
    color: var(--pink);
}

.subtitle {
    font-size: 14px;
    font-weight: 700;
    color: #6b4aa4;
    margin-bottom: 14px;
}

.heart {
    color: #ff5c9a;
    font-size: 14px;
    margin: 0 8px;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 31px;
    min-height: 19px;
    margin-bottom: 14px;
}

.pin-dot {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #ead7f6;
    border: 2px solid #d5a8e8;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, .8);
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.pin-dot.filled {
    background: linear-gradient(145deg, #7d3ec2, #4b1f98);
    border-color: transparent;
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .15);
    transform: scale(1.02);
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 68px);
    gap: 12px 15px;
    justify-content: center;
}

.key {
    height: 52px;
    border: 2px solid #d6a5ed;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff5ff 0%, #f3dcff 100%);
    color: var(--purple);
    font-size: 31px;
    font-weight: 900;
    line-height: 1;
    box-shadow:
        0 3px 0 rgba(162, 92, 184, .45),
        inset 0 2px 4px rgba(255, 255, 255, .9);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.key:hover,
.key:focus-visible {
    filter: brightness(1.03);
}

.key:focus-visible {
    outline: 3px solid rgba(68, 33, 143, .35);
    outline-offset: 3px;
}

.key:active {
    transform: translateY(2px);
    box-shadow:
        0 1px 0 rgba(162, 92, 184, .45),
        inset 0 2px 4px rgba(255, 255, 255, .9);
}

.key-danger {
    background: linear-gradient(180deg, #ff77a8 0%, #e7467d 100%);
    border-color: #dc2f72;
    color: #fff;
}

.key-danger .x-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 22px;
    border-radius: 6px;
    background: #bf2d62;
    box-shadow: inset 0 2px 2px rgba(255, 255, 255, .35);
    font-size: 24px;
    line-height: 1;
}

.key-ok {
    background: linear-gradient(180deg, #8ee044 0%, #57bd1c 100%);
    border-color: #4ba919;
    color: #fff;
    font-size: 26px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
}

.login-error {
    min-height: 20px;
    margin-top: 12px;
    color: #c72862;
    font-size: 14px;
    font-weight: 800;
}

@media (max-width: 360px) {
    body {
        padding: 16px;
    }

    .pin-card {
        padding-inline: 24px;
    }

    .keypad {
        grid-template-columns: repeat(3, 64px);
        gap: 11px;
    }

    .pin-dots {
        gap: 24px;
    }
}
