/* Ayuda de Cassius y Aurelia. No es el chat de la mesa. */

.bot-romano {
  position: fixed;
  right: 0.75rem;
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  width: max-content;
  max-width: min(22rem, calc(100vw - 1.2rem));
  pointer-events: none;
  color: var(--c-tinta, #f1eadc);
  font-family: var(--f-sans, "Segoe UI", sans-serif);
  font-size: 0.92rem;
  line-height: 1.35;
  user-select: text;
  -webkit-user-select: text;
}

.bot-romano[hidden] {
  display: none !important;
}

/* En la partida el bot vive dentro de .board-wrap, arriba a la derecha. */

.board-wrap > .bot-romano,
.board-wrap.is-fs > .bot-romano,
.board-wrap:fullscreen > .bot-romano,
.board-wrap:-webkit-full-screen > .bot-romano {
  z-index: 5;
}

button.bot-romano-abrir,
button.bot-romano-cerrar,
button.bot-romano-persona,
button.bot-romano-enviar,
button.bot-romano-reiniciar,
button.bot-romano-voz,
button.bot-romano-pergamino,
button.bot-romano-sugerencia-inicio,
.bot-romano-confirma button,
button.bot-romano-abrir:hover,
button.bot-romano-cerrar:hover,
button.bot-romano-persona:hover,
button.bot-romano-enviar:hover,
button.bot-romano-reiniciar:hover,
button.bot-romano-voz:hover,
button.bot-romano-abrir:focus,
button.bot-romano-cerrar:focus,
button.bot-romano-persona:focus,
button.bot-romano-enviar:focus,
button.bot-romano-reiniciar:focus,
button.bot-romano-voz:focus,
button.bot-romano-abrir:focus-visible,
button.bot-romano-cerrar:focus-visible,
button.bot-romano-persona:focus-visible,
button.bot-romano-enviar:focus-visible,
button.bot-romano-reiniciar:focus-visible,
button.bot-romano-voz:focus-visible {
  appearance: none;
  margin: 0;
  filter: none;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}

.bot-romano-abrir,
.bot-romano-panel,
.bot-romano-cerrar,
.bot-romano-persona,
.bot-romano-enviar,
.bot-romano-reiniciar,
.bot-romano-voz,
.bot-romano-pergamino,
.bot-romano-sugerencia-inicio,
.bot-romano-confirma button,
.bot-romano-form input,
.bot-romano-form textarea,
.bot-romano-accion,
.bot-romano-tutor,
.bot-romano-ir,
.bot-romano-reintentar {
  pointer-events: auto;
}

.bot-romano-accion {
  margin: 0 0 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.bot-romano-foto {
  display: block;
  width: 100%;
  max-height: 11rem;
  object-fit: cover;
  border-radius: 0.35rem;
}

.bot-romano-pie {
  margin: 0;
  font-size: 0.78rem;
  color: var(--c-tinta-suave, #b7b2a6);
}

a.bot-romano-reintentar {
  color: var(--c-mar, #68a3b0);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.bot-romano-ir {
  display: inline-block;
  border: 1px solid var(--c-oro, #d6a95c);
  background: var(--c-papel-oscuro, #17232b);
  color: var(--c-tinta, #f1eadc);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.bot-romano-ficha {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(44, 36, 27, 0.45);
}

.bot-romano-ficha[hidden] {
  display: none;
}

.bot-romano-ficha-caja {
  position: relative;
  width: min(36rem, 100%);
  max-height: min(80vh, 40rem);
  overflow: auto;
  padding: 1.4rem 1.2rem 1.1rem;
  background: var(--c-papel-claro, #11191f);
  color: var(--c-tinta, #f1eadc);
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
  border-radius: 0.6rem;
  box-shadow: 0 16px 40px rgba(44, 36, 27, 0.28);
}

.bot-romano-ficha-caja h2 {
  margin: 0 2.5rem 0.35rem 0;
  font-size: 1.35rem;
}

.bot-romano-ficha-sub {
  margin: 0 0 0.6rem;
  color: var(--c-tinta-suave, #b7b2a6);
}

.bot-romano-ficha-caja h3 {
  margin: 0.8rem 0 0.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bot-romano-ficha-caja p,
.bot-romano-ficha-caja li {
  margin: 0.15rem 0;
  line-height: 1.4;
}

.bot-romano-ficha-caja ul {
  margin: 0;
  padding-left: 1.1rem;
}

.bot-romano-ficha-caja a {
  color: var(--c-mar, #68a3b0);
}

.bot-romano-tutor[hidden] {
  display: none !important;
}

.bot-romano-tutor {
  pointer-events: auto;
  max-width: 19rem;
  padding: 0.6rem 0.75rem;
  background: var(--c-papel-claro, #11191f);
  color: var(--c-tinta, #f1eadc);
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
  border-radius: var(--radio, 4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.62);
}

.bot-romano-tutor p {
  margin: 0 0 0.4rem;
}

.bot-romano-tutor-meta {
  font-size: 0.9em;
  color: var(--c-tinta-suave, #d5cdb9);
}

.bot-romano-tutor-meta[hidden] {
  display: none;
}

.bot-romano-tutor-botones {
  display: flex;
  gap: 0.35rem;
}

button.bot-romano-abrir {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
  border-radius: 50%;
  background: var(--c-papel-claro, #11191f);
  color: var(--c-tinta, #f1eadc);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

button.bot-romano-abrir .bot-romano-cara {
  width: 4.35rem;
  height: 4.35rem;
  margin: 0;
  flex: none;
}

button.bot-romano-abrir:hover,
button.bot-romano-abrir:focus-visible {
  border-color: var(--c-oro, #d6a95c);
  background: var(--c-papel-oscuro, #17232b);
}

button.bot-romano-abrir[hidden],
button.bot-romano-pergamino[hidden],
.bot-romano-panel[hidden] {
  display: none !important;
}


.bot-romano-panel {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(22rem, calc(100vw - 1.2rem));
  min-height: 0;
  max-height: min(30rem, calc(100vh - 8rem));
  overflow: hidden;
  padding: 0.7rem 0.75rem 0.65rem;
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
  border-radius: var(--radio, 4px);
  background: var(--c-papel-claro, #11191f);
  color: var(--c-tinta, #f1eadc);
  box-shadow: inset 4px 0 0 var(--c-terracota, #b83b24), 0 14px 36px rgba(0, 0, 0, 0.55);
}

.bot-romano-cabecera {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.bot-romano-cabecera-der {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bot-romano-cabecera-sup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.bot-romano-controles {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: none;
}

button.bot-romano-pergamino,
button.bot-romano-reiniciar,
button.bot-romano-voz {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0.22rem;
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.4));
  border-radius: var(--radio, 4px);
  background: transparent;
  color: var(--c-tinta, #f1eadc);
  cursor: pointer;
}

button.bot-romano-pergamino svg,
button.bot-romano-reiniciar svg,
button.bot-romano-voz svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

button.bot-romano-pergamino[aria-pressed="true"],
button.bot-romano-voz[aria-pressed="true"],
button.bot-romano-reiniciar[aria-expanded="true"] {
  border-color: var(--c-oro, #d6a95c);
  background: rgba(214, 169, 92, 0.14);
  color: var(--c-oro, #d6a95c);
}

button.bot-romano-pergamino[aria-pressed="true"] .bot-romano-pergamino-silencio {
  display: none;
}

button.bot-romano-pergamino[aria-pressed="false"],
button.bot-romano-voz[aria-pressed="false"] {
  opacity: 0.78;
}

button.bot-romano-pergamino[aria-pressed="false"] .bot-romano-pergamino-onda {
  display: none;
}

button.bot-romano-voz .mute-ico[hidden],
button.bot-romano-voz[aria-pressed="true"] .mute-off,
button.bot-romano-voz[aria-pressed="false"] .mute-on {
  display: none;
}

button.bot-romano-reiniciar:disabled {
  opacity: 0.45;
  cursor: default;
}

.bot-romano-titulo {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: var(--f-serif, Georgia, serif);
  font-size: 1.18rem;
  font-weight: 650;
  line-height: 1.1;
}

button.bot-romano-cerrar {
  flex: none;
  min-width: 40px;
  min-height: 40px;
  padding: 0.2rem;
  border: 0;
  background: transparent;
  color: var(--c-mar, #68a3b0);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

button.bot-romano-cerrar:hover,
button.bot-romano-cerrar:focus-visible {
  color: var(--c-oro, #d6a95c);
}

.bot-romano-personas {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  margin: 0;
}

button.bot-romano-persona {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  min-height: 2.15rem;
  padding: 0.22rem 0.45rem;
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.38));
  border-radius: 999px;
  background: transparent;
  color: var(--c-tinta, #f1eadc);
  font: 600 0.8rem / 1.15 var(--f-sans, "Segoe UI", sans-serif);
  white-space: nowrap;
}

.bot-romano-persona-marco {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  border: 1px solid rgba(214, 169, 92, 0.35);
}

.bot-romano-persona-mini {
  display: block;
  width: 112%;
  height: 112%;
  max-width: none;
  flex: none;
  position: relative;
  top: -3%;
  object-fit: cover;
  object-position: center;
}

.bot-romano-persona-marco[data-persona="aurelia"] .bot-romano-persona-mini {
  width: 126%;
  height: 126%;
  top: -13%;
}

button.bot-romano-persona[aria-pressed="true"] {
  border-color: var(--c-oro, #d6a95c);
  background: rgba(214, 169, 92, 0.18);
  color: var(--c-oro, #d6a95c);
  box-shadow: inset 0 0 0 1px rgba(214, 169, 92, 0.35);
}

button.bot-romano-persona[aria-pressed="true"] .bot-romano-persona-marco {
  border-color: var(--c-oro, #d6a95c);
}

.bot-romano-confirma[hidden] {
  display: none !important;
}

.bot-romano-confirma {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
  margin: 0.45rem 0 0.15rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(214, 169, 92, 0.45);
  border-radius: var(--radio, 4px);
  background: rgba(214, 169, 92, 0.1);
  color: var(--c-tinta, #f1eadc);
  font-size: 0.82rem;
}

.bot-romano-confirma-acciones {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.bot-romano-confirma button {
  padding: 0.25rem 0.55rem;
  border-radius: var(--radio, 4px);
  font: 600 0.78rem / 1.2 var(--f-sans, "Segoe UI", sans-serif);
}

button.bot-romano-confirma-si {
  border: 1px solid var(--c-terracota, #b83b24);
  background: var(--c-terracota, #b83b24);
  color: var(--c-sobre-acento, #fffaf2);
}

button.bot-romano-confirma-no {
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.4));
  background: transparent;
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-log {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0.45rem 0 0.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-sugerencias-inicio {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.15rem 0 0.45rem;
}

button.bot-romano-sugerencia-inicio {
  padding: 0.32rem 0.6rem;
  border: 1px solid rgba(214, 169, 92, 0.45);
  border-radius: 999px;
  background: rgba(214, 169, 92, 0.08);
  color: var(--c-tinta, #f1eadc);
  font: 500 0.8rem / 1.25 var(--f-sans, "Segoe UI", sans-serif);
  text-align: left;
}

button.bot-romano-sugerencia-inicio:hover,
button.bot-romano-sugerencia-inicio:focus-visible {
  border-color: var(--c-oro, #d6a95c);
  background: rgba(214, 169, 92, 0.18);
  color: var(--c-oro, #d6a95c);
}

.bot-romano-burbuja {
  margin: 0 0 0.4rem;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radio, 4px);
  color: var(--c-tinta, #f1eadc);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bot-romano-burbuja-user {
  background: rgba(104, 163, 176, 0.16);
}

.bot-romano-burbuja-bot {
  background: var(--c-papel-oscuro, #17232b);
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-nota {
  margin: 0 0 0.4rem;
  color: var(--c-mar, #68a3b0);
  font-size: 0.82rem;
}

.bot-romano-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}

.bot-romano-form input,
.bot-romano-form textarea {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.4));
  border-radius: var(--radio, 4px);
  background: var(--c-papel, #090e12);
  color: var(--c-tinta, #f1eadc);
  font: inherit;
  line-height: 1.35;
}

.bot-romano .bot-romano-panel .bot-romano-form textarea.bot-romano-campo {
  resize: none;
  min-height: 2.35rem;
  max-height: 6.4rem;
  height: auto;
  padding: 0.42rem 0.55rem;
  line-height: 1.35;
  overflow-y: auto;
  box-sizing: border-box;
}

.bot-romano-form input:focus,
.bot-romano-form textarea:focus {
  outline: 2px solid var(--c-foco, #68a3b0);
  outline-offset: 1px;
}

button.bot-romano-enviar {
  flex: none;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--c-terracota, #b83b24);
  border-radius: var(--radio, 4px);
  background: var(--c-terracota, #b83b24);
  color: var(--c-sobre-acento, #fffaf2);
  font: 650 0.82rem / 1.2 var(--f-sans, "Segoe UI", sans-serif);
}

button.bot-romano-enviar:disabled,
button.bot-romano-persona:disabled,
.bot-romano-form input:disabled,
.bot-romano-form input[aria-disabled="true"],
.bot-romano-form textarea:disabled,
.bot-romano-form textarea[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
}

.bot-romano-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bot-romano-cara {
  display: block;
  width: 5.6rem;
  height: auto;
  flex: none;
}

.bot-romano-torso {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: bot-romano-respira 3.8s ease-in-out infinite;
}

.bot-romano-manto,
.bot-romano-piel,
.bot-romano-pelo,
.bot-romano-cejas path,
.bot-romano-parpado {
  transition: transform 180ms ease, fill 180ms ease;
}

.bot-romano[data-persona="cassius"] .bot-romano-manto { fill: #8f4a34; }
.bot-romano[data-persona="aurelia"] .bot-romano-manto { fill: #2a4e57; }
.bot-romano-manto { stroke: #2c241b; stroke-width: 1.6; }
.bot-romano-piel,
.bot-romano-oreja { fill: #e4c4a4; }
.bot-romano-oreja { stroke: #2c241b; stroke-width: 1.2; }
.bot-romano-cuello { stroke: none; }
.bot-romano-pliegue {
  fill: none;
  stroke: rgba(44, 36, 27, 0.45);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.bot-romano-fibula { fill: #d9c6a6; stroke: #2c241b; stroke-width: 1; }
.bot-romano[data-persona="cassius"] .bot-romano-pelo-a,
.bot-romano[data-persona="cassius"] .ceja-a { display: none; }
.bot-romano[data-persona="aurelia"] .bot-romano-pelo-c,
.bot-romano[data-persona="aurelia"] .bot-romano-barba,
.bot-romano[data-persona="aurelia"] .ceja-c { display: none; }
.bot-romano[data-persona="cassius"] .bot-romano-pelo { fill: #3a2a1c; }
.bot-romano[data-persona="aurelia"] .bot-romano-pelo { fill: #6a3828; }
.bot-romano-diadema {
  fill: none;
  stroke: #d9c6a6;
  stroke-width: 2;
  stroke-linecap: round;
}
.bot-romano-nariz { fill: #c4a07a; stroke: none; }
.bot-romano-cejas path {
  fill: none;
  stroke: #2c241b;
  stroke-width: 1.7;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
}
.bot-romano[data-persona="aurelia"] .bot-romano-cejas path {
  stroke-width: 1.15;
}
.bot-romano-ojos .blanco { fill: #f6efe4; stroke: #2c241b; stroke-width: 1.1; }
.bot-romano-ojos .iris { fill: #2c241b; }
.bot-romano-ojos .brillo { fill: #f6efe4; }
.bot-romano-parpado {
  fill: #e4c4a4;
  stroke: #2c241b;
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center top;
  transform: scaleY(0.04);
}
.bot-romano.is-parpadeo .bot-romano-parpado { transform: scaleY(1); }
.bot-romano-bocas .boca { display: none; fill: none; stroke: #2c241b; stroke-width: 2.2; stroke-linecap: round; }
.bot-romano[data-expr="idle"] .boca-idle,
.bot-romano[data-expr="happy"] .boca-happy,
.bot-romano[data-expr="worried"] .boca-worried,
.bot-romano[data-expr="serious"] .boca-worried,
.bot-romano[data-expr="surprise"] .boca-surprise,
.bot-romano[data-expr="thinking"] .boca-thinking { display: block; }
.bot-romano[data-expr="surprise"] .boca-surprise { fill: #6a3828; }
.bot-romano[data-expr="talking"][data-boca="0"] .boca-h0,
.bot-romano[data-expr="talking"][data-boca="1"] .boca-h1,
.bot-romano[data-expr="talking"][data-boca="2"] .boca-h2 { display: block; }

.bot-romano[data-expr="thinking"] .bot-romano-parpado { transform: scaleY(0.58); }
.bot-romano[data-expr="thinking"].is-parpadeo .bot-romano-parpado { transform: scaleY(1); }
.bot-romano[data-expr="happy"] .bot-romano-cejas path { transform: translateY(-2px); }
.bot-romano[data-expr="surprise"] .bot-romano-cejas path { transform: translateY(-6px); }
.bot-romano[data-expr="worried"] .ceja-i,
.bot-romano[data-expr="serious"] .ceja-i { transform: rotate(14deg); }
.bot-romano[data-expr="worried"] .ceja-d,
.bot-romano[data-expr="serious"] .ceja-d { transform: rotate(-14deg); }
.bot-romano[data-expr="thinking"] .iris { transform: translateY(-1.5px); }

@keyframes bot-romano-respira {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1.6px); }
}

.board-wrap > .bot-romano {
  position: absolute;
  top: 4.2rem;
  top: max(4.2rem, calc(var(--tools-bajo, 3.2rem) + 0.45rem));
  right: 0.65rem;
  bottom: auto;
  left: auto;
  flex-direction: column-reverse;
  z-index: 8;
  max-width: min(17.5rem, 40vw);
  max-height: calc(100% - 4.7rem);
  color: var(--c-tinta, #f1eadc);
  -webkit-user-select: text;
  user-select: text;
}

.board-wrap > .bot-romano button.bot-romano-abrir {
  width: 3.65rem;
  height: 3.65rem;
}

.board-wrap > .bot-romano button.bot-romano-abrir .bot-romano-cara {
  width: 3.15rem;
  height: 3.15rem;
}

.board-wrap > .bot-romano .bot-romano-tutor {
  max-width: min(17.5rem, calc(100vw - 24rem));
}

.board-wrap:has(.chat-sala.abierto) > .bot-romano .bot-romano-tutor,
.bot-romano:has(.bot-romano-panel:not([hidden])) .bot-romano-tutor {
  display: none;
}

.board-wrap > .bot-romano .bot-romano-panel {
  width: min(23rem, 46vw);
  max-height: min(32rem, calc(100vh - 8.5rem));
  max-height: min(32rem, calc(100dvh - 8.5rem));
  touch-action: pan-y;
  background: var(--c-papel-claro, #11191f);
  color: var(--c-tinta, #f1eadc);
}

.board-wrap > .bot-romano .bot-romano-log {
  min-height: 0;
  color: var(--c-tinta, #f1eadc);
}

.board-wrap > .bot-romano,
.board-wrap > .bot-romano * {
  -webkit-user-select: text;
  user-select: text;
}

.board-wrap > .bot-romano ::selection,
.board-wrap > .bot-romano *::selection {
  background: rgba(143, 74, 52, 0.28);
}

@media (max-width: 820px) {
  .board-wrap > .bot-romano {
    top: 6.5rem;
    top: max(6.5rem, calc(var(--tools-bajo, 3.2rem) + 0.5rem));
    max-width: min(12.5rem, 46vw);
    max-height: min(28rem, 70%);
  }

  .board-wrap > .bot-romano .bot-romano-panel {
    width: min(21rem, 58vw);
    max-height: min(28rem, calc(100dvh - 8rem));
    padding: 0.55rem 0.55rem 0.5rem;
  }

  .board-wrap > .bot-romano .bot-romano-log {
    min-height: 0;
  }

  .board-wrap > .bot-romano .bot-romano-cabecera {
    gap: 0.4rem;
  }

  .board-wrap > .bot-romano .bot-romano-titulo {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.05rem;
  }

  .board-wrap > .bot-romano button.bot-romano-cerrar {
    padding: 0.1rem 0.15rem;
  }

  .bot-romano-cara {
    width: 4rem;
  }

  .board-wrap > .bot-romano button.bot-romano-abrir {
    width: 3.4rem;
    height: 3.4rem;
  }

  .board-wrap > .bot-romano button.bot-romano-abrir .bot-romano-cara {
    width: 2.95rem;
    height: 2.95rem;
    margin: 0;
  }

  .board-wrap > .bot-romano .bot-romano-tutor {
    max-width: min(16.5rem, 54vw);
  }
}

@media (max-width: 768px) {
  body > .bot-romano {
    right: 0.55rem;
    bottom: 0.5rem;
  }

  button.bot-romano-abrir {
    width: 3.1rem;
    height: 3.1rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  button.bot-romano-abrir .bot-romano-cara {
    width: 2.7rem;
    height: 2.7rem;
  }

  button.bot-romano-abrir.bot-romano-oculto {
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bot-romano-torso,
  .bot-romano-manto,
  .bot-romano-piel,
  .bot-romano-pelo,
  .bot-romano-parpado,
  .bot-romano-cejas path,
  .bot-romano-bocas .boca {
    transition: none;
    animation: none;
  }

  .bot-romano.is-parpadeo .bot-romano-parpado {
    transform: scaleY(0.04);
  }
}

/* 7 oct 2026: ventana del bot mas alta. Siempre con tope en vh/dvh para no tapar el mapa. */

.bot-romano {
  max-width: min(26rem, calc(100vw - 1.2rem));
}

.bot-romano-panel {
  width: min(26rem, calc(100vw - 1.2rem));
  max-height: min(38rem, calc(100vh - 2.2rem));
  max-height: min(38rem, calc(100dvh - 2.2rem));
}

.bot-romano-log {
  min-height: 0;
}

.board-wrap > .bot-romano {
  max-width: min(23rem, 46vw);
}

.board-wrap > .bot-romano .bot-romano-panel {
  width: min(23rem, 46vw);
  max-height: min(32rem, calc(100vh - 9.5rem));
  max-height: min(32rem, calc(100dvh - 9.5rem));
}

.board-wrap > .bot-romano .bot-romano-log {
  min-height: 0;
}

@media (max-width: 820px) {
  .board-wrap > .bot-romano {
    max-width: min(21rem, 58vw);
  }

  .board-wrap > .bot-romano .bot-romano-panel {
    width: min(21rem, 58vw);
    max-height: min(28rem, calc(100dvh - 8rem));
  }

  .board-wrap > .bot-romano .bot-romano-log {
    min-height: 0;
  }
}

.visor > .bot-romano,
body:has(.visor:not([hidden])) .bot-romano {
  top: var(--visor-top, 4.8rem);
  right: 0.6rem;
  bottom: auto;
  left: auto;
  z-index: 270;
}

.visor > .bot-romano button.bot-romano-abrir.bot-romano-oculto,
body:has(.visor:not([hidden])) button.bot-romano-abrir.bot-romano-oculto {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.visor > .bot-romano .bot-romano-panel,
body:has(.visor:not([hidden])) .bot-romano-panel {
  z-index: 275;
}

/* Movil: casi pantalla completa mientras esta abierto; se cierra con Cerrar o Escape. */
@media (max-width: 600px) {
  .bot-romano:has(.bot-romano-panel:not([hidden])),
  .board-wrap > .bot-romano:has(.bot-romano-panel:not([hidden])) {
    z-index: 65;
  }

  .bot-romano-panel,
  .bot-romano-panel.gesto-panel,
  .board-wrap > .bot-romano .bot-romano-panel,
  .board-wrap > .bot-romano .bot-romano-panel.gesto-panel {
    position: fixed;
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    right: 0.5rem;
    bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    left: 0.5rem;
    z-index: 60;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    pointer-events: auto;
  }

  .bot-romano-log,
  .board-wrap > .bot-romano .bot-romano-log {
    min-height: 0;
  }

  .visor > .bot-romano .bot-romano-panel,
  body:has(.visor:not([hidden])) .bot-romano-panel {
    z-index: 275;
  }
}

/* En estrecho el retrato del bot tapaba Opciones (columna derecha). */
@media (max-width: 420px) {
  .board-wrap > .bot-romano {
    top: auto;
    right: auto;
    left: 0.45rem;
    bottom: 7.4rem;
    justify-items: start;
    z-index: 6;
  }

  .board-wrap > .bot-romano .bot-romano-panel,
  .board-wrap > .bot-romano button.bot-romano-abrir {
    justify-self: start;
    align-self: end;
  }

  .board-wrap > .bot-romano .bot-romano-panel.gesto-panel {
    transform-origin: left bottom;
  }
}

/* Emojis en el cuadro del bot (mismo catalogo que el chat de rivales IA). */

.bot-romano-form {
  position: relative;
}

button.bot-romano-emoji-abrir {
  flex: none;
  width: 2.1rem;
  padding: 0.2rem;
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.4));
  border-radius: var(--radio, 4px);
  background: transparent;
  color: var(--c-tinta, #f1eadc);
}

button.bot-romano-emoji-abrir svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

button.bot-romano-emoji-abrir circle:not(:first-child) {
  fill: currentColor;
  stroke: none;
}

button.bot-romano-emoji-abrir:hover,
button.bot-romano-emoji-abrir:focus-visible,
button.bot-romano-emoji-abrir[aria-expanded="true"] {
  border-color: var(--c-oro, #d6a95c);
  color: var(--c-oro, #d6a95c);
}

button.bot-romano-emoji-abrir[hidden],
.bot-romano-emoji-rejilla[hidden],
.bot-romano-sugerencias[hidden] {
  display: none !important;
}

.bot-romano-emoji-rejilla,
.bot-romano-sugerencias {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.3rem);
  left: 0;
  z-index: 3;
  max-height: 11rem;
  overflow: auto;
  padding: 0.3rem;
  border: 1px solid var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
  border-radius: var(--radio, 4px);
  background: var(--c-papel-claro, #11191f);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.bot-romano-emoji-rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));
  gap: 0.15rem;
}

button.bot-romano-emoji-celda,
button.bot-romano-sugerencia {
  padding: 0.2rem;
  border: 0;
  border-radius: var(--radio, 4px);
  background: transparent;
  color: var(--c-tinta, #f1eadc);
  font-size: 1.15rem;
  line-height: 1.2;
}

button.bot-romano-sugerencia {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
}

button.bot-romano-emoji-celda:hover,
button.bot-romano-emoji-celda:focus-visible,
button.bot-romano-sugerencia:hover,
button.bot-romano-sugerencia:focus-visible,
button.bot-romano-sugerencia.activa {
  background: rgba(214, 169, 92, 0.16);
}

/* 7 oct 2026 (fab2): cara entera dentro del circulo y emoji en la fila del campo. */

button.bot-romano-abrir {
  overflow: visible;
  border-radius: 50%;
  clip-path: none;
  isolation: isolate;
}

.bot-romano-abrir-marco {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
}

.bot-romano-insignia {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.3rem;
  box-sizing: border-box;
  border: 1.5px solid var(--c-sobre-acento, #fffaf2);
  border-radius: 999px;
  background: #c62828;
  color: #ffffff;
  font: 700 0.78rem / 1 var(--f-sans, "Segoe UI", sans-serif);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.bot-romano-insignia[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .bot-romano-insignia {
    min-width: 1.18rem;
    height: 1.18rem;
    padding: 0 0.22rem;
    font-size: 0.68rem;
  }
}

@keyframes bot-romano-destello {
  0% {
    border-color: var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
    box-shadow: 0 0 0 0 rgba(214, 169, 92, 0.8), 0 6px 20px rgba(0, 0, 0, 0.45);
  }
  32% {
    border-color: var(--c-oro, #d6a95c);
    box-shadow: 0 0 0 6px rgba(214, 169, 92, 0.45), 0 0 20px rgba(214, 169, 92, 0.75), 0 6px 20px rgba(0, 0, 0, 0.45);
  }
  100% {
    border-color: var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
    box-shadow: 0 0 0 11px rgba(214, 169, 92, 0), 0 6px 20px rgba(0, 0, 0, 0.45);
  }
}

@keyframes bot-romano-destello-marco {
  0% {
    filter: brightness(1);
  }
  32% {
    filter: brightness(1.42) contrast(1.06);
  }
  100% {
    filter: brightness(1);
  }
}

button.bot-romano-abrir.is-destello {
  animation: bot-romano-destello 680ms ease-out 1;
}

button.bot-romano-abrir.is-destello .bot-romano-abrir-marco {
  animation: bot-romano-destello-marco 680ms ease-out 1;
}

button.bot-romano-abrir .bot-romano-cara,
button.bot-romano-abrir .bot-romano-cara-fab {
  display: block;
  width: 86%;
  height: 86%;
  max-width: none;
  margin: 0;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
}

.bot-romano-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-auto-rows: auto;
  column-gap: 0.35rem;
  row-gap: 0.4rem;
  align-items: end;
  flex: none;
}

.bot-romano-form input,
.bot-romano-form textarea {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.bot-romano .bot-romano-panel .bot-romano-form button.bot-romano-emoji-abrir {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  min-height: 2.35rem;
  max-height: 2.35rem;
  margin: 0;
  box-sizing: border-box;
}

.bot-romano-form button.bot-romano-enviar {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  box-sizing: border-box;
}

.bot-romano-form button.bot-romano-emoji-abrir[hidden] {
  display: none !important;
}

.bot-romano-form button.bot-romano-emoji-abrir[hidden] ~ button.bot-romano-enviar {
  grid-column: 1 / -1;
}

/* El panel y el boton comparten celda: al abrirse no salta de sitio. */

.bot-romano {
  display: grid;
  justify-items: end;
  align-items: end;
}

.bot-romano-panel,
button.bot-romano-abrir {
  grid-area: 1 / 1;
}

.board-wrap > .bot-romano {
  align-items: start;
  justify-items: end;
}

.board-wrap > .bot-romano .bot-romano-panel,
.board-wrap > .bot-romano button.bot-romano-abrir {
  align-self: start;
  justify-self: end;
}

.bot-romano-panel.gesto-panel,
button.bot-romano-abrir.gesto-panel,
.bot-romano-emoji-rejilla.gesto-panel,
.bot-romano-sugerencias.gesto-panel {
  transition:
    opacity var(--gesto-ms, 250ms) cubic-bezier(.2, .8, .2, 1),
    transform var(--gesto-ms, 250ms) cubic-bezier(.2, .8, .2, 1);
}

.bot-romano-panel.gesto-panel {
  z-index: 1;
  transform-origin: right bottom;
}

.board-wrap > .bot-romano .bot-romano-panel.gesto-panel {
  transform-origin: right top;
}

.bot-romano-panel.gesto-panel:not(.gesto-abierto) {
  opacity: 0;
  transform: translateY(12px) scale(0.92);
  pointer-events: none;
}

.board-wrap > .bot-romano .bot-romano-panel.gesto-panel:not(.gesto-abierto) {
  transform: translateY(-12px) scale(0.92);
}

button.bot-romano-abrir.gesto-panel {
  z-index: 2;
  transform-origin: center center;
}

button.bot-romano-abrir.gesto-panel:not(.gesto-abierto) {
  opacity: 0;
  transform: scale(0.84);
  pointer-events: none;
}

.gesto-fundido.gesto-panel:not(.gesto-abierto) {
  opacity: 0;
  transform: none;
  pointer-events: none;
}

.bot-romano-escribiendo {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bot-romano-puntos {
  display: inline-flex;
  gap: 0.18rem;
}

.bot-romano-puntos i,
.chat-escribiendo-puntos i {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: currentColor;
  animation: bot-punto 1s ease-in-out infinite;
}

.bot-romano-puntos i:nth-child(2) { animation-delay: 0.15s; }
.bot-romano-puntos i:nth-child(3) { animation-delay: 0.3s; }

@keyframes bot-punto {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 600px) {
  .bot-romano-panel.gesto-panel,
  .board-wrap > .bot-romano .bot-romano-panel.gesto-panel {
    transform-origin: center bottom;
  }

  .bot-romano-panel.gesto-panel:not(.gesto-abierto),
  .board-wrap > .bot-romano .bot-romano-panel.gesto-panel:not(.gesto-abierto) {
    opacity: 0.7;
    transform: translateY(110%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bot-romano-panel.gesto-panel,
  button.bot-romano-abrir.gesto-panel,
  .bot-romano-emoji-rejilla.gesto-panel,
  .bot-romano-sugerencias.gesto-panel,
  .bot-romano-panel.gesto-panel:not(.gesto-abierto),
  button.bot-romano-abrir.gesto-panel:not(.gesto-abierto),
  .board-wrap > .bot-romano .bot-romano-panel.gesto-panel:not(.gesto-abierto) {
    transform: none;
    transition-duration: 70ms;
  }

  .bot-romano-puntos i {
    animation: none;
    opacity: 0.7;
    transform: none;
  }

  button.bot-romano-abrir.is-destello,
  button.bot-romano-abrir.is-destello .bot-romano-abrir-marco {
    animation: none;
  }
}

/* Retrato de acuarela: el archivo del panel mide 256 px (2x de 8 rem). El boton usa el recorte de la cara a 256 o 64. */

.bot-romano-panel {
  position: relative;
}

.bot-romano-cabecera {
  align-items: flex-start;
  padding-right: 2.75rem;
}

button.bot-romano-cerrar {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-retrato {
  position: relative;
  display: block;
  width: 6rem;
  max-height: 7.5rem;
  aspect-ratio: 576 / 720;
  flex: none;
  overflow: hidden;
  animation: bot-romano-respira 3.8s ease-in-out infinite;
  transform-origin: 50% 85%;
}

.bot-romano-retrato img {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.bot-romano-base {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-romano-ojos {
  left: var(--ojos-x);
  top: var(--ojos-y);
  width: var(--ojos-w);
  height: var(--ojos-h);
}

.bot-romano-boca {
  left: var(--boca-x);
  top: var(--boca-y);
  width: var(--boca-w);
  height: var(--boca-h);
}

button.bot-romano-abrir .bot-romano-retrato,
.board-wrap > .bot-romano button.bot-romano-abrir .bot-romano-retrato {
  position: relative;
  flex: none;
  width: 112%;
  height: 112%;
  top: -3%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
}

.bot-romano[data-persona="aurelia"] button.bot-romano-abrir .bot-romano-retrato,
.board-wrap > .bot-romano[data-persona="aurelia"] button.bot-romano-abrir .bot-romano-retrato {
  width: 126%;
  height: 126%;
  top: -13%;
}

.board-wrap > .bot-romano .bot-romano-retrato {
  width: 5.5rem;
  max-height: 7.5rem;
}

@media (max-width: 820px) {
  .bot-romano-retrato,
  .board-wrap > .bot-romano .bot-romano-retrato {
    width: 3.6rem;
    max-height: 4.5rem;
  }

  button.bot-romano-abrir .bot-romano-retrato,
  .board-wrap > .bot-romano button.bot-romano-abrir .bot-romano-retrato {
    width: 112%;
    height: 112%;
    top: -3%;
    max-height: none;
  }

  .bot-romano[data-persona="aurelia"] button.bot-romano-abrir .bot-romano-retrato,
  .board-wrap > .bot-romano[data-persona="aurelia"] button.bot-romano-abrir .bot-romano-retrato {
    width: 126%;
    height: 126%;
    top: -13%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bot-romano-retrato {
    animation: none;
  }
}

/* Tema oscuro de la web publica y selector; la partida conserva su paleta interior. */
.bot-romano-bocadillo {
  border-color: var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
  background: var(--c-papel-claro, #11191f);
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-bocadillo:hover,
.bot-romano-bocadillo:focus-visible {
  background: var(--c-papel-oscuro, #17232b);
  border-color: var(--c-oro, #d6a95c);
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-panel {
  border-color: var(--c-linea-fuerte, rgba(214, 169, 92, 0.5));
  background: var(--c-papel-claro, #11191f);
  color: var(--c-tinta, #f1eadc);
  box-shadow: inset 4px 0 0 var(--c-terracota, #b83b24), 0 18px 40px rgba(0, 0, 0, 0.68);
}

.bot-romano-panel button {
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-panel button.bot-romano-enviar {
  background: var(--c-terracota, #b83b24);
  border-color: var(--c-terracota, #b83b24);
  color: var(--c-sobre-acento, #fffaf2);
}

.bot-romano-entrada {
  background: var(--c-papel-oscuro, #17232b);
  border-color: var(--c-linea-fuerte, rgba(214, 169, 92, 0.4));
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-respuesta {
  background: var(--c-papel-oscuro, #17232b);
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-globo {
  background: var(--c-papel-claro, #11191f);
  border-color: var(--c-linea-fuerte, rgba(214, 169, 92, 0.45));
  color: var(--c-tinta, #f1eadc);
}

.bot-romano-mas {
  background: var(--c-papel-claro, #11191f);
  border-color: var(--c-linea-fuerte, rgba(214, 169, 92, 0.45));
}

@media (max-width: 720px), (pointer: coarse) {
  button.bot-romano-persona,
  button.bot-romano-enviar,
  button.bot-romano-emoji-celda,
  button.bot-romano-sugerencia {
    min-width: var(--tap-min, 44px);
    min-height: 40px;
  }

  .bot-romano .bot-romano-panel .bot-romano-form button.bot-romano-emoji-abrir {
    width: var(--tap-min, 44px);
    min-width: var(--tap-min, 44px);
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }
}

@media (max-width: 380px) {
  .bot-romano-cabecera {
    gap: 0.4rem;
    padding-right: 2.35rem;
  }

  .bot-romano-titulo {
    font-size: 1.05rem;
  }

  button.bot-romano-pergamino,
  button.bot-romano-reiniciar,
  button.bot-romano-voz {
    min-width: 34px;
    min-height: 34px;
    padding: 0.18rem;
  }

  button.bot-romano-cerrar {
    top: 0.25rem;
    right: 0.2rem;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  button.bot-romano-persona {
    min-height: 36px;
    padding: 0.18rem 0.35rem;
    font-size: 0.76rem;
    gap: 0.24rem;
  }

  .bot-romano-persona-marco {
    width: 1.15rem;
    height: 1.15rem;
  }
}

/* Cronalis-1364: ubicacion movil segura sin tapar chat, tablero ni botones de accion. */
@media (max-width: 720px) {
  body.dialogo-abierto .board-wrap > .bot-romano,
  .board-wrap:has(.chat-sala.abierto) > .bot-romano .bot-romano-tutor,
  .bot-romano:has(.bot-romano-panel:not([hidden])) .bot-romano-tutor {
    display: none;
  }

  .board-wrap > .bot-romano,
  .board-wrap > .bot-romano.es-activa {
    top: calc(var(--tools-bajo, 3rem) + 0.35rem);
    right: 0.45rem;
    bottom: auto;
    left: auto;
    flex-direction: column-reverse;
    align-items: flex-end;
    max-width: calc(100% - 0.9rem);
    max-height: none;
    z-index: 9;
  }

  .board-wrap > .bot-romano button.bot-romano-abrir {
    position: relative;
    flex: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
  }

  .board-wrap > .bot-romano button.bot-romano-abrir .bot-romano-retrato {
    width: 112%;
    height: 112%;
    top: -3%;
  }

  .board-wrap > .bot-romano[data-persona="aurelia"] button.bot-romano-abrir .bot-romano-retrato {
    width: 126%;
    height: 126%;
    top: -13%;
  }

  .board-wrap > .bot-romano .bot-romano-tutor {
    position: absolute;
    top: 0;
    right: calc(44px + 0.35rem);
    transform: none;
    width: min(17.5rem, calc(100vw - 4.1rem));
    max-width: calc(100vw - 4.1rem);
    max-height: 11.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.36rem 0.52rem;
    font-size: 0.76rem;
    line-height: 1.26;
  }

  /* El texto del objetivo hace scroll dentro de la burbuja; los botones quedan siempre a la vista. */
  .board-wrap > .bot-romano .bot-romano-tutor > p {
    flex: none;
  }

  .board-wrap > .bot-romano .bot-romano-tutor > .bot-romano-tutor-meta {
    flex: 0 1 auto;
    min-height: 1.3rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .board-wrap > .bot-romano .bot-romano-tutor > .bot-romano-tutor-meta[hidden] {
    display: none;
  }

  /* Poco hueco hasta la insignia de estacion: texto y botones algo mas compactos (lo pone bot-romano.js). */
  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto {
    padding: 0.26rem 0.48rem;
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto > p {
    margin-bottom: 0.15rem;
  }

  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto > .bot-romano-tutor-meta {
    min-height: 0.9rem;
  }

  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto .bot-romano-ir {
    min-height: 1.8rem;
    padding: 0.1rem 0.55rem;
  }

  .board-wrap > .bot-romano .bot-romano-tutor p {
    margin: 0 0 0.25rem;
  }

  .board-wrap > .bot-romano .bot-romano-tutor-botones {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .board-wrap > .bot-romano .bot-romano-tutor-botones .bot-romano-ir {
    min-height: 2.2rem;
    padding: 0.22rem 0.6rem;
  }
}

@media (max-width: 720px) and (max-height: 600px) {
  .board-wrap > .bot-romano .bot-romano-tutor {
    max-height: 9rem;
    padding: 0.28rem 0.48rem;
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .board-wrap > .bot-romano .bot-romano-tutor p {
    margin: 0 0 0.2rem;
  }

  .board-wrap > .bot-romano .bot-romano-tutor-botones .bot-romano-ir {
    min-height: 2.05rem;
    padding: 0.18rem 0.55rem;
  }

  .board-wrap:has(#board-context:not([hidden])) > .bot-romano .bot-romano-tutor {
    max-height: 4.85rem;
  }
}

@media (max-width: 600px) {
  .board-wrap > .bot-romano .bot-romano-tutor {
    position: fixed;
    top: auto;
    left: 0.45rem;
    right: 0.45rem;
    bottom: calc(var(--banda-fase, 6.7rem) + 3.85rem);
    width: auto;
    max-width: none;
    max-height: min(12rem, 34dvh);
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
    line-height: 1.28;
    z-index: 10;
  }

  .board-wrap:has(#board-context:not([hidden])) > .bot-romano .bot-romano-tutor {
    bottom: calc(var(--dock, 3.6rem) + 3.0rem);
    max-height: min(9.5rem, 26dvh);
  }

  .board-wrap:has(.chat-sala.abierto) > .bot-romano .bot-romano-tutor,
  .bot-romano:has(.bot-romano-panel:not([hidden])) .bot-romano-tutor {
    display: none;
  }
}

@media (max-width: 600px) and (max-height: 680px) {
  .board-wrap > .bot-romano .bot-romano-tutor {
    bottom: calc(var(--banda-fase, 6.7rem) + 3.85rem);
    max-height: min(8.5rem, 28dvh);
    padding: 0.28rem 0.5rem;
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto {
    padding: 0.22rem 0.45rem;
    font-size: 0.69rem;
    line-height: 1.14;
  }

  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto > p {
    margin: 0 0 0.14rem;
  }

  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto > .bot-romano-tutor-meta {
    min-height: 0;
    margin: 0 0 0.14rem;
    font-size: 0.88em;
  }

  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto > .bot-romano-tutor-botones {
    margin: 0;
  }

  .board-wrap > .bot-romano .bot-romano-tutor.es-compacto .bot-romano-tutor-botones .bot-romano-ir {
    min-height: 1.55rem;
    padding: 0.06rem 0.48rem;
    font-size: 0.7rem;
  }

  .board-wrap:has(#board-context:not([hidden])) > .bot-romano .bot-romano-tutor {
    bottom: calc(var(--dock, 3.6rem) + 3.0rem);
    max-height: min(7.8rem, 26dvh);
  }
}

/* Al abrir el panel de volumen u opciones, el asistente y su tutor quedan debajo. */
.board-wrap:has(#vol-pop:not([hidden]), #board-opts:not([hidden])) > .bot-romano .bot-romano-tutor {
  display: none;
}

.board-wrap:has(#vol-pop:not([hidden]), #board-opts:not([hidden])) > .bot-romano,
.board-wrap:has(#vol-pop:not([hidden]), #board-opts:not([hidden])) > .bot-romano.es-activa,
.board-wrap:has(#vol-pop:not([hidden]), #board-opts:not([hidden])) > .bot-romano:has(.bot-romano-panel:not([hidden])) {
  z-index: 5;
}
