.fi-user-avatar,
.fi-avatar,
.fi-avatar img,
.fi-topbar .fi-user-avatar,
.fi-topbar .fi-avatar,
.lms-avatar-frame img,
.myedu__buddy img,
.learner-portal__avatar img {
    animation: avatar-idle 2.6s ease-in-out infinite;
}

@keyframes avatar-idle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    40% { transform: translateY(-3px) rotate(-1.5deg); }
    70% { transform: translateY(-1px) rotate(1.2deg); }
}

.china-role-icon {
    position: relative;
    display: inline-grid;
    width: 3.4rem;
    height: 3.4rem;
    padding: 0;
    overflow: hidden;
    border: 2px solid #F5C518;
    border-radius: 50%;
    background: #0b1c33;
    cursor: pointer;
    vertical-align: middle;
}

.china-role-icon--bar,
.fi-topbar .china-role-icon {
    width: 2.5rem;
    height: 2.5rem;
    pointer-events: none;
}

.china-menu-picks {
    display: flex;
    gap: .45rem;
    justify-content: space-between;
    padding: .65rem .75rem .35rem;
}

.china-menu-picks__btn {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: #0b1c33 center 40% / cover no-repeat;
    cursor: pointer;
}

.china-menu-picks__btn.is-on {
    border-color: #F5C518;
}

.role-dash__student-avatar .china-role-icon,
.parent-stage__ranger .china-role-icon {
    width: 3.1rem;
    height: 3.1rem;
}

.china-role-icon__still {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.08);
    animation: china-role-cycle 30s linear infinite;
}

.china-stage {
    position: fixed;
    inset: 0;
    z-index: 520;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.china-stage[hidden] {
    display: none;
}

.china-stage__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgb(7 18 33 / .72);
}

.china-stage__card {
    position: relative;
    z-index: 1;
    width: min(92vw, 46rem);
    padding: 1rem 1rem 1.1rem;
    border-radius: 1.2rem;
    background: #fffbf6;
    color: #0A192F;
    box-shadow: 0 24px 60px rgb(7 18 33 / .35);
}

.china-stage__close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 50%;
    background: #0A192F;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
}

.china-stage__kicker {
    margin: 0;
    color: #E31837;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.china-stage__name {
    margin: 0.15rem 0 0.7rem;
    font-size: 1.45rem;
}

.china-stage__frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 0.9rem;
    background: #0b1c33;
}

.china-stage__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.china-stage__photo.is-on {
    opacity: 1;
    animation: china-stage-drift 16s ease-in-out infinite alternate;
}

.china-stage__picks {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.china-stage__pick {
    width: 3.2rem;
    height: 3.2rem;
    padding: 0;
    border: 2px solid #D7C4A3;
    border-radius: 50%;
    background-position: center 40%;
    background-size: cover;
    cursor: pointer;
}

.china-stage__pick.is-on {
    border-color: #E31837;
    box-shadow: 0 0 0 3px rgb(245 197 24 / .7);
}

body.china-stage-open {
    overflow: hidden;
}

.china-live {
    grid-area: 1 / 1;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    animation: china-role-cycle 12s infinite;
}

.china-live > span {
    position: absolute;
    inset: 0;
    background-image: var(--china-art);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center center;
}

.china-live__sky {
    clip-path: inset(0 0 58% 0);
    animation: china-sky 7s ease-in-out infinite alternate;
}

.china-live__mist {
    background-image: none;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .45), transparent);
    mix-blend-mode: screen;
    opacity: .55;
    animation: china-mist 5.5s linear infinite;
}

.china-live__glow {
    background-image: none;
    background: radial-gradient(circle at 50% 45%, transparent 40%, rgb(11 28 51 / .2) 100%);
    pointer-events: none;
}

.china-live--eagle .china-live__plate {
    clip-path: polygon(evenodd,
        0 0, 100% 0, 100% 100%, 0 100%,
        0 8%, 48% 28%, 46% 70%, 0 62%,
        52% 28%, 100% 8%, 100% 62%, 54% 70%);
}

.china-live--bird .china-live__plate {
    clip-path: polygon(evenodd,
        0 0, 100% 0, 100% 100%, 0 100%,
        22% 28%, 70% 26%, 74% 78%, 24% 80%);
}

.china-live--butterfly .china-live__plate {
    clip-path: polygon(evenodd,
        0 0, 100% 0, 100% 100%, 0 100%,
        18% 28%, 48% 42%, 46% 72%, 16% 62%,
        52% 42%, 86% 26%, 88% 64%, 54% 72%);
}

.china-live--snake .china-live__plate {
    clip-path: polygon(evenodd,
        0 0, 100% 0, 100% 100%, 0 100%,
        32% 18%, 68% 16%, 70% 58%, 30% 62%);
}

.china-live--deer .china-live__plate {
    clip-path: polygon(evenodd,
        0 0, 100% 0, 100% 100%, 0 100%,
        24% 16%, 58% 14%, 60% 52%, 22% 54%);
}

.china-live--eagle .china-live__part--a {
    clip-path: polygon(0 8%, 48% 28%, 46% 70%, 0 62%);
    transform-origin: 48% 42%;
    animation: china-wing-l 1.05s ease-in-out infinite;
}

.china-live--eagle .china-live__part--b {
    clip-path: polygon(52% 28%, 100% 8%, 100% 62%, 54% 70%);
    transform-origin: 52% 42%;
    animation: china-wing-r 1.05s ease-in-out infinite;
}

.china-live--eagle .china-live__part--c {
    clip-path: ellipse(18% 22% at 46% 48%);
    transform-origin: 46% 62%;
    animation: china-head 2.2s ease-in-out infinite;
}

