/* D-BARRA-INFERIOR (claude/_CLAUDE_D_BARRA_INFERIOR_MESA.md) — la franja de abajo: las pestañas del chat en el sitio del título
   (D-BI-1/2/4), «tu grupo» a la izquierda (D-BI-5/6/7) y «lo que pasa» a la derecha (D-BI-8/9/10), en los dos estilos (D-BI-12),
   sin scroll a 1280×720 ni a 1920×1080 (D-BI-13). En combate los dos huecos son del combate (D-BI-11).
   Va después de marco.css: los selectores llevan dos ids (#rpg-root …) para ganar a los suyos sin !important. */

/* ───────── El chat: las pestañas donde iba el título (D-BI-1) ───────── */

#rpg-root #chatCabecera {
  align-items: flex-end;
  min-height: 0;
  margin: 0 0 6px;
  border-bottom: 1px solid rgba(200, 168, 96, 0.4);
}
@media (min-width: 1001px) {
  #rpg-root #chatCabecera > h2 { display: none; }
}
/* D-SMOKE-3 D-S3-2 — por debajo, el título cede sitio a las pestañas (se recorta con puntos suspensivos, nunca encima de
   ellas); en combate (sus pestañas: Crónicas · Combate · Daño) no se pinta, que ahí sería falso; y en estrecho, tampoco. */
#rpg-root #chatCabecera > h2 { flex: 0 1 auto; min-width: 0; overflow: hidden; }
#rpg-root #chatCabecera > h2 > span:last-child { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#rpg-root #chatCabecera:has(.cv-chat-pestanas) > h2 { display: none; }
@media (max-width: 520px) {
  #rpg-root #chatCabecera > h2 { display: none; }
}
#rpg-root #chatCabecera .chat-canales,
#rpg-root #chatCabecera .cv-chat-pestanas { margin: 0; gap: 4px; align-items: flex-end; }

#rpg-root #chroniclesSection .chat-canales button,
#rpg-root #chroniclesSection .cv-chat-pestanas button {
  position: relative;
  margin-bottom: -1px;
  padding: 4px 18px 3px;
  font-family: 'Germania One', var(--ui-fuente-titulo) !important;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #8d8773;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}
/* La hoja vieja (v2-theme) pone su fuente a todo con !important: los hijos de la pestaña heredan la de la pestaña. */
#rpg-root #chroniclesSection .chat-canales button > :not(.cv-cnt),
#rpg-root #chroniclesSection .cv-chat-pestanas button > :not(.cv-cnt) { font-family: inherit !important; }
#rpg-root #chroniclesSection .chat-canales button:hover,
#rpg-root #chroniclesSection .cv-chat-pestanas button:hover { color: #d9c690; }
#rpg-root #chroniclesSection .chat-canales button.on,
#rpg-root #chroniclesSection .cv-chat-pestanas button.on {
  color: #f3dfa0;
  background: linear-gradient(180deg, rgba(200, 168, 96, 0.2), rgba(12, 10, 8, 0.6));
  border-color: rgba(200, 168, 96, 0.6);
  box-shadow: inset 0 1px 0 rgba(243, 223, 160, 0.25);
}
/* D-BI-2 — el sin leer: un círculo rojo arriba a la derecha del rótulo */
#rpg-root #chroniclesSection .chat-canales .cv-cnt,
#rpg-root #chroniclesSection .cv-chat-pestanas .cv-cnt {
  position: absolute;
  top: -5px;
  right: 0;
  min-width: 17px;
  height: 17px;
  margin: 0;
  padding: 0 4px;
  border-radius: 9px;
  background: #c0392b;
  box-shadow: 0 0 0 2px #0d0b08;
  color: #fff;
  font-family: var(--ui-fuente-texto) !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
/* D-BI-13 — la lista de en línea no se desplaza: recorta */
#rpg-root #onlineUsersContainer { overflow: hidden; align-self: center; }

/* ───────── Los dos laterales ───────── */

