/* La tipografia de toda la app, servida desde la propia web y no desde Google
   Fonts (una hoja de estilos que frenaba el pintado y dos conexiones a otro
   servidor, que recibia la IP de cada visitante). Un solo fichero variable
   cubre del peso normal al del logo; antes solo el logo la usaba y el resto
   salia en la fuente de cada sistema. Subconjunto latino: lo que no esta en el
   (las figuras de las cartas, por ejemplo) sigue saliendo con la del sistema.
   index.html la precarga. Licencia en fonts/NOTICE.txt. */
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal; font-weight: 400 900; font-display: swap;
    src: url('../fonts/nunito-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Grises de texto sobre el fondo oscuro. --texto-suave da 4,6:1 sobre la
   superficie mas clara (filas de rivales); los #555-#777 de antes daban
   entre 2:1 y 2,9:1, por debajo de WCAG AA. */
:root {
    /* El fondo no se toca: es tambien el de la app Android (colors.xml), el del
       icono y el del manifiesto. */
    --fondo: #1a1a2e;
    --panel: #26284a;
    /* La zona donde juegas: un color propio para que la mesa se distinga del
       resto de la pantalla, que antes eran todo tarjetas grises. */
    --tapete: #16324a;
    --linea: #34375c;
    --linea-fuerte: #454977;
    --texto: #f3f2ec;
    --texto-suave: #a8abc6;
    /* Un solo acento. Va en la accion principal y en lo que es tuyo o gana; los
       controles secundarios son neutros para que el dorado siga significando algo. */
    --acento: #f0c040;
    --sobre-acento: #1c1606;
    --foco: #f0c040;
}

html, body {
    font-family: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    min-height: 100vh;
}

/* Foco visible y coherente para quien usa teclado. */
button:focus-visible, [role="button"]:focus-visible, a:focus-visible,
select:focus-visible, input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--foco);
    outline-offset: 2px;
}
/* Titulos y dialogos reciben el foco por programa (FocusOnNavigate, modales)
   para los lectores de pantalla; no son controles y no llevan el recuadro. */
h1:focus, [tabindex="-1"]:focus { outline: none; }