.china-live--bird .china-live__part--a {
    clip-path: ellipse(28% 34% at 48% 52%);
    transform-origin: 50% 78%;
    animation: china-bob 1.3s ease-in-out infinite;
}

.china-live--bird .china-live__part--b {
    clip-path: polygon(28% 48%, 46% 46%, 48% 68%, 24% 72%);
    transform-origin: 46% 58%;
    animation: china-flutter 0.42s ease-in-out infinite;
}

.china-live--bird .china-live__part--c {
    clip-path: polygon(0 62%, 100% 58%, 100% 100%, 0 100%);
    transform-origin: 20% 70%;
    animation: china-branch 2.8s ease-in-out infinite;
}

.china-live--butterfly .china-live__part--a {
    clip-path: polygon(18% 28%, 48% 42%, 46% 72%, 16% 62%);
    transform-origin: 48% 48%;
    animation: china-flap-l 0.55s ease-in-out infinite;
}

.china-live--butterfly .china-live__part--b {
    clip-path: polygon(52% 42%, 86% 26%, 88% 64%, 54% 72%);
    transform-origin: 52% 48%;
    animation: china-flap-r 0.55s ease-in-out infinite;
}

.china-live--butterfly .china-live__part--c {
    clip-path: ellipse(16% 22% at 52% 58%);
    animation: china-bob 1.1s ease-in-out infinite;
}

.china-live--snake .china-live__part--a {
    clip-path: polygon(32% 18%, 68% 16%, 70% 58%, 30% 62%);
    transform-origin: 50% 62%;
    animation: china-sway 1.5s ease-in-out infinite;
}

.china-live--snake .china-live__part--b {
    clip-path: ellipse(34% 22% at 50% 72%);
    transform-origin: 50% 64%;
    animation: china-coil 1.8s ease-in-out infinite;
}

.china-live--snake .china-live__part--c {
    clip-path: polygon(62% 78%, 78% 82%, 70% 96%, 54% 90%);
    transform-origin: 62% 80%;
    animation: china-tail 1.1s ease-in-out infinite;
}

.china-live--deer .china-live__part--a {
    clip-path: ellipse(22% 28% at 42% 38%);
    transform-origin: 42% 58%;
    animation: china-head 2.4s ease-in-out infinite;
}

.china-live--deer .china-live__part--b {
    clip-path: polygon(28% 48%, 58% 46%, 56% 88%, 30% 90%);
    transform-origin: 42% 88%;
    animation: china-breathe 2.1s ease-in-out infinite;
}

.china-live--deer .china-live__part--c {
    clip-path: ellipse(8% 10% at 58% 82%);
    transform-origin: 58% 92%;
    animation: china-flower 1.6s ease-in-out infinite;
}

@keyframes china-role-cycle {
    0% { opacity: 0; transform: scale(1.05); }
    5% { opacity: 1; transform: scale(1.07); }
    20% { opacity: 1; transform: scale(1.12); }
    25% { opacity: 0; transform: scale(1.14); }
    100% { opacity: 0; transform: scale(1.05); }
}

@keyframes china-stage-drift {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to { transform: scale(1.1) translate3d(-2%, -1.5%, 0); }
}

@keyframes china-sky {
    from { background-position: 42% 36%; }
    to { background-position: 58% 40%; }
}

@keyframes china-mist {
    from { transform: translateX(-40%); }
    to { transform: translateX(40%); }
}

@keyframes china-peek {
    0%, 100% { transform: scale(1.12) translateY(0); }
    50% { transform: scale(1.28) translateY(-6%); }
}

@keyframes china-wing-l {
    0%, 100% { transform: rotate(0deg) scaleY(1); }
    50% { transform: rotate(-18deg) scaleY(0.82); }
}

@keyframes china-wing-r {
    0%, 100% { transform: rotate(0deg) scaleY(1); }
    50% { transform: rotate(18deg) scaleY(0.82); }
}

@keyframes china-head {
    0%, 100% { transform: rotate(0deg); }
    40% { transform: rotate(-7deg); }
    70% { transform: rotate(6deg); }
}

@keyframes china-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7%); }
}

@keyframes china-flutter {
    0%, 100% { transform: scaleY(1) rotate(0deg); }
    50% { transform: scaleY(0.72) rotate(-8deg); }
}

@keyframes china-branch {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(2.5deg); }
}

@keyframes china-flap-l {
    0%, 100% { transform: scaleX(1) rotate(0deg); }
    50% { transform: scaleX(0.2) rotate(-8deg); }
}

@keyframes china-flap-r {
    0%, 100% { transform: scaleX(1) rotate(0deg); }
    50% { transform: scaleX(0.2) rotate(8deg); }
}

@keyframes china-sway {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    50% { transform: rotate(8deg) translateX(6%); }
}

@keyframes china-coil {
    0%, 100% { transform: scaleX(1) skewX(0deg); }
    50% { transform: scaleX(1.06) skewX(-4deg); }
}

@keyframes china-tail {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(16deg); }
}

@keyframes china-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05, 0.97); }
}

@keyframes china-flower {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(10deg); }
}

@media (prefers-reduced-motion: reduce) {
    .fi-user-avatar,
    .fi-avatar,
    .fi-avatar img,
    .lms-avatar-frame img,
    .myedu__buddy img,
    .learner-portal__avatar img,
    .drive-vehicle,
    .drive-garage__ride,
    .china-live,
    .china-live > span,
    .china-role-icon__still,
    .china-stage__photo.is-on {
        animation: none !important;
    }

    .china-role-icon__still:first-child,
    .china-stage__photo.is-on {
        opacity: 1;
        transform: none;
    }
}
