.rr-modal[hidden] {
    display: none;
}

.rr-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 20px 10px;
}

.rr-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 4, 7, 0.82);
    backdrop-filter: blur(8px);
}

.rr-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100% - 20px, 460px);
    margin: 0;
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 24px 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(9, 11, 16, 0.32);
    box-shadow: var(--shadow);
}

.rr-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 2rem;
    cursor: pointer;
}

.rr-form-step {
    display: grid;
    gap: 12px;
}

.rr-auth-choice {
    display: grid;
    gap: 16px;
}

.rr-auth-choice__actions {
    display: grid;
    gap: 12px;
}

.rr-step-panel {
    display: grid;
    gap: 12px;
}

.rr-step-panel[hidden] {
    display: none;
}

.rr-form-step h2 {
    margin: 0;
    font-family: 'Teko', sans-serif;
    font-size: 2.5rem;
    line-height: .95;
    letter-spacing: .04em;
}

.rr-form-step p,
.rr-form-step__feedback {
    margin: 0;
    color: var(--muted);
}

.rr-auth-choice h2 {
    margin: 0;
    font-family: 'Teko', sans-serif;
    font-size: 2.8rem;
    line-height: .95;
    letter-spacing: .04em;
}

.rr-auth-choice p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rr-form-step input {
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    background: rgba(255,255,255,.02);
    color: var(--text);
    font: inherit;
}

.rr-auth-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255, 202, 114, .18);
    border-radius: 14px;
    background: rgba(255, 255, 255, .018);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

.rr-auth-remember input {
    width: 18px;
    height: 18px;
    min-height: 0;
    padding: 0;
    accent-color: #ff8a1c;
}

.rr-form-step__feedback {
    min-height: 24px;
    font-size: .92rem;
}

.rr-form-step__feedback.is-error {
    color: #ff8f7a;
}

.rr-form-step__feedback.is-success {
    color: #ffc96c;
}

.rr-step-button {
    position: relative;
    overflow: hidden;
}

.rr-step-button.is-loading {
    pointer-events: none;
    opacity: .88;
}

.rr-step-button.is-loading span {
    opacity: 0;
}

.rr-step-button.is-loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid rgba(40, 20, 2, 0.22);
    border-top-color: #281402;
    animation: rr-spin .8s linear infinite;
}

.rr-auth-link {
    justify-self: center;
    border: 0;
    background: transparent;
    color: var(--gold);
    font: inherit;
    cursor: pointer;
}

@keyframes rr-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .rr-modal__dialog {
        width: min(100% - 12px, 460px);
        max-height: calc(100vh - 24px);
        padding: 22px 16px;
    }
}