/* Solo para lectores de pantalla. */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ===== LOADING ===== */
.loading-screen {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100vh; gap: 2rem;
}
.loading-title { font-size: clamp(2rem, 9vw, 4rem); font-weight: 900; letter-spacing: 0.2em; color: #f0c040; }
.loading-cards { display: flex; gap: 0.5rem; }
.loading-card {
    width: 50px; height: 70px; border-radius: 8px; border: 2px solid rgba(255,255,255,0.3);
    background: white; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 900;
    animation: cardBounce 1.2s infinite ease-in-out;
}
.loading-card:nth-child(2) { animation-delay: 0.1s; }
.loading-card:nth-child(3) { animation-delay: 0.2s; }
.loading-card:nth-child(4) { animation-delay: 0.3s; }
.loading-card:nth-child(5) { animation-delay: 0.4s; }
.loading-card:nth-child(6) { animation-delay: 0.5s; }
@keyframes cardBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Los controles de formulario no heredan la fuente: sin esto salen en la del
   navegador (Arial en Windows, Helvetica en iOS) y la página mezcla dos. */
button, input, select, textarea { font-family: inherit; }

/* ===== ICONOS =====
   Dibujos de linea (componente Icono). Heredan el color y el tamaño del texto
   en el que van; el desplazamiento los asienta sobre la linea base. */
.icono { width: 1.2em; height: 1.2em; vertical-align: -0.22em; flex: none; }
/* Botones que son solo un icono: centrado, sin depender de la linea base. */
.btn-sug, .btn-mute, .btn-refresh { display: inline-flex; align-items: center; justify-content: center; }

/* ===== MEDALLAS =====
   Disco de oro, plata o bronce con el numero dentro (componente Medalla). El
   color solo no bastaba para distinguirlas. */
.medalla { width: 1.25em; height: 1.25em; vertical-align: -0.27em; flex: none; }
.medalla circle { fill: var(--medalla); }
.medalla text { fill: #1c1606; font-size: 12px; font-weight: 900; }
.medalla-1 { --medalla: var(--acento); }
.medalla-2 { --medalla: #c9ced8; }
.medalla-3 { --medalla: #d08a52; }

/* ===== BUTTONS ===== */
button { cursor: pointer; border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 600; transition: all 0.15s; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
/* Dorado liso con sombra dura: se lee como una tecla, y al pulsar baja. */
.btn-primary, .btn-discard {
    background: var(--acento); color: var(--sobre-acento);
    padding: 0.6rem 1.5rem; border: 1px solid transparent; border-radius: 12px;
    font-weight: 700; box-shadow: 0 4px 0 rgba(0,0,0,0.35);
}
.btn-primary:hover:not(:disabled), .btn-discard:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:active:not(:disabled), .btn-discard:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.btn-secondary {
    background: transparent; color: var(--texto);
    padding: 0.6rem 1.5rem; border: 1.5px solid var(--linea-fuerte); border-radius: 12px;
}
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.08); }
/* 44 px como minimo, lo que ocupa un dedo: con el relleno y la letra de arriba se
   quedaban en 41 («Jugar contra bots», «Siguiente ronda»...). */
.btn-primary, .btn-secondary { min-height: 44px; }
/* Verde y rojo mas oscuros: el blanco sobre #4CAF50 daba 2,8:1 y sobre
   #e53935 4,2:1; ahora 5,1:1 y 5:1. */
.btn-join {
    background: transparent; color: var(--acento);
    border: 1.5px solid var(--acento); border-radius: 12px;
    padding: 0.4rem 1rem; font-size: 0.85rem; min-height: 44px;
}
.btn-join:hover:not(:disabled) { background: rgba(240,192,64,0.12); }
/* Descartar es la jugada, no algo peligroso: va como accion principal. El rojo
   queda para salir de la mesa (.btn-danger). */
.btn-discard {
    padding: 0.7rem 2rem; font-size: 1rem; margin-top: 0.5rem;
    min-height: 48px;
}
.btn-pass { padding: 0.7rem 2rem; font-size: 1rem; margin-top: 0.5rem; min-height: 48px; }
/* El mismo ancho en los dos estados: el boton no cambia de forma al seleccionar. */
.btn-pass, .btn-discard { min-width: min(100%, 17rem); }
/* 44 px para el dedo (media 39×29). El margen negativo le quita lo que le sobra a la
   fila del titulo, que se queda con el alto de antes. */
.btn-refresh {
    background: transparent; color: #aaa; font-size: 1.2rem; padding: 0;
    width: 44px; height: 44px; margin: -7px -2px -7px 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
}
.btn-refresh:hover { color: #f0c040; transform: rotate(180deg); }
.btn-start {
    animation: pulse 2s infinite;
}
/* Un boton apagado que late pide que lo pulses y no se puede. */
.btn-start:disabled { animation: none; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240,192,64,0.4); }
    50% { box-shadow: 0 0 0 10px rgba(240,192,64,0); }
}

/* ===== INPUTS ===== */
.name-input {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px; color: #e0e0e0; padding: 0.5rem 1rem; font-size: 1rem;
    outline: none; transition: border-color 0.2s;
    width: 100%; min-height: 44px;
    box-sizing: border-box;
}
.name-input:focus { border-color: #f0c040; }
.name-input::placeholder { color: var(--texto-suave); }

/* ===== LOBBY ===== */
.lobby {
    max-width: 700px; margin: 0 auto; padding: 2rem 1rem;
    display: flex; flex-direction: column; gap: 1.5rem;
}
.lobby-header { text-align: center; }
.game-title {
    font-family: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
    font-size: clamp(2rem, 9vw, 4rem); font-weight: 900; letter-spacing: 0.2em;
    background: linear-gradient(135deg, #f0c040, #ff6b35);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.mirror-k { display: inline-block; transform: scaleX(-1); margin-left: -0.24em; }
.game-subtitle { color: #888; font-size: 1.1rem; margin-top: 0.3rem; }
/* Abanico de adorno bajo el logo, sobre el mismo tapete que la mesa. */
.lobby-abanico {
    background: var(--tapete); border-radius: 22px; padding: 1.1rem 1rem 0.9rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
    box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.12);
}
/* El margen de abajo es el sitio que ocupan las cartas de los extremos: giradas,
   bajan 14 px mas que su caja y se echaban encima del pie. */
.abanico-cartas { display: flex; justify-content: center; align-items: flex-end; height: 100px; margin-bottom: 14px; }
.abanico-cartas .card {
    width: 58px; height: 84px; margin: 0 -5px; padding: 4px; border-radius: 9px;
    cursor: default; pointer-events: none; transform-origin: 50% 100%;
}
.abanico-cartas .card .card-letter { font-size: 0.85rem; }
.abanico-cartas .card .card-figure { font-size: 2.5rem; }
.abanico-cartas .card:nth-child(1) { transform: rotate(-16deg) translateY(6px); }
.abanico-cartas .card:nth-child(2) { transform: rotate(-8deg) translateY(1px); }
.abanico-cartas .card:nth-child(4) { transform: rotate(8deg) translateY(1px); }
.abanico-cartas .card:nth-child(5) { transform: rotate(16deg) translateY(6px); }
.abanico-pie { font-size: 0.82rem; font-weight: 600; color: #d5dee8; text-align: center; }

/* La etiqueta encima del campo: en una fila, a 360 px el campo se quedaba en
   la mitad del ancho. */
.player-name-section { display: flex; flex-direction: column; gap: 0.35rem; }
.player-name-section label { font-size: 0.8rem; font-weight: 700; color: var(--texto-suave); }
.player-name-section .name-input {
    min-height: 52px; border-radius: 14px; font-size: 1.05rem;
    background: var(--panel); border: 1.5px solid var(--linea-fuerte);
}
.player-name-section.needs-name .name-input { border-color: #f0a868; box-shadow: 0 0 0 2px rgba(240,168,104,0.35); }
.name-hint { color: #f0a868; font-size: 0.9rem; margin-top: -0.9rem; }
.info-msg {
    background: rgba(100,181,246,0.12); border: 1px solid rgba(100,181,246,0.35);
    border-radius: 8px; padding: 0.6rem 1rem; color: #bbdefb; font-size: 0.9rem;
}
.lobby-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.lobby-actions .btn-secondary { padding: 0.6rem 1.2rem; }
/* En el movil no caben en una fila: antes saltaban a dos, cada uno con su
   ancho. Apilados y al ancho completo se leen como una lista de dos opciones. */
@media (max-width: 480px) {
    .lobby-actions { flex-direction: column; }
    .lobby-actions > button { width: 100%; }
}
.create-form {
    display: flex; gap: 0.8rem; align-items: center;
    background: rgba(255,255,255,0.05); border-radius: 12px; padding: 1rem 1.5rem;
    flex-wrap: wrap;
}
.create-form .name-input { flex: 1; min-width: 200px; }
.games-section { display: flex; flex-direction: column; gap: 1rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; }
.section-header h2 {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--texto-suave);
}
.games-list { display: flex; flex-direction: column; gap: 0.7rem; }
.game-card {
    background: var(--panel); border: 1px solid transparent;
    border-radius: 16px; padding: 0.9rem 1.1rem;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    transition: border-color 0.2s;
}
.game-card:hover { border-color: rgba(240,192,64,0.3); }
.game-info { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.game-name { font-weight: 700; font-size: 1rem; }
/* --texto-suave y no #888: sobre un panel el gris daba 4:1 (minimo 4,5). */
.game-creator { font-size: 0.8rem; color: var(--texto-suave); }
.game-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; }
.player-count { font-size: 0.85rem; color: #aaa; }
.game-status { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 20px; }
.game-status.waiting { background: rgba(76,175,80,0.2); color: #81C784; }
.game-status.playing { background: rgba(33,150,243,0.2); color: #64B5F6; }
.game-status.finished { background: rgba(158,158,158,0.2); color: #9E9E9E; }
.empty-list {
    color: var(--texto-suave); text-align: center; padding: 2rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
}
.loading { color: var(--texto-suave); text-align: center; padding: 2rem; }

/* Partida inexistente, sin asiento o sin conexion: explica y da salida. */
.room-problem {
    background: rgba(255,255,255,0.05); border-radius: 16px;
    padding: 2rem 1.5rem; margin-top: 2rem; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
}
.room-problem-title { font-size: 1.4rem; font-weight: 700; }
.room-problem p { color: var(--texto-suave); max-width: 40ch; line-height: 1.45; }
.room-problem-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.room-problem-actions button { min-height: 44px; }
.error-msg {
    background: rgba(229,57,53,0.15); border: 1px solid rgba(229,57,53,0.3);
    border-radius: 8px; padding: 0.6rem 1rem; color: #EF9A9A; font-size: 0.9rem;
}

/* ===== GAME ROOM ===== */
.game-room {
    max-width: 900px; margin: 0 auto; padding: 1rem;
    display: flex; flex-direction: column; gap: 1rem; min-height: 100vh;
}
.game-header {
    display: flex; align-items: center; gap: 0.8rem; flex-wrap: nowrap;
    background: rgba(255,255,255,0.05); border-radius: 12px; padding: 0.6rem 0.9rem;
}
/* Crece y absorbe el truncado; min-width:0 es lo que permite que el
   text-overflow del titulo funcione dentro de un flex item.
   Envuelve en vez de recortar: con `overflow:hidden` y los distintivos a
   `flex:none`, el caso de espectador (titulo + ronda + meta + "Modo
   espectador") tiraba el titulo a ancho cero y cortaba "Meta 5" por la mitad. */
.game-header-main {
    display: flex; align-items: center; flex-wrap: wrap;
    column-gap: 0.5rem; row-gap: 0.3rem;
    flex: 1 1 auto; min-width: 0;
}
.game-header-actions {
    display: flex; align-items: center; gap: 0.6rem;
    flex: 0 0 auto; margin-left: auto;
}
/* Un titulo de dos palabras envolvia y empujaba el "?" a una fila propia.
   El min-width evita que se colapse a nada cuando hay muchos distintivos. */
.game-title-small {
    font-size: 1.05rem; font-weight: 700;
    flex: 0 1 auto; min-width: 4.5rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.round-badge {
    background: rgba(240,192,64,0.15); color: #f0c040;
    padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
}

/* ===== DECK ===== */
.deck-view { display: flex; align-items: center; gap: 0.8rem; }
.deck-stack { position: relative; width: 50px; height: 70px; }
.deck-card-back {
    position: absolute; width: 44px; height: 62px; border-radius: 6px;
    background: repeating-linear-gradient(
        45deg, #16213e 0px, #16213e 4px, #1a1a2e 4px, #1a1a2e 8px
    );
    border: 1.5px solid #3a3a5c;
}
.deck-count { font-size: 0.85rem; color: #aaa; white-space: nowrap; }
.deck-view { flex: none; }

/* En movil el mazo a 50x70 marcaba el alto de la cabecera y, entre dibujo y
   texto, se llevaba ~100px de ancho: con eso el titulo se truncaba a "T.".
   Primero se quito solo el dibujo; la cuenta ("492 cartas") seguia cortando
   el nombre de la mesa y no informa ninguna decision: el mazo no se agota. */
@media (max-width: 560px) {
    .deck-view { display: none; }
    .game-title-small { font-size: 0.95rem; }
    .round-badge, .target-badge { font-size: 0.75rem; padding: 0.15rem 0.5rem; }
}
/* Los distintivos no se encogen: el que trunca es el titulo. */
.round-badge, .target-badge, .spectator-badge, .spectator-count { flex: none; }

/* ===== WAITING ROOM ===== */
.waiting-room {
    background: rgba(255,255,255,0.05); border-radius: 16px;
    padding: 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.waiting-room h2 { font-size: 1.5rem; font-weight: 700; }
.players-waiting { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; max-width: 300px; }
.waiting-player {
    display: flex; align-items: center; gap: 0.8rem;
    background: rgba(255,255,255,0.05); border-radius: 8px; padding: 0.5rem 1rem;
}
.player-dot { color: #4CAF50; }
.waiting-info { color: var(--texto-suave); font-size: 0.9rem; }
.waiting-msg { color: var(--texto-suave); font-style: italic; }
.waiting-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.waiting-actions button { padding: 0.6rem 1.5rem; font-size: 0.9rem; height: 3rem; }
.player-tag { font-size: 0.75rem; color: var(--texto-suave); }
.tag-bot { background: rgba(240,192,64,0.15); color: #f0c040; border-radius: 4px; padding: 1px 6px; }
.player-medals { display: flex; gap: 0.4rem; align-items: center; margin-left: auto; }
/* A 0,78rem los tres emojis de medalla eran el mismo circulo. */
.player-medals span {
    display: inline-flex; align-items: center; gap: 0.2rem;
    font-size: 0.95rem; white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* ===== OTHER PLAYERS ===== */
.other-players {
    display: grid; grid-template-columns: 1fr; gap: 0.4rem;
    background: rgba(255,255,255,0.03); border-radius: 12px; padding: 0.6rem;
}
/* En pantallas anchas caben dos columnas sin perder legibilidad. */
@media (min-width: 720px) {
    .other-players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.other-player {
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 0.45rem 0.6rem;
    display: flex; align-items: center; gap: 0.45rem;
    min-width: 0;
    transition: border-color 0.2s, background 0.2s;
}
.other-player.active-turn {
    border-color: #f0c040;
    background: rgba(240,192,64,0.10);
    box-shadow: 0 0 0 2px rgba(240,192,64,0.18);
    animation: turn-pulse-row 1.6s ease-in-out infinite;
}
/* Halo contenido: las filas van a 0.4rem, uno mas ancho invadiria la vecina. */
@keyframes turn-pulse-row {
    0%, 100% { box-shadow: 0 0 0 2px rgba(240,192,64,0.18); }
    50%       { box-shadow: 0 0 0 4px rgba(240,192,64,0.07); }
}
@keyframes turn-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(240,192,64,0.18); }
    50%       { box-shadow: 0 0 0 6px rgba(240,192,64,0.06); }
}
.other-player.is-ready { border-color: rgba(76,175,80,0.28); }
/* Marca de estado: ancho fijo para que los nombres queden alineados. */
.op-mark {
    flex: none; width: 0.9rem; text-align: center;
    font-size: 0.8rem; color: var(--texto-suave); line-height: 1;
}
.other-player.active-turn .op-mark { color: #f0c040; }
.other-player.is-ready  .op-mark { color: #81C784; }

.other-player-name {
    font-weight: 600; font-size: 0.9rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    min-width: 0;
}
/* Empuja el estado al extremo derecho de la fila. */
.op-state { margin-left: auto; flex: none; }

.turn-badge {
    background: #f0c040; color: #1a1a2e; border-radius: 20px;
    padding: 0.1rem 0.5rem; font-size: 0.75rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 3px;
}
.ready-badge {
    background: rgba(76,175,80,0.2); color: #81C784; border-radius: 20px;
    padding: 0.1rem 0.5rem; font-size: 0.75rem; font-weight: 700;
    white-space: nowrap;
}
.ready-badge.pass { background: rgba(255,255,255,0.08); color: var(--texto-suave); }
.thinking-badge {
    font-size: 0.75rem; color: var(--texto-suave); font-style: italic; white-space: nowrap;
}
.discard-info { font-size: 0.8rem; color: var(--texto-suave); }

/* ===== ASIENTOS =====
   Los rivales arriba de tu zona, como al otro lado de la mesa (hasta 8; con mas
   van en la lista de arriba, debajo de tu zona). Mismo marcado que la lista. */
.op-avatar { display: none; }
.other-players.asientos {
    grid-template-columns: repeat(var(--columnas), minmax(0, 7.5rem));
    justify-content: center; gap: 0.4rem;
    background: none; padding: 0;
}
.asientos .other-player {
    flex-direction: column; align-items: center; gap: 0.2rem;
    padding: 0.5rem 0.3rem; border-radius: 14px; text-align: center;
    background: var(--panel); border-color: transparent;
}
.asientos .other-player.is-ready { border-color: rgba(76,175,80,0.35); }
.asientos .other-player.active-turn { border-color: var(--acento); background: var(--panel); }
.asientos .op-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 2.1rem; height: 2.1rem; border-radius: 50%;
    background: var(--linea); color: var(--texto);
    font-weight: 900; font-size: 0.95rem; line-height: 1;
}
.asientos .other-player.active-turn .op-avatar { background: var(--acento); color: var(--sobre-acento); }
.asientos .op-mark { display: none; }
.asientos .other-player-name { max-width: 100%; font-size: 0.85rem; }
.asientos .op-state { margin-left: 0; }
.asientos .op-state > span { font-size: 0.7rem; }
.asientos .player-medals { margin-left: 0; gap: 0.3rem; }
.asientos .player-medals span { font-size: 0.75rem; }
/* En dos filas no hay sitio para las medallas: estan en el panel de la sesion. */
.asientos-muchos .player-medals { display: none; }
.asientos-muchos .op-avatar { width: 1.8rem; height: 1.8rem; font-size: 0.85rem; }
/* «Bot» lo dice el robot del avatar; la etiqueta queda para los lectores de pantalla. */
.asientos .tag-bot {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ===== MY AREA ===== */
.my-area {
    background: var(--tapete); border: 2px solid transparent;
    border-radius: 20px; padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem;
    box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.12);
    transition: border-color 0.2s;
}
/* En tu turno cambia el borde, no el fondo: el tapete es siempre el mismo. */
.my-area.active-turn {
    border-color: var(--acento);
    box-shadow: 0 0 0 3px rgba(240,192,64,0.18);
    animation: turn-pulse 1.6s ease-in-out infinite;
}
.my-area-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.my-name { font-weight: 700; font-size: 1.1rem; }
/* La cabecera de la partida es el h1 de la pagina; se ve como antes. */
h1.game-title-small { color: inherit; }
.turn-indicator { padding: 0.25rem 0.8rem; border-radius: 20px; font-size: 0.85rem; font-weight: 700; }
.turn-indicator.my-turn { background: var(--acento); color: var(--sobre-acento); animation: pulse 1.5s infinite; }
/* El claro de los textos del tapete (pista, escala): #aaa se quedaba en 4,47:1. */
.turn-indicator.waiting-turn { background: rgba(255,255,255,0.08); color: #d5dee8; }
.turn-indicator.revealing { background: rgba(33,150,243,0.2); color: #64B5F6; }
.turn-countdown { display: flex; align-items: center; gap: 0.4rem; }
.countdown-secs { font-size: 0.8rem; color: #bbb; min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.countdown-bar { width: 72px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.countdown-fill { height: 100%; border-radius: 2px; transition: width 0.25s linear, background 1s; }
.countdown-ok      { background: #43A047; }
.countdown-warn    { background: #f0c040; }
.countdown-danger  { background: #e53935; }

/* ===== HAND ===== */
.hand-view { display: flex; flex-direction: column; gap: 1rem; }
/* Centradas: en pantalla ancha las cartas llegan a su tope (110 px) y, pegadas a
   la izquierda, dejaban media mesa vacia. En el movil llenan el ancho y da igual. */
.hand-cards { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; justify-content: center; }

/* Las cartas de la mano se reparten el ancho disponible en vez de dejar hueco
   a los lados. Solo aqui: en resultados y en la ayuda siguen a tamaño fijo.
   La letra y la figura van en cqw (de ahi el container-type) para que escalen
   con la carta; con tamaños fijos se quedaban pequeñas al crecer esta. */
.hand-cards .card {
    flex: 1 1 0;
    width: auto; height: auto;
    aspect-ratio: 7 / 10;
    max-width: 110px;
    container-type: inline-size;
}
.hand-cards .card .card-letter     { font-size: 32cqw; }
.hand-cards .card .card-figure     { font-size: 76cqw; }
/* Con 13cqw el codigo de color medía 6 px en una carta de movil: ilegible
   justo para quien lo necesita. */
.hand-cards .card .card-color-code { font-size: max(9px, 18cqw); top: 4%; right: 4%; }
.discard-controls { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.discard-hint { font-size: 0.85rem; color: #d5dee8; text-align: center; }

/* ===== CARD ===== */
.card {
    width: 70px; height: 100px; border-radius: 10px;
    background: white; border: 2px solid #ddd;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 5px; cursor: pointer; user-select: none;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.5);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative; overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.card[role="button"]:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }
/* Solo donde hay puntero: en un movil el :hover se queda pegado a lo ultimo que
   se toco, y una carta deseleccionada seguia 6 px mas alta que las demas. */
@media (hover: hover) {
    .card:hover:not(.face-down) { transform: translateY(-6px); box-shadow: 2px 8px 16px rgba(0,0,0,0.6); }
}
.card.selected {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 12px 24px rgba(240,192,64,0.5);
    border-color: #f0c040 !important;
}
.card.dragging { opacity: 0.5; transform: scale(0.95); }
.card.face-down { background: #16213e; border-color: #3a3a5c; cursor: default; }
.card.face-down:hover { transform: none; }
.card.dealing {
    animation: deal-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    animation-delay: calc(var(--deal-i, 0) * 0.1s);
}
@keyframes deal-in {
    0%   { opacity: 0; transform: translateY(70px) scale(0.65) rotate(-5deg); }
    65%  { opacity: 1; transform: translateY(-7px) scale(1.04) rotate(1deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

.card-corner { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.card-corner.rotated { align-items: flex-end; transform: rotate(180deg); align-self: flex-end; }
.card-letter { font-size: 1rem; font-weight: 900; line-height: 1; }
.card-figure-center {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.card-figure { font-size: 3.5rem; line-height: 1; }
.card-back-pattern {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        45deg, #16213e 0px, #16213e 4px, #1e1e3a 4px, #1e1e3a 8px
    );
    border-radius: 8px;
}
.card-back-pattern::after {
    content: 'T'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem; font-weight: 900; color: rgba(240,192,64,0.3);
}

/* Card colors */
.color-red    .card-letter, .color-red    .card-figure { color: #e53935; }
.color-green  .card-letter, .color-green  .card-figure { color: #43A047; }
.color-blue   .card-letter, .color-blue   .card-figure { color: #1E88E5; }
.color-black  .card-letter, .color-black  .card-figure { color: #212121; }
.color-magenta .card-letter, .color-magenta .card-figure { color: #9C27B0; }
.color-cyan   .card-letter, .color-cyan   .card-figure { color: #0097A7; }
.color-orange .card-letter, .color-orange .card-figure { color: #F57C00; }
.color-brown  .card-letter, .color-brown  .card-figure { color: #795548; }

/* Color tinted card backgrounds */
.color-red    { background: linear-gradient(160deg, #fff8f8, #fff); border-color: #ffcdd2; }
.color-green  { background: linear-gradient(160deg, #f8fff8, #fff); border-color: #c8e6c9; }
.color-blue   { background: linear-gradient(160deg, #f8f8ff, #fff); border-color: #bbdefb; }
.color-black  { background: linear-gradient(160deg, #f5f5f5, #fff); border-color: #bdbdbd; }
.color-magenta { background: linear-gradient(160deg, #fdf4ff, #fff); border-color: #e1bee7; }
.color-cyan   { background: linear-gradient(160deg, #f0ffff, #fff); border-color: #b2ebf2; }
.color-orange { background: linear-gradient(160deg, #fff7f0, #fff); border-color: #ffe0b2; }
.color-brown  { background: linear-gradient(160deg, #faf5f2, #fff); border-color: #d7ccc8; }

/* ===== MODO DALTONICO =====
   El color es 1 de los 3 atributos que puntuan y el unico sin glifo propio.
   El codigo va en gris neutro a proposito: si dependiera del tono no serviria
   para lo que existe. Se activa desde el modal de ayuda (AccessibilityService). */
.card-color-code {
    display: none;
    position: absolute; top: 3px; right: 4px;
    font-size: 0.58rem; font-weight: 900; line-height: 1;
    color: #263238;
    background: rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.22);
    border-radius: 4px;
    padding: 1px 3px;
}
body.colorblind .card-color-code { display: block; }

/* Leyenda de codigos en la ayuda: solo estorba si no se usan. */
.cb-code { display: none; font-weight: 800; font-size: 0.78em; opacity: 0.75; }
body.colorblind .cb-code { display: inline; }

.help-accessibility {
    display: flex; align-items: flex-start; gap: 0.6rem;
    cursor: pointer; line-height: 1.35;
}
.help-accessibility input { margin-top: 0.2rem; flex-shrink: 0; }

/* ===== RESULTS ===== */
.results-view {
    display: flex; flex-direction: column; gap: 1.5rem;
    max-width: 860px; margin: 0 auto; padding: 1rem;
}
.results-header { text-align: center; }
.results-kicker {
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--texto-suave);
}
.scale-hint {
    color: var(--texto-suave); font-size: 0.8rem; line-height: 1.35;
    margin: 0 auto; max-width: 42ch; text-align: center;
}
.scale-hint strong { color: var(--texto); }

/* Puesto en la escala de jugadas, pegado al nombre de la jugada. Mas apagado
   que el nombre: acompana, no compite con el. */
.grp-ladder {
    margin-left: 0.4rem; padding: 0.05rem 0.35rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--gc, #f3f2ec) 22%, transparent);
    font-size: max(12px, 0.86em); font-weight: 800; font-variant-numeric: tabular-nums;
    opacity: 0.9;
}

/* Resumen de ronda: lo primero que se ve, sin scroll. */
.round-summary {
    background: var(--panel);
    border-radius: 18px; padding: 1rem 1.1rem;
    display: flex; flex-direction: column; gap: 0.6rem;
}
/* El titular de la pantalla: como te ha ido. */
.rs-titular { font-size: 1.45rem; font-weight: 800; line-height: 1.2; }
.rs-titular .icono { color: var(--acento); }
.rs-mine {
    display: flex; align-items: center; flex-wrap: wrap;
    column-gap: 0.6rem; row-gap: 0.2rem;
}
.rs-position { font-size: 1.05rem; font-weight: 800; }
.rs-play {
    background: rgba(255,255,255,0.1); border: 1px solid transparent;
    color: var(--texto); border-radius: 999px;
    padding: 0.1rem 0.6rem; font-size: 0.85rem; font-weight: 700;
}
.rs-score { margin-left: auto; color: #9aa0aa; font-size: 0.85rem; white-space: nowrap; }

.results-list { display: flex; flex-direction: column; gap: 0.8rem; }

.result-entry {
    background: var(--panel); border: 1px solid transparent;
    border-radius: 14px; padding: 1rem 1.2rem;
    display: flex; flex-direction: column; gap: 0.7rem;
}
/* El dorado dice dos cosas y no las mezcla: el aro, que la fila es tuya; el
   numero del puesto, quien gana. Antes las dos llevaban borde dorado. */
.result-entry.my-result { box-shadow: inset 0 0 0 2px var(--acento); }

.result-player-header {
    display: flex; align-items: center; gap: 0.7rem;
}
.rank-medal {
    font-size: 1.3rem; font-weight: 900; line-height: 1; min-width: 2rem;
    color: var(--texto-suave); font-variant-numeric: tabular-nums;
}
.rank-1 .rank-medal { color: var(--acento); }
.result-player-name { font-weight: 700; font-size: 1rem; }

/* --- Cards row --- */
.result-cards-row {
    display: flex; gap: 5px; flex-wrap: wrap; align-items: flex-end;
    padding-bottom: 4px;
}

/* Slot wrapper for each card */
.rc-slot { display: flex; flex-direction: column; align-items: center; gap: 3px; }

/* Grouped card: colored outline + underline bar */
.rc-slot.rc-grouped .card {
    outline: 2.5px solid var(--gc);
    outline-offset: 2px;
    box-shadow: 0 0 8px color-mix(in srgb, var(--gc) 40%, transparent),
                2px 3px 8px rgba(0,0,0,0.5);
}
.rc-slot.rc-grouped::after {
    content: '';
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: var(--gc);
}

/* El segundo grupo, a trazos: se distingue del primero sin depender del color. */
.rc-slot.rc-grouped.rc-g1 .card { outline-style: dashed; }

/* Mano plegada (mesas grandes): una linea con puesto, nombre y jugada. */
.result-entry.result-collapsed {
    flex-direction: row; align-items: center; gap: 0.6rem;
    padding: 0.55rem 0.9rem; width: 100%; min-height: 48px;
    color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.result-entry.result-collapsed:hover { background: rgba(255,255,255,0.09); }
.result-collapsed .rank-medal { font-size: 1.1rem; min-width: 2rem; text-align: center; }
/* Cuando no cabe todo, encoge el nombre de la jugada y no el del jugador: antes
   era al reves y con «Doble Pareja Mixta» el jugador se quedaba en «Del…». El
   nombre del jugador solo se corta si pasa de media fila; el puesto en la escala
   no se corta nunca. */
.result-collapsed .result-player-name {
    flex: 0 0 auto; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.result-collapsed .rc-hand {
    flex: 0 1 auto; min-width: 0; margin-left: auto;
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.85rem; color: var(--texto);
}
.rc-hand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-collapsed .grp-ladder { flex: none; margin-left: 0; }
.result-collapsed .rc-caret { flex: none; color: #888; }
.btn-open-all { align-self: center; }

/* Disable the default hover lift inside results */
.result-entry .card { box-shadow: 1px 2px 5px rgba(0,0,0,0.4); }
@media (hover: hover) {
    .result-entry .card:hover { transform: translateY(-3px) !important; }
}

/* --- Badges --- */
.result-badges {
    display: flex; gap: 0.4rem; flex-wrap: wrap;
}
.grp-badge {
    display: inline-flex; align-items: center;
    padding: 0.18rem 0.75rem;
    border-radius: 20px;
    border: 1.5px solid var(--gc, #888);
    color: var(--gc, #888);
    background: color-mix(in srgb, var(--gc, #888) 12%, transparent);
    font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
/* Solo la cursiva: el color y el borde son los de .grp-hand-name, que va despues
   (un --gc gris y un borde a trazos que habia aqui no se pintaban nunca). */
.grp-badge.grp-nojugada { font-style: italic; }
/* El nombre de la jugada, en neutro y relleno: antes iba en morado, que competia
   con el dorado y es casi el magenta de las cartas (un atributo que puntua). Las
   pastillas de cada grupo siguen con su borde, asi no se confunden con esta. */
.grp-badge.grp-hand-name {
    --gc: #f3f2ec;
    border-color: transparent;
    background: rgba(255,255,255,0.1);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}
/* La que despliega sus grupos es un boton de 44 px para el dedo, pero la fila no
   crece: el margen negativo se come lo que sobra y la pastilla que se ve es el
   ::before, 9 px mas corto por arriba y por abajo (26 px, como la que no se toca). */
.grp-badge.grp-hand-name.expandable {
    position: relative; isolation: isolate;
    min-height: 44px; margin: -9px 0; padding-block: 0; border: none;
    background: transparent; font-style: inherit; line-height: inherit;
    cursor: pointer; user-select: none;
}
.grp-badge.grp-hand-name.expandable::before {
    content: ""; position: absolute; inset: 9px 0; z-index: -1;
    border-radius: 20px; background: rgba(255,255,255,0.1);
}
.grp-badge.grp-hand-name.expandable:focus-visible { outline: none; }
.grp-badge.grp-hand-name.expandable:focus-visible::before { outline: 2px solid var(--foco); outline-offset: 2px; }
.grp-caret {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.15rem; height: 1.15rem; margin-left: 0.4rem;
    border-radius: 50%;
    background: var(--gc, #f3f2ec);
    color: var(--fondo);
    font-size: 0.72rem; line-height: 1; font-style: normal;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--gc, #f3f2ec) 30%, transparent);
    transition: transform 0.18s ease;
}
.grp-caret.open { transform: rotate(180deg); }
.my-play-badge {
    display: flex; align-items: center; gap: 0.5rem;
    flex-wrap: wrap; margin: 0.1rem 0 0.6rem;
}
.my-play-label { font-size: 0.78rem; color: #d5dee8; font-weight: 600; }

/* La escala de las 16 jugadas bajo la tuya: «9/16» solo no decia si eso era
   mucho o poco, ni hacia donde se mejora. Se llena de la peor a la mejor. */
.escala-jugada { flex-basis: 100%; display: flex; flex-direction: column; gap: 0.3rem; }
.escala-pasos { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; }
.escala-paso { height: 7px; border-radius: 2px; background: rgba(255,255,255,0.18); }
.escala-paso.subido { background: var(--acento); }
.escala-extremos {
    display: flex; justify-content: space-between;
    font-size: 0.72rem; font-weight: 600; color: #d5dee8;
}
.grp-breakdown {
    display: flex; gap: 0.4rem; flex-wrap: wrap;
    flex-basis: 100%; margin-top: 0.35rem;
}

.btn-share {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 1rem; min-height: 44px;   /* media 29 px de alto: no cabia un dedo */
    border-radius: 22px;
    border: 1.5px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.06);
    color: #e8e8ec;
    font-size: 0.78rem; font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-share:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); }
.share-notice { font-size: 0.78rem; color: #9aa0aa; align-self: center; }

/* Continue */
.continue-section {
    background: var(--panel); border-radius: 18px;
    padding: 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.continue-prompt { font-size: 1.1rem; font-weight: 600; }
.continue-buttons { display: flex; gap: 1rem; }
.waiting-others { color: var(--texto-suave); }
.continue-deadline { color: #aaa; font-size: 0.9rem; margin: 0; font-variant-numeric: tabular-nums; }
.continue-deadline-mine { color: #f0c040; }

/* ===== MOBILE ===== */
@media (max-width: 480px) {
    .game-room { padding: 0.5rem; }

    /* El tapete va de lado a lado: comerse el margen de la pagina es lo que
       deja crecer las cartas de 56 a 63 px a 360 de ancho. */
    .my-area { margin-inline: -0.5rem; padding: 1rem 0.6rem; }

    /* Cartas más pequeñas. La figura iba a 3,9rem (62 px) en una carta de
       54: más grande que en escritorio, y tapaba las letras de las esquinas. */
    .card {
        width: 54px; height: 78px;
        border-radius: 8px; padding: 3px;
    }
    .card-letter { font-size: 0.75rem; }
    .card-figure  { font-size: 2.6rem; }
    .card-color-code { font-size: 0.6rem; top: 2px; right: 2px; padding: 1px 2px; }

    /* Mano: una fila sin wrap. Sin overflow-x: auto: recortaba por arriba la
       carta seleccionada (sube 12 px), y las cinco caben de sobra a 360 px
       porque se reparten el ancho (flex: 1 1 0). */
    .hand-cards {
        flex-wrap: nowrap;
        gap: 0.3rem;
    }

    /* Resultados: una fila sin wrap */
    .result-cards-row {
        flex-wrap: nowrap;
        gap: 3px;
        overflow-x: auto;
    }
}

/* ===== HELP BUTTON ===== */
/* 44 px como minimo: es el tamaño de un dedo (a 360 px de ancho medían 32). */
.btn-help {
    width: clamp(44px, 7.5vw, 3.2rem); height: clamp(44px, 7.5vw, 3.2rem); border-radius: 50%;
    border: 1.5px solid var(--linea-fuerte); background: var(--panel);
    color: var(--texto); font-weight: 900; font-size: clamp(1.1rem, 4.5vw, 1.8rem);
    cursor: pointer; line-height: 1; flex-shrink: 0;
    transition: border-color 0.15s;
}
.btn-help:hover { border-color: var(--texto); }

.lobby-header { display: flex; flex-direction: column; align-items: center; }
.lobby-title-row { display: flex; align-items: center; gap: 0.5rem; }

/* (la definicion de .game-header esta arriba; aqui solo el boton de sonido,
   que ya no necesita margin-left:auto porque lo aporta .game-header-actions) */
.btn-mute {
    background: transparent; border: none; font-size: 1.2rem; color: var(--texto);
    cursor: pointer; line-height: 1; padding: 0.2rem; opacity: 0.8;
    min-width: 44px; min-height: 44px;
    transition: opacity 0.15s;
}
.btn-mute:hover { opacity: 1; }

/* ===== HELP MODAL ===== */
.help-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.help-modal {
    background: #16213e; border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px; padding: 1.5rem;
    max-width: 640px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    position: relative;
    display: flex; flex-direction: column; gap: 1rem;
}
.help-close {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background: transparent; border: none; color: #bbb;
    font-size: 1.2rem; cursor: pointer; line-height: 1;
    min-width: 44px; min-height: 44px;
}
.help-logo { text-align: center; }
.help-accessibility-top {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 0.6rem 0.8rem; font-size: 0.9rem; color: #ddd;
}
.help-accessibility-top input { width: 20px; height: 20px; accent-color: #f0c040; }
.help-close:hover { color: #fff; }
.help-title { font-size: 1.4rem; font-weight: 900; color: #f0c040; margin: 0; }

.help-section h3 { font-size: 1rem; font-weight: 700; color: #f0c040; margin: 0 0 0.5rem; }
.help-section p  { margin: 0 0 0.4rem; font-size: 0.92rem; color: #ccc; line-height: 1.5; }

.help-params { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.5rem 0; }
.help-param  { display: flex; align-items: baseline; gap: 0.6rem; font-size: 0.9rem; }
.help-param-name { color: #f0c040; font-weight: 700; min-width: 60px; }
.help-param-vals { color: #ddd; }
.help-figures { font-size: 1.3rem; line-height: 1; }

.help-note { font-size: 0.85rem !important; color: #999 !important; }

.help-steps { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.35rem; }
.help-steps li { font-size: 0.92rem; color: #ccc; line-height: 1.5; }

.help-formula { text-align: center; font-size: 1.05rem; color: #f0c040; margin: 0.5rem 0 0.2rem !important; }
.help-formula-desc { text-align: center; font-size: 0.85rem !important; }

.help-table-wrap { overflow-x: auto; margin: 0.5rem 0; }
.help-table {
    width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.help-table th, .help-table td {
    padding: 0.4rem 0.7rem; text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.help-table th { color: #f0c040; font-weight: 700; background: rgba(255,255,255,0.04); }
.help-table td { color: #ddd; }
.help-table td:first-child { text-align: left; font-weight: 600; color: #eee; }
.help-table tbody tr:hover { background: rgba(255,255,255,0.04); }

.help-hands-table td:nth-child(1) { color: var(--texto-suave); font-size: 0.8rem; min-width: 20px; }
.help-hands-table td:nth-child(2) { font-weight: 600; color: #eee; white-space: nowrap; }
/* En movil la descripcion quedaba cortada a la derecha: se deja partir la
   jugada y se alinea el texto a la izquierda, que se lee mejor en varias lineas. */
@media (max-width: 480px) {
    .help-table th, .help-table td { padding: 0.4rem 0.4rem; }
    .help-hands-table td:nth-child(2) { white-space: normal; }
    .help-hands-table td:nth-child(3) { text-align: left; }
}
.help-hands-table .pts { color: #f0c040; font-weight: 700; text-align: right; }
.help-hands-table .row-special td { color: #f0c040; font-weight: 700; }
.help-hands-table .row-special td:nth-child(2) { color: #f5d060; }

/* ===== SUGERENCIAS ===== */
.btn-sug {
    width: clamp(44px, 7.5vw, 3.2rem); height: clamp(44px, 7.5vw, 3.2rem); border-radius: 50%;
    border: 1.5px solid var(--linea-fuerte); background: var(--panel);
    color: var(--texto); font-size: clamp(1.1rem, 4.5vw, 1.8rem);
    cursor: pointer; line-height: 1; flex-shrink: 0;
    transition: border-color 0.15s;
}
.btn-sug:hover { border-color: var(--texto); }

.sug-modal { max-width: 480px; }

.sug-form { display: flex; flex-direction: column; gap: 1rem; }
.sug-field { display: flex; flex-direction: column; gap: 0.4rem; }
.sug-label { font-size: 0.9rem; font-weight: 600; color: #bbb; }

.sug-select {
    width: 100%;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px; color: #e0e0e0; padding: 0.5rem 1rem; font-size: 1rem;
    outline: none; cursor: pointer; transition: border-color 0.2s;
    min-height: 44px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center;
}
.sug-select:focus { border-color: #64B5F6; }
.sug-select option { background: #16213e; color: #e0e0e0; }

.sug-form .name-input, .sug-select, .sug-form .sug-textarea { width: 100%; box-sizing: border-box; }

.sug-textarea { resize: vertical; min-height: 100px; font-family: inherit; font-size: 0.95rem; }
.sug-chars { font-size: 0.78rem; color: var(--texto-suave); text-align: right; }

.sug-actions { display: flex; gap: 0.8rem; justify-content: flex-end; margin-top: 0.5rem; }

.sug-success {
    display: flex; flex-direction: column; align-items: center;
    gap: 1rem; padding: 1.5rem 0; text-align: center;
}
.sug-success-icon {
    width: 3.5rem; height: 3.5rem; border-radius: 50%;
    background: rgba(76,175,80,0.2); border: 2px solid #81C784;
    color: #81C784; font-size: 1.8rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
}
.sug-success p { color: #ccc; font-size: 1rem; }

/* ===== BLAZOR ERROR ===== */
#blazor-error-ui {
    background: #b71c1c; bottom: 0; display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem;
    position: fixed; width: 100%; z-index: 1000; color: white; font-size: 0.9rem;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
/* El azul por defecto del enlace sobre este rojo daba 1,4:1. */
#blazor-error-ui a { color: #fff; font-weight: 700; }

/* ===== SESSION STATS ===== */
.session-stats {
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
}
.session-stats-title {
    margin: 0 0 0.8rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--texto-suave);
    font-weight: 600;
}
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.stats-table th {
    text-align: center;
    padding: 0.3rem 0.5rem;
    color: var(--texto-suave);
    font-weight: 600;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.stats-table th:first-child { text-align: left; }
.stats-table td {
    text-align: center;
    padding: 0.35rem 0.5rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.stats-table td:first-child { text-align: left; color: #e0e0e0; }
.stats-table tbody tr:last-child td { border-bottom: none; }
.stats-me td { color: #64b5f6 !important; font-weight: 600; }

/* ===== HELP MINI CARDS (ejemplos visuales) ===== */
.help-mini-card {
    display: inline-flex; flex-direction: column;
    align-items: center; justify-content: space-between;
    width: 34px; height: 48px;
    border-radius: 6px; border: 1.5px solid;
    padding: 3px 2px; box-sizing: border-box; flex-shrink: 0;
    position: relative;
}
/* A 34 px no cabe el recuadro que llevan las cartas de verdad, solo el texto. */
.hmc-cb {
    display: none;
    position: absolute; bottom: 1px; right: 2px;
    font-size: 0.45rem; font-weight: 900; line-height: 1; color: #37474f;
}
body.colorblind .hmc-cb { display: block; }
.hmc-lt  { font-size: 0.65rem; font-weight: 900; align-self: flex-start; line-height: 1; }
.hmc-fig { font-size: 1.3rem; line-height: 1; }
.color-red     .hmc-lt, .color-red     .hmc-fig { color: #e53935; }
.color-green   .hmc-lt, .color-green   .hmc-fig { color: #43A047; }
.color-blue    .hmc-lt, .color-blue    .hmc-fig { color: #1E88E5; }
.color-cyan    .hmc-lt, .color-cyan    .hmc-fig { color: #0097A7; }
.color-magenta .hmc-lt, .color-magenta .hmc-fig { color: #9C27B0; }

.help-examples-row {
    display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 0.5rem 0;
}
.help-example {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.help-mini-hand {
    display: flex; align-items: flex-end; gap: 4px;
}
.help-ex-plus { color: var(--texto-suave); font-size: 1.1rem; align-self: center; padding: 0 2px; }
.help-ex-label { font-size: 0.8rem; font-weight: 700; color: #f0c040; }
.help-ex-desc  { font-size: 0.75rem; color: var(--texto-suave); text-align: center; max-width: 130px; }

/* ===== RESPONSIVE RESULTS (mobile improvements) ===== */
.stats-table-wrap { overflow-x: auto; }

@media (max-width: 480px) {
    .result-entry { padding: 0.65rem 0.75rem; }
    .result-player-header { flex-wrap: wrap; gap: 0.4rem; }
    .result-player-name { font-size: 0.9rem; }
    .continue-section { padding: 1rem; }
    .continue-buttons { flex-direction: column; width: 100%; }
    .continue-buttons .btn-primary,
    .continue-buttons .btn-secondary { width: 100%; text-align: center; }
    .session-stats { padding: 0.65rem 0.75rem; }
    .results-header h2 { font-size: 1.4rem; }
}

/* ===== RECONEXIÓN ===== */
.reconnect-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    padding: 0.45rem 1rem; text-align: center;
    font-size: 0.88rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 0.8rem;
}
.reconnect-warn  { background: rgba(200,160,0,0.92); color: #1a1a2e; }
.reconnect-error { background: rgba(183,28,28,0.92); color: #fff; }
/* Naranja y no rojo: no es un error, es informacion de lo que ha pasado. */
.timeout-banner  { background: rgba(230,126,34,0.95); color: #1a1a2e; }
/* Los dos botones de los avisos miden 44 px para el dedo, pero el aviso no crece (taparia
   mas cabecera): el margen negativo se come lo que sobra. En «Recargar» el recuadro que
   se ve es el ::before, 10 px mas corto por arriba y por abajo que el boton. */
.btn-reload {
    position: relative; min-height: 44px; margin: -10px 0;
    padding: 0 0.7rem; border: none; background: transparent;
    color: inherit; cursor: pointer; font-weight: 700; font-size: 0.82rem;
}
.btn-reload::before {
    content: ""; position: absolute; inset: 10px 0; z-index: -1;
    border: 1.5px solid currentColor; border-radius: 4px;
}
.btn-dismiss {
    border: none; background: transparent; color: inherit;
    cursor: pointer; font-weight: 900; font-size: 0.9rem;
    padding: 0; line-height: 1; opacity: 0.75;
    min-width: 44px; min-height: 44px; margin: -12px -12px -12px 0;
}
.btn-dismiss:hover { opacity: 1; }
.btn-reload:hover::before { background: rgba(255,255,255,0.2); }

/* ===== FEEDBACK DE DESCARTE ===== */
.turn-indicator.discarded-ok { color: #81c784; font-weight: 600; font-size: 0.88rem; }

/* ===== EXPLICACIÓN DE RESULTADO (separadores de grupos) ===== */
.grp-sep { color: var(--texto-suave); font-size: 0.85rem; padding: 0 0.15rem; align-self: center; }

/* ===== VISTA DE DESCARTES ===== */
.discard-section {
    display: flex; flex-direction: column; gap: 4px;
}
.discard-section-label {
    font-size: 0.75rem; color: var(--texto-suave); font-weight: 600; letter-spacing: 0.02em;
}
.discard-pile-row {
    display: flex; gap: 3px; flex-wrap: wrap;
}
.discard-pile-row .card {
    width: 32px; height: 46px;
    border-radius: 5px; padding: 2px;
    opacity: 0.45; border-style: dashed;
    cursor: default; pointer-events: none;
    transform: none !important;
}
.discard-badge-result {
    margin-left: auto;
    font-size: 0.75rem; color: var(--texto-suave); font-weight: 600;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 0.1rem 0.45rem;
    white-space: nowrap;
}
.discard-badge-result.badge-timeout {
    color: #f0a868;
    background: rgba(230,126,34,0.14);
    border-color: rgba(230,126,34,0.45);
}

/* ===== PARTIDA A X VICTORIAS ===== */
.champion-banner {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    background: linear-gradient(135deg, rgba(255,200,0,0.15) 0%, rgba(255,140,0,0.10) 100%);
    border: 1.5px solid rgba(255,200,0,0.35);
    border-radius: 12px; padding: 1rem 1.5rem;
    margin-bottom: 0.8rem; flex-wrap: wrap; text-align: center;
}
.champion-icon { font-size: 2.2rem; line-height: 1; color: var(--acento); }
.champion-name { font-size: 1.5rem; font-weight: 800; color: #fcd34d; }
.champion-sub  { font-size: 0.9rem; color: var(--texto-suave); width: 100%; margin-top: -0.2rem; }

.target-badge {
    background: rgba(255,200,0,0.12); border: 1px solid rgba(255,200,0,0.3);
    border-radius: 10px; padding: 0.15rem 0.55rem;
    font-size: 0.82rem; font-weight: 700; color: #fcd34d;
    white-space: nowrap;
}

.create-form-row {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.1rem;
}
.create-form-label {
    font-size: 0.88rem; color: #aaa; white-space: nowrap; min-width: 2.5rem;
}
.create-form-select {
    flex: 1; padding: 0.45rem 0.6rem; min-height: 44px;
    background: #2a2a3e; color: #e8e8f0;
    border: 1.5px solid rgba(255,255,255,0.15); border-radius: 8px;
    font-size: 0.9rem; cursor: pointer;
}
.create-form-select:focus {
    outline: none; border-color: rgba(255,255,255,0.35);
}
.create-form-select option {
    background: #2a2a3e; color: #e8e8f0;
}

.private-toggle {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.9rem; color: #d0d0d8;
    cursor: pointer; user-select: none;
    padding: 0.25rem 0; min-height: 44px; box-sizing: border-box;
}
.private-toggle input[type="checkbox"] {
    width: 18px; height: 18px; cursor: pointer; accent-color: #f0c040;
}

.join-code-row {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem;
    width: 100%;
}
.join-code-row .name-input {
    flex: 1; min-width: 120px;
    letter-spacing: 0.15em; text-align: center; font-weight: 700;
}
/* El espaciado es para las cifras; al texto de ayuda lo cortaba ("Código (4"). */
.join-code-row .name-input::placeholder { letter-spacing: normal; font-weight: 400; }

.private-code-banner {
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    background: linear-gradient(135deg, rgba(240,192,64,0.15), rgba(240,192,64,0.05));
    border: 1.5px solid rgba(240,192,64,0.5); border-radius: 12px;
    padding: 0.75rem 1rem; margin: 0.5rem 0 1rem;
}
.private-code-label { font-size: 0.85rem; color: #fcd34d; font-weight: 700; }
.private-code-value {
    font-size: 2.2rem; font-weight: 900;
    color: #f0c040; letter-spacing: 0.3em;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px rgba(240,192,64,0.4);
}
.private-code-hint { font-size: 0.8rem; color: #aaa; }

/* El codigo es un boton, pero debe seguir leyendose como el numero grande. */
.btn-copy-code {
    background: none; border: none; padding: 0; cursor: pointer;
    border-radius: 8px; min-height: 44px;
    transition: opacity 0.15s ease;
}
.btn-copy-code:hover { opacity: 0.75; }
.btn-copy-code { white-space: nowrap; }
.btn-copy-code .copy-icon {
    font-size: 1rem; letter-spacing: 0; text-shadow: none; color: var(--texto-suave);
    vertical-align: middle; margin-left: 0.15rem;
}

.invite-row {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    margin-bottom: 1rem;
}
.btn-invite { font-size: 0.95rem; }

.invite-banner {
    display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
    background: linear-gradient(135deg, rgba(120,220,150,0.15), rgba(120,220,150,0.05));
    border: 1.5px solid rgba(120,220,150,0.45); border-radius: 12px;
    padding: 0.85rem 1rem; margin: 0.5rem 0 1rem;
}
.invite-banner-title { font-size: 1rem; font-weight: 700; color: #a7e8bd; text-align: center; }
.invite-banner-actions {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem;
}
.invite-banner-hint { font-size: 0.85rem; color: #aaa; }

.game-actions {
    display: flex; gap: 0.4rem; flex-wrap: wrap;
}
/* Neutro, como los demas secundarios: el azul era un cuarto color de boton. */
.btn-spectate {
    background: transparent;
    color: var(--texto);
    border: 1.5px solid var(--linea-fuerte);
    padding: 0.45rem 0.9rem; border-radius: 12px; min-height: 44px;
    font-weight: 700; cursor: pointer;
    transition: background 0.15s ease;
}
.btn-spectate:hover:not(:disabled) { background: rgba(255,255,255,0.08); }
.btn-spectate:disabled { opacity: 0.4; cursor: not-allowed; }

/* Neutro: el azul era un color mas de distintivo, sin significado propio. */
.spectator-badge {
    background: rgba(255,255,255,0.08);
    color: var(--texto);
    border: 1.5px solid var(--linea-fuerte);
    padding: 0.25rem 0.6rem; border-radius: 999px;
    font-size: 0.82rem; font-weight: 700;
}
.spectator-count {
    background: rgba(255,255,255,0.06);
    color: #cfcfd8;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.2rem 0.55rem; border-radius: 999px;
    font-size: 0.82rem; font-weight: 700;
    cursor: help;
}
.btn-leave-spectate {
    margin-left: auto;
}

/* ===== PRIVACIDAD DE LOS ANUNCIOS (solo en la app Android) ===== */
.lobby-footer { text-align: center; }
.lobby-footer[hidden] { display: none; }
.link-button {
    background: none; border: none; color: #9aa0b8; font-size: 0.85rem;
    text-decoration: underline; padding: 0.6rem 1rem; min-height: 44px; cursor: pointer;
}
.link-button:hover { color: #e0e0e0; }

/* ===== VOLVER A TU PARTIDA ===== */
.resume-banner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem;
    background: linear-gradient(135deg, rgba(240,192,64,0.16), rgba(240,192,64,0.05));
    border: 1.5px solid rgba(240,192,64,0.5); border-radius: 12px;
    padding: 0.75rem 1rem;
}
.resume-banner-title { font-size: 1rem; font-weight: 700; color: #f5d98a; overflow-wrap: anywhere; }

/* ===== SALIR DE LA MESA ===== */
/* Compacto: comparte cabecera con el mazo, el sonido y la ayuda. */
.btn-leave { padding: 0.4rem 0.7rem; font-size: 0.85rem; min-height: 44px; flex: none; }
/* A 360 px el boton le quitaba sitio al titulo ("Partida de Ana" quedaba en
   "Partida ..."): se recupera apretando huecos, no quitando nada. */
@media (max-width: 560px) {
    .game-header { gap: 0.5rem; padding: 0.6rem 0.7rem; }
    .game-header-actions { gap: 0.3rem; }
    .btn-leave { padding: 0.4rem 0.55rem; }
}
/* Mismo rojo que .btn-discard, con clase propia: audio.js hace sonar un
   descarte en cualquier .btn-discard. */
.btn-danger {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white; padding: 0.6rem 1.5rem; min-height: 44px;
}
.btn-danger:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(229,57,53,0.4); }
.leave-confirm {
    background: rgba(229,57,53,0.12); border: 1px solid rgba(229,57,53,0.35);
    border-radius: 12px; padding: 0.8rem 1rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
    text-align: center; font-size: 0.95rem;
}
.leave-confirm-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.leave-confirm-actions button { min-height: 44px; }

/* Rival que salio a mitad de ronda: sigue en la lista hasta revelar. */
.other-player.has-left { opacity: 0.55; }
.other-player.has-left .other-player-name { text-decoration: line-through; }
.left-badge {
    background: rgba(229,57,53,0.18); color: #EF9A9A; border-radius: 20px;
    padding: 0.1rem 0.5rem; font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}

/* ===== TOOLBAR REACCIONES ===== */
.reaction-toolbar {
    position: sticky; bottom: 0.6rem;
    display: flex; justify-content: center; gap: 0.4rem;
    margin: 0.75rem auto 0.4rem;
    padding: 0.35rem 0.6rem;
    background: rgba(20,20,30,0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    width: fit-content;
    backdrop-filter: blur(6px);
    z-index: 5;
}
.reaction-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    width: 44px; height: 44px;
    font-size: 1.25rem; line-height: 1;
    cursor: pointer; padding: 0;
    transition: transform 0.12s ease, background 0.15s ease;
}
.reaction-btn:hover  { background: rgba(255,255,255,0.12); transform: scale(1.15); }
.reaction-btn:active { transform: scale(0.92); }

/* Burbuja flotante que aparece sobre el jugador */
.other-player, .my-area { position: relative; }
/* En las filas de rival la burbuja se centra verticalmente y encoge: a 2.4rem
   sobre una fila de ~2.2rem se comia la fila de arriba. */
.other-player .reaction-bubble {
    top: 50%; right: 0.4rem;
    font-size: 1.6rem;
    animation: reaction-float-row 2.5s ease-out forwards;
}
@keyframes reaction-float-row {
    0%   { opacity: 0; transform: translateY(-50%) scale(0.5); }
    15%  { opacity: 1; transform: translateY(-50%) scale(1.15); }
    30%  { transform: translateY(-50%) scale(1); }
    75%  { opacity: 1; transform: translateY(-90%) scale(1); }
    100% { opacity: 0; transform: translateY(-140%) scale(0.9); }
}
.reaction-bubble {
    position: absolute;
    top: -0.6rem; right: 0.6rem;
    font-size: 2.4rem; line-height: 1;
    pointer-events: none; user-select: none;
    z-index: 10;
    animation: reaction-float 2.5s ease-out forwards;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
@keyframes reaction-float {
    0%   { opacity: 0; transform: translateY(10px) scale(0.6); }
    15%  { opacity: 1; transform: translateY(-4px) scale(1.15); }
    30%  { transform: translateY(-10px) scale(1); }
    100% { opacity: 0; transform: translateY(-60px) scale(0.95); }
}

/* ===== FILA INFO (historial + sesión) ===== */
.info-row {
    display: flex; gap: 0.75rem; margin-bottom: 0.75rem;
}
/* En el movil, una debajo de otra: a medias, la tabla de la sesion no cabia
   en su tarjeta y se salia por la derecha. */
@media (max-width: 480px) {
    .info-row { flex-direction: column; }
}
.info-col {
    flex: 1; min-width: 0;
}
.info-col .rhp { margin-bottom: 0; height: 100%; box-sizing: border-box; }

/* ===== HISTORIAL DE RONDA ===== */
.rhp {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 0.55rem 0.85rem;
    margin-bottom: 0.75rem;
}
.rhp-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.35rem;
}
.rhp-title { font-size: 0.75rem; color: var(--texto-suave); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.rhp-close {
    background: none; border: none; color: var(--texto-suave); cursor: pointer;
    font-size: 0.8rem; line-height: 1; padding: 0;
    min-width: 44px; min-height: 44px; margin: -14px -12px -14px 0;
    transition: color 0.15s;
}
.rhp-close:hover { color: #ccc; }
.rhp-rows { display: flex; flex-direction: column; gap: 0.2rem; }
.rhp-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }
.rhp-winner .rhp-name { color: #fcd34d; font-weight: 700; }
.rhp-medal {
    width: 1.6rem; flex-shrink: 0; font-weight: 900; font-variant-numeric: tabular-nums;
    color: var(--texto-suave);
}
.rhp-winner .rhp-medal { color: var(--acento); }
.rhp-name { flex: 1; font-weight: 500; }
.rhp-hand { color: var(--texto-suave); font-size: 0.78rem; white-space: nowrap; }

/* ===== PANEL DE ESTADÍSTICAS DE SESIÓN (en juego) ===== */
.ssp {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; padding: 0.55rem 0.85rem;
    height: 100%; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 0.35rem;
}
.ssp-title {
    font-size: 0.75rem; color: var(--texto-suave); font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
}
.ssp-table {
    width: 100%; border-collapse: collapse; font-size: 0.8rem;
}
.ssp-table th {
    text-align: center; color: var(--texto-suave); font-weight: 600;
    padding: 0.1rem 0.3rem; font-size: 0.75rem;
}
.ssp-table th:first-child { text-align: left; }
.ssp-table td {
    text-align: center; padding: 0.18rem 0.3rem;
    color: #ccc; border-top: 1px solid rgba(255,255,255,0.05);
}
.ssp-table td:first-child { text-align: left; color: #e0e0e0; }
.ssp-table tr.ssp-me td { color: #60a5fa; font-weight: 700; }
.ssp-table tr.ssp-me td:first-child { color: #60a5fa; }

/* ===== MOVIMIENTO REDUCIDO =====
   Quien lo pide en el sistema no ve latidos ni rebotes infinitos; el reparto
   y las burbujas se quedan en un fundido corto. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
