/* app/static/css/leya.css */
.leya-modal {
  display: block;
  position: fixed;
  top: 70px;
  right: -300px;
  width: 300px;
  height: calc(100vh - 70px);
  background: rgba(0, 0, 0, 0.95);
  border-left: 1px solid rgba(50, 50, 50, 0.5);
  backdrop-filter: blur(10px);
  transition: right 0.3s ease;
  z-index: 900;
  overflow-y: auto;
  font-family: Arial, sans-serif;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
  padding: 0;
}

.leya-modal.open {
  right: 0;
}

#leya-header {
  background: rgba(240, 240, 240, 0.95); /* Светло-серый почти белый фон */
  height: 50px; /* Фиксированная высота планки */
  padding: 0 20px; /* Горизонтальный отступ без вертикального */
  display: flex;
  justify-content: space-between; /* Крестик справа, значок и текст слева */
  align-items: center;
  border-bottom: 1px solid rgba(150, 150, 150, 0.5); /* Светлая граница */
  position: sticky;
  top: 0;
  z-index: 1;
}

.leya-icon {
  max-height: 48px; /* Увеличенный значок, почти вся высота рамки */
  width: auto;
  margin-left: 0px; /* Смещение влево */
  object-fit: contain;
}

.leya-title-text {
  flex-grow: 1; /* Заполняет пространство */
  text-align: left; /* Смещение текста влево */
  margin-left: 5px; /* Почти вплотную к значку */
  font-size: 22px; /* Увеличенный текст */
  color: #333333; /* Черный текст */
  font-weight: bold;
}

#leya-messages {
  height: calc(100% - 100px); /* Учтена высота заголовка 50px + input ~50px */
  overflow-y: scroll;
  padding: 10px 20px;
  background-color: transparent;
  display: flex;
  flex-direction: column;
}

#leya-messages p {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(50, 50, 50, 0.5);
  color: #ffffff;
  transition: background 0.3s ease, border-color 0.3s ease;
  position: relative;
}

#leya-messages p:hover {
  background: rgba(50, 50, 50, 0.8);
  border-color: rgba(150, 150, 150, 1);
}

#leya-messages p.leya-message-user {
  align-self: flex-end;
  background-color: rgba(0, 204, 255, 0.8);
  color: #1a1a1a;
}

#leya-messages p.leya-message-assistant {
  align-self: flex-start;
  background-color: rgba(50, 50, 50, 0.8);
  color: #ffffff;
}

#leya-messages p .leya-error {
  color: #ff4444;
}

/* Голубое имя Леи */
#leya-messages p .leya-name {
  color: #00ccff;
  font-weight: bold;
}

/* Белое имя You в тёмной теме */
#leya-messages p .user-name {
  color: #ffffff;
  font-weight: bold;
}

/* Стили для кнопки лайка и дизлайка */
.leya-like,
.leya-dislike {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  margin-left: 5px;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.leya-like:hover,
.leya-dislike:hover {
  color: #00ccff;
}

.leya-like:disabled,
.leya-dislike:disabled {
  opacity: 0.5; /* Визуальная обратная связь без cursor: not-allowed */
}

/* Контейнер для фидбека (лайк/дизлайк) под сообщением */
.leya-feedback {
  display: flex;
  justify-content: flex-start;
  margin-top: 5px;
  margin-bottom: 10px;
}

/* Контейнер для сообщений пользователя и действий */
.user-message-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: relative; /* Для точного позиционирования */
}

.user-message-actions {
  display: none; /* Скрыто по умолчанию */
  margin-top: 5px; /* Размещение под рамкой */
  justify-content: flex-end;
  flex-wrap: wrap;
  position: absolute;
  bottom: -25px; /* Под рамкой */
  right: 0;
}

.user-message-container:hover .user-message-actions {
  display: flex;
}

.user-copy,
.user-edit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin-left: 5px;
  transition: color 0.3s ease;
  padding: 2px;
  position: relative; /* Убеждаемся в доступности */
}

.user-copy .action-icon,
.user-edit .action-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.user-copy:hover,
.user-edit:hover {
  color: #00ccff;
}

/* Контейнер для действий ответа (кнопка "Стоп") */
.response-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}

/* Стили для кнопки остановки ответа */
.stop-button {
  background: none;
  border: none;
  color: #ff4444;
  cursor: pointer;
  font-size: 16px;
  margin-left: 5px;
  padding: 2px;
  transition: color 0.3s ease;
}

.stop-button:hover {
  color: #ff0000;
}

/* Стили для режима редактирования */
.edit-input {
  width: 80%;
  padding: 5px;
  border: 1px solid rgba(50, 50, 50, 0.5);
  background: rgba(30, 30, 30, 0.8);
  color: #ffffff;
  font-size: 16px;
  border-radius: 8px;
}

.edit-input:focus {
  outline: none;
  border-color: rgba(150, 150, 150, 1);
}

.edit-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
  margin-bottom: 10px;
}

.edit-actions button {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  margin-left: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.edit-actions button:hover {
  background: rgba(0, 204, 255, 0.8);
}

#leya-input-container {
  position: sticky;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  padding: 10px 20px;
  border-top: 1px solid rgba(50, 50, 50, 0.5);
}

#leya-input {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid rgba(50, 50, 50, 0.5);
  background: rgba(30, 30, 30, 0.8);
  color: #ffffff;
  font-size: 16px;
  border-radius: 8px;
}

#leya-input:focus {
  outline: none;
  border-color: rgba(150, 150, 150, 1);
}

#leya-send {
  padding: 10px;
  background-color: rgba(0, 204, 255, 0.8);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  margin-top: 5px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

#leya-send:hover {
  background-color: rgba(0, 123, 255, 0.8);
}

#leya-close {
  font-size: 32px; /* Увеличенный крестик */
  cursor: pointer;
  color: #333333; /* Черный крестик */
  transition: color 0.3s ease;
  margin-left: 10px; /* Отступ от текста для близости к краю */
}

#leya-close:hover {
  color: #00ccff;
}

#leya-button {
  position: fixed;
  bottom: calc(var(--paxor-player-height, 88px) + 20px);
  right: 20px;
  background-color: rgba(0, 0, 0, 0.95);
  color: #ffffff;
  border: 1px solid rgba(50, 50, 50, 0.5);
  border-radius: 999px;
  min-width: 94px;
  height: 50px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 1600;
  outline: 2px solid rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease, color 0.3s ease;
  animation: leya-blink 1.5s infinite ease-in-out;
}

.leya-button-icon {
  font-size: 20px;
  line-height: 1;
}

.leya-button-text {
  font-weight: 800;
  letter-spacing: 0;
}

@keyframes leya-blink {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 204, 255, 0.8), 0 0 20px rgba(0, 204, 255, 0.6);
    background-color: rgba(0, 0, 0, 0.95);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 204, 255, 1), 0 0 40px rgba(0, 204, 255, 0.8);
    background-color: rgba(0, 204, 255, 0.8);
  }
}

#leya-button:hover {
  background-color: rgba(50, 50, 50, 0.8);
  color: #00ccff;
}

/* Стили для светлой темы */
body.light-theme .leya-modal {
  background: rgba(255, 255, 255, 0.95);
  border-left: 1px solid rgba(150, 150, 150, 0.5);
}

body.light-theme #leya-header {
  background: rgba(240, 240, 240, 0.95); /* Светло-серый почти белый фон */
  color: #333333; /* Черный текст */
  border-bottom: 1px solid rgba(150, 150, 150, 0.5);
}

body.light-theme #leya-messages p {
  background: rgba(240, 240, 240, 0.8);
  border: 1px solid rgba(150, 150, 150, 0.5);
  color: #333333;
}

body.light-theme #leya-messages p:hover {
  background: rgba(220, 220, 220, 0.8);
  border-color: rgba(100, 100, 100, 1);
}

body.light-theme #leya-messages p.leya-message-user {
  background-color: rgba(30, 144, 255, 0.8);
  color: #ffffff;
}

body.light-theme #leya-messages p.leya-message-assistant {
  background-color: rgba(220, 220, 220, 0.8);
  color: #000000;
}

body.light-theme #leya-messages p .leya-name {
  color: #007acc;
}

body.light-theme #leya-messages p .user-name {
  color: #ffffff; /* В светлой теме "You:" уже белый, как основной текст */
}

body.light-theme .leya-like,
body.light-theme .leya-dislike {
  color: #333333;
}

body.light-theme .leya-like:hover,
body.light-theme .leya-dislike:hover {
  color: #007acc;
}

body.light-theme .leya-like:disabled,
body.light-theme .leya-dislike:disabled {
  opacity: 0.5;
}

body.light-theme .user-copy,
body.light-theme .user-edit {
  color: #333333;
}

body.light-theme .user-copy:hover,
body.light-theme .user-edit:hover {
  color: #007acc;
}

body.light-theme .stop-button {
  color: #ff4444;
}

body.light-theme .stop-button:hover {
  color: #ff0000;
}

body.light-theme .edit-input {
  background: rgba(240, 240, 240, 0.8);
  border-color: rgba(150, 150, 150, 0.5);
  color: #333333;
}

body.light-theme .edit-actions button {
  color: #333333;
}

body.light-theme .edit-actions button:hover {
  background: rgba(30, 144, 255, 0.8);
}

body.light-theme #leya-input-container {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(150, 150, 150, 0.5);
}

body.light-theme #leya-input {
  background: rgba(240, 240, 240, 0.8);
  border: 1px solid rgba(150, 150, 150, 0.5);
  color: #333333;
}

body.light-theme #leya-input:focus {
  border-color: rgba(100, 100, 100, 1);
}

body.light-theme #leya-send {
  background-color: rgba(30, 144, 255, 0.8);
}

body.light-theme #leya-send:hover {
  background-color: rgba(0, 123, 255, 0.8);
}

body.light-theme #leya-close {
  color: #333333;
}

body.light-theme #leya-close:hover {
  color: #1e90ff;
}

body.light-theme #leya-button {
  background-color: rgba(255, 255, 255, 0.95);
  color: #333333;
  border: 1px solid rgba(150, 150, 150, 0.5);
  outline: 2px solid rgba(0, 0, 0, 0.2);
}

body.light-theme #leya-button:hover {
  background-color: rgba(220, 220, 220, 0.8);
  color: #00ccff;
}

.leya-modal:not(.leya-page-chat) {
  top: var(--paxor-menu-height, 70px);
  bottom: var(--paxor-player-height, 88px);
  height: auto;
  width: min(340px, calc(100vw - 24px));
  right: -360px;
  z-index: 1300;
}

.leya-modal:not(.leya-page-chat).open {
  right: 0;
}

@media (max-width: 640px) {
  #leya-button {
    right: 14px;
    bottom: calc(var(--paxor-player-height, 76px) + 14px);
    min-width: 86px;
    height: 46px;
  }

  .leya-modal:not(.leya-page-chat) {
    top: var(--paxor-menu-height, 62px);
    bottom: var(--paxor-player-height, 76px);
    width: min(340px, calc(100vw - 16px));
  }
}

/* Анимация для "thinking" (мигающие точки) */
.thinking::after {
  content: "...";
  animation: thinking-dots 1.5s infinite;
}

@keyframes thinking-dots {
  0% { content: "."; }
  33% { content: ".."; }
  66% { content: "..."; }
  100% { content: "."; }
}

.leya-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
  color: #fff;
}

.leya-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 8px;
  background: #06090d;
  isolation: isolate;
}

.leya-hero-media {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(3, 125, 156, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.12) 100%);
  z-index: -1;
}

.leya-hero-content {
  max-width: 620px;
  padding: 34px;
}

.leya-eyebrow {
  margin: 0 0 10px;
  color: #00ccff;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.leya-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.leya-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.65;
}

.leya-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: stretch;
}

.leya-side-panel,
.leya-chat-panel {
  min-width: 0;
}

.leya-auth-panel,
.leya-prompt-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.86);
  padding: 18px;
  backdrop-filter: blur(12px);
}

.leya-auth-panel {
  margin-bottom: 16px;
}

.leya-auth-panel h2,
.leya-prompt-panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #fff;
}

.leya-auth-panel p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.leya-auth-actions {
  display: flex;
  gap: 10px;
}

.leya-auth-actions a {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  background: rgba(0, 204, 255, 0.22);
  border: 1px solid rgba(0, 204, 255, 0.42);
}

.leya-auth-actions a:hover {
  background: rgba(0, 204, 255, 0.36);
}

