:root {
  --fondo: #0f1115;
  --superficie: #171a21;
  --superficie-alta: #1e222b;
  --borde: #262b36;
  --texto: #e8eaed;
  --texto-tenue: #9aa1ad;
  --acento: #4c8dff;
  --error: #ff6b6b;
  --radio: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  color: var(--texto);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* El teclado del iPhone no debe tapar la barra de envío. */
body { height: 100dvh; overflow: hidden; }

.pantalla { height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }

/* ---------- Entrada ---------- */

#entrada { align-items: center; justify-content: center; padding: 24px; }

.caja-entrada { width: 100%; max-width: 340px; text-align: center; }

.caja-entrada h1 {
  /* El hueco que dejaba el subtítulo, que se quitó por no exponer el nombre. */
  margin: 0 0 30px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.subtitulo { margin: 4px 0 32px; color: var(--texto-tenue); font-size: 15px; }

.etiqueta {
  display: block;
  text-align: left;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--texto-tenue);
}

input[type="password"] {
  width: 100%;
  padding: 13px 15px;
  /* 16px como mínimo: por debajo, Safari en iPhone hace zoom al enfocar. */
  font-size: 16px;
  color: var(--texto);
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  outline: none;
}

input[type="password"]:focus { border-color: var(--acento); }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radio);
}

#boton-entrar {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: var(--acento);
}

#boton-entrar:disabled { opacity: 0.5; cursor: default; }

.error { margin-top: 16px; color: var(--error); font-size: 14px; }

/* ---------- Centro de mando ---------- */

:root {
  --hud: #35d7f5;
  --hud-tenue: rgba(53, 215, 245, 0.22);
  --hud-linea: rgba(53, 215, 245, 0.16);
  --panel: rgba(10, 22, 34, 0.72);
  --fondo-mando: #050b12;
}

#chat {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(20, 90, 130, 0.30) 0%, transparent 62%),
    var(--fondo-mando);
  color: #cfe9f2;
}

/* Rejilla de fondo. Es lo que hace que se lea como una consola y no como una
   web oscura, y cuesta un degradado repetido. */
#chat::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(53, 215, 245, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 215, 245, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

.cinta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid var(--hud-linea);
}

.marca { display: flex; align-items: center; gap: 9px; }

.logotipo {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--hud);
}

.punto {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #35f5a0;
  box-shadow: 0 0 9px #35f5a0;
}

.punto.caido { background: #ff6b6b; box-shadow: 0 0 9px #ff6b6b; }

.reloj {
  flex: 1;
  display: flex;
  gap: 11px;
  justify-content: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--hud);
}

.reloj span:last-child { color: var(--texto-tenue); }

.cinta-acciones { display: flex; gap: 6px; }

.chip {
  padding: 5px 10px;
  font-size: 12px;
  color: var(--texto-tenue);
  background: rgba(53, 215, 245, 0.05);
  border: 1px solid var(--hud-linea);
  border-radius: 6px;
  white-space: nowrap;
}

.chip:hover { color: var(--hud); border-color: var(--hud-tenue); }
#boton-voz[aria-pressed="true"] { color: var(--hud); border-color: var(--hud); }
#boton-voz[aria-pressed="false"] { opacity: 0.5; }

/* Tres columnas como la referencia; en el móvil se apilan. */
.tablero {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 250px 1fr 340px;
  gap: 12px;
  padding: 12px;
  min-height: 0;
}

.columna { display: flex; flex-direction: column; gap: 12px; min-height: 0; }

.panel {
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--hud-linea);
  border-radius: 8px;
  backdrop-filter: blur(6px);
}

.panel.crece { flex: 1; overflow-y: auto; min-height: 0; }

.panel h2 {
  margin: 0 0 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hud);
}

.dato, .medidor {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--texto-tenue);
}

.dato span { flex: 1; }
.dato b, .medidor b { color: #dff4fa; font-weight: 500; font-variant-numeric: tabular-nums; }
.medidor span { width: 32px; }
.medidor b { width: 40px; text-align: right; }

.riel {
  flex: 1;
  height: 5px;
  background: rgba(53, 215, 245, 0.12);
  border-radius: 3px;
  overflow: hidden;
}

.riel i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--hud), #7af0ff);
  box-shadow: 0 0 8px var(--hud-tenue);
  transition: width 0.6s ease-out;
}

