/* ============================================================
   CHAT — cabecera, mensajes, tarjeta de fuente, composer
   Minimalista: sin avatares, solo burbujas alineadas.
   ============================================================ */
.chat {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  max-height: calc(100vh - 84px);
  margin-top: 0;
  background: var(--g-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

/* ---------- Cabecera ---------- */
.chat__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--g-deep);
  color: var(--c-white);
}
.chat__head::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--g-warm);
}

.chat__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat__names { display: flex; flex-direction: column; min-width: 0; }

.chat__title {
  font-weight: 700;
  font-size: var(--t-lg);
  letter-spacing: .01em;
  color: var(--c-white);
  line-height: 1.15;
}

.chat__role {
  font-size: var(--t-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Blaze: logo de fuego ---------- */
.blaze {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 140, 40, 0.22),
    rgba(255, 40, 20, 0.06) 58%,
    transparent 74%
  );
}

.blaze__img {
  display: block;
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(255, 90, 20, 0.55));
  animation: blaze-spin 6s linear infinite, blaze-flicker 2.4s ease-in-out infinite;
  transform-origin: 50% 50%;
  will-change: transform, filter;
}

.blaze--lg { width: 44px; height: 44px; }
.blaze--avatar { width: 34px; height: 34px; align-self: flex-start; margin-top: 2px; }

.blaze--thinking .blaze__img {
  animation-duration: 2s, 0.9s;
}

@keyframes blaze-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes blaze-flicker {
  0%, 100% { filter: drop-shadow(0 3px 8px rgba(255, 90, 20, 0.45)) brightness(1); }
  40%      { filter: drop-shadow(0 4px 14px rgba(255, 140, 30, 0.75)) brightness(1.08); }
  70%      { filter: drop-shadow(0 2px 9px rgba(255, 60, 10, 0.55)) brightness(0.96); }
}

.chat__status {
  display: flex; align-items: center; gap: var(--sp-1);
  font-size: var(--t-xs);
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .72);
}
.chat__status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-rose);
  animation: pulse-ring 2.4s infinite;
}

/* ---------- Mensajes ---------- */
.chat__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--sp-3) 16px 12px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--c-rose) 50%, var(--c-line)) transparent;
}
.chat__scroll::-webkit-scrollbar { width: 8px; }
.chat__scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--c-rose) 45%, var(--c-line));
  border-radius: var(--r-pill);
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 84%;
  min-width: 0;
  animation: rise .38s cubic-bezier(.16, 1, .3, 1) both;
}
.msg--bot {
  align-self: flex-start;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  max-width: 92%;
}
.msg--user { align-self: flex-end; align-items: flex-end; }

/* Columna de contenido junto a Blaze: burbuja y tarjetas de fuente apiladas. */
.msg__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.msg__bubble {
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: var(--t-base);
  line-height: 1.55;
}

.msg--bot .msg__bubble {
  background: var(--c-surface-2);
  color: var(--c-ink);
  border: 1px solid var(--c-line);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.msg--user .msg__bubble {
  background: var(--g-brand);
  color: var(--c-white);
  border-bottom-right-radius: 6px;
  box-shadow: var(--shadow-rose);
}

.msg__bubble--bare {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* ---------- Indicador de escritura ---------- */
.typing { display: flex; gap: 5px; padding: 12px 14px; }
.typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-rose);
  opacity: .25;
  animation: blink 1.2s infinite both;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }

/* ---------- Burbuja: explicación de la IA (separada de fuentes) ---------- */
.msg__bubble--answer {
  margin-bottom: 8px;
}

.msg__label {
  margin: 0 0 6px;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-rose);
}

.msg__answer {
  margin: 0;
  line-height: 1.6;
}

.msg__hint {
  margin: 0 0 8px;
  font-size: var(--t-xs);
  line-height: 1.45;
  color: var(--c-ink-muted, rgba(255, 255, 255, .62));
}

.msg__suggestions {
  margin-top: 10px;
}

.msg__suggest-label {
  margin: 0 0 8px;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--c-ink-muted, rgba(255, 255, 255, .7));
}

.msg__suggest-dropdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg__suggest-toggle {
  appearance: none;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1);
  color: inherit;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.msg__suggest-toggle:hover,
.msg__suggest-toggle:focus-visible {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .4);
  outline: none;
}

.msg__suggest-toggle[aria-expanded="true"] .msg__suggest-caret {
  transform: rotate(180deg);
}