.leya-quick-prompt {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.leya-quick-prompt:hover {
  background: rgba(0, 204, 255, 0.16);
  border-color: rgba(0, 204, 255, 0.42);
}

.leya-page-chat.leya-modal {
  position: static;
  width: 100%;
  height: 680px;
  max-height: calc(100vh - 150px);
  right: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: none;
  overflow: hidden;
}

.leya-page-chat #leya-close {
  visibility: hidden;
}

.leya-page-chat #leya-messages {
  height: calc(100% - 112px);
}

.leya-page-chat #leya-input-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.leya-page-chat #leya-send {
  margin-top: 0;
}

body.light-theme .leya-page {
  color: #1d1f24;
}

body.light-theme .leya-auth-panel,
body.light-theme .leya-prompt-panel {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .leya-auth-panel h2,
body.light-theme .leya-prompt-panel h2 {
  color: #1d1f24;
}

body.light-theme .leya-auth-panel p {
  color: rgba(0, 0, 0, 0.68);
}

body.light-theme .leya-quick-prompt {
  background: rgba(0, 0, 0, 0.04);
  color: #1d1f24;
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .leya-quick-prompt:hover {
  background: rgba(30, 144, 255, 0.12);
  border-color: rgba(30, 144, 255, 0.36);
}

@media (max-width: 860px) {
  .leya-page {
    width: min(100% - 20px, 680px);
    padding-top: 18px;
  }

  .leya-hero {
    min-height: 260px;
  }

  .leya-hero-content {
    padding: 24px;
  }

  .leya-workspace {
    grid-template-columns: 1fr;
  }

  .leya-page-chat.leya-modal {
    height: 620px;
    max-height: none;
  }
}

@media (max-width: 520px) {
  .leya-page-chat #leya-input-container {
    grid-template-columns: 1fr;
  }
}

/* Full Leya page: blockchain-style map hero + GPT-like chat frame */
.leya-page {
  --leya-teal: #037d9c;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 56px;
  box-sizing: border-box;
}

.leya-map-hero {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 26px;
  margin-bottom: 22px;
  border: 2px solid var(--leya-teal);
  border-radius: 20px;
  background:
    radial-gradient(circle at 54% 45%, rgba(3, 125, 156, 0.26), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.04));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.leya-map-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.08) 42%, transparent),
    repeating-linear-gradient(90deg, rgba(158, 231, 255, 0.08) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(0deg, rgba(158, 231, 255, 0.06) 0 1px, transparent 1px 58px);
  pointer-events: none;
}

.leya-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.leya-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 0 14px;
  padding: 10px 18px;
  border: 1px solid rgba(232, 251, 255, 0.55);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffffff;
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

.leya-hero-badge img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.38));
}

.leya-hero-badge span {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.leya-hero-copy h1 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: uppercase;
}

.leya-hero-copy .hero-text {
  max-width: 520px;
  margin: 0;
  color: #e8fbff;
  font-size: 15px;
  line-height: 1.55;
}

.leya-network-status {
  position: relative;
  z-index: 3;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(5, 12, 20, 0.76);
  color: #f5fbff;
  font-size: 0.94rem;
}

.leya-chain-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.leya-map-pixel-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  opacity: 0.95;
}

.map-pixel {
  fill: rgba(238, 253, 255, 0.44);
  animation: leya-map-pixel-pulse 4.2s ease-in-out infinite;
}

@keyframes leya-map-pixel-pulse {
  0%,
  100% {
    opacity: 0.24;
  }
  44% {
    opacity: 0.92;
    filter: drop-shadow(0 0 4px rgba(238, 253, 255, 0.72));
  }
  62% {
    opacity: 0.32;
  }
}

.leya-chain-visual .chain-link {
  position: absolute;
  width: var(--link-width);
  height: 6px;
  left: var(--link-left);
  top: var(--link-top);
  border-radius: 999px;
  background: transparent;
  filter: drop-shadow(0 0 8px rgba(3, 125, 156, 0.88));
  mix-blend-mode: screen;
  overflow: hidden;
  transform: rotate(var(--link-rotate));
  transform-origin: left center;
}

.leya-chain-visual .link-a {
  --link-left: 51.667%;
  --link-top: 29.302%;
  --link-width: 15.148%;
  --link-rotate: -8.01deg;
}

.leya-chain-visual .link-b {
  --link-left: 66.667%;
  --link-top: 20.465%;
  --link-width: 18.408%;
  --link-rotate: 20.68deg;
}

.leya-chain-visual .link-c {
  --link-left: 83.889%;
  --link-top: 47.674%;
  --link-width: 14.65%;
  --link-rotate: 150.71deg;
}

.leya-chain-visual .link-d {
  --link-left: 71.111%;
  --link-top: 77.674%;
  --link-width: 15.092%;
  --link-rotate: -173.66deg;
}

.leya-chain-visual .link-e {
  --link-left: 56.111%;
  --link-top: 70.698%;
  --link-width: 14.055%;
  --link-rotate: -161.57deg;
}

.leya-chain-visual .link-f {
  --link-left: 42.778%;
  --link-top: 52.093%;
  --link-width: 10.424%;
  --link-rotate: -31.49deg;
}

.leya-chain-visual .link-g {
  --link-left: 51.667%;
  --link-top: 29.302%;
  --link-width: 22.619%;
  --link-rotate: 30.72deg;
}

.leya-chain-visual .link-h {
  --link-left: 66.667%;
  --link-top: 20.465%;
  --link-width: 14.371%;
  --link-rotate: 71.99deg;
}

.leya-chain-visual .chain-signal {
  position: absolute;
  left: -42%;
  top: 50%;
  width: 34%;
  min-width: 52px;
  height: 100%;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(3, 125, 156, 0.12) 12%,
      rgba(3, 125, 156, 0.92) 38%,
      rgba(233, 253, 255, 1) 50%,
      rgba(3, 125, 156, 0.92) 62%,
      rgba(3, 125, 156, 0.12) 88%,
      transparent 100%
    );
  box-shadow:
    0 0 8px rgba(3, 125, 156, 0.86),
    0 0 15px rgba(233, 253, 255, 0.52);
  transform: translateY(-50%);
  animation: leya-signal-travel 2.9s linear infinite;
}

.leya-chain-visual .link-b .chain-signal { animation-delay: 0.42s; }
.leya-chain-visual .link-c .chain-signal { animation-delay: 0.84s; }
.leya-chain-visual .link-d .chain-signal { animation-delay: 1.26s; }
.leya-chain-visual .link-e .chain-signal { animation-delay: 1.68s; }
.leya-chain-visual .link-f .chain-signal { animation-delay: 2.1s; }
.leya-chain-visual .link-g .chain-signal { animation-delay: 2.52s; }
.leya-chain-visual .link-h .chain-signal { animation-delay: 2.94s; }

@keyframes leya-signal-travel {
  0% {
    left: -46%;
    opacity: 0;
  }
  10%,
  74% {
    opacity: 1;
  }
  100% {
    left: 104%;
    opacity: 0;
  }
}

.leya-chatgpt-frame {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 12, 18, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.leya-chat-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leya-chat-topline span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.leya-chat-topline strong {
  display: block;
  color: #ffffff;
  font-size: 1.12rem;
}

.leya-auth-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.leya-auth-inline span {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: none;
}

.leya-auth-inline a {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  border: 1px solid rgba(0, 204, 255, 0.42);
  border-radius: 6px;
  background: rgba(0, 204, 255, 0.16);
  color: #ffffff;
  text-decoration: none;
}

.leya-prompt-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.leya-prompt-row .leya-quick-prompt {
  min-height: 52px;
  margin: 0;
  justify-content: flex-start;
}

.leya-page-chat.leya-modal {
  position: static;
  width: 100%;
  height: 640px;
  max-height: none;
  right: auto;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: none;
  overflow: hidden;
}

.leya-page-chat #leya-messages {
  height: calc(100% - 86px);
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 18px 18px;
  overflow-y: auto;
}

.leya-page-chat #leya-messages p {
  border: 0;
  box-shadow: none;
  line-height: 1.55;
}

.leya-page-chat #leya-messages p.leya-message-assistant {
  max-width: 86%;
  background: transparent;
  color: #f5fbff;
}

.leya-page-chat #leya-messages p.leya-message-user {
  max-width: 72%;
  background: #2f333a;
  color: #ffffff;
  border-radius: 18px;
  padding: 11px 14px;
}

.leya-page-chat .leya-name,
.leya-page-chat .user-name {
  display: none;
}

.leya-page-chat #leya-input-container {
  position: static;
  width: min(820px, calc(100% - 36px));
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(20, 24, 30, 0.96);
}

.leya-page-chat #leya-input {
  min-height: 48px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 0 8px;
}

.leya-page-chat #leya-send {
  min-height: 48px;
  margin: 0;
  border-radius: 12px;
  font-weight: 800;
}

body.light-theme .leya-chatgpt-frame {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .leya-chat-topline,
body.light-theme .leya-prompt-row {
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .leya-chat-topline strong {
  color: #1d1f24;
}

body.light-theme .leya-chat-topline span,
body.light-theme .leya-auth-inline,
body.light-theme .leya-auth-inline span {
  color: rgba(0, 0, 0, 0.64);
}

body.light-theme .leya-page-chat.leya-modal {
  background: rgba(250, 250, 250, 0.72);
}

body.light-theme .leya-page-chat #leya-messages p.leya-message-assistant {
  color: #1d1f24;
}

body.light-theme .leya-page-chat #leya-messages p.leya-message-user {
  background: #e8edf3;
  color: #101318;
}

body.light-theme .leya-page-chat #leya-input-container {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.13);
}

@media (max-width: 920px) {
  .leya-map-hero,
  .leya-chat-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .leya-prompt-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .leya-chain-visual {
    opacity: 0.58;
    transform: translateX(110px);
  }

  .leya-auth-inline {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .leya-page {
    padding: 18px 10px 48px;
  }

  .leya-map-hero {
    padding: 14px;
  }

  .leya-hero-copy h1 {
    font-size: 27px;
  }

  .leya-chain-visual {
    opacity: 0.36;
    transform: translateX(170px) scale(0.92);
    transform-origin: right center;
  }

  .leya-prompt-row {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .leya-page-chat.leya-modal {
    height: 620px;
  }

  .leya-page-chat #leya-input-container {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
  }
}

/* Leya full-width app shell */
body:has(.leya-app-shell) .main-content {
  overflow: visible;
}

body:has(.leya-app-shell) footer {
  display: none;
}

.leya-app-shell {
  --leya-sidebar-width: 152px;
  --leya-sidebar-collapsed: 54px;
  --leya-composer-height: 148px;
  display: grid;
  grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr);
  width: 100%;
  height: calc(100vh - 70px);
  min-height: 0;
  color: #ffffff;
  background: rgba(3, 7, 12, 0.96);
  overflow: hidden;
}

.leya-app-shell.sidebar-collapsed {
  grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr);
}

.leya-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 9, 14, 0.96);
}

.leya-sidebar-actions {
  display: grid;
  gap: 8px;
}

.leya-icon-button,
.leya-new-chat,
.leya-history-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
}

.leya-icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.leya-new-chat {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-weight: 700;
}

.leya-action-icon {
  flex: 0 0 20px;
  font-size: 20px;
  line-height: 1;
}

