#ally-pal{position:fixed;right:22px;bottom:20px;z-index:80;font-family:Montserrat,Arial,sans-serif}#ally-pal [hidden],#ally-pal[hidden]{display:none!important}.ally-pal-launch{width:84px;height:84px;background:transparent!important;border:0!important;padding:0!important;box-shadow:none!important;animation:pal-float 4s ease-in-out infinite}.ally-pal-body{position:relative;display:inline-block;width:72px;height:66px;border-radius:45% 45% 42% 42%;background:linear-gradient(145deg,#64d8ee,#2788c2 60%,#145781);box-shadow:inset 0 3px 0 #a0ecf4,0 8px 20px #143c6840;vertical-align:middle}.ally-pal-ear{position:absolute;top:-10px;width:22px;height:30px;background:#42b9db;border-radius:90% 20% 60% 20%}.ally-pal-ear.left{left:7px;transform:rotate(-25deg)}.ally-pal-ear.right{right:7px;transform:rotate(60deg)}.ally-pal-eye{position:absolute;top:24px;width:8px;height:12px;background:#103b5e;border-radius:50%;box-shadow:inset 2px 2px 0 white;animation:pal-blink 6s infinite}.ally-pal-eye.left{left:20px}.ally-pal-eye.right{right:20px}.ally-pal-smile{position:absolute;left:30px;top:38px;width:13px;height:8px;border-bottom:3px solid #103b5e;border-radius:50%}.ally-pal-heart{position:absolute;right:0;bottom:-5px;color:#ffcc75;font-size:23px;text-shadow:0 2px 3px #135781}.ally-pal-hello{position:absolute;right:5px;bottom:102px;width:240px;background:white;color:#163d60;border:1px solid #d7e8ee;border-radius:20px 20px 4px 20px;padding:16px 30px 16px 16px;box-shadow:0 8px 25px #0f3d6820;font-size:13px;line-height:1.5}.ally-pal-hello button{position:absolute;right:3px;top:3px;background:transparent;color:#315b73;padding:3px 8px;border:0}.ally-pal-panel{position:absolute;right:0;bottom:100px;width:420px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 135px);overflow:auto;background:#fff;border:1px solid #cde2eb;border-radius:24px;box-shadow:0 16px 60px #0f3d683b;color:#183f60}.ally-pal-panel header{display:flex;align-items:center;gap:12px;background:#eaf7fb;padding:16px;border-radius:24px 24px 0 0}.ally-pal-panel header .ally-pal-body{transform:scale(.6);margin:-10px -12px}.ally-pal-panel header strong{display:block;font-size:17px}.ally-pal-panel small{display:block;font-size:11px;margin-top:5px}.ally-pal-close{margin-left:auto;background:transparent!important;color:#234b65!important;border:0!important;font-size:23px;padding:2px 9px!important}.ally-pal-intro{padding:16px 18px 8px;font-size:14px;line-height:1.5}.ally-pal-shortcuts{display:flex;flex-wrap:wrap;gap:6px;padding:8px 18px}.ally-pal-shortcuts button,.ally-pal-clear{background:#edf6fa!important;color:#174e70!important;border:1px solid #d2e7ef!important;border-radius:12px;padding:7px 10px!important;font-size:11px}.ally-pal-notice{margin:6px 18px;font-size:10px;line-height:1.5;color:#607383}.ally-pal-thread{max-height:270px;overflow:auto;padding:10px 18px}.ally-pal-thread article{padding:12px;margin:8px 0;border-radius:14px;font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.ally-pal-thread strong{display:block;font-size:10px;margin-bottom:4px}.pal-you{background:#e7f5fb;margin-left:25px!important}.pal-answer{background:#f3f5f7;margin-right:15px!important}.ally-pal-form,.ally-pal-task{padding:10px 18px}.ally-pal-form label,.ally-pal-task label{font-size:12px;display:block;margin-bottom:5px}.ally-pal-panel textarea,.ally-pal-panel input{width:100%;box-sizing:border-box;margin:0 0 8px;font:13px Montserrat,Arial,sans-serif;border:1px solid #c4dae4;border-radius:10px;padding:10px}.ally-pal-controls{display:flex;gap:8px}.ally-pal-controls select{width:auto;max-width:130px;font-size:11px;padding:6px}.ally-pal-controls button,.ally-pal-task button{padding:8px 13px;font-size:12px;border-radius:12px}.ally-pal-status,.ally-pal-task-status{font-size:11px;margin:7px 0;line-height:1.5}.ally-pal-task summary{font-size:12px;cursor:pointer}.ally-pal-task form{padding-top:10px}.ally-pal-clear{margin:5px 18px 16px}#ally-pal button:focus-visible{outline:3px solid #dfaa43;outline-offset:3px}@keyframes pal-float{50%{transform:translateY(-7px) rotate(2deg)}}@keyframes pal-blink{0%,44%,48%,100%{transform:scaleY(1)}46%{transform:scaleY(.15)}}@media(prefers-reduced-motion:reduce){.ally-pal-launch,.ally-pal-eye{animation:none}}@media(max-width:600px){#ally-pal{right:12px;bottom:10px}.ally-pal-launch{width:70px;height:72px}.ally-pal-body{transform:scale(.85)}.ally-pal-panel{bottom:85px;max-height:calc(100dvh - 105px)}.ally-pal-hello{bottom:90px}.ally-pal-thread{max-height:220px}}
#ally-pal .ally-pal-form textarea{background:#dceff9!important;color:#153e5f;border:2px solid #85bbd5;min-height:105px}#ally-pal .ally-pal-form textarea::placeholder{color:#55788f;opacity:1}#ally-pal .ally-pal-form textarea:focus{background:#d3eaf7!important;outline:3px solid #9dd4e3;outline-offset:2px}.ally-pal-voice-consent{padding:12px;background:#e0f0f8;border:1px solid #98c5da;border-radius:12px;font-size:12px;line-height:1.5}.ally-pal-voice-consent button{margin:4px;padding:8px;font-size:11px}

