.assistant-pet {
    position: fixed;
    left: 0;
    top: 0;
    width: clamp(108px, 10.8vw, 142px);
    height: clamp(122px, 12.5vw, 166px);
    z-index: calc(var(--z-popover, 1600) + 8);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    pointer-events: auto;
    --assistant-pet-facing-scale: 1;
    --assistant-pet-root-scale: 1;
    transform: translate3d(0, 0, 0) scale(var(--assistant-pet-root-scale));
    transform-origin: 0 0;
    transition: filter .18s var(--ease, ease), opacity .18s var(--ease, ease), transform .18s var(--ease, ease);
}

.assistant-pet[data-facing="left"] {
    --assistant-pet-facing-scale: -1;
}

.assistant-pet[data-facing="right"],
.assistant-pet[data-facing="center"] {
    --assistant-pet-facing-scale: 1;
}

body.user-ui-page.auth-page.auth21-page .assistant-pet,
body.user-ui-page.auth-page.auth21-page[data-auth-mode="register"] .assistant-pet,
body.auth21-page .assistant-pet,
body.auth21-page[data-auth-mode="login"] .assistant-pet,
body.auth21-page[data-auth-mode="register"] .assistant-pet,
body.mirror-auth-page .assistant-pet {
    width: clamp(108px, 10.8vw, 142px) !important;
    height: clamp(122px, 12.5vw, 166px) !important;
}

.assistant-pet[hidden] {
    display: none !important;
}

.assistant-pet.is-dragging {
    cursor: grabbing;
    transition: none;
}

.assistant-pet.is-resizing {
    cursor: nwse-resize;
    transition: none;
}

.assistant-pet.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.assistant-pet__stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: end center;
    overflow: visible;
    pointer-events: none;
}

.assistant-pet__canvas,
.assistant-pet__fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.assistant-pet__canvas {
    display: block;
    opacity: 0;
    transition: opacity .24s var(--ease, ease);
}

.assistant-pet.has-live2d .assistant-pet__canvas {
    opacity: 1;
}

.assistant-pet.has-live2d .assistant-pet__fallback {
    opacity: 0;
    pointer-events: none;
}

.assistant-pet__fallback {
    display: grid;
    place-items: end center;
    opacity: 1;
    transition: opacity .24s var(--ease, ease), transform .24s var(--ease, ease);
}

.assistant-pet__sprite,
.assistant-pet__sprite * {
    box-sizing: border-box;
}

.assistant-pet__sprite {
    position: relative;
    width: min(93%, 126px);
    aspect-ratio: 1;
    margin-bottom: 10px;
    pointer-events: none;
    filter:
        drop-shadow(0 8px 0 rgba(66, 94, 164, .04))
        drop-shadow(0 12px 14px rgba(41, 60, 112, .1));
}

.assistant-pet__sprite-visual {
    position: absolute;
    inset: 0;
    --assistant-pet-translate-y: 0px;
    --assistant-pet-rotate: 0deg;
    --assistant-pet-scale: 1;
    --assistant-pet-walk-step-x: 0px;
    --assistant-pet-guard-step-x: 0px;
    --assistant-pet-walk-squash-x: 1;
    --assistant-pet-walk-squash-y: 1;
    --assistant-pet-facing-abs: 1;
    --assistant-pet-side-shift-x: 0px;
    --assistant-pet-side-scale-x: 1;
    transform-origin: 50% 84%;
    transform:
        translateX(var(--assistant-pet-walk-step-x))
        translateX(var(--assistant-pet-guard-step-x))
        translateX(var(--assistant-pet-side-shift-x))
        translateY(var(--assistant-pet-translate-y))
        rotate(var(--assistant-pet-rotate))
        scaleX(var(--assistant-pet-facing-scale, 1))
        scale(calc(var(--assistant-pet-scale) * var(--assistant-pet-walk-squash-x) * var(--assistant-pet-side-scale-x)), calc(var(--assistant-pet-scale) * var(--assistant-pet-walk-squash-y)));
    transition: transform .18s var(--ease, ease), margin-top .18s var(--ease, ease), margin-left .18s var(--ease, ease);
    pointer-events: none;
}

.assistant-pet[data-facing="left"] .assistant-pet__sprite-visual {
    --assistant-pet-facing-abs: -1;
}

.assistant-pet[data-pose="side-left"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose="side-right"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="turn-left"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="turn-right"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="walk-left"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="walk-right"] .assistant-pet__sprite-visual {
    --assistant-pet-facing-scale: 1 !important;
}

.assistant-pet[data-pose="side-left"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose="side-right"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="turn-left"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="turn-right"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="walk-left"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="walk-right"] .assistant-pet__sprite-visual {
    --assistant-pet-side-scale-x: 1.015;
}

.assistant-pet[data-pose="side-left"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="turn-left"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="walk-left"] .assistant-pet__sprite-visual {
    --assistant-pet-side-shift-x: -2px;
}

.assistant-pet[data-pose="side-right"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="turn-right"] .assistant-pet__sprite-visual,
.assistant-pet[data-pose^="walk-right"] .assistant-pet__sprite-visual {
    --assistant-pet-side-shift-x: 2px;
}

.assistant-pet[data-state="idle"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: 1px;
    --assistant-pet-rotate: .4deg;
}

.assistant-pet[data-state="hover"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -3px;
    --assistant-pet-rotate: -1deg;
    --assistant-pet-scale: 1.05;
}

.assistant-pet[data-state="thinking"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -2px;
    --assistant-pet-rotate: 1.5deg;
}

.assistant-pet[data-state="speaking"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -2px;
    --assistant-pet-scale: 1.02;
}

.assistant-pet[data-state="attention"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -4px;
    --assistant-pet-rotate: -.8deg;
    --assistant-pet-scale: 1.02;
}

.assistant-pet[data-state="guard"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -4px;
    --assistant-pet-rotate: 0deg;
    --assistant-pet-scale: 1.075;
    --assistant-pet-side-scale-x: 1.055;
    --assistant-pet-guard-step-x: 0px;
    animation: assistantPetGuardWatch 1.05s ease-in-out infinite;
}

.assistant-pet[data-state="guard"][data-pose="side-left"] .assistant-pet__sprite-visual {
    --assistant-pet-side-shift-x: -4px;
}