.leya-action-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leya-history-heading {
  margin: 18px 6px 8px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.leya-chat-history {
  display: grid;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.leya-history-item {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 5px;
  padding: 0 6px 0 10px;
}

.leya-history-item.active {
  border-color: rgba(0, 204, 255, 0.54);
  background: rgba(0, 204, 255, 0.16);
}

.leya-history-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.leya-delete-chat {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.leya-delete-chat:hover {
  color: #ff7474;
  background: rgba(255, 116, 116, 0.12);
}

.leya-app-shell.sidebar-collapsed .leya-sidebar {
  align-items: center;
  padding-inline: 7px;
}

.leya-sidebar.sidebar-collapsed {
  align-items: center;
  padding-inline: 7px;
}

.leya-app-shell.sidebar-collapsed .leya-new-chat {
  width: 38px;
  justify-content: center;
  padding: 0;
}

.leya-sidebar.sidebar-collapsed .leya-new-chat {
  width: 38px;
  justify-content: center;
  padding: 0;
}

.leya-app-shell.sidebar-collapsed .leya-action-text,
.leya-app-shell.sidebar-collapsed .leya-history-heading,
.leya-app-shell.sidebar-collapsed .leya-history-title,
.leya-app-shell.sidebar-collapsed .leya-delete-chat {
  display: none;
}

.leya-app-shell.sidebar-collapsed .leya-history-item {
  width: 38px;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.leya-app-shell.sidebar-collapsed .leya-history-item::before {
  content: "●";
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

/* Final Leya brand/collapse override: keep this after all older sidebar layers. */
.leya-workspace-panel:not(.sidebar-collapsed) {
  grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr) !important;
}

.leya-workspace-panel.sidebar-collapsed {
  grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr) !important;
}

.leya-sidebar-brand-row {
  width: calc(100% + 16px);
  margin: 0 0 14px -8px;
  padding: 8px 6px 8px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 1px solid rgba(158, 231, 255, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(6, 171, 212, 0.12), rgba(255, 255, 255, 0.035));
}

.leya-sidebar-brand {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
  color: #f7fbfc;
  text-decoration: none;
}

.leya-sidebar-brand:hover {
  color: #e9fcff;
  text-decoration: none;
}

.leya-sidebar-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(32, 217, 255, 0.34);
  border-radius: 10px;
  background: rgba(3, 125, 156, 0.16);
}

.leya-sidebar-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.leya-sidebar-brand-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
  letter-spacing: 0;
}

.leya-sidebar-brand-copy strong {
  color: #20d9ff;
}

.leya-sidebar-brand-row .leya-sidebar-toggle.music-left-toggle,
.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-row .leya-sidebar-toggle.music-left-toggle {
  position: static;
  inset: auto;
  margin: 0;
  justify-self: center;
  align-self: center;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-brand-row,
.leya-workspace-panel:not(.sidebar-collapsed) .leya-sidebar-brand-row {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-row,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-row {
  width: 100%;
  margin: 0 0 14px;
  padding: 8px 0;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 7px;
  border-radius: 14px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  padding: 0;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-mark,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-copy,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-copy {
  display: none !important;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-brand-copy,
.leya-workspace-panel:not(.sidebar-collapsed) .leya-sidebar-brand-copy {
  display: inline;
}

/* Final Leya brand/collapse override: keep this after all older sidebar layers. */
.leya-workspace-panel:not(.sidebar-collapsed) {
  grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr) !important;
}

.leya-workspace-panel.sidebar-collapsed {
  grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr) !important;
}

.leya-sidebar-brand-row {
  width: calc(100% + 16px);
  margin: 0 0 14px -8px;
  padding: 8px 6px 8px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 1px solid rgba(158, 231, 255, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(6, 171, 212, 0.12), rgba(255, 255, 255, 0.035));
}

.leya-sidebar-brand {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
  color: #f7fbfc;
  text-decoration: none;
}

.leya-sidebar-brand:hover {
  color: #e9fcff;
  text-decoration: none;
}

.leya-sidebar-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(32, 217, 255, 0.34);
  border-radius: 10px;
  background: rgba(3, 125, 156, 0.16);
}

.leya-sidebar-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.leya-sidebar-brand-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
  letter-spacing: 0;
}

.leya-sidebar-brand-copy strong {
  color: #20d9ff;
}

.leya-sidebar-brand-row .leya-sidebar-toggle.music-left-toggle,
.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-row .leya-sidebar-toggle.music-left-toggle {
  position: static;
  inset: auto;
  margin: 0;
  justify-self: center;
  align-self: center;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-brand-row,
.leya-workspace-panel:not(.sidebar-collapsed) .leya-sidebar-brand-row {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-row,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-row {
  width: 100%;
  margin: 0 0 14px;
  padding: 8px 0;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 7px;
  border-radius: 14px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  padding: 0;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-mark,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-copy,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-copy {
  display: none !important;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-brand-copy,
.leya-workspace-panel:not(.sidebar-collapsed) .leya-sidebar-brand-copy {
  display: inline;
}

.leya-workspace-panel:not(.sidebar-collapsed) {
  grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr) !important;
}

.leya-workspace-panel.sidebar-collapsed {
  grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr) !important;
}

/* Leya sidebar brand frame: same layout behavior as Paxor Music left column. */
.leya-sidebar-brand-row {
  width: calc(100% + 16px);
  margin: 0 0 14px -8px;
  padding: 8px 6px 8px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 1px solid rgba(158, 231, 255, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(6, 171, 212, 0.12), rgba(255, 255, 255, 0.035));
}

.leya-sidebar-brand {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
  color: #f7fbfc;
  text-decoration: none;
}

.leya-sidebar-brand:hover {
  color: #e9fcff;
  text-decoration: none;
}

.leya-sidebar-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(32, 217, 255, 0.34);
  border-radius: 10px;
  background: rgba(3, 125, 156, 0.16);
}

.leya-sidebar-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.leya-sidebar-brand-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
  letter-spacing: 0;
}

.leya-sidebar-brand-copy strong {
  color: #20d9ff;
}

.leya-sidebar-brand-row .leya-sidebar-toggle.music-left-toggle,
.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-row .leya-sidebar-toggle.music-left-toggle {
  position: static;
  inset: auto;
  margin: 0;
  justify-self: center;
  align-self: center;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-brand-row {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-row,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-row {
  width: 100%;
  margin: 0 0 14px;
  padding: 8px 0;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 7px;
  border-radius: 14px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  padding: 0;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-mark,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-copy,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-copy {
  display: none !important;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-brand-copy {
  display: inline;
}

.leya-app-shell.sidebar-collapsed .leya-history-item.active::before {
  color: #00ccff;
}

.leya-main-panel {
  position: relative;
  display: grid;
  grid-template-rows: 132px 58px minmax(0, 1fr) var(--leya-composer-height);
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 10, 16, 0.92), rgba(4, 6, 10, 0.98));
}

.leya-earth-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  border-bottom: 0;
  background: transparent;
}

.leya-earth-map::before {
  content: none;
}

.leya-earth-map .map-pixel-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

.leya-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 12, 18, 0.88);
}

.leya-chat-header span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.leya-chat-header strong {
  display: block;
  margin-top: 3px;
  color: #ffffff;
  font-size: 1.05rem;
}

.leya-page-chat.leya-modal {
  position: relative;
  width: 100%;
  height: 100%;
  right: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.leya-page-chat #leya-messages {
  height: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 26px 18px 26px;
  overflow-y: auto;
}

.leya-page-chat #leya-messages p {
  border: 0;
  box-shadow: none;
  line-height: 1.6;
}

.leya-page-chat #leya-messages p.leya-message-assistant {
  max-width: 86%;
  background: transparent;
  color: #f5fbff;
}

.leya-page-chat #leya-messages p.leya-message-user {
  max-width: 72%;
  background: #2f333a;
  color: #ffffff;
  border-radius: 18px;
  padding: 11px 14px;
}

.leya-page-chat .leya-name,
.leya-page-chat .user-name {
  display: none;
}

.leya-fixed-composer {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: end;
  gap: 10px;
  padding: 12px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 9, 14, 0.98);
}

#leya-input-container.leya-fixed-composer {
  position: relative;
  bottom: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.leya-composer-prompts {
  width: min(920px, 100%);
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.leya-composer-prompts .leya-quick-prompt {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  font-size: 0.86rem;
}

.leya-composer-row {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 36px;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(20, 24, 30, 0.96);
}

.leya-composer-row #leya-input {
  width: 100%;
  min-height: 48px;
  max-height: 96px;
  resize: none;
  overflow-y: auto;
  border: 0;
  background: transparent;
  color: #ffffff;
  padding: 12px 8px;
  font: inherit;
  outline: none;
}

.leya-composer-row #leya-send,
.leya-stop-send {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  align-self: end;
  margin: 0;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.leya-composer-row #leya-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 204, 255, 0.9);
  color: #ffffff;
  font-size: 14px;
}

.leya-stop-send {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.leya-stop-send::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 2px;
  background: #05070a;
}

.leya-message-row {
  display: flex;
  flex-direction: column;
  margin: 10px 0;
}

.leya-message-row.user {
  align-items: flex-end;
}

.leya-message-row.assistant {
  align-items: flex-start;
}

.leya-message-actions-inline {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.leya-message-row:hover .leya-message-actions-inline {
  opacity: 1;
}

.leya-message-actions-inline button {
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  padding: 4px 7px;
}

body.light-theme .leya-app-shell {
  background: rgba(244, 247, 250, 0.96);
  color: #111827;
}

body.light-theme .leya-sidebar,
body.light-theme .leya-chat-header,
body.light-theme .leya-fixed-composer {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .leya-icon-button,
body.light-theme .leya-new-chat,
body.light-theme .leya-history-item,
body.light-theme .leya-composer-row {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #111827;
}

body.light-theme .leya-main-panel {
  background: linear-gradient(180deg, rgba(246, 249, 252, 0.96), rgba(238, 243, 248, 0.98));
}

body.light-theme .leya-chat-header strong,
body.light-theme .leya-page-chat #leya-messages p.leya-message-assistant,
body.light-theme .leya-composer-row #leya-input {
  color: #111827;
}

body.light-theme .leya-page-chat #leya-messages p.leya-message-user {
  background: #e8edf3;
  color: #101318;
}

@media (max-width: 820px) {
  .leya-app-shell {
    --leya-sidebar-width: 132px;
    grid-template-rows: 1fr;
  }

  .leya-chat-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .leya-app-shell {
    --leya-sidebar-width: 54px;
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .leya-app-shell .leya-action-text,
  .leya-app-shell .leya-history-heading,
  .leya-app-shell .leya-history-title,
  .leya-app-shell .leya-delete-chat {
    display: none;
  }

  .leya-app-shell .leya-new-chat,
  .leya-app-shell .leya-history-item {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  .leya-main-panel {
    grid-template-rows: 100px 74px minmax(0, 1fr) 166px;
  }

  .leya-composer-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Current Leya page layout: full-width hero above workspace */
.leya-app-shell {
  --leya-sidebar-width: 228px;
  --leya-sidebar-collapsed: 64px;
  --leya-hero-height: 260px;
  --leya-composer-height: 148px;
  display: block;
  width: 100%;
  min-height: calc(100vh - 70px);
  height: auto;
  min-height: 0;
  background: rgba(3, 7, 12, 0.96);
  overflow: visible;
}

.leya-app-shell.sidebar-collapsed {
  grid-template-columns: 1fr;
}

.leya-assistant-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  width: 100%;
  height: var(--leya-hero-height);
  padding: 22px 26px;
  border: 2px solid #037d9c;
  border-radius: 20px;
  background:
    radial-gradient(circle at 72% 48%, rgba(3, 125, 156, 0.22), transparent 36%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.04)),
    linear-gradient(180deg, rgba(6, 24, 34, 0.98), rgba(3, 8, 13, 0.98));
  box-sizing: border-box;
  box-shadow:
    0 0 18px rgba(3, 125, 156, 0.55),
    0 12px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.leya-assistant-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.06) 42%, transparent);
  pointer-events: none;
}

.leya-hero-text {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  max-width: 560px;
}

.leya-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0 0 14px;
  padding: 10px 18px;
  border: 1px solid rgba(232, 251, 255, 0.55);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: #e8fbff;
  white-space: nowrap;
  box-shadow:
    0 0 14px rgba(255, 255, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.leya-hero-badge img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));
}

.leya-hero-badge span {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.leya-hero-text h1 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 31px;
  line-height: 1.15;
}

.leya-hero-text p {
  max-width: 520px;
  margin: 0;
  color: #e8fbff;
  font-size: 15px;
  line-height: 1.55;
}

.leya-answer-status {
  position: absolute;
  right: 102px;
  bottom: 26px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  min-height: 25px;
  padding: 5px 10px 5px 7px;
  border: 1px solid rgba(232, 251, 255, 0.34);
  border-radius: 9px;
  background: rgba(15, 18, 22, 0.86);
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
  box-sizing: border-box;
  box-shadow:
    0 0 14px rgba(3, 125, 156, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  transform: translateX(calc((clamp(104px, 14vw, 178px) - 100%) / 2));
}

.leya-answer-status .status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
}

#leya-answer-status-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leya-workspace-panel {
  display: grid;
  grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - 70px);
  overflow: visible;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.leya-app-shell.sidebar-collapsed .leya-workspace-panel {
  grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr);
}

.leya-assistant-hero .leya-earth-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  height: 100%;
  border: 0;
  background: transparent;
}

