/* Estilos propios del lobby de duelos (/duelos).
   Cargar SIEMPRE después de game.css.

   OJO: esto vivía en un <style> embebido en el <head> de lobby.html.twig, y el
   router de soft-nav solo reinyecta <link rel="stylesheet"> del documento destino
   —los bloques <style> se descartan—, así que al entrar en el lobby sin recargar
   (lo normal: pulsar «Duelos» en la barra inferior) la página se pintaba SIN estos
   estilos: chips del resumen con el aspecto por defecto del navegador y <details>
   con su marcador nativo. Como hoja aparte el router sí la trae (igual que
   levels.css en /niveles). */
@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:.65} }
/* Scope a la página: sin él, esta regla se queda activa al soft-navegar a
   otras pantallas (la hoja no se descarga) y les cambia el scroll. */
body.duels-page { overflow-y: auto !important; }
.duel-count {
    font-size: .72rem; font-weight: 800; padding: 2px 9px;
    /* Token: en los temas claros un blanco translúcido desaparecía. */
    border-radius: 999px; background: var(--chip-bg);
    color: inherit; letter-spacing: 0;
}

/* Resumen de resultados: una sola fila de chips «emoji + número», pulsables.
   Antes eran tres píldoras con el texto completo ("🏆 3 ganados · …") que a
   360px no caben en una línea, así que el bloque se partía en dos y ocupaba
   76px. Cada chip abre el detalle de su categoría (contra quién).

   Todo en tokens del tema (--chip-bg, --border-color, --text-color…), que los 25
   temas definen por igual: con rgba(255,255,255,…) fijos solo cuadraba en los
   oscuros y había que parchear cada tema aparte. */
/* Las etiquetas pequeñas NO usan --text-muted: en light y christmas ese token se
   queda en 4.3-4.4:1 sobre la superficie del modal, por debajo del 4.5 de WCAG AA
   para texto pequeño. El color de texto del tema al 78% mantiene el matiz y sube
   muy por encima en los 25 temas. */