#rpg-root .bi-pie {
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 16px;
  overflow: hidden;
}
/* La hoja vieja (v2-theme) pone su fuente medieval a todo con !important: aquí, la del texto y sin mayúsculas (el nombre, aparte). */
#rpg-root .bi-pie,
#rpg-root .bi-pie *:not(.ui-pie__nombre):not(.ui-pie__nombre *) { font-family: var(--ui-fuente-texto) !important; text-transform: none !important; }
#rpg-root .bi-pie button { min-height: 0 !important; min-width: 0 !important; line-height: inherit; }
#rpg-root .bi-pie button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
#rpg-root .bi-pie img { display: block; }

/* El retrato redondo, con aro dorado (A) */
#rpg-root .bi-retrato {
  flex: none;
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: #120f0b;
  border: 2px solid var(--ui-acento) !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.7), 0 0 10px rgba(200, 168, 96, 0.35);
}
#rpg-root .bi-retrato img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
#rpg-root button.bi-retrato:hover,
#rpg-root .bi-miembro:hover .bi-retrato { border-color: var(--ui-acento-luz) !important; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.7), 0 0 14px rgba(243, 223, 160, 0.55); }

/* D-BI-5 — el líder */
#rpg-root .bi-lider { display: flex; align-items: center; gap: 12px; min-width: 0; flex: none; }
#rpg-root .bi-lider__datos { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
#rpg-root .bi-pie .ui-pie__nombre,
#rpg-root .bi-pie .ui-pie__nombre * { font-family: 'Germania One', var(--ui-fuente-titulo) !important; font-weight: 400; font-size: 24px; line-height: 1.05; letter-spacing: 0.04em; }
#rpg-root .bi-lider__linea { display: flex; align-items: baseline; gap: 5px; min-width: 0; white-space: nowrap; overflow: hidden; }
#rpg-root .bi-lider__linea > * { flex: none; }
#rpg-root .bi-lider__clase { flex: 0 1 auto !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ui-tinta-1); }
#rpg-root .bi-lider__clase:not(:empty)::after { content: " ·"; color: var(--ui-tinta-2); }
#rpg-root .bi-lider__linea .ui-pie__valor { font-size: 13px; }
#rpg-root .bi-lider__linea .ui-pie__rotulo { font-size: 10px; }
#rpg-root .bi-lider .ui-barra { margin-top: 2px; max-width: 260px; }

/* D-BI-6 — los compañeros */
#rpg-root .bi-grupo { display: flex; gap: 10px; min-width: 0; flex: none; }
#rpg-root .bi-miembro { flex: 0 1 84px; min-width: 0; display: flex !important; flex-direction: column; align-items: center; gap: 3px; }
#rpg-root .bi-miembro .bi-retrato { width: 44px; height: 44px; }
#rpg-root .bi-miembro__nombre { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--ui-tinta-0); }
#rpg-root .bi-miembro--caido { opacity: 0.5; filter: grayscale(0.8); }
#rpg-root .bi-barra { display: block; width: 100%; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
#rpg-root .bi-barra > span { display: block; height: 100%; }
#rpg-root .bi-barra--vida > span { background: linear-gradient(90deg, #8f1d1d, #d9402f); }
#rpg-root .bi-barra--mana > span { background: linear-gradient(90deg, #1d4f9f, #3f92e6); }
#rpg-root .bi-barra--sin { visibility: hidden; }
#rpg-root .bi-vacio { font-size: 12px; color: var(--ui-tinta-2); font-style: italic; }

