/* 层级:顶部导航 100 < 本组件 949/950 < 官网「预约沟通」弹窗 1000(弹窗打开时不被遮挡)
/* 官网助手(小源等 6 个造型)—— 由 build_release.py 注入每个页面,勿手改。逻辑见 mascot.js */
.evm-pet-wrap, .evm-chat { --evm-ink: #16242C; --evm-soft: #5B6B73; --evm-line: #DCE6EA; --evm-paper: #F5F8F9;
  --evm-card: #FFFFFF; --evm-teal: #4DA5C7; --evm-deep: #2E7FA3; --evm-amber: #F2B544;
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; color: var(--evm-ink); box-sizing: border-box; }
.evm-pet-wrap *, .evm-chat * { box-sizing: border-box; }

/* ── 角色 ── */
.evm-pet-wrap { position: fixed; right: 20px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 950;
  width: 120px; height: 120px; touch-action: none; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; }
.evm-pet-wrap.dragging { transition: none; }
.evm-pet-wrap.tucked.side-right { transform: translateX(62%); opacity: .92; }
.evm-pet-wrap.tucked.side-left { transform: translateX(-62%); opacity: .92; }
.evm-pet { width: 100%; height: 100%; display: block; cursor: grab; background: none; border: 0; padding: 0; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.evm-pet-wrap.dragging .evm-pet { cursor: grabbing; }
.evm-pet:focus-visible, .evm-chat button:focus-visible { outline: 2px solid var(--evm-deep); outline-offset: 2px; }
.evm-pet svg { width: 100%; height: 100%; overflow: visible; display: block; pointer-events: none; }
.evm-bubble { position: absolute; bottom: 108px; background: var(--evm-card); color: var(--evm-ink); border: 1px solid var(--evm-line);
  padding: 8px 13px; font-size: 14px; line-height: 1.5; white-space: nowrap; box-shadow: 0 6px 22px rgba(10, 20, 28, .10);
  transition: opacity .18s, transform .22s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.side-right .evm-bubble { right: 64px; border-radius: 14px 14px 4px 14px; transform-origin: 100% 100%; }
.side-left .evm-bubble { left: 64px; border-radius: 14px 14px 14px 4px; transform-origin: 0 100%; }
.evm-bubble.off { opacity: 0; transform: scale(.6) translateY(6px); }
.tucked .evm-bubble, .dragging .evm-bubble { opacity: 0; }
.evm-dots { display: inline-flex; gap: 5px; padding-block: 4px; }
.evm-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--evm-deep); animation: evm-dot 1.1s infinite ease-in-out; }
.evm-dots i:nth-child(2) { animation-delay: .15s; } .evm-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes evm-dot { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-6px); opacity: 1; } }

