
.ape-ai-hidden{display:none!important}
#ape-ai-widget, #ape-ai-widget *{box-sizing:border-box;font-family:'Poppins',sans-serif}
#ape-ai-widget{position:fixed;right:20px;bottom:20px;z-index:999999;color:#214338}
#ape-ai-widget.ape-ai-closed .ape-ai-panel{display:none}
#ape-ai-widget.ape-ai-panel-hidden .ape-ai-panel,#ape-ai-widget.ape-ai-panel-hidden .ape-ai-teaser{display:none}
.ape-ai-launcher{position:absolute;right:0;bottom:0;width:72px;height:72px;border:none;border-radius:24px;background:#0d7f63;box-shadow:0 10px 30px rgba(0,0,0,.18);cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center}
.ape-ai-launcher:hover{transform:translateY(-1px)}
.ape-ai-teaser{position:absolute;right:86px;bottom:8px;display:flex;align-items:flex-end;gap:10px;max-width:320px;animation:apeFloat 3s ease-in-out infinite}
.ape-ai-teaser-bubble{background:#fff;border-radius:20px;padding:14px 16px;box-shadow:0 10px 30px rgba(0,0,0,.14);font-size:14px;line-height:1.4;color:#37584e}
.ape-ai-panel{position:absolute;right:0;bottom:88px;width:min(420px,calc(100vw - 24px));height:min(760px,70vh);display:flex;flex-direction:column;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.18)}
.ape-ai-header{display:flex;align-items:flex-start;justify-content:space-between;padding:18px 18px 16px;border-bottom:1px solid #e7eeea;flex:0 0 auto;gap:16px}
.ape-ai-header-left{display:flex;gap:14px;align-items:flex-start;min-width:0}
.ape-ai-title-wrap{min-width:0}
.ape-ai-title{font-size:24px;font-weight:700;line-height:1.1;color:#3d464a;margin:0}
.ape-ai-subtitle{font-size:14px;color:#4d5d56;margin-top:8px}
.ape-ai-header-actions{display:flex;gap:12px;flex-shrink:0}
.ape-ai-icon-btn{width:54px;height:38px;border:none;border-radius:14px;background:#0d7f63;color:#fff;font-size:26px;font-weight:700;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}
.ape-ai-icon-btn.close{font-size:28px}
.ape-ai-body{display:flex;flex-direction:column;gap:12px;padding:14px 12px 12px;min-height:0;flex:1 1 auto;overflow:hidden;background:#f8faf9}
.ape-ai-context{display:none;background:#eef5f0;border-radius:18px;padding:10px 12px;flex:0 0 auto}
.ape-ai-context.visible{display:flex;gap:10px;flex-wrap:wrap}
.ape-ai-pill{display:inline-flex;align-items:center;gap:4px;padding:10px 14px;border-radius:999px;background:#e6f0e8;color:#2c5c4a;font-size:14px;line-height:1.2;max-width:100%}
.ape-ai-pill strong{font-weight:700}
.ape-ai-actions{display:flex;flex-direction:column;align-items:flex-start;gap:10px;flex:0 0 auto;padding:0 2px}
.ape-ai-links{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.ape-ai-link{background:none;border:none;padding:0;color:#0d7f63;font-size:14px;font-weight:600;cursor:pointer;text-decoration:none;box-shadow:none}
.ape-ai-link:hover{text-decoration:underline}
.ape-ai-main-action{border:none;border-radius:16px;background:#0d7f63;color:#fff;padding:13px 16px;font-size:15px;font-weight:700;cursor:pointer;box-shadow:0 6px 12px rgba(13,127,99,.18)}
.ape-ai-main-action[disabled]{opacity:.6;cursor:not-allowed}
.ape-ai-messages{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:4px 6px 10px;scrollbar-width:thin;cursor:grab;overscroll-behavior:contain}
.ape-ai-messages.dragging{cursor:grabbing;user-select:none}
.ape-ai-message{display:flex;gap:10px;align-items:flex-end;margin:12px 0}
.ape-ai-message.user{justify-content:flex-end}
.ape-ai-bubble{max-width:78%;padding:15px 16px;border-radius:18px;background:#fff;color:#434343;box-shadow:0 4px 14px rgba(0,0,0,.08);font-size:15px;line-height:1.55;word-wrap:break-word}
.ape-ai-message.user .ape-ai-bubble{background:#0d7f63;color:#fff}
.ape-ai-footer{display:flex;gap:10px;align-items:flex-end;padding:10px 12px 12px;border-top:1px solid #e7eeea;background:#fff;flex:0 0 auto}
.ape-ai-input{flex:1 1 auto;min-height:48px;max-height:120px;border:1px solid #d9e5de;border-radius:16px;padding:12px 14px;resize:vertical;font-size:14px;line-height:1.4;color:#27443c;outline:none}
.ape-ai-send{flex:0 0 auto;border:none;border-radius:16px;background:#0d7f63;color:#fff;padding:0 16px;height:48px;font-weight:700;cursor:pointer}
.ape-ai-note{font-size:11px;color:#73847d;padding:0 14px 8px;background:#fff}
#ape-ai-widget.ape-ai-minimized .ape-ai-body,#ape-ai-widget.ape-ai-minimized .ape-ai-footer,#ape-ai-widget.ape-ai-minimized .ape-ai-note{display:none}
#ape-ai-widget.ape-ai-minimized .ape-ai-panel{height:auto;max-height:none}
#ape-ai-widget.ape-ai-minimized .ape-ai-header{border-bottom:none}
@keyframes apeFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes eyeBlink{0%,45%,100%{transform:scaleY(1)}48%,52%{transform:scaleY(.08)}}
.ape-mascot{position:relative;display:inline-block;flex:0 0 auto}
.ape-mascot--small{width:58px;height:58px}.ape-mascot--medium{width:68px;height:68px}.ape-mascot--large{width:86px;height:86px}
.ape-mascot__image{width:100%;height:100%;object-fit:contain;display:block}
.ape-mascot--house_blink .ape-mascot__image,.ape-mascot--house_blink .ape-mascot__base{border-radius:16px}
.ape-mascot__base{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}
.ape-mascot--apetta .ape-mascot__base{background:radial-gradient(circle at 30% 30%,#ffd868,#ffb938 65%,#ea9312 100%)}
.ape-mascot--guide_orb .ape-mascot__base{background:radial-gradient(circle at 30% 30%,#ffffff,#e8f0ff 35%,#78b3ff 68%,#3478ff 100%)}
.ape-mascot--apetta .ape-mascot__base::before,.ape-mascot--apetta .ape-mascot__base::after,.ape-mascot--guide_orb .ape-mascot__base::before,.ape-mascot--guide_orb .ape-mascot__base::after{content:'';position:absolute;background:#111;border-radius:999px;width:10%;height:18%;top:35%;animation:eyeBlink 5.5s infinite;transform-origin:center center}
.ape-mascot--apetta .ape-mascot__base::before,.ape-mascot--guide_orb .ape-mascot__base::before{left:33%}
.ape-mascot--apetta .ape-mascot__base::after,.ape-mascot--guide_orb .ape-mascot__base::after{right:33%}
.ape-mascot--apetta .ape-mascot__smile,.ape-mascot--guide_orb .ape-mascot__smile{position:absolute;left:50%;bottom:28%;width:34%;height:16%;transform:translateX(-50%);border-bottom:4px solid #111;border-radius:0 0 40px 40px}
.ape-mascot--house_blink .ape-mascot__eye{position:absolute;width:12%;height:18%;background:#111;border-radius:999px;top:45%;animation:eyeBlink 5.2s infinite;transform-origin:center center;box-shadow:0 0 0 2px rgba(255,255,255,.15) inset}
.ape-mascot--house_blink .ape-mascot__eye.left{left:40.5%}
.ape-mascot--house_blink .ape-mascot__eye.right{left:54.5%}
.ape-mascot--house_blink.ape-mascot--small .ape-mascot__eye{top:45%;width:12%;height:18%}
@media (max-width:640px){#ape-ai-widget{right:12px;left:12px;bottom:12px}.ape-ai-panel{width:auto;left:0;right:0}.ape-ai-teaser{right:78px;max-width:min(250px,calc(100vw - 120px))}.ape-ai-title{font-size:21px}.ape-ai-icon-btn{width:48px;height:36px}}

.ape-ai-bubble-thinking{display:inline-flex;align-items:center;gap:10px;color:#335a4d}
.ape-ai-spinner{width:16px;height:16px;border:2px solid rgba(13,127,99,.18);border-top-color:#0d7f63;border-radius:50%;display:inline-block;animation:apeSpin .8s linear infinite}
@keyframes apeSpin{to{transform:rotate(360deg)}}
