.login-characters-overlay {
    --overlay-left: 28px;
    --overlay-bottom: 24px;
    --character-scale: 0.6667;
    --mobile-character-scale: 0.54;
    --character-opacity: 0.65;
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.login-characters-overlay.is-visible {
    opacity: 1;
}

body.preview-fullscreen .login-characters-overlay {
    display: none !important;
}

html.mobile-mode .login-characters-overlay,
.login-characters-overlay.is-mobile-layout {
    --character-scale: var(--mobile-character-scale);
    z-index: 6;
}

html.mobile-mode .login-characters-rail,
.login-characters-overlay.is-mobile-layout .login-characters-rail {
    gap: 8px;
    filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.14));
}

.login-characters-rail {
    position: absolute;
    left: var(--overlay-left);
    bottom: var(--overlay-bottom);
    display: flex;
    align-items: flex-end;
    gap: 10px;
    opacity: var(--character-opacity);
    transform: scale(var(--character-scale));
    transform-origin: left bottom;
    filter: drop-shadow(0 16px 28px rgba(15, 23, 42, 0.18));
    will-change: transform;
}

.login-character {
    --body-color: #6f64ff;
    --body-width: 82px;
    --body-height: 156px;
    --pupil-x: 0px;
    --pupil-y: 0px;
    --head-rotate: 0deg;
    --head-shift-x: 0px;
    --head-shift-y: 0px;
    --body-rotate: 0deg;
    --body-shift-x: 0px;
    --body-shift-y: 0px;
    --body-skew-x: 0deg;
    --body-scale-x: 1;
    --eye-open: 1;
    --eye-scale-x: 1;
    --eye-clip: 0%;
    --pupil-opacity: 1;
    --squeeze-y: 1;
    --question-scale: 0.46;
    --question-opacity: 0;
    --question-shift-y: 0px;
    position: relative;
    width: var(--body-width);
    transform-origin: 50% 100%;
    isolation: isolate;
}

.login-character--one {
    --body-color: #6353ff;
    --body-width: 82px;
    --body-height: 156px;
    z-index: 2;
}

.login-character--two {
    --body-color: #1a1d28;
    --body-width: 56px;
    --body-height: 122px;
    margin-left: -8px;
    margin-right: -4px;
    z-index: 1;
}

.login-character--three {
    --body-color: #d7bf4a;
    --body-width: 72px;
    --body-height: 148px;
    z-index: 3;
}

.login-character__shadow {
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 82%;
    height: 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.26);
    transform: translateX(-50%);
    filter: blur(7px);
    opacity: 0.58;
}

.login-character__body {
    position: relative;
    width: var(--body-width);
    height: var(--body-height);
    border-radius: calc(var(--body-width) * 0.45);
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.12)),
        var(--body-color);
    box-shadow:
        inset -8px -10px 0 rgba(0, 0, 0, 0.12),
        0 14px 22px rgba(0, 0, 0, 0.12);
    transform-origin: 50% 100%;
    transform:
        translate(var(--body-shift-x), var(--body-shift-y))
        rotate(var(--body-rotate))
        skewX(var(--body-skew-x))
        scaleX(var(--body-scale-x))
        scaleY(var(--squeeze-y));
    animation: login-character-breathe 3.5s ease-in-out infinite;
}

.login-character__hat {
    position: absolute;
    left: 50%;
    top: 2px;
    width: 66px;
    height: 42px;
    transform:
        translate(calc(-50% + var(--head-shift-x) * 0.4), calc(var(--head-shift-y) * 0.16 - 9px))
        rotate(calc(var(--head-rotate) * 0.32 - 2deg));
    transform-origin: 50% 100%;
    pointer-events: none;
    z-index: 3;
}