.leya-main-panel {
  grid-template-rows: 58px minmax(0, 1fr) var(--leya-composer-height);
  min-height: calc(100vh - 70px);
  height: calc(100vh - 70px);
  position: sticky;
  top: 70px;
  align-self: start;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.leya-sidebar {
  height: 100%;
  width: auto;
  min-height: calc(100vh - 70px);
  position: sticky;
  top: 70px;
  align-self: start;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.leya-sidebar-toggle {
  width: 52px;
  height: 38px;
  display: grid;
  grid-template-columns: 13px 1fr;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.leya-sidebar-toggle span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: rgba(232, 251, 255, 0.78);
  box-shadow: 0 0 8px rgba(3, 125, 156, 0.34);
}

.leya-sidebar-toggle .toggle-wide {
  background: rgba(3, 125, 156, 0.72);
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-toggle {
  grid-template-columns: 1fr 13px;
}

body.light-theme .leya-assistant-hero {
  background:
    radial-gradient(circle at 72% 48%, rgba(3, 125, 156, 0.18), transparent 36%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.04)),
    linear-gradient(180deg, rgba(6, 24, 34, 0.98), rgba(3, 8, 13, 0.98));
}

@media (max-width: 820px) {
  .leya-app-shell {
    --leya-sidebar-width: 172px;
    --leya-hero-height: 260px;
  }

  .leya-assistant-hero {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .leya-app-shell {
    --leya-sidebar-width: 64px;
    --leya-hero-height: 250px;
  }

  .leya-workspace-panel {
    grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr);
  }
}

/* Final Leya page behavior: hero scrolls away, chat controls stay framed */
body:has(.leya-app-shell) {
  overflow-x: hidden;
  overflow-y: auto;
}

body:has(.leya-app-shell) .main-content {
  height: auto;
  overflow: visible;
}

.leya-app-shell {
  display: block;
  width: 100%;
  height: auto;
  min-height: calc(100vh - 70px);
  overflow: visible;
}

.leya-workspace-panel {
  display: grid;
  grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - 70px);
  overflow: visible;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.leya-app-shell.sidebar-collapsed .leya-workspace-panel {
  grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr);
}

.leya-sidebar,
.leya-main-panel {
  position: sticky;
  top: 70px;
  align-self: start;
  height: calc(100vh - 70px);
  min-height: 0;
}

.leya-main-panel {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) var(--leya-composer-height);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.leya-sidebar {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.leya-chat-header {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: normal;
  gap: 14px;
  min-height: 64px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 12, 18, 0.98);
  backdrop-filter: none;
}

.leya-page-chat.leya-modal {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 8, 13, 0.82);
}

.leya-page-chat #leya-messages {
  height: 100%;
  padding-top: 24px;
  background: transparent;
}

.leya-fixed-composer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px 18px 0 0;
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.08),
    0 -14px 30px rgba(0, 0, 0, 0.2);
}

.leya-stop-send:disabled {
  opacity: 0.45;
  cursor: default;
}

.leya-app-shell .leya-fixed-composer {
  position: fixed;
  left: var(--leya-sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 30;
}

.leya-app-shell.sidebar-collapsed .leya-fixed-composer {
  left: var(--leya-sidebar-collapsed);
}

.leya-app-shell .leya-page-chat #leya-messages {
  padding-bottom: calc(var(--leya-composer-height) + 24px);
}

body.light-theme .leya-stop-send {
  background: #05070a;
  border-color: rgba(0, 0, 0, 0.18);
}

body.light-theme .leya-stop-send::before {
  background: #ffffff;
}

.leya-chat-header {
  border-bottom: 0;
}

.leya-page-chat.leya-modal {
  border-top: 0;
}

body.light-theme .leya-chat-header {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .leya-page-chat.leya-modal,
body.light-theme .leya-fixed-composer,
body.light-theme .leya-main-panel,
body.light-theme .leya-sidebar,
body.light-theme .leya-workspace-panel {
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .leya-page-chat.leya-modal {
  background: rgba(248, 250, 252, 0.86);
}

#leya-input-container.leya-fixed-composer {
  position: fixed;
  left: var(--leya-sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 100000;
  isolation: isolate;
  pointer-events: auto;
}

.leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer {
  left: var(--leya-sidebar-collapsed);
}

/* Brighter Leya page grid and Analytics-like header treatment */
.leya-assistant-hero {
  width: min(1144px, calc(100% - 36px));
  height: 260px;
  margin: 28px auto 22px;
  border-color: #037d9c;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.04)),
    linear-gradient(180deg, rgba(5, 30, 42, 0.98), rgba(3, 10, 16, 0.98));
  box-shadow:
    0 0 22px rgba(3, 125, 156, 0.7),
    0 12px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.leya-assistant-hero::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.06) 42%, transparent),
    repeating-linear-gradient(90deg, rgba(158, 231, 255, 0.16) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(0deg, rgba(158, 231, 255, 0.12) 0 1px, transparent 1px 58px);
}

.leya-earth-map .map-pixel-layer {
  opacity: 1;
  inset: 12px 24px 8px;
  width: calc(100% - 48px);
  height: calc(100% - 20px);
  filter:
    drop-shadow(0 0 5px rgba(232, 251, 255, 0.35))
    drop-shadow(0 0 12px rgba(3, 125, 156, 0.28));
}

.leya-earth-map .map-pixel {
  fill: rgba(238, 253, 255, 0.72);
}

.leya-hero-badge,
.leya-answer-status,
.leya-sidebar-toggle,
.leya-composer-row,
.leya-new-chat,
.leya-history-item {
  border-color: rgba(232, 251, 255, 0.42);
}

.leya-workspace-panel,
.leya-main-panel,
.leya-sidebar,
.leya-chat-header,
.leya-page-chat.leya-modal,
.leya-fixed-composer {
  border-color: rgba(158, 231, 255, 0.28);
}

.leya-chat-header {
  border-bottom: 1px solid rgba(158, 231, 255, 0.26);
  box-shadow: inset 0 -1px 0 rgba(232, 251, 255, 0.08);
}

.leya-page-chat.leya-modal {
  border-top: 1px solid rgba(158, 231, 255, 0.22);
  border-bottom: 1px solid rgba(158, 231, 255, 0.22);
}

.leya-fixed-composer {
  border-top: 1px solid rgba(158, 231, 255, 0.34);
  box-shadow:
    0 -1px 0 rgba(232, 251, 255, 0.16),
    0 -14px 34px rgba(0, 0, 0, 0.28);
}

#leya-input-container.leya-fixed-composer {
  border-top-color: rgba(158, 231, 255, 0.34);
}

body.light-theme .leya-assistant-hero {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18) 45%, rgba(0, 0, 0, 0.04)),
    linear-gradient(180deg, rgba(5, 30, 42, 0.98), rgba(3, 10, 16, 0.98));
}

body.light-theme .leya-workspace-panel,
body.light-theme .leya-main-panel,
body.light-theme .leya-sidebar,
body.light-theme .leya-chat-header,
body.light-theme .leya-page-chat.leya-modal,
body.light-theme .leya-fixed-composer {
  border-color: rgba(3, 125, 156, 0.28);
}

/* Let the global star video show around the AI page header */
body:has(.leya-app-shell) .main-content,
.leya-app-shell {
  background: transparent;
}

body.light-theme .leya-app-shell {
  background: transparent;
}

.leya-assistant-hero {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.02)),
    radial-gradient(circle at 72% 46%, rgba(3, 125, 156, 0.42), transparent 36%),
    linear-gradient(180deg, rgba(3, 125, 156, 0.36), rgba(4, 22, 32, 0.86));
}

.leya-assistant-hero::before {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), rgba(3, 125, 156, 0.1) 52%, transparent);
}

body.light-theme .leya-assistant-hero {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.02)),
    radial-gradient(circle at 72% 46%, rgba(3, 125, 156, 0.42), transparent 36%),
    linear-gradient(180deg, rgba(3, 125, 156, 0.36), rgba(4, 22, 32, 0.86));
}

.leya-earth-image {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(248%, 2920px);
  height: 100%;
  max-height: 100%;
  object-fit: fill;
  transform: translate(-50%, -50%);
  opacity: 0.72;
  filter:
    invert(1)
    brightness(1.28)
    sepia(1)
    saturate(2.2)
    hue-rotate(142deg)
    drop-shadow(0 0 7px rgba(232, 251, 255, 0.34))
    drop-shadow(0 0 16px rgba(3, 125, 156, 0.28));
  mix-blend-mode: screen;
}

body.light-theme .leya-earth-image {
  opacity: 0.68;
}

.leya-hero-avatar-wrap {
  --leya-avatar-ring-size: 88%;
  --leya-avatar-ring-y: 46.9%;
  position: absolute;
  right: 8px;
  top: 50%;
  z-index: 2;
  width: min(21.5vw, 236px);
  height: min(21.5vw, 236px);
  transform: translateY(-50%);
  border-radius: 50%;
}

.leya-hero-avatar-wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: 0;
  top: 50%;
  width: min(21.5vw, 236px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.62) 0 64%, rgba(0, 0, 0, 0.34) 88%, transparent 89%);
  transform: translateY(-50%);
  pointer-events: none;
  backdrop-filter: brightness(0.72) saturate(0.92);
}

.leya-hero-avatar-wrap::after {
  content: none;
}

.leya-hero-avatar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transform: none;
  opacity: 0.94;
  border: 2px solid #037d9c;
  box-shadow:
    0 0 0 1px rgba(3, 125, 156, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  filter:
    saturate(1.06);
  box-sizing: border-box;
}

@keyframes leya-electric-orbit {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 820px) {
  .leya-hero-avatar-wrap {
    right: 18px;
    width: 132px;
    height: 132px;
  }

  .leya-hero-avatar {
    opacity: 0.78;
  }
}

@media (max-width: 620px) {
  .leya-hero-avatar-wrap {
    width: 104px;
    height: 104px;
  }

  .leya-hero-avatar {
    opacity: 0.62;
  }
}

/* ========================= */
/* SMART CONTRACTS ALIGNMENT */
/* ========================= */

.leya-app-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px 60px;
  box-sizing: border-box;
}

.leya-assistant-hero {
  width: 100%;
  min-height: 230px;
  height: 230px;
  margin: 0 0 22px;
  padding: 22px 26px;
}

.leya-hero-text {
  max-width: 560px;
}

.leya-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  margin: 0 0 14px;
  border: 1px solid rgba(6, 217, 255, 0.42);
  border-radius: 999px;
  background: rgba(3, 125, 156, 0.18);
  color: #e8fbff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.leya-hero-text h1 {
  font-size: 31px;
  font-weight: 800;
  line-height: 1.15;
}

.leya-hero-text p {
  max-width: 340px;
}

.leya-hero-badge {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 3;
  min-height: 44px;
  margin: 0;
  padding: 10px 18px;
}

.leya-hero-badge i {
  color: #06d9ff;
}

.leya-answer-status {
  right: 22px;
  bottom: 30px;
  width: 148px;
  min-width: 148px;
  max-width: 148px;
  min-height: 34px;
  padding: 7px 12px;
  gap: 9px;
  color: #5dff9a;
  font-size: 12px;
  transform: none;
}

.leya-answer-status .status-dot {
  width: 9px;
  height: 9px;
  flex-basis: 9px;
  border-radius: 50%;
  background: #32e878;
  box-shadow: 0 0 10px rgba(50, 232, 120, 0.8);
}


.leya-intro {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 112px;
  margin: 26px 0 17px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 2px solid #037d9c;
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.14) 48%, rgba(0, 0, 0, 0.04)),
    radial-gradient(circle at 78% 48%, rgba(3, 125, 156, 0.42), transparent 38%),
    linear-gradient(180deg, rgba(3, 125, 156, 0.38), rgba(4, 22, 32, 0.84)),
    #080a0d;
  box-shadow:
    0 0 16px rgba(3, 125, 156, 0.48),
    0 10px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  box-sizing: border-box;
}

.leya-intro-avatar-wrap {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
}

.leya-intro-avatar-wrap .leya-hero-avatar {
  width: 82px;
  height: 82px;
}

.leya-intro-copy {
  position: relative;
  z-index: 2;
}

.leya-intro h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.leya-intro p {
  max-width: 720px;
  margin: 0;
  color: #e8fbff;
  font-size: 13px;
  line-height: 1.4;
}

.leya-workspace-panel {
  width: 100%;
  border: 1px solid rgba(158, 231, 255, 0.28);
  border-radius: 16px;
  overflow: hidden;
  box-sizing: border-box;
}

.leya-sidebar-toggle {
  width: 44px;
  height: 32px;
  margin: 12px auto 2px;
}

.leya-chat-header-empty,
.leya-chat-header:empty {
  display: none;
}

.leya-main-panel {
  grid-template-rows: auto minmax(0, 1fr) var(--leya-composer-height);
}

.leya-page-chat.leya-modal {
  grid-row: 2;
}

.leya-app-shell #leya-input-container.leya-fixed-composer,
.leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer {
  position: sticky;
  left: auto;
  right: auto;
  bottom: 0;
  width: 100%;
}

@media (max-width: 760px) {
  .leya-app-shell {
    padding: 20px 12px 50px;
  }

  .leya-assistant-hero {
    min-height: 230px;
    height: auto;
    padding: 20px;
  }

  

  
}

/* Final wallet parity with Smart Contracts and assistant activity polish. */


