/* BEE Mascot (Beelou) v1.2.0 - official Beelou poses (half-body, rises from the bottom edge) */
#bee-mascot{--bm-h:190px;--bm-hm:120px;--bm-ratio:1;--h:var(--bm-h);--w:calc(var(--h)*var(--bm-ratio));--dir:1;--honey:#f2b01e;--honey-d:#c98708;--brown:#3b2a14;--cream:#fff9ea;--line:#f0dfb4;
  position:fixed;z-index:99990;bottom:0;right:0;width:0;height:0;font-family:inherit;font-size:15px;line-height:1.45;color:var(--brown);text-align:left;-webkit-text-size-adjust:100%}
#bee-mascot.bm--left{right:auto;left:0;--dir:-1}
#bee-mascot,#bee-mascot *,#bee-mascot *::before,#bee-mascot *::after{box-sizing:border-box}
#bee-mascot button{background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;min-width:0;min-height:0;width:auto;height:auto;box-shadow:none;text-transform:none;letter-spacing:normal;line-height:inherit;border-radius:0;cursor:pointer;-webkit-appearance:none;appearance:none}
#bee-mascot img{max-width:none;border:0;margin:0;padding:0;box-shadow:none;border-radius:0}
#bee-mascot a{text-decoration:none}

/* ---------- character ---------- */
#bee-mascot .bm-char{--w:calc(var(--h)*var(--bm-ratio));position:fixed;bottom:-6px;right:10px;width:var(--w);height:var(--h);display:block;overflow:visible;outline:0;-webkit-tap-highlight-color:transparent;
  transition:transform .5s cubic-bezier(.34,1.4,.5,1),height .3s,width .3s,bottom .3s;touch-action:manipulation}
#bee-mascot.bm--left .bm-char{right:auto;left:10px}
#bee-mascot .bm-char:focus-visible{outline:3px solid var(--honey);outline-offset:4px;border-radius:16px}
#bee-mascot .bm-tilt,#bee-mascot .bm-float,#bee-mascot .bm-act{position:absolute;inset:0;display:block}
#bee-mascot .bm-tilt{transform:rotate(var(--tilt,0deg));transition:transform .35s ease-out;transform-origin:50% 100%}
#bee-mascot .bm-float{animation:bm-float 3.6s ease-in-out infinite;transform-origin:50% 100%}
#bee-mascot .bm-act{transform-origin:50% 100%;transition:transform .36s cubic-bezier(.3,1.5,.5,1)}
#bee-mascot .bm-act.bm-down{transform:translateY(108%);transition:transform .2s ease-in}
#bee-mascot .bm-pose{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:50% 100%;opacity:0;pointer-events:none;user-select:none;-webkit-user-drag:none;
  filter:drop-shadow(0 6px 10px rgba(59,42,20,.22))}
#bee-mascot .bm-pose.bm-on{opacity:1}
#bee-mascot.bm--flip .bm-pose{transform:scaleX(-1)}
#bee-mascot .bm-glow{position:absolute;left:-10%;right:-10%;top:6%;bottom:-6%;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(255,206,84,.6) 0%,rgba(255,206,84,.22) 42%,rgba(255,206,84,0) 68%);animation:bm-glow 2.8s ease-in-out infinite}
#bee-mascot .bm-shadow{display:none}
#bee-mascot .bm-sparks{position:absolute;inset:0;pointer-events:none}
#bee-mascot .bm-spark{position:absolute;border-radius:50%;background:radial-gradient(circle,#fff 0%,#ffe08a 45%,rgba(255,200,60,0) 72%);animation:bm-spark 1.9s ease-out forwards}

#bee-mascot .bm-act.bm-hop{animation:bm-hop .8s cubic-bezier(.3,.7,.4,1)}
#bee-mascot .bm-act.bm-talk{animation:bm-talk .3s ease-in-out infinite alternate}
#bee-mascot.bm--lit .bm-glow{animation-duration:1.1s;filter:brightness(1.25)}

/* intro flight on the home page */
#bee-mascot.bm--intro .bm-char{animation:bm-intro 1.5s cubic-bezier(.3,.6,.3,1) both}

/* peeking from the bottom edge (all pages except home) */
#bee-mascot.bm--peek .bm-char{--h:calc(var(--bm-h)*.8);transform:translateY(50%)}
#bee-mascot.bm--peek .bm-char:hover,#bee-mascot.bm--peek .bm-char:focus-visible,#bee-mascot.bm--peek.bm--up .bm-char{transform:translateY(24%)}
#bee-mascot.bm--peek .bm-shadow,#bee-mascot.bm--peek .bm-min{display:none}
#bee-mascot.bm--peek .bm-float{animation-duration:4.6s}
#bee-mascot.bm--peek .bm-glow{opacity:.5}