.assistant-pet[data-state="guard"][data-pose="side-right"] .assistant-pet__sprite-visual {
    --assistant-pet-side-shift-x: 4px;
}

.assistant-pet[data-state="guard"] .assistant-pet__sprite-img {
    filter: saturate(1.1) brightness(1.04);
}

.assistant-pet[data-state="guard"] .assistant-pet__shadow {
    animation: assistantPetGuardShadow 1.05s ease-in-out infinite;
}

.assistant-pet[data-state="guard"] .assistant-pet__screen-pulse {
    opacity: .5;
    animation-duration: .82s;
}

.assistant-pet[data-state="guard"] .assistant-pet__glow {
    opacity: .94;
    filter: blur(11px) saturate(1.28);
    animation: assistantPetGuardGlow 1.08s ease-in-out infinite;
}

.assistant-pet[data-state="guard"].is-guard-checking .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -5px;
    --assistant-pet-rotate: 4deg;
    --assistant-pet-scale: 1.095;
    --assistant-pet-side-scale-x: 1.085;
    animation: assistantPetGuardCheck .64s ease-in-out 1;
}

.assistant-pet[data-state="guard"][data-facing="left"].is-guard-checking .assistant-pet__sprite-visual {
    --assistant-pet-rotate: -4deg;
}

.assistant-pet[data-state="guard"][data-guard-step="1"] .assistant-pet__sprite-visual {
    --assistant-pet-guard-step-x: -4px;
}

.assistant-pet[data-state="guard"][data-guard-step="2"] .assistant-pet__sprite-visual {
    --assistant-pet-guard-step-x: 4px;
}

.assistant-pet[data-state="guard"][data-guard-step="3"] .assistant-pet__sprite-visual {
    --assistant-pet-guard-step-x: 0px;
}

.assistant-pet[data-state="success"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -6px;
    --assistant-pet-scale: 1.08;
}

.assistant-pet[data-state="error"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -1px;
    --assistant-pet-rotate: -2deg;
}

.assistant-pet[data-state="sleep"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: 6px;
    --assistant-pet-rotate: -1deg;
    --assistant-pet-scale: .94;
}

.assistant-pet[data-state="tap"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -8px;
    --assistant-pet-scale: 1.06;
}

.assistant-pet.is-walking .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -3px;
    --assistant-pet-scale: 1.06;
    --assistant-pet-walk-squash-x: 1;
    --assistant-pet-walk-squash-y: 1;
    --assistant-pet-walk-step-x: 0px;
    transition: transform .12s var(--ease, ease), margin-top .12s var(--ease, ease);
    animation: assistantPetWalkStep .44s steps(4, end) infinite;
}

.assistant-pet.is-walking[data-pose="side-left"] .assistant-pet__sprite-visual,
.assistant-pet.is-walking[data-pose="side-right"] .assistant-pet__sprite-visual,
.assistant-pet.is-walking[data-pose^="turn-left"] .assistant-pet__sprite-visual,
.assistant-pet.is-walking[data-pose^="turn-right"] .assistant-pet__sprite-visual,
.assistant-pet.is-walking[data-pose^="walk-left"] .assistant-pet__sprite-visual,
.assistant-pet.is-walking[data-pose^="walk-right"] .assistant-pet__sprite-visual {
    --assistant-pet-side-scale-x: 1.03;
}

.assistant-pet.is-auth-walking .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -5px;
    --assistant-pet-scale: 1.055;
    animation-duration: .48s;
}

.assistant-pet.is-walking[data-walk-pitch="up"] .assistant-pet__sprite-visual {
    margin-top: -2px;
}

.assistant-pet.is-walking[data-walk-pitch="down"] .assistant-pet__sprite-visual {
    margin-top: 2px;
}

.assistant-pet.is-walking[data-walk-frame="1"] .assistant-pet__sprite-visual {
    --assistant-pet-rotate: -2.2deg;
    --assistant-pet-walk-step-x: -1px;
    --assistant-pet-walk-squash-x: 1.025;
    --assistant-pet-walk-squash-y: .982;
}

.assistant-pet.is-walking[data-walk-frame="2"] .assistant-pet__sprite-visual {
    --assistant-pet-rotate: .8deg;
    --assistant-pet-walk-step-x: 1px;
    --assistant-pet-walk-squash-x: .992;
    --assistant-pet-walk-squash-y: 1.018;
}

.assistant-pet.is-walking[data-walk-frame="3"] .assistant-pet__sprite-visual {
    --assistant-pet-rotate: 2.2deg;
    --assistant-pet-walk-step-x: 1px;
    --assistant-pet-walk-squash-x: 1.025;
    --assistant-pet-walk-squash-y: .982;
}

.assistant-pet.is-walking[data-walk-frame="4"] .assistant-pet__sprite-visual {
    --assistant-pet-rotate: -.8deg;
    --assistant-pet-walk-step-x: -1px;
    --assistant-pet-walk-squash-x: .992;
    --assistant-pet-walk-squash-y: 1.018;
}

.assistant-pet.is-auth-walking[data-walk-facing="left"] .assistant-pet__sprite-visual {
    --assistant-pet-rotate: -1.4deg;
}

.assistant-pet.is-auth-walking[data-walk-facing="right"] .assistant-pet__sprite-visual {
    --assistant-pet-rotate: 1.4deg;
}

.assistant-pet.is-walking .assistant-pet__shadow {
    animation: assistantPetWalkShadow .44s steps(4, end) infinite;
}

.assistant-pet.is-auth-walking .assistant-pet__shadow {
    animation-duration: .48s;
}

.assistant-pet.is-side-turning .assistant-pet__sprite-visual,
.assistant-pet.is-auth-turning .assistant-pet__sprite-visual {
    animation: assistantPetSideTurn .24s ease-out 1, assistantPetWalkStep .48s steps(4, end) infinite;
}

.assistant-pet.is-auth-turning .assistant-pet__sprite-visual {
    animation-duration: .18s, .48s;
}

.assistant-pet[data-state="drag"][data-facing="left"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -3px;
    --assistant-pet-rotate: -2deg;
}