.leya-intro {
  min-height: 124px;
  padding: 5px 14px;
}

.leya-intro-avatar-wrap,
.leya-intro-avatar-wrap .leya-hero-avatar {
  width: 110px;
  height: 110px;
}

.leya-intro-avatar-wrap {
  flex-basis: 110px;
}

.leya-intro h2 {
  font-size: 24px;
}

.leya-workspace-panel {
  min-height: calc(100vh - 70px);
  align-items: stretch;
}

.leya-sidebar {
  position: relative;
  top: auto;
  align-self: stretch;
  height: auto;
  min-height: calc(100vh - 70px);
  padding-bottom: 22px;
}

.leya-answer-status.answering {
  border-color: rgba(6, 217, 255, 0.58);
  color: #8eeeff;
  box-shadow:
    0 0 18px rgba(6, 217, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: leya-answer-status-glow 1.2s ease-in-out infinite;
}

.leya-answer-status.answering .status-dot {
  background: #06d9ff;
  box-shadow: 0 0 12px rgba(6, 217, 255, 0.94);
  animation: leya-answer-dot-pulse 0.82s ease-in-out infinite;
}

.leya-answer-status.answering #leya-answer-status-text::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
  animation: leya-answer-dots 1.15s steps(4, end) infinite;
}

@keyframes leya-answer-status-glow {
  50% {
    box-shadow:
      0 0 26px rgba(6, 217, 255, 0.54),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
}

@keyframes leya-answer-dot-pulse {
  50% {
    transform: scale(1.45);
    opacity: 0.62;
  }
}

@keyframes leya-answer-dots {
  to { width: 14px; }
}

/* Keep the assistant intro attached to the opaque chat workspace. */
.leya-intro {
  margin-bottom: 0;
  border-radius: 15px 15px 0 0;
}

.leya-workspace-panel {
  margin-top: 0;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #080a0d;
}

.leya-sidebar,
.leya-main-panel,
.leya-page-chat.leya-modal {
  background-color: #080a0d;
}

/* The prompt chips and input stay visible while messages scroll. */
.leya-app-shell #leya-input-container.leya-fixed-composer,
.leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer {
  position: fixed;
  left: calc(50% - min(572px, calc(50vw - 18px)) + var(--leya-sidebar-width));
  right: calc(50% - min(572px, calc(50vw - 18px)));
  bottom: 0;
  width: auto;
}

.leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer {
  left: calc(50% - min(572px, calc(50vw - 18px)) + var(--leya-sidebar-collapsed));
}

@media (max-width: 760px) {
  .leya-app-shell #leya-input-container.leya-fixed-composer,
  .leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer {
    left: calc(12px + var(--leya-sidebar-width));
    right: 12px;
  }

  .leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer {
    left: calc(12px + var(--leya-sidebar-collapsed));
  }
}

/* Keep the chat opening clean and repeat the header activity indicator in the message stream. */
.leya-page-chat.leya-modal {
  border-top: 0;
}

.leya-page-chat #leya-messages {
  padding-top: 0;
}

.leya-page-chat #leya-messages .leya-message-row:first-child p {
  margin-top: 0;
}

.leya-page-chat #leya-messages p.leya-chat-answer-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-width: 126px;
  padding: 8px 12px;
  border-color: rgba(6, 217, 255, 0.58);
  background: rgba(3, 125, 156, 0.16);
  color: #8eeeff;
  box-shadow:
    0 0 18px rgba(6, 217, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: leya-answer-status-glow 1.2s ease-in-out infinite;
}

.leya-chat-answer-status .status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #06d9ff;
  box-shadow: 0 0 12px rgba(6, 217, 255, 0.94);
  animation: leya-answer-dot-pulse 0.82s ease-in-out infinite;
}

.leya-chat-answer-status-text::after {
  content: "...";
  display: inline-block;
  width: 0;
  overflow: hidden;
  vertical-align: bottom;
  animation: leya-answer-dots 1.15s steps(4, end) infinite;
}

/* Leya: left-sidebar toggle copied from Paxor Music. */
.leya-sidebar .leya-sidebar-toggle.music-left-toggle {
  width: 48px;
  height: 48px;
  margin: 8px auto 6px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #354045;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  cursor: pointer;
  transition: color .2s ease;
}

.leya-sidebar .leya-sidebar-toggle.music-left-toggle:hover,
.leya-sidebar .leya-sidebar-toggle.music-left-toggle:focus-visible {
  color: #e9fcff;
  background: transparent !important;
}

.leya-sidebar .leya-sidebar-toggle.music-left-toggle span {
  box-shadow: none;
}

.leya-sidebar .music-sidebar-layout-icon {
  width: 38px;
  height: 32px;
  position: relative;
  display: block;
  overflow: hidden;
  box-sizing: border-box;
  border: 2.2px solid currentColor;
  border-radius: 7px;
  background: transparent;
  color: #354045;
  filter: none;
  transition:
    color .2s ease,
    transform .28s cubic-bezier(.2,.8,.2,1),
    filter .2s ease;
}

.leya-sidebar .music-sidebar-layout-icon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  pointer-events: none;
}

.leya-sidebar .music-sidebar-layout-rail,
.leya-sidebar .music-sidebar-layout-content {
  position: absolute;
  top: 4px;
  bottom: 4px;
  height: auto;
  border-radius: 3px;
  transition:
    left .3s cubic-bezier(.2,.8,.2,1),
    width .3s cubic-bezier(.2,.8,.2,1),
    background .2s ease,
    box-shadow .2s ease;
}

.leya-sidebar .music-sidebar-layout-rail {
  left: 4px;
  width: 11px;
  background: linear-gradient(180deg, #20d9ff, #037d9c);
  box-shadow: 0 0 10px rgba(32,217,255,.34);
}

.leya-sidebar .music-sidebar-layout-content {
  left: 19px;
  width: 13px;
  background: rgba(255,255,255,.075);
}

.leya-sidebar .music-left-toggle[data-state="expanded"]:hover .music-sidebar-layout-rail,
.leya-sidebar .music-left-toggle[data-state="expanded"]:focus-visible .music-sidebar-layout-rail {
  width: 4px;
  box-shadow: 0 0 8px rgba(32,217,255,.26);
}

.leya-sidebar .music-left-toggle[data-state="expanded"]:hover .music-sidebar-layout-content,
.leya-sidebar .music-left-toggle[data-state="expanded"]:focus-visible .music-sidebar-layout-content {
  left: 12px;
  width: 20px;
  background: rgba(255,255,255,.27);
}

.leya-sidebar .music-left-toggle[data-state="collapsed"] .music-sidebar-layout-rail {
  width: 4px;
  box-shadow: 0 0 8px rgba(32,217,255,.25);
}

.leya-sidebar .music-left-toggle[data-state="collapsed"] .music-sidebar-layout-content {
  left: 12px;
  width: 20px;
  background: rgba(255,255,255,.075);
}

.leya-sidebar .music-left-toggle[data-state="collapsed"]:hover .music-sidebar-layout-rail,
.leya-sidebar .music-left-toggle[data-state="collapsed"]:focus-visible .music-sidebar-layout-rail {
  width: 11px;
  box-shadow: 0 0 11px rgba(32,217,255,.46);
}

.leya-sidebar .music-left-toggle[data-state="collapsed"]:hover .music-sidebar-layout-content,
.leya-sidebar .music-left-toggle[data-state="collapsed"]:focus-visible .music-sidebar-layout-content {
  left: 19px;
  width: 13px;
  background: rgba(255,255,255,.27);
}

.leya-sidebar .music-left-toggle:hover .music-sidebar-layout-icon,
.leya-sidebar .music-left-toggle:focus-visible .music-sidebar-layout-icon {
  color: #e9fcff;
  filter: drop-shadow(0 0 7px rgba(32,217,255,.22));
}

.leya-sidebar .music-left-toggle.is-animating .music-sidebar-layout-icon {
  animation: leyaSidebarLayoutPulse .42s cubic-bezier(.2,.8,.2,1);
}

@keyframes leyaSidebarLayoutPulse {
  0% { transform: scale(1); }
  45% { transform: scale(.88); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .leya-sidebar .music-left-toggle,
  .leya-sidebar .music-sidebar-layout-icon,
  .leya-sidebar .music-sidebar-layout-rail,
  .leya-sidebar .music-sidebar-layout-content {
    transition: none !important;
    animation: none !important;
  }
}

/* Final Leya sidebar state lock: expanded shows content, collapsed keeps only compact controls. */
.leya-app-shell:not(.sidebar-collapsed) .leya-workspace-panel {
  grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr) !important;
}

.leya-app-shell.sidebar-collapsed .leya-workspace-panel {
  grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr) !important;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar {
  align-items: stretch;
  padding-inline: 8px;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-actions,
.leya-app-shell:not(.sidebar-collapsed) .leya-chat-history {
  width: 100%;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-new-chat {
  width: auto;
  justify-content: flex-start;
  padding: 0 10px;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-action-text {
  display: inline;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-history-heading {
  display: block;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-history-item {
  width: auto;
  grid-template-columns: minmax(0, 1fr) 24px;
  justify-items: stretch;
  padding: 0 6px 0 10px;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-history-item::before {
  content: none;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-history-title {
  display: block;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-delete-chat {
  display: grid;
  place-items: center;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar {
  align-items: center;
  padding-inline: 7px;
}

.leya-app-shell.sidebar-collapsed .leya-new-chat {
  width: 38px;
  justify-content: center;
  padding: 0;
}

.leya-app-shell.sidebar-collapsed .leya-action-text,
.leya-app-shell.sidebar-collapsed .leya-history-heading,
.leya-app-shell.sidebar-collapsed .leya-history-title,
.leya-app-shell.sidebar-collapsed .leya-delete-chat {
  display: none !important;
}

.leya-sidebar.sidebar-collapsed .leya-action-text,
.leya-sidebar.sidebar-collapsed .leya-history-heading,
.leya-sidebar.sidebar-collapsed .leya-history-title,
.leya-sidebar.sidebar-collapsed .leya-delete-chat {
  display: none !important;
}

.leya-app-shell.sidebar-collapsed .leya-history-item {
  width: 38px;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.leya-sidebar.sidebar-collapsed .leya-history-item {
  width: 38px;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.leya-app-shell.sidebar-collapsed .leya-history-item::before {
  content: "●";
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.leya-sidebar.sidebar-collapsed .leya-history-item::before {
  content: "●";
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}
/* Final Leya brand/collapse override: keep this after all older sidebar layers. */
.leya-workspace-panel:not(.sidebar-collapsed) {
  grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr) !important;
}

.leya-workspace-panel.sidebar-collapsed {
  grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr) !important;
}

.leya-sidebar-brand-row {
  width: calc(100% + 16px);
  margin: 0 0 14px -8px;
  padding: 8px 6px 8px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  box-sizing: border-box;
  border: 1px solid rgba(158, 231, 255, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(6, 171, 212, 0.12), rgba(255, 255, 255, 0.035));
}

.leya-sidebar-brand {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
  color: #f7fbfc;
  text-decoration: none;
}

.leya-sidebar-brand:hover {
  color: #e9fcff;
  text-decoration: none;
}

.leya-sidebar-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(32, 217, 255, 0.34);
  border-radius: 10px;
  background: rgba(3, 125, 156, 0.16);
}

.leya-sidebar-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.leya-sidebar-brand-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
  letter-spacing: 0;
}

.leya-sidebar-brand-copy strong {
  color: #20d9ff;
}

.leya-sidebar-brand-row .leya-sidebar-toggle.music-left-toggle,
.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-row .leya-sidebar-toggle.music-left-toggle {
  position: static;
  inset: auto;
  margin: 0;
  justify-self: center;
  align-self: center;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-brand-row,
.leya-workspace-panel:not(.sidebar-collapsed) .leya-sidebar-brand-row {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-row,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-row {
  width: 100%;
  margin: 0 0 14px;
  padding: 8px 0;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 7px;
  border-radius: 14px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  padding: 0;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-mark,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-mark {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.leya-app-shell.sidebar-collapsed .leya-sidebar-brand-copy,
.leya-workspace-panel.sidebar-collapsed .leya-sidebar-brand-copy {
  display: none !important;
}

.leya-app-shell:not(.sidebar-collapsed) .leya-sidebar-brand-copy,
.leya-workspace-panel:not(.sidebar-collapsed) .leya-sidebar-brand-copy {
  display: inline;
}

/* Leya button integrated into the global music player. */
#music-player #leya-button {
  position: static !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  height: 32px !important;
  margin: 0 0 0 8px !important;
  padding: 0 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  flex: 0 0 64px !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 999px !important;
  outline: 0 !important;
  background: rgba(255,255,255,.035) !important;
  color: var(--music-muted, #a7b4bd) !important;
  box-shadow: 0 0 5px rgba(32,217,255,.10) !important;
  animation: music-leya-edge-pulse 2.4s ease-in-out infinite !important;
  transform: none;
  font-size: 10px !important;
  line-height: 1 !important;
}

#music-player #leya-button:hover {
  color: var(--music-text, #fff) !important;
  border-color: rgba(32,217,255,.5) !important;
  background: rgba(3,125,156,.14) !important;
  box-shadow: 0 0 12px rgba(32,217,255,.32) !important;
  transform: translateY(-1px);
}

#music-player #leya-button.is-active {
  color: #fff !important;
  border-color: rgba(32,217,255,.75) !important;
  background: rgba(3,125,156,.28) !important;
  box-shadow: 0 0 12px rgba(32,217,255,.2) !important;
}

body.light-theme #music-player #leya-button {
  background: rgba(0,0,0,.04) !important;
  color: #44515a !important;
  border-color: rgba(0,0,0,.14) !important;
  outline: 0 !important;
}

@media (max-width: 640px) {
  #music-player #leya-button {
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    height: 28px !important;
    flex-basis: 54px !important;
    padding: 0 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #music-player #leya-button {
    animation: none !important;
  }
}


/* v4: always-visible edge pulse for the Leya button in the global player. */
#music-player #leya-button {
  position: relative !important;
  overflow: visible !important;
  isolation: isolate;
}

#music-player #leya-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -3px;
  border: 1px solid rgba(32, 217, 255, .72);
  border-radius: inherit;
  pointer-events: none;
  opacity: .42;
  transform: scale(.98);
  box-shadow:
    0 0 4px rgba(32, 217, 255, .28),
    0 0 9px rgba(32, 217, 255, .16);
  animation: music-leya-visible-ring 1.55s ease-in-out infinite !important;
  will-change: transform, opacity, box-shadow, border-color;
}

#music-player #leya-button .music-player-leya-dot {
  animation: music-leya-dot-pulse 1.55s ease-in-out infinite !important;
}

@keyframes music-leya-visible-ring {
  0%, 100% {
    opacity: .38;
    transform: scale(.98);
    border-color: rgba(32, 217, 255, .48);
    box-shadow:
      0 0 3px rgba(32, 217, 255, .24),
      0 0 7px rgba(32, 217, 255, .12);
  }
  50% {
    opacity: 1;
    transform: scale(1.07);
    border-color: rgba(32, 217, 255, .98);
    box-shadow:
      0 0 7px rgba(32, 217, 255, .78),
      0 0 15px rgba(32, 217, 255, .46),
      0 0 23px rgba(3, 125, 156, .24);
  }
}

@keyframes music-leya-dot-pulse {
  0%, 100% {
    opacity: .68;
    transform: scale(.82);
    box-shadow: 0 0 4px rgba(32, 217, 255, .42);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
    box-shadow: 0 0 9px rgba(32, 217, 255, .96);
  }
}

/* Keep the pulse enabled even when the OS asks for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  #music-player #leya-button::after {
    animation: music-leya-visible-ring 1.55s ease-in-out infinite !important;
  }
  #music-player #leya-button .music-player-leya-dot {
    animation: music-leya-dot-pulse 1.55s ease-in-out infinite !important;
  }
}

/* v6 — global Leya chat header, attached directly below the horizontal menu. */
.leya-modal:not(.leya-page-chat) {
  top: var(--paxor-menu-height, 70px) !important;
  margin-top: 0 !important;
  border: 1px solid rgba(104, 217, 255, 0.24);
  border-right: 0;
  border-top: 0;
  border-radius: 17px 0 0 17px;
  overflow: hidden;
  box-shadow:
    -10px 12px 32px rgba(0, 0, 0, 0.42),
    inset 1px 0 0 rgba(255, 255, 255, 0.025);
}

.leya-modal:not(.leya-page-chat) #leya-header,
body.light-theme .leya-modal:not(.leya-page-chat) #leya-header {
  height: 66px;
  min-height: 66px;
  box-sizing: border-box;
  padding: 0 17px 0 13px;
  background:
    linear-gradient(135deg,
      rgba(5, 17, 29, 0.99) 0%,
      rgba(4, 45, 66, 0.98) 54%,
      rgba(3, 112, 140, 0.94) 100%);
  color: #ffffff;
  border: 0;
  border-bottom: 1px solid rgba(112, 224, 255, 0.30);
  border-radius: 16px 0 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 1px 0 0 rgba(255, 255, 255, 0.04),
    0 8px 22px rgba(0, 0, 0, 0.24);
}

.leya-modal:not(.leya-page-chat) .leya-icon {
  width: 52px;
  height: 52px;
  max-height: 52px;
  flex: 0 0 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(48, 208, 255, 0.20));
}

.leya-modal:not(.leya-page-chat) .leya-title-text,
body.light-theme .leya-modal:not(.leya-page-chat) .leya-title-text {
  margin-left: 7px;
  color: #ffffff;
  font-size: 21px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.32);
}

.leya-modal:not(.leya-page-chat) #leya-close,
body.light-theme .leya-modal:not(.leya-page-chat) #leya-close {
  width: 34px;
  height: 34px;
  margin-left: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
  font-weight: 300;
  opacity: 0.94;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.leya-modal:not(.leya-page-chat) #leya-close:hover,
body.light-theme .leya-modal:not(.leya-page-chat) #leya-close:hover {
  color: #ffffff;
  opacity: 1;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(132, 232, 255, 0.22);
}

@media (max-width: 640px) {
  .leya-modal:not(.leya-page-chat) {
    top: var(--paxor-menu-height, 62px) !important;
    border-radius: 15px 0 0 15px;
  }

  .leya-modal:not(.leya-page-chat) #leya-header,
  body.light-theme .leya-modal:not(.leya-page-chat) #leya-header {
    height: 60px;
    min-height: 60px;
    padding-left: 11px;
    border-radius: 14px 0 0 0;
  }

  .leya-modal:not(.leya-page-chat) .leya-icon {
    width: 47px;
    height: 47px;
    max-height: 47px;
    flex-basis: 47px;
  }

  .leya-modal:not(.leya-page-chat) .leya-title-text,
  body.light-theme .leya-modal:not(.leya-page-chat) .leya-title-text {
    font-size: 19px;
  }
}

/* v7 — visible processing stages on the full Leya page.
   These are user-facing progress states, not hidden model reasoning. */
.leya-page-chat #leya-messages p.leya-thinking-message {
  width: min(610px, 94%);
  max-width: 610px;
  margin: 8px 0 18px;
  padding: 0;
}

.leya-thinking-card {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 15px 16px 14px;
  border: 1px solid rgba(77, 213, 255, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(3, 125, 156, 0.20), transparent 42%),
    linear-gradient(145deg, rgba(11, 22, 33, 0.96), rgba(5, 11, 18, 0.96));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.leya-thinking-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 20%, rgba(86, 224, 255, 0.055) 48%, transparent 76%);
  transform: translateX(-100%);
  animation: leya-thinking-scan 2.8s ease-in-out infinite;
}

