/* Fixed display mount, with room inside the stage for the swivel and the pendulum arc. */
.evbot-pendant,.evbot-wake,.evbot-drawer {font-family:inherit}
.evbot-pendant {
  position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));
  width:120px;height:152px;z-index:25;visibility:hidden;pointer-events:none;line-height:1;
}
.evbot-pendant[data-visible="true"] {visibility:visible}
.evbot-open,.evbot-rest,.evbot-wake,.evbot-icon-button,.evbot-choice,.evbot-sleep-action {
  box-sizing:border-box;font:inherit;cursor:pointer;touch-action:manipulation;
}
.evbot-open {
  position:relative;display:flex;align-items:center;flex-direction:column;width:100%;height:100%;padding:0;
  border:0;border-radius:32%;background:transparent;pointer-events:auto;touch-action:pan-y;
  user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;cursor:grab;
}
.evbot-pendant[data-dragging] .evbot-open {cursor:grabbing}
.evbot-pendant :focus-visible,.evbot-drawer :focus-visible,.evbot-wake:focus-visible {outline:2px solid var(--brand);outline-offset:2px}
.evbot-stage {position:relative;display:block;width:100%;flex:1;min-height:0;pointer-events:none}
.evbot-canvas,.evbot-fallback {position:absolute;inset:0;width:100%;height:100%;display:block}
.evbot-canvas {opacity:0}
.evbot-pendant[data-renderer="webgl"] .evbot-canvas {opacity:1}
.evbot-pendant[data-renderer="webgl"] .evbot-fallback {display:none}
.evbot-fallback {transform-origin:50% 6%}
.evbot-fallback img {
  display:block;position:absolute;left:14%;bottom:3%;width:72%;height:76%;object-fit:contain;
  filter:drop-shadow(1px 3px 2px rgba(94,49,32,.22));
}
.evbot-fallback::before,.evbot-fallback::after {content:"";position:absolute;left:50%;transform:translateX(-50%)}
.evbot-fallback::before {height:12%;top:4%;width:3px;border-radius:2px;background:repeating-linear-gradient(45deg,#8d1929 0 2px,#d6a744 2px 3px)}
.evbot-fallback::after {top:13%;width:10%;height:10%;border:2px solid #c39951;border-radius:48%;box-shadow:inset 1px 0 #fae7bd,1px 1px #7a532a}
.evbot-label {
  display:inline-flex;align-items:center;justify-content:center;height:17px;min-width:53px;padding:0 9px;
  border:1px solid #b78a53;border-radius:12px;background:linear-gradient(175deg,#992a35,#651423);
  color:#fff0cc;line-height:1;font-family:inherit;font-size:10px;font-weight:650;
  letter-spacing:.06em;white-space:nowrap;box-shadow:0 2px 4px rgba(88,40,33,.14);
}
.evbot-bubble {
  position:absolute;right:calc(100% + 3px);bottom:29%;z-index:2;margin:0;padding:10px 13px;width:max-content;
  max-width:min(220px,52vw);box-sizing:border-box;border:1px solid var(--brand-line);border-radius:12px 12px 3px 12px;
  color:var(--text);background:var(--panel);box-shadow:0 4px 16px rgba(88,40,33,.1);font-size:12px;line-height:1.55;pointer-events:none;
}
.evbot-rest,.evbot-wake,.evbot-icon-button {display:grid;place-items:center;border-radius:50%;padding:0;color:var(--text);background:var(--panel);border:1px solid var(--line-strong)}
.evbot-rest {position:absolute;z-index:3;right:0;top:3px;width:24px;height:24px;opacity:0;pointer-events:none}
.evbot-pendant[data-mood="happy"] .evbot-rest,.evbot-rest:focus-visible {opacity:1;pointer-events:auto}
.evbot-rest svg {width:12px;height:12px}
.evbot-wake {
  position:fixed;z-index:25;bottom:max(20px,env(safe-area-inset-bottom));right:max(20px,env(safe-area-inset-right));
  width:34px;height:34px;color:#ffebbb;border:2px solid #ca9c59;
  background:linear-gradient(145deg,#a52739,#651323);box-shadow:inset 0 0 0 2px #872232,0 2px 6px rgba(88,40,33,.2)
}
.evbot-wake::before {content:"";position:absolute;top:-8px;width:8px;height:8px;border:2px solid #ba914f;border-radius:50%;z-index:-1}
.evbot-wake svg {width:15px;height:15px}
.evbot-wake[hidden],.evbot-bubble[hidden] {display:none}
@media (prefers-reduced-motion:no-preference){
  .evbot-pendant[data-visible="true"] .evbot-open {animation:evbot-arrive .28s ease-out}
  .evbot-pendant[data-visible="true"] .evbot-fallback {animation:evbot-settle .8s ease-out}
  .evbot-drawer[open] .evbot-badge {animation:evbot-greet .44s ease-out}
  @keyframes evbot-greet {0% {transform:translateY(2px)}42% {transform:translateY(-3px) rotate(-6deg)}100% {transform:none}}
  .evbot-bubble:not([hidden]) {animation:evbot-arrive .16s ease-out}
  @keyframes evbot-arrive {from {opacity:0}to {opacity:1}}
  @keyframes evbot-settle {0% {transform:rotate(-6deg)}65% {transform:rotate(2deg)}100% {transform:rotate(0)}}
}

/* Native modal provides focus containment, Escape and backdrop isolation. */
.evbot-drawer {
  position:fixed; inset:0 0 0 auto; width:min(454px,100vw); height:100%; height:100dvh;
  max-width:100vw; max-height:100dvh; box-sizing:border-box; margin:0; padding:0;
  color:var(--text); color-scheme:light; background:var(--panel);
  border:0; border-left:1px solid var(--line); box-shadow:-18px 0 60px color-mix(in srgb,var(--stage-bg) 14%,transparent);
  backdrop-filter:blur(22px); overflow:hidden; text-align:start;
}
.evbot-drawer[open] {display:flex; flex-direction:column; animation:evbot-drawer-in .24s ease-out both;}
.evbot-drawer::backdrop {background:color-mix(in srgb,var(--stage-bg) 35%,transparent);}
.evbot-drawer-head,.evbot-drawer-foot {position:static; flex:none; min-height:0; margin:0; background:transparent;}
.evbot-drawer-head {display:flex; align-items:center; justify-content:space-between; padding:20px 27px 17px; border-bottom:1px solid var(--line);}
.evbot-identity {display:flex; align-items:center; gap:10px; color:var(--text); font-weight:680; font-size:14px; letter-spacing:.02em;}
.evbot-badge {display:grid; place-items:center; width:32px; height:32px; border:1px solid var(--line); background:var(--surface); border-radius:9px; color:var(--brand);}
.evbot-badge svg {width:20px; height:20px;}
.evbot-badge img {width:29px; height:29px; object-fit:contain;}
.evbot-icon-button {background:transparent; border-color:var(--line); width:36px; height:36px;}
.evbot-icon-button svg {width:16px; height:16px;}
.evbot-drawer-body {flex:1; min-height:0; padding:27px; overflow:auto; overscroll-behavior:contain;}
.evbot-drawer h2 {margin:0; font-size:clamp(27px,5vw,36px); line-height:1.13; font-weight:650; letter-spacing:-.035em; color:var(--text);}
.evbot-intro {color:var(--muted); margin:12px 0 23px; font-size:14px; line-height:1.6;}
.evbot-choices {display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.evbot-choice {
  display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; gap:12px;
  text-align:left; min-height:92px; padding:12px; border-radius:10px; border:1px solid var(--line);
  background:var(--bg-warm); color:var(--text); font-size:13px; font-weight:560; line-height:1.44;
  transition:background .16s,border-color .16s;
}
.evbot-choice-icon {color:var(--muted);}
.evbot-choice-icon svg {display:block; height:19px; width:19px;}
.evbot-choice:hover,.evbot-choice[aria-pressed="true"] {border-color:var(--brand); background:var(--surface-red);}
.evbot-choice[aria-pressed="true"] .evbot-choice-icon {color:var(--brand);}
.evbot-results {margin:26px 0 0; padding:0;}
.evbot-results h3 {margin:0 0 10px; font-size:15px; color:var(--text); font-weight:650;}
.evbot-link {
  display:flex; align-items:center; justify-content:space-between; gap:15px; padding:15px 1px;
  border-top:1px solid var(--line); color:var(--text); text-decoration:none;
}
.evbot-avatar-slot {width:80px; height:80px; flex:none; display:grid; place-items:center;}
.evbot-avatar-slot .ev-avatar,.evbot-avatar-slot .ev-portrait {display:block; width:80px; height:80px; margin:0; object-fit:contain;}
.evbot-role-code {display:block; margin-bottom:3px; color:var(--brand); font:650 11px/1.3 var(--mono); letter-spacing:.06em;}
.evbot-link-copy {flex:1; min-width:0;}
.evbot-link:hover strong {color:var(--brand);}
.evbot-link-copy strong,.evbot-link-copy small {display:block;}
.evbot-link-copy strong {font-size:14px; line-height:1.45; font-weight:640;}
.evbot-link-copy small {margin-top:5px; font-size:12px; line-height:1.55; color:var(--muted);}
.evbot-go {display:grid; flex:none; place-items:center; width:29px; height:29px; border-radius:50%; background:var(--surface-red); color:var(--brand);}
.evbot-go svg {width:16px; height:16px;}
.evbot-drawer-foot {padding:12px 26px max(15px,env(safe-area-inset-bottom)); border:solid var(--line); border-width:1px 0 0;}
.evbot-sleep-action {
  display:inline-flex; align-items:center; gap:8px; padding:8px 0; border:0;
  background:none; color:var(--muted); font-size:13px; font-weight:550;
}
.evbot-sleep-action:hover {color:var(--text);}
.evbot-sleep-action svg {width:15px; height:15px;}
@keyframes evbot-drawer-in {from {transform:translateX(7%); opacity:.3;}to {transform:translateX(0); opacity:1;}}
@media(max-width:767px){
  .evbot-pendant {width:88px;height:114px;right:max(12px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom))}
  .evbot-label {height:15px;min-width:43px;padding:0 6px;font-size:9px}
  .evbot-wake {right:max(12px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom))}
  .evbot-drawer-head {padding:14px 20px;}
  .evbot-drawer-body {padding:21px 20px;}
  .evbot-drawer-foot {padding-inline:20px;}
  .evbot-rest {right:-1px; width:21px; height:21px;}
  .evbot-bubble {font-size:11px; max-width:185px; padding:7px 10px;}
}
@media(prefers-reduced-motion:reduce) {
  .evbot-pendant *,.evbot-wake,.evbot-drawer,.evbot-drawer * {animation:none!important; transition:none!important;}
}

/* Keep the catalog's clickable cards to the left of the parked charm. The heading
   and filters retain the site's original alignment at both presentation widths. */
body:has(.evbot-pendant) :is([data-catalog-list] .ac-grid,.ec-overview .ec-grid) {
  margin-right:max(0px,calc(148px - (100vw - 100%) / 2));
}
@media(max-width:767px) {
  body:has(.evbot-pendant) :is([data-catalog-list] .ac-grid,.ec-overview .ec-grid) {
    margin-right:max(0px,calc(105px - (100vw - 100%) / 2));
  }
}
@media(min-width:768px) {
  body:has(.evbot-pendant) .cm-consult-layout {margin-right:max(0px,calc(148px - (100vw - 100%) / 2))}
}
