#sa-pati-dock{position:fixed;z-index:900;bottom:calc(18px + env(safe-area-inset-bottom));right:14px;font-family:system-ui,sans-serif;color:#16423c}#sa-pati-dock [hidden]{display:none!important}#sa-pati-launcher{display:flex;align-items:center;gap:3px;justify-content:center;width:80px;height:58px;min-height:0;border:1px solid #bee2dc;border-radius:30px;background:#fff;color:#087e72;box-shadow:0 5px 24px #1233;cursor:pointer;padding:5px 8px;font-size:12px;font-weight:700}#sa-pati-launcher svg{width:44px;height:36px;flex:none;display:block}#sa-pati-launcher:focus-visible,#sa-pati-hide:focus-visible{outline:3px solid #087e72;outline-offset:2px}#sa-pati-panel{display:flex;flex-direction:column;position:absolute;right:0;bottom:0;width:min(430px,calc(100vw - 28px));height:min(680px,calc(86dvh - 22px));border:1px solid #b7dcd6;border-radius:18px;overflow:hidden;background:#f5faf9;box-shadow:0 10px 42px #1235}#sa-pati-panelbar{display:flex;align-items:center;justify-content:space-between;flex:0 0 44px;padding:4px 10px;background:#087e72;color:white;font-size:13px;font-weight:650}#sa-pati-hide{border:1px solid #fff7;border-radius:8px;background:#fff;color:#075f56;padding:6px 12px;min-height:0;cursor:pointer;font-size:13px}#sa-pati-slot{flex:1;min-height:0}#sa-pati-frame{display:block;width:100%;height:100%;border:0;background:#f5faf9}@media(max-width:480px){#sa-pati-dock{right:9px;bottom:calc(12px + env(safe-area-inset-bottom))}#sa-pati-panel{width:calc(100vw - 18px);height:min(720px,calc(90dvh - 22px))}}
.pati-eyes-happy,.pati-eyes-sad,.pati-eyes-curious,.pati-mouth-happy,.pati-mouth-sad,.pati-mouth-speak{display:none}
[data-pati-mood=happy] .pati-eyes-neutral,[data-pati-mood=happy] .pati-mouth-neutral{display:none}
[data-pati-mood=happy] .pati-eyes-happy,[data-pati-mood=happy] .pati-mouth-happy{display:block}
[data-pati-mood=sad] .pati-eyes-neutral,[data-pati-mood=sad] .pati-mouth-neutral{display:none}
[data-pati-mood=sad] .pati-eyes-sad,[data-pati-mood=sad] .pati-mouth-sad{display:block}
[data-pati-mood=curious] .pati-eyes-curious,[data-pati-action=thinking] .pati-eyes-curious{display:block}
[data-pati-action=speaking]:not([data-pati-mood=sad]) .pati-mouth-neutral,[data-pati-action=speaking]:not([data-pati-mood=sad]) .pati-mouth-happy{display:none}
[data-pati-action=speaking]:not([data-pati-mood=sad]) .pati-mouth-speak{display:block;transform-box:fill-box;transform-origin:center;animation:pati-mouth .28s ease-in-out infinite alternate}
.pati-tail{transform-box:fill-box;transform-origin:bottom left;animation:pati-wag 1.5s ease-in-out infinite alternate}
.pati-eyes-neutral{transform-box:fill-box;transform-origin:center;animation:pati-blink 5.8s linear infinite}
[data-pati-action=listening] .pati-head{transform-box:fill-box;transform-origin:center bottom;transform:rotate(-4deg)}
[data-pati-mood=sad] .pati-tail{animation-duration:3s}
[data-pati-mood=happy] .pati-tail{animation-duration:.55s}
@keyframes pati-mouth{from{transform:scaleY(.55)}to{transform:scaleY(1.3)}}
@keyframes pati-blink{0%,94%,100%{transform:scaleY(1)}96%,97%{transform:scaleY(.1)}}
@keyframes pati-wag{from{transform:rotate(-9deg)}to{transform:rotate(12deg)}}
@keyframes pati-gait{from{transform:rotate(-13deg)}to{transform:rotate(14deg)}}
@media(prefers-reduced-motion:reduce){.pati-tail,.pati-eyes-neutral,.pati-mouth-speak,.leg{animation:none!important}}