.msg__suggest-caret {
  display: inline-block;
  transition: transform .15s ease;
}

.msg__suggest-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .18);
}

.msg__suggest-panel[hidden] {
  display: none;
}

.msg__suggest-select-label {
  font-size: var(--t-xs);
  color: var(--c-ink-muted, rgba(255, 255, 255, .68));
}

.msg__suggest-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.msg__suggest-option {
  appearance: none;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .28);
  color: inherit;
  font: inherit;
  font-size: var(--t-sm);
  padding: 8px 10px;
  cursor: pointer;
}

.msg__suggest-option:hover,
.msg__suggest-option:focus-visible {
  border-color: rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .1);
  outline: none;
}

.msg__suggest-option-label {
  display: block;
  font-weight: 600;
}

.msg__suggest-option-hint {
  display: block;
  margin-top: 2px;
  font-size: var(--t-xs);
  opacity: .75;
}

.msg__suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.msg__suggest {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: inherit;
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.msg__suggest:hover,
.msg__suggest:focus-visible {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .35);
  outline: none;
}

.source__panel--excerpt .source__text {
  font-size: var(--t-sm);
  line-height: 1.55;
  opacity: .92;
}

/* ---------- Tarjeta de fuente (enseñanza + versículo + video) ---------- */
.source {
  margin-top: 4px;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source__panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source__panel-title {
  margin: 0 2px;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.source__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.source__panel-head .source__panel-title {
  margin: 0;
}

.source__panel-head .source__tabs {
  margin-bottom: 0;
}

.source__panel--verses .source__panel-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.source__panel--video .source__panel-title {
  color: var(--c-indigo);
}

.source__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.source__tab {
  border: 1px solid var(--c-line);
  background: var(--c-bg-soft);
  color: var(--c-ink-muted);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: 4px 8px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.source__tab:hover {
  border-color: var(--c-rose);
  color: var(--c-rose);
}

.source__tab--active {
  background: var(--c-rose-soft);
  border-color: var(--c-rose);
  color: var(--c-rose);
}

.source__version {
  display: none;
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.source__version[hidden] {
  display: none !important;
}

.source__version--active {
  display: block;
}

.source__video-hint {
  display: block;
  margin-top: 4px;
  font-size: var(--t-xs);
  color: var(--c-ink-faint);
  letter-spacing: .02em;
  text-transform: none;
  font-weight: 400;
}

.source__origin {
  margin: 0 2px;
  font-size: var(--t-xs);
  color: var(--c-ink-faint);
}

.source__block {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  overflow: hidden;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}

.source__label {
  margin: 0 0 6px;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
}

.source__excerpt {
  background: var(--c-indigo-tint);
  border-left: 3px solid var(--c-indigo);
}

.source__verse {
  position: relative;
  background: var(--c-rose-tint);
  border-left: 3px solid var(--c-rose);
}

.source__ref {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-weight: 700;
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-rose);
  margin: 0 0 6px;
}

.source__verse + .source__verse {
  margin-top: 0;
}

.source__version .source__badge {
  display: inline-block;
  margin-bottom: 6px;
}

.source__badge {
  font-size: .58rem;
  letter-spacing: .1em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--c-orange);
  background: var(--c-orange-soft);
  border-radius: var(--r-pill);
  padding: 3px 9px;
}

.source__text {
  margin: 0;
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--c-ink);
}

.source__video {
  background: var(--c-bg-soft);
}

.source__video-row {
  display: flex; align-items: center; gap: 10px;
}

.source__thumb {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--c-white);
  background: var(--g-brand);
  box-shadow: var(--shadow-rose);
}
.source__thumb svg { width: 16px; height: 16px; }

.source__info { flex: 1; min-width: 0; }

.source__episode {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
  font-weight: 600;
}

.source__video-title {
  display: block;
  font-weight: 600;
  font-size: var(--t-sm);
  color: var(--c-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source__actions {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.source__cta {
  flex: none;
  display: inline-flex; align-items: center; gap: var(--sp-1);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: var(--t-sm);
  letter-spacing: .01em;
  color: var(--c-white);
  background: var(--g-brand);
  border-radius: var(--r-pill);
  padding: 7px 12px;
  box-shadow: var(--shadow-rose);
  transition: transform var(--transition), box-shadow var(--transition),
              background var(--transition), color var(--transition);
}
.source__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -14px rgba(255, 0, 102, .55);
}
.source__cta svg { width: 12px; height: 12px; }

.source__cta--link {
  background: var(--c-surface-2);
  color: var(--c-indigo);
  border: 1px solid var(--c-line);
  box-shadow: none;
}
.source__cta--link:hover {
  background: var(--c-indigo-tint);
  border-color: var(--c-indigo);
  color: var(--c-indigo-deep);
  box-shadow: var(--shadow-soft);
}

.source__panel--offer,
.player__shop-panel {
  gap: 8px;
}

.source__shop-intro,
.source__shop-hint {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--c-ink-soft);
  line-height: 1.4;
}

.source__shop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.source__shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
}

