.lpla {
  --lpla-navy: #08131f;
  --lpla-panel: #0e1d2e;
  --lpla-panel-2: #14283e;
  --lpla-orange: #ff8a00;
  --lpla-white: #f7f9fc;
  --lpla-muted: #a8b6c6;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999999;
  font-family: inherit;
  color: var(--lpla-white);
}

.lpla *, .lpla *::before, .lpla *::after { box-sizing: border-box; }

.lpla__launcher {
  position: relative;
  display: grid;
  width: 62px;
  height: 62px;
  margin-left: auto;
  place-items: center;
  border: 1px solid rgba(255, 138, 0, .7);
  border-radius: 20px;
  background: radial-gradient(circle at 75% 20%, rgba(255, 183, 82, .36), transparent 31%), linear-gradient(145deg, #17314d, var(--lpla-navy));
  color: var(--lpla-white);
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(1, 8, 18, .42), 0 0 0 5px rgba(255, 138, 0, .09);
  transition: transform .2s ease, box-shadow .2s ease;
}

.lpla__launcher:hover { transform: translateY(-3px); box-shadow: 0 20px 42px rgba(1, 8, 18, .48), 0 0 0 6px rgba(255, 138, 0, .14); }
.lpla__launcher:focus-visible, .lpla button:focus-visible, .lpla a:focus-visible, .lpla textarea:focus-visible { outline: 3px solid rgba(255, 138, 0, .45); outline-offset: 3px; }
.lpla__launcher svg { width: 29px; height: 29px; fill: var(--lpla-white); }
.lpla__pulse { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border: 2px solid var(--lpla-navy); border-radius: 50%; background: var(--lpla-orange); box-shadow: 0 0 13px rgba(255, 138, 0, .8); }
.lpla--open .lpla__launcher { display: none; }

.lpla__panel {
  width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 138, 0, .36);
  border-radius: 22px;
  background: var(--lpla-navy);
  box-shadow: 0 26px 76px rgba(1, 8, 18, .48), 0 0 0 1px rgba(255, 255, 255, .04);
  animation: lpla-in .22s ease-out;
}

