/* ⚠ COPIA REPARTIDA desde comun/trackbet/historial-jugadas-panel.css — NO EDITAR AQUÍ: edita el original y corre  node comun/repartir.js  (MANUAL 53) */
/* ─── 📈 HISTORIAL DE JUGADAS (Carlos, 2026-10-19; MANUAL 42, FASE 1) ──────────────────────────
   La pestaña nueva de TRACKBET: buscar cualquier jugada extraída (con o sin cruce) y ver cómo se
   movieron su línea y sus cuotas en cada casa. Calcado de la muestra aprobada por Carlos
   (herramientas/simulador/muestra-historial-jugadas.html): mismos colores de TRACKBET, Lexend,
   números en mono, píldoras como las del LOG de las extensiones. Todo bajo #hist-panel (prefijo hj-). */
#pane-hist { background: var(--bg); }
/* (FASE 2, MANUAL 42.9) Los colores y letras del panel salen del tema B (--tb-…, tema-b-comun.css, igual en TRACKBET, la
   web-app y el Viewer): aquí se nombran con los nombres que usa el panel, así se ve igual en los tres (en TRACKBET son los
   mismos valores que pone tema-b-trackbet.css). */
#hist-panel, #hj-tip, #hj-tarj { --bg: var(--tb-fondo, #0d0d0d); --bg2: var(--tb-lateral, #141414); --bg3: var(--tb-panel, #1a1a1a); --border: var(--tb-borde2, #2a2a2a);
  --accent: var(--tb-verde, #00e5ff); --green: var(--tb-pos, #00e676); --red: var(--tb-neg, #ff1744); --text: var(--tb-texto, #e0e0e0);
  --text2: var(--tb-texto2, #888); --font: var(--tb-letra, 'Lexend', sans-serif); --mono: var(--tb-fija, Consolas, monospace); }
#hist-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; font-family: var(--font); font-size: 13px; color: var(--text); }

/* ── Filtros ── */
#hist-panel .hj-flt { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; background: var(--bg2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
#hist-panel .hj-fila { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#hist-panel .hj-lbl { font-size: 9.5px; letter-spacing: 1.2px; color: var(--text2); text-transform: uppercase; width: 56px; flex-shrink: 0; }
#hist-panel .hj-lbl.auto { width: auto; }
/* Píldoras como las del LOG de las extensiones (alto 22 px, contador, color apagado si no está elegida) */
#hist-panel .hj-pl { --k:#777; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 10.5px; font-weight: 600; letter-spacing: .6px;
  color: color-mix(in srgb, var(--k) 55%, #ddd); background: color-mix(in srgb, var(--k) 12%, #111); border: 1px solid color-mix(in srgb, var(--k) 30%, transparent); cursor: pointer; user-select: none; }
#hist-panel .hj-pl:hover { background: color-mix(in srgb, var(--k) 22%, #111); }
#hist-panel .hj-pl.on { background: color-mix(in srgb, var(--k) 45%, #141414); color: #fff; border-color: var(--k); }
#hist-panel .hj-pl .n { font-family: var(--mono); font-size: 8.5px; font-weight: 600; margin-left: 6px; padding: 1px 5px; border-radius: 8px; background: rgba(255,255,255,.08); color: #bbb; }
#hist-panel .hj-pl.on .n { background: rgba(0,0,0,.35); color: #fff; }
#hist-panel .hj-pl.casa { border-radius: 4px; padding: 0 8px; }
#hist-panel .hj-pl.casa.off { opacity: .35; }
#hist-panel .hj-q { background: var(--bg3); border: 1px solid var(--border); color: var(--text); font-family: var(--font); font-size: 12px; padding: 4px 10px; border-radius: 4px; width: 240px; outline: none; }
#hist-panel .hj-q:focus { border-color: var(--accent); }
#hist-panel select.hj-sel { background: var(--bg3); border: 1px solid var(--border); color: var(--text); font-family: var(--font); font-size: 11.5px; padding: 3px 8px; border-radius: 4px; outline: none; }
#hist-panel .hj-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
#hist-panel .hj-btn { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); font-family: var(--font); font-size: 11px; padding: 4px 10px; border-radius: 4px; cursor: pointer; }
#hist-panel .hj-btn:hover { color: var(--text); border-color: #444; }
#hist-panel .hj-derecha { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* ── Cuerpo: lista a la izquierda, detalle a la derecha ── */
#hist-panel .hj-cuerpo { flex: 1; display: grid; grid-template-columns: 330px 1fr; min-height: 0; }
#hist-panel .hj-lista { border-right: 1px solid var(--border); overflow-y: auto; }
#hist-panel .hj-lista .hj-cab { position: sticky; top: 0; z-index: 1; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 6px 12px; font-size: 9.5px; letter-spacing: 1.2px; color: var(--text2); text-transform: uppercase; display: flex; justify-content: space-between; }
/* (Carlos, 2026-10-19 noche, eligió la "C · TARJETITA" de muestra-historial-lista.html) Cada jugada como una mini
   tarjeta: borde izquierdo y tipo en el color del tipo, hora a la derecha, nombre grande, liga · partido corto, y abajo
   cada casa con su última línea y OVER / UNDER y los cambios. */
#hist-panel .hj-jg { --t:#777; margin: 6px 8px; border: 1px solid #222; border-left: 3px solid var(--t); border-radius: 5px; background: #121212; padding: 6px 10px 7px; cursor: pointer; }
#hist-panel .hj-jg:hover { border-color: #333; border-left-color: var(--t); }
#hist-panel .hj-jg.on { box-shadow: 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 6%, #121212); }
#hist-panel .hj-jg .r1 { display: flex; align-items: baseline; gap: 6px; }
/* (42.9) "hj-tipo" y no "tip": en la web-app y el Viewer la clase "tip" es la de su caja de tooltips */
#hist-panel .hj-jg .hj-tipo { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hist-panel .hj-jg .h { margin-left: auto; font-family: var(--mono); font-size: 10px; color: #999; white-space: nowrap; }
#hist-panel .hj-jg .nom { font-weight: 700; font-size: 13px; color: #fff; letter-spacing: .3px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hist-panel .hj-jg .pt { font-size: 10px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hist-panel .hj-jg .pt .lg { --k:#777; color: var(--k); font-weight: 700; letter-spacing: .6px; }
#hist-panel .hj-jg .r3 { display: flex; align-items: center; gap: 4px 10px; margin-top: 5px; padding-top: 5px; border-top: 1px solid #1e1e1e; flex-wrap: wrap; }
#hist-panel .hj-jg .ca { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; white-space: nowrap; }
#hist-panel .hj-jg .ca .ln { font-family: var(--mono); color: #ffab40; font-weight: 700; }
#hist-panel .hj-jg .ca .od { font-family: var(--mono); font-weight: 700; }
#hist-panel .hj-jg .ca .br, #hist-panel .hj-jg .ca .nada { color: #555; }
#hist-panel .hj-jg .mvb { margin-left: auto; font-size: 10px; color: var(--text2); white-space: nowrap; }
#hist-panel .hj-jg .mvb .m { font-family: var(--mono); color: #ffab40; font-weight: 700; }
#hist-panel .hj-jg .mvb .m0 { color: #555; }
#hist-panel .hj-cs { display: inline-flex; gap: 3px; }
#hist-panel .hj-cs span, #hist-panel .hj-jg .cs { --k:#777; font-size: 8.5px; font-weight: 700; letter-spacing: .4px; padding: 1px 4px; border-radius: 3px; background: color-mix(in srgb, var(--k) 70%, #000); color: #fff; }
#hist-panel .hj-mas { padding: 8px; text-align: center; font-size: 11px; color: var(--text2); cursor: pointer; }
#hist-panel .hj-mas:hover { color: var(--text); }

#hist-panel .hj-det { overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
#hist-panel .hj-det .hj-cab { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
#hist-panel .hj-det .hj-cab .nom { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: .3px; }
#hist-panel .hj-det .hj-cab .sub { font-size: 11px; color: var(--text2); }
#hist-panel .hj-det .hj-cab .sub b { font-family: var(--mono); font-weight: 400; color: #bbb; }
#hist-panel .hj-det .hj-cab .tp { font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 2px 7px; border-radius: 3px; border: 1px solid; }
#hist-panel .hj-herr { margin-left: auto; display: flex; gap: 6px; align-items: center; }
#hist-panel .hj-lado { display: inline-flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
#hist-panel .hj-lado span { padding: 4px 12px; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; color: var(--text2); cursor: pointer; }
#hist-panel .hj-lado span.on { background: var(--accent); color: #000; }
#hist-panel .hj-leyenda { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#hist-panel .hj-leyenda .ch { --k:#777; display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; padding: 3px 8px; border-radius: 4px; background: color-mix(in srgb, var(--k) 14%, #111); border: 1px solid color-mix(in srgb, var(--k) 40%, transparent); color: #ddd; }
#hist-panel .hj-leyenda .ch i { width: 10px; height: 3px; background: var(--k); border-radius: 2px; }
#hist-panel .hj-leyenda .ch b { font-family: var(--mono); font-weight: 700; }
#hist-panel .hj-leyenda .ch .ln { font-family: var(--mono); color: #aaa; }
#hist-panel .hj-leyenda .nota { font-size: 10px; color: #666; }
#hist-panel .pos { color: var(--green) !important; } #hist-panel .neg { color: var(--red) !important; }
#hist-panel .hj-vacio { padding: 40px; text-align: center; color: var(--text2); }

/* ── Gráfica (diseño B: una franja por casa) ── */
#hist-panel .hj-graf { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 6px 4px; }
#hist-panel .hj-graf svg { width: 100%; height: auto; display: block; }
#hist-panel .hj-graf [data-i] { cursor: pointer; }   /* (Carlos) la manito sobre los puntos, los rombos y los soles */
#hist-panel .hj-graf.hov circle.hv { r: 5.5; }
#hist-panel .hj-graf line.marcaT { pointer-events: none; }
#hist-panel .hj-graf path, #hist-panel .hj-graf circle, #hist-panel .hj-graf line[data-c] { transition: opacity .12s; }
#hist-panel .hj-graf.hov path:not(.hv), #hist-panel .hj-graf.hov circle:not(.hv), #hist-panel .hj-graf.hov line[data-c]:not(.hv) { opacity: .18 !important; }
#hist-panel .hj-graf.hov path.hv { stroke-width: 3; }

/* ── Tabla de cambios (como el 📈 de las tarjetas: hora en mono, etiqueta de la casa en su color) ── */
#hist-panel .hj-tabla { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; }
#hist-panel .hj-tabla .th, #hist-panel .hj-tabla .tr { display: grid; grid-template-columns: 70px 54px 64px 70px 80px 1fr; gap: 8px; padding: 5px 12px; align-items: center; }
#hist-panel .hj-tabla.multi .th, #hist-panel .hj-tabla.multi .tr { grid-template-columns: 136px 54px 64px 70px 80px 1fr; }   /* con varios días: "LUN 19 · 12:27:28" */
#hist-panel .hj-tabla .th { font-size: 9.5px; letter-spacing: 1.2px; color: var(--text2); text-transform: uppercase; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg2); }
#hist-panel .hj-tabla .tr { border-bottom: 1px solid #1a1a1a; font-size: 11px; }
#hist-panel .hj-tabla .tr:hover { background: rgba(255,255,255,.03); }
#hist-panel .hj-tabla .h { font-family: var(--mono); font-size: 10.5px; color: var(--text2); }
#hist-panel .hj-tabla .c { --k:#777; font-size: 9px; font-weight: 700; letter-spacing: .5px; padding: 1px 5px; border-radius: 3px; background: color-mix(in srgb, var(--k) 70%, #000); color: #fff; justify-self: start; }
#hist-panel .hj-tabla .n { font-family: var(--mono); font-weight: 700; }
#hist-panel .hj-tabla .ld { font-size: 10px; color: #999; }
#hist-panel .hj-tabla .q { color: #bbb; }
#hist-panel .hj-tabla .q.linea { color: #ffab40; font-weight: 600; }
#hist-panel .hj-tabla .q.ap { color: #28cc95; }
#hist-panel .hj-tabla .q.jug { color: #fff; font-weight: 600; }
#hist-panel .hj-tabla .q .de { font-family: var(--mono); color: var(--text2); }
#hist-panel .hj-tabla .q .a { font-family: var(--mono); color: #fff; }
/* (Carlos, 2026-10-25, MANUAL 42.8) MOSTRAR TODO · ● ODD · ◆ LÍNEA: al final de la fila "Cambios de", empujado a la
   derecha; el símbolo es el mismo de la gráfica. Y el aviso cuando el filtro no deja ningún movimiento de su clase. */
#hist-panel .hj-mostrar { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
#hist-panel .hj-mostrar .hj-lbl { margin-right: 2px; }
#hist-panel .hj-pl.vista .s { margin-right: 5px; font-size: 10px; }
#hist-panel .hj-tabla .hj-sin { padding: 12px 14px; color: var(--text2); font-size: 12px; border-bottom: 1px solid #1a1a1a; }

/* ── Cajita al pasar el ratón por la gráfica (estilo del proyecto: caja oscura, Lexend, título con color, filas etiqueta / texto) ── */
#hj-tip { position: fixed; display: none; z-index: 9; background: #111; border: 1px solid #333; border-radius: 6px; padding: 8px 11px; font-family: var(--font); font-size: 12px; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.7); min-width: 160px; color: var(--text); }
#hj-tip .t { font-weight: 700; letter-spacing: 1px; font-size: 12.5px; }
#hj-tip .t + .r { margin-top: 4px; }
#hj-tip .r { display: flex; gap: 8px; line-height: 1.65; }
#hj-tip .r b { color: #888; font-weight: 500; width: 50px; flex-shrink: 0; }
#hj-tip .r span { font-family: var(--mono); color: #fff; }
#hj-tip .pos { color: var(--green); } #hj-tip .neg { color: var(--red); }

/* ── Tarjeta al hacer clic en un punto: así estaban TODAS las casas en ese momento ── */
#hj-tarj { --cc:#555; --tc:#999; position: fixed; display: none; z-index: 10; width: 360px; background: #121212; border: 1px solid color-mix(in srgb, var(--cc) 35%, #2a2a2a); border-left: 3px solid var(--cc); border-radius: 7px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.9); font-family: var(--font); color: var(--text); }
#hj-tarj .top { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #121212; border-bottom: 1px solid color-mix(in srgb, var(--cc) 35%, #1f1f1f); }
#hj-tarj .top .sq { width: 11px; height: 11px; border-radius: 2px; background: var(--tc); flex: none; }
#hj-tarj .top .tipo { font-size: 11.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--tc); flex: 1; }
#hj-tarj .x { color: rgba(255,255,255,.5); cursor: pointer; font-size: 14px; padding: 0 2px; } #hj-tarj .x:hover { color: #fff; }
#hj-tarj .nom { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .3px; padding: 10px 12px 0; line-height: 1.15; }
#hj-tarj .par { font-size: 11px; color: var(--text2); padding: 3px 12px 8px; } #hj-tarj .par b { font-family: var(--mono); font-weight: 400; color: #bbb; }
#hj-tarj .mom { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: rgba(255,255,255,.04); border-top: 1px solid #1f1f1f; border-bottom: 1px solid #1f1f1f; }
#hj-tarj .mom .h { font-family: var(--mono); font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .5px; }
#hj-tarj .mom .lado { font-size: 9.5px; font-weight: 700; letter-spacing: 1px; padding: 2px 7px; border-radius: 3px; background: var(--accent); color: #000; }
#hj-tarj .mom .s { font-size: 10.5px; color: var(--text2); flex: 1; }
#hj-tarj .th, #hj-tarj .f { display: grid; grid-template-columns: 50px 60px 66px 1fr; gap: 8px; align-items: center; padding: 5px 12px; }
#hj-tarj .th { font-size: 9px; letter-spacing: 1.2px; color: var(--text2); text-transform: uppercase; padding-top: 7px; }
#hj-tarj .f { border-top: 1px solid #1a1a1a; } #hj-tarj .f:last-child { padding-bottom: 9px; }
#hj-tarj .f.yo { background: color-mix(in srgb, var(--cc) 16%, transparent); }
#hj-tarj .f .c { --k:#777; font-size: 9.5px; font-weight: 700; letter-spacing: .5px; padding: 2px 6px; border-radius: 3px; background: color-mix(in srgb, var(--k) 70%, #000); color: #fff; justify-self: start; }
#hj-tarj .f .n { font-family: var(--mono); font-size: 13.5px; font-weight: 700; } #hj-tarj .f .ln { color: #ffab40; } #hj-tarj .f .d { font-family: var(--mono); font-size: 10px; color: var(--text2); }
#hj-tarj .f .sin { font-size: 10.5px; color: #555; grid-column: 2 / -1; }
#hj-tarj .pos { color: var(--green); } #hj-tarj .neg { color: var(--red); }
/* La tarjeta de cruce REAL (clic en un ☼ sol): la misma de ACTIVOS / JUGADOS (tarjeta-cruce.css) */
#hj-tarj.cruce { width: 320px; border: none; background: transparent; box-shadow: none; overflow: visible; }
#hj-tarj.cruce .cierre { display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text2); padding: 0 2px 5px; }
#hj-tarj.cruce .cr-card { box-shadow: 0 16px 48px rgba(0,0,0,.9); }

/* ── (Carlos, 2026-10-24, MANUAL 42.7) 🩹 ESTADOS DE LOS COMPAÑEROS ─────────────────────────────────────────────────── */
/* La raya de cada cambio (manito: clic = etiquetas) y el bloque de etiquetas que se arrastra (manito abierta / cerrada) */
#hist-panel .hj-graf [data-ev] { cursor: pointer; }
#hist-panel .hj-graf .blk { cursor: grab; touch-action: none; }
#hist-panel .hj-graf .blk.arr { cursor: grabbing; }
#hist-panel .hj-graf line.con { pointer-events: none; }
/* La fila 🩹 de la tabla de CAMBIOS: fondo y borde izquierdo del color del estado, texto en Lexend */
#hist-panel .hj-tabla .tr.inj { background: color-mix(in srgb, var(--e) 8%, transparent); box-shadow: inset 3px 0 0 var(--e); }
#hist-panel .hj-tabla .tr.inj .c { background: color-mix(in srgb, var(--k) 22%, #000); color: var(--k); }
#hist-panel .hj-tabla .tr.inj .q { color: #ddd; }
#hist-panel .hj-tabla .tr.inj .q .fu { color: var(--text2); }
/* El tooltip de una raya: nombre a la izquierda, "DOUBT → OUT · 25% de jugar · X + Rotowire" a la derecha (en Lexend) */
#hj-tip .r.est b { width: 110px; color: #ccc; font-weight: 600; }
#hj-tip .r.est span { font-family: var(--font); color: #ddd; }
#hj-tip .r.est span b { width: auto; font-weight: 700; }
#hj-tip .r.est i { font-style: normal; color: #888; }

/* ── (FASE 2, 2026-10-25, MANUAL 42.9) El mismo panel en la web-app y el Viewer (copia idéntica en los tres) ───────────
   En pantalla angosta (teléfono, el panel lateral del Viewer) no caben la lista y el detalle lado a lado: va uno a la vez.
   Tocar una jugada pasa al detalle (clase hj-ver-det en #hist-panel) y "◂ LISTA" vuelve. En la PC, igual que siempre. */
#hist-panel .hj-volver { display: none; }
/* (Carlos, 2026-10-25, MANUAL 42.11) Lo del TELÉFONO que en la PC no se ve: ⚙ FILTROS, el resumen, LISTO, ⤢ Agrandar y
   "ⓘ qué es cada cosa" */
#hist-panel .hj-fbtn, #hist-panel .hj-res, #hist-panel .hj-listo, #hist-panel .hj-fullbtn, #hist-panel .hj-leyenda .nota-i { display: none; }
/* La gráfica a pantalla completa, como una foto (dentro del panel, encima de todo; la tarjeta y la cajita, más arriba) */
#hist-panel .hj-full { display: none; position: fixed; inset: 0; z-index: 9000; background: var(--bg); flex-direction: column; padding: 8px; box-sizing: border-box; }
#hist-panel .hj-full.on { display: flex; }
#hist-panel .hj-full-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 2px 8px; }
#hist-panel .hj-full-cab .nom { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .3px; }
#hist-panel .hj-full-cab .tp { font-size: 10px; font-weight: 700; letter-spacing: 1px; padding: 2px 7px; border-radius: 3px; border: 1px solid; }
#hist-panel .hj-full-cab .sub { font-family: var(--mono); font-size: 11px; color: var(--text2); }
#hist-panel .hj-full-x { margin-left: auto; font-size: 20px; line-height: 1; color: var(--text2); cursor: pointer; padding: 2px 6px; }
#hist-panel .hj-zoom { display: none; font: 700 11px var(--mono); color: #ffab40; border: 1px solid #ffab4066; background: #ffab4014; border-radius: 6px; padding: 3px 8px; cursor: pointer; white-space: nowrap; }
#hist-panel .hj-zoom.on { display: inline-block; }
#hist-panel .hj-zoom b { font-family: var(--font); margin-left: 4px; }
#hist-panel .hj-full .hj-graf { flex: 1; min-height: 0; padding: 0; border: none; background: transparent; touch-action: none; user-select: none; overflow: hidden; }
#hist-panel .hj-full-pie { font-size: 10.5px; color: #777; padding: 6px 2px 0; }
#hj-tip { z-index: 9001; } #hj-tarj { z-index: 9002; }
@media (max-width: 760px) {
  /* (42.11) Filtros plegados: solo el buscador y ⚙ FILTROS ▾; debajo, en chico, lo elegido. Abiertos: todo + LISTO ▴ */
  #hist-panel .hj-fbtn { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 30px; font-weight: 600; letter-spacing: .5px; }
  #hist-panel .hj-flt:not(.hj-plegado) .hj-fbtn { border-color: var(--accent); color: var(--accent); }
  #hist-panel .hj-flt:not(.hj-plegado) .hj-fbtn .fl { display: inline-block; transform: rotate(180deg); }
  #hist-panel .hj-flt.hj-plegado > .hj-fila:not(:first-child), #hist-panel .hj-flt.hj-plegado .hj-listo { display: none; }
  #hist-panel .hj-flt.hj-plegado > .hj-fila:first-child > :not(.hj-q):not(.hj-fbtn) { display: none; }
  #hist-panel .hj-flt.hj-plegado .hj-q { height: 30px; font-size: 13px; }
  #hist-panel .hj-flt.hj-plegado .hj-res { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 11px; color: var(--text2); padding: 0 2px; cursor: pointer; }
  #hist-panel .hj-res .p { color: var(--text); font-weight: 600; } #hist-panel .hj-res .d { font-family: var(--mono); } #hist-panel .hj-res .sep { color: #555; }
  #hist-panel .hj-flt:not(.hj-plegado) .hj-listo { display: flex; justify-content: flex-end; }
  #hist-panel .hj-listo .hj-btn { border-color: var(--accent); color: var(--accent); font-weight: 700; letter-spacing: .6px; padding: 6px 14px; }
  /* la gráfica ya viene dibujada a los píxeles del teléfono; tocarla (o ⤢) = pantalla completa */
  #hist-panel .hj-fullbtn { display: inline-block; color: #ffab40; border-color: #ffab4066; }
  #hist-panel .hj-det .hj-graf { cursor: zoom-in; padding: 6px 4px 2px; }
  #hist-panel .hj-leyenda .nota-i { display: inline; font-size: 10.5px; color: #777; text-decoration: underline dotted; cursor: pointer; }
  #hist-panel .hj-leyenda .nota { display: none; }
  #hist-panel .hj-leyenda.abierta .nota { display: block; flex-basis: 100%; }
  #hist-panel .hj-cuerpo { grid-template-columns: 1fr; }
  #hist-panel .hj-lista { border-right: none; }
  #hist-panel.hj-ver-det .hj-lista { display: none; }
  #hist-panel:not(.hj-ver-det) .hj-det { display: none; }
  #hist-panel .hj-volver { display: inline-block; flex: none; }
  #hist-panel .hj-flt { padding: 8px; }
  #hist-panel .hj-lbl { width: auto; min-width: 44px; }
  #hist-panel .hj-q { flex: 1 1 150px; width: auto; min-width: 0; }
  #hist-panel .hj-sep { display: none; }
  #hist-panel .hj-derecha { margin-left: 0; }
  #hist-panel .hj-det { padding: 10px 8px; }
  #hist-panel .hj-det .hj-cab { align-items: center; gap: 8px 10px; }
  #hist-panel .hj-det .hj-cab .nom { font-size: 16px; }
  #hist-panel .hj-herr { margin-left: 0; }
  #hist-panel .hj-mostrar { margin-left: 0; flex-wrap: wrap; }
  /* la tabla de cambios con su ancho de siempre y scroll de lado */
  #hist-panel .hj-tabla { overflow-x: auto; }
  #hist-panel .hj-tabla .th, #hist-panel .hj-tabla .tr, #hist-panel .hj-tabla .hj-sin { min-width: 560px; }
  #hj-tarj { width: min(360px, calc(100vw - 16px)); }
}