/* D-BI-7 — los estados */
#rpg-root .bi-estados { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin-top: auto; max-height: 22px; overflow: hidden; }
#rpg-root .bi-estado {
  padding: 1px 9px;
  border: 1px solid rgba(200, 168, 96, 0.5);
  border-radius: 10px;
  font-size: 11px;
  line-height: 16px;
  color: var(--ui-tinta-0);
  background: rgba(0, 0, 0, 0.3);
  cursor: help;
  white-space: nowrap;
}
#rpg-root .bi-estado--bueno { border-color: rgba(120, 180, 110, 0.6); color: #cfe8c4; }
#rpg-root .bi-estado--aviso { border-color: rgba(230, 150, 70, 0.7); color: #f6cf9f; }
#rpg-root .bi-estado--malo { border-color: rgba(210, 70, 60, 0.8); color: #f3b3aa; }
#rpg-root .bi-estado--mana { border-color: rgba(80, 140, 220, 0.7); color: #b9d4f7; }
/* D-REZO-VISIBLE D-RV-2 — las bendiciones del Templo: el icono del dios y el tiempo corto. Los estados ya no se recortan a una fila (S-5):
   caben dos, y lo que no quepa no se esconde a ciegas (las bendiciones van delante). */
#rpg-root .bi-estados { max-height: calc(2 * 18px + 6px); row-gap: 4px; }
#rpg-root .bi-bendicion { display: inline-flex !important; align-items: center; gap: 4px; padding: 0 8px 0 2px; cursor: pointer; }
#rpg-root .bi-bendicion img { width: 16px; height: 16px; border-radius: 50%; flex: none; }
#rpg-root .bi-bendicion:hover { filter: brightness(1.15); } — el platino y los materiales */
#rpg-root .bi-recursos { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; flex: none; }
#rpg-root .bi-materiales { display: contents; }
#rpg-root .bi-chapa {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px 0 5px !important;
  border: 1px solid rgba(200, 168, 96, 0.5) !important;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.35) !important;
  font-family: var(--ui-fuente-texto) !important;
  font-size: 14px;
  font-weight: 700;
  color: var(--ui-tinta-0);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#rpg-root .bi-chapa img { width: 22px; height: 22px; object-fit: contain; }
#rpg-root .bi-chapa--pp { gap: 6px; padding-left: 4px !important; }
#rpg-root .bi-chapa--pp .ui-recurso__moneda { width: 20px; height: 20px; }
#rpg-root .bi-chapa--cero { opacity: 0.55; }
#rpg-root button.bi-chapa:hover { border-color: var(--ui-acento-luz) !important; }

/* D-BI-9 — los relojes */
#rpg-root .bi-relojes { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; overflow: hidden; }
#rpg-root .bi-reloj {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 4px 9px !important;
  border: 1px solid rgba(200, 168, 96, 0.24) !important;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3) !important;
  font-size: 13px;
  line-height: 16px;
}
#rpg-root button.bi-reloj:hover { border-color: rgba(243, 223, 160, 0.6) !important; background: rgba(200, 168, 96, 0.08) !important; }
#rpg-root .bi-reloj__icono { grid-row: 1 / span 2; width: 22px; height: 22px; object-fit: contain; }
#rpg-root .bi-reloj__texto { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ui-tinta-0); }
#rpg-root .bi-reloj__valor { white-space: nowrap; font-weight: 700; color: var(--ui-acento-luz); font-variant-numeric: tabular-nums; }
#rpg-root .bi-reloj__barra { grid-column: 2 / 4; display: block; height: 3px; margin-top: 3px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
#rpg-root .bi-reloj__barra > span { display: block; height: 100%; background: linear-gradient(90deg, #a08840, #f3dfa0); }
#rpg-root .bi-reloj--listo .bi-reloj__valor { color: #9be37f; }
/* D-ECONOMIA-CURVA t3 D-ET3-7 — el balance del día: con algo descuidado, en color de aviso */
#rpg-root .bi-reloj--aviso .bi-reloj__texto, #rpg-root .bi-reloj--aviso .bi-reloj__valor { color: #ffb08a; }
#rpg-root .bi-reloj--vacio,
#rpg-root .bi-reloj--mas { display: block !important; cursor: default; background: transparent !important; border-style: dashed !important; color: var(--ui-tinta-2); }
#rpg-root .bi-reloj--vacio .bi-reloj__texto { display: block; color: var(--ui-tinta-1); }
#rpg-root .bi-reloj__pista { display: block; font-size: 11px; color: var(--ui-tinta-2); }
#rpg-root .bi-reloj--mas { padding: 1px 9px !important; font-size: 11px; text-align: right; border: 0 !important; }

