/* Fase 31 · capa viva de la consola `/`: malla de luz, movimiento continuo y micro-interacciones.
   Se carga después de style.css y layout.css; no cambia el layout, lo ilumina. La paleta vive en
   style.css (Obsidiana & Cristal de Puck / Porcelana Élfica & Amatista Real). */
:root {
  --mint: #5eead4;
  --emerald: #10b981;
  --rose: #f9a8d4;
  --gold: #fbbf24;
}
body {
  background:
    radial-gradient(78rem 44rem at 10% -10%, rgba(94, 234, 212, 0.10), transparent 62%),
    radial-gradient(62rem 38rem at 96% 4%, rgba(56, 189, 248, 0.09), transparent 62%),
    radial-gradient(56rem 34rem at 48% 112%, rgba(168, 85, 247, 0.12), transparent 64%),
    radial-gradient(46rem 30rem at 80% 70%, rgba(241, 245, 249, 0.05), transparent 64%),
    var(--bg);
}
:root[data-theme="light"] body, body.theme-light {
  background:
    radial-gradient(64rem 38rem at 10% -8%, rgba(45, 212, 191, 0.10), transparent 62%),
    radial-gradient(58rem 34rem at 96% 4%, rgba(147, 51, 234, 0.08), transparent 64%),
    radial-gradient(52rem 30rem at 52% 112%, rgba(45, 212, 191, 0.06), transparent 66%),
    var(--bg);
}
#ambient {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  opacity: 0.9;
}
.app { position: relative; z-index: 1; }
.topbar {
  background: linear-gradient(180deg, rgba(13, 16, 28, 0.82), rgba(9, 11, 20, 0.66));
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(94, 234, 212, 0.5), rgba(168, 85, 247, 0.5),
    rgba(56, 189, 248, 0.4)) 1;
  box-shadow: 0 18px 50px rgba(3, 5, 12, 0.45);
}
.brand-mark {
  background: conic-gradient(from 20deg, #ecfeff, #5eead4, #a855f7, #f1f5f9, #ecfeff);
  box-shadow: 0 0 26px rgba(168, 85, 247, 0.55), 0 0 60px rgba(94, 234, 212, 0.3);
  animation: mark-spin 9s linear infinite;
}
@keyframes mark-spin { to { transform: rotate(360deg); } }
.brand h1 {
  background: linear-gradient(96deg, #ffffff 0%, #e9d5ff 34%, #5eead4 68%, #38bdf8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 0.08em;
}
.brand h1 i { color: var(--mint); -webkit-text-fill-color: var(--mint); }
.stage::before {
  background:
    radial-gradient(58% 55% at 68% 72%, rgba(94, 234, 212, 0.16), transparent 72%),
    conic-gradient(from 0deg at 60% 58%, rgba(94, 234, 212, 0.12), rgba(168, 85, 247, 0.16),
      transparent 42%, rgba(56, 189, 248, 0.10) 72%, transparent 100%);
  filter: blur(18px) saturate(1.2);
  animation: stage-breathe 12s ease-in-out infinite alternate;
}
@keyframes stage-breathe {
  0% { transform: scale(1) rotate(-1deg); opacity: 0.85; }
  100% { transform: scale(1.06) rotate(1.5deg); opacity: 1; }
}
.stage-canvas::after {
  content: ""; position: absolute; left: 50%; bottom: 4%; width: min(70%, 520px);
  height: 12%; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(94, 234, 212, 0.20), rgba(168, 85, 247, 0.10),
    transparent 70%);
  filter: blur(16px); pointer-events: none; animation: floor-glow 6s ease-in-out infinite;
}
@keyframes floor-glow {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scaleX(0.92); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1.08); }
}
.composer {
  background:
    linear-gradient(180deg, rgba(13, 16, 28, 0.88), rgba(9, 11, 20, 0.94)) padding-box,
    linear-gradient(120deg, rgba(94, 234, 212, 0.5), rgba(168, 85, 247, 0.55),
      rgba(56, 189, 248, 0.4)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 20px 60px rgba(3, 5, 12, 0.55), 0 0 40px rgba(168, 85, 247, 0.10);
}
.composer:focus-within {
  box-shadow: 0 24px 70px rgba(3, 5, 12, 0.6), 0 0 54px rgba(94, 234, 212, 0.18);
}
.composer-row input#text {
  background: rgba(9, 11, 20, 0.72); border-color: rgba(94, 234, 212, 0.22);
}
.composer-row input#text:focus-visible {
  border-color: var(--mint); box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.16),
    0 0 30px rgba(94, 234, 212, 0.18), inset 0 1px 0 var(--spec);
}
.btn.primary {
  background: linear-gradient(120deg, #ecfeff, #a7f3d0 24%, #d8b4fe 62%, #e9d5ff 100%);
  color: #140726; border: 0;
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.34);
}
.btn.primary:hover { box-shadow: 0 16px 40px rgba(168, 85, 247, 0.46); }
.tab.is-on { color: var(--mint); }
.dot.ok { box-shadow: 0 0 14px var(--mint); }
.rail { background: linear-gradient(180deg, rgba(13, 16, 28, 0.78), rgba(8, 10, 18, 0.88)); }
.card.is-interactive { transition: transform 220ms var(--ease-out), border-color 220ms ease,
  box-shadow 220ms ease; }
