.best-friend-dock {
  --dock-bottom: max(22px, env(safe-area-inset-bottom));
  --dock-right: max(24px, env(safe-area-inset-right));
  position: fixed;
  z-index: 1001;
  inset: auto var(--dock-right) var(--dock-bottom) auto;
  display: grid;
  justify-items: end;
  gap: 16px;
  max-width: calc(100% - var(--dock-right) - max(12px, env(safe-area-inset-left)));
}
.best-friend-dock__launcher {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 8px 19px 8px 9px;
  border: 1px solid #fff;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #e3f1ff 55%, #bfd9ff 100%);
  box-shadow: 0 6px 0 #7199cf, 0 9px 0 1px #fff6, 0 18px 36px #17468b50, inset 0 2px 3px #fff;
  color: #153875;
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease;
}
.best-friend-dock__launcher:hover { transform: translateY(-4px); box-shadow: 0 8px 0 #7199cf, 0 11px 0 1px #fff6, 0 22px 40px #17468b55, inset 0 2px 3px #fff; }
.best-friend-dock__launcher:active { transform: translateY(3px); }
.best-friend-dock__launcher:focus-visible { outline: 3px solid #2f6bff; outline-offset: 7px; }
.best-friend-dock__icon { position: relative; width: 68px; height: 57px; flex-shrink: 0; }
.best-friend-dock__label { display: grid; gap: 5px; line-height: 1.2; }
.best-friend-dock__label small { font-size: 12px; color: #5475a5; }
.best-friend-dock__label strong { font-size: 17px; font-weight: 750; letter-spacing: .02em; }
.best-friend-dock__panel {
  width: min(410px, calc(100vw - var(--dock-right) - max(12px, env(safe-area-inset-left))));
  --waysun-chat-max-height: calc(100vh - var(--dock-bottom) - 120px);
  --waysun-chat-max-height: calc(100dvh - var(--dock-bottom) - 120px);
}
.support-bot { position: absolute; width: 66px; height: 77px; left: 0; bottom: -1px; animation: support-float 4s ease-in-out infinite; transform-origin: bottom center; filter: drop-shadow(0 8px 5px #285ba93b); }
.support-bot__antenna { position: absolute; width: 3px; height: 10px; background: #a8caff; left: 32px; top: 0; transform: rotate(10deg); }
.support-bot__antenna::before { content: ""; position: absolute; top: -5px; left: -3px; width: 9px; height: 9px; border: 1px solid #fff9; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #fff5b6, #ffc64f 55%, #ff9e38); box-shadow: 0 0 9px #ffdb7280; }
.support-bot__head { position: absolute; top: 10px; left: 6px; width: 55px; height: 42px; border-radius: 18px 18px 17px 17px; background: linear-gradient(135deg, white, #e5f1ff 40%, #8bb8ee); border: 1px solid #fff; box-shadow: inset 2px 3px 3px #fff, inset -3px -4px 6px #699bdc88, 0 3px 0 #6392ce; transform: rotate(-6deg); z-index: 2; }
.support-bot__head::before, .support-bot__head::after { content: ""; position: absolute; width: 8px; height: 18px; top: 13px; border-radius: 6px; background: linear-gradient(90deg, #6797dd, #bfdcff); box-shadow: inset 1px 1px 1px #fff9; }
.support-bot__head::before { left: -5px; }
.support-bot__head::after { right: -5px; }
.support-bot__face { position: absolute; inset: 7px 6px 7px; display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 11px; background: linear-gradient(145deg, #123468, #24549a); box-shadow: inset 0 2px 5px #091d44, 0 1px 1px white; }
.support-bot__face i { width: 5px; height: 9px; border-radius: 6px; background: #bceeff; box-shadow: 0 0 5px #7bd9ff; animation: support-blink 6s infinite; }
.support-bot__mic { position: absolute; right: -2px; bottom: 3px; width: 16px; height: 11px; border-right: 3px solid #4b7fca; border-bottom: 3px solid #4b7fca; border-radius: 0 0 8px; z-index: 3; }
.support-bot__mic::after { content: ""; position: absolute; width: 7px; height: 5px; background: #ffc857; bottom: -4px; left: -3px; border-radius: 3px; }
.support-bot__body { position: absolute; width: 39px; height: 29px; left: 15px; bottom: 0; border-radius: 13px 13px 17px 17px; background: linear-gradient(130deg, #fff, #c5ddff 65%, #6b9bdb); box-shadow: inset 2px 1px 2px #fff, inset -2px -3px 5px #5483c580; display: grid; place-items: center; }
.support-bot__body img { width: 17px; height: 17px; }
.support-orbit { position: absolute; inset: auto 0 -2px; height: 11px; border: 1px solid #87b9ff66; border-radius: 50%; background: #96c6ff33; box-shadow: 0 0 14px #68a4ff33; }
.best-friend-dock__dot { position: absolute; top: -13px; right: -1px; width: 16px; height: 16px; border: 3px solid white; border-radius: 50%; background: #ff6258; box-shadow: 0 2px 7px #d9424550; z-index: 3; }
.best-friend-dock__hint { padding: 11px 16px; margin-right: 3px; background: linear-gradient(130deg,white,#edf5ff); border: 1px solid #fff; border-radius: 16px 16px 4px 16px; box-shadow: 0 7px 0 -3px #92b4e1, 0 12px 25px #17468b25; color: #244879; font-size: 14px; animation: support-enter .25s ease-out both; }
.best-friend-dock__panel:not([hidden]) { animation: support-enter .25s ease-out both; }
.best-friend-dock__launcher.has-unread .best-friend-dock__dot { animation: support-notice 1.4s ease-out 3; }
@keyframes support-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes support-blink { 0%,42%,46%,100% { transform: scaleY(1); } 44% { transform: scaleY(.15); } }
@keyframes support-notice { 50% { box-shadow: 0 0 0 7px #ff62581f; } }
@keyframes support-enter { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media(max-width:480px) { .best-friend-dock { --dock-bottom: max(19px, env(safe-area-inset-bottom)); --dock-right: max(14px, env(safe-area-inset-right)); } .best-friend-dock__launcher { min-height: 63px; gap: 8px; padding-right: 15px; } .best-friend-dock__label strong { font-size: 16px; } .best-friend-dock__icon { width: 63px; } }
@media(prefers-reduced-motion:reduce) { .support-bot, .support-bot__face i, .best-friend-dock__hint, .best-friend-dock__panel:not([hidden]), .best-friend-dock__launcher.has-unread .best-friend-dock__dot { animation: none; } .best-friend-dock__launcher { transition: none; } }
