.lbn-chat-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
}

body.lbn-chat-open {
  overflow: hidden;
}

.lbn-chat-launcher {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 999px;
  padding: 12px 18px 12px 12px;
  cursor: pointer;
  background: rgba(3, 5, 8, 0.96);
  color: #f5f7fa;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.lbn-chat-launcher:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(8, 11, 16, 0.98);
}

.lbn-chat-launcher__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #05070a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  flex-shrink: 0;
}

.lbn-chat-launcher__icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.lbn-chat-launcher__text {
  display: grid;
  gap: 2px;
  text-align: left;
}

.lbn-chat-launcher__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.lbn-chat-launcher__label {
  font-size: 0.9rem;
  font-weight: 800;
}

.lbn-chat-panel {
  position: absolute;
  right: 0;
  bottom: 84px;
  width: min(400px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 112px));
  max-height: min(720px, calc(100svh - 112px));
  background: rgba(7, 12, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 26px;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  overscroll-behavior: contain;
}

.lbn-chat-panel[hidden] {
  display: none !important;
}

.lbn-chat-card {
  display: flex;
  flex-direction: column;
  height: min(720px, calc(100vh - 112px));
  height: min(720px, calc(100svh - 112px));
  max-height: inherit;
  padding: 18px;
  color: #eff3f8;
  overflow: hidden;
}

.lbn-chat-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.lbn-chat-card__badge {
  margin: 0 0 6px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4b400;
}

.lbn-chat-card__title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.18;
}

.lbn-chat-card__subtitle {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.42;
  font-size: 0.82rem;
}

.lbn-chat-card__close {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f0f4f8;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.lbn-chat-card__scope {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.lbn-chat-card__scope strong {
  display: block;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.lbn-chat-card__scope ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
}

.lbn-chat-gate {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(244, 180, 0, 0.08);
  border: 1px solid rgba(244, 180, 0, 0.18);
}

.lbn-chat-gate[hidden] {
  display: none !important;
}

.lbn-chat-gate__copy {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.38;
  font-size: 0.9rem;
}

.lbn-chat-gate__action {
  border: 1px solid rgba(244, 180, 0, 0.3);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  color: #1b1300;
  background: linear-gradient(135deg, #f4b400, #ffe089);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.lbn-chat-gate__action:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(244, 180, 0, 0.18);
}

.lbn-chat-gate__action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.lbn-chat-gate__action[hidden] {
  display: none !important;
}

.lbn-chat-gate__status {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
}

.lbn-chat-gate__status--ok {
  color: #8ef0b3;
  font-weight: 700;
}

.lbn-chat-form {
  display: grid;
  gap: 10px;
  flex-shrink: 0;
}

.lbn-chat-form--compact [data-chat-profile] {
  display: none !important;
}

.lbn-chat-form[hidden] {
  display: none !important;
}

.lbn-chat-form input,
.lbn-chat-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #eff3f8;
  padding: 11px 12px;
  font: inherit;
  font-size: 0.86rem;
}

.lbn-chat-form textarea {
  min-height: 78px;
  max-height: 120px;
  resize: vertical;
}

.lbn-chat-form button {
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  color: #1b1300;
  background: linear-gradient(135deg, #f4b400, #ffe089);
}

.lbn-chat-form button:disabled {
  cursor: wait;
  opacity: 0.8;
}

.lbn-chat-thread {
  display: grid;
  gap: 9px;
  margin-bottom: 12px;
  max-height: none;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 180, 0, 0.5) rgba(255, 255, 255, 0.05);
}

.lbn-chat-panel--unlocked .lbn-chat-thread {
  min-height: 150px;
}

.lbn-chat-thread:empty {
  display: none;
}

.lbn-chat-bubble {
  padding: 10px 12px;
  border-radius: 15px;
  line-height: 1.48;
  font-size: 0.84rem;
  white-space: pre-wrap;
}

.lbn-chat-bubble--user {
  background: rgba(244, 180, 0, 0.14);
  color: #fef0bf;
  justify-self: end;
}

.lbn-chat-bubble--assistant {
  background: rgba(255, 255, 255, 0.05);
  color: #eff3f8;
}

.lbn-chat-thinking {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  max-width: 100%;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
}

.lbn-chat-thinking__mark {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  animation: lbn-chat-fernando-mark 2.6s ease-in-out infinite;
}

.lbn-chat-thinking__mark img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(244, 180, 0, 0.28));
}

.lbn-chat-thinking__text {
  position: relative;
  z-index: 1;
  display: inline-block;
  line-height: 1.35;
  font-size: 0.8rem;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.72) 32%, #fff6d8 47%, #ffffff 52%, rgba(255, 255, 255, 0.66) 66%, rgba(255, 255, 255, 0.58) 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: lbn-chat-letter-shine 2.8s cubic-bezier(0.35, 0, 0.25, 1) infinite;
}

.lbn-chat-thinking[data-variant="none"] .lbn-chat-thinking__mark,
.lbn-chat-thinking[data-variant="none"] .lbn-chat-thinking__text {
  animation: none;
}