.leya-thinking-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.leya-thinking-orbit {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
  border: 1px solid rgba(105, 228, 255, 0.42);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(31, 213, 255, 0.18);
  animation: leya-thinking-orbit 1.4s linear infinite;
}

.leya-thinking-orbit::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #63e5ff;
  box-shadow: 0 0 9px rgba(99, 229, 255, 0.92);
  transform: translateX(-50%);
}

.leya-thinking-title {
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.leya-thinking-time {
  color: rgba(192, 229, 240, 0.62);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.leya-thinking-current {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 13px;
  color: #dff8ff;
  font-size: 15px;
  font-weight: 650;
}

.leya-thinking-progress {
  position: relative;
  z-index: 1;
  display: block;
  height: 3px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.leya-thinking-progress-fill {
  display: block;
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #037d9c, #56ddff);
  box-shadow: 0 0 10px rgba(57, 220, 255, 0.42);
  transition: width 0.55s ease;
}

.leya-thinking-steps {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.leya-thinking-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(214, 231, 238, 0.52);
  font-size: 11px;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, opacity 0.3s ease;
}

.leya-thinking-step-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.leya-thinking-step.is-active {
  border-color: rgba(76, 221, 255, 0.34);
  background: rgba(3, 125, 156, 0.14);
  color: #ebfbff;
}

.leya-thinking-step.is-active .leya-thinking-step-dot {
  background: #67e5ff;
  box-shadow: 0 0 8px rgba(103, 229, 255, 0.9);
  animation: leya-thinking-dot 1.05s ease-in-out infinite;
}

.leya-thinking-step.is-done {
  color: rgba(185, 226, 237, 0.72);
}

.leya-thinking-step.is-done .leya-thinking-step-dot {
  background: #31c9a7;
  box-shadow: 0 0 5px rgba(49, 201, 167, 0.48);
}

@keyframes leya-thinking-scan {
  0%, 15% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

@keyframes leya-thinking-orbit {
  to { transform: rotate(360deg); }
}

@keyframes leya-thinking-dot {
  0%, 100% { opacity: 0.55; transform: scale(0.78); }
  50% { opacity: 1; transform: scale(1.2); }
}

body.light-theme .leya-thinking-card {
  border-color: rgba(3, 125, 156, 0.22);
  background:
    radial-gradient(circle at 12% 0%, rgba(3, 125, 156, 0.10), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 251, 0.98));
  box-shadow: 0 12px 28px rgba(25, 56, 70, 0.10);
}

body.light-theme .leya-thinking-title,
body.light-theme .leya-thinking-current {
  color: #17333e;
}

body.light-theme .leya-thinking-time {
  color: rgba(23, 51, 62, 0.56);
}

body.light-theme .leya-thinking-step {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.025);
  color: rgba(23, 51, 62, 0.52);
}

body.light-theme .leya-thinking-step.is-active {
  border-color: rgba(3, 125, 156, 0.25);
  background: rgba(3, 125, 156, 0.08);
  color: #17333e;
}

@media (max-width: 640px) {
  .leya-page-chat #leya-messages p.leya-thinking-message {
    width: 100%;
    max-width: 100%;
  }

  .leya-thinking-card {
    padding: 13px 12px;
    border-radius: 15px;
  }

  .leya-thinking-steps {
    gap: 6px;
  }

  .leya-thinking-step {
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
  }
}


/* v8: progress card is rendered by the actual full-page Leya message flow. */
.leya-page-chat #leya-messages p.leya-thinking-message {
  display: block;
  align-items: initial;
  gap: 0;
  min-width: 0;
  animation: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
}

/* v9: keep the "Meet Leya AI" panel fixed directly below the global menu. */
.leya-app-shell {
  --leya-global-menu-height: 70px;
  --leya-sticky-intro-height: 124px;
}