/* minimise button */
#bee-mascot .bm-min{position:fixed;bottom:calc(var(--h) - 6px);right:10px;width:26px;height:26px;border-radius:50%;background:#fff;color:var(--brown);font-size:18px;line-height:24px;text-align:center;
  box-shadow:0 2px 8px rgba(59,42,20,.25);opacity:0;transition:opacity .2s;z-index:2}
#bee-mascot.bm--left .bm-min{right:auto;left:10px}
#bee-mascot:hover .bm-min,#bee-mascot .bm-min:focus-visible{opacity:1}
#bee-mascot.bm--open .bm-min{display:none}

/* speech bubble */
#bee-mascot .bm-bubble{position:fixed;bottom:calc(var(--h)*.72 + 14px);right:calc(var(--w) + 6px);max-width:230px;padding:10px 14px;border-radius:18px 18px 4px 18px;background:#fff;color:var(--brown);
  font-size:14px;font-weight:600;line-height:1.35;box-shadow:0 6px 22px rgba(59,42,20,.2);border:2px solid var(--honey);cursor:pointer;opacity:0;transform:translateY(8px) scale(.9);transform-origin:100% 100%;
  pointer-events:none;transition:opacity .25s,transform .3s cubic-bezier(.34,1.5,.5,1)}
#bee-mascot.bm--left .bm-bubble{right:auto;left:calc(var(--w) + 6px);border-radius:18px 18px 18px 4px;transform-origin:0 100%}
#bee-mascot .bm-bubble.bm-show{opacity:1;transform:none;pointer-events:auto}
#bee-mascot.bm--peek .bm-bubble{bottom:calc(var(--bm-h)*.45 + 8px);right:calc(var(--bm-h)*.8*var(--bm-ratio) + 10px)}
#bee-mascot.bm--left.bm--peek .bm-bubble{right:auto;left:calc(var(--bm-h)*.8*var(--bm-ratio) + 10px)}
#bee-mascot.bm--open .bm-bubble{display:none}

/* ---------- chat panel ---------- */
#bee-mascot .bm-panel{position:fixed;bottom:16px;right:calc(var(--w) + 24px);width:350px;max-width:calc(100vw - 16px);height:min(560px,calc(100vh - 32px));display:flex;flex-direction:column;
  background:var(--cream);border-radius:20px;box-shadow:0 16px 48px rgba(59,42,20,.28);border:1px solid var(--line);overflow:hidden;
  opacity:0;visibility:hidden;transform:translateY(16px) scale(.96);transform-origin:100% 100%;transition:opacity .22s,transform .28s cubic-bezier(.34,1.3,.5,1),visibility 0s .28s}
