.lux-chat-launcher {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  display: block;
  width: 100px;
  height: 200px;
  max-height: 30dvh;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
  transition: transform .18s ease, filter .18s ease;
}

.lux-chat-launcher[hidden] { display: none; }
.lux-chat-launcher:focus-visible {
  outline: 3px solid #e8edf2;
  outline-offset: 4px;
}

.lux-chat-launcher:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.lux-chat-launcher img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4));
}

.lux-chat {
  position: fixed;
  z-index: 130;
  right: 20px;
  bottom: 96px;
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto auto;
  width: min(430px, calc(100vw - 24px));
  max-height: min(740px, calc(100dvh - 116px));
  overflow: hidden;
  color: #e8edf2;
  background: #091018;
  border: 1px solid rgba(42, 157, 244, .58);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .9);
  font-family: Arial, Helvetica, sans-serif;
}

.lux-chat[hidden] {
  display: none;
}

.lux-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(145deg, #111d29, #080d12);
  border-bottom: 1px solid rgba(42, 157, 244, .3);
}

.lux-chat-avatar {
  width: 58px;
  height: 58px;
  object-fit: cover;
  object-position: center 10%;
  background: #0a1016;
  border: 2px solid #f3cf63;
  border-radius: 50%;
}

.lux-chat-title {
  display: grid;
  gap: 4px;
}

.lux-chat-title strong {
  font-size: .96rem;
}

.lux-chat-title span {
  color: #a7b5c2;
  font-size: .7rem;
}

.lux-chat-close {
  width: 44px;
  height: 44px;
  margin-left: auto;
  color: #fff;
  background: #182431;
  border: 1px solid #2e4050;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.35rem;
}

.lux-chat-intro {
  padding: 10px 16px;
  color: #aebbc6;
  background: #0c141d;
  border-bottom: 1px solid rgba(42, 157, 244, .2);
  font-size: .7rem;
  line-height: 1.5;
}

.lux-chat-log {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  scroll-behavior: smooth;
  scrollbar-color: #3f5263 #091018;
}

.lux-message-row {
  display: flex;
  max-width: 95%;
  align-items: flex-end;
  gap: 8px;
}

.lux-message-row > img {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  object-fit: cover;
  object-position: center 10%;
  background: #0a1016;
  border: 1px solid #f3cf63;
  border-radius: 50%;
}

.lux-message {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 15px;
  font-size: .87rem;
  line-height: 1.5;
  white-space: pre-line;
}

.lux-message.bot {
  max-width: none;
  background: #16212c;
  border: 1px solid rgba(42, 157, 244, .22);
  border-bottom-left-radius: 4px;
}

.lux-message.user {
  align-self: flex-end;
  color: #071019;
  background: #e8edf2;
  border-bottom-right-radius: 4px;
}

.lux-chat-compose {
  display: grid;
  gap: 6px;
  padding: 10px 16px;
  background: #0b121a;
  border-top: 1px solid rgba(42, 157, 244, .24);
}

.lux-chat-compose label {
  color: #b0beca;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.lux-chat-compose > div {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 7px;
}

.lux-chat-compose input {
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  color: #fff;
  background: #070d13;
  border: 1px solid #526372;
  border-radius: 12px;
  font: inherit;
}

.lux-chat-compose input::placeholder {
  color: #8495a4;
}

.lux-chat-compose button {
  color: #06101a;
  background: linear-gradient(180deg, #f3cf63, #d6ad36);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.05rem;
}

.lux-chat-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 245px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 16px 16px;
  background: #0c141d;
  border-top: 1px solid rgba(42, 157, 244, .24);
}

.lux-chat-actions button,
.lux-chat-actions a {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  color: #e8edf2;
  background: #13202c;
  border: 1px solid rgba(42, 157, 244, .48);
  border-radius: 12px;
  cursor: pointer;
  font: 850 .74rem/1.3 Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}

.lux-chat-actions > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.lux-chat-actions .primary {
  color: #06101a;
  background: linear-gradient(180deg, #f3cf63, #d6ad36);
  border-color: #f3cf63;
}

.lux-chat-actions .wide {
  grid-column: 1 / -1;
}

.lux-chat-form {
  display: grid;
  grid-column: 1 / -1;
  gap: 9px;
}

.lux-chat-form label {
  display: grid;
  gap: 5px;
  color: #c0cbd4;
  font-size: .71rem;
  font-weight: 800;
}

.lux-chat-form input {
  min-height: 48px;
  padding: 10px 12px;
  color: #fff;
  background: #070d13;
  border: 1px solid #526372;
  border-radius: 10px;
  font: inherit;
}

.lux-chat-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #9aabb9;
  font-size: .67rem;
  line-height: 1.5;
}

.lux-chat-note a {
  display: inline;
  min-height: auto;
  padding: 0;
  color: #f3cf63;
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lux-chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lux-chat-status::before {
  width: 8px;
  height: 8px;
  background: #49c87b;
  border-radius: 50%;
  content: "";
}

@media (max-width: 650px) {
  .lux-chat-launcher {
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    width: 82px;
    height: 164px;
    max-height: 26dvh;
  }

  .lux-chat {
    inset: 8px 8px calc(76px + env(safe-area-inset-bottom));
    width: auto;
    max-height: none;
    border-radius: 18px;
  }

  .lux-chat-avatar {
    width: 52px;
    height: 52px;
  }

  .lux-chat-intro {
    font-size: .67rem;
  }
}

@media (max-width: 380px) {
  .lux-chat-actions {
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lux-chat-log {
    scroll-behavior: auto;
  }

  .lux-chat-launcher {
    transition: none;
  }
}
/* Native dialog visibility and server-backed conversation bubbles. */
dialog.lux-chat:not([open]) { display: none; }
dialog.lux-chat[open] { margin: auto 20px 96px auto; }
.lux-chat::backdrop { background: rgba(0,0,0,.3); }
.lux-chat-message { padding: 12px 14px; border-radius: 12px; background: #172a3b; margin: 8px 0; font-size: 16px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.lux-chat-message.user { background: #15477a; margin-left: 20px; }

.lux-chat-link{display:inline-flex;align-items:center;min-height:44px;padding:10px 14px;margin:5px;border:1px solid #b09548;border-radius:8px;color:#f4d66e;text-decoration:none}.lux-chat-intro{font-size:.875rem;line-height:1.5}@media(prefers-reduced-motion:reduce){.lux-chat *{scroll-behavior:auto!important;animation:none!important}}