.source__shop-copy {
  min-width: 0;
  flex: 1;
}

.source__shop-title {
  margin: 0;
  font-weight: 600;
  font-size: var(--t-sm);
  color: var(--c-ink);
  line-height: 1.3;
}

.source__shop-hint {
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.source__cta--tight {
  flex: none;
  padding: 6px 10px;
  white-space: nowrap;
}

.source__shop-all {
  display: flex;
  justify-content: flex-end;
}

.source__cta--all {
  width: 100%;
  justify-content: center;
}

.player__shop {
  padding: 0 12px 12px;
}

.player__shop-panel .source__panel-title {
  margin: 8px 2px 0;
}

@media (max-width: 640px) {
  .source__video-row {
    flex-wrap: wrap;
  }
  .source__actions {
    width: 100%;
    justify-content: stretch;
  }
  .source__cta { flex: 1; justify-content: center; }
}

/* ---------- Reproductor debajo del chat ---------- */
.player {
  margin-top: var(--sp-3);
  background: var(--g-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* En el sidebar el video no debe comerse toda la columna. */
.sidebar .player {
  flex: 0 0 auto;
}

.sidebar .player__frame-wrap {
  max-height: min(200px, 28vh);
}

.sidebar .player__meta {
  padding: 8px 12px 2px;
}

.sidebar .player__empty {
  padding: var(--sp-3) 14px;
}

.player__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-surface-2);
}

.player__label {
  font-weight: 700;
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-ink);
}

.player__hint {
  font-size: var(--t-xs);
  color: var(--c-ink-faint);
}

.player__empty {
  padding: var(--sp-4) 16px;
  text-align: center;
}

.player__empty-title {
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 6px;
}

.player__empty-text {
  max-width: 46ch;
  margin-inline: auto;
  font-size: var(--t-sm);
  color: var(--c-ink-soft);
  line-height: 1.5;
}

.player__stage { padding: 0 0 12px; }

.player__frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #120C2E;
}

.player__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player__meta {
  padding: 12px 14px 0;
}

.player__now {
  font-size: var(--t-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-rose);
  margin-bottom: 4px;
}

.player__title {
  font-weight: 600;
  font-size: var(--t-base);
  color: var(--c-ink);
}

.player__time {
  margin-top: 2px;
  font-size: var(--t-sm);
  color: var(--c-ink-faint);
}

/* ---------- Promesas y versículos (franja horizontal bajo el chat) ---------- */
.life-band {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  background: var(--g-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.life-band__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--sp-2);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--c-line);
}

.life-band__label {
  font-weight: 700;
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-ink);
}

.life-band__hint {
  margin-top: 4px;
  font-size: var(--t-sm);
  color: var(--c-ink-faint);
}

.life-band__scroll-hint {
  font-size: var(--t-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-rose);
  font-weight: 600;
  white-space: nowrap;
}

.life-band__status {
  padding: 6px 0 8px;
  font-size: var(--t-sm);
  color: var(--c-ink-soft);
}

.life-band__track {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.life-band__track::-webkit-scrollbar { height: 8px; }
.life-band__track::-webkit-scrollbar-thumb {
  background: var(--c-line);
  border-radius: var(--r-pill);
}

.life-card {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-md);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.life-card:hover {
  border-color: var(--c-rose);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.life-card--active {
  border-color: var(--c-rose);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-rose) 35%, transparent);
}

.life-card__kicker {
  font-size: var(--t-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-orange);
}

.life-card__title {
  font-size: var(--t-base);
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1.25;
}

.life-card__promise {
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--c-ink-soft);
  padding-left: 10px;
  border-left: 3px solid var(--c-rose);
}

.life-card__featured {
  padding: 8px 10px;
  background: var(--g-surface);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-sm);
}

.life-card__badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-rose);
  background: var(--c-indigo-tint);
  border-radius: var(--r-pill);
}

