.rg-rooky-launcher{
  --rg-rooky-size:112px;
  position:fixed;z-index:1000;isolation:isolate;
  inset:auto max(1rem,env(safe-area-inset-right)) max(.9rem,env(safe-area-inset-bottom)) auto;
  display:grid;justify-items:center;gap:1px;padding:0 0 .2rem;
  border:0;border-radius:1rem;background:transparent;color:#edfbff;
  font:700 12px/1.25 system-ui,sans-serif;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.rg-rooky-launcher::before{
  content:"";position:absolute;z-index:-1;inset:auto 10% 1.35rem;height:30%;
  border-radius:50%;background:radial-gradient(ellipse,#26d7ef50 0%,#31b6f32e 32%,transparent 72%);
  pointer-events:none;
}
.rg-rooky-icon{
  display:block;width:var(--rg-rooky-size);height:var(--rg-rooky-size);
  object-fit:contain;filter:drop-shadow(0 8px 10px #050917a6) drop-shadow(0 0 7px #3edcfa60);
  transform-origin:50% 72%;animation:rg-rooky-arrive 3.6s ease-in-out both;
}
.rg-rooky-launcher > span{
  padding:.28rem .52rem;border:1px solid #74e8fb47;border-radius:.5rem;
  background:#101d37;box-shadow:0 4px 12px #05091766;
}
.rg-rooky-launcher:is(:hover,:focus-visible) > span{border-color:#7eeafa;color:#fff}
.rg-rooky-launcher:is(:hover,:focus-visible) .rg-rooky-icon{animation:rg-rooky-greet .55s ease-out both}
@keyframes rg-rooky-arrive{
  0%,100%{transform:translateY(0) rotate(0)}
  45%{transform:translateY(-9px) rotate(-4deg)}
}
@keyframes rg-rooky-greet{
  to{transform:translateY(-7px) rotate(-4deg)}
}
@media(max-width:600px){
  .rg-rooky-launcher{--rg-rooky-size:86px;inset-inline-end:max(.6rem,env(safe-area-inset-right));inset-block-end:max(.6rem,env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce){
  .rg-rooky-icon,.rg-rooky-launcher:is(:hover,:focus-visible) .rg-rooky-icon{animation:none}
}
.rg-rooky-dialog{position:fixed;inset:auto max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) auto;margin:0;box-sizing:border-box;width:min(440px,calc(100vw - 2rem));height:min(620px,calc(100dvh - 2rem));max-width:none;max-height:none;padding:0;border:1px solid #456187;border-radius:1rem;background:#0a1326;color:#edfbff;box-shadow:0 15px 45px #000a;color-scheme:dark}
.rg-rooky-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr)}
.rg-rooky-dialog::backdrop{background:#050d1e66}
.rg-rooky-bar{display:flex;justify-content:space-between;align-items:center;padding:.42rem .65rem .42rem .95rem;border-bottom:1px solid #30486c}
.rg-rooky-bar h2{margin:0;color:#d8eafd;font:700 14px/1.2 system-ui,sans-serif}
.rg-rooky-close{min-width:44px;min-height:44px;padding:0;border:1px solid transparent;border-radius:.55rem;background:transparent;color:#edfbff;font:24px/1 system-ui,sans-serif;cursor:pointer}
.rg-rooky-close:hover{background:#1d3d5d}
.rg-rooky-frame{display:block;width:100%;height:100%;border:0}
.rg-rooky-launcher:focus-visible,.rg-rooky-close:focus-visible{outline:2px solid #7eeafa;outline-offset:3px}

.rg-rooky-launcher[data-rooky-character] .rg-rooky-pose{
  display:block;padding:0;border:0;background:none;box-shadow:none;
  transform:translate3d(var(--rg-look-x,0),var(--rg-look-y,0),0) rotate(var(--rg-look-turn,0));
  transform-origin:50% 73%;
  transition:transform 180ms cubic-bezier(.2,.8,.25,1);
}
.rg-rooky-launcher[data-rooky-character] .rg-rooky-icon{
  animation:rg-rooky-awake .62s cubic-bezier(.2,.75,.35,1) both;
}
.rg-rooky-launcher[data-rooky-character][data-rooky-nearby] .rg-rooky-icon,
.rg-rooky-launcher[data-rooky-character]:focus-visible .rg-rooky-icon{
  animation:rg-rooky-perk .42s cubic-bezier(.2,.75,.35,1) both;
}
.rg-rooky-launcher[data-rooky-character]:active .rg-rooky-pose{scale:.92}
.rg-rooky-bar h2{display:flex;align-items:center;gap:.45rem}
.rg-rooky-chat-character{display:block;object-fit:contain;flex:none;filter:drop-shadow(0 0 6px #3edcfa55)}
.rg-rooky-dialog[open] .rg-rooky-chat-character{animation:rg-rooky-hello .52s cubic-bezier(.2,.75,.35,1) both}
@keyframes rg-rooky-awake{
  0%,100%{transform:translateY(0) rotate(0)}
  50%{transform:translateY(-4px) rotate(-3deg)}
}
@keyframes rg-rooky-perk{
  0%{transform:translateY(0) rotate(0)}
  52%{transform:translateY(-8px) rotate(-5deg)}
  100%{transform:translateY(-3px) rotate(-2deg)}
}
@keyframes rg-rooky-hello{
  0%{transform:translateY(4px) scale(.82) rotate(-8deg)}
  66%{transform:translateY(-3px) scale(1.08) rotate(5deg)}
  100%{transform:translateY(0) scale(1) rotate(0)}
}
@media(prefers-reduced-motion:reduce){
  .rg-rooky-launcher[data-rooky-character] .rg-rooky-pose,
  .rg-rooky-launcher[data-rooky-character]:active .rg-rooky-pose{transition:none;transform:none;scale:none}
  .rg-rooky-launcher[data-rooky-character] .rg-rooky-icon,
  .rg-rooky-launcher[data-rooky-character][data-rooky-nearby] .rg-rooky-icon,
  .rg-rooky-launcher[data-rooky-character]:focus-visible .rg-rooky-icon,
  .rg-rooky-dialog[open] .rg-rooky-chat-character{animation:none}
}

.rg-rooky-rig{position:relative;display:inline-grid;flex:none;vertical-align:middle;isolation:isolate;transform-origin:50% 72%}
.rg-rooky-rig>img{display:block}
.rg-rooky-face{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.rg-rooky-eye{fill:#7cfff7;filter:drop-shadow(0 0 21px #20f9f0aa);transform-box:fill-box;transform-origin:center}
.rg-rooky-glint{fill:#efffff;opacity:0}
.rg-rooky-mouth{fill:none;stroke:#67e9e6;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;opacity:.82}
.rg-rooky-spark{fill:#95fffb;opacity:0;transform-box:fill-box;transform-origin:center}
.rg-rooky-rig[data-rooky-expression=curious] .rg-rooky-glint,
.rg-rooky-rig[data-rooky-expression=listening] .rg-rooky-glint{opacity:1}
.rg-rooky-rig[data-rooky-expression=hello] .rg-rooky-mouth,
.rg-rooky-rig[data-rooky-expression=pleased] .rg-rooky-mouth{fill:#7cfff7;stroke-width:5;opacity:1}
.rg-rooky-rig[data-rooky-expression=pleased] .rg-rooky-spark{opacity:.95;animation:rg-expression-spark .62s ease-out both}
.rg-rooky-rig[data-rooky-expression=concerned] .rg-rooky-eye{fill:#a6c9ef;filter:drop-shadow(0 0 11px #99bcff66)}
.rg-rooky-rig[data-rooky-expression=concerned] .rg-rooky-mouth{stroke:#8bacdf}
.rg-rooky-launcher[data-rooky-character] .rg-rooky-rig .rg-rooky-icon,
.rg-rooky-dialog[open] .rg-rooky-rig .rg-rooky-chat-character,
.activity .rg-rooky-rig>img{animation:none}
.rg-rooky-launcher .rg-rooky-rig[data-rooky-expression=idle] .rg-rooky-eye{animation:rg-expression-blink 5.2s 2 both}
.rg-rooky-launcher .rg-rooky-rig[data-rooky-expression=curious]{animation:rg-expression-perk .36s ease-out both}
.rg-rooky-rig[data-rooky-expression=hello]{animation:rg-expression-wink .58s ease-out both}
.rg-rooky-rig[data-rooky-expression=thinking] .rg-rooky-eye{animation:rg-expression-thought 2.2s ease-in-out infinite}
.rg-rooky-rig[data-rooky-expression=pleased]{animation:rg-expression-nod .52s ease-out both}
@keyframes rg-expression-blink{0%,62%,69%,100%{scale:1}65%{scale:1 .09}}
@keyframes rg-expression-perk{50%{transform:scale(1.06) rotate(-3deg)}}
@keyframes rg-expression-wink{45%{transform:rotate(-9deg) scale(1.07)}70%{transform:rotate(3deg)}}
@keyframes rg-expression-thought{0%,100%{translate:0 0}50%{translate:14px -12px}}
@keyframes rg-expression-nod{38%{transform:translateY(2px) rotate(5deg)}70%{transform:translateY(-2px) rotate(-3deg)}}
@keyframes rg-expression-spark{0%{opacity:0;scale:.55}45%{opacity:1;scale:1.08}100%{opacity:.95;scale:1}}
@media(prefers-reduced-motion:reduce){
  .rg-rooky-rig[data-rooky-expression],
  .rg-rooky-rig[data-rooky-expression] :is(.rg-rooky-eye,.rg-rooky-spark),
  .rg-rooky-launcher .rg-rooky-rig[data-rooky-expression=idle] .rg-rooky-eye,
  .rg-rooky-launcher .rg-rooky-rig[data-rooky-expression=curious]{animation:none}
}

:root[data-rooky-atlas=ready] .rg-rooky-rig[data-rooky-expression]{animation:none}
:root[data-rooky-atlas=ready] .rg-rooky-rig>img{opacity:0}
:root[data-rooky-atlas=ready] .rg-rooky-rig>.rg-rooky-face{display:none}
:root[data-rooky-atlas=ready] .rg-rooky-rig::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:url("/rooky/expressions-v6.webp") no-repeat 0 0 / 400% 300%;
  filter:drop-shadow(0 2px 4px #5be8ff38)
}
:root[data-rooky-atlas=ready] .rg-rooky-rig[data-rooky-expression=curious]::after,
:root[data-rooky-atlas=ready] .rg-rooky-rig[data-rooky-expression=listening]::after{background-position:0 50%}
:root[data-rooky-atlas=ready] .rg-rooky-rig[data-rooky-expression=hello]::after{
  background-position:100% 0;animation:rg-rooky-sprite-wave .72s step-end both
}
:root[data-rooky-atlas=ready] .rg-rooky-rig[data-rooky-expression=thinking]::after{
  background-position:66.666667% 50%;animation:rg-rooky-sprite-think 1.85s step-end infinite
}
:root[data-rooky-atlas=ready] .rg-rooky-rig[data-rooky-expression=pleased]::after{
  background-position:0 100%;animation:rg-rooky-sprite-answer 1.14s step-end both
}
:root[data-rooky-atlas=ready] .rg-rooky-rig[data-rooky-expression=concerned]::after{background-position:66.666667% 50%}
@keyframes rg-rooky-sprite-wave{
  0%{background-position:33.333333% 0}18%,57%{background-position:66.666667% 0}
  37%,76%{background-position:100% 0}100%{background-position:0 50%}
}
@keyframes rg-rooky-sprite-think{
  0%,83%,100%{background-position:33.333333% 50%}28%{background-position:66.666667% 50%}
}
@keyframes rg-rooky-sprite-answer{
  0%{background-position:100% 50%}14%,45%{background-position:0 100%}
  32%{background-position:33.333333% 100%}67%{background-position:66.666667% 100%}
  87%,100%{background-position:100% 100%}
}
@media(prefers-reduced-motion:reduce){
  :root[data-rooky-atlas=ready] .rg-rooky-rig[data-rooky-expression]::after{animation:none}
}
