/* rp auth ui */
.auth-head {
            position: relative;
            flex-shrink: 1;
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .auth-account {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
        }
        .auth-pulse {
            flex: none;
            width: 10px;
            height: 10px;
            padding: 0;
            border: 0;
            border-radius: 999px;
            background: #7c3aed;
            box-shadow: 0 0 0 0 rgba(124, 58, 237, .55);
            cursor: pointer;
            animation: auth-pulse 1.4s ease-out infinite;
        }
        .auth-pulse[hidden] { display: none !important; }
        @keyframes auth-pulse {
            0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, .55); }
            70% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
            100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
        }
        .auth-users {
            position: absolute;
            top: calc(100% + 10px);
            right: 0;
            z-index: 90;
            width: min(320px, calc(100vw - 24px));
            max-height: min(60vh, 420px);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            background: #fff;
            border: 1px solid rgba(228, 228, 231, .95);
            border-radius: 14px;
            box-shadow: 0 16px 40px rgba(16, 15, 18, .14);
        }
        .auth-users[hidden] { display: none !important; }
        .auth-users__head {
            padding: 10px 12px 8px;
            color: #71717a;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: .04em;
            text-transform: uppercase;
            border-bottom: 1px solid #f4f4f5;
        }
        .auth-users__list {
            overflow: auto;
            padding: 6px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .auth-users__item {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 2px;
            width: 100%;
            padding: 8px 10px;
            border: 0;
            border-radius: 10px;
            background: transparent;
            color: #18181b;
            text-align: left;
            cursor: pointer;
            font: inherit;
        }
        .auth-users__item:hover { background: #f4f4f5; }
        .auth-users__item.is-me { background: #f5f3ff; }
        .auth-users__email {
            font-size: 13px;
            font-weight: 700;
            color: #7c3aed;
            word-break: break-all;
        }
        .auth-users__meta {
            font-size: 11px;
            color: #71717a;
        }
        .auth-users__empty,
        .auth-users__err {
            padding: 14px 10px;
            color: #71717a;
            font-size: 13px;
            text-align: center;
        }
        .auth-users__err { color: #e11d48; }
        #rp-cta-start .rp-cta-label { white-space: nowrap; }
        .auth-out {
            display: none;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            height: 32px;
            padding: 0 10px;
            border: 1px solid #e4e4e7;
            border-radius: 10px;
            background: #fff;
            color: #52525b;
            font: inherit;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
        }
        .auth-out.is-on { display: inline-flex; }
        .auth-out:hover { background: #f4f4f5; color: #18181b; }
        .auth-btn {
            pointer-events: auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 40px;
            padding: 0 16px;
            border: 1px solid rgba(196, 181, 253, .75);
            border-radius: 12px;
            color: #7c3aed;
            font: inherit;
            font-size: 14px;
            font-weight: 700;
            letter-spacing: -0.01em;
            cursor: pointer;
            background: linear-gradient(90deg, rgba(237, 233, 254, .58), rgba(253, 242, 248, .42));
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            box-shadow: 0 8px 24px rgba(124, 58, 237, .08);
        }
        .auth-btn:hover {
            background: linear-gradient(90deg, rgba(237, 233, 254, .78), rgba(253, 242, 248, .62));
        }
        .auth-btn.is-in {
            color: #7c3aed;
            border: 0;
            background: transparent;
            box-shadow: none;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            height: auto;
            min-height: 0;
            padding: 0;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            cursor: pointer;
            text-decoration: none;
        }
        .auth-btn.is-in:hover {
            background: transparent;
            color: #6d28d9;
            text-decoration: underline;
        }
        body.auth-open { overflow: hidden; }
        .auth-overlay {
            position: fixed;
            inset: 0;
            z-index: 300;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px 16px;
            background: rgba(8, 8, 14, .62);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }
        .auth-overlay.is-on { display: flex !important; }
        .auth-dialog {
            width: min(420px, 100%);
            background: #16161f;
            border: 1px solid rgba(168, 85, 247, .22);
            border-radius: 18px;
            padding: 26px 26px 20px;
            box-shadow: 0 28px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(168, 85, 247, .08);
            color: #fff;
            animation: auth-pop .18s ease-out;
        }
        @keyframes auth-pop {
            from { transform: translateY(10px) scale(.98); opacity: 0; }
            to { transform: none; opacity: 1; }
        }
        .auth-dialog-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
        }
        .auth-title {
            margin: 0;
            font-size: 30px;
            line-height: 1.1;
            font-weight: 800;
            letter-spacing: -0.03em;
            color: #c084fc;
        }
        .auth-dialog.is-signup .auth-title {
            background: linear-gradient(90deg, #c084fc, #e879f9);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        .auth-close {
            width: 36px;
            height: 36px;
            border: 0;
            background: transparent;
            color: #c4b5fd;
            font-size: 28px;
            line-height: 1;
            cursor: pointer;
            border-radius: 10px;
        }
        .auth-close:hover { background: rgba(255,255,255,.06); color: #fff; }
        .auth-field { display: block; margin-bottom: 14px; }
        .auth-field span {
            display: block;
            margin-bottom: 7px;
            font-size: 13px;
            font-weight: 600;
            color: #f4f4f5;
        }
        .auth-box {
            position: relative;
            display: flex;
            align-items: center;
        }
        .auth-box input {
            width: 100%;
            height: 46px;
            border: 1.5px solid #a855f7;
            border-radius: 12px;
            padding: 0 42px 0 14px;
            background: #12121a;
            color: #fff;
            font: inherit;
            font-size: 14px;
            outline: none;
            box-shadow: 0 0 0 3px rgba(168, 85, 247, .08);
        }
        .auth-dialog.is-signup .auth-box input {
            background: #f4f1ff;
            color: #18181b;
        }
        .auth-box input::placeholder { color: #71717a; }
        .auth-box input:focus { box-shadow: 0 0 0 4px rgba(168, 85, 247, .18); }
        .auth-eye {
            position: absolute;
            right: 8px;
            width: 32px;
            height: 32px;
            border: 0;
            background: transparent;
            color: #c084fc;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
        }
        .auth-forgot {
            display: block;
            margin: -4px 0 16px auto;
            border: 0;
            background: none;
            color: #4ade80;
            font: inherit;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            padding: 0;
        }
        .auth-or {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 16px 0 12px;
            color: #a1a1aa;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: .04em;
        }
        .auth-or[hidden] { display: none; }
        .auth-or::before, .auth-or::after {
            content: "";
            flex: 1;
            height: 1px;
            background: rgba(255,255,255,.12);
        }
        .auth-social {
            display: flex;
            flex-direction: column;
            flex-wrap: nowrap;
            gap: 8px;
            margin-bottom: 14px;
        }
        .auth-social[hidden] { display: none; }
        .auth-social-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            flex: none;
            height: 46px;
            padding: 0 14px;
            border: 0;
            border-radius: 12px;
            background: #fff;
            color: #1f1f1f;
            font: inherit;
            font-size: 14px;
            font-weight: 600;
            line-height: 1.1;
            white-space: nowrap;
            cursor: pointer;
            box-shadow: none;
        }
        .auth-social-btn span { white-space: nowrap; }
        .auth-social-btn svg { width: 18px; height: 18px; flex: none; }
        .auth-social-btn:hover { filter: none; }
        .auth-social-btn:disabled {
            opacity: .55;
            cursor: wait;
        }
        .auth-social-btn.is-google {
            background: #fff;
            color: #1f1f1f;
        }
        .auth-social-btn.is-google:hover { background: #f8f9fa; }
        .auth-social-btn.is-tg {
            background: #2aabee;
            color: #fff;
        }
        .auth-social-btn.is-tg:hover { background: #229ed9; }
        .auth-msg {
            min-height: 18px;
            margin: 0 0 12px;
            font-size: 13px;
            line-height: 1.35;
        }
        .auth-msg.is-err { color: #fda4af; }
        .auth-msg.is-ok { color: #86efac; }
        .auth-actions {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
        }
        .auth-cancel {
            border: 0;
            background: none;
            color: #fff;
            font: inherit;
            font-size: 15px;
            cursor: pointer;
            padding: 0;
        }
        .auth-submit {
            height: 42px;
            padding: 0 22px;
            border: 0;
            border-radius: 12px;
            color: #fff;
            font: inherit;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            background: linear-gradient(90deg, #7c3aed 0%, #c084fc 100%);
            box-shadow: 0 0 24px rgba(168, 85, 247, .45);
        }
        .auth-submit:disabled { opacity: .5; cursor: not-allowed; }
        .auth-switch {
            margin: 16px 0 0;
            text-align: center;
            color: #a1a1aa;
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .auth-switch button {
            border: 0;
            background: none;
            color: #c084fc;
            font: inherit;
            font-weight: 700;
            cursor: pointer;
            padding: 0;
        }
        .auth-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            left: auto;
            z-index: 40;
            min-width: 220px;
            padding: 8px;
            background: #16161f;
            border: 1px solid rgba(168, 85, 247, .28);
            border-radius: 14px;
            box-shadow: 0 16px 40px rgba(0,0,0,.28);
            display: none;
            pointer-events: auto;
        }
        .auth-menu.is-on { display: block; }
        .auth-menu button {
            width: 100%;
            height: 40px;
            border: 0;
            border-radius: 10px;
            background: transparent;
            color: #fff;
            font: inherit;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            text-align: start;
            padding: 0 12px;
        }
        .auth-menu button:hover { background: rgba(168, 85, 247, .16); }
@media (max-width: 767px) {
    .site-brand {
        max-width: 34%;
    }
    .auth-head {
        gap: 6px;
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
    }
    .auth-btn {
        height: 32px;
        padding: 0 10px;
        font-size: 12px;
        border-radius: 10px;
    }
    .auth-btn.is-in {
        max-width: min(36vw, 120px);
        font-size: 11px;
        padding: 0;
    }
    .auth-out {
        height: 32px;
        padding: 0 8px;
        font-size: 11px;
    }
    .mobile-menu-btn {
        position: relative;
        z-index: 71;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    #main-header .relative {
        z-index: 70;
    }
    .mobile-menu.is-open {
        display: block;
    }
}