/* Round Ally face, with expressions driven by actual companion activity. */
#ally-pal .ally-pal-body{width:72px;height:72px;border-radius:50%;background:radial-gradient(ellipse at 72% 18%,#8dfcf5aa,transparent 34%),radial-gradient(ellipse at 23% 78%,#02abef,transparent 48%),linear-gradient(155deg,#48e1f1 8%,#22c5ec 48%,#079bdd 100%);box-shadow:inset 0 2px 3px #c7ffffa0,inset -3px -5px 8px #0080c245,0 8px 18px #0f3d682b;overflow:hidden}
#ally-pal .ally-pal-eye{top:27px;width:19px;height:23px;background:linear-gradient(145deg,#fff,#ecf3f7);border-radius:52% 52% 45% 45%;border-top:2px solid #122849;box-shadow:inset 0 0 2px #0d224a70;animation:pal-face-blink 6s infinite;transform-origin:center}
#ally-pal .ally-pal-eye.left{left:13px}#ally-pal .ally-pal-eye.right{right:13px}
.ally-pal-pupil{position:absolute;right:0;top:3px;width:14px;height:19px;border-radius:50%;background:radial-gradient(ellipse at 40% 25%,white 0 17%,transparent 20%),radial-gradient(ellipse at 57% 44%,#05172d 0 48%,transparent 51%),linear-gradient(#154758,#1bc8c1);transition:transform .3s}
#ally-pal .ally-pal-eye.right .ally-pal-pupil{right:auto;left:0}
.ally-pal-brow{position:absolute;top:19px;width:15px;height:6px;border-top:4px solid #142440;border-radius:65%;transition:transform .3s,top .3s}
.ally-pal-brow.left{left:15px;transform:rotate(-22deg)}.ally-pal-brow.right{right:15px;transform:rotate(22deg)}
#ally-pal .ally-pal-smile{left:28px;top:51px;width:18px;height:9px;background:#112541;border:0;border-radius:8% 8% 60% 60%;clip-path:polygon(0 0,15% 30%,35% 45%,65% 45%,85% 30%,100% 0,90% 70%,65% 100%,35% 100%,10% 70%);transition:all .3s}
.ally-pal-cheek{position:absolute;top:47px;width:13px;height:9px;border-radius:50%;background:#61f8ded0;filter:blur(3px);opacity:.65}.ally-pal-cheek.left{left:7px}.ally-pal-cheek.right{right:7px}
#ally-pal[data-expression="listening"] .ally-pal-body{box-shadow:inset 0 2px 3px #c7ffffa0,0 0 0 5px #51dace30,0 8px 18px #0f3d682b}
#ally-pal[data-expression="listening"] .ally-pal-brow{top:15px}
#ally-pal[data-expression="listening"] .ally-pal-smile{left:33px;top:53px;width:7px;height:7px;border-radius:50%;clip-path:none}
#ally-pal[data-expression="listening"] .ally-pal-pupil{transform:translateY(-2px)}
#ally-pal[data-expression="thinking"] .ally-pal-pupil{animation:pal-look 2s ease-in-out infinite}
#ally-pal[data-expression="thinking"] .ally-pal-brow.left{transform:rotate(-35deg);top:15px}
#ally-pal[data-expression="thinking"] .ally-pal-smile{left:31px;top:54px;width:13px;height:4px;border-radius:50%;clip-path:none;transform:rotate(-10deg)}
#ally-pal[data-expression="happy"] .ally-pal-smile{left:25px;top:50px;width:23px;height:13px}
#ally-pal[data-expression="happy"] .ally-pal-cheek{opacity:1}
#ally-pal[data-expression="happy"] .ally-pal-launch{animation:pal-happy 1.5s ease-in-out 2,pal-float 4s ease-in-out infinite}
#ally-pal[data-expression="concerned"] .ally-pal-brow.left{transform:rotate(24deg)}
#ally-pal[data-expression="concerned"] .ally-pal-brow.right{transform:rotate(-24deg)}
#ally-pal[data-expression="concerned"] .ally-pal-smile{left:30px;top:55px;width:13px;height:3px;clip-path:none;border-radius:50%}
.ally-pal-controls{flex-wrap:wrap}
.ally-pal-live-consent{padding:12px;background:#e0f0f8;border:1px solid #98c5da;border-radius:12px;font-size:12px;line-height:1.5}
.ally-pal-live-consent button{margin:4px;padding:8px;font-size:11px}
@keyframes pal-face-blink{0%,43%,47%,100%{transform:scaleY(1)}45%{transform:scaleY(.08)}}
@keyframes pal-look{0%,100%{transform:translate(-2px,-2px)}50%{transform:translate(2px,-1px)}}
@keyframes pal-happy{0%,100%{transform:translateY(0)}50%{transform:translateY(-9px) rotate(-3deg)}}
@media(prefers-reduced-motion:reduce){#ally-pal .ally-pal-launch,#ally-pal .ally-pal-eye,#ally-pal .ally-pal-pupil{animation:none!important}#ally-pal .ally-pal-smile,#ally-pal .ally-pal-brow,#ally-pal .ally-pal-pupil{transition:none}}

/* Separate companion surfaces from the pale Hub background. */
#ally-pal .ally-pal-hello{background:#124c75;color:#fff;border:2px solid #73c9e7;box-shadow:0 8px 28px #0c355b45}
#ally-pal .ally-pal-hello button{color:#fff}
#ally-pal .ally-pal-panel{background:#d5eaf5;border:2px solid #4797bb;box-shadow:0 18px 65px #0c355b55}
#ally-pal .ally-pal-panel header{background:#b9dff0;border-bottom:1px solid #80b6ce}
#ally-pal .ally-pal-notice{color:#365b70}
#ally-pal .pal-answer{background:#edf6fc;border:1px solid #92b9d0}
#ally-pal .pal-you{background:#155783;color:#fff;border:1px solid #0f4469}
#ally-pal .ally-pal-form textarea{background:#eef8ff!important;border-color:#5b9bb9}
#ally-pal .ally-pal-form textarea:focus{background:#e4f4ff!important}

/* Compact mascot with a comfortable touch target. */
#ally-pal .ally-pal-launch{width:60px;height:60px;display:flex;align-items:center;justify-content:center}
#ally-pal .ally-pal-launch .ally-pal-body{transform:scale(.62);flex-shrink:0}
#ally-pal .ally-pal-panel header .ally-pal-body{transform:scale(.46);margin:-17px -17px}
#ally-pal .ally-pal-hello{bottom:76px}
#ally-pal .ally-pal-panel{bottom:76px}
@media(max-width:600px){#ally-pal .ally-pal-launch{width:54px;height:54px}#ally-pal .ally-pal-launch .ally-pal-body{transform:scale(.56)}#ally-pal .ally-pal-hello,#ally-pal .ally-pal-panel{bottom:68px}}

/* Soft grounding shadow for the expressive round companion. */
#ally-pal .ally-pal-body{box-shadow:inset 0 2px 3px #c7ffffa0,inset -3px -5px 8px #0080c245,0 7px 14px #0f3d6845}
#ally-pal[data-expression="listening"] .ally-pal-body{box-shadow:inset 0 2px 3px #c7ffffa0,0 0 0 5px #51dace30,0 7px 14px #0f3d6845}

.ally-pal-privacy{margin:0 18px 16px;font-size:11px;color:#365b70}.ally-pal-privacy summary{cursor:pointer;padding:6px 0}.ally-pal-privacy .ally-pal-notice{margin:6px 0}.ally-pal-thread:empty{display:none}

/* Thought-cloud greeting, connected to Ally with two small dots. */
#ally-pal .ally-pal-hello{border-radius:32px 36px 30px 34px;padding:17px 30px 17px 18px;overflow:visible}
#ally-pal .ally-pal-hello::before,#ally-pal .ally-pal-hello::after{content:"";position:absolute;background:#124c75;border:2px solid #73c9e7;border-radius:50%;box-shadow:0 3px 7px #0c355b25}
#ally-pal .ally-pal-hello::before{width:15px;height:12px;right:25px;bottom:-17px}
#ally-pal .ally-pal-hello::after{width:7px;height:7px;right:16px;bottom:-30px}
.ally-pal-encouragement{margin:7px 18px;padding:10px 12px;background:#e8f6fb;border-left:3px solid #31aabd;border-radius:10px;color:#24546e;font-size:11px;line-height:1.5}

/* A scalloped thought cloud instead of a pill-shaped speech bubble. */
#ally-pal .ally-pal-hello{width:280px;min-height:112px;box-sizing:border-box;padding:29px 37px 25px;background:transparent;border:0;border-radius:0;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20320%20140%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M42%2030%20C34%2010%2072%202%2093%2015%20C106%201%20147%201%20163%2015%20C184%202%20220%203%20235%2018%20C262%205%20295%2018%20291%2037%20C315%2042%20325%2068%20305%2083%20C316%20106%20291%20124%20267%20118%20C256%20139%20218%20140%20200%20126%20C177%20141%20147%20139%20134%20125%20C108%20143%2075%20132%2067%20116%20C40%20130%2014%20109%2023%2090%20C-2%2082%202%2054%2024%2047%20C18%2033%2031%2024%2042%2030%20Z%22%20fill%3D%22%23124c75%22%20stroke%3D%22%2373c9e7%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E");background-size:100% 100%;background-repeat:no-repeat;box-shadow:none;filter:drop-shadow(0 5px 8px #0c355b38);bottom:84px;right:0}
#ally-pal .ally-pal-hello button{right:24px;top:18px;font-size:15px}
#ally-pal .ally-pal-hello::before{right:32px;bottom:-13px;width:14px;height:11px}
#ally-pal .ally-pal-hello::after{right:21px;bottom:-26px;width:7px;height:7px}
@media(max-width:600px){#ally-pal .ally-pal-hello{width:260px;max-width:calc(100vw - 28px);bottom:76px;padding:28px 33px 24px}}

/* Restore the original greeting bubble shape. */
#ally-pal .ally-pal-hello{width:240px;min-height:0;box-sizing:content-box;padding:16px 30px 16px 16px;background:#124c75;background-image:none;border:2px solid #73c9e7;border-radius:20px 20px 4px 20px;box-shadow:0 8px 28px #0c355b45;filter:none;bottom:76px;right:5px}
#ally-pal .ally-pal-hello::before,#ally-pal .ally-pal-hello::after{display:none}
#ally-pal .ally-pal-hello button{right:3px;top:3px;font-size:13px}
@media(max-width:600px){#ally-pal .ally-pal-hello{bottom:68px;width:240px;max-width:calc(100vw - 76px)}}

/* Keep the chat controls compact, especially on phones. */
#ally-pal .ally-pal-controls select,#ally-pal .ally-pal-record{display:none}
#ally-pal .ally-pal-controls{flex-wrap:nowrap;justify-content:flex-end;gap:8px}
#ally-pal .ally-pal-status:empty{display:none}
#ally-pal .ally-pal-form{padding-bottom:4px}
#ally-pal .ally-pal-clear{display:inline-block;vertical-align:middle;margin:4px 10px 10px 18px}
#ally-pal .ally-pal-privacy{display:inline-block;vertical-align:middle;margin:4px 18px 10px 0}
#ally-pal .ally-pal-privacy[open]{display:block;margin:0 18px 12px}
#ally-pal .ally-pal-privacy summary{padding:4px 0}

/* Full body Ally, compact and grounded with a soft shadow. */
#ally-pal .ally-pal-mascot{display:block;width:64px;height:54px;object-fit:contain;filter:drop-shadow(0 5px 4px #0f3d6845);transform-origin:center bottom}
#ally-pal .ally-pal-launch{width:68px;height:60px}
#ally-pal .ally-pal-panel header .ally-pal-mascot{width:42px;height:36px;flex-shrink:0}
#ally-pal[data-expression="listening"] .ally-pal-mascot{animation:pal-listen 1.8s ease-in-out infinite}
#ally-pal[data-expression="thinking"] .ally-pal-mascot{animation:pal-think 2.4s ease-in-out infinite}
#ally-pal[data-expression="concerned"] .ally-pal-mascot{transform:rotate(-5deg)}
@keyframes pal-listen{50%{transform:rotate(4deg)}}
@keyframes pal-think{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(4deg) translateY(-2px)}}
@media(max-width:600px){#ally-pal .ally-pal-launch{width:60px;height:54px}#ally-pal .ally-pal-mascot{width:56px;height:47px}}
@media(prefers-reduced-motion:reduce){#ally-pal .ally-pal-mascot{animation:none!important;transform:none!important}}

/* Border-free companion surfaces; color and soft shadows define their edges. */
#ally-pal .ally-pal-hello,#ally-pal .ally-pal-panel,#ally-pal .pal-answer,#ally-pal .pal-you{border:0!important;outline:none!important}
#ally-pal .ally-pal-panel header{border:0!important}
#ally-pal .ally-pal-form textarea,#ally-pal .ally-pal-form textarea:focus,#ally-pal .ally-pal-form textarea:focus-visible{border:0!important;outline:none!important;box-shadow:none!important}

/* Anchor to the visible screen rather than an overflowing document. */
#ally-pal{right:auto;bottom:auto;width:0;height:0;max-width:none;z-index:80}
#ally-pal,#ally-pal *{box-sizing:border-box}
#ally-pal .ally-pal-launch{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));width:60px;height:60px;min-width:60px;min-height:60px;margin:0;animation:none;touch-action:manipulation}
#ally-pal .ally-pal-mascot{width:56px;height:48px;max-width:100%;object-fit:contain}
#ally-pal .ally-pal-hello{right:max(16px,env(safe-area-inset-right));bottom:calc(max(16px,env(safe-area-inset-bottom)) + 72px);width:272px;max-width:calc(var(--pal-viewport-width,100vw) - 32px);padding:16px 48px 16px 16px;font-size:14px;line-height:1.5;overflow-wrap:anywhere;border-radius:18px 18px 6px 18px}
#ally-pal .ally-pal-hello button{width:44px;height:44px;min-width:44px;min-height:44px;right:0;top:0;margin:0;padding:0;font-size:20px;display:flex;align-items:center;justify-content:center}
#ally-pal .ally-pal-panel{right:max(16px,env(safe-area-inset-right));bottom:calc(max(16px,env(safe-area-inset-bottom)) + 72px);width:420px;max-width:calc(var(--pal-viewport-width,100vw) - 32px);max-height:calc(var(--pal-viewport-height,100dvh) - 104px - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain}
#ally-pal .ally-pal-close{min-width:44px;min-height:44px;flex-shrink:0}
#ally-pal .ally-pal-panel input,#ally-pal .ally-pal-panel textarea{font-size:16px}
@media(max-width:720px){
 #ally-pal .ally-pal-launch{width:56px;height:56px;min-width:56px;min-height:56px}
 #ally-pal .ally-pal-mascot{width:52px;height:44px}
 #ally-pal .ally-pal-panel{width:calc(var(--pal-viewport-width,100vw) - 32px);border-radius:20px}
 #ally-pal .ally-pal-hello{display:none}
 #ally-pal .ally-pal-thread{max-height:min(220px,28dvh)}
 .shell .main{padding-bottom:100px}
}