/* D-BI-10 — dónde está el grupo */
#rpg-root .bi-lugar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; margin-top: auto; flex: none; font-size: 12px; color: var(--ui-tinta-1); }
#rpg-root .bi-lugar:empty { display: none; }
/* la versión del juego (fija abajo a la derecha) bajaba encima del lugar: con el marco, pegada al borde y más pequeña */
body.ui-marco-activo #v2FooterVersion { bottom: 1px; right: 4px; font-size: 9px; letter-spacing: 0.06em; opacity: 0.6; }
#rpg-root .bi-lugar { padding-bottom: 6px; }
#rpg-root .bi-lugar__texto { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#rpg-root .bi-lugar__texto b { color: var(--ui-acento-luz); font-weight: 700; }
#rpg-root .bi-lugar__nivel { color: var(--ui-tinta-2); }
#rpg-root .bi-lugar__atlas { flex: none; width: 26px; height: 26px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(200, 168, 96, 0.6) !important; }
#rpg-root .bi-lugar__atlas img { width: 100%; height: 100%; object-fit: cover; }
#rpg-root .bi-lugar__atlas:hover { border-color: var(--ui-acento-luz) !important; box-shadow: 0 0 8px rgba(243, 223, 160, 0.5); }

/* ───────── En combate (D-BI-11): el hueco es del combate ─────────
   El combate mete su pieza (.cv-franja-pieza, replay-adapter.jsx) en los dos huecos en las tres disposiciones; todo lo demás se aparta. */
#rpg-root .bi-pie:has(> .cv-franja-pieza) > :not(.cv-franja-pieza):not(.ui-esquina) { display: none !important; }
#rpg-root .bi-pie:has(> .cv-franja-pieza) { justify-content: center; }
#rpg-root .bi-pie > .cv-franja-pieza { width: 100%; min-height: 0; }

/* ───────── La franja baja (≤1500 de ancho o ≤860 de alto: 168 px, ui/tokens.css) ───────── */
@media (max-width: 1500px), (max-height: 860px) {
  #rpg-root .bi-pie { gap: 5px; padding: 7px 10px; }
  #rpg-root #chroniclesSection .chat-canales button,
  #rpg-root #chroniclesSection .cv-chat-pestanas button { font-size: 16px; padding: 2px 12px 2px; }
  #rpg-root #chatCabecera { margin-bottom: 4px; }
  #rpg-root .bi-retrato { width: 40px; height: 40px; }
  #rpg-root .bi-lider { gap: 8px; }
  #rpg-root .bi-pie .ui-pie__nombre,
  #rpg-root .bi-pie .ui-pie__nombre * { font-size: 18px; }
  #rpg-root .bi-lider__linea { font-size: 11px; }
  #rpg-root .bi-grupo { gap: 6px; }
  #rpg-root .bi-miembro { flex-basis: 60px; gap: 2px; }
  #rpg-root .bi-miembro .bi-retrato { width: 30px; height: 30px; border-width: 1px !important; }
  #rpg-root .bi-miembro__nombre { font-size: 10px; }
  #rpg-root .bi-barra { height: 3px; }
  #rpg-root .bi-miembro:nth-child(n + 5) { display: none !important; }
  #rpg-root .bi-estados { gap: 4px; max-height: calc(2 * 16px + 4px); }
  #rpg-root .bi-bendicion img { width: 14px; height: 14px; }
  #rpg-root .bi-estado { font-size: 10px; line-height: 14px; padding: 1px 7px; }
  #rpg-root .bi-recursos { gap: 4px; }
  #rpg-root .bi-chapa { height: 22px; gap: 3px; padding: 0 7px 0 3px !important; font-size: 12px; }
  #rpg-root .bi-chapa img { width: 16px; height: 16px; }
  #rpg-root .bi-chapa--pp .ui-recurso__moneda { width: 15px; height: 15px; }
  #rpg-root .bi-relojes { gap: 3px; }
  #rpg-root .bi-reloj { grid-template-columns: 16px minmax(0, 1fr) auto; column-gap: 6px; padding: 2px 7px !important; font-size: 11px; line-height: 14px; }
  #rpg-root .bi-reloj__icono { width: 16px; height: 16px; }
  #rpg-root .bi-reloj__barra { height: 2px; margin-top: 1px; }
  #rpg-root .bi-reloj__pista { font-size: 10px; }
  #rpg-root .bi-lugar { font-size: 11px; gap: 6px; }
  #rpg-root .bi-lugar__atlas { width: 20px; height: 20px; }
}