#bee-mascot.bm--left .bm-panel{right:auto;left:calc(var(--w) + 24px);transform-origin:0 100%}
#bee-mascot.bm--open .bm-panel{opacity:1;visibility:visible;transform:none;transition:opacity .22s,transform .28s cubic-bezier(.34,1.3,.5,1)}
#bee-mascot .bm-head{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:12px 14px;background:linear-gradient(135deg,#f7c23c,#eda314);color:var(--brown)}
#bee-mascot .bm-title{flex:1;font-weight:700;font-size:16px;line-height:1.2}
#bee-mascot .bm-title small{display:block;font-weight:500;font-size:12px;opacity:.85}
#bee-mascot .bm-close{width:32px;height:32px;border-radius:50%;font-size:22px;line-height:30px;text-align:center;background:rgba(255,255,255,.45)}
#bee-mascot .bm-close:hover{background:rgba(255,255,255,.8)}
#bee-mascot .bm-log{position:relative;flex:1 1 auto;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#e3c278 transparent;padding:14px 12px 6px;display:flex;flex-direction:column;gap:10px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#bee-mascot .bm-log::after{content:'';flex:0 0 10px}
#bee-mascot .bm-msg{flex:0 0 auto;max-width:88%;padding:9px 13px;border-radius:16px;font-size:14.5px;word-wrap:break-word;overflow-wrap:anywhere;animation:bm-in .25s ease-out}
#bee-mascot .bm-msg.bm-bot{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:5px}
#bee-mascot .bm-msg.bm-me{align-self:flex-end;background:var(--brown);color:#fff;border-bottom-right-radius:5px}
#bee-mascot .bm-msg a{color:var(--honey-d);font-weight:600;text-decoration:underline}
#bee-mascot .bm-msg ul,#bee-mascot .bm-msg ol{margin:6px 0 0;padding-left:18px}
#bee-mascot .bm-dots{display:inline-flex;gap:4px;padding:4px 0}
#bee-mascot .bm-dots i{width:7px;height:7px;border-radius:50%;background:var(--honey);animation:bm-dot 1s ease-in-out infinite}
#bee-mascot .bm-dots i:nth-child(2){animation-delay:.15s}
#bee-mascot .bm-dots i:nth-child(3){animation-delay:.3s}
#bee-mascot .bm-btn{display:inline-block;margin-top:9px;padding:8px 14px;border-radius:999px;background:var(--honey);color:var(--brown) !important;font-weight:700;font-size:13.5px;text-decoration:none !important}
#bee-mascot .bm-btn:hover{background:#ffc53d}
#bee-mascot .bm-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:3px}
#bee-mascot .bm-links .bm-btn{margin-top:4px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#bee-mascot .bm-prods{display:flex;gap:8px;overflow-x:auto;margin:10px -4px 2px;padding:2px 4px 6px;scroll-snap-type:x proximity}
#bee-mascot .bm-prod{flex:0 0 112px;scroll-snap-align:start;background:var(--cream);border:1px solid var(--line);border-radius:12px;padding:6px;color:var(--brown) !important;text-decoration:none !important;font-weight:500 !important;font-size:12.5px;line-height:1.25}
#bee-mascot .bm-prod img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:8px;background:#fff;margin-bottom:5px}
#bee-mascot .bm-prod span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#bee-mascot .bm-prod b{display:block;margin-top:3px;font-size:13px}
#bee-mascot .bm-prod s{font-weight:400;opacity:.6;margin-right:4px}
#bee-mascot .bm-say{display:inline-block;margin:6px 0 0;font-size:12.5px;color:var(--honey-d);text-decoration:underline;font-weight:600}
#bee-mascot .bm-sug{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
#bee-mascot .bm-sug-t{font-size:12.5px;opacity:.75;margin-top:10px}
#bee-mascot .bm-chip{padding:6px 11px;border-radius:999px;background:#fff;border:1.5px solid var(--honey);font-size:13px;font-weight:600;color:var(--brown);white-space:nowrap;line-height:1.3}
#bee-mascot .bm-chip:hover{background:var(--honey)}
#bee-mascot .bm-sug .bm-chip{white-space:normal;text-align:left}
#bee-mascot .bm-contact{display:flex;flex-direction:column;gap:5px;margin-top:8px}
#bee-mascot .bm-oform{display:flex;flex-direction:column;gap:7px;margin-top:10px}
#bee-mascot .bm-oform .bm-err{color:#b3261e;font-size:13px}
#bee-mascot input.bm-in{display:block;width:100%;height:40px;padding:0 12px;margin:0;border:1.5px solid var(--line);border-radius:12px;background:#fff;color:var(--brown);font:inherit;font-size:16px;box-shadow:none;outline:0}
#bee-mascot input.bm-in:focus{border-color:var(--honey)}
#bee-mascot .bm-chips{flex:0 0 auto;display:flex;gap:6px;overflow-x:auto;padding:8px 12px;scrollbar-width:none;background:#fdeec4;border-top:1px solid var(--line);position:relative;z-index:1}
#bee-mascot .bm-chips::-webkit-scrollbar{display:none}
#bee-mascot .bm-chips .bm-chip{flex:0 0 auto}
@media (min-width:721px){
  #bee-mascot .bm-chips{flex-wrap:wrap;align-content:flex-start;overflow-x:hidden;overflow-y:auto;max-height:82px;scrollbar-width:thin;scrollbar-color:#e3c278 transparent;scroll-snap-type:y mandatory;scroll-padding:8px 0}
  #bee-mascot .bm-chips .bm-chip{scroll-snap-align:start;box-sizing:border-box;height:32px;padding-top:0;padding-bottom:0;line-height:29px}
  #bee-mascot .bm-chips::-webkit-scrollbar{display:block;width:8px}
  #bee-mascot .bm-chips::-webkit-scrollbar-thumb,#bee-mascot .bm-log::-webkit-scrollbar-thumb,#bee-mascot .bm-prods::-webkit-scrollbar-thumb{background:#e3c278;border-radius:8px}
  #bee-mascot .bm-log::-webkit-scrollbar{width:8px}
  #bee-mascot .bm-prods{scrollbar-width:thin;scrollbar-color:#e3c278 transparent;padding-bottom:8px}
  #bee-mascot .bm-prods::-webkit-scrollbar{height:8px}
}
#bee-mascot .bm-form{flex:0 0 auto;display:flex;gap:8px;padding:8px 12px 12px;margin:0;background:var(--cream);border-top:1px solid var(--line)}
#bee-mascot .bm-form input.bm-in{flex:1;border-radius:999px;height:42px;padding:0 16px}
#bee-mascot .bm-send{flex:0 0 42px;width:42px;height:42px;border-radius:50%;background:var(--honey);color:var(--brown);display:flex;align-items:center;justify-content:center}
#bee-mascot .bm-send:hover{background:#ffc53d}
#bee-mascot .bm-send svg{width:20px;height:20px;display:block}