.card.is-interactive:hover {
  transform: translateY(-2px); border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 18px 44px rgba(3, 5, 12, 0.42), 0 0 26px rgba(94, 234, 212, 0.08);
}
.msg { animation: msg-rise 320ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes msg-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 760px) {
  .stage-canvas::after { display: none; }
}

/* ------------------------------------------------------------------ TEMA CLARO */
:root[data-theme="light"] .topbar, body.theme-light .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 248, 245, 0.78));
  border-image: linear-gradient(90deg, rgba(13, 148, 136, 0.45), rgba(124, 58, 237, 0.5),
    rgba(2, 132, 199, 0.35)) 1;
  box-shadow: 0 16px 40px rgba(80, 60, 110, 0.10);
}
:root[data-theme="light"] .brand h1, body.theme-light .brand h1 {
  background: linear-gradient(96deg, #3b0764 0%, #7c3aed 42%, #0d9488 78%, #0284c7 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="light"] .brand h1 i, body.theme-light .brand h1 i { color: #0d9488; -webkit-text-fill-color: #0d9488; }
:root[data-theme="light"] .btn.ghost, body.theme-light .btn.ghost { background: rgba(255, 255, 255, 0.8); color: #2a1746; }
:root[data-theme="light"] .theme-btn, body.theme-light .theme-btn { background: rgba(255, 255, 255, 0.9); color: #7c3aed; }
:root[data-theme="light"] .composer, body.theme-light .composer {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 248, 245, 0.97)) padding-box,
    linear-gradient(120deg, rgba(13, 148, 136, 0.40), rgba(124, 58, 237, 0.45),
      rgba(2, 132, 199, 0.32)) border-box;
  box-shadow: 0 20px 54px rgba(80, 60, 110, 0.14), 0 0 34px rgba(124, 58, 237, 0.06);
}
:root[data-theme="light"] .rail, body.theme-light .rail {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 248, 245, 0.94));
}
:root[data-theme="light"] .card.is-interactive:hover, body.theme-light .card.is-interactive:hover { box-shadow: 0 18px 44px rgba(80, 60, 110, 0.16); }
:root[data-theme="light"] .stage-canvas::after, body.theme-light .stage-canvas::after { opacity: 0.4; }
:root[data-theme="light"] .session, body.theme-light .session { background: #ffffff; color: #12101b; }
:root[data-theme="light"] .msg-body code, :root[data-theme="light"] .msg-body pre,
body.theme-light .msg-body code, body.theme-light .msg-body pre {
  background: rgba(109, 40, 217, 0.06); color: #12101b;
}
:root[data-theme="light"] .server-log, body.theme-light .server-log { background: rgba(109, 40, 217, 0.05); color: #4b4463; }
:root[data-theme="light"] .msg-body blockquote, body.theme-light .msg-body blockquote {
  background: rgba(13, 148, 136, 0.06); color: #4b4463;
}

.theme-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--spec-strong); background: rgba(13, 16, 28, 0.60);
  color: var(--mint); transition: transform 180ms var(--ease-out), box-shadow 180ms ease;
}
.theme-btn:hover { transform: rotate(12deg); box-shadow: 0 0 24px rgba(94, 234, 212, 0.28); }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .icon-moon { display: none; }
:root[data-theme="light"] .theme-btn .icon-sun, body.theme-light .theme-btn .icon-sun { display: none; }
:root[data-theme="light"] .theme-btn .icon-moon, body.theme-light .theme-btn .icon-moon { display: block; }