.leya-intro {
  position: sticky !important;
  top: var(--leya-global-menu-height) !important;
  z-index: 120 !important;
  isolation: isolate;
  margin-top: 26px;
  margin-bottom: 0;
  transform: translateZ(0);
  box-shadow:
    0 0 16px rgba(3, 125, 156, 0.56),
    0 12px 28px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* Keep the chat surface below the pinned intro instead of sliding over it. */
.leya-main-panel {
  top: calc(var(--leya-global-menu-height) + var(--leya-sticky-intro-height)) !important;
  height: calc(100vh - var(--leya-global-menu-height) - var(--leya-sticky-intro-height)) !important;
  max-height: calc(100vh - var(--leya-global-menu-height) - var(--leya-sticky-intro-height)) !important;
}

.leya-workspace-panel {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  .leya-app-shell {
    --leya-sticky-intro-height: 124px;
  }

  .leya-intro {
    top: var(--leya-global-menu-height) !important;
  }
}

/* v10: independent scrolling for the Leya sidebar and central chat. */
@media (min-width: 761px) {
  .leya-app-shell {
    --leya-workspace-height: calc(
      100vh - var(--leya-global-menu-height, 70px) - var(--leya-sticky-intro-height, 124px)
    );
  }

  /* Keep the whole workspace directly below the pinned intro panel. */
  .leya-workspace-panel {
    position: sticky !important;
    top: calc(
      var(--leya-global-menu-height, 70px) + var(--leya-sticky-intro-height, 124px)
    ) !important;
    z-index: 110;
    height: var(--leya-workspace-height) !important;
    min-height: 460px !important;
    max-height: var(--leya-workspace-height) !important;
    overflow: hidden !important;
    align-items: stretch !important;
  }

  .leya-sidebar,
  .leya-main-panel {
    position: relative !important;
    top: auto !important;
    align-self: stretch !important;
    width: auto;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }

  /* Sidebar controls remain visible; only chat history scrolls. */
  .leya-sidebar {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding-bottom: 10px;
    overscroll-behavior: contain;
  }

  .leya-sidebar-brand-row,
  .leya-sidebar-actions,
  .leya-history-heading {
    flex: 0 0 auto;
  }

  .leya-chat-history {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-bottom: 12px;
  }

  /* The centre has its own message scroll; composer stays fixed in its row. */
  .leya-main-panel {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) var(--leya-composer-height) !important;
    overflow: hidden !important;
  }

  .leya-page-chat.leya-modal {
    position: relative !important;
    inset: auto !important;
    grid-row: 2;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .leya-page-chat #leya-messages,
  .leya-app-shell .leya-page-chat #leya-messages {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-bottom: 24px !important;
  }

  .leya-app-shell #leya-input-container.leya-fixed-composer,
  .leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer,
  #leya-input-container.leya-fixed-composer {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    grid-row: 3;
    width: 100% !important;
    min-width: 0;
    z-index: 10;
  }

  /* Compact independent scrollbars. */
  .leya-chat-history,
  .leya-page-chat #leya-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(64, 206, 239, 0.48) rgba(255, 255, 255, 0.035);
  }

  .leya-chat-history::-webkit-scrollbar,
  .leya-page-chat #leya-messages::-webkit-scrollbar {
    width: 7px;
  }

  .leya-chat-history::-webkit-scrollbar-track,
  .leya-page-chat #leya-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
  }

  .leya-chat-history::-webkit-scrollbar-thumb,
  .leya-page-chat #leya-messages::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(64, 206, 239, 0.48);
    background-clip: padding-box;
  }

  .leya-chat-history::-webkit-scrollbar-thumb:hover,
  .leya-page-chat #leya-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(83, 224, 255, 0.72);
    background-clip: padding-box;
  }
}

/* v11: true split scrolling and compact chat-history rows. */
@media (min-width: 761px) {
  .leya-workspace-panel {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  /* The whole left column is its own scroll surface. */
  .leya-sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    padding-bottom: 14px !important;
  }

  .leya-sidebar-brand-row,
  .leya-sidebar-actions,
  .leya-history-heading {
    flex: 0 0 auto !important;
  }

  /* Do not let a single "New chat" history row stretch into a large tile. */
  .leya-chat-history {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    align-content: flex-start !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    gap: 7px !important;
    padding: 0 2px 12px 0 !important;
  }

  .leya-history-item {
    flex: 0 0 44px !important;
    align-self: stretch !important;
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    max-height: 44px !important;
    padding: 0 7px 0 10px !important;
    box-sizing: border-box !important;
  }

  /* The centre never follows the sidebar wheel; only messages scroll. */
  .leya-main-panel {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .leya-page-chat.leya-modal {
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .leya-page-chat #leya-messages,
  .leya-app-shell .leya-page-chat #leya-messages {
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }

  .leya-sidebar,
  .leya-page-chat #leya-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(64, 206, 239, 0.50) rgba(255, 255, 255, 0.035);
  }

  .leya-sidebar::-webkit-scrollbar,
  .leya-page-chat #leya-messages::-webkit-scrollbar {
    width: 7px;
  }

  .leya-sidebar::-webkit-scrollbar-track,
  .leya-page-chat #leya-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
  }

  .leya-sidebar::-webkit-scrollbar-thumb,
  .leya-page-chat #leya-messages::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(64, 206, 239, 0.50);
    background-clip: padding-box;
  }
}

/* v12: definitive desktop app layout with truly independent sidebar/chat scrolling. */
@media (min-width: 761px) {
  html:has(.leya-app-shell),
  body:has(.leya-app-shell) {
    height: 100%;
    overflow: hidden !important;
  }

  body:has(.leya-app-shell) .main-content {
    height: calc(100dvh - var(--leya-global-menu-height, 70px)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .leya-app-shell {
    --leya-global-menu-height: 70px;
    --leya-intro-fixed-height: 132px;
    width: 100% !important;
    max-width: 1180px !important;
    height: calc(100dvh - var(--leya-global-menu-height)) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 8px 18px 0 !important;
    display: grid !important;
    grid-template-rows: var(--leya-intro-fixed-height) minmax(0, 1fr) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* The old promotional hero made the outer document scroll. The intro is the fixed page header now. */
  .leya-assistant-hero {
    display: none !important;
  }

  .leya-intro {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    grid-row: 1;
    width: 100% !important;
    height: var(--leya-intro-fixed-height) !important;
    min-height: var(--leya-intro-fixed-height) !important;
    max-height: var(--leya-intro-fixed-height) !important;
    margin: 0 !important;
    z-index: 20 !important;
    flex: 0 0 auto !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  .leya-workspace-panel,
  .leya-app-shell .leya-workspace-panel {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    grid-row: 2;
    display: grid !important;
    grid-template-columns: var(--leya-sidebar-width) minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
    overscroll-behavior: none !important;
  }

  .leya-app-shell.sidebar-collapsed .leya-workspace-panel,
  .leya-workspace-panel.sidebar-collapsed {
    grid-template-columns: var(--leya-sidebar-collapsed) minmax(0, 1fr) !important;
  }

  /* Left column never follows the centre. Only its history list scrolls. */
  .leya-sidebar,
  .leya-app-shell .leya-sidebar {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    width: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    padding-bottom: 10px !important;
    box-sizing: border-box !important;
  }

  .leya-sidebar-brand-row,
  .leya-sidebar-actions,
  .leya-history-heading {
    flex: 0 0 auto !important;
  }

  .leya-chat-history,
  #leya-chat-history {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    scrollbar-gutter: stable;
    gap: 7px !important;
    padding: 0 3px 12px 0 !important;
  }

  .leya-history-item {
    flex: 0 0 44px !important;
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    max-height: 44px !important;
    box-sizing: border-box !important;
  }

  /* Centre is another independent viewport. */
  .leya-main-panel,
  .leya-app-shell .leya-main-panel {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    align-self: stretch !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    width: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  .leya-chat-header,
  .leya-chat-header-empty,
  .leya-chat-header:empty {
    display: none !important;
  }

  .leya-page-chat.leya-modal,
  .leya-app-shell .leya-page-chat.leya-modal {
    position: relative !important;
    inset: auto !important;
    right: auto !important;
    grid-row: 1;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  .leya-page-chat #leya-messages,
  .leya-app-shell .leya-page-chat #leya-messages {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    scrollbar-gutter: stable;
    padding-bottom: 24px !important;
    box-sizing: border-box !important;
  }

  .leya-app-shell #leya-input-container.leya-fixed-composer,
  .leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer,
  #leya-input-container.leya-fixed-composer {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    grid-row: 2;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    z-index: 10 !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
  }

  .leya-chat-history,
  .leya-page-chat #leya-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(64, 206, 239, 0.52) rgba(255, 255, 255, 0.035);
  }

  .leya-chat-history::-webkit-scrollbar,
  .leya-page-chat #leya-messages::-webkit-scrollbar {
    width: 7px;
  }

  .leya-chat-history::-webkit-scrollbar-track,
  .leya-page-chat #leya-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
  }

  .leya-chat-history::-webkit-scrollbar-thumb,
  .leya-page-chat #leya-messages::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(64, 206, 239, 0.52);
    background-clip: padding-box;
  }
}

/* v13: restore the centre pane, use robust flex sizing, thick scrollbars and hover arrows. */
@media (min-width: 761px) {
  html:has(.leya-app-shell),
  body:has(.leya-app-shell) {
    height: 100%;
    overflow: hidden !important;
  }

  body:has(.leya-app-shell) .main-content {
    height: calc(100dvh - var(--leya-global-menu-height, 70px)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .leya-app-shell {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 1180px !important;
    height: calc(100dvh - var(--leya-global-menu-height, 70px)) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 8px 18px 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .leya-intro {
    flex: 0 0 132px !important;
    width: 100% !important;
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
    margin: 0 !important;
  }

  .leya-workspace-panel,
  .leya-app-shell .leya-workspace-panel {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
  }

  .leya-sidebar,
  .leya-app-shell .leya-sidebar {
    position: relative !important;
    display: flex !important;
    flex: 0 0 var(--leya-sidebar-width) !important;
    flex-direction: column !important;
    width: var(--leya-sidebar-width) !important;
    min-width: var(--leya-sidebar-width) !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .leya-app-shell.sidebar-collapsed .leya-sidebar,
  .leya-workspace-panel.sidebar-collapsed .leya-sidebar {
    flex-basis: var(--leya-sidebar-collapsed) !important;
    width: var(--leya-sidebar-collapsed) !important;
    min-width: var(--leya-sidebar-collapsed) !important;
  }

  .leya-chat-history,
  #leya-chat-history {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: stable !important;
    padding-right: 8px !important;
  }

  .leya-main-panel,
  .leya-app-shell .leya-main-panel {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: auto !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .leya-chat-header,
  .leya-chat-header-empty,
  .leya-chat-header:empty {
    display: none !important;
  }

  .leya-page-chat.leya-modal,
  .leya-app-shell .leya-page-chat.leya-modal {
    position: relative !important;
    inset: auto !important;
    right: auto !important;
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .leya-page-chat #leya-messages,
  .leya-app-shell .leya-page-chat #leya-messages {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: stable !important;
    padding-right: 16px !important;
    padding-bottom: 24px !important;
    box-sizing: border-box !important;
  }

  .leya-app-shell #leya-input-container.leya-fixed-composer,
  .leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer,
  #leya-input-container.leya-fixed-composer {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    z-index: 10 !important;
  }

  /* Thick, high-contrast native scrollbars. */
  .leya-chat-history,
  .leya-page-chat #leya-messages {
    scrollbar-width: auto !important;
    scrollbar-color: rgba(39, 211, 249, 0.88) rgba(255, 255, 255, 0.08) !important;
  }

  .leya-chat-history::-webkit-scrollbar,
  .leya-page-chat #leya-messages::-webkit-scrollbar {
    width: 13px !important;
  }

  .leya-chat-history::-webkit-scrollbar-track,
  .leya-page-chat #leya-messages::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  }

  .leya-chat-history::-webkit-scrollbar-thumb,
  .leya-page-chat #leya-messages::-webkit-scrollbar-thumb {
    min-height: 46px;
    border: 2px solid rgba(4, 17, 25, 0.72) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #42ddff, #037d9c) !important;
    background-clip: padding-box !important;
    box-shadow: 0 0 8px rgba(32, 217, 255, 0.38);
  }

  .leya-chat-history::-webkit-scrollbar-thumb:hover,
  .leya-page-chat #leya-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8cecff, #09a7cc) !important;
    background-clip: padding-box !important;
  }

  /* Custom hover arrows. */
  .leya-scroll-arrows {
    position: absolute;
    top: 8px;
    bottom: 8px;
    right: 16px;
    z-index: 35;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
  }

  .leya-sidebar-scroll-arrows {
    right: 18px;
    top: 154px;
    bottom: 16px;
  }

  .leya-main-scroll-arrows {
    right: 19px;
    top: 12px;
    bottom: calc(var(--leya-composer-height, 142px) + 12px);
  }

  .leya-scroll-arrow {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(70, 221, 255, 0.55);
    border-radius: 9px;
    background: rgba(3, 21, 31, 0.94);
    color: #93efff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.88);
    pointer-events: auto;
    box-shadow: 0 0 10px rgba(32, 217, 255, 0.18);
    transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  }

  .leya-sidebar:hover .leya-sidebar-scroll-arrows .leya-scroll-arrow,
  .leya-main-panel:hover .leya-main-scroll-arrows .leya-scroll-arrow,
  .leya-scroll-arrow:focus-visible {
    opacity: 1;
    transform: scale(1);
  }

  .leya-scroll-arrow:hover {
    color: #ffffff;
    border-color: rgba(112, 235, 255, 0.95);
    background: rgba(3, 125, 156, 0.86);
    box-shadow: 0 0 14px rgba(32, 217, 255, 0.48);
  }

  .leya-scroll-arrow:disabled {
    opacity: 0.28 !important;
    cursor: default;
  }
}

@media (max-width: 760px) {
  .leya-scroll-arrows {
    display: none !important;
  }
}