/* ---------- small screens ---------- */
@media (max-width:720px){
  #bee-mascot{--h:var(--bm-hm);--lift:calc(var(--bm-off,0px) + env(safe-area-inset-bottom,0px))}
  #bee-mascot .bm-char{right:4px;bottom:calc(var(--lift) - 4px)}
  #bee-mascot.bm--left .bm-char{left:4px}
  #bee-mascot.bm--peek .bm-char{--h:calc(var(--bm-hm)*.9);transform:translateY(26%)}
  #bee-mascot.bm--peek.bm--up .bm-char,#bee-mascot.bm--peek .bm-char:focus-visible{transform:translateY(8%)}
  #bee-mascot .bm-min{opacity:1;width:24px;height:24px;line-height:22px;font-size:16px;right:4px;bottom:calc(var(--h) + var(--lift) - 8px)}
  #bee-mascot.bm--left .bm-min{left:4px}
  #bee-mascot .bm-bubble{max-width:min(210px,calc(100vw - var(--w) - 24px));font-size:13.5px;bottom:calc(var(--h)*.72 + 14px + var(--lift))}
  #bee-mascot.bm--peek .bm-bubble{bottom:calc(var(--bm-hm)*.62 + 8px + var(--lift));right:calc(var(--bm-hm)*.9*var(--bm-ratio) + 6px)}
  #bee-mascot.bm--left.bm--peek .bm-bubble{left:calc(var(--bm-hm)*.9*var(--bm-ratio) + 6px)}
  #bee-mascot .bm-panel,#bee-mascot.bm--left .bm-panel{left:8px;right:8px;bottom:8px;width:auto;max-width:none;height:min(540px,72vh);height:min(540px,72dvh);transform-origin:50% 100%}
  #bee-mascot.bm--open .bm-char{--h:96px;bottom:calc(min(540px,72vh) + 6px);bottom:calc(min(540px,72dvh) + 6px);right:18px;transform:none;overflow:hidden}
  #bee-mascot.bm--open .bm-glow{display:none}
  #bee-mascot.bm--left.bm--open .bm-char{left:18px}
  #bee-mascot.bm--open .bm-shadow{display:none}
}

/* ---------- keyframes ---------- */
@keyframes bm-float{0%,100%{transform:rotate(-1.1deg) scaleY(1)}50%{transform:rotate(1.1deg) scaleY(1.018)}}
@keyframes bm-shadow{0%,100%{transform:scaleX(1);opacity:1}50%{transform:scaleX(.78);opacity:.6}}
@keyframes bm-glow{0%,100%{opacity:.45;transform:scale(.94)}50%{opacity:.9;transform:scale(1.05)}}
@keyframes bm-hop{0%{transform:scale(1.05,.93)}25%{transform:scale(.96,1.06)}50%{transform:scale(1.04,.96)}72%{transform:scale(.99,1.02)}100%{transform:none}}
@keyframes bm-talk{from{transform:rotate(-1.4deg) scaleY(1)}to{transform:rotate(1.4deg) scaleY(1.02)}}
@keyframes bm-spark{0%{opacity:0;transform:translate(0,0) scale(.3)}20%{opacity:1}100%{opacity:0;transform:translate(var(--sx,6px),-46px) scale(1.15)}}
@keyframes bm-intro{0%,35%{transform:translateY(112%)}70%{transform:translateY(-5%)}85%{transform:translateY(2%)}100%{transform:none}}
@keyframes bm-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes bm-dot{0%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-5px);opacity:1}}

@media (prefers-reduced-motion:reduce){
  #bee-mascot .bm-float,#bee-mascot .bm-glow,#bee-mascot .bm-shadow,#bee-mascot .bm-act,#bee-mascot.bm--intro .bm-char,#bee-mascot .bm-msg{animation:none !important}
  #bee-mascot .bm-char,#bee-mascot .bm-panel,#bee-mascot .bm-bubble,#bee-mascot .bm-tilt{transition:none !important}
}
@media print{#bee-mascot{display:none !important}}
