.po-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid #b9ddd6;
  border-radius: 50%;
  background: #006d70;
  color: #fffcf5;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgb(23 37 34 / 24%);
  transition: transform 160ms ease-out, background-color 160ms ease-out, box-shadow 160ms ease-out;
}
.po-fab:hover { background: #172522; box-shadow: 0 12px 30px rgb(23 37 34 / 28%); }
.po-fab:active { transform: scale(.96); }
.po-fab:focus-visible, .po-x:focus-visible, .po-send:focus-visible, .po-in:focus-visible, .po-back:focus-visible {
  outline: 3px solid #006d70;
  outline-offset: 3px;
}
.po-panel {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: 2147483000;
  display: none;
  width: min(380px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 112px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d9ded5;
  border-radius: 18px;
  background: #fffcf5;
  color: #172522;
  font: 14px/1.5 Arial, Helvetica, sans-serif;
  box-shadow: 0 18px 48px rgb(23 37 34 / 24%);
}
.po-panel.open { display: flex; }
.po-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #172522;
  color: #fffcf5;
  font-weight: 700;
}
.po-head small { display: block; margin-top: 2px; color: #b9ddd6; font-size: 12px; font-weight: 500; }
.po-x { flex: none; border: 0; border-radius: 8px; background: transparent; color: #fffcf5; padding: 6px 9px; font-size: 18px; cursor: pointer; }
.po-x:hover { background: rgb(255 252 245 / 12%); }
.po-log { display: flex; flex: 1; flex-direction: column; gap: 10px; overflow-y: auto; padding: 14px; background: #f5f3ec; }
.po-m { max-width: 88%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.po-m.bot { align-self: flex-start; border: 1px solid #d9ded5; border-bottom-left-radius: 5px; background: #fffcf5; color: #172522; }
.po-m.me { align-self: flex-end; border-bottom-right-radius: 5px; background: #006d70; color: #fff; }
.po-form { display: flex; gap: 8px; padding: 11px; border-top: 1px solid #d9ded5; background: #fffcf5; }
.po-in { min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid #d9ded5; border-radius: 10px; background: #fffcf5; color: #172522; font: inherit; }
.po-in::placeholder { color: #52615d; }
.po-send { flex: none; min-width: 64px; border: 0; border-radius: 10px; padding: 0 14px; background: #006d70; color: #fff; font-weight: 700; cursor: pointer; }
.po-send:hover { background: #172522; }
.po-send:disabled { opacity: .6; cursor: wait; }
.po-back {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147483000;
  border: 2px solid #b9ddd6;
  border-radius: 999px;
  padding: 12px 16px;
  background: #172522;
  color: #fffcf5;
  font: 700 14px/1 Arial, Helvetica, sans-serif;
  text-decoration: none;
  box-shadow: 0 8px 24px rgb(23 37 34 / 24%);
}
.po-back:hover { background: #006d70; }
@media (max-width: 430px) {
  .po-fab { right: 12px; bottom: 12px; width: 52px; height: 52px; }
  .po-panel { right: 12px; bottom: 74px; width: calc(100vw - 24px); height: min(520px, calc(100dvh - 96px)); }
  .po-back { left: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .po-fab { transition: none; }
}