.duel-stats-row {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin: 0;
}
.duel-stat-chip {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    background: var(--chip-bg); border: 1px solid var(--border-color); color: var(--text-color);
    border-radius: 999px; padding: 7px 13px 7px 11px; min-height: 40px;
    display: inline-flex; align-items: center; gap: 6px; line-height: 1;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.duel-stat-chip:hover { background: var(--surface-muted); border-color: var(--accent); }
.duel-stat-chip:active { transform: scale(.94); }
.duel-stat-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.duel-stat-chip .dsc-emoji { font-size: 1.15rem; }
.duel-stat-chip .dsc-n { font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Modal del detalle: pestañas por resultado + lista de rivales. */
.duel-outcome-tabs {
    display: flex; gap: 6px; padding: 0 20px 4px;
}
.duel-outcome-tab {
    flex: 1 1 0; min-width: 0;
    appearance: none; -webkit-appearance: none; cursor: pointer;
    border: 1px solid var(--border-color); background: var(--chip-bg);
    color: var(--text-color); border-radius: 14px; padding: 7px 4px;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.duel-outcome-tab[aria-selected="true"] {
    background: color-mix(in srgb, var(--accent) 26%, transparent);
    border-color: var(--accent);
}
.duel-outcome-tab:disabled { opacity: .4; cursor: default; }
.duel-outcome-tab .dot-count { font-size: .95rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.duel-outcome-tab .tab-label { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-color); opacity: .78; }

.duel-outcome-list { display: flex; flex-direction: column; gap: 8px; }
.duel-outcome-row {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 14px; text-decoration: none;
    color: var(--text-color);
    background: var(--chip-bg); border: 1px solid var(--border-color);
}
.duel-outcome-row:active { background: var(--surface-muted); }
.duel-outcome-av {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; font-weight: 800; color: #fff;
}
.duel-outcome-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.duel-outcome-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel-outcome-date { font-size: .74rem; color: var(--text-color); opacity: .78; font-weight: 600; }
/* Marcador: badge SÓLIDO con texto blanco. No depende del fondo del tema (un
   verde/rojo translúcido sobre --surface se pierde en los temas claros y se
   confunde con el color de acento en los oscuros). Tonos 700: blanco sobre ellos
   pasa WCAG AA en los 25 temas por igual. */
.duel-outcome-score {
    flex-shrink: 0; font-weight: 800; font-size: .95rem; color: #fff;
    font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 999px;
}
.duel-outcome-score.won { background: #15803d; }
.duel-outcome-score.tied { background: #4b5563; }
.duel-outcome-score.lost { background: #b91c1c; }
.duel-outcome-empty { text-align: center; color: var(--text-color); opacity: .78; padding: 22px 6px; font-size: .9rem; }

/* ══ Lobby premium (oct-2026) ═══════════════════════════════════════════════
   Portada sin duelos, tarjetas de duelo, maestros y duelistas de la semana.

   Paneles oscuros translúcidos con texto claro FIJO (no tokens del tema): el
   mismo criterio que .glass-panel, porque el lobby se pinta sobre las escenas de
   los 26 temas (cielo claro, luna, nieve…) y un panel oscuro se lee en todas.
   Las tarjetas de la lista NO llevan backdrop-filter: con diez tarjetas, el
   desenfoque en un Android modesto se nota al hacer scroll. */
.duels-content [hidden] { display: none !important; }
.duels-content {
    --dl-panel: rgba(14, 10, 26, .66);
    --dl-panel-solid: rgba(14, 10, 26, .8);
    --dl-line: rgba(255, 255, 255, .12);
    --dl-ink: #f1f5f9;
    --dl-ink-2: rgba(241, 245, 249, .78);
    --dl-indigo: #818cf8;
    --dl-orange: #fb923c;
}

.duels-section-title {
    display: flex; align-items: center; gap: 7px;
    margin: 0 0 10px; font-size: .78rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em; opacity: .85;
    /* Va sobre el fondo del tema (nieve, cielo claro): la sombra lo despega. */
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.duels-section-title .ic { width: 15px; height: 15px; }

/* Panel de crear duelo (botón + / «Reta a un amigo»): hoja inferior sobre la
   barra de navegación, mismo panel oscuro que el resto (translúcido-claro no se
   leía sobre los temas claros ni sobre la luna). */
.dcr-backdrop {
    /* Por encima de la cabecera fija (.home-shell-persistent, 1550): con la hoja
       abierta también se oscurece. */
    position: fixed; inset: 0; z-index: 1590;
    background: rgba(3, 2, 10, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    animation: dcr-fade .2s ease-out;
}
.duels-create {
    position: fixed; z-index: 1600; left: 0; right: 0; bottom: 0;
    width: 100%; max-width: 560px; margin: 0 auto; box-sizing: border-box;
    max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; color: var(--dl-ink);
    background:
        radial-gradient(120% 50% at 50% 0%, rgba(249, 115, 22, .16), transparent 65%),
        rgb(17, 13, 31);
    border: 1px solid var(--dl-line); border-bottom: 0;
    box-shadow: 0 -18px 50px -12px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .06);
    animation: dcr-up .28s cubic-bezier(.2, .8, .2, 1);
}
.dcr-grabber { display: block; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.dcr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.dcr-head .dcr-title { margin: 0; }
.dcr-close {
    appearance: none; -webkit-appearance: none; cursor: pointer; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    font: inherit; font-size: 1.4rem; line-height: 1; color: var(--dl-ink);
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
}
.dcr-close:focus-visible { outline: 2px solid #fde047; outline-offset: 2px; }
/* Con la hoja abierta: la página de debajo no se desplaza y el «+» se esconde
   (la hoja tiene su propia ×). */
body.duels-page.duels-sheet-open { overflow: hidden !important; }
body.duels-sheet-open .duel-fab { opacity: 0; pointer-events: none; }
@keyframes dcr-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes dcr-fade { from { opacity: 0; } to { opacity: 1; } }
.dcr-title { margin: 0 0 14px; font-size: 1.1rem; font-weight: 900; letter-spacing: -.01em; color: #fff; }
.dcr-label {
    display: block; margin: 0 0 8px; padding: 0;
    font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dl-ink-2);
}
/* Control segmentado: radios reales (teclado y lector de pantalla), marcado por :has. */
.dcr-seg {
    margin: 0 0 14px; padding: 0; border: 0; min-width: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.dcr-seg .dcr-label { grid-column: 1 / -1; }
.dcr-opt {
    position: relative; cursor: pointer; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 10px 8px; border-radius: 14px;
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.dcr-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dcr-opt-main { font-size: 1.05rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.dcr-opt-sub { font-size: .7rem; font-weight: 700; color: var(--dl-ink-2); }
.dcr-opt:has(input:checked) {
    background: rgba(99, 102, 241, .22); border-color: #818cf8;
    box-shadow: 0 0 0 1px rgba(129, 140, 248, .35), 0 8px 18px -12px rgba(99, 102, 241, .9);
}
.dcr-opt:has(input:focus-visible) { outline: 2px solid #fde047; outline-offset: 2px; }
.dcr-primary, .dcr-ghost, .dcr-invite-btn, .inv-accept-btn, .inv-decline-btn, .hx-more {
    appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .12s ease, background .15s ease, opacity .15s ease;
}
.dcr-primary {
    width: 100%; min-height: 48px; padding: 12px; border: 0; border-radius: 14px;
    font-size: 1rem; font-weight: 900; color: #1a0b00;
    background: linear-gradient(145deg, #fdba74, #f97316 55%, #ea580c);
    box-shadow: 0 10px 22px -12px rgba(234, 88, 12, .95), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.dcr-primary .ic { width: 18px; height: 18px; }
.dcr-ghost {
    width: 100%; min-height: 44px; margin-top: 8px; padding: 10px; border-radius: 14px;
    font-size: .92rem; font-weight: 800; color: var(--dl-ink);
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
}
.dcr-primary:active, .dcr-ghost:active, .dcr-invite-btn:active, .inv-accept-btn:active, .inv-decline-btn:active, .hx-more:active { transform: scale(.97); }
.dcr-primary:disabled, .dcr-ghost:disabled, .dcr-invite-btn:disabled { opacity: .7; cursor: default; }
.dcr-primary:focus-visible, .dcr-ghost:focus-visible, .dcr-invite-btn:focus-visible,
.inv-accept-btn:focus-visible, .inv-decline-btn:focus-visible, .hx-more:focus-visible { outline: 2px solid #fde047; outline-offset: 2px; }
.dcr-invite { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--dl-line); }
.dcr-invite-row { display: flex; gap: 8px; }
.dcr-input {
    flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border-radius: 12px;
    font: inherit; font-size: .95rem; color: #fff;
    background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .16);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dcr-input::placeholder { color: rgba(241, 245, 249, .45); }
.dcr-input:focus { outline: none; border-color: #fb923c; box-shadow: 0 0 0 3px rgba(249, 115, 22, .25); }
.dcr-invite-btn {
    flex-shrink: 0; min-height: 44px; padding: 10px 16px; border-radius: 12px; white-space: nowrap;
    font-size: .92rem; font-weight: 800; color: #fed7aa;
    background: rgba(249, 115, 22, .18); border: 1px solid rgba(251, 146, 60, .45);
}
.dcr-invite-btn .ic { width: 15px; height: 15px; }
.dcr-error { margin: 10px 0 0; font-size: .85rem; font-weight: 600; color: #fca5a5; }

.duels-block { margin-bottom: 24px; }
.dc-list { display: flex; flex-direction: column; gap: 10px; }

/* ── Aviso de notificaciones apagadas (duelNotifyNotice.js) ──────────────
   Franja de una o dos líneas, no un bloque rojo de cuatro: informa sin tapar el
   lobby. Panel oscuro como el resto, con el color solo en el icono y el borde. */
.dnn {
    display: flex; align-items: center; gap: 11px; margin: 0 0 18px; padding: 10px 12px;
    border-radius: 16px; color: var(--dl-ink);
    background: var(--dl-panel-solid); border: 1px solid rgba(251, 146, 60, .4);
}
.dnn--blocked { border-color: rgba(248, 113, 113, .4); }
.dnn-ic {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    color: #fed7aa; background: rgba(249, 115, 22, .18);
}
.dnn--blocked .dnn-ic { color: #fecaca; background: rgba(239, 68, 68, .18); }
.dnn-ic .ic { width: 16px; height: 16px; }
.dnn-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: .76rem; font-weight: 600; line-height: 1.35; color: var(--dl-ink-2); }
.dnn-txt strong { font-size: .86rem; font-weight: 800; color: #fff; }
.dnn-btn {
    appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; flex-shrink: 0;
    min-height: 36px; padding: 7px 14px; border: 0; border-radius: 999px;
    font-size: .82rem; font-weight: 900; color: #1a0b00;
    background: linear-gradient(145deg, #fdba74, #f97316 55%, #ea580c);
}
.dnn-btn:disabled { opacity: .7; cursor: default; }
.dnn-btn:focus-visible { outline: 2px solid #fde047; outline-offset: 2px; }

/* ── Duelos recibidos ──────────────────────────────────────────────────── */
.inv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.inv-card {
    position: relative; overflow: hidden;
    padding: 14px; border-radius: 18px; color: var(--dl-ink);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(34, 197, 94, .18), transparent 60%),
        var(--dl-panel-solid);
    border: 1px solid rgba(74, 222, 128, .38);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, .14), 0 14px 32px -18px rgba(34, 197, 94, .6);
    animation: dl-rise .25s ease-out;
}
.inv-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.inv-who { flex: 1 1 auto; min-width: 0; }
.inv-name { font-weight: 800; font-size: 1.04rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-meta { margin-top: 2px; font-size: .78rem; font-weight: 600; color: var(--dl-ink-2); }
.inv-badge {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    color: #bbf7d0; background: rgba(34, 197, 94, .18); border: 1px solid rgba(74, 222, 128, .4);
}
.inv-badge .ic { width: 16px; height: 16px; }
.inv-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 12px; }
.inv-decline-btn {
    min-height: 42px; padding: 9px 12px; border-radius: 12px; font-size: .9rem; font-weight: 800;
    color: var(--dl-ink); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
}
.inv-accept-btn {
    min-height: 42px; padding: 9px 12px; border: 0; border-radius: 12px; font-size: .92rem; font-weight: 900;
    color: #052e12; background: linear-gradient(145deg, #86efac, #22c55e 60%, #16a34a);
    box-shadow: 0 8px 18px -10px rgba(22, 163, 74, .9), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.inv-accept-btn:disabled, .inv-decline-btn:disabled { opacity: .7; cursor: default; }
/* Al rechazar: se va hacia un lado y se pliega, sin recargar la página. */
.inv-card--out { animation: inv-out .26s ease-in forwards; pointer-events: none; }
@keyframes inv-out { to { opacity: 0; transform: translateX(24px) scale(.97); } }

/* ── Desplegables (duelos enviados, historial) ─────────────────────────────
   Un panel entero, no una línea de texto suelta: cabecera pulsable de 60px con
   icono, título, contador y un resumen de lo de dentro (la fecha que importa),
   y una flecha en círculo que gira. Se abre con animación de altura donde el
   navegador sabe (interpolate-size); en el resto, al instante. */
.dl-drawer {
    margin: 0 0 16px; border-radius: 20px; color: var(--dl-ink); overflow: hidden;
    background: var(--dl-panel-solid); border: 1px solid var(--dl-line);
    box-shadow: 0 14px 32px -20px rgba(0, 0, 0, .8);
    interpolate-size: allow-keywords;
    /* Su contenido no aporta ancho a la página: un nombre largo (sin salto, con
       puntos suspensivos) ensanchaba #app-view 100px a 360px al abrir el
       historial. Mismo problema que .rv-row, otra solución. */
    contain: inline-size;
}
.dl-drawer::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .28s cubic-bezier(.2, .8, .2, 1), content-visibility .28s allow-discrete;
}
.dl-drawer[open]::details-content { block-size: auto; }
.dl-drawer-head {
    list-style: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
    display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px;
    transition: background .15s ease;
}
.dl-drawer-head::-webkit-details-marker { display: none; }
.dl-drawer-head:hover { background: rgba(255, 255, 255, .03); }
.dl-drawer-head:active { background: rgba(255, 255, 255, .05); }
.dl-drawer-head:focus-visible { outline: 2px solid var(--dl-indigo); outline-offset: -2px; border-radius: 20px; }
.dl-drawer-ic {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
}
.dl-drawer-ic .ic { width: 18px; height: 18px; }
.dl-drawer-ic--sent { color: #fed7aa; background: rgba(249, 115, 22, .18); border: 1px solid rgba(251, 146, 60, .38); }
.dl-drawer-ic--history { color: #fde68a; background: rgba(234, 179, 8, .16); border: 1px solid rgba(250, 204, 21, .34); }
.dl-drawer-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-drawer-title { display: flex; align-items: center; gap: 8px; font-size: .98rem; font-weight: 800; color: #fff; }
.dl-drawer-title .duel-count { background: rgba(255, 255, 255, .12); color: #fff; }
.dl-drawer-sub { font-size: .76rem; font-weight: 600; color: var(--dl-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-drawer-sub:empty { display: none; }
.dl-chev {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; position: relative;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), background .15s ease;
}
.dl-chev::before {
    content: ''; position: absolute; left: 50%; top: 45%; width: 8px; height: 8px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translate(-50%, -50%) rotate(45deg); opacity: .85;
}
.dl-drawer[open] .dl-chev { transform: rotate(180deg); background: rgba(129, 140, 248, .2); }
.dl-drawer-body { margin: 0; padding: 4px 10px 12px; border-top: 1px solid var(--dl-line); list-style: none; }

/* Duelos enviados: fila con la fecha de envío, lo que le queda y una barra que
   se vacía a lo largo de los 7 días. */
.sx-list { display: flex; flex-direction: column; }
.sx-row { position: relative; padding: 12px 4px 10px; }
.sx-top { display: flex; align-items: center; gap: 11px; }
.sx-row + .sx-row { border-top: 1px solid rgba(255, 255, 255, .06); }
.sx-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sx-name { font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-sub { font-size: .76rem; font-weight: 600; color: var(--dl-ink-2); }
.sx-ttl { display: block; margin: 10px 0 0 51px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.sx-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 10px 0 0 51px; flex-wrap: wrap; }
.sx-btn {
    appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit;
    min-height: 34px; padding: 6px 13px; border-radius: 999px; white-space: nowrap;
    font-size: .78rem; font-weight: 800; transition: transform .12s ease, background .15s ease, color .15s ease;
}
.sx-btn:active { transform: scale(.95); }
.sx-btn:disabled { opacity: .7; cursor: default; }
.sx-btn:focus-visible { outline: 2px solid #fde047; outline-offset: 2px; }
.sx-btn--remind { margin-right: auto; color: #fed7aa; background: rgba(249, 115, 22, .16); border: 1px solid rgba(251, 146, 60, .42); }
.sx-btn--cancel { color: var(--dl-ink-2); background: transparent; border: 1px solid rgba(255, 255, 255, .14); }
.sx-btn--confirm { color: #fff; background: #b91c1c; border-color: #ef4444; }
.sx-later { margin-right: auto; font-size: .74rem; font-weight: 600; color: rgba(241, 245, 249, .55); }
.sx-done { margin-right: auto; font-size: .76rem; font-weight: 700; color: #86efac; }
.sx-row--out { animation: inv-out .26s ease-in forwards; pointer-events: none; }
.sx-ttl > span { display: block; height: 100%; width: calc(var(--left, 1) * 100%); border-radius: inherit; background: #94a3b8; }
.sx-ttl--warn > span { background: #fb923c; }
.sx-ttl--crit > span { background: #ef4444; }

/* Historial: grupos por fecha y filas compactas con marcador. */
.hx-list { display: flex; flex-direction: column; gap: 6px; }
.hx-group-title {
    margin: 10px 4px 4px; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: rgba(241, 245, 249, .6);
}
.hx-row { display: flex; align-items: center; gap: 6px; border-radius: 14px; transition: background .15s ease; }
.hx-row:hover { background: rgba(255, 255, 255, .04); }
.hx-link {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 9px 4px 9px 8px; border-radius: 14px;
    color: var(--dl-ink); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.hx-link:active { background: rgba(255, 255, 255, .07); }
.hx-link:focus-visible { outline: 2px solid var(--dl-indigo); outline-offset: 0; }
.hx-rematch {
    appearance: none; -webkit-appearance: none; cursor: pointer; font: inherit; flex-shrink: 0;
    min-height: 36px; margin-right: 6px; padding: 6px 11px; border-radius: 999px; white-space: nowrap;
    font-size: .74rem; font-weight: 800; color: #fed7aa;
    background: rgba(249, 115, 22, .16); border: 1px solid rgba(251, 146, 60, .42);
    transition: transform .12s ease, opacity .15s ease;
}
.hx-rematch:active { transform: scale(.95); }
.hx-rematch:disabled { opacity: .7; cursor: default; }
.hx-rematch:focus-visible { outline: 2px solid #fdba74; outline-offset: 2px; }
.hx-row .duel-outcome-av { width: 40px; height: 40px; }
.hx-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hx-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 800; color: #fff; }
.hx-name-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-sub { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 600; color: var(--dl-ink-2); white-space: nowrap; }
.hx-dots { display: inline-flex; gap: 3px; }
.hx-dot { width: 7px; height: 7px; border-radius: 50%; background: #64748b; }
.hx-dot--won { background: #4ade80; }
.hx-dot--lost { background: #f87171; }
.hx-result { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
/* Marcador sólido con texto blanco (tonos 700): mismo criterio que el modal del resumen. */
.hx-score {
    min-width: 46px; text-align: center; padding: 4px 10px; border-radius: 999px;
    font-weight: 900; font-size: .92rem; color: #fff; font-variant-numeric: tabular-nums; background: #4b5563;
}
.hx-row--won .hx-score { background: #15803d; }
.hx-row--lost .hx-score { background: #b91c1c; }
.hx-label { font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: rgba(241, 245, 249, .6); }
.hx-row--won .hx-label { color: #86efac; }
.hx-row--lost .hx-label { color: #fca5a5; }
.hx-more {
    width: 100%; min-height: 42px; margin-top: 8px; padding: 9px; border-radius: 12px;
    font-size: .88rem; font-weight: 800; color: var(--dl-ink);
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
}

@keyframes dl-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Portada sin duelos ─────────────────────────────────────────────────── */
.duels-hero { display: flex; flex-direction: column; gap: 18px; margin: 4px 0 18px; }
.dh-panel {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 16px 16px 16px; border-radius: 24px; color: var(--dl-ink);
    background:
        radial-gradient(120% 70% at 50% 0%, rgba(129, 140, 248, .22), transparent 62%),
        var(--dl-panel);
    border: 1px solid var(--dl-line);
    -webkit-backdrop-filter: blur(12px) saturate(1.1); backdrop-filter: blur(12px) saturate(1.1);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.dh-title { margin: 0 0 4px; font-size: 1.25rem; font-weight: 900; letter-spacing: -.01em; color: #fff; text-wrap: balance; }
.dh-sub { margin: 0 0 12px; max-width: 32ch; font-size: .92rem; font-weight: 600; line-height: 1.45; color: var(--dl-ink-2); text-wrap: balance; }

.dh-steps {
    list-style: none; margin: 0 0 12px; padding: 0; width: 100%;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
    counter-reset: dh-step;
}
.dh-step {
    counter-increment: dh-step; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
    padding: 8px 4px 7px; border-radius: 14px; text-align: center;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .09);
}
.dh-step::before {
    display: none; content: counter(dh-step); position: absolute; top: 6px; left: 8px;
    font-size: .64rem; font-weight: 900; color: rgba(241, 245, 249, .45);
}
.dh-step-ic {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center;
    color: #c7d2fe; background: rgba(99, 102, 241, .2); border: 1px solid rgba(129, 140, 248, .34);
}
.dh-step:nth-child(2) .dh-step-ic { color: #fed7aa; background: rgba(249, 115, 22, .18); border-color: rgba(251, 146, 60, .36); }
.dh-step:nth-child(3) .dh-step-ic { color: #fde68a; background: rgba(234, 179, 8, .16); border-color: rgba(250, 204, 21, .34); }
.dh-step-ic .ic { width: 15px; height: 15px; }
.dh-step-txt { font-size: .7rem; font-weight: 600; line-height: 1.3; color: var(--dl-ink-2); }
.dh-step-txt b { display: block; color: #fff; font-weight: 800; font-size: .74rem; }

.dh-prize {
    display: inline-flex; align-items: center; gap: 8px; margin: 0 0 2px;
    padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600;
    color: #f5d0fe; background: rgba(217, 70, 239, .14); border: 1px solid rgba(232, 121, 249, .32);
    text-align: left;
}
.dh-prize .ic { width: 16px; height: 16px; flex-shrink: 0; color: #e879f9; }
.dh-prize b { color: #fff; font-weight: 900; }

.dh-secondary {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; max-width: 340px; margin-top: 12px; min-height: 44px; padding: 10px 18px;
    border-radius: 999px; font: inherit; font-size: .95rem; font-weight: 800;
    color: var(--dl-ink); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .2);
    transition: background .15s ease, transform .12s ease;
}
.dh-secondary .ic { width: 17px; height: 17px; }
.dh-secondary:hover { background: rgba(255, 255, 255, .12); }
.dh-secondary:active { transform: scale(.97); }
.dh-secondary:focus-visible { outline: 2px solid #fde047; outline-offset: 3px; }

/* ── Tarjetas de duelo ──────────────────────────────────────────────────── */
.dc {
    --dc-accent: rgba(255, 255, 255, .2);
    position: relative; width: 100%; box-sizing: border-box; cursor: pointer;
    display: flex; flex-direction: column; gap: 11px;
    padding: 14px 14px 14px 17px; border-radius: 18px; color: var(--dl-ink);
    background: var(--dl-panel-solid); border: 1px solid var(--dl-line);
    box-shadow: 0 10px 26px -18px rgba(0, 0, 0, .8);
    overflow: hidden; transition: transform .12s ease, border-color .15s ease;
}
/* Franja de estado a la izquierda: se lee el color antes que el texto. */
.dc::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--dc-accent); }
.dc:active { transform: scale(.985); }
.dc:focus-visible { outline: 2px solid var(--dl-indigo); outline-offset: 2px; }
.dc--turn { --dc-accent: linear-gradient(180deg, #a5b4fc, #6366f1); border-color: rgba(129, 140, 248, .5);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, .25), 0 14px 32px -18px rgba(99, 102, 241, .75); }
.dc--wait { --dc-accent: rgba(148, 163, 184, .55); }
.dc--norival { --dc-accent: #f59e0b; }

.dc-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.dc-av, .duel-outcome-av, .dw-av {
    flex-shrink: 0; display: grid; place-items: center; font-weight: 800; color: #fff;
}
.dc-av { width: 44px; height: 44px; border-radius: 14px; font-size: 1.05rem; }
/* Cara dibujada de un rival de «Elige rival»: redonda, como en su tarjeta. */
.dc-av--face, .duel-outcome-av--face { border-radius: 50%; overflow: hidden; background: none; }
.dc-av--face { width: 48px; height: 48px; }
.dc-av--pic, .duel-outcome-av--pic, .dw-av--pic { background: rgba(255, 255, 255, .1); font-size: 1.5rem; }
.duel-outcome-av--pic { font-size: 1.35rem; }
.dc-av--g0, .duel-outcome-av--g0, .dw-av--g0 { background: linear-gradient(145deg, #6366f1, #4338ca); }
.dc-av--g1, .duel-outcome-av--g1, .dw-av--g1 { background: linear-gradient(145deg, #0ea5e9, #0369a1); }
.dc-av--g2, .duel-outcome-av--g2, .dw-av--g2 { background: linear-gradient(145deg, #f59e0b, #b45309); }
.dc-av--g3, .duel-outcome-av--g3, .dw-av--g3 { background: linear-gradient(145deg, #ec4899, #be185d); }
.dc-av--gamber { background: linear-gradient(145deg, #f59e0b, #b45309); }
.dc-who { flex: 1 1 auto; min-width: 0; }
.dc-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 800; font-size: 1.04rem; color: #fff; }
.dc-name-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-master {
    flex-shrink: 0; font-size: .6rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
    padding: 2px 6px; border-radius: 6px; color: #fde68a; background: rgba(250, 204, 21, .14); border: 1px solid rgba(250, 204, 21, .3);
}
.dc-meta { margin-top: 2px; font-size: .76rem; font-weight: 600; color: var(--dl-ink-2); line-height: 1.35; }
.dc-side { flex-shrink: 0; align-self: flex-start; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.dc-since { font-size: .66rem; font-weight: 600; color: rgba(241, 245, 249, .6); white-space: nowrap; }
.dc-chip {
    flex-shrink: 0; white-space: nowrap;
    padding: 4px 10px; border-radius: 999px; font-size: .68rem; font-weight: 800;
    letter-spacing: .05em; text-transform: uppercase;
    color: #e2e8f0; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
}
.dc--turn .dc-chip { color: #fff; background: #4f46e5; border-color: #818cf8; animation: dc-pulse 1.8s ease-in-out infinite; }
.dc--norival .dc-chip { color: #fff; background: #b45309; border-color: #f59e0b; }
@keyframes dc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(129, 140, 248, .55); } 50% { box-shadow: 0 0 0 5px rgba(129, 140, 248, 0); } }

.dc-note {
    font-size: .78rem; font-weight: 600; color: var(--dl-ink-2);
    padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05);
}
.dc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Línea de rondas: cuentas numeradas unidas por un hilo. */
.dc-rounds {
    list-style: none; margin: 0; padding: 0; position: relative;
    display: flex; align-items: center; gap: 6px;
}
.dc-rounds::before {
    content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px;
    background: rgba(255, 255, 255, .12); transform: translateY(-50%);
}
.dc-r {
    position: relative; width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center; font-size: .62rem; font-weight: 800; font-variant-numeric: tabular-nums;
    color: rgba(241, 245, 249, .55); background: #1b1530; border: 1.5px solid rgba(255, 255, 255, .22);
}
.dc-r--won { color: #052e12; background: #4ade80; border-color: #4ade80; }
.dc-r--lost { color: #fff; background: #b91c1c; border-color: #ef4444; }
.dc-r--tie { color: #fff; background: #4b5563; border-color: #9ca3af; }
.dc-r--now { color: #fff; border-color: #a5b4fc; background: #3730a3; box-shadow: 0 0 0 3px rgba(129, 140, 248, .28); }

.dc-exp {
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; max-width: 100%;
    font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums;
    padding: 4px 10px; border-radius: 999px; border: 1px solid;
}
.dc-exp .ic { width: 13px; height: 13px; flex-shrink: 0; }
.dc-exp-txt { overflow: hidden; text-overflow: ellipsis; }
.dc-exp--normal { color: #cbd5e1; background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.dc-exp--warn { color: #fdba74; background: rgba(249, 115, 22, .12); border-color: rgba(249, 115, 22, .4); }
.dc-exp--crit { color: #fca5a5; background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .45); }
.dc-link { font-size: .84rem; font-weight: 700; color: var(--dl-ink-2); text-decoration: none; }
.dc-link:hover { color: #fff; }
.dc .dc-copy {
    font-size: .8rem; font-weight: 700; padding: 8px 13px !important; border-radius: 11px !important;
    color: var(--dl-ink) !important; background: rgba(255, 255, 255, .1) !important; border: 1px solid rgba(255, 255, 255, .2) !important;
}
.dc .dc-play {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px !important; border-radius: 13px !important; border: 0 !important;
    font-size: .94rem; font-weight: 800; color: #fff !important; text-decoration: none;
    background: linear-gradient(145deg, #818cf8, #4f46e5) !important;
    box-shadow: 0 8px 20px -10px rgba(79, 70, 229, .9), inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* ── Tu récord: % de victorias, racha, chips del resumen y gemas ──────────
   Panel oscuro fijo: dentro, los chips dejan los tokens del tema (en los temas
   claros serían texto oscuro sobre este fondo) y van en claro. */
.drec {
    margin: 0 0 20px; padding: 14px 14px 12px; border-radius: 20px; color: var(--dl-ink);
    background:
        radial-gradient(110% 80% at 0% 0%, rgba(250, 204, 21, .14), transparent 60%),
        var(--dl-panel-solid);
    border: 1px solid var(--dl-line);
    box-shadow: 0 14px 32px -20px rgba(0, 0, 0, .8);
}
.drec-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.drec-main { display: flex; align-items: baseline; gap: 8px; }
.drec-pct { font-size: 1.7rem; font-weight: 900; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.drec-lbl { font-size: .78rem; font-weight: 700; color: var(--dl-ink-2); }
.drec-streak {
    flex-shrink: 0; padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 800;
    color: #fed7aa; background: rgba(249, 115, 22, .16); border: 1px solid rgba(251, 146, 60, .4);
}
.drec .duel-stat-chip { color: #fff; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); flex: 1 1 0; justify-content: center; }
.drec .duel-stat-chip:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.drec .duel-stat-chip:focus-visible { outline-color: #fde047; }
/* contain: sin él, un nombre largo empuja el ancho de la tarjeta (y del lobby)
   antes de que la elipsis entre en juego (mismo caso que .dl-drawer, 2.53.0). */
.drec-last {
    contain: inline-size;
    display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 0 0;
    border-top: 1px solid var(--dl-line);
}
.drec-last .duel-outcome-av { width: 34px; height: 34px; flex-shrink: 0; }
.drec-last-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drec-last-main { font-size: .84rem; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drec-last-sub { font-size: .72rem; font-weight: 600; color: var(--dl-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drec-last .hx-rematch { margin-right: 0; }
/* «Duelos enviados» con alguno que ya se puede recordar: el aviso en naranja. */
.dl-drawer--nudge .dl-drawer-sub { color: #fdba74; }

/* ── Gemas ganadas y duelistas de la semana ──────────────────────────────── */
.duels-gems-won {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--dl-line);
    font-size: .82rem; font-weight: 600; color: var(--dl-ink-2);
}
.duels-gems-won b { color: #fff; }

/* ── Esqueleto de carga ───────────────────────────────────────────────── */
.dl-skel { display: flex; flex-direction: column; gap: 10px; margin: 0 0 24px; }
.dl-skel-card {
    display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 8px 12px; align-items: center;
    padding: 16px; border-radius: 18px; background: var(--dl-panel-solid); border: 1px solid var(--dl-line);
}
.dl-skel-av { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; }
.dl-skel-line { height: 11px; border-radius: 6px; width: 70%; }
.dl-skel-line--short { width: 42%; }
.dl-skel-av, .dl-skel-line {
    display: block;
    background: linear-gradient(90deg, rgba(255, 255, 255, .06) 25%, rgba(255, 255, 255, .14) 50%, rgba(255, 255, 255, .06) 75%);
    background-size: 200% 100%; animation: dl-shimmer 1.3s linear infinite;
}
@keyframes dl-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.duels-gems-won .ic { width: 16px; height: 16px; color: #e879f9; }
.duels-weekly {
    margin: 24px 0 8px; padding: 12px 6px 6px; border-radius: 20px; color: var(--dl-ink);
    background: var(--dl-panel-solid); border: 1px solid var(--dl-line);
}
/* El título va dentro del panel: sobre la nieve de los temas claros no se leía. */
.duels-weekly .duels-section-title { margin: 0 8px 6px; color: #fde68a; text-shadow: none; opacity: 1; }
.duels-weekly-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dw-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 14px; min-width: 0; }
.dw-row--me { background: rgba(129, 140, 248, .16); box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .35); }
.dw-rank { flex: 0 0 26px; text-align: center; font-weight: 800; font-size: .9rem; color: var(--dl-ink-2); font-variant-numeric: tabular-nums; }
.dw-rank--medal { font-size: 1.2rem; }
.dw-av { width: 36px; height: 36px; border-radius: 12px; font-size: .95rem; }
.dw-av--pic { font-size: 1.3rem; }
.dw-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dw-name { font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-wins { font-size: .74rem; font-weight: 600; color: var(--dl-ink-2); }
.dw-me { flex-shrink: 0; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #c7d2fe; padding: 0 6px; }
.dw-challenge {
    appearance: none; -webkit-appearance: none; cursor: pointer; flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 5px; min-height: 34px;
    padding: 6px 13px; border-radius: 999px; font: inherit; font-size: .8rem; font-weight: 800;
    color: #fed7aa; background: rgba(249, 115, 22, .16); border: 1px solid rgba(251, 146, 60, .42);
}
.dw-challenge .ic { width: 14px; height: 14px; }
.dw-challenge:disabled { opacity: .75; cursor: default; }
.dw-challenge:focus-visible { outline: 2px solid #fdba74; outline-offset: 2px; }

/* ── «Elige rival» ──────────────────────────────────────────────────────
   Carrusel con scroll lateral propio (la página no se mueve): se ven dos tarjetas
   y media en un móvil, ordenadas de fácil a difícil. Panel oscuro fijo, como el
   resto del lobby, para que se lea sobre las escenas de todos los temas. */
.duels-rivals { min-width: 0; margin: 0 0 24px; }
.rv-head { display: flex; flex-direction: column; gap: 2px; margin: 0 0 10px; }
.rv-head .duels-section-title { margin: 0; }
.rv-intro { margin: 0; font-size: .8rem; font-weight: 600; opacity: .85; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.rv-row {
    list-style: none; margin: 0 -2px; padding: 2px 2px 8px;
    /* width:0 + min-width:100%: la fila no aporta su ancho natural al de la
       página (sin esto #app-view se ensancha y aparece scroll lateral). */
    width: 0; min-width: calc(100% + 4px); box-sizing: border-box;
    display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 2px; scrollbar-width: none;
}
.rv-row::-webkit-scrollbar { display: none; }
/* Sin parpadeo mientras se desplaza (duels.js): ver el comentario de .rv-card. */
.rv-row--scrolling .rf-eyes { animation-play-state: paused; }
.rv-card {
    --rv-tint: rgba(34, 197, 94, .2);
    flex: 0 0 156px; scroll-snap-align: start; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px;
    padding: 14px 10px 12px; border-radius: 20px; color: var(--dl-ink);
    background:
        radial-gradient(120% 60% at 50% 0%, var(--rv-tint), transparent 70%),
        var(--dl-panel-solid);
    border: 1px solid var(--dl-line);
    box-shadow: 0 10px 26px -18px rgba(0, 0, 0, .8);
    /* Capa propia por tarjeta: en Android, al desplazar la fila, las tarjetas
       se quedaban a medio pintar (sin fondo, sin texto o sin «Retar») y solo se
       redibujaban los ojos que parpadean. Así el parpadeo repinta su tarjeta y
       no la fila entera, y el scroll mueve tarjetas ya pintadas. */
    transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.rv-card--d2 { --rv-tint: rgba(245, 158, 11, .22); }
.rv-card--d3 { --rv-tint: rgba(244, 63, 94, .26); border-color: rgba(244, 63, 94, .35); }
.rv-face {
    width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem;
    margin-bottom: 3px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .7);
}
.rv-name { font-weight: 800; font-size: .92rem; line-height: 1.2; color: #fff; text-wrap: balance; min-height: 2.4em; display: flex; align-items: center; }
.rv-tag { font-size: .72rem; font-weight: 600; line-height: 1.3; color: var(--dl-ink-2); min-height: 3.9em;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rv-meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: .74rem; font-weight: 700; min-height: 1.2em; }
.rv-gems { display: inline-flex; align-items: center; gap: 3px; color: #f5d0fe; }
.rv-gems .ic { width: 13px; height: 13px; color: #e879f9; }
.rv-record { color: var(--dl-ink-2); font-variant-numeric: tabular-nums; }
.rv-record:empty { display: none; }
.rv-record--up { color: #86efac; }
.rv-go {
    appearance: none; -webkit-appearance: none; cursor: pointer;
    width: 100%; margin-top: 4px; min-height: 40px; padding: 8px 10px;
    border-radius: 999px; border: 0; font: inherit; font-size: .9rem; font-weight: 800;
    color: #1a0b00; background: linear-gradient(145deg, #fdba74, #f97316 55%, #ea580c);
    box-shadow: 0 8px 18px -10px rgba(234, 88, 12, .9), inset 0 1px 0 rgba(255, 255, 255, .45);
    transition: transform .12s ease;
}
.rv-go:active { transform: scale(.96); }
.rv-go:disabled { opacity: .7; cursor: default; }
.rv-go:focus-visible { outline: 2px solid #fde047; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .dc--turn .dc-chip, .duels-create, .dcr-backdrop, .inv-card, .dl-skel-av, .dl-skel-line { animation: none; }
    .inv-card--out { animation: none; opacity: 0; }
    .dc, .dh-secondary, .rv-go, .dl-chev, .dl-drawer::details-content { transition: none; }
}