#sa-pati-launcher{width:112px;height:66px;padding:3px 7px;border-radius:36px;background:#fffdf9;gap:0}
#sa-pati-launcher svg{width:84px;height:57px;filter:drop-shadow(0 2px 2px #344a4225)}
#sa-pati-launcher span{font-size:10px;margin-left:-3px}
#sa-pati-dock[data-roam-home="1"]{bottom:calc(78px + env(safe-area-inset-bottom))}
#sa-pati-dock[data-roam-home="1"] #sa-pati-panel{height:min(680px,calc(100dvh - 102px))}
#sa-pati-dock.sa-pati-roaming #sa-pati-launcher{animation:sa-pati-walk 14s linear 1}
#sa-pati-dock.sa-pati-roaming #sa-pati-launcher svg{animation:sa-pati-turn 14s linear 1}
#sa-pati-dock.sa-pati-roaming #sa-pati-launcher .leg{transform-box:fill-box;transform-origin:top center;animation:pati-gait .32s ease-in-out infinite alternate}
#sa-pati-dock.sa-pati-roaming #sa-pati-launcher .pati-front-far,#sa-pati-dock.sa-pati-roaming #sa-pati-launcher .pati-back-near{animation-delay:-.32s}
#sa-pati-dock.sa-pati-roaming #sa-pati-launcher:hover,#sa-pati-dock.sa-pati-roaming #sa-pati-launcher:hover svg,#sa-pati-dock.sa-pati-roaming #sa-pati-launcher:hover .leg,#sa-pati-dock.sa-pati-roaming #sa-pati-launcher:focus-visible,#sa-pati-dock.sa-pati-roaming #sa-pati-launcher:focus-visible svg,#sa-pati-dock.sa-pati-roaming #sa-pati-launcher:focus-visible .leg{animation-play-state:paused}
@keyframes sa-pati-walk{0%,100%{transform:translateX(0)}49.8%,50.2%{transform:translateX(calc(-100vw + 140px))}}
@keyframes sa-pati-turn{0%,49.9%{transform:scaleX(1)}50%,99.9%{transform:scaleX(-1)}100%{transform:scaleX(1)}}
@media(max-width:480px){#sa-pati-launcher{width:104px;height:62px}#sa-pati-launcher svg{width:76px;height:53px}}
@media(prefers-reduced-motion:reduce){#sa-pati-dock #sa-pati-launcher,#sa-pati-dock #sa-pati-launcher svg,#sa-pati-dock #sa-pati-launcher .leg{animation:none!important}}

/* Shared adaptive Pati shell; never blocks full-screen media. */
#sa-pati-dock{position:fixed!important;z-index:900;right:max(10px,env(safe-area-inset-right));left:auto;top:auto;bottom:var(--sa-pati-bottom,calc(78px + env(safe-area-inset-bottom)))!important;pointer-events:none;max-width:calc(100vw - 20px)}
#sa-pati-dock[hidden],#sa-pati-dock [hidden]{display:none!important}
#sa-pati-dock #sa-pati-launcher,#sa-pati-dock #sa-pati-panel{pointer-events:auto}
#sa-pati-dock.sa-pati-left{left:max(10px,env(safe-area-inset-left));right:auto}
#sa-pati-dock.sa-pati-compact #sa-pati-launcher{width:52px!important;height:48px!important;min-width:0;padding:2px!important;border-radius:24px;gap:0}
#sa-pati-dock.sa-pati-compact #sa-pati-launcher svg{width:45px!important;height:37px!important}
#sa-pati-dock.sa-pati-compact #sa-pati-launcher span{display:none}
#sa-pati-dock #sa-pati-panel{height:min(680px,calc(var(--sa-pati-view-height,100dvh) - 94px));width:min(430px,calc(100vw - 20px))}
html:fullscreen #sa-pati-dock,html:has(:fullscreen) #sa-pati-dock,body:has(.sf-stream-expanded,.sf-gallery-dialog[open],.sf-story-dialog[open],.sc-dialog[open]) #sa-pati-dock,body.sf-stream-open #sa-pati-dock{display:none!important;pointer-events:none!important}
@media(max-width:480px){#sa-pati-dock #sa-pati-panel{width:calc(100vw - 20px)}}
@media(prefers-reduced-motion:reduce){#sa-pati-dock *{animation:none!important;transition:none!important}}