.riel i.alto { background: linear-gradient(90deg, #ffb02e, #ff6b6b); }

.rueda { margin: 0; padding: 0; list-style: none; }

.rueda li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(53, 215, 245, 0.07);
}

.rueda .nombre { flex: 1; color: var(--texto-tenue); text-transform: capitalize; }
.rueda .barra { width: 52px; height: 4px; background: rgba(53,215,245,0.12); border-radius: 2px; overflow: hidden; }
.rueda .barra i { display: block; height: 100%; background: var(--hud); }
.rueda .puntos { width: 34px; text-align: right; color: #dff4fa; font-variant-numeric: tabular-nums; }
.rueda .sin { color: rgba(255,255,255,0.22); }

/* ---------- El reactor ---------- */

.centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 0;
}

.reactor-sitio { display: grid; place-items: center; }

.reactor {
  --energia: 0;
  position: relative;
  width: min(34vh, 300px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.anillo {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
}

/* Cada anillo deja abierto un tramo distinto: es el hueco lo que da sensación
   de mecanismo girando, no la circunferencia entera. */
.a1 { inset: 0;   border-color: var(--hud-tenue) transparent var(--hud-tenue) var(--hud); animation: gira 18s linear infinite; }
.a2 { inset: 9%;  border-color: var(--hud) transparent transparent transparent; border-width: 2px; animation: gira 7s linear infinite reverse; }
.a3 { inset: 19%; border-color: transparent var(--hud-tenue) var(--hud) transparent; animation: gira 24s linear infinite; }
.a4 { inset: 28%; border-color: var(--hud-tenue); border-style: dashed; animation: gira 40s linear infinite reverse; }

/* Las marcas radiales, con un cónico repetido en vez de sesenta elementos. */
.marcas { position: absolute; border-radius: 50%; }

.marcas.fuera {
  inset: -7%;
  background: repeating-conic-gradient(var(--hud-tenue) 0deg 0.5deg, transparent 0.5deg 5deg);
  mask: radial-gradient(circle, transparent 93%, #000 94%, #000 99%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 93%, #000 94%, #000 99%, transparent 100%);
  animation: gira 90s linear infinite;
}

.marcas.dentro {
  inset: 33%;
  background: repeating-conic-gradient(rgba(53,215,245,0.5) 0deg 1.2deg, transparent 1.2deg 9deg);
  mask: radial-gradient(circle, transparent 74%, #000 76%);
  -webkit-mask: radial-gradient(circle, transparent 74%, #000 76%);
  animation: gira 30s linear infinite reverse;
}

/* El resplandor que envuelve al núcleo y crece con la voz. */
.halo {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53,215,245,0.34) 0%, transparent 68%);
  transform: scale(calc(1 + var(--energia) * 0.45));
  transition: transform 0.14s ease-out;
  filter: blur(7px);
}

.nucleo {
  position: absolute;
  inset: 43%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #f2ffff 0%, #7febff 38%, #1b90b8 100%);
  transform: scale(calc(1 + var(--energia) * 0.2));
  transition: transform 0.12s ease-out;
  box-shadow:
    0 0 26px rgba(53, 215, 245, calc(0.55 + var(--energia) * 0.45)),
    0 0 74px rgba(53, 215, 245, calc(0.24 + var(--energia) * 0.4));
  animation: pulsar 3.4s ease-in-out infinite;
}

@keyframes gira { to { transform: rotate(360deg); } }
@keyframes pulsar { 0%,100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }

.rotulo {
  margin: 16px 0 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 19px;
  letter-spacing: 0.34em;
  color: #dff4fa;
}

.estado-reactor {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--texto-tenue);
}

/* ---------- La conversación, ahora un panel más ---------- */

.panel.conversacion {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 12px;
}

.mensajes {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 4px 2px 10px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.vacio { margin: auto; color: rgba(255,255,255,0.25); font-size: 13px; }

.burbuja {
  max-width: 88%;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.burbuja.mia {
  align-self: flex-end;
  color: #04212c;
  background: linear-gradient(135deg, #6fe4fb, #35d7f5);
}

.burbuja.suya {
  align-self: flex-start;
  background: rgba(53, 215, 245, 0.07);
  border: 1px solid var(--hud-linea);
}

.burbuja.fallo {
  align-self: center;
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
  font-size: 13px;
}

.pensando { align-self: flex-start; display: flex; gap: 5px; padding: 11px; }
.pensando span { width: 6px; height: 6px; border-radius: 50%; background: var(--hud); animation: latido 1.3s infinite; }
.pensando span:nth-child(2) { animation-delay: 0.18s; }
.pensando span:nth-child(3) { animation-delay: 0.36s; }

@keyframes latido {
  0%,60%,100% { opacity: 0.25; transform: translateY(0); }
  30%         { opacity: 1;    transform: translateY(-3px); }
}

/* La caja de escribir: adjuntos arriba, el cuadro en medio, los útiles
   abajo. En una columna de 300px no caben el cuadro y seis botones en la
   misma fila, y apilarlos es además lo que hace que el cuadro respire. */
.barra-envio {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--hud-linea);
}

#texto {
  width: 100%;
  max-height: 160px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  color: #dff4fa;
  background: rgba(53, 215, 245, 0.05);
  border: 1px solid var(--hud-linea);
  border-radius: 9px;
  outline: none;
  resize: none;
}

#texto:focus { border-color: var(--hud-tenue); }

.utiles {
  display: flex;
  align-items: center;
  gap: 4px;
}

.util {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  color: var(--texto-tenue);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

.util svg { width: 18px; height: 18px; }

.util:hover {
  color: var(--hud);
  background: rgba(53, 215, 245, 0.07);
  border-color: var(--hud-linea);
}

#boton-enviar {
  margin-left: auto;
  padding: 0 16px;
  height: 34px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #04212c;
  background: var(--hud);
  border-radius: 8px;
}

#boton-enviar:disabled { opacity: 0.35; }

/* Lo que llevas puesto antes de enviar. */
.adjuntos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adjunto-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 7px 5px 10px;
  font-size: 12px;
  color: #cfeef7;
  background: rgba(53, 215, 245, 0.08);
  border: 1px solid var(--hud-linea);
  border-radius: 7px;
}

.adjunto-chip b {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}

.adjunto-chip i { font-style: normal; color: var(--texto-tenue); font-size: 11px; }
.adjunto-chip.subiendo { opacity: 0.6; }

.adjunto-chip.enlace {
  padding-right: 10px;
  color: #9fe6c4;
  background: rgba(53, 245, 160, 0.07);
  border-color: rgba(53, 245, 160, 0.22);
}

.quitar {
  flex: none;
  width: 18px; height: 18px;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  color: var(--texto-tenue);
  background: transparent;
  border: 0;
  border-radius: 5px;
}

.quitar:hover { color: var(--error); background: rgba(255, 107, 107, 0.12); }

/* Arrastrar un archivo a cualquier punto de la conversación. */
.panel.conversacion.soltando {
  border-color: var(--hud);
  box-shadow: inset 0 0 0 1px var(--hud-tenue);
}

/* Un interruptor de los de siempre, con la etiqueta pinchable entera. */
.interruptor {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
  font-size: 13px;
  cursor: pointer;
}

.interruptor input {
  flex: none;
  width: 17px; height: 17px;
  accent-color: var(--hud);
  cursor: pointer;
}

/* Atajos */
.panel-atajos { right: 12px; }
.lista-atajos { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }

.atajo { display: flex; align-items: stretch; gap: 4px; }

.atajo-usar {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  text-align: left;
  color: var(--texto);
  background: rgba(53, 215, 245, 0.05);
  border: 1px solid var(--hud-linea);
  border-radius: 7px;
}

.atajo-usar:hover { border-color: var(--hud-tenue); }
.atajo-usar b { font-size: 13px; font-weight: 600; }

.atajo-usar span {
  font-size: 11px;
  color: var(--texto-tenue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ajustes: flotante, para no robarle sitio al tablero. */
.panel-flotante {
  position: absolute;
  right: 12px;
  top: 58px;
  z-index: 20;
  width: min(330px, calc(100vw - 24px));
  max-height: 76vh;
  overflow-y: auto;
  padding: 14px;
  background: rgba(8, 18, 28, 0.97);
  border: 1px solid var(--hud-tenue);
  border-radius: 9px;
  backdrop-filter: blur(10px);
}

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

.panel-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* En el móvil no caben tres columnas: el reactor arriba y la conversación
   debajo, con los paneles de datos en una fila que se desplaza. */
/* Solo tiene sentido en móvil: en escritorio los paneles ya están a la vista. */
#boton-datos { display: none; }

/* En el móvil, la distribución limpia de Gemini: el reactor arriba, la
   conversación debajo, y los paneles de datos escondidos tras un botón. Tres
   columnas en 375px no son un tablero, son un amontonamiento. */
@media (max-width: 900px) {
  .tablero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 0;
    padding: 0;
  }

  .izquierda {
    position: absolute;
    inset: 0 0 auto;
    z-index: 15;
    padding: 12px;
    background: rgba(5, 11, 18, 0.97);
    backdrop-filter: blur(10px);
    max-height: 100%;
    overflow-y: auto;
  }

  .izquierda:not(.abierta) { display: none; }

  .centro { padding: 22px 0 14px; gap: 0; }
  .reactor { width: min(26vh, 168px); }
  .rotulo { font-size: 15px; margin-top: 14px; letter-spacing: 0.3em; }

  .panel.conversacion {
    border: none;
    border-top: 1px solid var(--hud-linea);
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }

  .panel.conversacion h2 { display: none; }

  /* En 375px no caben logo, reloj y cinco botones en una fila. Dos filas:
     identidad arriba, acciones abajo. */
  .cinta {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    padding-bottom: 8px;
  }

  .marca { order: 1; }
  .reloj { order: 2; flex: 0 0 auto; font-size: 12px; }
  /* Seis chips no caben en 375px en una sola fila: la última se salía de la
     pantalla y «Salir» quedaba a medio cortar. */
  .cinta-acciones { order: 3; flex: 1 0 100%; justify-content: center; flex-wrap: wrap; }
  .cinta-acciones .chip { padding: 6px 11px; font-size: 12px; }

  /* El botón que despliega los paneles: solo existe en móvil. */
  #boton-datos { display: inline-block; }
}


@media (prefers-reduced-motion: reduce) {
  .anillo, .marcas, .nucleo, .halo { animation: none; }
}

/* ---------- Passkeys ---------- */

.boton-passkey {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 22px;
  padding: 13px;
  font-size: 16px;
  font-weight: 500;
  color: var(--texto);
  background: var(--superficie-alta);
  border: 1px solid var(--borde);
}

.boton-passkey:hover { border-color: var(--acento); }
.boton-passkey:disabled { opacity: 0.5; cursor: default; }

.icono-cara {
  width: 21px;
  height: 21px;
  color: var(--acento);
  flex: none;
}

.separador {
  position: relative;
  margin-bottom: 20px;
  text-align: center;
}

.separador::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  border-top: 1px solid var(--borde);
}

.separador span {
  position: relative;
  padding: 0 12px;
  font-size: 13px;
  color: var(--texto-tenue);
  background: var(--fondo);
}

/* Panel de gestión dentro del chat */
.panel {
  padding: 16px;
  border-top: 1px solid var(--borde);
  background: var(--superficie);
}

.panel-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.panel-nota { margin: 0 0 14px; font-size: 13px; color: var(--texto-tenue); }

.lista-passkeys { margin: 0 0 14px; padding: 0; list-style: none; }

.lista-passkeys li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--borde);
  font-size: 14px;
}

.lista-passkeys .nombre { flex: 1; }
.lista-passkeys .cuando { font-size: 12px; color: var(--texto-tenue); }

.boton-secundario {
  width: 100%;
  padding: 11px;
  font-size: 15px;
  color: #fff;
  background: var(--acento);
}

.boton-secundario:disabled { opacity: 0.5; cursor: default; }

.boton-borrar {
  padding: 5px 10px;
  font-size: 12px;
  color: var(--error);
  background: transparent;
  border: 1px solid var(--error);
  border-radius: 8px;
}

/* ---------- Reposo ---------- */

#reposo {
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 26px;
  overflow: hidden;
  background: var(--fondo-mando);
}