.assistant-pet[data-state="drag"][data-facing="right"],
.assistant-pet[data-state="drag"][data-facing="center"] {
    --assistant-pet-facing-scale: 1;
}

.assistant-pet[data-state="drag"][data-facing="right"] .assistant-pet__sprite-visual,
.assistant-pet[data-state="drag"][data-facing="center"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -3px;
    --assistant-pet-rotate: 2deg;
}

.assistant-pet[data-motion="blink"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: 0px;
}

.assistant-pet[data-motion="nudge"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -4px;
    --assistant-pet-scale: 1.02;
}

.assistant-pet[data-motion="tap"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -8px;
    --assistant-pet-scale: 1.06;
}

.assistant-pet[data-motion="celebrate"] .assistant-pet__sprite-visual {
    --assistant-pet-translate-y: -8px;
    --assistant-pet-scale: 1.1;
}

.assistant-pet[data-motion="warn"] .assistant-pet__sprite-visual {
    --assistant-pet-rotate: -3deg;
}

.assistant-pet[data-motion="walk"] .assistant-pet__screen-pulse {
    opacity: .28;
    animation-duration: .62s;
}

.assistant-pet[data-motion="walk"] .assistant-pet__screen-pulse--tablet {
    opacity: 0;
}

.assistant-pet[data-motion="walk"] .assistant-pet__glow {
    opacity: .86;
    filter: blur(12px) saturate(1.18);
}

.assistant-pet__sprite-img {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transform: translateZ(0);
    pointer-events: none;
    transition: filter .18s var(--ease, ease), transform .18s var(--ease, ease);
}

.assistant-pet__glow,
.assistant-pet__screen-pulse,
.assistant-pet__bubble,
.assistant-pet__spark,
.assistant-pet__shadow {
    position: absolute;
    pointer-events: none;
}

.assistant-pet__glow {
    z-index: 1;
    left: 20%;
    top: 18%;
    width: 62%;
    height: 70%;
    border-radius: 44% 54% 48% 54%;
    background:
        radial-gradient(circle at 34% 26%, rgba(107, 156, 255, .46), transparent 32%),
        radial-gradient(circle at 68% 64%, rgba(25, 71, 214, .32), transparent 42%);
    filter: blur(10px);
    opacity: .72;
}

.assistant-pet__screen-pulse {
    z-index: 3;
    border-radius: 4px;
    opacity: .22;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(112, 240, 255, .92), transparent),
        linear-gradient(180deg, rgba(114, 240, 255, .24), transparent);
    mix-blend-mode: screen;
    animation: assistantPetScreenSweep 2.9s ease-in-out infinite;
}

.assistant-pet__screen-pulse--face {
    left: 47%;
    top: 42%;
    width: 29%;
    height: 22%;
}

.assistant-pet__screen-pulse--tablet {
    left: 60%;
    top: 67%;
    width: 23%;
    height: 15%;
    transform: rotate(5deg);
    animation-delay: .42s;
}

.assistant-pet__bubble {
    z-index: 5;
    right: -21px;
    top: -18px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(105, 150, 204, .35);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(231, 245, 255, .96), rgba(204, 232, 255, .96)),
        #d7edff;
    color: #24436f;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    pointer-events: auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        0 5px 12px rgba(31, 63, 110, .14);
    transition:
        background .18s var(--ease, ease),
        color .18s var(--ease, ease),
        transform .18s var(--ease, ease),
        box-shadow .18s var(--ease, ease);
}

.assistant-pet__spark {
    z-index: 4;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: #72f0ff;
    box-shadow: 0 0 10px rgba(114, 240, 255, .55);
    opacity: 0;
}

.assistant-pet__spark--a {
    left: 20%;
    top: 30%;
}

.assistant-pet__spark--b {
    right: 16%;
    top: 47%;
}

.assistant-pet__spark--c {
    left: 40%;
    bottom: 14%;
}

.assistant-pet__shadow {
    z-index: 0;
    left: 50%;
    bottom: 6px;
    width: 58%;
    height: 10px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(73, 98, 160, .08);
    filter: blur(2px);
}

.assistant-pet__status {
    position: absolute;
    left: 50%;
    bottom: -7px;
    z-index: 7;
    transform: translateX(-50%) translateY(8px);
    max-width: min(150px, calc(100vw - 32px));
    min-height: 22px;
    padding: 4px 8px;
    border: 1px solid rgba(196, 216, 244, .75);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: #466082;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 8px 22px rgba(24, 45, 92, .12);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s var(--ease, ease), transform .18s var(--ease, ease);
}

.assistant-pet__status span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-pet__speech {
    position: absolute;
    right: 28px;
    bottom: calc(100% + 8px);
    z-index: 10;
    width: max-content;
    max-width: min(236px, calc(100vw - 32px));
    padding: 8px 11px;
    border: 1px solid rgba(226, 232, 240, .98);
    border-radius: 12px;
    background: rgba(255, 255, 255, .98);
    color: #172033;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.28;
    letter-spacing: 0;
    pointer-events: none;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .05),
        0 10px 22px rgba(15, 23, 42, .1);
    transform: translateY(4px) scale(.97);
    transform-origin: 100% 100%;
    opacity: 0;
    animation: assistantPetSpeechIn .2s var(--ease, ease) forwards;
}

.assistant-pet__speech::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: -5px;
    width: 10px;
    height: 10px;
    border-right: 1px solid rgba(226, 232, 240, .98);
    border-bottom: 1px solid rgba(226, 232, 240, .98);
    background: inherit;
    transform: rotate(45deg);
}