@keyframes lpla-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.lpla__header { display: flex; min-height: 76px; padding: 14px 15px; align-items: center; gap: 12px; background: radial-gradient(circle at 82% 0, rgba(255, 138, 0, .19), transparent 40%), linear-gradient(135deg, #112641, var(--lpla-navy)); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.lpla__brandmark { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border: 1px solid rgba(255, 138, 0, .5); border-radius: 14px; background: rgba(255, 138, 0, .09); }
.lpla__brandmark svg { width: 22px; height: 22px; fill: var(--lpla-orange); }
.lpla__header > div:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.lpla__header strong { font-size: 16px; line-height: 1.25; letter-spacing: -.01em; }
.lpla__header span { display: flex; margin-top: 5px; align-items: center; gap: 6px; color: var(--lpla-muted); font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.lpla__header span i { width: 7px; height: 7px; border-radius: 50%; background: #5bd389; box-shadow: 0 0 9px rgba(91, 211, 137, .7); }
.lpla__close { width: 36px; height: 36px; margin-left: auto; border: 1px solid rgba(255, 255, 255, .13); border-radius: 12px; background: rgba(255, 255, 255, .055); color: var(--lpla-white); font: 300 25px/1 sans-serif; cursor: pointer; }

.lpla__messages { min-height: 180px; max-height: min(430px, 52vh); padding: 19px; overflow-y: auto; background: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px), var(--lpla-navy); background-size: 30px 30px; scrollbar-color: rgba(255,138,0,.45) transparent; }
.lpla__message { display: flex; margin-bottom: 13px; }
.lpla__message--user { justify-content: flex-end; }
.lpla__bubble { max-width: 89%; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .08); border-left: 3px solid var(--lpla-orange); border-radius: 5px 15px 15px 15px; background: linear-gradient(135deg, var(--lpla-panel-2), var(--lpla-panel)); color: var(--lpla-white); font-size: 14px; line-height: 1.55; }
.lpla__message--user .lpla__bubble { border: 0; border-radius: 15px 5px 15px 15px; background: var(--lpla-orange); color: #0b1420; font-weight: 650; }
.lpla__bubble p { margin: 0; }
.lpla__bubble strong + p { margin-top: 5px; color: #d9e1ea; }
.lpla__message--user .lpla__bubble p { color: inherit; }

.lpla__sources { display: grid; margin-top: 12px; gap: 6px; }
.lpla__sources > span { color: var(--lpla-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.lpla__sources a { display: flex; padding: 8px 9px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.04); color: var(--lpla-white); font-size: 12px; line-height: 1.3; text-decoration: none; }
.lpla__sources a:hover { border-color: rgba(255,138,0,.55); color: var(--lpla-orange); }
.lpla__sources b { color: var(--lpla-orange); }
.lpla__caution { margin-top: 10px !important; color: var(--lpla-muted); font-size: 10.5px; line-height: 1.45; }
.lpla__actions { display: flex; margin-top: 11px; gap: 7px; flex-wrap: wrap; }
.lpla__actions a { padding: 7px 10px; border-radius: 9px; background: rgba(255,138,0,.13); color: var(--lpla-orange); font-size: 12px; font-weight: 750; text-decoration: none; }

.lpla__quick { display: flex; padding: 0 14px 10px; gap: 7px; overflow-x: auto; background: var(--lpla-navy); }
.lpla__quick button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid rgba(255, 138, 0, .28); border-radius: 999px; background: rgba(255, 138, 0, .075); color: #f1c997; font: 700 11px/1.2 inherit; cursor: pointer; }
.lpla__quick button:hover { border-color: var(--lpla-orange); color: var(--lpla-white); }

.lpla__form { display: flex; padding: 12px 13px 13px; align-items: flex-end; gap: 9px; border-top: 1px solid rgba(255, 255, 255, .08); background: #07111d; }
.lpla__form textarea { width: 100%; min-height: 46px; max-height: 110px; resize: none; padding: 12px 13px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; outline: 0; background: rgba(255,255,255,.06); color: var(--lpla-white); font: 400 14px/1.45 inherit; caret-color: var(--lpla-orange); }
.lpla__form textarea:focus { border-color: rgba(255,138,0,.75); box-shadow: 0 0 0 3px rgba(255,138,0,.11); }
.lpla__form textarea::placeholder { color: #8999aa; opacity: 1; }
.lpla__form button { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border: 0; border-radius: 14px; background: linear-gradient(135deg, #ff9f20, var(--lpla-orange)); color: var(--lpla-navy); cursor: pointer; box-shadow: 0 9px 22px rgba(255,138,0,.23); }
.lpla__form button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lpla__form.is-busy button { opacity: .55; cursor: wait; }
.lpla__footer { padding: 0 14px 10px; background: #07111d; color: #748598; font-size: 9.5px; text-align: center; }

.lpla__typing { display: inline-flex; padding: 4px 1px; gap: 4px; }
.lpla__typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--lpla-orange); animation: lpla-dot 1s infinite ease-in-out; }
.lpla__typing i:nth-child(2) { animation-delay: .13s; }
.lpla__typing i:nth-child(3) { animation-delay: .26s; }
@keyframes lpla-dot { 0%, 70%, 100% { transform: translateY(0); opacity: .35; } 35% { transform: translateY(-4px); opacity: 1; } }

@media (max-width: 760px) {
  .lpla { right: 12px; bottom: 12px; }
  .lpla__launcher { width: 56px; height: 56px; border-radius: 18px; }
  .lpla__panel { width: calc(100vw - 24px); max-height: calc(100vh - 24px); border-radius: 18px; }
  .lpla__header { min-height: 70px; padding: 12px; }
  .lpla__messages { max-height: calc(100vh - 250px); padding: 15px; }
  .lpla__bubble { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
  .lpla__panel, .lpla__typing i { animation: none; }
  .lpla__launcher { transition: none; }
}