/* ───────── Estrecho (≤1000 px, D-UI-M-14): sólo nombre, nivel y platino, como antes ───────── */
@media (max-width: 1000px) {
  #rpg-root .bi-pie { flex-direction: row; align-items: center; padding: 4px 12px; }
  #rpg-root .bi-grupo,
  #rpg-root .bi-estado:not(.bi-bendicion),
  #rpg-root .bi-bendicion__t,
  #rpg-root .bi-materiales,
  #rpg-root .bi-relojes,
  #rpg-root .bi-lugar,
  #rpg-root .bi-retrato--lider,
  #rpg-root .bi-lider__clase { display: none !important; }
  #rpg-root .bi-pie .ui-pie__fila--tenue.bi-lider__linea { display: flex; }
  #rpg-root .bi-lider__linea > :nth-child(n + 4) { display: none; }
  #rpg-root .bi-pie .ui-pie__nombre,
  #rpg-root .bi-pie .ui-pie__nombre * { font-size: var(--ui-letra-m); }
  #rpg-root .bi-chapa { height: 24px; border: 0 !important; background: none !important; }
  /* D-REZO-VISIBLE D-RV-2 — estrecho: de los estados quedan las bendiciones, sólo el icono (lo que más se perdía) */
  #rpg-root .bi-estados { margin-top: 0; max-height: none; flex-wrap: nowrap; }
  #rpg-root .bi-bendicion { padding: 1px; border-radius: 50%; }
}

/* ───────── D-PORTAL (claude/_CLAUDE_D_PORTAL_MESA.md) — «Viajar a…»: el botón, la lista, el lanzamiento de 6 s y la llegada ───────── */

/* D-PORTAL-1 — el botón junto a «Región · lugar» (y en el Atlas, junto a «Mundo» y «Construir») */
#rpg-root .bi-lugar__portal {
  flex: none; height: 24px; padding: 0 10px !important; border-radius: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  color: #e9e4ff; border: 1px solid rgba(160, 140, 255, 0.65) !important;
  background: radial-gradient(circle at 30% 30%, rgba(120, 100, 230, 0.55), rgba(30, 22, 60, 0.85)) !important;
}
#rpg-root .bi-lugar__portal:hover { box-shadow: 0 0 8px rgba(170, 150, 255, 0.6); }
#rpg-root .bi-lugar__portal--apagado,
.atlas-mapa-controles button.atlas-portal-btn--apagado { opacity: 0.45; filter: grayscale(0.6); }
.atlas-mapa-controles button.atlas-portal-btn { font-size: 11px; }

