/* 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: 20px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.95);
  color: #ffffff;
  border: 1px solid rgba(50, 50, 50, 0.5);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 999999;
  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;
}

@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;
}

/* Анимация для "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;
}