/* Estructura editorial de la consola */
.brand-copy { display: grid; line-height: 1.02; }
.brand-copy small { color: var(--dim); font-size: 9.5px; letter-spacing: 0.24em; margin-top: 5px; }
.console-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 18px clamp(18px, 3vw, 34px) 14px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(94, 234, 212, 0.35), rgba(168, 85, 247, 0.3),
    transparent) 1;
  background: linear-gradient(180deg, rgba(13, 16, 28, 0.35), transparent);
}
.eyebrow { margin: 0 0 6px; color: var(--mint); font-size: 10px; letter-spacing: 0.28em;
  font-weight: 700; }
.console-hero h2 {
  margin: 0; font-family: Georgia, "Iowan Old Style", serif; font-weight: 600;
  font-size: clamp(24px, 2.4vw, 34px);
  background: linear-gradient(96deg, #ffffff, #e9d5ff 42%, #5eead4 82%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.console-note { margin: 0; max-width: 360px; text-align: right; color: var(--dim);
  font-size: 12px; line-height: 1.5; }
.msg.bot { position: relative; padding-left: 42px; }
.msg.bot::before {
  content: "A"; position: absolute; left: 12px; top: 12px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(from 20deg, #ecfeff, #5eead4, #a855f7, #f1f5f9, #ecfeff);
  color: #140726; font: 700 10px/1 var(--font); box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}
body[data-character="coda"] .msg.bot::before { content: "C"; }
.stage-canvas canvas { filter: drop-shadow(0 18px 34px rgba(3, 5, 12, 0.45)); }
.stage-canvas { animation: stage-in 900ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes stage-in {
  from { opacity: 0; transform: translateY(22px) scale(0.985); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@media (min-width: 1024px) { .rail { position: relative; } }
.rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--mint), var(--amethyst), var(--cyan));
  opacity: 0.7;
}
.tabs { background: linear-gradient(180deg, rgba(13, 16, 28, 0.55), transparent); }
.tab { position: relative; }
.tab.is-on::after {
  content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--mint), var(--amethyst));
  box-shadow: 0 0 12px var(--mint);
}
.empty h2 {
  font-family: Georgia, "Iowan Old Style", serif; font-weight: 600;
  background: linear-gradient(96deg, #ffffff, #e9d5ff 44%, #5eead4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="light"] .console-hero, body.theme-light .console-hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), transparent);
}
:root[data-theme="light"] .console-hero h2, :root[data-theme="light"] .empty h2,
body.theme-light .console-hero h2, body.theme-light .empty h2 {
  background: linear-gradient(96deg, #3b0764, #7c3aed 44%, #0d9488);
  -webkit-background-clip: text; background-clip: text;
}
:root[data-theme="light"] .console-note, body.theme-light .console-note { color: #4b4463; }
:root[data-theme="light"] .eyebrow, body.theme-light .eyebrow { color: #0d9488; }
:root[data-theme="light"] .tab.is-on::after, body.theme-light .tab.is-on::after { background: linear-gradient(90deg, #0d9488, #7c3aed); }
@media (max-width: 760px) {
  .console-hero { align-items: flex-start; flex-direction: column; gap: 6px; padding: 12px 16px; }
  .console-note { text-align: left; max-width: none; }
  .msg.bot { padding-left: 38px; }
}
:root[data-theme="light"] .composer-row input#text, body.theme-light .composer-row input#text {
  background: #ffffff; color: #12101b; border-color: rgba(109, 40, 217, 0.22);
}
:root[data-theme="light"] .composer-row input#text::placeholder, body.theme-light .composer-row input#text::placeholder { color: #6c6486; }
:root[data-theme="light"] .segmented, body.theme-light .segmented { background: rgba(255, 255, 255, 0.78); }
:root[data-theme="light"] .seg, body.theme-light .seg { color: #4b4463; }
:root[data-theme="light"] .seg.is-on, body.theme-light .seg.is-on { color: #ffffff; }
:root[data-theme="light"] .composer-tools, body.theme-light .composer-tools { background: transparent; }

/* =========================================================================================
   FASE 32 · DARK AERO GLASS en barras y paneles vivos (se carga después de style.css)
   ========================================================================================= */
.topbar, .composer, .rail, .tabs {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 36%,
    rgba(10, 18, 34, 0.72) 36.5%, rgba(7, 13, 26, 0.85) 100%);
  backdrop-filter: blur(24px) saturate(190%) brightness(1.06);
  -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.06);
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-left: 1px solid rgba(255, 255, 255, 0.40);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 24px rgba(56, 189, 248, 0.14),
    0 20px 48px rgba(2, 6, 18, 0.72), 0 0 22px rgba(56, 189, 248, 0.12);
}
.composer:focus-within {
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 26px rgba(94, 234, 212, 0.16),
    0 20px 52px rgba(2, 6, 18, 0.72), 0 0 30px rgba(94, 234, 212, 0.18);
}
/* Aviso persistente del Modo Alexa en la barra superior. */
.alexa-toggle.is-on {
  color: #04121f;
  background: linear-gradient(120deg, var(--aqua), var(--cyan));
  border-color: transparent;
}
:root[data-theme="light"] .topbar, :root[data-theme="light"] .composer,
:root[data-theme="light"] .rail, :root[data-theme="light"] .tabs,
body.theme-light .topbar, body.theme-light .composer,
body.theme-light .rail, body.theme-light .tabs {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.66) 40%,
    rgba(240, 248, 255, 0.82) 40.5%, rgba(248, 250, 252, 0.97) 100%);
  backdrop-filter: blur(24px) saturate(150%) brightness(1.02);
  -webkit-backdrop-filter: blur(24px) saturate(150%) brightness(1.02);
  border: 1px solid rgba(125, 211, 252, 0.52);
  border-top: 1px solid rgba(255, 255, 255, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 #ffffff, inset 0 0 24px rgba(56, 189, 248, 0.10),
    0 18px 40px rgba(24, 16, 48, 0.14), 0 0 20px rgba(56, 189, 248, 0.10);
}

/* =========================================================================================
   FASE 34 · Verdadero Aero Glass de Windows 7: superficies 0.22–0.34, reflejo diagonal,
   doble bisel luminoso y blur 24 px para que el Bokeh de Emilia se trasluzca en cada panel.
   ========================================================================================= */
.topbar, .composer, .rail, .tabs,
.card, .msg.bot, .msg.me, .mama-card, .guest-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%,
    rgba(255, 255, 255, 0.05) 38%, rgba(8, 14, 28, 0.26) 38.5%,
    rgba(6, 10, 22, 0.34) 100%);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(186, 230, 253, 0.42);
  border-top-color: rgba(255, 255, 255, 0.72);
  border-left-color: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.60), 0 16px 40px rgba(0, 0, 0, 0.45);
}
/* La burbuja del usuario conserva su tinte cian/amatista, pero translúcido. */
.msg.me {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.30) 0%,
    rgba(168, 85, 247, 0.16) 38%, rgba(8, 14, 28, 0.28) 38.5%,
    rgba(6, 10, 22, 0.34) 100%);
}
.composer:focus-within {
  border-color: rgba(94, 234, 212, 0.62);
  border-top-color: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(94, 234, 212, 0.16);
}
:root[data-theme="light"] .topbar, :root[data-theme="light"] .composer,
:root[data-theme="light"] .rail, :root[data-theme="light"] .tabs,
:root[data-theme="light"] .card, :root[data-theme="light"] .msg.bot,
:root[data-theme="light"] .msg.me, :root[data-theme="light"] .mama-card,
:root[data-theme="light"] .guest-card,
body.theme-light .topbar, body.theme-light .composer, body.theme-light .rail,
body.theme-light .tabs, body.theme-light .card, body.theme-light .msg.bot,
body.theme-light .msg.me, body.theme-light .mama-card, body.theme-light .guest-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.12) 38%, rgba(232, 244, 255, 0.26) 38.5%,
    rgba(248, 250, 252, 0.34) 100%);
  border-color: rgba(148, 197, 255, 0.55);
  border-top-color: rgba(255, 255, 255, 0.96);
  border-left-color: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 #ffffff, 0 16px 40px rgba(80, 60, 110, 0.14);
}
:root[data-theme="light"] .msg.me, body.theme-light .msg.me {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.22) 0%,
    rgba(124, 58, 237, 0.14) 38%, rgba(232, 244, 255, 0.30) 38.5%,
    rgba(248, 250, 252, 0.36) 100%);
}
/* El blur de 24 px se mantiene también en móvil: es el contrato de la Fase 34. */