/* D-VIAJE-FONDO D-VF-5 — el grupo, parado en un evento del camino: «Os habéis topado con algo… [Ir al mapa]» (el estilo B, abajo) */
#rpg-root .bi-lugar__aviso {
  flex: none; height: 24px; padding: 0 10px !important; border-radius: 12px; font-size: 11px; white-space: nowrap; cursor: pointer;
  color: #2a1d08; border: 1px solid rgba(255, 220, 140, 0.9) !important; background: linear-gradient(180deg, #f6dc98, #d9b25c) !important;
  animation: bi-aviso-late 1.6s ease-in-out infinite;
}
@keyframes bi-aviso-late { 0%, 100% { box-shadow: 0 0 0 rgba(255, 214, 120, 0); } 50% { box-shadow: 0 0 10px rgba(255, 214, 120, 0.8); } }
.ui-efectos-reducidos #rpg-root .bi-lugar__aviso { animation: none; }
@media (prefers-reduced-motion: reduce) { #rpg-root .bi-lugar__aviso { animation: none; } }

/* D-PORTAL-2 — la lista de destinos */
.portal-lista {
  position: fixed; z-index: 9400; right: 24px; bottom: 96px; width: min(320px, calc(100vw - 32px));
  padding: 12px 14px; border-radius: 10px; color: #f1ead6;
  border: 1px solid rgba(160, 140, 255, 0.6);
  background: linear-gradient(180deg, rgba(28, 22, 48, 0.97), rgba(14, 10, 24, 0.97));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 18px rgba(120, 100, 230, 0.25);
  font-size: 13px;
}
.portal-lista__cabeza { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.portal-lista__titulo { font-weight: 700; font-size: 14px; color: #d9d0ff; }
.portal-lista__cerrar { width: 24px; height: 24px; border-radius: 50%; font-size: 16px; line-height: 1; color: #d9d0ff; background: transparent; border: 1px solid rgba(160, 140, 255, 0.4); }
.portal-lista__ayuda { margin: 6px 0 8px; font-size: 11px; color: #b9b1d6; }
.portal-lista__filas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.portal-lista__destino,
.portal-lista__fila--aqui {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 7px 10px; border-radius: 7px; text-align: left;
  border: 1px solid rgba(160, 140, 255, 0.35); background: rgba(60, 48, 110, 0.35); color: inherit;
}
.portal-lista__destino:hover,
.portal-lista__destino:focus-visible { border-color: rgba(190, 175, 255, 0.85); background: rgba(90, 72, 170, 0.45); outline: none; }
.portal-lista__fila--aqui { opacity: 0.6; }
.portal-lista__nombre { font-weight: 700; }
.portal-lista__region { font-size: 11px; color: #b9b1d6; }
.portal-lista__vacio { margin: 8px 0 0; font-size: 12px; color: #b9b1d6; font-style: italic; }
/* D-EDIFICIOS-3 F2 D-ED3-T3/T4 — la Torre del mago: los dos bloques (Ciudades, Sitios atados), el coste de cada atado y atar el sitio */
.portal-lista { max-height: calc(100vh - 140px); overflow-x: hidden; overflow-y: auto; }
.portal-lista__fila--aqui { box-sizing: border-box; } /* la fila de «Estáis aquí» (un li, no un botón) se salía 7 px por la derecha */
.portal-lista__bloque { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #c9bcff; }
.portal-lista__bloque::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(160, 140, 255, 0.5), transparent); }
.portal-lista__bloque + .portal-lista__filas { margin-top: 6px; }
.portal-lista__cupo { font-variant-numeric: tabular-nums; letter-spacing: 0; color: #b9b1d6; }
.portal-lista__destino--atado { position: relative; padding-right: 92px; }
.portal-lista__coste { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; font-variant-numeric: tabular-nums; color: #f3dca0; }
.portal-lista__destino--falta .portal-lista__coste { color: #ffb4a4; }
.portal-lista__atar {
  position: relative; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin-top: 8px; padding: 7px 10px 7px 34px; border-radius: 7px; text-align: left; color: inherit;
  border: 1px dashed rgba(233, 196, 106, 0.6); background: rgba(80, 62, 20, 0.35);
}
.portal-lista__atar:hover, .portal-lista__atar:focus-visible { border-style: solid; border-color: #e9c46a; background: rgba(110, 84, 26, 0.45); outline: none; }
.portal-lista__atar-icono { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
  border: 2px solid #e9c46a; box-shadow: 0 0 8px rgba(233, 196, 106, 0.6), inset 0 0 4px rgba(233, 196, 106, 0.6); }
.portal-cast--atar { border-color: rgba(233, 196, 106, 0.75); }
.portal-cast--atar .portal-cast__lleno { background: linear-gradient(90deg, #a0782a, #f3dca0); }

/* D-PORTAL-3 — la barra de lanzamiento, como la de un hechizo */
.portal-cast {
  position: fixed; z-index: 9400; left: 50%; bottom: 118px; transform: translateX(-50%); width: min(420px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: #f1ead6;
  border: 1px solid rgba(160, 140, 255, 0.7);
  background: linear-gradient(180deg, rgba(28, 22, 48, 0.96), rgba(14, 10, 24, 0.96));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 22px rgba(120, 100, 230, 0.35);
}
.portal-cast__icono {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(200, 185, 255, 0.95), rgba(90, 70, 210, 0.15), rgba(200, 185, 255, 0.95), rgba(90, 70, 210, 0.15), rgba(200, 185, 255, 0.95));
  -webkit-mask: radial-gradient(circle, transparent 42%, #000 46%); mask: radial-gradient(circle, transparent 42%, #000 46%);
  animation: portal-girar 1.2s linear infinite;
}
.portal-cast__cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.portal-cast__titulo { font-size: 13px; font-weight: 700; color: #d9d0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-cast__barra { position: relative; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(160, 140, 255, 0.4); }
.portal-cast__lleno { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #6b55d8, #c9bcff); transition: width 0.1s linear; }
.portal-cast__tiempo { flex: none; min-width: 44px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: #b9b1d6; }
.portal-cast__cancelar { flex: none; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #f6d6d0; border: 1px solid rgba(220, 120, 100, 0.6); background: rgba(90, 30, 24, 0.6); }
.portal-cast__cancelar:hover { background: rgba(130, 40, 30, 0.75); }

/* los avisos del portal (cortes, puerta cerrada) */
.portal-aviso {
  position: fixed; z-index: 9401; left: 50%; bottom: 170px; transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 6px 14px; border-radius: 8px; font-size: 13px; color: #f1ead6; pointer-events: none;
  background: rgba(14, 10, 24, 0.92); border: 1px solid rgba(160, 140, 255, 0.5);
  opacity: 0; transition: opacity 0.2s ease;
}
.portal-aviso--visible { opacity: 1; }

/* D-PORTAL-5 — la llegada: un anillo de luz que se abre, un destello y chispas que suben */
.portal-llegada { position: fixed; inset: 0; z-index: 9399; pointer-events: none; overflow: hidden; }
.portal-llegada__anillo {
  position: absolute; left: 50%; top: 50%; width: 40vmin; height: 40vmin; margin: -20vmin 0 0 -20vmin; border-radius: 50%;
  border: 3px solid rgba(200, 185, 255, 0.9); box-shadow: 0 0 40px rgba(150, 130, 255, 0.8), inset 0 0 40px rgba(150, 130, 255, 0.6);
  animation: portal-abrir 1.4s ease-out forwards;
}
.portal-llegada__luz {
  position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(200, 185, 255, 0.55), rgba(90, 70, 210, 0.15) 35%, transparent 60%);
  animation: portal-luz 1.4s ease-out forwards;
}
.portal-llegada__chispa {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: #e6e0ff; box-shadow: 0 0 8px #a898ff;
  transform: rotate(var(--portal-ang, 0deg)) translateY(0);
  animation: portal-chispa 1.2s ease-out var(--portal-retraso, 0s) forwards;
  opacity: 0;
}
.atlas-grupo--portal::before {
  content: ""; position: absolute; left: 50%; top: 60%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(200, 185, 255, 0.75), rgba(120, 100, 230, 0.25) 45%, transparent 70%);
  animation: portal-destello 1.6s ease-out forwards;
}
@keyframes portal-girar { to { transform: rotate(360deg); } }
@keyframes portal-abrir { 0% { transform: scale(0.1); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes portal-luz { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes portal-chispa {
  0% { opacity: 0; transform: rotate(var(--portal-ang, 0deg)) translateY(-4vmin); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--portal-ang, 0deg)) translateY(-34vmin); }
}
@keyframes portal-destello { 0% { transform: scale(0.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

/* D-PORTAL-5 — reducir movimiento: sin anillo que gira, sin apertura, sin chispas y sin destello; la barra se llena sin transición */
@media (prefers-reduced-motion: reduce) {
  .portal-cast__icono { animation: none; }
  .portal-cast__lleno { transition: none; }
  .portal-llegada, .atlas-grupo--portal::before { display: none; }
}
body.ui-efectos-reducidos .portal-cast__icono { animation: none; }
body.ui-efectos-reducidos .portal-cast__lleno { transition: none; }
body.ui-efectos-reducidos .portal-llegada,
body.ui-efectos-reducidos .atlas-grupo--portal::before { display: none; }

/* ═════════ B · Estandartes (D-BI-12) ═════════ */
html[data-estilo-marco="B"] #rpg-root #chatCabecera { border-bottom: 2px solid #6b2418; box-shadow: 0 1px 0 rgba(233, 196, 106, 0.35); }
html[data-estilo-marco="B"] #rpg-root #chroniclesSection .chat-canales button,
html[data-estilo-marco="B"] #rpg-root #chroniclesSection .cv-chat-pestanas button { border-radius: 0; color: #a68f72; }
html[data-estilo-marco="B"] #rpg-root #chroniclesSection .chat-canales button.on,
html[data-estilo-marco="B"] #rpg-root #chroniclesSection .cv-chat-pestanas button.on {
  color: #fff3c4;
  background: linear-gradient(180deg, #7a2a1c, #3a120c);
  border-color: #e9c46a;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
html[data-estilo-marco="B"] #rpg-root .bi-retrato {
  border-color: #9a2c1c !important;
  box-shadow: 0 0 0 1px #e9c46a, 0 0 0 3px rgba(0, 0, 0, 0.7), 0 0 12px rgba(233, 150, 64, 0.3);
}
html[data-estilo-marco="B"] #rpg-root button.bi-retrato:hover,
html[data-estilo-marco="B"] #rpg-root .bi-miembro:hover .bi-retrato { border-color: #e9c46a !important; }
html[data-estilo-marco="B"] #rpg-root .bi-chapa,
html[data-estilo-marco="B"] #rpg-root .bi-reloj:not(.bi-reloj--mas),
html[data-estilo-marco="B"] #rpg-root .bi-estado {
  border-radius: 0;
  border-color: rgba(154, 44, 28, 0.8) !important;
  background: linear-gradient(180deg, rgba(70, 18, 12, 0.6), rgba(20, 8, 6, 0.7)) !important;
}
html[data-estilo-marco="B"] #rpg-root .bi-reloj:not(.bi-reloj--mas) { border-left: 3px solid #9a2c1c !important; }
html[data-estilo-marco="B"] #rpg-root .bi-reloj__barra > span { background: linear-gradient(90deg, #9a2c1c, #e9c46a); }
html[data-estilo-marco="B"] #rpg-root .bi-reloj__valor,
html[data-estilo-marco="B"] #rpg-root .bi-lugar__texto b { color: #e9c46a; }
html[data-estilo-marco="B"] #rpg-root .bi-lugar__atlas { border-radius: 0; border-color: #9a2c1c !important; box-shadow: 0 0 0 1px rgba(233, 196, 106, 0.5); }
html[data-estilo-marco="B"] #rpg-root .bi-estado--bueno { color: #d6ecc9; }
html[data-estilo-marco="B"] #rpg-root .bi-estado--aviso { color: #f6cf9f; }
html[data-estilo-marco="B"] #rpg-root .bi-estado--malo { color: #f3b3aa; }
html[data-estilo-marco="B"] #rpg-root .bi-estado--mana { color: #b9d4f7; }
/* D-PORTAL-1 — el botón «Viajar a…» en el estilo B */
html[data-estilo-marco="B"] #rpg-root .bi-lugar__portal { border-radius: 0; }
html[data-estilo-marco="B"] #rpg-root .bi-lugar__aviso { border-radius: 0; }