.lbn-chat-feedback {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.lbn-chat-feedback[hidden] {
  display: none !important;
}

.lbn-chat-feedback--error {
  background: rgba(255, 92, 92, 0.1);
  border: 1px solid rgba(255, 92, 92, 0.18);
  color: #ffc6c6;
}

.lbn-chat-feedback--note {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 760px) {
  .lbn-chat-root {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .lbn-chat-launcher {
    width: 100%;
    justify-content: flex-start;
  }

  .lbn-chat-panel {
    left: 0;
    right: 0;
    width: 100%;
    bottom: 82px;
    max-height: calc(100vh - 100px);
    max-height: calc(100svh - 100px);
  }

  .lbn-chat-card {
    height: calc(100vh - 100px);
    height: calc(100svh - 100px);
    padding: 16px;
  }

  .lbn-chat-card__subtitle {
    font-size: 0.8rem;
  }

  .lbn-chat-form textarea {
    min-height: 74px;
  }

  .lbn-chat-response {
    padding: 9px 11px;
    border-radius: 16px;
  }

  .lbn-chat-block {
    line-height: 1.44;
  }

  .lbn-chat-block--lead {
    font-size: 0.88rem;
  }

  .lbn-chat-block--paragraph,
  .lbn-chat-block--note,
  .lbn-chat-block--cta {
    font-size: 0.8rem;
  }

  .lbn-chat-thinking {
    padding-left: 1px;
  }
}

@keyframes lbn-chat-shimmer {
  to {
    transform: translateX(120%);
  }
}

@keyframes lbn-chat-fernando-mark {
  0%,
  100% {
    opacity: 0.68;
    transform: scale(0.96);
    filter: saturate(0.9);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.04);
    filter: saturate(1.28);
  }
}

@keyframes lbn-chat-letter-shine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}


.lbn-chat-response {
  display: grid;
  gap: 8px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.10);
}

.lbn-chat-response--font-institutional_sans {
  letter-spacing: 0.005em;
}

.lbn-chat-response--font-reading_sans {
  letter-spacing: 0;
}

.lbn-chat-response--welcome {
  background: linear-gradient(180deg, rgba(255, 242, 214, 0.12), rgba(255, 255, 255, 0.05));
}

.lbn-chat-response--handoff {
  background: linear-gradient(180deg, rgba(117, 255, 206, 0.12), rgba(255, 255, 255, 0.05));
}

.lbn-chat-response--safe {
  background: linear-gradient(180deg, rgba(255, 198, 145, 0.12), rgba(255, 255, 255, 0.05));
}

.lbn-chat-response--relaxed .lbn-chat-block + .lbn-chat-block { margin-top: 6px; }
.lbn-chat-response--balanced .lbn-chat-block + .lbn-chat-block { margin-top: 4px; }
.lbn-chat-response--compact .lbn-chat-block + .lbn-chat-block { margin-top: 3px; }

.lbn-chat-block {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  white-space: pre-wrap;
  line-height: 1.48;
}

.lbn-chat-block__text {
  min-width: 0;
}

.lbn-chat-block__icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 0.3em;
  border-radius: 50%;
  background: rgba(244, 180, 0, 0.18);
  box-shadow: 0 0 0 1px rgba(244, 180, 0, 0.14);
}

.lbn-chat-block__icon--spark {
  background: radial-gradient(circle, #ffe089 0 30%, rgba(244, 180, 0, 0.16) 34% 100%);
}

.lbn-chat-block__icon--wave {
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(117, 255, 206, 0.5), rgba(244, 180, 0, 0.18));
}

.lbn-chat-block__icon--mail {
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(244, 180, 0, 0.2));
}

.lbn-chat-block__icon--shield {
  border-radius: 5px 5px 8px 8px;
  background: linear-gradient(180deg, rgba(142, 240, 179, 0.46), rgba(142, 240, 179, 0.12));
}

.lbn-chat-block__icon--arrow {
  clip-path: polygon(10% 42%, 62% 42%, 62% 18%, 100% 50%, 62% 82%, 62% 58%, 10% 58%);
}

.lbn-chat-block--lead {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff7df;
}

.lbn-chat-block--emphasis-strong {
  color: #fff8df;
  font-weight: 800;
}

.lbn-chat-block--emphasis-soft {
  color: rgba(255, 255, 255, 0.78);
}

.lbn-chat-block--paragraph,
.lbn-chat-block--note,
.lbn-chat-block--cta {
  font-size: 0.82rem;
  color: #eff3f8;
}

.lbn-chat-block--note {
  color: rgba(255, 255, 255, 0.72);
}

.lbn-chat-list {
  margin: 0;
  padding-left: 18px;
}

.lbn-chat-actions,
.lbn-chat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lbn-chat-action {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f7fb;
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.lbn-chat-action--button {
  background: linear-gradient(135deg, rgba(244, 180, 0, 0.92), rgba(255, 224, 137, 0.96));
  color: #1b1300;
  border-color: transparent;
}

.lbn-chat-cardlet {
  min-width: 150px;
  flex: 1 1 160px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lbn-chat-cardlet strong {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.lbn-chat-cardlet p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.lbn-chat-thinking[data-variant="soft_wave"] .lbn-chat-thinking__mark {
  animation-duration: 3.1s;
}

.lbn-chat-thinking[data-variant="pulse_dots"] .lbn-chat-thinking__mark {
  animation-duration: 2.25s;
}