/* El resplandor del borde inferior. Es lo que da sensación de que hay algo
   encendido detrás de la pantalla, y cuesta un solo degradado. */
.resplandor {
  position: absolute;
  left: 50%;
  bottom: -34vh;
  width: 150vw;
  height: 62vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(53, 215, 245, 0.26) 0%,
    rgba(30, 140, 180, 0.10) 38%,
    transparent 70%);
  filter: blur(34px);
  pointer-events: none;
}

.reactor.grande { width: min(62vw, 250px); }

.reposo-estado {
  position: relative;
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 15px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hud);
  text-align: center;
}

.reposo-pista {
  position: relative;
  margin: 12px 0 0;
  min-height: 20px;
  font-size: 14px;
  color: var(--texto-tenue);
  text-align: center;
  padding: 0 28px;
}

/* Botones redondos, como en las referencias. */
/* El botón principal centrado en la pantalla, y el secundario a su lado sin
   descentrarlo. Con un flex normal, el más grande arrastra el centro. */
.barra-reposo {
  position: absolute;
  bottom: calc(44px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
}

.barra-reposo #saltar-voz {
  position: absolute;
  right: calc(100% + 26px);
}

.redondo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--texto-tenue);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.redondo svg { width: 21px; height: 21px; }

.redondo:hover { color: var(--texto); border-color: rgba(255, 255, 255, 0.4); }

