:root{--spring:cubic-bezier(.34,1.56,.64,1)}
/* mascot */
#mascot{position:fixed;right:max(14px,2vw);bottom:14px;z-index:30;width:96px;height:112px;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transform:translate3d(0,var(--fy,0px),0) rotate(var(--fr,0deg));will-change:transform}
#mascot .bot{width:96px;height:112px;transform-origin:50% 95%;animation:mfloat 3.4s ease-in-out infinite}
#mascot svg{display:block;overflow:visible;filter:drop-shadow(0 8px 10px #2c3a6340)}
.m-arm.r{transform-origin:100px 76px;animation:wave 2.4s ease-in-out 1.4s 3}.m-ant{animation:antg 2s ease-in-out infinite}.m-eyes{transform-origin:60px 57px;animation:blink 5s infinite}
@keyframes mfloat{50%{transform:translateY(-8px) rotate(1.5deg)}}
@keyframes wave{0%,100%{transform:rotate(0)}15%{transform:rotate(-38deg)}30%{transform:rotate(8deg)}45%{transform:rotate(-34deg)}60%{transform:rotate(6deg)}}
@keyframes antg{50%{fill:#ffd9a8;filter:drop-shadow(0 0 6px #ffb86b)}}@keyframes blink{0%,94%,100%{transform:scaleY(1)}97%{transform:scaleY(.1)}}
#mascot{opacity:0}#mascot.enter{opacity:1;animation:menter 1.3s var(--spring) backwards}@keyframes menter{0%{transform:translate3d(120px,-60vh,0) rotate(18deg) scale(.4);opacity:0}60%{opacity:1}100%{transform:translate3d(0,0,0) rotate(0)}}
#mascot.boop .bot{animation:boop .8s var(--spring)}@keyframes boop{0%{transform:scale(1,1)}18%{transform:scale(1.25,.7) translateY(6px)}40%{transform:scale(.82,1.28) translateY(-34px)}62%{transform:scale(1.1,.9) translateY(0)}80%{transform:scale(.97,1.04)}100%{transform:scale(1,1)}}
.bubble{position:absolute;right:20px;bottom:118px;width:max-content;max-width:min(230px,calc(100vw - 100px));background:#fff;color:#44506b;font-weight:800;font-size:14px;line-height:1.3;padding:10px 16px;border-radius:18px;box-shadow:0 12px 22px -8px #4a5a8a77;transform-origin:90% 100%;transform:scale(0);opacity:0;transition:transform .5s var(--spring),opacity .25s;pointer-events:none}
.bubble::after{content:"";position:absolute;right:26px;bottom:-6px;width:13px;height:13px;background:#fff;transform:rotate(45deg);border-radius:3px}
.bubble.on{transform:scale(1);opacity:1}
.heart{position:fixed;z-index:31;pointer-events:none;font-size:22px;will-change:transform,opacity}
/* chat panel */
#botchat{position:fixed;right:max(14px,2vw);bottom:134px;z-index:40;width:min(360px,calc(100vw - 24px));max-height:min(520px,calc(100vh - 160px));display:flex;flex-direction:column;background:#fff;color:#2c2a3a;border-radius:24px;box-shadow:0 24px 60px -16px #2c3a63aa,0 0 0 2px #e6dcc8;overflow:hidden;font:15px/1.45 ui-rounded,"SF Pro Rounded",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;transform-origin:90% 100%;animation:bcpop .45s var(--spring)}
#botchat[hidden]{display:none}@keyframes bcpop{from{transform:scale(.6);opacity:0}}
#botchat .bchead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px 12px 18px;background:linear-gradient(180deg,#cfe9f1,#e0d6f2);font-weight:800}
#botchat .bchead small{display:block;font-weight:600;color:#615d74;font-size:12px}
#botchat .bcx{border:0;background:#ffffffaa;border-radius:50%;width:34px;height:34px;font-size:18px;line-height:1;cursor:pointer;color:#2c2a3a}
#botchat .bclog{flex:1;overflow-y:auto;padding:14px 14px 6px;display:flex;flex-direction:column;gap:8px;min-height:120px;overscroll-behavior:contain}
#botchat .bm{max-width:88%;padding:9px 13px;border-radius:18px;white-space:pre-wrap;word-wrap:break-word;animation:bmin .35s var(--spring)}@keyframes bmin{from{transform:translateY(8px) scale(.94);opacity:0}}
#botchat .bm.bot{align-self:flex-start;background:#f3efe6;border-bottom-left-radius:6px}#botchat .bm.me{align-self:flex-end;background:#ff7a59;color:#fff;border-bottom-right-radius:6px}
#botchat .bm.typing::after{content:"";display:inline-block;width:.6em;height:.6em;margin-left:4px;border-radius:50%;background:#9db4d8;animation:btyp 1s ease-in-out infinite}@keyframes btyp{50%{transform:scale(.4);opacity:.4}}
#botchat .bchips{display:flex;flex-wrap:wrap;gap:8px;padding:2px 14px 10px}
#botchat .bchips a,#botchat .bchips button{font:inherit;font-weight:800;font-size:14px;text-decoration:none;color:#fff;background:linear-gradient(180deg,#ff946f,#ff6a45);border:0;border-radius:999px;padding:9px 16px;min-height:40px;cursor:pointer;box-shadow:inset 0 -3px 0 #c9482a66;animation:bmin .4s var(--spring) backwards}
#botchat .bchips a:nth-child(n+2){background:#fff;color:#2c2a3a;box-shadow:inset 0 0 0 2px #e6dcc8}
#botchat .bcform{display:flex;gap:8px;padding:10px 12px 12px;border-top:1px solid #efe6d3}
#botchat .bcform input[type=text]{flex:1;min-width:0;font:inherit;padding:10px 14px;min-height:44px;border-radius:999px;border:2px solid #e6dcc8;background:#fff;color:#2c2a3a}
#botchat .bcform button{font:inherit;font-weight:800;border:0;border-radius:999px;padding:0 18px;min-height:44px;background:#2c2a3a;color:#fff;cursor:pointer}#botchat .bcform button:disabled{opacity:.5}
#botchat .hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}
#botchat .bcact{display:flex;gap:8px;padding:0 14px 10px}#botchat .bcact button{font:inherit;font-weight:700;border:0;border-radius:999px;padding:8px 14px;cursor:pointer;background:#cdebd8}
#botchat :focus-visible,#mascot :focus-visible{outline:3px solid #2c2a3a;outline-offset:2px}
@media(max-width:480px){#botchat{right:8px;bottom:128px;max-height:calc(100vh - 150px)}}
@media(prefers-reduced-motion:reduce){#botchat,#botchat .bm,#botchat .bchips a,#botchat .bchips button{animation:none}#botchat .bm.typing::after{animation:none}}
@media(prefers-reduced-motion:reduce){#mascot .bot,.m-arm.r,.m-ant,.m-eyes,#mascot.enter,#mascot.boop .bot{animation:none}}
.blinks{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 8px 4px}
.blink{display:inline-block;padding:6px 12px;border-radius:999px;background:#eef4ff;color:#27406e;font-size:13px;font-weight:600;text-decoration:none;border:1px solid #cfdcf5}
.blink:hover,.blink:focus-visible{background:#dfeaff}
#botchat .bchips .bshow{background:linear-gradient(180deg,#ff946f,#ff6a45);color:#fff;animation:bmin .35s var(--spring)}