.assistant-pet__speech span {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.assistant-pet__speech[hidden] {
    display: none !important;
}

.assistant-pet[data-speech-align="right"] .assistant-pet__speech {
    right: auto;
    left: 28px;
    transform-origin: 0 100%;
}

.assistant-pet[data-speech-align="right"] .assistant-pet__speech::after {
    right: auto;
    left: 18px;
}

.assistant-pet[data-speech-vertical="below"] .assistant-pet__speech {
    top: calc(100% + 8px);
    bottom: auto;
    transform-origin: 100% 0;
}

.assistant-pet[data-speech-vertical="below"] .assistant-pet__speech::after {
    top: -5px;
    bottom: auto;
    transform: rotate(225deg);
}

.assistant-pet[data-speech-align="right"][data-speech-vertical="below"] .assistant-pet__speech {
    transform-origin: 0 0;
}

.assistant-pet__speech[data-tone="info"] {
    color: #24436f;
}

.assistant-pet__speech[data-tone="warn"] {
    color: #9a3412;
    border-color: rgba(253, 186, 116, .9);
    background: rgba(255, 251, 235, .98);
}

.assistant-pet__speech[data-tone="success"] {
    color: #116932;
    border-color: rgba(134, 239, 172, .9);
    background: rgba(240, 253, 244, .98);
}

.assistant-pet__speech[data-tone="error"] {
    color: #b42318;
    border-color: rgba(254, 202, 202, .95);
    background: rgba(255, 241, 242, .98);
}

.assistant-pet__task-card {
    position: absolute;
    right: 38px;
    bottom: calc(100% + 8px);
    z-index: 9;
    width: min(262px, calc(100vw - 32px));
    min-height: 42px;
    padding: 7px 36px 7px 13px;
    border: 1px solid rgba(226, 232, 240, .98);
    border-radius: 12px;
    background: rgba(255, 255, 255, .98);
    color: #172033;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 8px 18px rgba(15, 23, 42, .07);
    pointer-events: auto;
    cursor: default;
    transform: translateY(0) scale(1);
    transform-origin: 100% 100%;
    --assistant-pet-task-progress: 34%;
    animation: assistantPetTaskIn .2s var(--ease, ease);
}

.assistant-pet__task-card,
.assistant-pet__task-card * {
    box-sizing: border-box;
}

.assistant-pet__task-card[hidden] {
    display: none !important;
}

.assistant-pet[data-task-align="right"] .assistant-pet__task-card {
    right: auto;
    left: 38px;
    transform-origin: 0 100%;
}

.assistant-pet[data-task-vertical="below"] .assistant-pet__task-card {
    top: calc(100% + 8px);
    bottom: auto;
    transform-origin: 100% 0;
}

.assistant-pet[data-task-align="right"][data-task-vertical="below"] .assistant-pet__task-card {
    transform-origin: 0 0;
}

.assistant-pet__task-main {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.assistant-pet__task-title {
    order: 1;
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #111111;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-pet__task-description {
    order: 3;
    display: -webkit-box;
    margin: 1px 0 0;
    max-height: 30px;
    overflow: hidden;
    color: #5d6678;
    font-size: 11px;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.assistant-pet__task-description:empty {
    display: none;
}

.assistant-pet__task-progress {
    order: 2;
    display: block;
}

.assistant-pet__task-progress-text {
    overflow: hidden;
    color: #4a5567;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-pet__task-progress-track {
    position: absolute;
    right: 12px;
    top: 11px;
    display: block;
    width: 12px;
    height: 12px;
    overflow: visible;
    border-radius: 999px;
    background:
        conic-gradient(#111827 var(--assistant-pet-task-progress, 34%), transparent 0),
        #eef1f5;
}

.assistant-pet__task-progress-track span {
    position: absolute;
    inset: 2px;
    display: block;
    width: auto !important;
    height: auto;
    border-radius: inherit;
    background: #fff;
    transition: none;
}

.assistant-pet__task-card[data-attention-type="status"] .assistant-pet__task-progress-track span {
    background: #fff;
}

.assistant-pet__task-clock {
    display: none;
}

.assistant-pet__resize-handle {
    position: absolute;
    right: -28px;
    bottom: 9px;
    z-index: 12;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(37, 87, 166, .78);
    cursor: nwse-resize;
    opacity: 0;
    pointer-events: auto;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, .88),
        0 4px 10px rgba(34, 80, 150, .2);
    transform: translate(4px, 4px) scale(.88);
    transition: opacity .16s var(--ease, ease), transform .16s var(--ease, ease), color .16s var(--ease, ease);
}

.assistant-pet__resize-handle::before {
    content: "\2921";
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.assistant-pet:hover .assistant-pet__resize-handle,
.assistant-pet:focus-visible .assistant-pet__resize-handle,
.assistant-pet.is-resizing .assistant-pet__resize-handle {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.assistant-pet__resize-handle:hover,
.assistant-pet.is-resizing .assistant-pet__resize-handle {
    color: #1f4fa3;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, .95),
        0 5px 12px rgba(34, 80, 150, .28);
}

.assistant-pet__context-menu {
    position: absolute;
    right: 10px;
    bottom: calc(100% - 16px);
    z-index: 14;
    display: grid;
    gap: 6px;
    width: 118px;
    padding: 7px;
    border: 1px solid rgba(218, 226, 237, .98);
    border-radius: 10px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
    cursor: default;
    pointer-events: auto;
    animation: assistantPetTaskIn .16s var(--ease, ease);
}

.assistant-pet__context-menu[hidden] {
    display: none !important;
}

.assistant-pet__context-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #26344d;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.assistant-pet__context-menu button::after {
    color: #8a98ad;
    font-size: 13px;
    font-weight: 900;
}

.assistant-pet__context-chat::after {
    content: "\203A";
}

.assistant-pet__context-close::after {
    content: "\00D7";
}

.assistant-pet__context-menu button:hover,
.assistant-pet__context-menu button:focus-visible {
    border-color: rgba(196, 216, 244, .9);
    background: #f6f9ff;
    color: #1f4fa3;
    outline: none;
}

.assistant-pet__context-close:hover,
.assistant-pet__context-close:focus-visible {
    border-color: rgba(254, 202, 202, .95) !important;
    background: #fff5f5 !important;
    color: #b42318 !important;
}

.assistant-pet__close-prompt {
    position: absolute;
    right: 12px;
    bottom: calc(100% - 30px);
    z-index: 13;
    width: min(230px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid rgba(218, 226, 237, .98);
    border-radius: 8px;
    background: rgba(255, 255, 255, .98);
    color: #172033;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
    cursor: default;
    pointer-events: auto;
    animation: assistantPetTaskIn .18s var(--ease, ease);
}

.assistant-pet__close-prompt[hidden] {
    display: none !important;
}

.assistant-pet__close-prompt strong {
    display: block;
    color: #101828;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.assistant-pet__close-prompt p {
    margin: 4px 0 10px;
    color: #5d6678;
    font-size: 12px;
    line-height: 1.4;
}

.assistant-pet__close-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.assistant-pet__close-actions button {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(210, 218, 230, .95);
    border-radius: 999px;
    background: #f8fafc;
    color: #344054;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.assistant-pet__close-actions .assistant-pet__close-confirm {
    border-color: rgba(220, 53, 69, .42);
    background: linear-gradient(180deg, #fff3f2, #ffdedd);
    color: #b42318;
}

.assistant-pet:hover .assistant-pet__status,
.assistant-pet[data-state="thinking"] .assistant-pet__status,
.assistant-pet[data-state="speaking"] .assistant-pet__status,
.assistant-pet[data-state="drag"] .assistant-pet__status,
.assistant-pet[data-state="attention"] .assistant-pet__status,
.assistant-pet[data-state="error"] .assistant-pet__status,
.assistant-pet[data-state="success"] .assistant-pet__status {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.assistant-pet.has-close-prompt .assistant-pet__status,
.assistant-pet.has-speech .assistant-pet__status,
.assistant-pet.has-task-card-open .assistant-pet__status,
.assistant-pet.has-context-menu .assistant-pet__status,
.assistant-pet.has-close-prompt:hover .assistant-pet__status {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
}

.assistant-pet-help {
    position: fixed;
    z-index: calc(var(--z-popover, 1600) + 18);
    width: min(360px, calc(100vw - 24px));
    height: min(520px, calc(100vh - 24px));
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .98);
    border-radius: 14px;
    background: rgba(255, 255, 255, .985);
    color: #182033;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .05),
        0 18px 48px rgba(15, 23, 42, .16);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(.98);
    transform-origin: 100% 100%;
    transition: opacity .18s var(--ease, ease), transform .18s var(--ease, ease);
}

.assistant-pet-help.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.assistant-pet-help[hidden] {
    display: none !important;
}

.assistant-pet-help__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px 10px;
    border-bottom: 1px solid rgba(226, 232, 240, .82);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.assistant-pet-help__title {
    min-width: 0;
}

.assistant-pet-help__title strong {
    display: block;
    overflow: hidden;
    color: #101828;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-pet-help__title span {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-pet-help__close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(218, 226, 237, .96);
    border-radius: 999px;
    background: #fff;
    color: #667085;
    cursor: pointer;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.assistant-pet-help__close:hover,
.assistant-pet-help__close:focus-visible {
    border-color: rgba(196, 216, 244, .96);
    color: #1f4fa3;
    outline: none;
}

.assistant-pet-help__messages {
    min-height: 0;
    padding: 12px;
    overflow: auto;
    background: #fbfcfe;
}

.assistant-pet-help__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 10px 10px;
    border-top: 1px solid rgba(226, 232, 240, .78);
    background: linear-gradient(180deg, rgba(251, 252, 254, .98), rgba(255, 255, 255, .98));
}

.assistant-pet-help__quick-btn {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(214, 223, 236, .95);
    border-radius: 999px;
    background: #fff;
    color: #475467;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.assistant-pet-help__quick-btn:hover,
.assistant-pet-help__quick-btn:focus-visible {
    border-color: rgba(122, 162, 236, .6);
    background: #f7fbff;
    color: #1f4fa3;
    outline: none;
}

.assistant-pet-help__msg {
    max-width: 92%;
    margin: 0 0 9px;
    padding: 8px 10px;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font-size: 12px;
    line-height: 1.45;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
    white-space: pre-wrap;
    word-break: break-word;
}

.assistant-pet-help__msg-body {
    display: block;
}

.assistant-pet-help__msg-text {
    min-width: 0;
}

.assistant-pet-help__msg.is-loading {
    border-color: rgba(122, 162, 236, .48);
    background:
        linear-gradient(90deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, .98) 54%, rgba(239, 246, 255, .92));
    background-size: 180% 100%;
    animation: assistantPetHelpLoadingCard 1.7s ease-in-out infinite;
}

.assistant-pet-help__msg.is-loading .assistant-pet-help__msg-body {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.assistant-pet-help__thinking {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 22px;
    height: 18px;
    margin-top: 1px;
}

.assistant-pet-help__thinking span {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #55d9ff;
    box-shadow: 0 0 8px rgba(85, 217, 255, .42);
    animation: assistantPetHelpThinkingDot .86s ease-in-out infinite;
}

.assistant-pet-help__thinking span:nth-child(2) {
    animation-delay: .12s;
}

.assistant-pet-help__thinking span:nth-child(3) {
    animation-delay: .24s;
}

.assistant-pet-help__msg.is-loading .assistant-pet-help__msg-text::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 1.1em;
    margin-left: 2px;
    vertical-align: -2px;
    border-radius: 999px;
    background: rgba(85, 217, 255, .55);
    animation: assistantPetHelpCaret .88s ease-in-out infinite;
}

.assistant-pet-help__msg strong {
    font-weight: 850;
}

.assistant-pet-help__msg code {
    padding: 1px 4px;
    border-radius: 5px;
    background: #f1f5f9;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .92em;
}

.assistant-pet-help__msg a {
    display: inline;
    color: #1f4fa3;
    font-weight: 800;
    line-height: 1.5;
    text-decoration: underline;
    text-decoration-color: rgba(31, 79, 163, .28);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.assistant-pet-help__msg a:hover,
.assistant-pet-help__msg a:focus-visible {
    color: #163b7c;
    text-decoration-color: rgba(31, 79, 163, .72);
    outline: none;
}

.assistant-pet-help__msg--user {
    margin-left: auto;
    border-color: rgba(122, 162, 236, .58);
    background: #eef5ff;
    color: #14305c;
}

.assistant-pet-help__msg--system {
    max-width: 100%;
    margin-right: auto;
    border-color: rgba(253, 186, 116, .85);
    background: #fffaf0;
    color: #8a4b14;
    box-shadow: none;
}

.assistant-pet-help__msg--error {
    border-color: rgba(254, 202, 202, .95);
    background: #fff5f5;
    color: #b42318;
}

.assistant-pet-help__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.assistant-pet-help__action {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(122, 162, 236, .5);
    border-radius: 999px;
    background: #f7fbff;
    color: #1f4fa3;
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
}

.assistant-pet-help__action:hover,
.assistant-pet-help__action:focus-visible {
    background: #edf5ff;
    outline: none;
}

.assistant-pet-help__form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid rgba(226, 232, 240, .82);
    background: #fff;
}

.assistant-pet-help__input {
    width: 100%;
    min-height: 38px;
    max-height: 96px;
    resize: none;
    padding: 9px 10px;
    border: 1px solid rgba(210, 218, 230, .95);
    border-radius: 10px;
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
    outline: none;
}

.assistant-pet-help__input:focus {
    border-color: rgba(82, 128, 210, .7);
    box-shadow: 0 0 0 3px rgba(82, 128, 210, .12);
}

.assistant-pet-help__send {
    align-self: end;
    min-width: 62px;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
}

.assistant-pet-help__send:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.assistant-pet[data-state="idle"] .assistant-pet__sprite {
    animation: assistantPetTyping 1.15s steps(2, end) infinite;
}

.assistant-pet[data-motion="blink"] .assistant-pet__screen-pulse--face {
    opacity: .08;
    transform: scaleY(.32);
}

.assistant-pet[data-state="idle"] .assistant-pet__screen-pulse--tablet {
    opacity: .46;
    animation-duration: .82s;
}

.assistant-pet[data-state="hover"] .assistant-pet__sprite-img {
    filter: saturate(1.12) brightness(1.04);
}

.assistant-pet[data-state="hover"] .assistant-pet__bubble {
    transform: translateY(-3px) scale(1.05);
}

.assistant-pet[data-state="hover"] .assistant-pet__screen-pulse {
    opacity: .38;
    animation-duration: 1.45s;
}

.assistant-pet[data-state="drag"] .assistant-pet__sprite-img {
    transform: scale(1.04);
}

.assistant-pet[data-state="attention"] .assistant-pet__fallback {
    animation: assistantPetAsk 1.7s ease-in-out infinite;
}

.assistant-pet[data-state="attention"] .assistant-pet__sprite-img {
    filter: saturate(1.16) brightness(1.05);
}

.assistant-pet[data-state="attention"] .assistant-pet__screen-pulse {
    opacity: .48;
    animation-duration: 1.05s;
}

.assistant-pet[data-state="attention"] .assistant-pet__glow {
    opacity: .9;
    filter: blur(12px) saturate(1.25);
}

.assistant-pet[data-state="drag"][data-drag-pitch="up"] .assistant-pet__sprite-visual {
    margin-top: -3px;
}

.assistant-pet[data-state="drag"][data-drag-pitch="down"] .assistant-pet__sprite-visual {
    margin-top: 3px;
}

.assistant-pet[data-state="thinking"] .assistant-pet__glow {
    opacity: .95;
    filter: blur(12px) saturate(1.3);
}

.assistant-pet[data-state="thinking"] .assistant-pet__bubble {
    animation: assistantPetBubblePulse .82s ease-in-out infinite;
}

.assistant-pet[data-state="thinking"] .assistant-pet__spark {
    animation: assistantPetSpark .8s ease-in-out infinite;
}

.assistant-pet[data-state="thinking"] .assistant-pet__spark--b {
    animation-delay: .12s;
}

.assistant-pet[data-state="thinking"] .assistant-pet__spark--c {
    animation-delay: .24s;
}

.assistant-pet[data-state="speaking"] .assistant-pet__screen-pulse {
    opacity: .56;
    animation-duration: .72s;
}

.assistant-pet[data-state="speaking"] .assistant-pet__bubble {
    transform: translateY(-2px) scale(1.03);
}

.assistant-pet[data-state="success"] .assistant-pet__bubble {
    transform: translateY(-4px) scale(1.08);
}

.assistant-pet[data-state="success"] .assistant-pet__screen-pulse,
.assistant-pet[data-state="success"] .assistant-pet__spark {
    background: #75ff9f;
    box-shadow: 0 0 10px rgba(52, 199, 89, .65);
}

.assistant-pet[data-state="error"] .assistant-pet__bubble {
    transform: translateX(1px) scale(1.04);
}

.assistant-pet[data-state="error"] .assistant-pet__screen-pulse,
.assistant-pet[data-state="error"] .assistant-pet__spark {
    background: #ff7b72;
    box-shadow: 0 0 10px rgba(255, 59, 48, .6);
}

.assistant-pet[data-state="sleep"] {
    filter: saturate(.72) opacity(.78);
}

.assistant-pet[data-state="sleep"] .assistant-pet__fallback {
    transform: translateY(12px) scale(.92);
}

.assistant-pet[data-state="sleep"] .assistant-pet__screen-pulse,
.assistant-pet[data-state="sleep"] .assistant-pet__spark {
    opacity: 0;
    animation: none;
}

.assistant-pet[data-state="sleep"] .assistant-pet__bubble {
    transform: translateY(5px) scale(.88);
    opacity: .72;
}

.assistant-pet[data-bubble-tone="conversation"] .assistant-pet__bubble {
    background:
        linear-gradient(180deg, rgba(231, 245, 255, .96), rgba(204, 232, 255, .96)),
        #d7edff;
    color: #24436f;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        0 6px 14px rgba(31, 63, 110, .16);
}

.assistant-pet[data-bubble-tone="thinking"] .assistant-pet__bubble {
    background: linear-gradient(180deg, #f0f7ff, #cce9ff);
    color: #1d54a6;
    animation: assistantPetBubblePulse .82s ease-in-out infinite;
}

.assistant-pet[data-bubble-tone="speaking"] .assistant-pet__bubble {
    background: linear-gradient(180deg, #e4fbff, #bceeff);
    color: #0c5d9f;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        0 6px 16px rgba(56, 189, 248, .24);
}

.assistant-pet[data-bubble-tone="attention"] .assistant-pet__bubble {
    border-color: rgba(210, 67, 10, .55);
    background: linear-gradient(180deg, #ff7a22, #e84a0b);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .34),
        0 0 0 4px rgba(232, 74, 11, .14),
        0 10px 20px rgba(232, 74, 11, .24);
    animation: assistantPetAttentionPulse 1.05s ease-in-out infinite;
}

.assistant-pet[data-bubble-tone="success"] .assistant-pet__bubble {
    background: linear-gradient(180deg, #ecfff2, #b9f7c9);
    color: #147a38;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .86),
        0 0 0 3px rgba(52, 199, 89, .16),
        0 8px 18px rgba(52, 199, 89, .28);
}

.assistant-pet[data-bubble-tone="error"] .assistant-pet__bubble {
    background: linear-gradient(180deg, #fff2f1, #ffd5d2);
    color: #b42318;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        0 0 0 3px rgba(255, 59, 48, .13),
        0 8px 18px rgba(255, 59, 48, .2);
}

.assistant-pet[data-bubble-tone="drag"] .assistant-pet__bubble {
    background: linear-gradient(180deg, #f7f3ff, #ded3ff);
    color: #4a2e91;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .82),
        0 6px 16px rgba(88, 86, 214, .22);
}

.assistant-pet[data-bubble-tone="sleep"] .assistant-pet__bubble {
    background: linear-gradient(180deg, #eef2f7, #d9e2ee);
    color: #5b6472;
}

.assistant-pet.has-task-card-open .assistant-pet__bubble {
    min-width: 19px;
    width: 19px;
    height: 19px;
    padding: 0;
    border-color: rgba(190, 202, 219, .8);
    background: rgba(255, 255, 255, .96);
    color: #475467;
    font-size: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 6px 14px rgba(15, 23, 42, .14);
    transform: none;
    animation: none;
}

@keyframes assistantPetScreenSweep {
    0%, 100% { transform: translateX(-10px) scaleX(.58); opacity: .12; }
    45% { transform: translateX(8px) scaleX(1); opacity: .42; }
}

@keyframes assistantPetFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-7px) rotate(-1deg); }
}

@keyframes assistantPetTyping {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(2px) rotate(.6deg); }
}

@keyframes assistantPetStandUp {
    0% { transform: translateY(9px) scale(.94); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes assistantPetDrag {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-4px); }
}

@keyframes assistantPetHelpLoadingCard {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes assistantPetHelpThinkingDot {
    0%, 80%, 100% {
        transform: translateY(0) scale(.78);
        opacity: .48;
    }
    35% {
        transform: translateY(-4px) scale(1);
        opacity: 1;
    }
}

@keyframes assistantPetHelpCaret {
    0%, 100% {
        opacity: .18;
        transform: scaleY(.58);
    }
    50% {
        opacity: .72;
        transform: scaleY(1);
    }
}

@keyframes assistantPetWalkStep {
    0% {
        transform:
            translateX(-1px)
            translateY(var(--assistant-pet-translate-y))
            rotate(-2.2deg)
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(calc(var(--assistant-pet-scale) * 1.025), calc(var(--assistant-pet-scale) * .982));
    }
    25% {
        transform:
            translateX(1px)
            translateY(calc(var(--assistant-pet-translate-y) - 5px))
            rotate(.8deg)
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(calc(var(--assistant-pet-scale) * .992), calc(var(--assistant-pet-scale) * 1.018));
    }
    50% {
        transform:
            translateX(1px)
            translateY(calc(var(--assistant-pet-translate-y) - 1px))
            rotate(2.2deg)
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(calc(var(--assistant-pet-scale) * 1.025), calc(var(--assistant-pet-scale) * .982));
    }
    75% {
        transform:
            translateX(-1px)
            translateY(calc(var(--assistant-pet-translate-y) - 5px))
            rotate(-.8deg)
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(calc(var(--assistant-pet-scale) * .992), calc(var(--assistant-pet-scale) * 1.018));
    }
    100% {
        transform:
            translateX(-1px)
            translateY(var(--assistant-pet-translate-y))
            rotate(-2.2deg)
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(calc(var(--assistant-pet-scale) * 1.025), calc(var(--assistant-pet-scale) * .982));
    }
}

@keyframes assistantPetGuardWatch {
    0%, 100% {
        margin-top: 0;
        margin-left: 0;
        --assistant-pet-guard-step-x: 0px;
        filter: drop-shadow(0 4px 0 rgba(29, 78, 216, .18));
    }
    24% {
        margin-top: -2px;
        margin-left: -2px;
        --assistant-pet-guard-step-x: -2px;
    }
    50% {
        margin-top: -4px;
        margin-left: 2px;
        --assistant-pet-guard-step-x: 2px;
        filter: drop-shadow(0 5px 0 rgba(29, 78, 216, .22));
    }
    76% {
        margin-top: 1px;
        margin-left: 1px;
        --assistant-pet-guard-step-x: 1px;
    }
}

@keyframes assistantPetGuardCheck {
    0%, 100% {
        margin-top: 0;
        margin-left: 0;
        --assistant-pet-guard-step-x: 0px;
    }
    25% {
        margin-top: -5px;
        margin-left: 4px;
        --assistant-pet-guard-step-x: 4px;
    }
    55% {
        margin-top: -2px;
        margin-left: -4px;
        --assistant-pet-guard-step-x: -4px;
    }
    78% {
        margin-top: -1px;
        margin-left: 2px;
        --assistant-pet-guard-step-x: 2px;
    }
}

@keyframes assistantPetGuardShadow {
    0%, 100% {
        transform: translateX(-50%) scaleX(.92);
        opacity: .46;
    }
    50% {
        transform: translateX(-50%) scaleX(.78);
        opacity: .34;
    }
}

@keyframes assistantPetGuardGlow {
    0%, 100% {
        opacity: .78;
        transform: scale(.96);
    }
    50% {
        opacity: .98;
        transform: scale(1.04);
    }
}

@keyframes assistantPetWalkShadow {
    0%, 50%, 100% {
        transform: translateX(-50%) scaleX(1.08);
        opacity: .92;
    }
    25%, 75% {
        transform: translateX(-50%) scaleX(.86);
        opacity: .62;
    }
}

@keyframes assistantPetSideTurn {
    0% {
        filter: saturate(1.05);
        transform:
            translateX(0)
            translateY(1px)
            rotate(calc(var(--assistant-pet-facing-scale, 1) * -5.2deg))
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(calc(var(--assistant-pet-scale) * 1.04), calc(var(--assistant-pet-scale) * .95));
    }
    44% {
        filter: saturate(1.16) brightness(1.03);
        transform:
            translateX(calc(var(--assistant-pet-facing-scale, 1) * 4px))
            translateY(-4px)
            rotate(calc(var(--assistant-pet-facing-scale, 1) * 1.2deg))
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(calc(var(--assistant-pet-scale) * 1.02), calc(var(--assistant-pet-scale) * 1.01));
    }
    72% {
        filter: saturate(1.12) brightness(1.02);
        transform:
            translateX(calc(var(--assistant-pet-facing-scale, 1) * 2px))
            translateY(-3px)
            rotate(calc(var(--assistant-pet-facing-scale, 1) * 3.2deg))
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(calc(var(--assistant-pet-scale) * 1.035), calc(var(--assistant-pet-scale) * .99));
    }
    100% {
        filter: saturate(1.05);
        transform:
            translateX(0)
            translateY(var(--assistant-pet-translate-y))
            rotate(var(--assistant-pet-rotate))
            scaleX(var(--assistant-pet-facing-scale, 1))
            scale(var(--assistant-pet-scale));
    }
}

@keyframes assistantPetLookAround {
    0%, 100% { transform: translateX(-2px) rotate(-2deg); }
    50% { transform: translateX(2px) rotate(2deg); }
}

@keyframes assistantPetThink {
    0%, 100% { transform: translate(0, 0) rotate(-2deg); }
    50% { transform: translate(2px, -3px) rotate(2deg); }
}

@keyframes assistantPetSpeak {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.035); }
}

@keyframes assistantPetPop {
    0% { transform: translateY(0) scale(.92); }
    45% { transform: translateY(-9px) scale(1.1); }
    100% { transform: translateY(0) scale(1); }
}


@keyframes assistantPetShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(-5px) rotate(-3deg); }
    75% { transform: translateX(5px) rotate(3deg); }
}

@keyframes assistantPetBubblePulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.08); }
}

@keyframes assistantPetAttentionPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.09); }
}