.life-card__ref {
  display: block;
  font-weight: 700;
  font-size: var(--t-sm);
  color: var(--c-orange);
}

.life-card__verse-title {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
  margin-top: 2px;
}

.life-card__text {
  margin: 8px 0 0;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--c-ink);
}

.life-card__more {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.life-card__verse--mini {
  padding: 8px 10px;
  background: var(--g-surface);
  border-radius: var(--r-md);
  border: 1px solid var(--c-line-soft);
}

.life-card__ask {
  margin-top: auto;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--c-rose);
  font-weight: 600;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.life-card__ask:hover {
  background: var(--c-indigo-tint);
  border-color: var(--c-rose);
}

.life-band__empty {
  padding: var(--sp-4) 0;
  text-align: center;
}

.life-band__empty-title {
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 6px;
}

.life-band__empty-text {
  font-size: var(--t-sm);
  color: var(--c-ink-faint);
}

@media (max-width: 760px) {
  .life-band__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .life-band__scroll-hint { display: none; }
}

.msg__life-promise {
  margin: 0 0 10px;
  padding: 10px 12px;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--c-ink-soft);
  background: var(--c-indigo-tint);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c-rose);
}
.msg__life-promise strong { color: var(--c-ink); }

.msg__rate {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.msg__rate-label {
  margin: 0 0 8px;
  font-size: var(--t-xs);
  color: var(--c-ink-muted, rgba(255, 255, 255, .68));
}
.msg__rate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.msg__rate-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: inherit;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: pointer;
}
.msg__rate-btn:hover,
.msg__rate-btn:focus-visible {
  border-color: rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .14);
  outline: none;
}
.msg__rate-btn--up:hover { border-color: #7dcea0; }
.msg__rate-btn--down:hover { border-color: #f5b7b1; }
.msg__rate-btn:disabled { opacity: .55; cursor: default; }
.msg__rate--done .msg__rate-actions { display: none; }
.msg__rate--done .msg__rate-label { color: #b8e0c8; }
.msg__rate--error .msg__rate-label { color: #f5b7b1; }

/* ---------- Artículos relacionados (WordPress público) ---------- */
.articles {
  margin-top: var(--sp-2);
  margin-bottom: 6px;
  background: var(--g-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Un solo scroll en la columna: el de .sidebar (sin lista anidada). */
.sidebar .articles {
  flex: 0 0 auto;
  width: 100%;
  min-height: 200px;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.sidebar .articles.articles--expanded {
  min-height: 200px;
}

.sidebar .articles__head,
.sidebar .articles__status {
  flex: 0 0 auto;
}

.sidebar .articles__list {
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow: visible;
  padding-bottom: 8px;
}

.sidebar .articles__empty {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

.articles__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-surface-2);
}

.articles__head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.articles__toggle {
  appearance: none;
  border: 1px solid var(--c-line);
  background: var(--c-indigo-tint, rgba(80, 70, 140, .08));
  color: var(--c-ink);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}

.articles__toggle:hover,
.articles__toggle:focus-visible {
  border-color: var(--c-rose);
  color: var(--c-rose-deep, var(--c-rose));
  outline: none;
}

.articles__label {
  margin: 0;
  font-weight: 700;
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-ink);
}

.articles__hub {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c-rose);
  text-decoration: none;
  transition: color var(--transition);
}
.articles__hub:hover { color: var(--c-rose-deep); text-decoration: underline; }

.articles__status {
  padding: 10px 14px;
  font-size: var(--t-sm);
  color: var(--c-ink-soft);
}

.articles__list {
  display: flex;
  flex-direction: column;
}

.articles__match {
  padding: 10px 14px 2px;
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-ink-faint);
}

.articles__item {
  position: relative;
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  border-top: 1px solid var(--c-line-soft);
  transition: background var(--transition), padding-left var(--transition), box-shadow .2s ease;
  z-index: 0;
}
.articles__item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--g-warm);
  opacity: 0;
  transition: opacity var(--transition);
}
.articles__item:first-of-type { border-top: none; }
.articles__match + .articles__item { border-top: 1px solid var(--c-line-soft); }
.articles__item:hover {
  background: var(--c-indigo-tint);
  padding-left: 18px;
  z-index: 2;
}
.articles__item:hover::before { opacity: 1; }

.articles__item-kicker {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-orange);
  margin-bottom: 4px;
}

.articles__item-title {
  display: block;
  font-weight: 600;
  font-size: var(--t-lg);
  color: var(--c-ink);
  line-height: 1.35;
}