.redondo.grande {
  width: 62px;
  height: 62px;
  color: var(--texto);
  border-color: rgba(255, 255, 255, 0.3);
}

.redondo.grande svg { width: 26px; height: 26px; }
.redondo.grande:hover { background: rgba(255, 255, 255, 0.07); }
.redondo[hidden] { display: none; }

#entrada.apareciendo { animation: aparecer 0.7s ease-out; }

@keyframes aparecer {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .esfera, .esfera-nube, .esfera-luz { animation: none; }
  #entrada.apareciendo { animation: none; }
}

/* ---------- Ajustes: voz ---------- */

.etiqueta-panel {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--texto-tenue);
}

.titulo-panel { display: block; margin-bottom: 8px; }

.selector {
  width: 100%;
  padding: 10px 13px;
  font: inherit;
  font-size: 16px;
  color: var(--texto);
  background: var(--superficie-alta);
  border: 1px solid var(--borde);
  border-radius: 11px;
  outline: none;
}

.boton-suave {
  margin-top: 9px;
  color: var(--texto);
  background: var(--superficie-alta);
  border: 1px solid var(--borde);
}

.boton-suave:hover { border-color: var(--acento); }

.separador-panel {
  margin: 18px 0;
  border: none;
  border-top: 1px solid var(--borde);
}

