.ask-citia {
  position: fixed;
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 5px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.ask-citia .citia-chat-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.citia-chat-robot {
  display: block;
  width: auto;
  height: clamp(84px, 9vw, 104px);
  filter: drop-shadow(0 4px 5px #153a6438);
  transform-origin: 55% 68%;
}
@keyframes citia-robot-greet {
  0%, 100% { transform: none; }
  24% { transform: translateY(-7px) rotate(-7deg); }
  44% { transform: translateY(-3px) rotate(4deg); }
  64% { transform: translateY(-5px) rotate(-3deg); }
}
@keyframes citia-robot-hover {
  0%, 100% { transform: translateY(-2px) rotate(2deg); }
  50% { transform: translateY(-9px) rotate(-6deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .citia-chat-robot { animation: citia-robot-greet 3.6s ease-in-out; }
  .ask-citia:is(:hover, :focus-visible) .citia-chat-robot {
    animation: citia-robot-hover 2.4s ease-in-out infinite;
  }
}
.citia-chat {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(100%, 426px);
  max-width: none;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border: 0;
  border-left: 1px solid #dce6f0;
  background: white;
  color: #14263e;
  box-shadow: -10px 0 36px #14263e24;
  font: 400 15px/1.55 'Segoe UI', 'Microsoft YaHei', sans-serif;
}
.citia-chat[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.citia-chat::backdrop { background: #14263e0d; }
.citia-chat *, .citia-chat *::before { box-sizing: border-box; }
.citia-chat button { font: inherit; cursor: pointer; }
.citia-chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 23px; border-bottom: 1px solid #e0e8f2; }
.citia-chat-head h2 { font-size: 19px; margin: 0; }
.citia-chat-head p { margin: 1px 0 0; color: #526580; font-size: 12px; }
.citia-chat-close { align-self: center; color: #163151; background: transparent; border: 0; border-radius: 6px; padding: 4px 10px; font-size: 22px !important; line-height: 1 !important; }
.citia-chat-body { min-height: 0; overflow: auto; padding: 23px; }
.citia-chat-body.welcome { display: grid; align-content: center; }
.citia-chat-intro { text-align: center; margin: 0 0 22px; }
.citia-chat-intro h3 { font-size: 18px; margin: 14px 0 4px; }
.citia-chat-intro p { margin: 0; color: #465971; }
.citia-chat-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; background: #0861bf; color: white; border-radius: 50%; font-size: 24px; }
.citia-chat-questions { display: grid; gap: 9px; }
.citia-chat-questions button { background: #eef6fc; color: #183953; border: 1px solid #e1edf6; border-radius: 9px; text-align: left; padding: 10px 13px; }
.citia-chat-questions button:hover { background: #e1effb; }
.citia-chat-messages { display: grid; gap: 12px; }
.citia-chat-messages article { background: #eef5fb; border-radius: 12px; padding: 11px 13px; max-width: 94%; overflow-wrap: anywhere; }
.citia-chat-messages article.visitor { justify-self: end; background: #06489a; color: white; }
.citia-chat-messages p { margin: 0; white-space: pre-wrap; }
.citia-chat-messages a { display: inline-block; margin-top: 6px; color: #054c96; text-decoration: underline; }
.citia-chat-sources { list-style: none; margin: 8px 0 0; padding: 4px 0 0; border-top: 1px solid #d8e5f0; font-size: 13px; }
.citia-chat .welcome + form { border-top-color: transparent; }
.citia-chat form { padding: 14px 20px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid #e0e8f2; }
.citia-chat-send { display: flex; border: 1px solid #baccdf; border-radius: 10px; padding: 5px; gap: 5px; }
.citia-chat-send input { min-width: 0; flex: 1; border: 0; background: white; padding: 7px 8px; font: inherit; color: inherit; }
.citia-chat-send button { border: 0; border-radius: 7px; padding: 7px 11px; background: #06489a; color: white; font-weight: 600; }
.citia-chat-send button:disabled { opacity: .6; cursor: wait; }
.citia-chat-footnote { margin: 7px 0 0; color: #526580; text-align: center; font-size: 12px; }
.citia-chat :focus-visible, .ask-citia:focus-visible { outline: 2px solid #0461c4; outline-offset: 2px; }
@media (max-height: 575px) { .citia-chat-body.welcome { align-content: start; } }
@media (max-width: 470px) { .citia-chat { border-left: 0; } }