.login-character__hat-cap {
    position: absolute;
    left: 50%;
    top: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(180deg, #3c4358 0%, #191d29 100%);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    transform: translateX(-50%) rotate(-12deg) scaleY(0.54);
    box-shadow:
        0 6px 12px rgba(15, 23, 42, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.login-character__hat-cap::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 6px;
    border-radius: 999px;
    background: rgba(7, 10, 18, 0.22);
    transform: translate(-50%, 6px);
    filter: blur(1px);
}

.login-character__hat-cap::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e8c14b;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(190, 145, 28, 0.18);
}

.login-character__hat-band {
    position: absolute;
    left: 50%;
    top: 18px;
    width: 28px;
    height: 16px;
    border-radius: 10px 10px 12px 12px;
    background: linear-gradient(180deg, #2c3142 0%, #141823 100%);
    transform: translateX(-50%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 7px rgba(15, 23, 42, 0.22);
}

.login-character__hat-band::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -4px;
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #353b4d 0%, #1c2130 100%);
    transform: translateX(-50%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 1px 2px rgba(15, 23, 42, 0.18);
}

.login-character__hat-band::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 18px;
    height: 6px;
    border-radius: 999px;
    background: rgba(10, 13, 20, 0.16);
    transform: translateX(-50%);
    filter: blur(1px);
}

.login-character__hat-tassel {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 2px;
    height: 24px;
    background: linear-gradient(180deg, #efc64f 0%, #bb8a12 100%);
    transform: translateX(15px) rotate(18deg);
    transform-origin: top center;
}

.login-character__hat-tassel::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #efc64f;
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(187, 138, 18, 0.22);
}

.login-character--two .login-character__body {
    border-radius: 22px;
    animation-delay: 0.35s;
}

.login-character--three .login-character__body {
    border-radius: 34px 34px 28px 28px;
    animation-delay: 0.15s;
}

.login-character__face {
    position: absolute;
    top: 24%;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 9px;
    transform:
        translate(calc(-50% + var(--head-shift-x)), var(--head-shift-y))
        rotate(var(--head-rotate));
}

.login-character--two .login-character__face {
    top: 23%;
    gap: 8px;
}

.login-character__eye {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f8f8fc;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
    overflow: hidden;
    clip-path: inset(var(--eye-clip) 0 var(--eye-clip) 0 round 999px);
    transform: scaleX(var(--eye-scale-x));
    transform-origin: 50% 58%;
}

.login-character--two .login-character__eye {
    width: 14px;
    height: 14px;
}

.login-character--three .login-character__eye {
    width: 17px;
    height: 17px;
}

.login-character__pupil {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0f1117;
    transform: translate(calc(-50% + var(--pupil-x)), calc(-50% + var(--pupil-y)));
    opacity: var(--pupil-opacity);
}

.login-character--two .login-character__pupil {
    width: 6px;
    height: 6px;
}

.login-character__mouth {
    position: absolute;
    left: 50%;
    top: calc(24% + 30px);
    width: 16px;
    height: 8px;
    border-bottom: 3px solid rgba(19, 20, 25, 0.56);
    border-radius: 0 0 999px 999px;
    transform: translateX(-50%);
}

.login-character--two .login-character__mouth {
    width: 10px;
    top: calc(23% + 24px);
    border-bottom-width: 2px;
}

.login-character--three .login-character__mouth {
    width: 19px;
    top: calc(24% + 29px);
}

.login-character__glasses {
    position: absolute;
    left: 50%;
    top: 4px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: rgba(56, 61, 73, 0.72);
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
}

.login-character__glasses::before,
.login-character__glasses::after {
    content: '';
    position: absolute;
    top: -5px;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(56, 61, 73, 0.72);
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.login-character__glasses::before {
    left: 50%;
    transform: translateX(-15px);
}

.login-character__glasses::after {
    left: 50%;
    transform: translateX(2px);
}

.login-character__question {
    position: absolute;
    left: 50%;
    top: -34px;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.98);
    text-shadow:
        0 4px 10px rgba(15, 23, 42, 0.22),
        0 0 0.5px rgba(15, 23, 42, 0.35);
    opacity: var(--question-opacity);
    transform:
        translate(-50%, calc(-1 * var(--question-shift-y)))
        scale(var(--question-scale));
    transform-origin: 50% 100%;
    will-change: transform, opacity;
}

@keyframes login-character-breathe {
    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -3px;
    }
}