/* 骨骼:hop › lean › squash › breath,外加 eyes / antenna / mouth */
.evm-pet-wrap .breath { transform-box: view-box; transform-origin: 100px 176px; animation: evm-breath 3.4s ease-in-out infinite; }
@keyframes evm-breath { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.018, 1.035); } }
#evm-squash, #evm-lean, #evm-hop, #evm-antenna, #evm-eyes, #evm-shadow { transform-box: view-box; }
#evm-squash, #evm-lean, #evm-hop { transform-origin: 100px 176px; }
#evm-shadow { transform-origin: 100px 182px; }
.evm-pet-wrap .sleep-eyes, .evm-pet-wrap .mouth-open, .evm-chat .sleep-eyes, .evm-chat .mouth-open { opacity: 0; }
.evm-pet-wrap .signal path, .evm-chat .signal path { stroke: var(--evm-amber); opacity: 0; }
.evm-pet-wrap.talking .signal path { animation: evm-sig 1.2s ease-out infinite; }
.evm-pet-wrap.talking .signal path:nth-child(2) { animation-delay: .25s; }
@keyframes evm-sig { 0% { opacity: 0; } 30% { opacity: .95; } 100% { opacity: 0; } }
.evm-pet-wrap.thinking #evm-bulb { animation: evm-pulse 1s ease-in-out infinite; }
@keyframes evm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.evm-pet-wrap.talking .wifi path, .evm-pet-wrap.thinking .wifi path { animation: evm-wifi 1.1s ease-in-out infinite; }
.evm-pet-wrap.talking .wifi path:nth-child(1), .evm-pet-wrap.thinking .wifi path:nth-child(1) { animation-delay: .25s; }
@keyframes evm-wifi { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.evm-pet-wrap .bars rect { transform-box: fill-box; transform-origin: 50% 100%; }
.evm-pet-wrap.talking .bars rect, .evm-pet-wrap.thinking .bars rect { animation: evm-bar .9s ease-in-out infinite; }
.evm-pet-wrap.talking .bars rect:nth-child(2), .evm-pet-wrap.thinking .bars rect:nth-child(2) { animation-delay: .15s; }
.evm-pet-wrap.talking .bars rect:nth-child(3), .evm-pet-wrap.thinking .bars rect:nth-child(3) { animation-delay: .3s; }
@keyframes evm-bar { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
.evm-pet-wrap .pins g { transform-box: fill-box; transform-origin: 50% 100%; }
.evm-pet-wrap.talking .pins g, .evm-pet-wrap.thinking .pins g { animation: evm-pin .9s cubic-bezier(.3, 1.6, .5, 1) infinite; }
.evm-pet-wrap.talking .pins g:nth-child(2), .evm-pet-wrap.thinking .pins g:nth-child(2) { animation-delay: .2s; }
.evm-pet-wrap.talking .pins g:nth-child(3), .evm-pet-wrap.thinking .pins g:nth-child(3) { animation-delay: .4s; }
@keyframes evm-pin { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* ── 对话框 ── */
.evm-chat { position: fixed; z-index: 949; width: min(360px, calc(100vw - 24px)); height: min(500px, calc(100vh - 170px));
  display: flex; flex-direction: column; background: var(--evm-card); border: 1px solid var(--evm-line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(10, 20, 28, .16); overflow: hidden; font-size: 14px; line-height: 1.6;
  transition: opacity .2s, transform .28s cubic-bezier(.3, 1.4, .5, 1), visibility 0s; }
.evm-chat.off { opacity: 0; transform: scale(.75) translateY(20px); pointer-events: none; visibility: hidden; transition: opacity .15s, transform .2s, visibility 0s .2s; }
.evm-chat.side-right { transform-origin: 85% 100%; } .evm-chat.side-left { transform-origin: 15% 100%; }
.evm-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px;
  background: linear-gradient(180deg, #EEF7FA, #FFFFFF); }
.evm-avatar-btn { flex: none; display: grid; justify-items: center; border: 0; background: none; padding: 0 2px; border-radius: 10px; cursor: pointer; color: var(--evm-soft); }
.evm-avatar-btn .fig { width: 46px; height: 46px; display: block; }
.evm-avatar-btn .chev { width: 14px; height: 9px; margin-top: -3px; transition: transform .2s; }
.evm-avatar-btn:hover .chev, .evm-avatar-btn[aria-expanded="true"] .chev { color: var(--evm-deep); }
.evm-avatar-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.evm-who { display: grid; min-width: 0; }
.evm-who b { font-size: 15px; line-height: 1.3; }
.evm-status { font-size: 12px; color: var(--evm-soft); display: flex; align-items: center; gap: 6px; }
.evm-status i { width: 7px; height: 7px; border-radius: 50%; background: #2FBF71; flex: none; }
.evm-close { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--evm-soft); cursor: pointer; display: grid; place-items: center; }
.evm-close:hover { background: #E3F1F6; color: var(--evm-deep); }
.evm-close svg { width: 18px; height: 18px; }
.evm-skins { flex: none; display: flex; gap: 2px; padding: 4px 8px 8px; background: #FFFFFF; overflow-x: auto; }
.evm-skins[hidden] { display: none; }
.evm-skins button { flex: none; width: 54px; border: 0; background: none; cursor: pointer; padding: 2px 0 8px; position: relative; border-radius: 10px; }
.evm-skins button:hover { background: #EEF6F9; }
.evm-skins svg { width: 50px; height: 50px; display: block; margin: 0 auto; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.evm-skins button:hover svg { transform: translateY(-2px); }
.evm-skins button[aria-pressed="true"]::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--evm-deep); }
.evm-msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--evm-paper); }
.evm-row { display: flex; align-items: flex-end; gap: 6px; max-width: 92%; }
.evm-row.me { align-self: flex-end; }
.evm-ava { flex: none; width: 40px; height: 40px; margin-left: -4px; }
.evm-ava svg { width: 40px; height: 40px; display: block; }
.evm-m { min-width: 0; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.evm-m small { display: block; font-size: 11.5px; color: var(--evm-soft); margin-bottom: 2px; }
.evm-row.bot .evm-m { background: var(--evm-card); border: 1px solid var(--evm-line); border-bottom-left-radius: 4px; }
.evm-row.staff .evm-m { background: #E8F4F8; border: 1px solid #C6E2EC; border-bottom-left-radius: 4px; }
.evm-row.me .evm-m { background: var(--evm-deep); color: #fff; border-bottom-right-radius: 4px; }
.evm-m a { color: inherit; }
.evm-typing .evm-m { padding: 12px 14px; }
/* 快捷回复附件:图片 / 位置卡片 / PDF */
.evm-att { display: block; }
.evm-att img { display: block; width: 100%; max-width: 200px; border-radius: 10px; margin-top: 2px; -webkit-touch-callout: default; }
.evm-att i { display: block; font-style: normal; font-size: 11.5px; color: var(--evm-soft); margin-top: 6px; }
.evm-m a.evm-card-link { display: flex; align-items: center; gap: 10px; margin-top: 2px; padding: 9px 11px; border-radius: 12px;
  background: #fff; border: 1px solid var(--evm-line); color: inherit; text-decoration: none; white-space: normal; }
.evm-card-link > span[aria-hidden] { font-size: 20px; line-height: 1; flex: none; }
.evm-card-link b { display: block; font-weight: 600; }
.evm-card-link i { display: block; font-style: normal; font-size: 12px; color: var(--evm-deep); margin-top: 2px; }
.evm-privacy a { color: var(--evm-deep); }
.evm-compose { flex: none; display: flex; gap: 8px; padding: 12px 14px 14px; background: var(--evm-card); margin: 0; }
.evm-compose input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--evm-line); border-radius: 10px; color: var(--evm-ink); background: #fff; }
.evm-compose input:focus { outline: none; border-color: var(--evm-teal); box-shadow: 0 0 0 3px #DCEFF5; }
.evm-send { font: inherit; font-size: 14px; padding: 9px 16px; border: 0; border-radius: 10px; background: var(--evm-deep); color: #fff; cursor: pointer; }
.evm-send:disabled { opacity: .5; cursor: default; }
.evm-card { align-self: stretch; margin-left: 34px; display: grid; gap: 7px; padding: 12px; background: var(--evm-card); border: 1px dashed #B9D9E4; border-radius: 14px; }
.evm-card b { font-size: 13px; font-weight: 600; color: var(--evm-deep); }
.evm-card input { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--evm-line); border-radius: 8px; min-width: 0; color: var(--evm-ink); background: #fff; }
.evm-card input:focus { outline: none; border-color: var(--evm-teal); box-shadow: 0 0 0 3px #DCEFF5; }
.evm-card-err { font-size: 12px; color: #B42318; }
.evm-card-err[hidden] { display: none; }
.evm-card-act { display: flex; gap: 8px; align-items: center; }
.evm-card-act button { font: inherit; font-size: 13px; padding: 6px 14px; border-radius: 8px; border: 0; background: var(--evm-deep); color: #fff; cursor: pointer; }
.evm-card-act button:disabled { opacity: .5; }
.evm-card-act .skip { background: none; color: var(--evm-soft); padding-inline: 4px; }
.evm-privacy { flex: none; font-size: 11.5px; color: var(--evm-soft); padding: 0 14px 10px; background: var(--evm-card); margin-top: -6px; }

@media (max-width: 760px) {
  .evm-pet-wrap { width: 92px; height: 92px; }
  .evm-bubble { bottom: 84px; white-space: normal; width: max-content; max-width: 200px; }
  .side-right .evm-bubble { right: 48px; } .side-left .evm-bubble { left: 48px; }
  .evm-chat { width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .evm-pet-wrap .breath, .evm-dots i, .evm-pet-wrap .signal path, #evm-bulb, .evm-pet-wrap .wifi path, .evm-pet-wrap .bars rect, .evm-pet-wrap .pins g { animation: none !important; }
}
@media print { .evm-pet-wrap, .evm-chat { display: none !important; } }
