/* Shared branding and an unobtrusive, image-based companion. */
.brand-logo,.top-brand img,.auth-logo{object-fit:contain!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.agent-brand-mascot{width:28px;height:28px;object-fit:contain;flex:none}
.mg-boot-mascot{display:block;width:80px;height:80px;object-fit:contain;margin:0 auto 12px;animation:mg-pet-breathe 4.6s ease-in-out infinite}
body.mg-companion-ready .agent-fab{display:none!important}
.mg-companion{--pet-panel:var(--drop-bg,var(--surface,#1d232b));--pet-text:var(--text,#eef0f1);--pet-line:var(--line,rgba(255,255,255,.14));position:fixed;left:calc(100% - 132px);top:calc(100% - 132px);width:112px;height:112px;z-index:19;font-family:inherit;color:var(--pet-text);isolation:isolate}
.mg-companion[hidden],.mg-pet-bubble[hidden],.mg-pet-menu[hidden]{display:none!important}
html[data-mode=light] .mg-companion,html[data-theme=light] .mg-companion{--pet-panel:var(--drop-bg,var(--surface,#fff));--pet-text:var(--text,#222930);--pet-line:var(--line,rgba(30,40,50,.15))}
.mg-pet-body{appearance:none;border:0!important;padding:0!important;margin:0!important;background:transparent!important;box-shadow:none!important;outline-offset:3px;width:100%;height:100%;border-radius:26px;cursor:grab;touch-action:none;transform:none!important;position:relative;user-select:none;-webkit-user-select:none}
.mg-pet-body img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 6px 8px rgba(0,0,0,.16));animation:mg-pet-breathe 4.6s ease-in-out infinite;transform-origin:50% 85%;transition:filter .2s}
.mg-pet-body:hover img{filter:drop-shadow(0 8px 10px rgba(0,0,0,.23))}
.mg-pet-dot{position:absolute;right:12%;bottom:12%;height:8px;width:8px;border-radius:50%;background:#adc78d;border:2px solid var(--pet-panel);box-sizing:content-box}
.mg-companion[data-state=processing] .mg-pet-dot{background:#c0b0dc;animation:mg-pet-pulse 1.8s ease-in-out infinite}
.mg-companion[data-state=awaiting] .mg-pet-dot{background:#dbbc82}.mg-companion[data-state=error] .mg-pet-dot{background:#d59691}
.mg-pet-more{position:absolute;right:0;top:4px;display:grid;place-items:center;min-width:26px;min-height:26px;border:1px solid var(--pet-line);border-radius:50%;padding:0;background:var(--pet-panel);color:var(--pet-text);font-size:17px;line-height:1;opacity:0;transition:opacity .15s;cursor:pointer;box-shadow:0 2px 6px #0001}
.mg-companion:hover .mg-pet-more,.mg-companion:focus-within .mg-pet-more,.mg-pet-more[aria-expanded=true]{opacity:1}
.mg-pet-bubble{position:absolute;right:8px;bottom:calc(100% + 4px);width:max-content;max-width:min(240px,calc(100vw - 40px));border:1px solid var(--pet-line);border-radius:15px 15px 5px 15px;padding:11px 14px;background:var(--pet-panel);color:var(--pet-text);box-shadow:0 8px 28px #0002;font-family:inherit;font-size:12px;font-weight:500;line-height:1.65;text-align:left;overflow-wrap:anywhere;cursor:pointer;animation:mg-pet-appear .2s ease both}
.mg-pet-menu{position:absolute;right:4px;bottom:calc(100% + 6px);min-width:170px;max-width:calc(100vw - 24px);padding:6px;border-radius:15px;border:1px solid var(--pet-line);background:var(--pet-panel);box-shadow:0 14px 40px #0003}
.mg-pet-menu button{display:block;width:100%;padding:11px 12px;border:0;background:transparent;color:var(--pet-text);border-radius:9px;text-align:left;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}
.mg-pet-menu button:hover{background:color-mix(in srgb,var(--pet-text) 7%,transparent);transform:none}
.mg-companion.is-left .mg-pet-menu,.mg-companion.is-left .mg-pet-bubble{right:auto;left:4px}
.mg-companion.is-top .mg-pet-menu,.mg-companion.is-top .mg-pet-bubble{bottom:auto;top:calc(100% + 6px)}
.mg-companion.is-collapsed{width:44px;height:44px}.mg-companion.is-collapsed .mg-pet-dot{width:5px;height:5px;right:2px;bottom:2px}
.mg-companion.is-collapsed .mg-pet-more{right:-5px;top:-9px;width:24px;height:24px;min-width:24px;min-height:24px}
.mg-companion.is-dragging .mg-pet-body{cursor:grabbing}.mg-companion.is-dragging img{animation:none;transform:rotate(-5deg) scale(1.04)}
.mg-companion.is-celebrating img{animation:mg-pet-deliver 1.3s ease both}.mg-companion.is-hello img{animation:mg-pet-hello 1.1s ease both}
.mg-pet-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes mg-pet-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2px) scale(1.015,1.025)}}
@keyframes mg-pet-deliver{0%,100%{transform:translateY(0)}20%{transform:translateY(2px) scale(1.06,.94)}45%{transform:translateY(-14px) rotate(-5deg)}65%{transform:translateY(-8px) rotate(5deg)}85%{transform:translateY(1px) scale(1.03,.98)}}
@keyframes mg-pet-hello{0%,100%{transform:rotate(0)}25%{transform:rotate(-8deg)}65%{transform:rotate(8deg)}}
@keyframes mg-pet-pulse{50%{opacity:.5}}@keyframes mg-pet-appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px){.mg-companion{width:76px;height:76px}.mg-pet-more{opacity:1;min-width:28px;min-height:28px;right:-2px;top:-3px}.mg-pet-bubble{max-width:200px;font-size:12px}.mg-pet-menu button{min-height:44px}.mg-pet-body img{animation-duration:5.5s}}
@media(prefers-reduced-motion:reduce){.mg-companion *,.mg-boot-mascot{animation:none!important;transition:none!important}}

/* Separate gaze from the existing breath, greeting and delivery animations. */
.mg-pet-gaze{display:block;width:100%;height:100%;transform:translate3d(var(--look-x,0px),var(--look-y,0px),0) rotate(var(--look-turn,0deg));transform-origin:50% 82%;transition:transform .16s ease-out;pointer-events:none}
.mg-companion.is-curious .mg-pet-body img{filter:drop-shadow(0 7px 9px #0003)}
.mg-pet-menu button[aria-pressed=true]{color:#8baf61}.mg-pet-menu button:focus-visible{outline:2px solid currentColor;outline-offset:-3px}
.mg-pet-menu button[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.mg-pet-gaze{transform:none!important}.mg-companion{transform:none!important}}