.articles__item-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 4px;
  font-size: var(--t-base);
  line-height: 1.45;
  color: var(--c-ink-soft);
}

.articles__item-preview {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--g-surface, #fff);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(20, 16, 40, .12);
}

.articles__item:hover .articles__item-excerpt {
  -webkit-line-clamp: 4;
}

.articles__item:hover .articles__item-preview {
  display: block;
}

.articles--expanded .articles__item-excerpt {
  -webkit-line-clamp: 5;
}

.articles__item-cta {
  display: inline-block;
  margin-top: 6px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--c-rose);
}

.articles__empty {
  padding: var(--sp-4) 14px;
  text-align: center;
}

.articles__empty-title {
  font-weight: 600;
  font-size: var(--t-lg);
  color: var(--c-ink);
  margin-bottom: 6px;
}

.articles__empty-text {
  max-width: 48ch;
  margin-inline: auto;
  font-size: var(--t-base);
  color: var(--c-ink-soft);
  line-height: 1.5;
}
.articles__empty-text a {
  color: var(--c-rose);
  font-weight: 600;
}

/* ---------- Chips de ejemplo ---------- */
.examples { padding: var(--sp-2) 16px 2px; }
.examples[hidden] { display: none; }

.examples__label {
  font-size: var(--t-xs);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-ink-faint);
  font-weight: 700;
  margin-bottom: 6px;
}

.examples__chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--c-ink);
  background: var(--c-surface-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  transition: border-color var(--transition), color var(--transition),
              background var(--transition), transform var(--transition),
              box-shadow var(--transition);
}
.chip:hover {
  border-color: var(--c-rose);
  color: var(--c-rose);
  background: var(--c-rose-tint);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

/* ---------- Composer ---------- */
.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: var(--sp-2) 14px 14px;
  border-top: 1px solid var(--c-line);
  background: var(--c-surface-2);
}

.composer textarea {
  flex: 1;
  resize: none;
  font-size: var(--t-base);
  color: var(--c-ink);
  background: var(--c-bg-soft);
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  padding: 10px 14px;
  max-height: 110px;
  line-height: 1.45;
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition);
}
.composer textarea::placeholder { color: var(--c-ink-faint); }
.composer textarea:focus {
  outline: none;
  border-color: var(--c-rose);
  background: var(--c-surface-2);
  box-shadow: 0 0 0 3px rgba(255, 0, 102, .1);
}

.composer__send {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: none;
  border-radius: 50%;
  color: var(--c-white);
  background: var(--g-brand);
  box-shadow: var(--shadow-rose);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.composer__send:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 34px -14px rgba(255, 0, 102, .6);
}
.composer__send:active { transform: translateY(0) scale(.97); }
.composer__send:disabled {
  opacity: .4;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.composer__send svg { width: 18px; height: 18px; }

/* ---------- Responsive ---------- */
/* En la columna lateral el espacio es estrecho: cabeceras apiladas. */
.sidebar .player__head,
.sidebar .articles__head {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

@media (max-width: 920px) {
  .chat { max-height: none; }
  .sidebar .player__head,
  .sidebar .articles__head {
    flex-direction: row;
    align-items: baseline;
  }
}

@media (max-width: 640px) {
  .chat { min-height: 58vh; border-radius: var(--r-lg); }
  .msg--bot { gap: 6px; max-width: 100%; }
  .blaze--avatar { width: 30px; height: 30px; }
  .msg__bubble { font-size: var(--t-sm); padding: 10px 12px; }
  .chat__role { display: none; }
  .chat__head { padding: 10px 12px; }
  .chat__scroll { padding: var(--sp-2) 12px 6px; gap: var(--sp-2); }
  .msg { max-width: 96%; }
  .examples { padding: var(--sp-1) 12px 2px; }
  .examples__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .chip { white-space: nowrap; padding: 5px 10px; }
  .composer { padding: var(--sp-2) 10px 12px; gap: 6px; }
  .composer textarea { padding: 10px 12px; font-size: var(--t-sm); }
  .composer__send { width: 40px; height: 40px; }
  .player__head,
  .articles__head { padding: 10px 12px; }
  .articles__item { padding: 10px 12px; }
  .articles__item:hover { padding-left: 12px; }
  .player__meta { padding: 10px 12px 0; }
  .life-card { flex-basis: min(260px, 84vw); padding: 10px 12px; }
}