@keyframes assistantPetAsk {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    42% { transform: translateY(-3px) rotate(-1deg); }
    70% { transform: translateY(-1px) rotate(.7deg); }
}

@keyframes assistantPetTaskIn {
    0% { opacity: 0; transform: translateY(6px) scale(.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes assistantPetSpark {
    0%, 100% { transform: translate3d(0, 0, 0) scale(.7); opacity: 0; }
    45% { transform: translate3d(3px, -8px, 0) scale(1); opacity: .95; }
}

@keyframes assistantPetSpeechIn {
    0% { opacity: 0; transform: translateY(5px) scale(.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes assistantPetSleep {
    0%, 100% { transform: translateY(4px) rotate(0deg); }
    50% { transform: translateY(8px) rotate(-1deg); }
}

@media (max-width: 720px) {
    .assistant-pet {
        width: 100px;
        height: 116px;
    }

    body.user-ui-page.auth-page.auth21-page .assistant-pet,
    body.user-ui-page.auth-page.auth21-page[data-auth-mode="register"] .assistant-pet,
    body.auth21-page .assistant-pet,
    body.auth21-page[data-auth-mode="login"] .assistant-pet,
    body.auth21-page[data-auth-mode="register"] .assistant-pet,
    body.mirror-auth-page .assistant-pet {
        width: 100px !important;
        height: 116px !important;
    }

    .assistant-pet__sprite {
        width: 96px;
        margin-bottom: 5px;
    }

    .assistant-pet__bubble {
        right: -16px;
        top: -13px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        font-size: 10px;
    }

    .assistant-pet__task-card {
        right: 30px;
        bottom: calc(100% + 8px);
        width: min(260px, calc(100vw - 32px));
        min-height: 42px;
        padding: 7px 34px 7px 12px;
    }

    .assistant-pet__speech {
        right: 24px;
        max-width: min(220px, calc(100vw - 32px));
        padding: 7px 10px;
        font-size: 12px;
    }

    .assistant-pet[data-speech-align="right"] .assistant-pet__speech {
        left: 24px;
    }

    .assistant-pet[data-task-align="right"] .assistant-pet__task-card {
        left: 30px;
    }

    .assistant-pet[data-task-vertical="below"] .assistant-pet__task-card {
        top: calc(100% + 8px);
    }

    .assistant-pet__task-title {
        font-size: 13px;
    }

    .assistant-pet__task-description {
        font-size: 11px;
    }

    .assistant-pet__resize-handle {
        width: 18px;
        height: 18px;
        right: -24px;
        bottom: 7px;
    }

    .assistant-pet__close-prompt {
        right: 8px;
        bottom: calc(100% - 28px);
        width: min(220px, calc(100vw - 28px));
    }

    .assistant-pet__context-menu {
        right: 4px;
        bottom: calc(100% - 18px);
        width: 112px;
    }

    .assistant-pet-help {
        width: calc(100vw - 24px) !important;
        height: min(68vh, 460px) !important;
        border-radius: 12px;
    }

    .assistant-pet-help__head {
        padding: 10px 11px 9px;
    }

    .assistant-pet-help__messages {
        padding: 10px;
    }

    .assistant-pet-help__form {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .assistant-pet-help__send {
        width: 100%;
    }

    .assistant-pet__status {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .assistant-pet[data-respect-reduced-motion="true"],
    .assistant-pet[data-respect-reduced-motion="true"] *,
    .assistant-pet[data-respect-reduced-motion="true"] *::before,
    .assistant-pet[data-respect-reduced-motion="true"] *::after {
        animation: none !important;
        transition: none !important;
    }

    .assistant-pet[data-respect-reduced-motion="true"].is-walking .assistant-pet__sprite-visual,
    .assistant-pet[data-respect-reduced-motion="true"].is-auth-walking .assistant-pet__sprite-visual {
        margin-top: 0 !important;
    }

    .assistant-pet-help__msg.is-loading,
    .assistant-pet-help__msg.is-loading .assistant-pet-help__msg-text::after,
    .assistant-pet-help__thinking span {
        animation: none !important;
    }

    .assistant-pet-help__thinking span {
        opacity: .75;
        transform: none;
    }
}