/* =========================================================================================
   FASE 34.2 · Aero Glass REAL: toda la interfaz deja pasar la imagen de Emilia.
   Opacidad 0.16–0.20, blur 28 px, saturación 200 %, bisel blanco y sin colores sólidos.
   ========================================================================================= */
.app, .console, .panels, .panel, .log, .list, .rail .panels { background: transparent !important; }
#ambient { opacity: 0.55; }
.topbar, .composer, .rail, .tabs, .card, .msg.bot, .msg.me, .btn, .pill,
.emotion-chip, .segmented, dialog.session, .stage-fallback, .apk-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%,
    rgba(6, 10, 22, 0.26) 100%) !important;
  backdrop-filter: blur(24px) saturate(200%) brightness(1.08) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) brightness(1.08) !important;
  border: 1px solid rgba(186, 230, 253, 0.36) !important;
  border-top-color: rgba(255, 255, 255, 0.66) !important;
  border-left-color: rgba(255, 255, 255, 0.48) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 16px 40px rgba(0, 0, 0, 0.34) !important;
}
.msg.bot {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%,
    rgba(6, 10, 22, 0.22) 100%) !important;
}
.msg.me {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.20) 0%,
    rgba(168, 85, 247, 0.12) 48%, rgba(6, 10, 22, 0.24) 100%) !important;
}
.btn.primary {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.42) 0%,
    rgba(168, 85, 247, 0.34) 100%) !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.50) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 10px 28px rgba(168, 85, 247, 0.28) !important;
}
.btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%,
    rgba(8, 14, 28, 0.22) 100%) !important;
}
.tab.is-on { background: rgba(94, 234, 212, 0.14) !important; }
input, select, textarea, .composer-row input#text {
  background: rgba(8, 14, 28, 0.16) !important;
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  border-color: rgba(186, 230, 253, 0.30) !important;
  color: var(--ink) !important;
}
.msg-body pre, .msg-body code { background: rgba(0, 0, 0, 0.14) !important; }
.msg, .card, .card-title, .msg-body { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.38); }
:root[data-theme="light"] .app, :root[data-theme="light"] .console,
:root[data-theme="light"] .panels, :root[data-theme="light"] .panel,
:root[data-theme="light"] .log, :root[data-theme="light"] .list,
body.theme-light .app, body.theme-light .console, body.theme-light .panels,
body.theme-light .panel, body.theme-light .log, body.theme-light .list {
  background: transparent !important;
}
:root[data-theme="light"] .topbar, :root[data-theme="light"] .composer,
:root[data-theme="light"] .rail, :root[data-theme="light"] .tabs,
:root[data-theme="light"] .card, :root[data-theme="light"] .msg.bot,
:root[data-theme="light"] .msg.me, :root[data-theme="light"] .btn,
:root[data-theme="light"] .pill, :root[data-theme="light"] .emotion-chip,
:root[data-theme="light"] .segmented, :root[data-theme="light"] dialog.session,
:root[data-theme="light"] .apk-card,
body.theme-light .topbar, body.theme-light .composer, body.theme-light .rail,
body.theme-light .tabs, body.theme-light .card, body.theme-light .msg.bot,
body.theme-light .msg.me, body.theme-light .btn, body.theme-light .pill,
body.theme-light .emotion-chip, body.theme-light .segmented,
body.theme-light dialog.session, body.theme-light .apk-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.42) 0%,
    rgba(248, 250, 252, 0.24) 100%) !important;
  border-color: rgba(148, 197, 255, 0.52) !important;
  border-top-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 16px 40px rgba(80, 60, 110, 0.16) !important;
  text-shadow: none;
}
:root[data-theme="light"] .msg.me, body.theme-light .msg.me {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.24) 0%,
    rgba(124, 58, 237, 0.14) 100%) !important;
}
:root[data-theme="light"] .msg, :root[data-theme="light"] .card,
body.theme-light .msg, body.theme-light .card { text-shadow: none; }
:root[data-theme="light"] input, :root[data-theme="light"] select,
body.theme-light input, body.theme-light select {
  background: rgba(255, 255, 255, 0.35) !important;
  color: var(--ink) !important;
}
@media (max-width: 1023.98px) {
  .topbar, .composer, .rail, .tabs, .card, .msg.bot, .msg.me, .btn, .pill,
  .emotion-chip, .segmented, dialog.session {
    backdrop-filter: blur(24px) saturate(180%) brightness(1.06) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(1.06) !important;
  }
}

/* Los controles ⠿ − + no existen visualmente hasta tocar a Aris. */
#stage-tools {
  opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
  transform: translateY(14px) scale(0.82) !important; filter: blur(6px);
  transition: opacity 220ms var(--ease-out), transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
    visibility 220ms, filter 220ms;
}
.stage.is-controls-open #stage-tools {
  opacity: 1 !important; visibility: visible !important; pointer-events: auto !important;
  transform: translateY(0) scale(1) !important; filter: blur(0);
}