/* v14: viewport-anchored desktop shell. Restores the centre pane regardless of parent sizing. */
@media (min-width: 761px) {
  html:has(.leya-app-shell),
  body:has(.leya-app-shell) {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
  }

  body:has(.leya-app-shell) .main-content {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .leya-app-shell {
    position: fixed !important;
    top: var(--leya-global-menu-height, 70px) !important;
    bottom: 0 !important;
    left: 50% !important;
    right: auto !important;
    z-index: 50 !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: column !important;
    width: min(1180px, calc(100vw - 36px)) !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 8px 0 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .leya-intro {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    display: flex !important;
    flex: 0 0 132px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  .leya-workspace-panel,
  .leya-app-shell .leya-workspace-panel {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    display: flex !important;
    flex: 1 1 0% !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
  }

  .leya-sidebar,
  .leya-app-shell .leya-sidebar {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex: 0 0 var(--leya-sidebar-width, 228px) !important;
    flex-direction: column !important;
    width: var(--leya-sidebar-width, 228px) !important;
    min-width: var(--leya-sidebar-width, 228px) !important;
    max-width: var(--leya-sidebar-width, 228px) !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .leya-app-shell.sidebar-collapsed .leya-sidebar,
  .leya-workspace-panel.sidebar-collapsed .leya-sidebar {
    flex-basis: var(--leya-sidebar-collapsed, 64px) !important;
    width: var(--leya-sidebar-collapsed, 64px) !important;
    min-width: var(--leya-sidebar-collapsed, 64px) !important;
    max-width: var(--leya-sidebar-collapsed, 64px) !important;
  }

  .leya-chat-history,
  #leya-chat-history {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    scrollbar-gutter: stable !important;
    box-sizing: border-box !important;
  }

  .leya-main-panel,
  .leya-app-shell .leya-main-panel {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex: 1 1 0% !important;
    flex-direction: column !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #080a0d !important;
    border-left: 1px solid rgba(158, 231, 255, 0.18);
    box-sizing: border-box !important;
  }

  .leya-chat-header,
  .leya-chat-header-empty,
  .leya-chat-header:empty {
    display: none !important;
  }

  .leya-page-chat.leya-modal,
  .leya-app-shell .leya-page-chat.leya-modal {
    position: relative !important;
    inset: auto !important;
    right: auto !important;
    display: flex !important;
    flex: 1 1 0% !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
  }

  .leya-page-chat #leya-messages,
  .leya-app-shell .leya-page-chat #leya-messages {
    display: flex !important;
    flex: 1 1 0% !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    scrollbar-gutter: stable !important;
    padding: 24px 18px !important;
    box-sizing: border-box !important;
  }

  .leya-app-shell #leya-input-container.leya-fixed-composer,
  .leya-app-shell.sidebar-collapsed #leya-input-container.leya-fixed-composer,
  #leya-input-container.leya-fixed-composer {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: grid !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
  }

  /* Thick scrollbars for both independent surfaces. */
  .leya-chat-history,
  .leya-page-chat #leya-messages {
    scrollbar-width: auto !important;
    scrollbar-color: #25d7fb rgba(255, 255, 255, 0.09) !important;
  }

  .leya-chat-history::-webkit-scrollbar,
  .leya-page-chat #leya-messages::-webkit-scrollbar {
    width: 14px !important;
  }

  .leya-chat-history::-webkit-scrollbar-track,
  .leya-page-chat #leya-messages::-webkit-scrollbar-track {
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.085) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  }

  .leya-chat-history::-webkit-scrollbar-thumb,
  .leya-page-chat #leya-messages::-webkit-scrollbar-thumb {
    min-height: 48px !important;
    border: 2px solid rgba(4, 17, 25, 0.74) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #78eaff, #0493b7) !important;
    background-clip: padding-box !important;
    box-shadow: 0 0 9px rgba(32, 217, 255, 0.42) !important;
  }

  .leya-chat-history::-webkit-scrollbar-thumb:hover,
  .leya-page-chat #leya-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c0f6ff, #12badf) !important;
    background-clip: padding-box !important;
  }

  /* Arrow buttons remain hidden until the matching surface is hovered. */
  .leya-scroll-arrows {
    pointer-events: none !important;
  }

  .leya-scroll-arrow {
    opacity: 0 !important;
    transform: scale(0.88) !important;
    pointer-events: auto !important;
  }

  .leya-sidebar:hover .leya-sidebar-scroll-arrows .leya-scroll-arrow,
  .leya-main-panel:hover .leya-main-scroll-arrows .leya-scroll-arrow,
  .leya-scroll-arrow:focus-visible {
    opacity: 1 !important;
    transform: scale(1) !important;
  }
}

/* v15: full-width page header + integrated hover scroll rails with top/bottom arrows. */
@media (min-width: 761px) {
  html:has(.leya-app-shell),
  body:has(.leya-app-shell) {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body:has(.leya-app-shell) .main-content {
    position: fixed !important;
    top: var(--leya-global-menu-height, 70px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    transform: none !important;
  }

  .leya-app-shell,
  body:has(.leya-app-shell) .leya-app-shell {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 1 !important;
    transform: none !important;
    display: grid !important;
    grid-template-rows: 132px minmax(0, 1fr) !important;
    width: min(1180px, calc(100vw - 36px)) !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 8px 0 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Restore the page header beneath the global navigation. */
  .leya-intro,
  .leya-app-shell .leya-intro {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: flex !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
    margin: 0 !important;
    padding: 10px 18px !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  .leya-intro-copy {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .leya-intro-copy h2,
  .leya-intro-copy p {
    max-width: 100% !important;
  }

  .leya-workspace-panel,
  .leya-app-shell .leya-workspace-panel {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    grid-row: 2 !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
  }

  .leya-sidebar,
  .leya-app-shell .leya-sidebar {
    position: relative !important;
    display: flex !important;
    flex: 0 0 var(--leya-sidebar-width, 228px) !important;
    flex-direction: column !important;
    width: var(--leya-sidebar-width, 228px) !important;
    min-width: var(--leya-sidebar-width, 228px) !important;
    max-width: var(--leya-sidebar-width, 228px) !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .leya-main-panel,
  .leya-app-shell .leya-main-panel {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #080a0d !important;
  }

  .leya-chat-history,
  #leya-chat-history,
  .leya-page-chat #leya-messages,
  .leya-app-shell .leya-page-chat #leya-messages {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .leya-chat-history::-webkit-scrollbar,
  .leya-page-chat #leya-messages::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
  }

  .leya-chat-history,
  #leya-chat-history {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    padding-right: 22px !important;
  }

  .leya-page-chat.leya-modal,
  .leya-app-shell .leya-page-chat.leya-modal {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .leya-page-chat #leya-messages,
  .leya-app-shell .leya-page-chat #leya-messages {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    padding-right: 34px !important;
  }

  /* One integrated scrollbar: arrow, thick track/thumb, arrow. */
  .leya-hover-scrollbar {
    position: absolute;
    z-index: 80;
    top: 8px;
    right: 5px;
    bottom: 8px;
    width: 20px;
    padding: 2px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(84, 224, 255, 0.22);
    border-radius: 11px;
    background: rgba(2, 14, 21, 0.90);
    box-shadow: 0 0 12px rgba(32, 217, 255, 0.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(4px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    box-sizing: border-box;
  }

  .leya-sidebar-hover-scrollbar {
    top: 154px;
    right: 4px;
    bottom: 8px;
  }

  .leya-main-hover-scrollbar {
    top: 8px;
    right: 5px;
    bottom: calc(var(--leya-composer-height, 142px) + 8px);
  }

  .leya-sidebar:hover .leya-sidebar-hover-scrollbar,
  .leya-sidebar:focus-within .leya-sidebar-hover-scrollbar,
  .leya-main-panel:hover .leya-main-hover-scrollbar,
  .leya-main-panel:focus-within .leya-main-hover-scrollbar,
  .leya-hover-scrollbar.is-dragging {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .leya-scrollbar-arrow {
    width: 16px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: rgba(139, 237, 255, 0.86);
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  }

  .leya-scrollbar-arrow:hover:not(:disabled) {
    color: #ffffff;
    background: rgba(3, 125, 156, 0.72);
    box-shadow: 0 0 8px rgba(32, 217, 255, 0.42);
  }

  .leya-scrollbar-arrow:disabled {
    color: rgba(139, 237, 255, 0.22);
    cursor: default;
  }

  .leya-scrollbar-track {
    position: relative;
    flex: 1 1 auto;
    width: 12px;
    min-height: 38px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.065);
    cursor: pointer;
  }

  .leya-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 1px;
    width: 10px;
    min-height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8ceeff 0%, #10b8db 54%, #037d9c 100%);
    box-shadow: 0 0 9px rgba(32, 217, 255, 0.52);
    cursor: grab;
    touch-action: none;
    will-change: transform, height;
  }

  .leya-scrollbar-thumb:hover,
  .leya-hover-scrollbar.is-dragging .leya-scrollbar-thumb {
    background: linear-gradient(180deg, #d2faff 0%, #55ddf7 54%, #079abe 100%);
    box-shadow: 0 0 13px rgba(32, 217, 255, 0.76);
  }

  .leya-hover-scrollbar.is-dragging .leya-scrollbar-thumb {
    cursor: grabbing;
  }

  .leya-hover-scrollbar.is-no-overflow {
    display: none !important;
  }

  /* Disable obsolete floating arrow widgets from v13/v14. */
  .leya-scroll-arrows {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .leya-hover-scrollbar {
    display: none !important;
  }
}


/* v83: compact side-chat thinking stages with animated dots */
.leya-side-thinking-message {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
}
.leya-side-thinking-card {
  display: inline-flex !important;
  align-items: baseline !important;
  min-width: 180px !important;
  max-width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #c9d6dc !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}
.leya-side-thinking-current {
  color: #c9d6dc !important;
  -webkit-text-fill-color: #c9d6dc !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.45) !important;
}
.leya-side-thinking-dots {
  display: inline-block !important;
  width: 1.05em !important;
  min-width: 1.05em !important;
  margin-left: 1px !important;
  color: #c9d6dc !important;
  -webkit-text-fill-color: #c9d6dc !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.45) !important;
}
body.light-theme .leya-side-thinking-card,
body.light-theme .leya-side-thinking-current,
body.light-theme .leya-side-thinking-dots {
  color: #38505a !important;
  -webkit-text-fill-color: #38505a !important;
}

/* Leya side chat: same user-message actions/edit UI as the full Leya page */
#leya-modal:not(.leya-page-chat) .user-message-actions{display:flex;gap:6px;margin-top:4px;position:static;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}
#leya-modal:not(.leya-page-chat) .user-message-container:hover .user-message-actions{opacity:1;visibility:visible}
#leya-modal:not(.leya-page-chat) .leya-message-action-button{width:28px;height:28px;display:grid;place-items:center;border:1px solid rgba(170,178,188,.24);border-radius:8px;background:rgba(15,18,23,.72);color:#cfd6df;font-size:12px;line-height:1;cursor:pointer;padding:0;margin:0;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}
#leya-modal:not(.leya-page-chat) .leya-message-action-button:hover{background:rgba(170,178,188,.16);border-color:rgba(210,218,228,.42);color:#fff;transform:scale(.96)}
#leya-modal:not(.leya-page-chat) .leya-message-action-button.is-copied{color:#9ff0bb;border-color:rgba(80,220,135,.4)}
#leya-modal:not(.leya-page-chat) .leya-message-edit-input{width:100%;max-width:100%;min-height:52px;padding:12px 16px;box-sizing:border-box;border-radius:14px;border:1px solid #12a6c8;background:linear-gradient(135deg,#06495b,#083845);color:#fff;font:inherit;font-size:15px;line-height:1.48;outline:0}
#leya-modal:not(.leya-page-chat) .leya-message-edit-input:focus{border-color:#23d4ff;box-shadow:0 0 0 2px rgba(35,212,255,.2)}
#leya-modal:not(.leya-page-chat) .leya-message-edit-actions{display:flex;justify-content:flex-end;gap:8px;margin:8px 0 10px}
#leya-modal:not(.leya-page-chat) .leya-message-edit-cancel,#leya-modal:not(.leya-page-chat) .leya-message-edit-submit{height:32px;padding:0 13px;border-radius:9px;font-size:13px;font-weight:700;cursor:pointer;transition:transform .16s ease,background .16s ease,border-color .16s ease}
#leya-modal:not(.leya-page-chat) .leya-message-edit-cancel{border:1px solid rgba(180,190,200,.26);background:rgba(20,24,30,.74);color:#cfd6df}
#leya-modal:not(.leya-page-chat) .leya-message-edit-submit{border:1px solid rgba(21,205,243,.55);background:linear-gradient(135deg,#0785a4,#09b9dc);color:#fff;box-shadow:0 8px 20px rgba(0,185,220,.22)}
#leya-modal:not(.leya-page-chat) .leya-message-edit-cancel:hover,#leya-modal:not(.leya-page-chat) .leya-message-edit-submit:hover{transform:translateY(-1px)}