/* El botón de voz encendido se distingue de un vistazo. */
#boton-voz[aria-pressed="true"] {
  color: var(--acento);
  border-color: var(--acento);
}

#boton-voz[aria-pressed="false"] { opacity: 0.55; }

/* ---------- Archivos del vault ---------- */

.enlace-archivo {
  color: var(--acento);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.adjunto {
  display: block;
  max-width: 100%;
  margin: 9px 0 3px;
  border-radius: 11px;
}

audio.adjunto { width: 100%; }

/* ---------- Aviso de versión nueva ---------- */

.aviso-version {
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  color: #fff;
  background: var(--acento);
  border: none;
  border-radius: 0;
  text-align: center;
}

.aviso-version[hidden] { display: none; }

/* Cuando ha oído la palabra y espera la orden. */
.reactor.despierta .nucleo {
  background: radial-gradient(circle at 50% 40%, #fff 0%, #9dffd8 38%, #14a07a 100%);
  box-shadow: 0 0 34px rgba(53, 245, 160, 0.7), 0 0 90px rgba(53, 245, 160, 0.35);
}

.reactor.despierta .anillo { border-color: rgba(53, 245, 160, 0.5) transparent; }

#boton-escucha[aria-pressed="true"] { color: #35f5a0; border-color: #35f5a0; }
#boton-escucha[aria-pressed="false"] { opacity: 0.5; }

.aviso-cinta {
  font-size: 11.5px;
  color: #ffb02e;
  white-space: nowrap;
}

#boton-microfono.oyendo {
  color: #35f5a0;
  border-color: #35f5a0;
  animation: latiendo 1.1s ease-in-out infinite;
}

@keyframes latiendo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 245, 160, 0.4); }
  50%      { box-shadow: 0 0 0 7px rgba(53, 245, 160, 0); }
}
