.pogo {
  position: fixed;
  bottom: 22px;
  z-index: 80;
  transition: left .9s cubic-bezier(.2, .7, .2, 1), bottom .9s cubic-bezier(.2, .7, .2, 1);
}

.pogo [hidden] { display: none !important; }

.pogo-launch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 84px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--aubergine);
  cursor: pointer;
}

.pogo button:focus-visible, .pogo summary:focus-visible, .pogo-conversation:focus-visible { outline: 3px solid var(--terra); outline-offset: 3px; }
.pogo-orb { position: relative; display: block; width: 92px; height: 94px; animation: pogo-float 3.6s ease-in-out infinite; }
.pogo-shadow { position: absolute; bottom: 0; left: 22px; width: 48px; height: 8px; border-radius: 50%; background: rgba(75, 41, 63, .17); filter: blur(3px); animation: pogo-shadow 3.6s ease-in-out infinite; }
.pogo-launch-label { padding: 6px 12px; border: 1px solid #e2d6dc; border-radius: 999px; background: #fff; box-shadow: 0 7px 20px rgba(75, 41, 63, .1); font-size: 11px; font-weight: 800; }

.pogo-face {
  position: absolute;
  top: 4px;
  left: 5px;
  display: block;
  width: 80px;
  height: 80px;
  border: 3px solid var(--aubergine);
  border-radius: 48% 51% 47% 50%;
  background: radial-gradient(circle at 35% 25%, #fff 0, #faf3f0 58%, #e9dce2 100%);
  box-shadow: inset -5px -7px 0 rgba(97, 54, 79, .06), 0 11px 25px rgba(75, 41, 63, .18);
  transform: rotate(-7deg);
  transition: transform .65s cubic-bezier(.34,1.4,.64,1), border-radius .8s ease, background .6s ease;
}

.pogo-face::before { content: ''; position: absolute; top: -8px; left: 9px; width: 19px; height: 11px; border-radius: 80% 20% 80% 20%; background: var(--aubergine); transform: rotate(-25deg); }
.pogo-face-small { position: relative; top: auto; left: auto; flex: 0 0 39px; width: 39px; height: 39px; box-shadow: none; }
.pogo-face-small::before { width: 10px; height: 6px; top: -5px; }
.pogo-eye { position: absolute; top: 36%; width: 6px; height: 8px; border-radius: 50%; background: var(--aubergine); animation: pogo-blink 6.5s infinite; transition: top .5s, left .5s, right .5s, height .5s, border-radius .5s; }
.pogo-eye:first-child { left: 32%; }
.pogo-eye:nth-child(2) { right: 30%; }
.pogo-mouth { position: absolute; bottom: 23%; left: 40%; width: 13px; height: 7px; border-bottom: 2px solid var(--aubergine); border-radius: 0 0 50% 50%; transition: width .5s, height .5s, left .5s, bottom .5s, border-radius .5s; }
.pogo-face-small .pogo-eye { width: 4px; height: 5px; }
.pogo-face-small .pogo-mouth { width: 8px; height: 5px; }
.pogo-signal { position: absolute; top: -5px; right: -6px; width: 11px; height: 11px; border: 2px solid #fff; border-radius: 50%; background: var(--terra); animation: pogo-pulse 3.6s ease-in-out infinite; }
.pogo-launch:hover .pogo-face, .pogo-launch.is-open .pogo-face { transform: rotate(6deg) scale(1.05); }
.pogo-halo { position: absolute; inset: -7px -4px 7px; border: 1px solid #c8a9ba; border-radius: 50%; opacity: .35; transition: opacity .5s; }
.pogo-cheek { position: absolute; top: 56%; width: 11px; height: 5px; border-radius: 50%; background: #d9a2a0; opacity: .4; transition: opacity .5s; }
.pogo-cheek-left { left: 20%; }
.pogo-cheek-right { right: 18%; }
.pogo-spark { position: absolute; color: var(--terra); opacity: 0; transition: opacity .5s, transform .6s; }
.pogo-spark-one { top: -9px; left: -8px; font-size: 20px; }
.pogo-spark-two { top: 20px; right: -9px; font-size: 12px; }
.pogo[data-mood='curious'] .pogo-face { transform: rotate(12deg); border-radius: 47% 53% 55% 45%; }
.pogo[data-mood='curious'] .pogo-eye { top: 32%; }
.pogo[data-mood='curious'] .pogo-eye:nth-child(2) { height: 10px; right: 27%; }
.pogo[data-mood='listening'] .pogo-face { transform: rotate(-3deg) scale(1.06); border-radius: 46% 46% 53% 53%; }
.pogo[data-mood='listening'] .pogo-eye { height: 11px; }
.pogo[data-mood='listening'] .pogo-mouth { width: 6px; left: 46%; height: 3px; }
.pogo[data-mood='listening'] .pogo-halo { opacity: .8; animation: pogo-listen 2.4s ease-in-out infinite; }
.pogo[data-mood='thinking'] .pogo-orb { animation: pogo-ponder 3s ease-in-out infinite; }
.pogo[data-mood='thinking'] .pogo-face { animation: pogo-morph 4s ease-in-out infinite; }
.pogo[data-mood='thinking'] .pogo-eye { top: 29%; }
.pogo[data-mood='thinking'] .pogo-eye:first-child { left: 36%; }
.pogo[data-mood='thinking'] .pogo-eye:nth-child(2) { right: 24%; }
.pogo[data-mood='thinking'] .pogo-mouth { width: 7px; height: 3px; left: 47%; border-radius: 50%; }
.pogo[data-mood='thinking'] .pogo-halo { opacity: .7; animation: pogo-orbit 6s linear infinite; border-style: dashed; }
.pogo[data-mood='thinking'] .pogo-spark-one { opacity: .8; animation: pogo-twinkle 2s ease-in-out infinite; }
.pogo[data-mood='happy'] .pogo-face { transform: rotate(-4deg) scale(1.04); border-radius: 48% 48% 45% 45%; }
.pogo[data-mood='happy'] .pogo-mouth, .pogo[data-mood='excited'] .pogo-mouth { width: 19px; height: 11px; left: 36%; border-bottom-width: 3px; }
.pogo[data-mood='happy'] .pogo-cheek, .pogo[data-mood='excited'] .pogo-cheek { opacity: .8; }
.pogo[data-mood='excited'] .pogo-orb { animation: pogo-hop 1.4s ease-in-out infinite; }
.pogo[data-mood='excited'] .pogo-face { border-radius: 45% 45% 53% 53%; }
.pogo[data-mood='excited'] .pogo-eye { height: 5px; border-radius: 50% 50% 10% 10%; }
.pogo[data-mood='excited'] .pogo-spark { opacity: 1; animation: pogo-twinkle 1.8s ease-in-out infinite; }
.pogo[data-mood='excited'] .pogo-spark-two { animation-delay: .4s; }
.pogo[data-mood='concerned'] .pogo-face { transform: rotate(-9deg) translateY(3px); border-radius: 52% 52% 43% 43%; }
.pogo[data-mood='concerned'] .pogo-mouth { bottom: 20%; width: 12px; height: 6px; left: 40%; border-bottom: 0; border-top: 2px solid var(--aubergine); border-radius: 50% 50% 0 0; }
.pogo[data-mood='alert'] .pogo-face { transform: rotate(0); border-radius: 42% 42% 48% 48%; background: #fff3e6; }
.pogo[data-mood='alert'] .pogo-eye { height: 11px; }
.pogo[data-mood='alert'] .pogo-mouth { width: 7px; height: 8px; left: 44%; border: 2px solid var(--aubergine); border-radius: 50%; }
.pogo[data-mood='alert'] .pogo-halo { border-color: var(--terra); opacity: .7; animation: pogo-listen 3s ease-in-out infinite; }
.pogo[data-mood='alert'] .pogo-spark-one { opacity: .9; }
.pogo .pogo-face-small { transform: rotate(-7deg); }
.pogo .pogo-face-small .pogo-mouth { max-width: 10px; max-height: 6px; }
.pogo .pogo-face-small .pogo-eye { max-width: 4px; max-height: 6px; }
.pogo-guided { outline: 2px solid #b996ac; outline-offset: -2px; border-radius: 20px; }

.pogo-bubble { position: absolute; right: 2px; bottom: 136px; display: flex; align-items: flex-start; gap: 10px; width: min(280px, calc(100vw - 30px)); padding: 14px 12px 14px 16px; border: 1px solid #ded0d8; border-radius: 19px 19px 5px 19px; background: #fff; box-shadow: 0 15px 42px rgba(75, 41, 63, .16); color: var(--ink); cursor: pointer; animation: pogo-arrive .4s ease both; }
.pogo-bubble p { flex: 1; margin: 0; font-size: 12px; line-height: 1.5; }
.pogo-bubble button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }

.pogo-panel {
  position: absolute;
  right: 0;
  bottom: 132px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(560px, calc(100dvh - 164px));
  overflow: hidden;
  border: 1px solid #dfd3da;
  border-radius: 26px 26px 7px 26px;
  background: linear-gradient(155deg, #fff 0%, #fff 65%, #f8f2f4 100%);
  box-shadow: 0 28px 80px rgba(75, 41, 63, .2);
  animation: pogo-arrive .3s ease both;
}

.pogo[data-side='left'] .pogo-panel, .pogo[data-side='left'] .pogo-bubble { right: auto; left: 0; }
.pogo-panel::after { content: ''; position: absolute; right: 20px; bottom: -9px; width: 17px; height: 17px; border-right: 1px solid #dfd3da; border-bottom: 1px solid #dfd3da; background: #f8f2f4; transform: rotate(45deg); }
.pogo[data-side='left'] .pogo-panel { border-radius: 26px 26px 26px 7px; }
.pogo[data-side='left'] .pogo-panel::after { right: auto; left: 20px; }
.pogo[data-side='left'] .pogo-bubble { border-radius: 17px 17px 17px 5px; }
.pogo-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px 17px 7px; }
.pogo-panel-head, .pogo-question, .pogo-topics, .pogo-thinking, .pogo-conversation-tools { flex-shrink: 0; }
.pogo-panel-tools { display: flex; gap: 6px; }
.pogo-expand { width: 31px; height: 31px; border: 1px solid #e1d5dd; border-radius: 10px; background: #fff; color: var(--aubergine); font-size: 21px; cursor: pointer; }
.pogo-expand:hover { background: #f3edf0; }
.pogo-panel-identity { display: flex; align-items: center; gap: 11px; }
.pogo-panel-identity > div { display: flex; flex-direction: column; gap: 2px; }
.pogo-panel-identity strong { font-size: 13px; color: var(--aubergine); }
.pogo-panel-identity div span { font-size: 11px; color: var(--muted); }
.pogo-close { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #f3edf0; color: var(--aubergine); font-size: 19px; line-height: 1; cursor: pointer; }
.pogo-close:hover { background: #e5d8df; }
.pogo-conversation { position: relative; flex: 1 1 auto; min-height: 80px; overflow-y: auto; scrollbar-gutter: stable; padding: 12px 20px 18px; display: flex; flex-direction: column; gap: 18px; overscroll-behavior: contain; }
.pogo-message { flex-shrink: 0; max-width: 100%; padding: 10px 13px; border-radius: 13px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.pogo-message p { margin: 0; }
.pogo-message p + p, .pogo-message p + ul, .pogo-message p + ol, .pogo-message ul + p, .pogo-message ol + p { margin-top: 12px; }
.pogo-message ul, .pogo-message ol { margin: 8px 0; padding-left: 23px; }
.pogo-message li + li { margin-top: 7px; }
.pogo-message code { padding: 1px 4px; border-radius: 4px; background: #f0e8ed; font-size: .9em; }
.pogo-message-heading { font-weight: 750; color: var(--aubergine); }
.pogo-conversation > p.pogo-message { margin: 0; }
.pogo-message-assistant { align-self: stretch; padding: 0; background: transparent; color: var(--ink); border-bottom-left-radius: 4px; }
.pogo-message-visitor { align-self: flex-end; background: #eee4e9; color: var(--aubergine); border-bottom-right-radius: 4px; }
.pogo-action { display: inline-block; margin-top: 10px; color: var(--aubergine); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.pogo-conversation-tools { padding: 0 18px 8px; text-align: right; }
.pogo-conversation-tools:has(button[hidden]) { display: none; }
.pogo-conversation-tools button { border: 0; background: transparent; color: var(--aubergine); padding: 4px; font-size: 11px; cursor: pointer; }
.pogo-topics { margin: 0 17px 10px; border-top: 1px solid #eee5eb; padding-top: 8px; }
.pogo-topics summary { font-size: 11px; color: var(--muted); cursor: pointer; padding: 2px 0; }
.pogo-starters { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 0 2px; }
.pogo-starters button { border: 1px solid #dbcbd4; border-radius: 999px; background: #fff; color: var(--aubergine); padding: 8px 10px; font-size: 10px; font-weight: 700; text-align: left; cursor: pointer; }
.pogo-starters button:hover { background: var(--wash); }
.pogo-question { padding: 0 16px 16px; }
.pogo-question label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.pogo-question-row { display: flex; gap: 7px; }
.pogo-question-row textarea { flex: 1; min-width: 0; max-height: 112px; resize: vertical; border: 1px solid #ded4da; border-radius: 13px; padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.5; }
.pogo-question-row textarea:focus-visible { outline: 2px solid var(--aubergine); outline-offset: 2px; }
.pogo-question-row button { align-self: flex-end; height: 39px; width: 39px; flex: none; border: 0; border-radius: 12px; background: var(--aubergine); color: #fff; font-weight: 800; font-size: 18px; cursor: pointer; }
.pogo-question-row button:disabled { opacity: .55; cursor: wait; }
.pogo-question .pogo-consent { display: flex; gap: 7px; align-items: flex-start; margin: 8px 0 0; font-size: 10px; line-height: 1.4; font-weight: 500; }
.pogo-consent input { margin: 1px 0 0; flex: none; }
.pogo-thinking { padding: 0 20px 12px; color: var(--muted); font-size: 11px; }
.pogo-thinking span { display: inline-block; width: 4px; height: 4px; margin-right: 3px; border-radius: 50%; background: var(--aubergine); animation: pogo-dot 1.2s ease-in-out infinite; }
.pogo-thinking span:nth-child(2) { animation-delay: .15s; }
.pogo-thinking span:nth-child(3) { animation-delay: .3s; margin-right: 8px; }

.pogo[data-expanded='true'] .pogo-panel {
  position: fixed; right: 132px; left: auto; bottom: 24px;
  width: min(660px, calc(100vw - 164px)); height: min(760px, calc(100dvh - 48px));
  border-radius: 28px; animation: pogo-arrive .25s ease both;
}
.pogo[data-expanded='true'] .pogo-panel::after { display: none; }
.pogo[data-expanded='true'] .pogo-panel-head { padding: 22px 26px 14px; border-bottom: 1px solid #eee5eb; }
.pogo[data-expanded='true'] .pogo-conversation { padding: 24px 30px; gap: 24px; }
.pogo[data-expanded='true'] .pogo-message { font-size: 15px; line-height: 1.8; }
.pogo[data-expanded='true'] .pogo-question { padding: 0 26px 24px; }
.pogo[data-expanded='true'] .pogo-topics { margin-right: 26px; margin-left: 26px; }

@keyframes pogo-ponder { 0%, 100% { transform: translateY(-3px) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(7deg); } }
@keyframes pogo-morph { 0%, 100% { border-radius: 47% 53% 48% 52%; transform: rotate(-6deg); } 50% { border-radius: 36% 44% 40% 46%; transform: rotate(8deg) scale(.97,1.04); } }
@keyframes pogo-hop { 0%, 100% { transform: translateY(0) scale(1.03,.98); } 40% { transform: translateY(-15px) scale(.98,1.03) rotate(-4deg); } 65% { transform: translateY(-8px) rotate(4deg); } }
@keyframes pogo-twinkle { 50% { transform: translateY(-5px) rotate(18deg) scale(1.18); opacity: .5; } }
@keyframes pogo-listen { 50% { transform: scale(1.1); opacity: .25; } }
@keyframes pogo-orbit { to { transform: rotate(360deg); } }
@keyframes pogo-dot { 50% { transform: translateY(-3px); opacity: .4; } }

@keyframes pogo-float { 50% { transform: translateY(-9px) rotate(3deg); } }
@keyframes pogo-shadow { 50% { opacity: .6; transform: scale(.75); } }
@keyframes pogo-blink { 0%, 42%, 45%, 100% { transform: scaleY(1); } 43%, 44% { transform: scaleY(.12); } }
@keyframes pogo-pulse { 50% { transform: scale(1.25); opacity: .65; } }
@keyframes pogo-arrive { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
  .pogo { bottom: 12px; transition: bottom .6s ease; }
  .pogo-panel { bottom: 132px; height: min(560px, calc(100dvh - 156px)); }
  .pogo-bubble { bottom: 136px; }
  .pogo[data-expanded='true'] .pogo-panel { inset: 12px; width: auto; height: auto; border-radius: 24px; }
  .pogo[data-expanded='true'] .pogo-launch { visibility: hidden; }
  .pogo[data-expanded='true'] .pogo-panel-head { padding: 18px 20px 12px; }
  .pogo[data-expanded='true'] .pogo-conversation { padding: 20px; }
  .pogo[data-expanded='true'] .pogo-question { padding: 0 20px 20px; }
}

@media (max-height: 480px) {
  .pogo-panel { position: fixed; inset: 8px 12px; width: auto; height: auto; border-radius: 20px; }
  .pogo .pogo-launch.is-open { visibility: hidden; }
  .pogo-topics { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pogo, .pogo * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .pogo[data-mood='thinking'] .pogo-face { border-radius: 38% 44% 40% 46%; transform: rotate(6deg); }
}
.pilot-form { scroll-margin-top: 94px; }
